-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_users.php
More file actions
104 lines (101 loc) · 3.42 KB
/
list_users.php
File metadata and controls
104 lines (101 loc) · 3.42 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Ïðîñìîòð ñïèñêà ïîëüçîâàòåëåé è óäàëåíèå -->
<html>
<head>
<title>(admin_sys)-Ñïèñîê ïîëüçîâàòåëåé ñèñòåìû</title></head>
<body>
<?php
session_start();
include ('db_connect.php');
if (isset($_SESSION['user_id']))
{
$query = " SELECT `login`
FROM `users`
LIMIT 1
";
$sql = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_assoc($sql);
$welcome = $row['login'];
// ïîêàçûâàåì çàùèùåííûå îò ãîñòåé äàííûå
print '
<h1><img src="logo.png">Ñèñòåìà êîíòðîëÿ äåÿòåëüíîñòè ñèñòåìíûõ àäìèíèñòðàòîðîâ "toywar" </h1>
<p>Äîáðî ïîæàëîâàòü, <b> ' . $welcome . '</b>!<br/>
Ñåãîäíÿ: ' ?>
<?php print date("dS F Y, H:i:s");
print '
</p>
<hr/>
<table border=0 align=left>
<tr align=center>
<td colspan=3><b>Àäìèíèñòðèðîâàíèå:</b></td>
</tr>
<tr align=center>
<td colspan=3><a href="list_users.php">Ñïèñîê àäìèíèñòðàòîðîâ</a><br/>
<a href="register.php">Äîáàâèòü àäìèíèñòðàòîðà</a><br/></td>
</tr>
<tr align=center>
<td colspan=3><b>Äîêóìåíòû:</b></td>
</tr>
<tr align=center>
<td colspan=3><a href="list_income.php">Ñïèñîê çàÿâîê</a><br/>
<a href="new_income.php">Íîâàÿ çàÿâêà</a><br/>
<a href="add_complete.php">Àêò âûïîëíåííûõ ðàáîò</a><br/>
<a href="">Äîãîâîð</a><br/>
<a href="add_outcome.php">Çàÿâêà íà ñêëàä</a></td>
</tr>
<tr align=center>
<td colspan=3><b>Îò÷åòû:</b></td>
</tr>
<tr align=center>
<td colspan=3><a href="">Îò÷åò ïî çàÿâêàì</a><br/>
<a href="">Îò÷åò î âûïîëåííûõ ðàáîòàõ</a></td>
</tr>
<tr align=center>
<td colspan=3><b>Ïîèñê:</b></td>
</tr>
<tr align=center>
<td colspan=3>
<form action="search.php" method="post">
<input type="text" name="search" />
<input type="submit" value="Go!" /></form>
</td>
</tr>
<tr align=center>
<td align=center><b>Íàâèãàöèÿ ïî ñèñòåìå:</b>
</td></tr>
<tr align=center>
<td><a href="index_closed.php">Ïåðåéòè íà ãëàâíóþ ñòàíèöó</a><br/>
<a href="index.php">Ïåðåéòè íà äîìàøíþþ ñòðàíèöó</a><br/>
<a href="login.php?logout">Âûõîä</a></td>
</tr>
</table>
<table border=0 align=center>
<td><p size=18 align=center><b>Ñïècîê àäìèíèñòðàòîðîâ îòäåëà:</b></p></td></table>';
$query_list = " SELECT *
FROM `users`
";
$sql_list = mysql_query($query_list) or die(mysql_error());
print ("<table border=1 align=center><tr align=center><td>#ID</td><td>Login</td><td>ÔÈÎ</td><td>E-mail</td><td>Äîëæíîñòü</td><td>Password</td></tr>");
while($row=mysql_fetch_array($sql_list))
{
print ("<tr align=center><td>" . $row['id'] . "</td><td>" . $row['login'] . "</td><td>" . $row['fio'] . "</td><td>" . $row['email'] . "</td><td>" . $row['function'] . "</td><td>" . $row['password']. "</td></tr>");
}
print ("</table>");
print '<p align=center><form align=center action="del_user.php" method="post">Óäàëèòü ïîëüçîâàòåëÿ ñ ID: <input type=text size=5 name=del> èç áàçû!<input type=submit value="Âûïîëíèòü"></form></p>';
print '
<table border=0 width=1400>
<tr>
<td><p align=right>© Ðîìàí Åêèìîâ, 2011. All right reserved.<br/>
<a href="mailto:root@toywar.ru">root@toywar.ru</a>
</p></td>
</tr>
</table>
';
}
else
{
die('<h2 align=center>Äîñòóï çàêðûò! Ïîæàëóéñòà, àâòîðèçóéòåñü!</h2><br/><p align=center><a href="login.php">Àâòîðèçîâàòüñÿ</a></p>');
}
?>
</body>
</html>