Subversion Repositories ALCASAR

Compare Revisions

Regard whitespace Rev 901 → Rev 899

/web/acc/manager/htdocs/user_edit.php
3,6 → 3,7
$origine='user_edit';
if (is_file("../lib/langues.php"))
include("../lib/langues.php");
echo "$l_simultaneous_use";
require('/etc/freeradius-web/config.php');
require('../lib/attrshow.php');
require('../lib/defaults.php');
32,10 → 33,21
$show_ops = 0;
$colspan=1;
}
?>
 
 
echo <<<EOM
<html>
<head>
<title>subscription configuration for users and groups</title>
EOM;
 
if ($user_type != 'group'){
echo " <title>subscription configuration for $login ($cn)</title>\n";
$util = "usagers";}
else{
echo " <title>subscription configuration for $login</title>\n";
$util = "groupes";}
?>
 
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
<link rel="stylesheet" href="/css/style.css">
<script language="javascript" type="text/javascript">
54,11 → 66,7
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>
<?php
if ($user_type != 'group'){ echo "$l_users_managment";} else{ echo "$l_groups_managment";}
?>
</th></tr>
<tr><th>Gestion des <?php echo $util?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
75,12 → 83,12
if ($user_type != 'group')
{
include("../html/user_toolbar.html.php");
$titre=$l_user;
$titre="de l'usager";
}
else
{
include("../html/group_toolbar.html.php");
$titre=$l_group;
$titre="du groupe";
}
print <<<EOM
</table>
91,7 → 99,7
<td bgcolor="black" width=25% align=right>
<table border=0 width="200" cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=center valign=top><th>
<font color="white">$titre : $login</font>&nbsp;
<font color="white">Attributs $titre : $login</font>&nbsp;
</th></tr>
</table>
</td></tr>
/web/acc/manager/htdocs/voucher_new.php
89,26 → 89,37
if (is_file("../lib/$config[general_lib_type]/create_user.php"))
include("../lib/$config[general_lib_type]/create_user.php");
/* Petit traitement pré-impression pour la lisibilité */
/* Récupération des attributs du groupe le cas échéant */
/* Gestion des cas sans limitation */
if ($sto_imp=='' && $mds_imp=='' && $mms_imp==''){
/*Recherche de l'existence d'un groupe et récupération des attributs le cas échéant*/
if ($group!=''){
$saved_login = $login;
$login = $group;
if (is_file("../lib/sql/group_info.php"))
include("../lib/sql/group_info.php");
$login = $saved_login;}
$login = $saved_login;
/* formatage des secondes sous le format H min s*/
$sto_imp=sec_imp($sto_imp);
$mds_imp=sec_imp($mds_imp);
$mms_imp=sec_imp($mms_imp);
} else {
/* Si les valeurs de durée sont vide remplissage avec la valeur 'Illimitée'*/
/* et formatage des secondes sous le format Heure min ses*/
if ($sto_imp==''){ $sto_imp=$v_illimit;}
else { $sto_imp=sec_imp($sto_imp);}
if ($mas_imp==''){ $mas_imp=$v_illimit;}
else { $mas_imp=sec_imp($mas_imp);}
if ($mds_imp==''){ $mds_imp=$v_illimit;}
else { $mds_imp=sec_imp($mds_imp);}
if ($mms_imp==''){ $mms_imp=$v_illimit;}
else { $mms_imp=sec_imp($mms_imp);}
$sto_imp=$v_illimit;
$mds_imp=$v_illimit;
$mms_imp=$v_illimit;
}
}else{
/* formatage des secondes sous le format H min s*/
$sto_imp=sec_imp($sto_imp);
$mds_imp=sec_imp($mds_imp);
$mms_imp=sec_imp($mms_imp);
}
/*Formatage de la date afin d'être lisible dans toute les langues 'jj mm yyyy'*/
if ($Expiration!=''){ $Expiration=date("d - m - Y",strtotime($Expiration));}
else { $Expiration=$v_without;}
if ($Expiration!=''){
$Expiration=date("d - m - Y",strtotime($Expiration));
} else {
$Expiration=$v_illimit;
}
//Appel du ticket d'impression , passage en paramètres des étiquettes et des valeurs à afficher
echo' <form name="impression" method="post" action="ticket_user.php" target=_blank>
<input type="hidden" name="l_title_imp" value="'.$l_title_imp.'">
122,7 → 133,6
<input type="hidden" name="log_imp" value="'.$login.'">
<input type="hidden" name="passwd_imp" value="'.$passwd_imp.'">
<input type="hidden" name="sto_imp" value="'.$sto_imp.'">
<input type="hidden" name="mas_imp" value="'.$mas_imp.'">
<input type="hidden" name="mds_imp" value="'.$mds_imp.'">
<input type="hidden" name="mms_imp" value="'.$mms_imp.'">
<input type="hidden" name="exp_imp" value="'.$Expiration.'">
250,12 → 260,10
EOM;
switch ($key){
case 'Simultaneous-Use' :
case 'Expiration' :
case 'Max-All-Session' :
case 'Max-Daily-Session' :
case 'Max-Weekly-Session' :
case 'Max-Monthly-Session' :
case 'Login-Time' :
case 'Expiration' :
echo "<input type=\"hidden\" name=$oper_name value=\":=\">";
break;
case 'Session-Timeout' :
358,9 → 366,9
}
echo "</table><BR>";
if ($create == 1)
echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">";
echo "<input type=submit class=button value=\"Afficher le profil de l'utilisateur\" OnClick=\"this.form.show.value=1\">";
else{
echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
echo "<input type=submit class=button value=\"Cr&eacute;er\" OnClick=\"return formControl('newuser');\">";
}
?>
</form>
/web/acc/manager/htdocs/user_new.php
82,33 → 82,45
include("../lib/$config[general_lib_type]/user_info.php");
if ($user_exists != "no"){
echo <<<EOM
<b><i>$login</i> $l_already_exist</b>
<b><i>$login</i> $l_user_exist</b>
EOM;
}
else{
if (is_file("../lib/$config[general_lib_type]/create_user.php"))
include("../lib/$config[general_lib_type]/create_user.php");
/* Petit traitement pré-impression pour la lisibilité */
/* Récupération des attributs du groupe le cas échéant */
/* Petit traitement pré-impression
pour la lisibilité */
/*Gestion des cas sans limitation*/
if ($sto_imp=='' && $mds_imp=='' && $mms_imp==''){
/*Recherche de l'existence d'un groupe et récupération des attributs le cas échéant*/
if ($group!=''){
$saved_login = $login;
$login = $group;
if (is_file("../lib/sql/group_info.php"))
include("../lib/sql/group_info.php");
$login = $saved_login;}
$login = $saved_login;
/* formatage des secondes sous le format H min s*/
$sto_imp=sec_imp($sto_imp);
$mds_imp=sec_imp($mds_imp);
$mms_imp=sec_imp($mms_imp);
} else {
/* Si les valeurs de durée sont vide remplissage avec la valeur 'Illimitée'*/
/* et formatage des secondes sous le format Heure min ses*/
if ($sto_imp==''){ $sto_imp=$v_illimit;}
else { $sto_imp=sec_imp($sto_imp);}
if ($mas_imp==''){ $mas_imp=$v_illimit;}
else { $mas_imp=sec_imp($mas_imp);}
if ($mds_imp==''){ $mds_imp=$v_illimit;}
else { $mds_imp=sec_imp($mds_imp);}
if ($mms_imp==''){ $mms_imp=$v_illimit;}
else { $mms_imp=sec_imp($mms_imp);}
$sto_imp=$v_illimit;
$mds_imp=$v_illimit;
$mms_imp=$v_illimit;
}
}else{
/* formatage des secondes sous le format H min s*/
$sto_imp=sec_imp($sto_imp);
$mds_imp=sec_imp($mds_imp);
$mms_imp=sec_imp($mms_imp);
}
/*Formatage de la date afin d'être lisible dans toute les langues 'jj mm yyyy'*/
if ($Expiration!=''){ $Expiration=date("d - m - Y",strtotime($Expiration));}
else { $Expiration=$v_without;}
if ($Expiration!=''){
$Expiration=date("d - m - Y",strtotime($Expiration));
} else {
$Expiration=$v_illimit;
}
//Appel du ticket d'impression , passage en paramètres des étiquettes et des valeurs à afficher
echo' <form name="impression" method="post" action="ticket_user.php" target=_blank>
<input type="hidden" name="l_title_imp" value="'.$l_title_imp.'">
122,7 → 134,6
<input type="hidden" name="log_imp" value="'.$login.'">
<input type="hidden" name="passwd_imp" value="'.$passwd_imp.'">
<input type="hidden" name="sto_imp" value="'.$sto_imp.'">
<input type="hidden" name="mas_imp" value="'.$mas_imp.'">
<input type="hidden" name="mds_imp" value="'.$mds_imp.'">
<input type="hidden" name="mms_imp" value="'.$mms_imp.'">
<input type="hidden" name="exp_imp" value="'.$Expiration.'">
357,7 → 368,8
}
}
/*
Ajout du choix d'unité (pour les durées limites de session,journée et de mois)
Ajout du pré-remplissage de cellule
du choix d'unité (pour les durées limites de session,journée et de mois)
et d'un calendrier pour la date d'expiration
Sauf dans le cas de la visualisation
*/
418,9 → 430,9
}
echo "</table><BR>";
if ($create == 1)
echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">";
echo "<input type=submit class=button value=\"Afficher le profil de l'utilisateur\" OnClick=\"this.form.show.value=1\">";
else{
echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
echo "<input type=submit class=button value=\"Cr&eacute;er\" OnClick=\"return formControl('newuser');\">";
}
?>
</form>
/web/acc/manager/htdocs/ticket_user.php
4,7 → 4,6
// Etiquettes
$l_login_imp=utf8_decode($_POST["l_login_imp"]);
$l_password_imp=utf8_decode($_POST["l_password_imp"]);
$l_max_all_session_imp=utf8_decode($_POST["l_max_all_session_imp"]);
$l_session_timeout_imp=utf8_decode($_POST["l_session_timeout_imp"]);
$l_max_daily_session_imp=utf8_decode($_POST["l_max_daily_session_imp"]);
$l_max_monthly_session_imp=utf8_decode($_POST["l_max_monthly_session_imp"]);
14,7 → 13,6
$passwd_imp=utf8_decode($_POST["passwd_imp"]);
$exp_imp=utf8_decode($_POST["exp_imp"]);
$sto_imp=utf8_decode($_POST["sto_imp"]);
$mas_imp=utf8_decode($_POST["mas_imp"]);
$mds_imp=utf8_decode($_POST["mds_imp"]);
$mms_imp=utf8_decode($_POST["mms_imp"]);
 
