Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2925 → Rev 2926

/web/acc/about.htm
1,27 → 1,23
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- by REXY -->
<HEAD>
<META charset="utf-8">
<TITLE>About</TITLE>
</HEAD>
<BODY background="/images/linux_ksc2.jpg" TEXT="#FFFFFF" BGCOLOR="#000000">
<!-- on crée 3 calques -->
<div ID="obj1" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="/images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<div ID="obj2" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="/images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<div ID="obj3" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="/images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<div ID="obj4" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="/images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<CENTER><H2>A.L.C.A.S.A.R</H2>
<H3>
Application Libre pour le Contrôle Authentifié et Sécurisé des Accès au Réseau
</H3></CENTER>
<html><!-- by REXY -->
<head>
<meta charset="utf-8">
<title>About ALCASAR</TITLE>
</head>
<body background="/images/background-web-mini.jpg">
<!-- on crée 4 calques -->
<div ID="obj1" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="/images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<div ID="obj2" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="/images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<div ID="obj3" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="/images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<div ID="obj4" STYLE="position:absolute;TOP:0px;LEFT:0px;width:20px;height:18px;">
<dd><img src="/images/mini-tux.png" alt="linux" WIDTH="65" HEIGHT="72"></dd>
</div>
<script LANGUAGE="javascript">
//Fonction pour ouvrir une nouvelle fenêtre
function ouvrir(page)
71,26 → 67,25
}
animation();
</script>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<TABLE width="100%" border="1" cellspacing="0" cellpadding="0" style="background-color: rgba(255, 255, 255, 0.5);">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: rgba(255, 255, 255, 0.5);">
<TR>
<TD align="center"><A HREF="javascript:ouvrir('http://www.linux.org')"><img border="0" src="/images/footer_linux.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.mageia.org')"><img border="0" src="/images/footer_mageia.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.coova.org/CoovaChilli')"><img border="0" src="/images/footer_coova.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.freeradius.org')"><img border="0" src="/images/footer_freeradius.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.mariadb.org')"><img border="0" src="/images/footer_mariadb.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('https://lighttpd.net')"><img border="0" src="/images/footer_lighttpd.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.php.net')"><img border="0" src="/images/footer_php.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.linux.org')"><img border="0" src="/images/footer_linux.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.mageia.org')"><img border="0" src="/images/footer_mageia.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.coova.org/CoovaChilli')"><img border="0" src="/images/footer_coova.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.freeradius.org')"><img border="0" src="/images/footer_freeradius.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.mariadb.org')"><img border="0" src="/images/footer_mariadb.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('https://lighttpd.net')"><img border="0" src="/images/footer_lighttpd.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.php.net')"><img border="0" src="/images/footer_php.png"></A></TD>
</TR>
<TR>
<TD align="center"><A HREF="javascript:ouvrir('http://www.fpdf.org')"><img border="0" src="/images/footer_fpdf.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('https://sourceforge.net/projects/ipt-netflow')"><img border="0" src="/images/footer_netflow.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('https://www.clamav.net')"><img border="0" src="/images/footer_clamav.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.netfilter.org')"><img border="0" src="/images/footer_netfilter.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.wammu.eu')"><img border="0" src="/images/footer_gammu.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://e2guardian.org')"><img border="0" src="/images/footer_e2guardian.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://thekelleys.org.uk/dnsmasq/doc.html')"><img border="0" src="/images/footer_dnsmasq.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.fpdf.org')"><img border="0" src="/images/footer_fpdf.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('https://sourceforge.net/projects/ipt-netflow')"><img border="0" src="/images/footer_netflow.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('https://www.clamav.net')"><img border="0" src="/images/footer_clamav.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.netfilter.org')"><img border="0" src="/images/footer_netfilter.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://www.wammu.eu')"><img border="0" src="/images/footer_gammu.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://e2guardian.org')"><img border="0" src="/images/footer_e2guardian.png"></A></TD>
<TD align="center"><A HREF="javascript:ouvrir('http://thekelleys.org.uk/dnsmasq/doc.html')"><img border="0" src="/images/footer_dnsmasq.png"></A></TD>
</TR>
</TABLE>
</BODY>
</HTML>
</table>
</body>
</html>
/web/acc/admin/logo.php
1,16 → 1,10
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- Written by Rexy -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>Modif logo organisme</TITLE>
<link rel="stylesheet" href="/css/acc.css" type="text/css">
<SCRIPT language="javascript" type="text/javascript">
function rafraichissement(cadre1, val1)
{
eval(cadre1+".location='"+val1+"'");
}
</SCRIPT>
</HEAD>
<!DOCTYPE HTML>
<html><!-- Written by Rexy -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Logo Customizing</title>
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</head>
<body>
<?php
# Choice of language
22,7 → 16,7
$l_title = "Personnalisation du logo";
$l_current_logo = "Logo actuel";
$l_logo_select ="Sélectionnez un nouveau logo";
$l_logo_help1 = "votre logo doit être un fichier au format libre 'PNG'";
$l_logo_help1 = "votre logo doit être un fichier au format 'PNG'";
$l_logo_help2 = "la taille de ce fichier doit être inférieure à 100KO";
$l_logo_help3 = "rafraîchissez les pages de votre navigateur pour voir le résultat";
} else if ($Language === 'es') {
29,7 → 23,7
$l_title = "Personalización del logo";
$l_current_logo = "Logo actual";
$l_logo_select ="Seleccione un nuevo logo";
$l_logo_help1 = "su logo debe ser un archivo 'PNG' gratuito.";
$l_logo_help1 = "su logo debe ser un archivo 'PNG'.";
$l_logo_help2 = "el tamaño de este archivo debe ser inferior a 100KO";
$l_logo_help3 = "refresque las páginas de su navegador para ver el resultado";
} else {
36,7 → 30,7
$l_title = "Customizing the logo";
$l_current_logo = "Current logo";
$l_logo_select ="Select a new logo";
$l_logo_help1 = "your logo must be in open 'PNG' format";
$l_logo_help1 = "your logo must be in 'PNG' format";
$l_logo_help2 = "the file size must be less than 100KB";
$l_logo_help3 = "refresh your browser in order to see the result";
}
49,11 → 43,11
$extension = strstr($_FILES['logo']['name'], '.');
if ($extension != '.png')
{
$result = 'Veuillez s&eacute;lectionner un fichier de type png !';
$result = $l_logo_help1;
}
elseif (file_exists($_FILES['logo']['tmp_name']) and filesize($_FILES['logo']['tmp_name']) > $taille_max)
{
$result = 'La taille du fichier doit &ecirc;tre inf&eacute;rieur &agrave; 100Ko !';
$result = $l_logo_help2;
}
if (!isset($result))
{
61,34 → 55,32
}
}
?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><? echo "$l_title";?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<CENTER><H3><? echo "$l_current_logo";?> : <img src="/images/organisme.png" width="90"></H3></center><BR>
<div class="panel">
<div class="panel-header"><?= $l_title ?></div>
<div class="panel-row">
<table width="100%" border=0 cellspacing=0 cellpadding=1>
<tr><td>
<table width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center><H3><? echo "$l_current_logo";?> : <img src="/images/organisme.png" width="90"></H3></center><BR>
<? echo "$l_logo_select";?> :
<FORM action="logo.php" method=POST ENCTYPE="multipart/form-data">
<input type="file" name="logo">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="submit" value="Envoyer">
</FORM>
<form action="logo.php" method=POST ENCTYPE="multipart/form-data">
<input type="file" name="logo">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="submit" value="Envoyer">
</form>
<?php
if (isset($result))
{
if (isset($result)){
echo '<H3>'; echo $result; echo '</H3><BR>';
}
?>
<li><? echo "$l_logo_help1";?>
<li><? echo "$l_logo_help2";?>
<li><? echo "$l_logo_help3";?>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</BODY>
</HTML>
} ?>
<? echo "- $l_logo_help1<br>";?>
<? echo "- $l_logo_help2<br>";?>
<? echo "- $l_logo_help3";?>
</td></tr>
</table>
</td></tr>
</table>
</div>
</div>
</body>
</html>
/web/acc/admin/services.php
10,7 → 10,7
$l_main_services = "Services principaux";
$l_filter_services = "Services de filtrage";
$l_opt_services = "Services optionnels";
$l_service_title = "Nom du service";
$l_service_title = "Rôle du service";
$l_service_start = "Démarrer";
$l_service_stop = "Arréter";
$l_service_restart = "Redémarrer";
38,8 → 38,9
$l_ulogd_ssh = "journalisation des accès par SSH";
$l_ulogd_ext_access = "journalisation des tentatives d'accès externes";
$l_ulogd_traceability = "journalisation des connexions WEB filtrés";
$l_wifi4eu_id = "Entrez votre identifiant réseau";
$l_execute = "Exécuter";
$l_stop_restart = "Arret et redémarrage du système";
$l_stop_restart = "Arrêt et redémarrage du système";
$l_halt = "Arréter le système";
$l_reboot = "Relancer le système";
} else if($Language == 'es') {
47,7 → 48,7
$l_main_services = "Servicios Principales";
$l_filter_services = "Servicios de Filtrado";
$l_opt_services = "Servicios Opcionales";
$l_service_title = "Nombre del servicio";
$l_service_title = "función del servicio";
$l_service_start = "Iniciar";
$l_service_stop = "Detener";
$l_service_restart = "Reiniciar";
75,6 → 76,7
$l_ulogd_ssh = "Proceso de registro para accesos SSH";
$l_ulogd_ext_access = "Proceso de registro de intentos de accesos externos";
$l_ulogd_traceability = "Proceso de registro de acceso WEB";
$l_wifi4eu_id = "Introduzca su identificador de red";
$l_execute = "Ejecutar";
$l_stop_restart = "Apagado y Reinicio del sistema";
$l_halt = "Apagar el sistema";
84,7 → 86,7
$l_main_services = "Main services";
$l_filter_services = "Filtering services";
$l_opt_services = "Optional services";
$l_service_title = "Service name";
$l_service_title = "Role of the service";
$l_service_start = "Start";
$l_service_stop = "Stop";
$l_service_restart = "Restart";
112,6 → 114,7
$l_ulogd_ssh = "SSH access logging process";
$l_ulogd_ext_access = "Extern access attempts logging process";
$l_ulogd_traceability = "Filtering WEB access logging process";
$l_wifi4eu_id = "Enter your network identifier";
$l_execute = "Execute";
$l_stop_restart = "Halt and restart the system";
$l_halt = "Halt le system";
132,19 → 135,39
if (!is_readable(CONF_FILE)){
exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
}
$file_conf = fopen(CONF_FILE, 'r');
if (!$file_conf) {
exit('Error opening the file '.CONF_FILE);
}
while (!feof($file_conf)) {
$buffer = fgets($file_conf, 4096);
if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
$tmp = explode('=', $buffer, 2);
$conf[trim($tmp[0])] = trim($tmp[1]);
}
}
fclose($file_conf);
$wifi4eu = $conf['WIFI4EU'];
$wifi4eu_code = $conf['WIFI4EU_CODE'];
 
