-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathin.php
91 lines (84 loc) · 3.76 KB
/
in.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
include "connection.php";
session_start();
if(isset($_SESSION['user_id']))
header("loation:index1.php");
else
echo "<script>alert('not logined')</script>";
if(isset($_POST['signin']))
{
$email=$_POST['email'];
$pass=$_POST['pass'];
$arr=$database->getReference('cms/user')->getValue();
foreach($arr as $key => $value)
{
if(strcmp($value['email'],$email)==0&&strcmp($value['password'],$pass)==0)
{
echo "<script>alert('Logined in')</script>";
$_SESSION['user_id']=$key;
header("location:index1.php");
///break;
}
}
echo "<script>alert('Creadentials Incorrect')</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Sign Up Form by Colorlib</title>
<!-- Font Icon -->
<link rel="stylesheet" href="fonts/material-icon/css/material-design-iconic-font.min.css">
<!-- Main css -->
<link rel="stylesheet" href="login/css/style.css">
</head>
<body>
<div class="main" style="padding:10px 0;">
<!-- Sing in Form -->
<section class="sign-in">
<div class="container">
<div class="signin-content">
<div class="signin-image">
<figure><img src="login/images/signin-image.jpg" alt="sing up image"></figure>
<a href="up.php" class="signup-image-link">Create an account</a>
</div>
<div class="signin-form">
<h2 class="form-title">Sign in</h2>
<form method="POST" class="register-form" id="login-form">
<div class="form-group">
<label for="your_name"><i class="zmdi zmdi-account material-icons-name"></i></label>
<input type="email" name="email" id="your_name" placeholder="Your Email"/>
</div>
<div class="form-group">
<label for="your_pass"><i class="zmdi zmdi-lock"></i></label>
<input type="password" name="pass" id="your_pass" placeholder="Password"/>
</div>
<div class="form-group">
<input type="checkbox" name="remember-me" id="remember-me" class="agree-term" />
<label for="remember-me" class="label-agree-term"><span><span></span></span>Remember me</label>
</div>
<div class="form-group form-button">
<input type="submit" name="signin" id="signin" class="form-submit" value="Log in"/>
</div>
</form>
<!--<div class="social-login">
<span class="social-label">Or login with</span>
<ul class="socials">
<li><a href="#"><i class="display-flex-center zmdi zmdi-facebook"></i></a></li>
<li><a href="#"><i class="display-flex-center zmdi zmdi-twitter"></i></a></li>
<li><a href="#"><i class="display-flex-center zmdi zmdi-google"></i></a></li>
</ul>
</div>-->
</div>
</div>
</div>
</section>
</div>
<!-- JS -->
<script src="login/vendor/jquery/jquery.min.js"></script>
<script src="login/js/main.js"></script>
</body><!-- This templates was made by Colorlib (https://colorlib.com) -->
</html>