Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 601 → Rev 602

/web/admin/auth_groups.php
File deleted
\ No newline at end of file
/web/admin/auth_users.php
File deleted
\ No newline at end of file
/web/admin/auth_admins.php
File deleted
\ No newline at end of file
/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>
/web/admin/css/default/readme.txt
0,0 → 1,0
Dossier à nettoyer à l'issu de développement de l'interface admin
/web/admin/menu.php
112,9 → 112,9
<div>
<h3><a href="#"><?php echo $l_auth; ?></a></h3>
<div>
<a href="auth_users.php"><?php echo $l_menu_users; ?></a><br>
<a href="auth_groups.php"><?php echo $l_menu_groups; ?></a><br>
<a href="auth_admins.php"><?php echo $l_menu_admins; ?></a><br>
<a href="users.php"><?php echo $l_menu_users; ?></a><br>
<a href="groups.php"><?php echo $l_menu_groups; ?></a><br>
<a href="admins.php"><?php echo $l_menu_admins; ?></a><br>
<!--
<a href="manager/htdocs/user_new.php"><?php echo $l_create_user; ?></a><br>
<a href="manager/htdocs/find.php"><?php echo $l_edit_user; ?></a><br>
138,8 → 138,8
<a href="welcome.php"><?php echo $l_stat_user_day; ?></a><br>
<a href="welcome.php"><?php echo $l_stat_con; ?></a><br>
<a href="welcome.php"><?php echo $l_stat_daily; ?></a><br>
<a href="welcome.php"><?php echo $l_stat_web; ?></a><br>
<a href="welcome.php"><?php echo $l_firewall; ?></a>
<a href="<?php echo ALCASAR_ADMIN_PATH_RS; ?>/awstats/"><?php echo $l_stat_web; ?></a><br>
<a href="<?php echo ALCASAR_ADMIN_PATH_RS; ?>/firewallEyes/index.html"><?php echo $l_firewall; ?></a>
</div>
</div>
<div>
/web/admin/new_users.php
--- web/admin/admins.php (nonexistent)
+++ web/admin/admins.php (revision 602)
@@ -0,0 +1,32 @@
+<?php
+/*
+
+
+*/
+require_once('includes/defines.inc.php');
+require_once(ALCASAR_ADMIN_PATH_INC.'/session.inc.php');
+?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
+<html>
+<head>
+<title>Admins 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 custom page CSS -->
+<style type="text/css">
+
+</style>
+<!-- include JQUERY -->
+<script type="text/javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-1.5.min.js"></script>
+<!-- include JQUERY UI -->
+<script type="text/javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-ui-1.8.10.all.min.js"></script>
+<!-- include page javascript -->
+<script type="text/javascript">
+
+</script>
+</head>
+<body>
+<h1>ADMINS PAGE</h1>
+</body>
+</html>
\ No newline at end of file
/web/admin/user.php
0,0 → 1,668
<?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');
 
if (isset($_GET['username'])){
$username = $_GET['username'];
} else {
$username = '';
}
 
$ouser = new radiusMysqlUser();
$ouser->load($username, true);
$user = $ouser->get();
$attributes = $ouser->getAttribute();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Edit <?php echo $options['username']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
<!-- include default CSS -->
<link rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/default.css" type="text/css">
<!--link rel="stylesheet" href="../css/style.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 custom page CSS -->
 
