-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
executable file
·246 lines (174 loc) · 6.72 KB
/
home.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<?php
require_once ("config.php");
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- here double curly helps to pass a variable -->
<title>Food hunters</title>
<link rel="stylesheet" href="my_css/my_index_style.css">
<link rel="stylesheet" href="my_css/slide_show.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
</head>
<body class="background_style">
<h1 id="header"><b><i>Food Hunters</i></b></h1>
<!-- slide show start -->
<div class="slideshow-container">
<div class="mySlides fade">
<div class="numbertext">1 / 7</div>
<img src="image/breakfast.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">2 / 7</div>
<img src="image/turkey.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">3 / 7</div>
<img src="image/hand_cup.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">4 / 7</div>
<img src="image/cake.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">5 / 7</div>
<img src="image/lemon_chiken.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">6 / 7</div>
<img src="image/pasta.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">7 / 7</div>
<img src="image/salmon.jpg" style="width:100%">
</div>
</div>
<br>
<div style="text-align:center">
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
</div>
<script>
var slideIndex = 0;
showSlides();
function showSlides() {
var i;
var slides = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("dot");
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slideIndex++;
if (slideIndex > slides.length) {slideIndex = 1}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "");
}
slides[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " active";
setTimeout(showSlides, 2000); // Change image every 2 seconds
}
</script>
<!-- slide show end -->
<!-- registration -->
<div class="registration_style regitration_position">
<h1 align="center">Sign up</h1>
<div style="margin: 20px;">
<form class="" action="registration.php" method="post">
<label for="name">NAME</label><br>
<input class="form-control" type="text" name="name" value="" style="color: black; width: 100%;" placeholder="Enter Name"><br>
<label for="email">email</label><br>
<input class="form-control" type="email" name="email" value="" style="color: black; width: 100%;" placeholder="Enter Email" required><br>
<label for="password">password</label><br>
<input class="form-control" type="password" name="password" value="" style="color: black; width: 100%; " placeholder="Enter password" required><br>
<button type="submit" style="color: black;"> submit</button>
<br><br><br>
</form>
</div>
<?php
if(isset($_GET['value_reg'])){
echo ' <div class="alert alert-success alert-dismissible fade in">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Success!</strong> you have been successfully registered
</div>';
}
?>
</div><br><br>
<!-- registration finished -->
<!-- modal start -->
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-danger btn-lg " data-toggle="modal" data-target="#myModal" style="margin-left:100px;">Login as admin</button>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Admin login</h4>
</div>
<div class="modal-body">
<h1 align="center">Admin sign in</h1>
<form class="" action="admin_sign_in.php" method="post">
<label for="name" style="color:white;">Name</label><br>
<input class="form-control" type="text" name="user_name" value="" style="color:black; width: 100%;" placeholder="Enter Name" required>
<label for="password" style="color:white;">password</label><br>
<input class="form-control" type="password" name="user_password" value="" style="color:black; width: 100%;" placeholder="Enter password" required>
<br>
<input type="submit" name="submit" value="log in" style="color:black;">
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- modal finished -->
<center>
<?php
if(isset($_GET['admin_value_sign_in'])){
echo '<div class="alert alert-danger alert-dismissible fade in" style="width:30%; hight:20%;">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>admin name or password wrong!</strong> try again
</div>';
}
?>
</center>
<!-- sign in -->
<div class="sign_in_style">
<h1 align="center">sign in</h1>
<form class="" action="sign_in.php" method="post">
<label for="name" style="color:white;">Name</label><br>
<input class="form-control" type="text" name="user_name" value="" style="color:black; width: 100%;" placeholder="Enter Name" required>
<label for="password" style="color:white;">password</label><br>
<input class="form-control" type="password" name="user_password" value="" style="color:black; width: 100%;" placeholder="Enter password" required>
<br>
<input type="submit" name="submit" value="log in" style="color:black;" class="btn btn-primary btn-md">
</form>
<?php
if(isset($_GET['value_sign_in'])){
echo '<div class="alert alert-danger">
<strong>wrong password!</strong> try again
</div>';
}
?>
</div><br><br>
<!-- sign in finished -->
<div class="container about">
<button style="margin-left: 130px;" type="button" class="btn btn-info button_style" data-toggle="collapse" data-target="#demo">about</button>
<div id="demo" class="collapse transbox">
<p style="color: black">for the betterment of RUET....
this will be the platform where this need of blood will meet its purpose...</p>
</div>
</div>
</body>
</html>