예제 #1
0
    ?>
			</table>
                  </td>
                  <td class="listr" >
			<table border="0" cellpadding="0" cellspacing="2">
                        <?php 
    $poolfile = "{$g['tmp_path']}/{$vsent['name']}.pool";
    if (file_exists("{$poolfile}")) {
        $poolstatus = file_get_contents("{$poolfile}");
    }
    foreach ($a_pool as $vipent) {
        if ($vipent['name'] == $vsent['pool']) {
            foreach ((array) $vipent['servers'] as $server) {
                $lastchange = "";
                $monitorip = $server;
                $logstates = return_clog($slbd_logfile, $nentries, array("{$monitorip}", "marking"), true);
                $logstates = $logstates[0];
                if (stristr($logstates, $monitorip)) {
                    $date = preg_split("/[ ]+/", $logstates);
                    $lastchange = "{$date['0']} {$date['1']} {$year} {$date['2']}";
                }
                if (stristr($poolstatus, $monitorip)) {
                    $online = "Online";
                    $bgcolor = "lightgreen";
                    $change = $now - strtotime("{$lastchange}");
                    if ($change < 300) {
                        $bgcolor = "khaki";
                    }
                } else {
                    $online = "Offline";
                    $bgcolor = "lightcoral";
예제 #2
0
##|*IDENT=page-status-systemlogs-ipsecvpn
##|*NAME=Status: System logs: IPsec VPN page
##|*DESCR=Allow access to the 'Status: System logs: IPsec VPN' page.
##|*MATCH=diag_logs_ipsec.php*
##|-PRIV
require "guiconfig.inc";
require "ipsec.inc";
$ipsec_logfile = "{$g['varlog_path']}/ipsec.log";
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
    $nentries = 50;
}
if ($_POST['clear']) {
    clear_log_file($ipsec_logfile);
}
$ipsec_logarr = return_clog($ipsec_logfile, $nentries);
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("IPsec VPN"));
$shortcut_section = "ipsec";
include "head.inc";
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php 
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs ipsec">
 	<tr>
		<td>
<?php 
$tab_array = array();
$tab_array[] = array(gettext("System"), false, "diag_logs.php");
$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
예제 #3
0
##|+PRIV
##|*IDENT=page-status-systemlogs-ppp
##|*NAME=Status: System logs: IPsec VPN page
##|*DESCR=Allow access to the 'Status: System logs: IPsec VPN' page.
##|*MATCH=diag_logs_ppp.php*
##|-PRIV
require "guiconfig.inc";
$ppp_logfile = "{$g['varlog_path']}/ppp.log";
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
    $nentries = 50;
}
if ($_POST['clear']) {
    clear_log_file($ppp_logfile);
}
$ppp_logarr = return_clog($ppp_logfile, $nentries);
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("PPP"));
include "head.inc";
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php 
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 	<tr>
		<td>
<?php 
$tab_array = array();
$tab_array[] = array(gettext("System"), false, "diag_logs.php");
$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
$tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");