<!-- 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>
<!-- include page javascript -->
<script type="text/javascript">
var horaireFlag = false;
var colFlag = false;
var rowFlag = false;
var no_limite_flag = false;
$(function(){
$('#horaire-table').find('tbody > tr > td').removeClass('horaireIsNotSelected');
$('#horaire-table').find('tbody > tr > td').removeClass('horaireIsSelected');
//Time-limite
var Time_limite = '';
parseHoraire(Time_limite);
// Tabs
$('#tabs-user').tabs();
// datepicker
$( ".datepicker" ).datepicker();
// button
$( "button, input:submit, input:button, input:reset").button();
$('#horaire-table').mouseleave(function() {
horaireFlag = false;
colFlag = false;
rowFlag = false;
});
// selection à partir du calendrier
$('#horaire-table').find('tbody').mouseleave(function() {
horaireFlag = false;
rowFlag = false;
});
$('#horaire-table').find('tbody > tr > td').mousedown(function() {
horaireFlag = true;
colorize_body($(this));
});
$('#horaire-table').find('tbody > tr > td').mouseup(function() {
horaireFlag = false;
});
$('#horaire-table').find('tbody > tr > td').mouseover(function() {
if (horaireFlag === true){
colorize_body($(this));
}
});
// selection à partir de l'entête de la 1er colone
$('#horaire-table').find('thead > tr > th:eq(0)').mousedown(function() {
if (no_limite_flag){
no_limite();
no_limite_flag = false;
} else {
all_limite();
no_limite_flag = true;
}
});
// selection à partir de l'entête de colone
$('#horaire-table').find('thead > tr > th').mousedown(function() {
colFlag = true;
head_colorize_body($(this))
});
$('#horaire-table').find('thead > tr > th').mouseup(function() {
colFlag = false;
});
$('#horaire-table').find('thead').mouseleave(function() {
colFlag = false;
});
$('#horaire-table').find('thead > tr > th').mouseover(function() {
if (colFlag == true){
head_colorize_body($(this))
}
});
// selection à partir de l'entête de ligne
//.mouseleave event is allready defined
$('#horaire-table').find('tbody > tr > th').mousedown(function() {
rowFlag = true;
selectedrow = $(this).parent();
row_colorize_body(selectedrow);
});
$('#horaire-table').find('tbody > tr > th').mouseup(function() {
rowFlag = false;
});
$('#horaire-table').find('tbody > tr > th').mouseover(function() {
if (rowFlag == true){
selectedrow = $(this).parent();
row_colorize_body(selectedrow);
}
});
function calcule_plage_jour(horaires){
var d, f, i, deb, tmp;
deb = true;
tmp = new Array();
for (i=0 ; i<=47 ; i++) {
if ( jQuery.inArray(i, horaires) !== -1){
if (deb){
d = i;
deb = false;
}
if (i == 47){
f = i;
tmp.push(new Array(d,f));
deb = true;
}
} else {
if (!(deb)){
f = eval(i-1);
tmp.push(new Array(d,f));
deb = true;
}
}
}
return tmp;
}
function parsePlage(plage){
alert(plage[0]);
for (i=0 ; i < plage.length-1 ; i++){
deb = plage[i][0];
fin = plage[i][1];
debh = eval(deb/2);
alert(deb);
if (eval(deb%2) == 0){
debm = "00";
} else {
debm = "30";
}
deb = debh + debm;
finh = parseInt(eval(fin/2));
if (eval(fin%2) == 0){
finm = "00";
} else {
finm = "30";
}
fin = finh + finm;
}
return deb+fin;
}
//Wk2305-0855,Sa,Su2305-1655
$('#button_test').click(function(){
a = new Array();
mo = new Array();
tu = new Array();
we = new Array();
th = new Array();
fr = new Array();
sa = new Array();
so = new Array();
plageMo = new Array();
/*
tds = $('#horaire-table').find('tbody > tr > td').get();
$(tds).each( function(index, td){
if ($(td).hasClass('horaireIsSelected')) a.push(index);
})
*/
tds = $('#horaire-table').find('tbody > tr > td').get();
$(tds).each( function(index, tda){
if ($(tda).hasClass('horaireIsSelected')) a.push(index);
});
td_mo = $('#horaire-table').find('tbody > tr:eq(0) > td').get();
$(td_mo).each( function(index, td_mo_a){
if ($(td_mo_a).hasClass('horaireIsSelected')) mo.push(index);
});
//alert(mo);
td_tu = $('#horaire-table').find('tbody > tr:eq(1) > td').get();
$(td_tu).each( function(index, td_tu_a){
if ($(td_tu_a).hasClass('horaireIsSelected')) tu.push(index);
});
//alert(tu);
td_we = $('#horaire-table').find('tbody > tr:eq(0) > td').get();
$(td_we).each( function(index, td_we_a){
if ($(td_we_a).hasClass('horaireIsSelected')) we.push(index);
});
//alert(we);
td_th = $('#horaire-table').find('tbody > tr:eq(1) > td').get();
$(td_th).each( function(index, td_th_a){
if ($(td_th_a).hasClass('horaireIsSelected')) th.push(index);
});
//alert(th);
td_fr = $('#horaire-table').find('tbody > tr:eq(0) > td').get();
$(td_fr).each( function(index, td_fr_a){
if ($(td_fr_a).hasClass('horaireIsSelected')) fr.push(index);
});
//alert(fr);
td_sa = $('#horaire-table').find('tbody > tr:eq(1) > td').get();
$(td_sa).each( function(index, td_sa_a){
if ($(td_sa_a).hasClass('horaireIsSelected')) sa.push(index);
});
//alert(sa);
td_so = $('#horaire-table').find('tbody > tr:eq(0) > td').get();
$(td_so).each( function(index, td_so_a){
if ($(td_so_a).hasClass('horaireIsSelected')) so.push(index);
});
//alert(so);
plageMo = calcule_plage_jour(mo);
plageTu = calcule_plage_jour(tu);
plageWe = calcule_plage_jour(we);
plageTh = calcule_plage_jour(th);
plageFr = calcule_plage_jour(fr);
plageSa = calcule_plage_jour(sa);
plageSo = calcule_plage_jour(so);
//alert(plage);
//alert(a);
$('#test').val(parsePlage(plageMo));
//la suite ?
});
});
//fonctions de sélection/déselection
function row_colorize_body(row_ref){
if (row_ref.find('td').hasClass('horaireIsNotSelected') || !(row_ref.find('td').hasClass('horaireIsSelected'))){
row_ref.find('td').removeClass('horaireIsNotSelected').addClass('horaireIsSelected');
} else {
row_ref.find('td').removeClass('horaireIsSelected').addClass('horaireIsNotSelected');
}
$('#periode_perso').attr("checked","checked");
}
function colorize_body(td_ref){
if (td_ref.hasClass('horaireIsNotSelected') || !(td_ref.hasClass('horaireIsSelected'))){
td_ref.removeClass('horaireIsNotSelected').addClass('horaireIsSelected');
} else {
td_ref.removeClass('horaireIsSelected').addClass('horaireIsNotSelected');
}
$('#periode_perso').attr("checked","checked");
}
function head_colorize_body(head_ref){
horaire_head = false;
var index = head_ref.index();
index = (parseInt(index) - 1) *2;
index2 = index + 1;
if (head_ref.hasClass('headSelect')){
head_ref.removeClass('headSelect').addClass('headNoSelect');
horaire_head = false;
} else {
head_ref.removeClass('headNoSelect').addClass('headSelect');
horaire_head = true;
}
var rows = $('#horaire-table').find('tbody > tr').get();
$.each(rows, function() {
if (horaire_head){
$(this).find('td:eq('+index+')').removeClass('horaireIsNotSelected').addClass('horaireIsSelected');
$(this).find('td:eq('+index2+')').removeClass('horaireIsNotSelected').addClass('horaireIsSelected');
} else {
$(this).find('td:eq('+index+')').removeClass('horaireIsSelected').addClass('horaireIsNotSelected');
$(this).find('td:eq('+index2+')').removeClass('horaireIsSelected').addClass('horaireIsNotSelected');
}
});
$('#periode_perso').attr("checked","checked");
}
//fonctions de sélection/déselection des profils pre-définis
function no_limite(){
$('#horaire-table').find('tbody > tr > td').removeClass('horaireIsNotSelected').addClass('horaireIsSelected');
}
function all_limite(){
$('#horaire-table').find('tbody > tr > td').removeClass('horaireIsSelected').addClass('horaireIsNotSelected');
}
function wk(){
$('#horaire-table').find('tbody > tr > td').removeClass('horaireIsSelected').addClass('horaireIsNotSelected');;
$('#horaire-table').find('tbody > tr:lt(5) > td').removeClass('horaireIsNotSelected').addClass('horaireIsSelected');
}
function we(){
$('#horaire-table').find('tbody > tr > td').removeClass('horaireIsSelected');
$('#horaire-table').find('tbody > tr:gt(4) > td').removeClass('horaireIsNotSelected').addClass('horaireIsSelected');
}
//parse Time-limite et affiche le résultat dans le calendrier
function parseHoraire(Time_limite){
if (Time_limite == ''){
no_limite();
return;
}
}
</script>
<style type="text/css">
.datepicker{
background:url(../images/calendrier.gif) no-repeat 110px 3px;
}
</style>
</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>
<div id="usager">
<div id="">
<br />
<table class="ui-widget ui-widget-content">
<tr><td>Usager :</td><td><input type="text" name="User" id="User" value="<?php echo $username; ?>" ></td><td></td><tr>
<tr><td>Mot de passe :</td><td><input type="text" name="User-mdp" id="User-mdp" value="********"></td><td><button>Générer MDP</button></td><tr>
<tr><td>Date d'expiration :</td><td><input type="text" value="" name="" id="" class="datepicker"></td><td></td></tr>
<tr>
<td>Membre de :</td>
<td>
<table width="100%">
<?php
$users = array(); // faire une boucle pour les groupes
foreach ($users as $user){
echo "<tr> <td></td> <td width='10'><image src='".ALCASAR_ADMIN_PATH_IMG."/delete.png'></td> </tr>";
} ?>
</table>
</td>
<td><button>Ajouter à un groupes</button></td>
</tr>
<tr><td colspan="2"><br /></td><td></td><tr>
<tr><td colspan="2"><input type="button" value="Supprimer" name="" id=""> <input type="button" value="Modifier" name="" id=""></td><td></td><tr>
</table>
<br />
</div>
<div id="tabs-user">
<ul>
<li><a href="#tabs0">Infos personnelles</a></li>
<li><a href="#tabs01">Plage horaire</a></li>
<li><a href="#tabs1">Caractéristiques</a></li>
<li><a href="#tabs2">Etats</a></li>
<li><a href="#tabs3">Sessions ouvertes</a></li>
<li><a href="#tabs4">Connexion</a></li>
</ul>
<div id="tabs01">
<style>
#testa td, #testa th {
height: 5px; /* J'agrandis la hauteur des cellules pour que l'on puisse voir l'alignement vertical */
width:50px;
vertical-align: bottom; /* Alignement vertical, le contenu des cellules sera placé en bas */
border: 1px solid black;
font-family: "Comic Sans MS", "Trebuchet MS", Times, "Times New Roman", serif;
text-align: center;
 
}
#testb td {
height: 10px; /* J'agrandis la hauteur des cellules pour que l'on puisse voir l'alignement vertical */
}
#testb th {
height: 5px; /* J'agrandis la hauteur des cellules pour que l'on puisse voir l'alignement vertical */
}
#horaire-table th{
}
#horaire-table td{
}
#horaire-table thead, #horaire-table tfoot {
background-color:#D0E3FA;
/*background-image:url(monimage.jpg);*/
border:1px solid #6495ed;
}
#horaire-table tbody {
background-color:#FFFFFF;
/*border:1px solid #6495ed;*/
}
#horaire-table thead th {
font-family:monospace;
border:1px solid #6495ed;
padding:3px;
background-color:#EFF6FF;
/*width:25%;*/
-moz-user-select: none;
-khtml-user-select: none;
user-select: none;
}
#horaire-table tbody th {
font-family:monospace;
border:1px solid #6495ed;
padding:3px;
background-color:#EFF6FF;
/*width:25%;*/
-moz-user-select: none;
-khtml-user-select: none;
user-select: none;
}
#horaire-table td {
font-family:sans-serif;
font-size:80%;
border:1px dotted #6495ed;
/*border-style: dotted;*/
text-align:left;
width:9px;
}
.horaireIsSelected {
background-color:blue;
}
.horaireIsNotSelected {
background-color:#FFFFFF;
}
</style>
<div id="plage_horaire">
<table border=1 id='horaire-table' cellpadding='0' cellspacing='1'>
<thead>
<tr id="horaireRow">
<th>Horaires</th>
<th colspan="2">0</th><th colspan="2">1</th><th colspan="2">2</th><th colspan="2">3</th><th colspan="2">4</th><th colspan="2">5</th><th colspan="2">6</th><th colspan="2">7</th><th colspan="2">8</th><th colspan="2">9</th><th colspan="2">10</th><th colspan="2">11</th><th colspan="2">12</th>
 