// Doing an action on a service (start,stop or restart)
function serviceExec($service, $action){
if (($action == "start")||($action == "stop")||($action == "restart")){
exec("sudo /usr/bin/systemctl $action ".escapeshellarg($service), $retval, $retstatus);
if ($service == "sshd"){ // in order to keep that conf for SSH at next reboot
if ($service != "wifi4eu") { exec("sudo /usr/bin/systemctl $action ".escapeshellarg($service), $retval, $retstatus); }
if ($service == "wifi4eu"){
if ($action == "stop"){
file_put_contents(CONF_FILE, str_replace('WIFI4EU=on', 'WIFI4EU=off', file_get_contents(CONF_FILE)));
// exec("sudo /usr/local/bin/alcasar-wifi4eu.sh -off");
}
}
if ($service == "sshd"){
if ($action == "start"){
exec("sudo /usr/bin/systemctl enable ".escapeshellarg($service));
exec("sudo /usr/bin/systemctl enable ".escapeshellarg($service)); // in order to keep that conf for SSH at next reboot
file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
exec("sudo /usr/local/bin/alcasar-iptables.sh");
}
if ($action == "stop"){
exec("sudo /usr/bin/systemctl disable ".escapeshellarg($service));
exec("sudo /usr/bin/systemctl disable ".escapeshellarg($service)); // in order to keep that conf for SSH at next reboot
file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
exec("sudo /usr/local/bin/alcasar-iptables.sh");
}
181,6 → 204,14
}
}
//-------------------------------
// WIFI4EU
//-------------------------------
if (isset($_POST['wifi4eu'])){
file_put_contents(CONF_FILE, str_replace('WIFI4EU=off', 'WIFI4EU=on', file_get_contents(CONF_FILE)));
// file_put_contents(CONF_FILE, preg_replace('^WIFI4EU_CODE=*', 'WIFI4EU_code=$_POST[\'wifi4eu\']', file_get_contents(CONF_FILE)));
// exec("sudo /usr/local/bin/alcasar-wifi4eu.sh -on");
}
//-------------------------------
// Actions on system
//-------------------------------
if (isset($_POST['choix'])){
209,6 → 240,10
$MainServiceStatus['ulogd_ssh'] = checkServiceStatus("ulogd-ssh");
$MainServiceStatus['ulogd_ext_access'] = checkServiceStatus("ulogd-ext-access");
$MainServiceStatus['ulogd_traceability'] = checkServiceStatus("ulogd-traceability");
$MainServiceStatus['sshd'] = checkServiceStatus("sshd");
$MainServiceStatus['ntpd'] = checkServiceStatus("ntpd");
$MainServiceStatus['fail2ban'] = checkServiceStatus("fail2ban");
$MainServiceStatus['vnstat'] = checkServiceStatus("vnstat");
 
$FilterServiceStatus = array();
$FilterServiceStatus['unbound_blacklist'] = checkServiceStatus("unbound-blacklist");
219,110 → 254,109
$FilterServiceStatus['clamav_daemon'] = checkServiceStatus("clamav-daemon");
$FilterServiceStatus['clamav_freshclam'] = checkServiceStatus("clamav-freshclam");
 
$OptServiceStatus = array();
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
$OptServiceStatus['fail2ban'] = checkServiceStatus("fail2ban");
$OptServiceStatus['vnstat'] = checkServiceStatus("vnstat");
/****************
* MAIN *
*****************/
 
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><!-- written by steweb57 / rexy -->
?><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $l_services_title; ?></title>
<link rel="stylesheet" href="/css/acc.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $l_services_title; ?></title>
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $l_main_services; ?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
<tr>
<?php if ($statusOK) { ?>
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
<td width="80" align="center">---</td>
<td width="80" align="center"><?php if (($serviceName != "chilli") && ($serviceName != "lighttpd")) { echo "<a href=\"".$_SERVER['PHP_SELF']."?action=stop&service=".str_replace('_','-',$serviceName)."\"> $l_service_stop</a>"; } else echo "---";?></td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=".str_replace('_','-',$serviceName)."\"> $l_service_restart";?></a></td>
<?php } else { ?>
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=".str_replace('_','-',$serviceName)."\"> $l_service_start";?></a></td>
<td width="80" align="center">---</td>
<td width="80" align="center">---</td>
<?php } ?>
</tr>
<?php } ?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $l_filter_services; ?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
<!-- <TR align="center"> -->
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
<tr>
<?php if ($statusOK) { ?>
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
<td width="80" align="center">---</td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=".str_replace('_','-',$serviceName)."\"> $l_service_stop";?></a></td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=".str_replace('_','-',$serviceName)."\"> $l_service_restart";?></a></td>
<?php } else { ?>
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=".str_replace('_','-',$serviceName)."\"> $l_service_start";?></a></td>
<td width="80" align="center">---</td>
<td width="80" align="center">---</td>
<?php } ?>
</tr>
<?php } ?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $l_opt_services; ?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
<tr>
<?php if ($statusOK) { ?>
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
<td width="80" align="center">---</td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
<?php } else { ?>
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
<td width="80" align="center">---</td>
<td width="80" align="center">---</td>
<?php } ?>
</tr>
<?php } ?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><? echo $l_stop_restart;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<table width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<FORM action="services.php" method=POST>
<select name='choix'>
<option selected value="reboot"><?echo "$l_reboot";?>
<option value="halt"><?echo "$l_halt";?>
</select>
<input type=submit value="<?echo "$l_execute";?>">
</FORM>
</td></tr>
</table>
<div class="panel">
<div class="panel-header"><?= $l_main_services ?></div>
<div class="panel-row">
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
<tr>
<?php if ($statusOK) { ?>
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
<td width="80" align="center">---</td>
<td width="80" align="center"><?php if (($serviceName != "chilli") && ($serviceName != "lighttpd")) { echo "<a href=\"".$_SERVER['PHP_SELF']."?action=stop&service=".str_replace('_','-',$serviceName)."\"> $l_service_stop</a>"; } else echo "---";?></td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=".str_replace('_','-',$serviceName)."\"> $l_service_restart";?></a></td>
<?php } else { ?>
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "$serviceName</td><td>${$comment}" ;?> </td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=".str_replace('_','-',$serviceName)."\"> $l_service_start";?></a></td>
<td width="80" align="center">---</td>
<td width="80" align="center">---</td>
<?php } ?>
</tr>
<?php } ?>
</table>
</div>
</div>
<div class="panel">
<div class="panel-header"><?= $l_filter_services ?></div>
<div class="panel-row">
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
<!-- <TR align="center"> -->
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
<tr>
<?php if ($statusOK) { ?>
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
<td width="80" align="center">---</td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=".str_replace('_','-',$serviceName)."\"> $l_service_stop";?></a></td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=".str_replace('_','-',$serviceName)."\"> $l_service_restart";?></a></td>
<?php } else { ?>
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
<td align="center"><?php $comment="l_$serviceName"; echo "$serviceName</td><td>${$comment}" ;?> </td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=".str_replace('_','-',$serviceName)."\"> $l_service_start";?></a></td>
<td width="80" align="center">---</td>
<td width="80" align="center">---</td>
<?php } ?>
</tr>
<?php } ?>
</table>
</div>
</div>
<div class="panel">
<div class="panel-header"><?= $l_opt_services ?></div>
<div class="panel-row">
<form action="<?php echo $_SERVER['PHP_SELF']?>" method=POST>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"> </td><td colspan="3"><?php echo $l_service_action;?></td></tr>
<tr>
<?php if ($wifi4eu == "on") { ?>
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
<td align="center"><b>WIFI4EU</b></td><td><?php echo "network ID : $wifi4eu_code"; ?></td>
<td width="80" align="center">---</td>
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=wifi4eu\"> $l_service_stop";?></a></td>
<td width="80" align="center">---</td>
<?php } else { ?>
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko; ?>"></td>
<td align="center">WIFI4EU</td><td><?php echo $l_wifi4eu_id; ?> : <input type ="text" name="wifi4eu" value="<?php echo $wifi4eu_code; ?>" size="40"></td>
<td width="80" align="center"><input type=submit value="<?echo $l_service_start;?>"></td>
<td width="80" align="center">---</td>
<td width="80" align="center">---</td>
<?php } ?>
</tr>
</table>
</form>
</div>
</div>
<div class="panel">
<div class="panel-header"><?= $l_stop_restart ?></div>
<div class="panel-row">
<table width="100%" border=0 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<form action="<?php echo $_SERVER['PHP_SELF']?>" method=POST>
<select name='choix'>
<option selected value="reboot"><?echo "$l_reboot";?>
<option value="halt"><?echo "$l_halt";?>
</select>
<input type=submit value="<?echo "$l_execute";?>">
</form>
</td></tr>
</table>
</div>
</div>
</body>
</html>
/web/acc/manager/htdocs/accounting.php
7,23 → 7,8
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>$l_title</title>
<link rel="stylesheet" href="/css/acc.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
#choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
59,6 → 44,21
$l_edit_user = "Edit user :";
}
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>$l_title</title>
<link rel="stylesheet" href="/css/acc.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
$operators=array( '=','<', '>', '<=', '>=', 'regexp', 'like' );
if ($config['sql_type'] == 'pg'){
$operators=array( '=','<', '>', '<=', '>=', '~', 'like', '~*', '~~*', '<<=' );
/web/acc/manager/html/stats.html.php
1,7 → 1,7
<form action="stats.php" method="get">
<div class="panel">
<div class="panel-header"><?= $l_title ?></div>
<div class="panel-row">
<form action="stats.php" method="get">
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr>
<td colspan="2" align=center>
56,20 → 56,14
</td>
</tr>
</table>
</form>
<hr size=1 noshade>
<table border=0 width="100%">
<tr>
<td align="center">
<center>
<?php
if ($login == '') echo $l_stat_for_all;
else echo "$l_stat_for_user <b><font color=\"darkblue\">$login</font></b>"
?>
</td>
</tr>
</table>
</div>
<div class="panel-header"><?= $l_title ?></div>
<div class="panel-row">
</center>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tbody style='font-family: "DejaVu Sans";font-size: small;color: #666666;'>
<tr bgcolor="#d0ddb0">
162,9 → 156,8
</tr>
EOM;
?>
</table>
</table>
</div>
</div>
</div>
</form>
</body>
</html>