This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmysql.php
74 lines (70 loc) · 2.19 KB
/
mysql.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
<html>
<head>
<title>Test DataTable</title>
<link href="./DataTable/css/bootstrap.css" rel="stylesheet">
<link href="./DataTable/css/bootstrap-theme.css" rel="stylesheet">
<link href="./DataTable/css/dataTables.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<h1>Les utilisateurs</h1>
</div>
<div class="row">
<?php
require_once('./DataTable/php/include.php');
$table = new DataTable\php\Table();
$table->init("user");
$table->canExtension(true);
$table->setSort(DataTable\php\Table::$SORT_NATURAL);
$table->addAllCols();
$table->addColHidden("Bloqué", "locked", TRUE);
$table->addColLinked("Ville", "city_id", "city", "id", "*cp* - *name*");
$table->show("./DataTable/");
?>
</div>
<div class="row">
<h1>Les groupes d'utilisateurs</h1>
</div>
<div class="row">
<?php
$table = new DataTable\php\Table();
$table->init("user_group");
$table->addColIndex('N', 'id', true, false);
$table->addCol("Nom", "name");
$table->addCol("Rôles", "roles");
$table->show("./DataTable/");
?>
</div>
<div class="row">
<h1>Les associations</h1>
</div>
<div class="row">
<?php
$table = new DataTable\php\Table();
$table->init("user_user_group");
$table->addColIndexLinked("Utilisateur", "user_id", "user", "id", "*username* - *expired*");
$table->getCol("user_id")->addFilter("id", "<> '1'");
$table->addColIndexLinked("Group", "group_id", "user_group", "id", "*name*");
$table->show("./DataTable/");
?>
</div>
<div class="row">
<h1>Les villes</h1>
</div>
<div class="row">
<?php
$table = new DataTable\php\Table();
$table->init("city");
$table->setSort(DataTable\php\Table::$SORT_NATURAL);
$table->addAllCols();
$table->show("./DataTable/");
?>
</div>
</div>
<script type="text/javascript" src="./DataTable/js/jquery.js"></script>
<script type="text/javascript" src="./DataTable/js/bootstrap.js"></script>
<script type="text/javascript" src="./DataTable/js/dataTables.js"></script>
<script type="text/javascript" src="./DataTable/js/table.js"></script>
</body>
</html>