<th colspan="2">13</th><th colspan="2">14</th><th colspan="2">15</th><th colspan="2">16</th><th colspan="2">17</th><th colspan="2">18</th><th colspan="2">19</th><th colspan="2">20</th><th colspan="2">21</th><th colspan="2">22</th><th colspan="2">23</th>
<tr>
</thead>
<tbody>
<tr id='MoRow'>
<th>Lundi</th>
 
<td id='Mo'><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
 
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
 
</tr>
<tr id='TuRow'>
<th>Mardi</th>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
 
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
</tr>
 
<tr id='WeRow'>
<th>Mercredi</th>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
 
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
</tr>
<tr id='ThRow'>
<th>Jeudi</th>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
 
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
</tr>
<tr id='FrRow'>
<th>Vendredi</th>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
 
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
</tr>
<tr id='SaRow'>
<th>Samedi</th>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
 
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
</tr>
<tr id='SoRow'>
<th>Dimanche</th>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
 
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
<td id=''><br /></td><td id=''><br /></td><td id=''><br /></td><td id=''><br /></td>
</tr>
</tbody>
 
</table>
<br />
Legende :<br />
<style>
.autorise{
border:1px dotted #6495ed;
background-color:blue;
width: 20px;
}
.refuse{
border:1px dotted #6495ed;
background-color:#FFFFFF;
width: 20px;
}
 
