-
Notifications
You must be signed in to change notification settings - Fork 1
/
addsenoirname.php
331 lines (276 loc) · 9.36 KB
/
addsenoirname.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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<title>Add/Remove a senior</title>
<link href="image/wcnr.png" rel="shortcut icon" type="favicon"/>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css'>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/typicons/2.0.8/typicons.min.css'>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<body id="grad">
<style>
#grad {
width: 100wh;
height: 90vh;
color: #fff;
background: linear-gradient(45deg, #606c88, #3f4c6b, #203a43, #2c5364);
background-size: 500% 500%;
-webkit-animation: Gradient 40s ease infinite;
-moz-animation: Gradient 40s ease infinite;
animation: Gradient 40s ease infinite;
}
@-webkit-keyframes Gradient {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 0% 50%
}
}
@-moz-keyframes Gradient {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 0% 50%
}
}
@keyframes Gradient {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 0% 50%
}
}
</style>
<div data-aos-duration="2000" data-aos="fade-down">
<!-- #region Jssor Slider Begin -->
<!-- Generator: Jssor Slider Maker -->
<!-- Source: https://www.jssor.com -->
<script src="js/jssor.slider-27.5.0.min.js" type="text/javascript"></script>
<style>
/*jssor slider loading skin spin css*/
.jssorl-009-spin img {
animation-name: jssorl-009-spin;
animation-duration: 1.6s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes jssorl-009-spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/*jssor slider bullet skin 051 css*/
.jssorb051 .i {position:absolute;cursor:pointer;}
.jssorb051 .i .b {fill:#fff;fill-opacity:0.5;}
.jssorb051 .i:hover .b {fill-opacity:.7;}
.jssorb051 .iav .b {fill-opacity: 1;}
.jssorb051 .i.idn {opacity:.3;}
/*jssor slider arrow skin 051 css*/
.jssora051 {display:block;position:absolute;cursor:pointer;}
.jssora051 .a {fill:none;stroke:#fff;stroke-width:360;stroke-miterlimit:10;}
.jssora051:hover {opacity:.8;}
.jssora051.jssora051dn {opacity:.5;}
.jssora051.jssora051ds {opacity:.3;pointer-events:none;}
</style>
<div id="jssor_1" style="position:relative;margin:0 auto;top:0px;left:0px;width:980px;height:380px;overflow:hidden;visibility:hidden;">
<!-- Loading Screen -->
<div data-u="loading" class="jssorl-009-spin" style="position:absolute;top:0px;left:0px;width:100%;height:100%;text-align:center;background-color:rgba(0,0,0,0.7);">
<img style="margin-top:-19px;position:relative;top:50%;width:38px;height:38px;" src="image/spin.svg" />
</div>
<div data-u="slides" style="cursor:default;position:relative;top:0px;left:0px;width:980px;height:380px;overflow:hidden;">
<div>
<img data-u="image" src="image/001.png" />
</div>
<div>
<img data-u="image" src="image/002.png" />
</div>
<div>
<img data-u="image" src="image/003.png" />
</div>
<div>
<img data-u="image" src="image/004.png" />
</div>
<div>
<img data-u="image" src="image/005.png" />
</div>
<div>
<img data-u="image" src="image/006.png" />
</div>
<div>
<img data-u="image" src="image/007.png" />
</div>
<div>
<img data-u="image" src="image/008.png" />
</div>
<div>
<img data-u="image" src="image/009.png" />
</div>
<div>
<img data-u="image" src="image/001.png" />
</div>
<div>
<img data-u="image" src="image/001.png" />
</div>
<div>
<img data-u="image" src="image/001.png" />
</div>
<div>
<img data-u="image" src="image/001.png" />
</div>
</div>
<!-- Bullet Navigator -->
<div data-u="navigator" class="jssorb051" style="position:absolute;bottom:12px;right:12px;" data-autocenter="1" data-scale="0.5" data-scale-bottom="0.75">
<div data-u="prototype" class="i" style="width:16px;height:16px;">
<svg viewbox="0 0 16000 16000" style="position:absolute;top:0;left:0;width:100%;height:100%;">
<circle class="b" cx="8000" cy="8000" r="5800"></circle>
</svg>
</div>
</div>
<!-- Arrow Navigator -->
<div data-u="arrowleft" class="jssora051" style="width:55px;height:55px;top:0px;left:25px;" data-autocenter="2" data-scale="0.75" data-scale-left="0.75">
<svg viewbox="0 0 16000 16000" style="position:absolute;top:0;left:0;width:100%;height:100%;">
<polyline class="a" points="11040,1920 4960,8000 11040,14080 "></polyline>
</svg>
</div>
<div data-u="arrowright" class="jssora051" style="width:55px;height:55px;top:0px;right:25px;" data-autocenter="2" data-scale="0.75" data-scale-right="0.75">
<svg viewbox="0 0 16000 16000" style="position:absolute;top:0;left:0;width:100%;height:100%;">
<polyline class="a" points="4960,1920 11040,8000 4960,14080 "></polyline>
</svg>
</div>
</div>
<script src="js/javascript.js"></script>
<script type="text/javascript">jssor_1_slider_init();</script>
<!-- #endregion Jssor Slider End -->
</div>
<br>
<?php
error_reporting(0);
error_reporting(E_ALL & ~E_NOTICE);
$apass = "123456789";
$pass = $_POST["pass"];
$nameadd = $_POST["usernameadd"];
if(!($_POST["gender"] == "null")){
if(!(empty($_POST["usernameadd"]))){
if ( $pass==$apass ){
// add names by writting to the allstub.txt and allstug.txt
$filewbid = fopen($_POST["gender"], "a") or die("Unable to open file!");
fwrite($filewbid, "\n".$nameadd);
fclose($filewbid);
if ($_POST["gender"]== "allstug.txt"){
$countf = 0;
$fileread = fopen("allstug.txt", "r");
while (!feof($fileread)){
$line = fgets($fileread);
$countf ++;
}
$filewbid = fopen("information/".$countf."f".".txt", "w") or die("Unable to open file!");
fwrite($filewbid, $nameadd);
fclose($filewbid);
}
elseif($_POST["gender"]=="allstub.txt") {
$countf = 0;
$fileread = fopen("allstub.txt", "r");
while (!feof($fileread)){
$line = fgets($fileread);
$countf ++;
}
$filewbid = fopen("information/".$countf."m".".txt", "w") or die("Unable to open file!");
fwrite($filewbid, $nameadd);
fclose($filewbid);
}
echo "added!";
}
else{
echo "wrong password";
}
}
}
?>
<center>
<info><h3>Add A Senior</h3></info>
<form action="" method="post"><br>
Name to add:<br> <input type="text" name="usernameadd" placeholder="Name to add"><br>
Male/Female:<br> <select name = "gender">
<option value="null">Select Gender</option>
<option value="allstug.txt">Female</option>
<option value="allstub.txt">Male</option>
</select>
<br>
Password:<br> <input type="password" name="pass" placeholder="password" ><br>
<input type="submit" value="Add!">
</form>
</center>
<p> </p>
<hr>
<?php
error_reporting(0);
error_reporting(E_ALL & ~E_NOTICE);
$apass = "1234567890";
$pass = $_POST["pass"];
$nameremove = $_POST["usernameremove"];
if(!($_POST["gender"] == "null")){
if(!(empty($_POST["usernameremove"]))){
if ( $pass==$apass ){
//scan for the name in allstub.txt/allstug.txt and remove it
$lines = file($_POST["gender"]);
foreach($lines as $line) if(!strstr($line, $_POST["usernameremove"])) $out .= $line;
$f = fopen($_POST["gender"], "w");
fwrite($f, $out);
fclose($f);
echo "Removed!";
}else{
echo "wrong password";
}
}
}
?>
<center>
<info><h3>Remove A Senior</h3></info>
<form action="" method="post">
Name to Remove:<br> <input type="text" name="usernameremove"placeholder="Name to remove" ><br>
Male/Female <br><select name = "gender">
<option value="null">Select Gender</option>
<option value="allstug.txt">Female</option>
<option value="allstub.txt">Male</option>
</select>
<br>
Password: <br><input type="password" name="pass" placeholder="password"><br>
<input type="submit" value="Remove!">
</form>
<p> </p>
</center>
<style>
.zoom {
height: 110px;
width: 110px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
.zoom:hover {
width: 130px;
height: 130px;
}
</style>
<center><refer><h2>This website is made possible by:</h2></refer></center>
<div data-aos="zoom-in" >
<center>
<a href="https://www.github.com/null0verflow" target="_blank">
<img src="image/ok.png" width="110" height="110" class="zoom">
</a>
</center>
<center><refer><p> Bob Dinh</p>
<refer><p> Designing/developing</p>
</div>
</refer></centercenter>