Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 601 → Rev 602

/web/admin/users.php
0,0 → 1,221
<?php
/*
 
 
*/
require_once('includes/defines.inc.php');
require_once(ALCASAR_ADMIN_PATH_INC.'/session.inc.php');
//include(ALCASAR_ADMIN_PATH_LIB.'/user.class.php');
include(ALCASAR_ADMIN_PATH_LIB.'/radiusMysqlUser.class.php');
 
$options['fields'] = "*";
/*
$list_users = new user();
$users = $list_users->find($options);
*/
$users = radiusMysqlUser::find($options);
 
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
<html>
<head>
<title>Users page</title>
<!-- include default CSS -->
<link rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/default.css" type="text/css">
<!-- include JQUERY UI CSS -->
<link type="text/css" rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/ui-lightness/jquery-ui-1.8.10.custom.css">
<!-- include tablesorter CSS -->
<link type="text/css" rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/tablesorter-blue/style.css">
 
<link type="text/css" rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/datatables/css/demo_table.css">
<!-- include custom page CSS -->
<style type="text/css">
div#users-contain { width: 450px; margin: 20px 0; }
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
div#users-contain table th { ui-widget-header }
.dataTables_filter {
float: left;
text-align: left;
width: 220px;
}
</style>
<!-- include JQUERY -->
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-1.5.min.js"></script>
<!-- include JQUERY UI -->
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-ui-1.8.10.all.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery.tablesorter.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery.tablesorter.pager.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery.quicksearch.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery.dataTables.min.js"></script>
<!-- include page javascript -->
<script type="text/javascript">
var table_data_lang = {
"sProcessing": "Patientez...",
"sLengthMenu": "Afficher _MENU_ enregistrements",
"sZeroRecords": "Aucun enregistrement disponible.",
"sInfo": "_START_ à _END_ sur _TOTAL_ enregistrements",
"sInfoEmpty": "0 à 0 sur 0 enregistrement",
"sInfoFiltered": "(Filtré à partir de _MAX_ enregistrements)",
"sInfoPostFix": "",
"sSearch": "Recherche : ",
"sUrl": "",
"oPaginate": {
"sFirst": "Première page",
"sPrevious": "Page précédente",
"sNext": "Page suivante",
"sLast": "Dernière page"
}
};
$(document).ready(function(){
// Tabs
$('#tabs-users').tabs();
// buttons
$( "button, input:submit, input:button, input:reset").button();
// Users table
$('#users_table').dataTable(
{
// fonction suivante permet d'avoir une colone numérotée dynamiquement (non triable)
"fnDrawCallback": function ( oSettings ) {
/* Need to redo the counters if filtered or sorted */
if ( oSettings.bSorted || oSettings.bFiltered )
{
for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
{
$('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
}
}
},
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0 ] }
],
"aaSorting": [[ 1, 'asc' ]]
//fin
,"oLanguage": table_data_lang
});
$('#users_table_filter').after('<div style="float:left"><a href="javascript:alert(\'Fonction prochainement dispobible.\');" title="Recherche avancée">Avancée</a></div>');
$('#vouchers_table').dataTable({
// fonction suivante permet d'avoir une colone numérotée dynamiquement (non triable)
"fnDrawCallback": function ( oSettings ) {
/* Need to redo the counters if filtered or sorted */
if ( oSettings.bSorted || oSettings.bFiltered )
{
for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
{
$('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
}
}
},
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0 ] }
],
"aaSorting": [[ 1, 'asc' ]]
//fin
,"oLanguage": table_data_lang
});
$('#vouchers_table_filter').after('<div style="float:left"><a href="javascript:alert(\'Fonction prochainement dispobible.\');" title="Recherche avancée">Avancée</a></div>');
});
</script>
</head>
<body>
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">
<span class="ui-dialog-title" id="ui-dialog-title-dialog">Gestion des usagers</span>
</div>
<br />
<div id="tabs-users">
<ul>
<li><a href="#tabs1">Usagers</a></li>
<li><a href="#tabs2">Vouchers</a></li>
<li><a href="#tabs3">Profils</a></li>
</ul>
<div id="tabs1">
<div>
Un usager est un utilisateur standard de votre réseau de consultation.<br>
<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>
</div>
<br>
<div style="float:right;">
<form name="newUserform">
<input type="button" value="Nouvel usager">
</form>
</div>
<br>
<table id="users_table" cellspacing="1" class="tablesorter" border="0" width="100%">
<thead>
<tr>
<th width="20">#</th><th width="200">Usagers</th><th>Nom, prénom</th><th width="100">Date validitée</th>
</tr>
</thead>
<tfoot>
<tr>
<th width="20">#</th><th width="200">Usagers</th><th>Nom, prénom</th><th width="100">Date validitée</th>
</tr>
</tfoot>
<tbody>
<?php
foreach ($users as $user){
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>";
}
?>
</tbody>
</table>
<br><br><br>
</div>
<div id="tabs2">
<div>
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>
<font color="red">PROCHAINEMENT DISPONIBLE</font>
</div>
<br>
<div style="float:right;">
<form name="newVoucherform">
<input type="button" value="Nouveau voucher">
</form>
</div>
<br>
<table id="vouchers_table" cellspacing="1" class="tablesorter" border="0" width="100%">
<thead>
<tr>
<th width="20">#</th>
<th>Vouchers</th>
<th>Description</th>
<th>Nom complet (identifier la personne)</th>
<th>Date validitée</th>
</tr>
</thead>
<tfoot>
<tr>
<th width="20">#</th>
<th>Vouchers</th>
<th>Description</th>
<th>Nom complet (identifier la personne)</th>
<th>Date validitée</th>
</tr>
</tfoot>
<tbody>
<!--
<tr><td>1</td><td><a href="user.php">cfjdjpjsdpajdazpjpaz</a></td><td><br /></td><td><br /></td><td><br /></td></tr>
<tr><td>2</td><td>cfjdjpjsdpajdazpjpaz</td><td><br /></td><td><br /></td><td><br /></td></tr>
<tr><td>3</td><td>casas456defe5zsd6saz</td><td><br /></td><td><br /></td><td><br /></td></tr>
<tr><td>4</td><td>cfjdjpjsdddzd54zsd5q</td><td><br /></td><td><br /></td><td><br /></td></tr>
<tr><td>5</td><td>cfd5d1s5d5df5fzpjpaz</td><td><br /></td><td><br /></td><td><br /></td></tr>
-->
</tbody>
</table>
</div>
<div id="tabs3">
<div>
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>
<font color="red">PROCHAINEMENT DISPONIBLE</font>
</div>
<br>
</div>
</div>
</body>
</html>