</style>
<table>
<tr><td class="autorise"><br /></td><td>Autoris&eacute;</td></tr>
<tr><td class="refuse"><br /></td><td>Refus&eacute;</td></tr>
</table>
<br />
Période :<br />
<input type="radio" name="periode" value="0" onclick="no_limite();"> Aucune limite<br />
<input type="radio" name="periode" value="1" onclick="wk();"> En semaine uniquement<br />
<input type="radio" name="periode" value="2" onclick="we();"> Week end uniquement<br />
<input type="radio" name="periode" value="3" id="periode_perso" checked> Personalisé <br />
<br />
<button>Annuler</button><button id="button_test">Modifier</button>
<input type="text" name="test" id="test" size="255" value="">
 
<br />
</div>
</div>
<div id="tabs0">
<table class="ui-widget ui-widget-content">
<tr><td>Nom complet (NOM Prénom)</td><td><input type="text" name="" id="" value="<?php echo $user['Name'];?>"></td><tr>
<tr><td>Mail</td><td><input type="text" name="email" id="email" value="<?php echo $user['Mail'];?>"></td><tr>
<tr><td>Service</td><td><input type="text" name="service" id="service" value="<?php echo $user['Department'];?>"></td><tr>
<tr><td>Téléphone personnel</td><td><input type="text" name="phone" id="phone" value="<?php echo $user['HomePhone'];?>"></td><tr>
<tr><td>Téléphone bureau</td><td><input type="text" name="bureau" id="bureau" value="<?php echo $user['WorkPhone'];?>"></td><tr>
<tr><td>Téléphone mobile</td><td><input type="text" name="mobile" id="mobile" value="<?php echo $user['Mobile'];?>"></td><tr>
<tr><td><br /></td><td></td></tr>
<tr><td><button>Annuler</button><button>Modifier</button></td><td></td></tr>
</table>
</div>
<div id="tabs1">
<table class="ui-widget ui-widget-content">
<!--thead><tr class="ui-widget-header"><td></td><td></td></tr></thead-->
<tbody>
<tr><td>Nombre de session simultanée</td><td><input type="text" value="" name="Simultaneous-Use0" id=""></td></tr>
<tr><td>Durée limite d'une session</td><td><input type="hidden" name="Session-Timeout0" id="" value=""><input type="text" value="" name="Session-Timeout0_h" id="" size="4">h<input type="text" value="" name="Session-Timeout0_mm" id="" size="2">mm<input type="text" value="" name="Session-Timeout0_s" id="" size="2">s</td></tr>
<tr><td>Durée limite journalière</td><td><input type="hidden" name="Max-Daily-Session0" id="" value=""><input type="text" value="" name="Max-Daily-Session0_h" id="" size="4">h<input type="text" value="" name="Max-Daily-Session0_mm" id="" size="2">mm<input type="text" value="" name="Max-Daily-Session0_s" id="" size="2">s</td></tr>
<tr><td>Durée limite mensuelle</td><td><input type="hidden" name="Max-Monthly-Session0" id="" value=""><input type="text" value="" name="Max-Monthly-Session0_h" id="" size="4">h<input type="text" value="" name="Max-Monthly-Session0_mm" id="" size="2">mm<input type="text" value="" name="Max-Monthly-Session0_s" id="" size="2">s</td></tr>
<tr><td>Période hebdomadaire</td><td><input type="text" value="" name="Login-Time0" id=""></td></tr>
<tr><td>Nombre d'octets max. en émission (en octets)</td><td><input type="text" value="" name="ChilliSpot-Max-Input-Octets0" id=""></td></tr>
<tr><td>Nombre d'octets max. en réception (en octets)</td><td><input type="text" value="" name="ChilliSpot-Max-Output-Octets0" id=""></td></tr>
<tr><td>Nombre d'octets max. total transmit (en octets)</td><td><input type="text" value="" name="ChilliSpot-Max-Total-Octets0" id=""></td></tr>
<tr><td>Bande passante montante max. (en kbits/seconde) </td><td><input type="text" value="" name="ChilliSpot-Bandwidth-Max-Up0" id=""></td></tr>
<tr><td>Bande passante descendante max. (en kbits/seconde)</td><td><input type="text" value="" name="ChilliSpot-Bandwidth-Max-Down0" id=""></td></tr>
<tr><td>URL de redirection</td><td><input type="text" value="" name="" id=""></td></tr>
<tr><td><br /></td><td></td></tr>
<tr><td><button>Annuler</button><button>Modifier</button></td><td></td></tr>
</tbody>
</table>
</div>
<div id="tabs2"></div>
<div id="tabs3">
Nb. sessions ouvertes : X<br />
<br />
<button>Déconnectet toutes les sessions ouvertes</button>
<br /><br />
<table class="ui-widget ui-widget-content">
<thead><tr class="ui-widget-header"><td width="50">#</td><td width="100">MAC</td><td width="100">IP</td><td>Hôte</td><td>Date/heure</td><td>-</td></tr></thead>
<tbody>
<tr><td>1</td><td>exemple</td><td>exemple</td><td>exemple</td><td>exemple</td><td><a href="">déconnecter</a></td></tr>
<tr><td>2</td><td>exemple</td><td>exemple</td><td>exemple</td><td>exemple</td><td><a href="">déconnecter</a></td></tr>
</tbody>
</table>
</div>
<div id="tabs4"></div>
</div>
<div>
 
