-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.php
139 lines (86 loc) · 2.82 KB
/
404.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
if(isset($_SESSION['username']))
{
header('location:../index.php');
exit();
}
else
{
if (isset($_POST['login'])) {
require '../includes/dbh.php';
$mailid = $_POST['userid'];
$pass = $_POST['password'];
$hashedPass=md5($pass);
echo $mailid;
//check for empty fields
if (empty($mailid) || empty($pass)) {
echo 'Empty Fields';
exit();
}
else
{
$sql = "SELECT * FROM users WHERE userid = ? AND upass= ?;";
$stmt = mysqli_stmt_init($conn);
if (!mysqli_stmt_prepare($stmt,$sql)) {
echo 'statement error!';
exit();
}
else
{
mysqli_stmt_bind_param($stmt,"ss",$mailid,$hashedPass);
mysqli_stmt_execute($stmt);
mysqli_stmt_store_result($stmt);
$resultCheck = mysqli_stmt_num_rows($stmt);
if ($resultCheck > 0) {
session_start();
$_SESSION['username']=$mailid;
header('location:../index.php?login=success');
}
else
{
header('location:../home.php?login=Wrong Cerdidentials!Try Again');
exit();
}
}
}
}
}
?>
<!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>TrueWalls-Home</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="stylesheet" type="text/css" href="css/custom.css"/>
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
</head>
<body>
<div class="_404" style="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;">
<h1 class="title is-size-1">No Photo Avialable</h1><br>
<a href="index.php" class="button is-primary is-rounded">Go Back</a>
</div>
<script src="js/jquery-3.4.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/popper.min.js"></script>
<!--<script>
$(document).ready(function(){
$(window).scroll(function(){
var scroll = $(window).scrollTop();
if (scroll > 20) {
$(".nav").css("box-shadow" , "0px 2px 10px 0px rgba(0,0,0,0.65)");
}
else{
$(".nav").css("box-shadow" , "0px 0px 0px 0px rgba(0,0,0,0.65)");
}
});
$("input:text").val("");
$('#first').tooltip();
});
</script>-->
</body>
</html>