-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser_gen.html
67 lines (67 loc) · 2.46 KB
/
user_gen.html
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
<?php
include "./scripts/php/checkAuth.php";
checkAuth(0);
include "./scripts/php/wanted.php";
function show_wanted ($wanted) {
if (count($wanted) == 0) {
echo "<big style='font-size:48px;'>Нет заявок</big>";
return false;
}
else {
$par = 100 - 25 * count($wanted);
if (count($wanted) >= 4) {
$par = 3;
}
$top = $par / 2;
echo "<style>
.formdiv {
top: $top%;
}
</style>
";
foreach ($wanted as $want) {
if ($want[0] != "" and $want[1] != "" and $want[2] != "" and $want[3] != "") {
$sel = array(" ", " ", " ");
$sel[(int)$want[2]] = " selected";
$msg = ' <div class="formdiv">
<form action="/scripts/php/auth_gen.php" method="post">
<select name="cat" class="input">
<option'.$sel[0].' value="0">Администратор</option>
<option'.$sel[1].' value="1">Пользователь</option>
<option'.$sel[2].' value="2">"Плохой" пользователь</option>
</select>
<input type="text" name="email" value="'.$want[3].'" class="input"/><br><br>
<input type="text" name="login" value="'.$want[0].'" class="input"/>
<input type="text" name="password" value="'.$want[1].'" class="input"/><br><br>
<input type="submit" name="logon" value="Accept" id="accept" class="logon"/>
<input type="submit" name="logon" value="Cancel" id="cancel" class="logon"/>
</form>
</div>
';
echo $msg;
} else {
echo " <big style='font-size:48px;'>В заявке ошибка.</big>";
echo " <p>";
echo " Содержимое:\n ";
print_r($want);
echo " </p>";
return false;
}
}
return true;
}
}
?>
<html>
<head>
<?php
include "./scripts/php/html_incl.php";
head("Создать пользователя", "style-login.css");
?>
</head>
<body align="center">
<?php
show_wanted($wanted);
?>
</body>
</html>