</body>
</body>
/web/admin/images/delete.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/web/admin/groups.php
0,0 → 1,32
<?php
/*
 
 
*/
require_once('includes/defines.inc.php');
require_once(ALCASAR_ADMIN_PATH_INC.'/session.inc.php');
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
<html>
<head>
<title>Groups 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 custom page CSS -->
<style type="text/css">
 
</style>
<!-- include JQUERY -->
<script type="text/javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-1.5.min.js"></script>
<!-- include JQUERY UI -->
<script type="text/javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-ui-1.8.10.all.min.js"></script>
<!-- include page javascript -->
<script type="text/javascript">
 
</script>
</head>
<body>
<h1>GROUPS PAGE</h1>
</body>
</html>
/web/admin/includes/sql_attr.inc.php
0,0 → 1,5
<?php
/*
Liste des attributs radius acceptés (type, name, op, use)
*/
?>
/web/admin/includes/defines.inc.php
6,7 → 6,7
//Global definitions
define( 'DS', DIRECTORY_SEPARATOR );
//define( 'ALCASAR_ADMIN_PATH_ROOT', '/var/www/html/admin' );
define( 'ALCASAR_ADMIN_PATH_ROOT', 'I:\EasyPHP-5.3.2\www\ALCASAR-RSO\admin' );
define( 'ALCASAR_ADMIN_PATH_ROOT', 'J:\EasyPHP-5.3.2\www\ALCASAR-RSO\admin' );
 
