</div>
</div>
<?php 
} else {
    ?>
<div class="panel panel-default">
	<div class="panel-heading">
		<h2 class="panel-title">
<?php 
    print system_log_table_panel_title();
    ?>
		</h2>
	</div>
	<div class="panel-body">
		<pre><?php 
    $rows = dump_clog_no_table($logfile_path, $nentries, true, array($filtertext));
    ?>
</pre>

<script type="text/javascript">
//<![CDATA[
events.push(function() {
	$("#count").html(<?php 
    echo $rows;
    ?>
);
});
//]]>
</script>

<?php 
                $logtab = $package['name'];
            }
            if ($apkg == $package['name']) {
                $curtab = $logtab;
                $tab_array[] = array(sprintf(gettext("%s"), $logtab), true, "status_pkglogs.php?pkg=" . $package['name']);
            } else {
                $tab_array[] = array(sprintf(gettext("%s"), $logtab), false, "status_pkglogs.php?pkg=" . $package['name']);
            }
        }
    }
    display_top_tabs($tab_array);
    ?>

	<div class="panel panel-default">
		<div class="panel-heading"><h2 class="panel-title"><?php 
    echo sprintf(gettext('Last %1$s %2$s Log Entries'), $nentries, $curtab);
    ?>
</h2></div>
		<div class="panel-body">
			<pre>
<?php 
    $package = $config['installedpackages']['package'][$apkgid];
    dump_clog_no_table($g['varlog_path'] . '/' . $package['logging']['logfilename'], $nentries, true, array());
    ?>
			</pre>
		</div>
	</div>

<?php 
}
include "foot.inc";
    // dump_clog_vpn provides all the need <td></td>/<tr></tr> tags
    ?>
				</tbody>
			</table>
<?php 
    if ($rows == 0) {
        print_info_box('No logs to display');
    }
    ?>
		</div>
<?php 
} else {
    ?>
		<pre>
<?php 
    if (dump_clog_no_table("/var/log/{$logname}.log", $nentries) == 0) {
        print 'No logs to display';
    }
    ?>
		</pre>
<?php 
}
?>
		<form action="status_logs_vpn.php" method="post">
			<input type="hidden" name="vpntype" id="vpntype" value="<?php 
echo $vpntype;
?>
" />
			<input type="hidden" name="mode" id="mode" value="<?php 
echo $mode;
?>
Exemple #4
0
    print_info_box('Warning: Clearing the log file will restart the DHCP daemon.');
}
?>
<div class="panel panel-default">
	<div class="panel-heading"><h2 class="panel-title"><?php 
echo gettext("Last ");
echo $nentries;
?>
 <?php 
echo $logfile;
echo gettext(" log entries");
?>
</h2></div>
	<pre>
<?php 
if ($logfile == 'resolver' || $logfile == 'system') {
    $inverse = array("ppp");
} else {
    $inverse = null;
}
if ($filtertext) {
    dump_clog_no_table($system_logfile, $nentries, true, array("{$filtertext}"), $inverse);
} else {
    dump_clog_no_table($system_logfile, $nentries, true, array(), $inverse);
}
?>
	</pre>
</div>

<?php 
include "foot.inc";