602 |
stephane |
1 |
<?php
|
|
|
2 |
/*
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
*/
|
|
|
6 |
require_once('includes/defines.inc.php');
|
|
|
7 |
require_once(ALCASAR_ADMIN_PATH_INC.'/session.inc.php');
|
|
|
8 |
//include(ALCASAR_ADMIN_PATH_LIB.'/user.class.php');
|
|
|
9 |
include(ALCASAR_ADMIN_PATH_LIB.'/radiusMysqlUser.class.php');
|
|
|
10 |
|
|
|
11 |
$options['fields'] = "*";
|
|
|
12 |
/*
|
|
|
13 |
$list_users = new user();
|
|
|
14 |
$users = $list_users->find($options);
|
|
|
15 |
*/
|
|
|
16 |
$users = radiusMysqlUser::find($options);
|
|
|
17 |
|
|
|
18 |
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
|
|
|
19 |
<html>
|
|
|
20 |
<head>
|
|
|
21 |
<title>Users page</title>
|
|
|
22 |
<!-- include default CSS -->
|
|
|
23 |
<link rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/default.css" type="text/css">
|
|
|
24 |
<!-- include JQUERY UI CSS -->
|
|
|
25 |
<link type="text/css" rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/ui-lightness/jquery-ui-1.8.10.custom.css">
|
|
|
26 |
<!-- include tablesorter CSS -->
|
|
|
27 |
<link type="text/css" rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/tablesorter-blue/style.css">
|
|
|
28 |
|
|
|
29 |
<link type="text/css" rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/datatables/css/demo_table.css">
|
|
|
30 |
<!-- include custom page CSS -->
|
|
|
31 |
<style type="text/css">
|
|
|
32 |
div#users-contain { width: 450px; margin: 20px 0; }
|
|
|
33 |
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
|
|
|
34 |
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
|
|
|
35 |
div#users-contain table th { ui-widget-header }
|
|
|
36 |
|
|
|
37 |
.dataTables_filter {
|
|
|
38 |
float: left;
|
|
|
39 |
text-align: left;
|
|
|
40 |
width: 220px;
|
|
|
41 |
}
|
|
|
42 |
</style>
|
|
|
43 |
<!-- include JQUERY -->
|
|
|
44 |
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-1.5.min.js"></script>
|
|
|
45 |
<!-- include JQUERY UI -->
|
|
|
46 |
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-ui-1.8.10.all.min.js"></script>
|
|
|
47 |
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery.tablesorter.min.js"></script>
|
|
|
48 |
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery.tablesorter.pager.js"></script>
|
|
|
49 |
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery.quicksearch.js"></script>
|
|
|
50 |
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery.dataTables.min.js"></script>
|
|
|
51 |
<!-- include page javascript -->
|
|
|
52 |
<script type="text/javascript">
|
|
|
53 |
var table_data_lang = {
|
|
|
54 |
"sProcessing": "Patientez...",
|
|
|
55 |
"sLengthMenu": "Afficher _MENU_ enregistrements",
|
|
|
56 |
"sZeroRecords": "Aucun enregistrement disponible.",
|
|
|
57 |
"sInfo": "_START_ à _END_ sur _TOTAL_ enregistrements",
|
|
|
58 |
"sInfoEmpty": "0 à 0 sur 0 enregistrement",
|
|
|
59 |
"sInfoFiltered": "(Filtré à partir de _MAX_ enregistrements)",
|
|
|
60 |
"sInfoPostFix": "",
|
|
|
61 |
"sSearch": "Recherche : ",
|
|
|
62 |
"sUrl": "",
|
|
|
63 |
"oPaginate": {
|
|
|
64 |
"sFirst": "Première page",
|
|
|
65 |
"sPrevious": "Page précédente",
|
|
|
66 |
"sNext": "Page suivante",
|
|
|
67 |
"sLast": "Dernière page"
|
|
|
68 |
}
|
|
|
69 |
};
|
|
|
70 |
|
|
|
71 |
$(document).ready(function(){
|
|
|
72 |
// Tabs
|
|
|
73 |
$('#tabs-users').tabs();
|
|
|
74 |
// buttons
|
|
|
75 |
$( "button, input:submit, input:button, input:reset").button();
|
|
|
76 |
// Users table
|
|
|
77 |
$('#users_table').dataTable(
|
|
|
78 |
{
|
|
|
79 |
// fonction suivante permet d'avoir une colone numérotée dynamiquement (non triable)
|
|
|
80 |
"fnDrawCallback": function ( oSettings ) {
|
|
|
81 |
/* Need to redo the counters if filtered or sorted */
|
|
|
82 |
if ( oSettings.bSorted || oSettings.bFiltered )
|
|
|
83 |
{
|
|
|
84 |
for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
|
|
|
85 |
{
|
|
|
86 |
$('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
|
|
|
87 |
}
|
|
|
88 |
}
|
|
|
89 |
},
|
|
|
90 |
"aoColumnDefs": [
|
|
|
91 |
{ "bSortable": false, "aTargets": [ 0 ] }
|
|
|
92 |
],
|
|
|
93 |
"aaSorting": [[ 1, 'asc' ]]
|
|
|
94 |
//fin
|
|
|
95 |
,"oLanguage": table_data_lang
|
|
|
96 |
});
|
|
|
97 |
|
|
|
98 |
$('#users_table_filter').after('<div style="float:left"><a href="javascript:alert(\'Fonction prochainement dispobible.\');" title="Recherche avancée">Avancée</a></div>');
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
$('#vouchers_table').dataTable({
|
|
|
102 |
|
|
|
103 |
// fonction suivante permet d'avoir une colone numérotée dynamiquement (non triable)
|
|
|
104 |
"fnDrawCallback": function ( oSettings ) {
|
|
|
105 |
/* Need to redo the counters if filtered or sorted */
|
|
|
106 |
if ( oSettings.bSorted || oSettings.bFiltered )
|
|
|
107 |
{
|
|
|
108 |
for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
|
|
|
109 |
{
|
|
|
110 |
$('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
|
|
|
111 |
}
|
|
|
112 |
}
|
|
|
113 |
},
|
|
|
114 |
"aoColumnDefs": [
|
|
|
115 |
{ "bSortable": false, "aTargets": [ 0 ] }
|
|
|
116 |
],
|
|
|
117 |
"aaSorting": [[ 1, 'asc' ]]
|
|
|
118 |
//fin
|
|
|
119 |
,"oLanguage": table_data_lang
|
|
|
120 |
});
|
|
|
121 |
$('#vouchers_table_filter').after('<div style="float:left"><a href="javascript:alert(\'Fonction prochainement dispobible.\');" title="Recherche avancée">Avancée</a></div>');
|
|
|
122 |
});
|
|
|
123 |
</script>
|
|
|
124 |
</head>
|
|
|
125 |
<body>
|
|
|
126 |
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">
|
|
|
127 |
<span class="ui-dialog-title" id="ui-dialog-title-dialog">Gestion des usagers</span>
|
|
|
128 |
</div>
|
|
|
129 |
<br />
|
|
|
130 |
<div id="tabs-users">
|
|
|
131 |
<ul>
|
|
|
132 |
<li><a href="#tabs1">Usagers</a></li>
|
|
|
133 |
<li><a href="#tabs2">Vouchers</a></li>
|
|
|
134 |
<li><a href="#tabs3">Profils</a></li>
|
|
|
135 |
</ul>
|
|
|
136 |
<div id="tabs1">
|
|
|
137 |
<div>
|
|
|
138 |
Un usager est un utilisateur standard de votre réseau de consultation.<br>
|
|
|
139 |
<font color="red">ATTENTION POUR DEMONSTRATION DES OPTIONS A UTILISER. Données du serveur RADIUS traitées (tri, pagination) par la page dans l'exemple , gérées par le serveur (AJAX) en production</font>
|
|
|
140 |
</div>
|
|
|
141 |
<br>
|
|
|
142 |
<div style="float:right;">
|
|
|
143 |
<form name="newUserform">
|
|
|
144 |
<input type="button" value="Nouvel usager">
|
|
|
145 |
</form>
|
|
|
146 |
</div>
|
|
|
147 |
<br>
|
|
|
148 |
<table id="users_table" cellspacing="1" class="tablesorter" border="0" width="100%">
|
|
|
149 |
<thead>
|
|
|
150 |
<tr>
|
|
|
151 |
<th width="20">#</th><th width="200">Usagers</th><th>Nom, prénom</th><th width="100">Date validitée</th>
|
|
|
152 |
</tr>
|
|
|
153 |
</thead>
|
|
|
154 |
<tfoot>
|
|
|
155 |
<tr>
|
|
|
156 |
<th width="20">#</th><th width="200">Usagers</th><th>Nom, prénom</th><th width="100">Date validitée</th>
|
|
|
157 |
</tr>
|
|
|
158 |
</tfoot>
|
|
|
159 |
<tbody>
|
|
|
160 |
<?php
|
|
|
161 |
foreach ($users as $user){
|
|
|
162 |
echo "<tr><td></td><td><a href='user.php?username=".$user['username']."' title='Edit User'>".$user['username']."</a></td><td>".$user['Name']."</td><td><font color=red>ND</font></td></tr>";
|
|
|
163 |
}
|
|
|
164 |
?>
|
|
|
165 |
</tbody>
|
|
|
166 |
</table>
|
|
|
167 |
|
|
|
168 |
<br><br><br>
|
|
|
169 |
</div>
|
|
|
170 |
<div id="tabs2">
|
|
|
171 |
<div>
|
|
|
172 |
Un "Voucher" est un compte d'accès de type "pré-payé" qui dépend d'une durée d'utilisation ou d'un délai dans le temps.<br>
|
|
|
173 |
<font color="red">PROCHAINEMENT DISPONIBLE</font>
|
|
|
174 |
</div>
|
|
|
175 |
<br>
|
|
|
176 |
<div style="float:right;">
|
|
|
177 |
<form name="newVoucherform">
|
|
|
178 |
<input type="button" value="Nouveau voucher">
|
|
|
179 |
</form>
|
|
|
180 |
</div>
|
|
|
181 |
<br>
|
|
|
182 |
<table id="vouchers_table" cellspacing="1" class="tablesorter" border="0" width="100%">
|
|
|
183 |
<thead>
|
|
|
184 |
<tr>
|
|
|
185 |
<th width="20">#</th>
|
|
|
186 |
<th>Vouchers</th>
|
|
|
187 |
<th>Description</th>
|
|
|
188 |
<th>Nom complet (identifier la personne)</th>
|
|
|
189 |
<th>Date validitée</th>
|
|
|
190 |
</tr>
|
|
|
191 |
</thead>
|
|
|
192 |
<tfoot>
|
|
|
193 |
<tr>
|
|
|
194 |
<th width="20">#</th>
|
|
|
195 |
<th>Vouchers</th>
|
|
|
196 |
<th>Description</th>
|
|
|
197 |
<th>Nom complet (identifier la personne)</th>
|
|
|
198 |
<th>Date validitée</th>
|
|
|
199 |
</tr>
|
|
|
200 |
</tfoot>
|
|
|
201 |
<tbody>
|
|
|
202 |
<!--
|
|
|
203 |
<tr><td>1</td><td><a href="user.php">cfjdjpjsdpajdazpjpaz</a></td><td><br /></td><td><br /></td><td><br /></td></tr>
|
|
|
204 |
<tr><td>2</td><td>cfjdjpjsdpajdazpjpaz</td><td><br /></td><td><br /></td><td><br /></td></tr>
|
|
|
205 |
<tr><td>3</td><td>casas456defe5zsd6saz</td><td><br /></td><td><br /></td><td><br /></td></tr>
|
|
|
206 |
<tr><td>4</td><td>cfjdjpjsdddzd54zsd5q</td><td><br /></td><td><br /></td><td><br /></td></tr>
|
|
|
207 |
<tr><td>5</td><td>cfd5d1s5d5df5fzpjpaz</td><td><br /></td><td><br /></td><td><br /></td></tr>
|
|
|
208 |
-->
|
|
|
209 |
</tbody>
|
|
|
210 |
</table>
|
|
|
211 |
</div>
|
|
|
212 |
<div id="tabs3">
|
|
|
213 |
<div>
|
|
|
214 |
Afin de gagner du temps dans la création des comptes usagers et vouchers, vous avez la possibilité de prédéfinir des profils de création de compte.<br>
|
|
|
215 |
<font color="red">PROCHAINEMENT DISPONIBLE</font>
|
|
|
216 |
</div>
|
|
|
217 |
<br>
|
|
|
218 |
</div>
|
|
|
219 |
</div>
|
|
|
220 |
</body>
|
|
|
221 |
</html>
|