$parts = explode( DS, ALCASAR_ADMIN_PATH_ROOT );
$pos = strrpos($_SERVER["REQUEST_URI"], "/");
22,5 → 22,5
define( 'ALCASAR_ADMIN_PATH_JS', $uri.'/js' );
define( 'ALCASAR_ADMIN_PATH_CSS', $uri.'/css' );
define( 'ALCASAR_ADMIN_PATH_IMG', $uri.'/images' );
 
define( 'ALCASAR_ADMIN_PATH_RS', $uri.'/ressources' );
?>
/web/admin/lib/radiusMysqlUser.class.php
0,0 → 1,281
<?php
/*
 
*/
require_once('mysql.class.php');// the mysql class in already OK!
 
class radiusMysqlUser
{
// public properties
// no public properties
// private properties
private $database = null;
private $username = null;
private $userid = 0;
private $userInfos = Array("Username"=>"","Name"=>"","Mail"=>"","Department"=>"","WorkPhone"=>"","HomePhone"=>"","Mobile"=>"");
private $checkItems = Array();
private $replyItems = Array();
//TO DO : init $userInfos, $checkItems and $replyItems fields and operator from config file !!!! URGENT
// protected properties
// no protected properties
// Class constructor
public function __construct($dbOptions = Array(), $attributeConfig = Array())
{
/*
Db init and config init to do!
*/
$this->database = new mysql("127.0.0.1","root","","radius");
}
// Class destructor
public function __destruct()
{
//$this->mysql->close(); //is private !
$this->database = null;
}
// public methods
public static function find($options = Array(), $escape=false)
{
$database = new mysql("127.0.0.1","root","","radius");
/*
If the options are not xss clean, escape all options string by calling _escapeDatas() method.
*/
if ($escape == true) {
//$this->_extractArray($options, true); //create variable from $options array and get xss clean for mysql database
$options = $this->_escapeDatas($options); //create variable from $options array and get xss clean for mysql database
}
/*
The differents $options values are :
$distinct -> only distinct response ?
$username -> only for this username
$fields -> fields to return (default : username)
$search -> search value to find
$search_IN -> search in this/those field(s)(text or array)
$limit -> to limit the resultset
$offset -> offset (work with $limit for pagination)
$sortby -> sort by x field (default : no sorting)
$sortdir -> sort direction (ASC/DESC) (default : no sorting)
$radius_attr-> radius attribute to find (text or array) if search_IN = radius
*/
//mysql_real_escape_string
$sql = "SELECT ";
// distinct option
if ((isset($distinct))&&($distinct=="distinct"))
$sql .= "DISTINCT ";
// field option (make sure that the field exist!)
if ((isset($options['fields']))&&($options['fields']!='')){
$sql .= $options['fields'].", username ";
}else{
$sql .= "username ";
}
$sql .= "FROM userinfo ";
// search option
if ((isset($options['username']))&&($options['username']!='')){
}
// where option
if ((isset($options['username']))&&($options['username']!=""))
{
$sql .= "WHERE username='".$options['username']."'";
$this->username = $options['username'];
}
// sort
if ((isset($options['sortby']))&&($options['sortby']!='')){
$sql .= "ORDER BY ".$options['sortby']." ";
if ((isset($options['sortdir']))&&($options['sortdir']!='')){
$sql .= "LIMIT ".$options['sortdir']." ";
}
}
// limit / offset
if ((isset($options['limit']))&&($options['limit']!='')){
if ((isset($options['offset']))&&($options['offset']!='')){
$sql .= "LIMIT $offset $limit ";
} else {
$sql .= "LIMIT $limit ";
}
}
$sql .= ";";
 
// query
$result = $database->query($sql);
// return the result values
return $result;
}
public function load($username, $attribute = false) //ok
{
/*
Load an user from mysql database. If $attribute==true, get all chekitems and replyitems attributes too.
*/
$sql = "SELECT * FROM userinfo WHERE UserName='$username';";
$result = $this->database->query($sql);
if (count($result) != 1) return false;
$this->userInfos = $result[0];
if ($attribute === true){
// get from radcheck table
$result=null;
$sql = "SELECT * FROM radcheck WHERE username='$username';";
$result = $this->database->query($sql);
if (count($result) != 1) return false;
$this->checkItems = $result[0];
// get from radreply table
$result=null;
$sql = "SELECT * FROM radreply WHERE username='$username';";
$result = $this->database->query($sql);
if (count($result) != 1) return false;
$this->replyItems = $result[0];
}
return true;
}
public function add()
{
/*
Add the current user with all his attribute in the mysql database
(only if the user not already exist)
*/
$sql = "";
//INSERT INTO table (a,b,c) VALUES (1,2,3)
//INSERT userinfo table (insert)
$sql = "INSERT INTO userinfo (UserName, Name, Mail, Department, WorkPhone, HomePhone, Mobile) VALUES ()";
//INSERT radcheck table (insert)
$sql = "";
//INSERT radreply table (insert)
$sql = "";
//INSERT radusergroup table (insert)
$sql = "";
//INSERT radpostauth table (insert)
}
public function delete() //ok
{
/*
Delete the current user from the mysql database
note : this function doesn't delete any accounting record of the current user
*/
if ($this->userid == 0) return 0; //0 record deleted
//can be better with transaction
$sql1 = "DELETE FROM radreply WHERE username = $this->username ;";
$sql2 = "DELETE FROM radcheck WHERE username = $this->username ;";
$sql3 = "DELETE FROM radpostauth WHERE username = $this->username ;";
$sql4 = "DELETE FROM radusergroup WHERE username = $this->username ;";
$sql5 = "DELETE FROM userinfo WHERE username = $this->username ;";
$nb1 = $this->database->exec($sql1);
$nb2 = $this->database->exec($sql2);
$nb3 = $this->database->exec($sql3);
$nb4 = $this->database->exec($sql4);
$nb5 = $this->database->exec($sql5);
return ($nb1+$nb2+$nb3+$nb4+$nb5); // n record deleted
}
public function update()
{
/*
Update the current user with all his attribute in the mysql database
(only if the user does not already exist)
*/
if ($this->userid == 0) return 0; //0 record deleted
//UPDATE userinfo table (update)
//UPDATE radcheck table (update)
//UPDATE radreply table (update)
//UPDATE radusergroup table (update)
//UPDATE radpostauth table (update)
}
public function save() //ok
{
/*
insert or Update the current user with all his attribute in the mysql database
(use add() and update() method)
*/
if ($this->userid == 0){
return $this->add();
} else {
return $this->update();
}
}
public function get($userInfo = 'null') //ok
{
/*
return userInfos
*/
if (array_key_exists($userInfo, $this->userInfos)){
return $this->userInfos[$userInfo];
} else {
return $this->userInfos;
}
}
public function set($userInfo) //ok
{
/*
Set a checkItem or replyItem of the user
*/
if (array_key_exists($userInfo, $this->userInfos)){
$this->userInfos[$userInfo] = $userInfo;
}
if (strtolower($userInfo) == "username") $this->username = $userInfo;
}
public function getAttribute($attribute = null)
{
/*
Get a checkItem or replyItem from the user or get the value from the mysql database
*/
if (array_key_exists($attribute, $this->userInfos)){
} elseif (array_key_exists($attribute, $this->checkItems)){
} elseif (array_key_exists($attribute, $this->replyItems)){
} else{
}
}
public function setAttribute($attribute)
{
/*
Set a checkItem or replyItem of the user
*/
}
public function checkPassword($pwd)
{
// Check the user password
// Return true or false
}
public function setPassword($pwd)
{
// Set or change the user password
}
// private methods
private function _escapeDatas($options)
{
}
private function _init($configFile)
{
}
// protected methods
// no protected method
}
?>
/web/admin/compteur.txt
1,0 → 0,0
37
73