120,13 → 118,8
//saut de ligne
$pdf->Ln(7);
//création des attributs utilisateurs coordonnées x , y hauteur et largeur , texte
$pdf->cell(50);
$pdf->SetFont('Arial','',12);
$pdf->Cell(45,10,$l_max_all_session_imp,0,0,'R');
$pdf->SetFont('Arial','B',12);
$pdf->Cell(45,10,$mas_imp,0,1,'L');
$pdf->cell(50);
$pdf->SetFont('Arial','',12);
$pdf->Cell(45,10,$l_session_timeout_imp,0,0,'R');
$pdf->SetFont('Arial','B',12);
$pdf->Cell(45,10,$sto_imp,0,1,'L');
135,12 → 128,12
$pdf->Cell(45,10,$l_max_daily_session_imp,0,0,'R');
$pdf->SetFont('Arial','B',12);
$pdf->Cell(45,10,$mds_imp,0,1,'L');
//$pdf->SetFont('Arial','',12);
//$pdf->cell(50);
//$pdf->Cell(45,10,$l_max_monthly_session_imp,0,0,'R');
//$pdf->SetFont('Arial','B',12);
//$pdf->Cell(45,10,$mms_imp,0,1,'L');
$pdf->SetFont('Arial','',12);
$pdf->cell(50);
$pdf->Cell(45,10,$l_max_monthly_session_imp,0,0,'R');
$pdf->SetFont('Arial','B',12);
$pdf->Cell(45,10,$mms_imp,0,1,'L');
$pdf->cell(50);
$pdf->SetFont('Arial','',12);
$pdf->Cell(45,10,$l_expiration_imp,0,0,'R');
$pdf->SetFont('Arial','B',12);
/web/acc/manager/lib/langues.php
15,26 → 15,19
switch ($Language){
case 'fr':
//Français
$l_already_exist = "existe d&eacute;j&agrave;";
$l_user = "Usager";
$l_users_managment = "Gestion des usagers";
$l_groups_managment = "Gestion des groupes";
switch ($origine){
//Administration
case 'user_new':
case 'user_edit':
$l_title = "Cr&eacute;ation d'un usager";
$l_frame_top = "Gestion des usagers";
$l_frame = "Cr&eacute;ation d'un usager";
$l_user_exist = "existe d&eacute;j&agrave;";
$l_login = "Identifiant";
$l_password = "Mot de passe";
$l_passwd_gen = "g&eacute;n&eacute;rer";
$l_group_create = "Cr&eacute;er un groupe";
$l_group = "Groupe";
$l_created_groups = "Groupe(s) déjà créé(s)";
$l_group_name = "Nom du groupe";
$l_group_members = "Membres du groupe :<br>(séparé par un espace ou un 'retour chariot')";
$l_group_empty = "La liste des groupes est vide";
$l_status ="&Eacute;TAT";
$l_personal_info ="INFORMATIONS PERSONNELLES";
$l_connections ="CONNEXIONS";
$l_open_sessions ="SESSIONS OUVERTES";
$l_members ="MEMBRES";
$l_attributes ="ATTRIBUTS";
$l_remove ="SUPPRIMER";
$l_name = "Nom et pr&eacute;nom";
$l_email = "Adresse de couriel";
$l_lang_ticket = "Langue du ticket";
52,45 → 45,30
$l_max_bandwidth_down = "Limite de débit descendant<br>(en kbits/seconde)";
$l_wispr_redirection = "URL de redirection";
$l_click_for_help = "Cliquez pour afficher l'aide sur cet attribut";
$l_show_profile = "Afficher le profil";
$l_create = "Créer";
switch ($origine){
//Administration
case 'user_new':
case 'user_edit':
$l_title = "Cr&eacute;ation d'un usager";
$l_frame_top = "Gestion des usagers";
$l_frame = "Cr&eacute;ation d'un usager";
break;
case 'group_new':
$l_title = "Cr&eacute;ation d'un groupe";
$l_frame_top = "Gestion des groupes";
$l_frame = "Gestion des groupes";
$l_group_create = "Cr&eacute;er un groupe";
break;
}
break;
default :
//English
$l_already_exist = "already exist";
$l_user = "User";
$l_users_managment = "Users managment";
$l_groups_managment = "Groups managment";
switch ($origine){
//Administration
case 'user_new':
case 'user_edit':
$l_title = "Create a user";
$l_frame_top = "Users admin";
$l_frame = "Create a user";
$l_user_exist = "already exist";
$l_login = "Login";
$l_password = "Password";
$l_passwd_gen = "generate";
$l_group_create = "Create a group";
$l_group = "Group";
$l_created_groups = "Already created group(s)";
$l_group_name = "Group name";
$l_group_members = "Members of group :<br>(separate by a 'space' or a 'carriage return')";
$l_group_empty = "The group list is empty";
$l_status ="STATUS";
$l_personal_info ="PERSONAL INFORMATIONS";
$l_connections ="CONNECTIONS";
$l_open_sessions ="OPEN SESSIONS";
$l_members ="MEMBERS";
$l_attributes ="ATTRIBUTES";
$l_remove ="REMOVE";
$l_name = "Surname and name";
$l_email = "Email Address";
$l_lang_ticket = "Voucher language";
108,20 → 86,12
$l_max_bandwidth_down = "Maximum download bandwidth<br>(in kbits/second)";
$l_wispr_redirection = "Redirection URL";
$l_click_for_help = "Click to show help about this attribute";
$l_show_profile = "Show profile";
$l_create = "Create";
switch ($origine){
//Administration
case 'user_new':
case 'user_edit':
$l_title = "Create a user";
$l_frame_top = "Users admin";
$l_frame = "Create a user";
break;
case 'group_new':
$l_title = "Create a group";
$l_frame_top = "Groups admin";
$l_frame = "Groups admin";
$l_group_create = "Create a group";
break;
}
break;
140,7 → 110,6
$l_max_monthly_session_imp ="Dur&eacute;e mensuelle :";
$l_expiration_imp="Date d'expiration :";
$v_illimit="Illimit&eacute;e";
$v_without="Aucune";
break;
case 'de':
$l_title_imp = "GUTSCHEIN SPRACHE";
151,8 → 120,7
$l_max_daily_session_imp="Stunden t&auml;glich :";
$l_max_monthly_session_imp ="monatlich Dauer :";
$l_expiration_imp="Verfallsdatum :";
$v_illimit="Unbegrentz";
$v_without="Ohne";
$v_illimit="Unbegrenzt";
break;
case 'nl':
$l_title_imp = "ONTVANGST INTERNET";
164,7 → 132,6
$l_max_monthly_session_imp ="Maandelijkse duur :";
$l_expiration_imp="Vervaldatum :";
$v_illimit="Onbeperkte";
$v_without="Ohne";
break;
case 'es':
$l_title_imp = "BONO INTERNET";
176,7 → 143,6
$l_max_monthly_session_imp ="Duraci&oacute;n mensual :";
$l_expiration_imp="Fecha de caducidad :";
$v_illimit="Ilimitado";
$v_without="Sin";
break;
case 'it':
$l_title_imp = "RICEVIMENTO INTERNET";
188,7 → 154,6
$l_max_monthly_session_imp ="Durata mensile :";
$l_expiration_imp="Data di scadenza :";
$v_illimit="Illimitato";
$v_without="Senza";
break;
default:
$l_title_imp = "INTERNET VOUCHER";
200,7 → 165,6
$l_max_monthly_session_imp ="Max monthly session :";
$l_expiration_imp="Expiration date :";
$v_illimit="Unlimited";
$v_without="Without";
break;
}
}
/web/acc/manager/lib/sql/group_info.php
48,7 → 48,6
$attr = $row[attribute];
$val = $row[value];
/*Ajout en vue de l'impression des données (thank's to Geoffroy MUSITELLI)*/
if($attr == "Max-All-Session") $mas_imp = $val;
if($attr == "Max-Daily-Session") $mds_imp = $val;
if($attr == "Max-Monthly-Session") $mms_imp = $val;
if($attr == "Expiration") $Expiration = $val;
/web/acc/manager/lib/sql/create_user.php
95,7 → 95,6
$val = $$attrmap["$key"];
/*Ajout en vue de l'impression des données (thank's to Geoffroy MUSITELLI)*/
if($key == "Session-Timeout") $sto_imp = $val;
if($key == "Max-All-Session") $mas_imp = $val;
if($key == "Max-Daily-Session") $mds_imp = $val;
if($key == "Max-Monthly-Session") $mms_imp = $val;
/*Fin Ajout*/
/web/acc/manager/html/group_toolbar.html.php
1,16 → 1,13
<?php
//Gestion de la langue
if (is_file("../lib/langues.php"))
include("../lib/langues.php");
$Login = urlencode($login);
print <<<EOM
<tr valign=top>
<td align=center bgcolor="#FFCC66">
<a href="group_admin.php?login=$Login"><font color="black"><b>$l_members</b></font></a></td>
<a href="group_admin.php?login=$Login" title="Gestion des membres du groupe"><font color="black"><b>MEMBRES</b></font></a></td>
<td align=center bgcolor="#FFCC66">
<a href="user_edit.php?login=$Login&user_type=group"><font color="black"><b>$l_attributes</b></font></a></td>
<a href="user_edit.php?login=$Login&user_type=group" title="Editer les propri&eacute;t&eacute;s du groupe"><font color="black"><b>ATTRIBUTS</b></font></a></td>
<td align=center bgcolor="#FFCC66">
<a href="user_delete.php?login=$Login&user_type=group"><font color="black"><b>$l_remove</b></font></a></td>
<a href="user_delete.php?login=$Login&user_type=group" title="Supprimer le groupe"><font color="black"><b>SUPPRIMER</b></font></a></td>
</tr>
EOM;
?>
/web/acc/manager/html/user_toolbar.html.php
1,30 → 1,27
<?php
//Gestion de la langue
if (is_file("../lib/langues.php"))
include("../lib/langues.php");
$Login = urlencode($login);
print <<<EOM
<tr valign=top>
<td align=center bgcolor="#FFCC66">
<a href="user_admin.php?login=$Login"><font color="black"><b>$l_status</b></font></a></td>
<a href="user_admin.php?login=$Login" title="Afficher les informations de l'usager"><font color="black"><b>&Eacute;TAT</b></font></a></td>
<td align=center bgcolor="#FFCC66">
<a href="user_edit.php?login=$Login"><font color="black"><b>$l_attributes</b></font></a></td>
<a href="user_edit.php?login=$Login" title="Modifier les param&egrave;tres de l'usager"><font color="black"><b>ATTRIBUTS</b></font></a></td>
<td align=center bgcolor="#FFCC66">
<a href="user_info.php?login=$Login"><font color="black"><b>$l_personal_info</b></font></a></td>
<a href="user_info.php?login=$Login" title="Modifier les informations personnelles de l'usager"><font color="black"><b>INFOS PERSONNELLES</b></font></a></td>
</tr>
<tr valign=top>
<td align=center bgcolor="#FFCC66">
<a href="user_accounting.php?login=$Login"><font color="black"><b>$l_connections</b></font></a></td>
<a href="user_accounting.php?login=$Login" title="Afficher les informations de connexions de l'usager"><font color="black"><b>CONNEXIONS</b></font></a></td>
<!--<td align=center bgcolor="#FFCC66">
<a href="badusers.php?login=$Login" title="Show User Unauthorized Actions"><font color="black"><b>BADUSERS</b></font></a></td>
-->
<td align=center bgcolor="#FFCC66">
<a href="user_delete.php?login=$Login"><font color="black"><b>$l_remove</b></font></a></td>
<a href="user_delete.php?login=$Login" title="Supprimer l'usager"><font color="black"><b>SUPPRIMER</b></font></a></td>
<!--<td align=center bgcolor="#FFCC66">
<a href="user_test.php?login=$Login" title="Test de l'usager"><font color="black"><b>TEST</b></font></a></td>
-->
<td align=center bgcolor="#FFCC66">
<a href="clear_opensessions.php?login=$Login"><font color="black"><b>$l_open_sessions</b></font></a></td>
<a href="clear_opensessions.php?login=$Login" title="Effacer les sessions ouvertes de l'usager"><font color="black"><b>SESSIONS OUVERTES</b></font></a></td>
</tr>
</font>
EOM;