-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall-users.php
More file actions
91 lines (83 loc) · 3.73 KB
/
all-users.php
File metadata and controls
91 lines (83 loc) · 3.73 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
<?php
session_start();
include 'system.php';
if(isset($_SESSION['is_logged'])===true && $_SESSION['user_info']['type']=="Администратор"){
System::db_init();
date_default_timezone_set('Europe/Sofia');
$sql = 'SELECT id, username, password, name, email, gender, secret_question, secret_answer, profile_picture, type, active, join_date, last_login, last_ip, status FROM users';
$retval = System::run_mysql_query( $sql );
if(! $retval)
{
die('Could not get data: ' . mysql_error());
}
?>
<html>
<head>
<title>Users Information</title>
<link href="css/admin-style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="right">
<?php
echo '<div id="main_content_body">
<div id="main_content_title">Users information</div>
<table class="admin_list admin_table">
<tr>
<th> <strong class="display_color">ID</strong> </th>
<th> <strong class="display_color">Потребител</strong> </th>
<th> <strong class="display_color">Парола</strong> </th>
<th> <strong class="display_color">Име</strong> </th>
<th> <strong class="display_color">Ел. Поща</strong> </th>
<th> <strong class="display_color">Пол</strong> </th>
<th> <strong class="display_color">Таен Въпрос</strong> </th>
<th> <strong class="display_color">Таен отговор</strong> </th>
<th><strong class="display_color">Снимка</strong></th>
<th> <strong class="display_color">Тип</strong> </th>
<th> <strong class="display_color">Активен</strong> </th>
<th> <strong class="display_color">Дата на регистрация</strong> </th>
<th> <strong class="display_color">Последно влизане</strong> </th>
<th> <strong class="display_color">IP Адрес</strong> </th>
<th> <strong class="display_color">Статус</strong> </th>
</tr>
';
while($userData = mysql_fetch_array($retval, MYSQL_ASSOC))
{
if($userData['status']==="offline"){$errorArray['status']='<img src="img/system/offline.png" />'; }else{$errorArray['status']='<img src="img/system/online.png" />';}
echo '
<tr>
<td> '.$userData['id']. ' </td>
<td> ' .$userData['username']. ' </td>
<td> ' .$userData['password']. ' </td>
<td> ' .$userData['name']. ' </td>
<td> ' .$userData['email']. ' </td>
<td> ' .$userData['gender']. ' </td>
<td> ' .$userData['secret_question']. ' </td>
<td> ' .$userData['secret_answer']. ' </td>
<td><img src="' .$userData['profile_picture']. '" width="48" height="48" /></td>
<td> ' .$userData['type']. ' </td>
<td> ' .$userData['active']. ' </td>
<td> ' .date('d-m-Y H:i', $userData['join_date']). ' </td>
<td> ' .date('d-m-Y H:i', $userData['last_login']). ' </td>
<td> ' .$userData['last_ip']. ' </td>
<td> ' .$errorArray['status']. ' </td>
</tr>
';
}
echo '</table></div>';
echo "<br /><img src='img/button_ok.png' width='16' heigh='16' /> <span style='bottom:4px; position:relative;'>Data taken successfully!</span><br /><br /><a href='admin.php'>Back</a>";
mysql_close();
}else{
/*header('Location: index.php');
exit;*/
echo'
<center>
<div id="main_content_body">
<div id="main_content_title">Error</div>
<p><img src="img/error.png" width="24" heigh="24" /> <span style="bottom:7px; position:relative; color: violet;">You access to this page is denied.</span></p>
</div>
</center>';
}
?>
</div>
</body>
</html>