-
Notifications
You must be signed in to change notification settings - Fork 0
/
users.php
98 lines (78 loc) · 2.22 KB
/
users.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
<?php
session_start();
if (isset($_SESSION['login'])) {
if ($_SESSION['login'] == TRUE) {
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<?php include 'header.php'; ?>
<title>Users</title>
<link href="css/bootstrap.css" rel="stylesheet">
<link rel="icon" href="images/favicon.png" type="image/x-icon" />
<style type="text/css">
body {
padding-top: 20px;
}
</style>
</head>
<body>
<div class="container">
<p></p>
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading">
Usuarios Registrados
</div>
<div class="panel-body">
<p></p>
</div>
<table class="table">
<thead>
<tr>
<th>id</th>
<th>name</th>
<th>surname</th>
<th>username</th>
<th>Fecha de Registro</th>
<th>Rol</th>
</tr>
</thead>
<?php
include 'sql.php';
conectar();
$users = getUsers();
foreach ($users as $reg) {
echo "<tbody>
<tr>
<td>$reg[id]</td>
<td>$reg[nombre]</td>
<td>$reg[apellido]</td>
<td>$reg[username]</td>
<td>$reg[fecha]</td>
<td>$reg[rol]</td>
</tr>
</tbody>";
}
?>
</table>
</div>
</div>
<!-- /container -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>
<?php
}
} else {
header('Location:login.php');
}
?>