Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 355 → Rev 356

/web/acc/admin/network.php
8,7 → 8,8
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_network_title = "Configuration réseau";
$l_process_title = "État des services réseau pricipaux";
$l_main_services = "Services réseau pricipaux";
$l_opt_services = "Services réseau optionnels";
$l_eth0_legend = "Eth0 (Interface connectée à Internet)";
$l_eth1_legend = "Eth1 (Réseau de consultation)";
$l_internet_legend = "INTERNET";
30,14 → 31,17
$l_chilli = "Passerelle d'interception";
$l_dansguardian = "Filtre d'URL et de contenu WEB";
$l_mysqld = "Serveur de la base de données usager";
$l_squid = "Proxy Cache WEB";
$l_squid = "Serveur de cache WEB";
$l_dnsmasq = "Serveur DNS et filtre de domaine";
$l_httpd = "Serveur WEB (Centre de Gestion d'ALCASAR)";
$l_havp = "Filtre antivirus WEB";
$l_sshd = "Accès sécurisée à distance";
$l_freshclam = "Mise à jour de l'antivirus toutes les 2 heures";
$l_ntpd = "Service de mise à l'heure réseau";
} else {
$l_network_title = "Network configuration";
$l_process_title = "Main network processes state";
$l_main_services = "Main network services";
$l_opt_services = "Optional network services";
$l_eth0_legend = "Eth0 (Internet connected interface)";
$l_eth1_legend = "Eth1 (Private network)";
$l_internet_legend = "INTERNET";
64,6 → 68,8
$l_httpd = "WEB server (ALCASAR Control Center)";
$l_havp = "WEB antivirus filter";
$l_sshd = "Secure remote access";
$l_freshclam = "WEB antivirus update (every 2 hours)";
$l_ntpd = "Network time";
}
 
/********************************************************************
122,7 → 128,7
// Les actions sur un service
//-------------------------------
//sécurité sur les actions à réaliser
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","dnsmasq","httpd","havp","sshd");
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","dnsmasq","httpd","havp","sshd","freshclam","ntpd");
$autorizeAction = array("start","stop","restart");
 
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
134,17 → 140,21
//-------------------------------
//recherche du status des services
//-------------------------------
$serviceStatus = array();
$serviceStatus['radiusd'] = checkServiceStatus("radiusd","pid");
$serviceStatus['chilli'] = checkServiceStatus("chilli","pid");
$serviceStatus['dansguardian'] = checkServiceStatus("dansguardian","pid");
$serviceStatus['mysqld'] = checkServiceStatus("mysqld","OK");
$serviceStatus['squid'] = checkServiceStatus("squid","pid");
$serviceStatus['dnsmasq'] = checkServiceStatus("dnsmasq","pid");
$serviceStatus['httpd'] = checkServiceStatus("httpd","pid");
$serviceStatus['havp'] = checkServiceStatus("havp","pid");
$serviceStatus['sshd'] = checkServiceStatus("sshd","pid");
$MainServiceStatus = array();
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd","pid");
$MainServiceStatus['chilli'] = checkServiceStatus("chilli","pid");
$MainServiceStatus['dansguardian'] = checkServiceStatus("dansguardian","pid");
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld","OK");
$MainServiceStatus['squid'] = checkServiceStatus("squid","pid");
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq","pid");
$MainServiceStatus['httpd'] = checkServiceStatus("httpd","pid");
$MainServiceStatus['havp'] = checkServiceStatus("havp","pid");
 
$OptServiceStatus = array();
$OptServiceStatus['sshd'] = checkServiceStatus("sshd","pid");
$OptServiceStatus['freshclam'] = checkServiceStatus("freshclam","pid");
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd","pid");
 
// Fonction de test de connectivité internet
function internetTest(){
$host = "www.google.fr";
269,13 → 279,13
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $l_process_title; ?></th></tr>
<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>
<TR align="center">
<?php foreach( $serviceStatus as $serviceName => $statusOK ) { ?>
<?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>
294,5 → 304,31
<?php } ?>
</td></tr>
</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>
<TR align="center">
<?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 } ?>
</td></tr>
</table>
</body>
</html>
/web/acc/admin/auth_exceptions.php
124,7 → 124,8
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
$domain_list = substr($tampon,11,-1);
$domain_list_l = substr($tampon,10);
$domain_list = trim ($domain_list_l,"\"\n\t ");
$tab_domains = explode (",", $domain_list);
foreach ($tab_domains as $domain ){
if ($domain) { echo $domain."\n";}
151,8 → 152,9
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
$urls = substr($tampon,12,-1);
$tab_urls = explode (",", $urls);
$url_list_l = substr($tampon,11);
$url_list = trim ($url_list_l,"\"\n\t ");
$tab_urls = explode (",", $url_list);
foreach ($tab_urls as $url ){
if ($url) echo $url."\n";
}
197,8 → 199,9
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
$macs = substr($tampon,12,-1);
$tab_macs = explode (",", $macs);
$mac_list_l = substr($tampon,11);
$mac_list = trim ($mac_list_l,"\"\n\t ");
$tab_macs = explode (",", $mac_list);
foreach ($tab_macs as $macs ){
if ($macs) echo $macs."\n";
}
/web/acc/admin/filter_exceptions.php
101,7 → 101,7
$pointeur=fopen($filename,"r");
$tampon = fread($pointeur, filesize($filename));
fclose($pointeur);
echo $tampon;
echo trim ($tampon);
}
}
else
/web/acc/manager/htdocs/accounting.php
114,9 → 114,11
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Journal des connexions</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></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>
<?php
if(!$queryflag) {
echo <<<EOM
201,6 → 203,7
</tr>
</table>
</form>
</table>
</body>
</html>
EOM;
247,8 → 250,6
" ORDER BY $order " . da_sql_limit($maxresults,2,$config) . ";";
 
echo <<<EOM
<table border="0" width="100%" cellpadding="1" cellspacing="1">
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<p>
291,6 → 292,7
</table>
</td></tr>
</table>
</table>
</body>
</html>
EOM;