diag: apply whitespace cleanups

This commit is contained in:
Franco Fichtner 2014-12-28 10:53:15 +01:00
parent 6001cb9a17
commit 8920d202a6
55 changed files with 1427 additions and 1428 deletions

View File

@ -253,7 +253,7 @@ function _getHostName($mac,$ip) {
exec("host -W 1 " . escapeshellarg($ip), $output);
if (preg_match('/.*pointer ([A-Za-z0-9.-]+)\..*/',$output[0],$matches)) {
if ($matches[1] <> $ip)
return $matches[1];
return $matches[1];
}
}
return "";
@ -266,7 +266,7 @@ include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<?php
@ -279,9 +279,9 @@ ob_implicit_flush(1);
// is to sort the list by hostnames, alpha and then the non
// resolvable addresses will appear last in the list.
$dnsavailable=1;
$dns = trim(_getHostName("", "8.8.8.8"));
$dns = trim(_getHostName("", "8.8.8.8"));
if ($dns == ""){
$dns = trim(_getHostName("", "8.8.4.4"));
$dns = trim(_getHostName("", "8.8.4.4"));
if ($dns == "") $dnsavailable =0;
}
@ -304,17 +304,17 @@ $mac_man = load_mac_manufacturer_table();
?>
<!-- row -->
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<div class="table-responsive">
<table class="table table-striped table-sort sortable">
<tr class="content-box-head">
<th>
@ -358,7 +358,7 @@ $mac_man = load_mac_manufacturer_table();
</table>
</th>
</tr>
<?php foreach ($data as $entry): ?>
<tr>
<td><?=$entry['ip'];?></td>
@ -371,21 +371,21 @@ $mac_man = load_mac_manufacturer_table();
<td><?php
echo trim(str_replace("Z_ ", "", $entry['dnsresolve']));
?></td>
<td><?=$hwif[$entry['interface']];?></td>
<td><?=$hwif[$entry['interface']];?></td>
</tr>
<?php endforeach; ?>
</table>
<div class="container-fluid"><?= gettext("NOTE: Local IPv6 peers use") ?> <a href="diag_ndp.php"><?= gettext("NDP") ?></a> <?= gettext("instead of ARP") ?>.</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include('foot.inc');?>
<?php include('foot.inc');?>

View File

@ -81,25 +81,25 @@ include("head.inc");
<form id="iform" name="iform" action="<?php echo $_SERVER['REQUEST_URI'];?>" method="post">
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors);?>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3>Test a server</h3>
</header>
<h3>Test a server</h3>
</header>
<div class="content-box-main">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Authentication Server"); ?></td>
<td><select name="authmode" id="authmode" class="form-control" >
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Authentication Server"); ?></td>
<td><select name="authmode" id="authmode" class="form-control" >
<?php
$auth_servers = auth_get_authserver_list();
foreach ($auth_servers as $auth_server):
@ -111,33 +111,33 @@ include("head.inc");
<?php endforeach; ?>
</select>
</td>
</tr>
<tr>
<td><?=gettext("Username"); ?></td>
<td><input type="text" class="form-control formfld unknown" size="20" id="username" name="username" value="<?=htmlspecialchars($pconfig['username']);?>"></td>
</tr>
<tr>
<td><?=gettext("Password"); ?></td>
<td><input type="password" class="form-control formfld pwd" size="20" id="password" name="password" value="<?=htmlspecialchars($pconfig['password']);?>"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input id="save" name="save" type="submit" class="btn btn-primary" value="<?=gettext("Test");?>" /></td>
</tr>
</tbody>
</table>
</tr>
<tr>
<td><?=gettext("Username"); ?></td>
<td><input type="text" class="form-control formfld unknown" size="20" id="username" name="username" value="<?=htmlspecialchars($pconfig['username']);?>"></td>
</tr>
<tr>
<td><?=gettext("Password"); ?></td>
<td><input type="password" class="form-control formfld pwd" size="20" id="password" name="password" value="<?=htmlspecialchars($pconfig['password']);?>"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input id="save" name="save" type="submit" class="btn btn-primary" value="<?=gettext("Test");?>" /></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
</form>
<?php include('foot.inc');?>
<?php include('foot.inc');?>

View File

@ -630,46 +630,46 @@ function backuparea_change(obj) {
<form action="diag_backup.php" method="post" name="iform" enctype="multipart/form-data">
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("Config History"), false, "diag_confbak.php");
$tab_array[1] = array(gettext("Backup/Restore"), true, "diag_backup.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid tab-content">
<div class="tab-pane active" id="system">
<div class="container-fluid tab-content">
<div class="tab-pane active" id="system">
<section class="__mb">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3>Backup configuration</h3>
</header>
<div class="content-box-main ">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><p><?=gettext("Click this button to download the system configuration in XML format."); ?><br /><br /> <?=gettext("Backup area:"); ?> <?php spit_out_select_items("backuparea", false); ?></p></td>
</tr>
<tr>
<td>
<table>
<h3>Backup configuration</h3>
</header>
<div class="content-box-main ">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><p><?=gettext("Click this button to download the system configuration in XML format."); ?><br /><br /> <?=gettext("Backup area:"); ?> <?php spit_out_select_items("backuparea", false); ?></p></td>
</tr>
<tr>
<td>
<table>
<tr>
<td width="25">
<input name="nopackages" type="checkbox" class="formcheckbox" id="nopackages" />
@ -715,40 +715,40 @@ function backuparea_change(obj) {
</td>
</tr>
</table>
<input name="Submit" type="submit" class="btn btn-default __mt" id="download" value="<?=gettext("Download configuration"); ?>" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section>
<div class="content-box">
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section>
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Restore configuration"); ?></h3>
</header>
<div class="content-box-main ">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><p><?=gettext("Open a"); ?> <?=$g['[product_name']?> <?=gettext("configuration XML file and click the button below to restore the configuration."); ?>
<h3><?=gettext("Restore configuration"); ?></h3>
</header>
<div class="content-box-main ">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><p><?=gettext("Open a"); ?> <?=$g['[product_name']?> <?=gettext("configuration XML file and click the button below to restore the configuration."); ?>
<br /><br />
<?=gettext("Restore area:"); ?> <?php spit_out_select_items("restorearea", true); ?></p></td>
</tr>
<tr>
<td>
</tr>
<tr>
<td>
<p><input name="conffile" type="file" class="formbtn" id="conffile" size="40" /></p>
<table>
<tr>
@ -780,36 +780,36 @@ function backuparea_change(obj) {
</table>
<p><input name="Submit" type="submit" class="btn btn-default" id="restore" value="<?=gettext("Restore configuration"); ?>" /></p>
<p><strong><span class="red"><?=gettext("Note:"); ?></span></strong><br /><?=gettext("The firewall will reboot after restoring the configuration."); ?><br /></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<?php if (($config['installedpackages']['package'] != "") || (is_subsystem_dirty("packagelock"))) { ?>
<section>
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Package Functions"); ?></h3>
</header>
<div class="content-box-main col-xs-12">
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<td>
<h3><?=gettext("Package Functions"); ?></h3>
</header>
<div class="content-box-main col-xs-12">
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<td>
<?php if ($config['installedpackages']['package'] != "") { ?>
<p><?=gettext("Click this button to reinstall all system packages. This may take a while."); ?> <br /><br />
<input name="Submit" type="submit" class="formbtn" id="reinstallpackages" value="<?=gettext("Reinstall packages"); ?>" />
@ -820,26 +820,26 @@ function backuparea_change(obj) {
<p><?=gettext("Click this button to clear the package lock if a package fails to reinstall properly after an upgrade."); ?> <br /><br />
<input name="Submit" type="submit" class="formbtn" id="clearpackagelock" value="<?=gettext("Clear Package Lock"); ?>" />
<?php } ?>
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<? } ?>
</div>
</div>
</div>
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<? } ?>
</div>
</div>
</div>
</section>
</div>
</div>

View File

@ -117,13 +117,13 @@ include("head.inc");
if($savemsg)
print_info_box($savemsg);
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[0] = array(gettext("Config History"), true, "diag_confbak.php");
@ -131,25 +131,25 @@ include("head.inc");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid tab-content">
<div class="tab-pane active" id="system">
<div class="tab-content content-box col-xs-12">
<div class="container-fluid tab-content">
<div class="tab-pane active" id="system">
<?php if ($diff): ?>
<section class="__mb">
<div classs="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Configuration diff from");?> <?php echo date(gettext("n/j/y H:i:s"), $oldtime); ?> <?=gettext("to");?> <?php echo date(gettext("n/j/y H:i:s"), $newtime); ?></h3>
</header>
<div class="content-box-main">
<div class="table-responsive">
<h3><?=gettext("Configuration diff from");?> <?php echo date(gettext("n/j/y H:i:s"), $oldtime); ?> <?=gettext("to");?> <?php echo date(gettext("n/j/y H:i:s"), $newtime); ?></h3>
</header>
<div class="content-box-main">
<div class="table-responsive">
<table summary="diag confbak">
<tr><td></td></tr>
<?php foreach ($diff as $line) {
@ -172,25 +172,25 @@ include("head.inc");
</tr>
<?php } ?>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
<?php endif; ?>
<?PHP if ($_GET["newver"] || $_GET["rmver"]): ?>
<?PHP if ($_GET["newver"] || $_GET["rmver"]): ?>
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post">
<section>
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?PHP echo gettext("Confirm Action"); ?></h3>
</header>
<div class="content-box-main col-xs-12">
<strong><?PHP echo gettext("Please confirm the selected action"); ?></strong>:
<h3><?PHP echo gettext("Confirm Action"); ?></h3>
</header>
<div class="content-box-main col-xs-12">
<strong><?PHP echo gettext("Please confirm the selected action"); ?></strong>:
<br />
<br /><strong><?PHP echo gettext("Action"); ?>:</strong>
<?PHP if (!empty($_GET["newver"])) {
@ -204,61 +204,61 @@ include("head.inc");
<?PHP } ?>
<br /><strong><?PHP echo gettext("Target Configuration"); ?>:</strong>
<?PHP echo sprintf(gettext('Timestamp %1$s'), date(gettext("n/j/y H:i:s"), $target_config)); ?>
<br /><input type="submit" name="confirm" class="btn btn-primary" value="<?PHP echo gettext("Confirm"); ?>" />
</div>
<br /><input type="submit" name="confirm" class="btn btn-primary" value="<?PHP echo gettext("Confirm"); ?>" />
</div>
</div>
</section>
</form>
<? else: ?>
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post">
<section style="margin-bottom:15px;">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3>Config history</h3>
</header>
<div class="content-box-main">
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<td><?=gettext("Backup Count");?></td>
<td><input name="backupcount" type="text" class="formfld unknown" size="5" value="<?=htmlspecialchars($config['system']['backupcount']);?>"/></td>
<td><?= gettext("Enter the number of older configurations to keep in the local backup cache. By default this is 30 for a full install or 5 on NanoBSD."); ?></td>
<td><input name="save" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" /></td>
</tr>
</tbody>
</table>
<div class="container-fluid">
<?= gettext("NOTE: Be aware of how much space is consumed by backups before adjusting this value. Current space used by backups: "); ?> <?= exec("/usr/bin/du -sh /conf/backup | /usr/bin/awk '{print $1;}'") ?>
</div>
</div>
</div>
<h3>Config history</h3>
</header>
<div class="content-box-main">
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<td><?=gettext("Backup Count");?></td>
<td><input name="backupcount" type="text" class="formfld unknown" size="5" value="<?=htmlspecialchars($config['system']['backupcount']);?>"/></td>
<td><?= gettext("Enter the number of older configurations to keep in the local backup cache. By default this is 30 for a full install or 5 on NanoBSD."); ?></td>
<td><input name="save" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" /></td>
</tr>
</tbody>
</table>
<div class="container-fluid">
<?= gettext("NOTE: Be aware of how much space is consumed by backups before adjusting this value. Current space used by backups: "); ?> <?= exec("/usr/bin/du -sh /conf/backup | /usr/bin/awk '{print $1;}'") ?>
</div>
</div>
</div>
</div>
</section>
</form>
<?php if (is_array($confvers)): ?>
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="get">
<section>
<div class="content-box">
<div class="content-box-main">
<div class="container-fluid __mb">
<?= gettext("To view the differences between an older configuration and a newer configuration, select the older configuration using the left column of radio options and select the newer configuration in the right column, then press the Diff button."); ?>
</div>
<table class="table table-striped table-sort" summary="difference">
<thead>
<thead>
<tr>
<td colspan="2" valign="middle" class="list nowrap"><?=gettext("Diff");?></td>
<td class="listhdrr"><?=gettext("Date");?></td>
@ -304,36 +304,36 @@ include("head.inc");
<td class="listr"> <?= $version['version'] ?></td>
<td class="listr"> <?= format_bytes($version['filesize']) ?></td>
<td class="listr"> <?= substr($version['description'],0,50) ?></td>
<td class="btn-group-table">
<a href="diag_confbak.php?newver=<?=$version['time'];?>" class="btn btn-default btn-xs" title="<?=gettext("Revert to this configuration");?>"><span class="glyphicon glyphicon-log-in"></span></a>
<a href="diag_confbak.php?rmver=<?=$version['time'];?>" class="btn btn-default btn-xs" title="<?=gettext("Remove this backup");?>" ><span class="glyphicon glyphicon-remove"></span></a>
<a href="diag_confbak.php?getcfg=<?=$version['time'];?>" class="btn btn-default btn-xs" title="<?=gettext("Download this backup");?>"><span class="glyphicon glyphicon-download"></span></a>
</td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
</tbody>
</table>
<div class="container-fluid">
<input type="submit" name="diff" class="btn btn-primary" value="<?=gettext("Diff"); ?>" />
</div>
</div>
</section>
</div>
</div>
</section>
</form>
<? endif; endif; ?>
</div>
</div>
</section>
</div>
</div>
</section>
</div>
</div>
</section>
@ -341,4 +341,4 @@ include("head.inc");
<?php include("foot.inc"); ?>

View File

@ -47,7 +47,7 @@ include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
@ -79,16 +79,16 @@ include("head.inc");
<li><?=gettext("webConfigurator admin password will be reset to");?> '<?=$g['factory_shipped_password']?>'</li>
</ul>
<p><strong><?=gettext("Are you sure you want to proceed?");?></strong></p>
<div class="btn-group">
<input type="submit" name="Submit" class="btn btn-primary" value="<?=gettext("Yes");?>" />
<a href="/" class="btn btn-default"><?=gettext("No");?></a>
</div>
<br /><br />
</form>
<?php endif; ?>
</section>
</div>
@ -96,4 +96,4 @@ include("head.inc");
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -63,21 +63,21 @@ if(isset($_POST['create_alias']) && (is_hostname($host) || is_ipaddr($host))) {
$isfirst = true;
foreach($resolved as $re) {
if($re <> "") {
if(!$isfirst)
if(!$isfirst)
$addresses .= " ";
$addresses .= rtrim($re) . "/32";
$isfirst = false;
}
}
$newalias = array();
if($override)
if($override)
$alias_exists = false;
if($alias_exists == false) {
$newalias['name'] = $aliasname;
$newalias['type'] = "network";
$newalias['address'] = $addresses;
$newalias['descr'] = "Created from Diagnostics-> DNS Lookup";
if($override)
if($override)
$a_aliases[$id] = $newalias;
else
$a_aliases[] = $newalias;
@ -94,7 +94,7 @@ if ($_POST) {
$reqdfieldsn = explode(",", "Host");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if (!is_hostname($host) && !is_ipaddr($host)) {
$input_errors[] = gettext("Host must be a valid hostname or IP address.");
} else {
@ -172,31 +172,31 @@ include("head.inc"); ?>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" name="iform" id="iform">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" name="iform" id="iform">
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<header class="content-box-head container-fluid">
<h3><?=gettext("Resolve DNS hostname or IP");?></h3>
</header>
<div class="content-box-main">
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<td><?=gettext("Hostname or IP");?></td>
<td><?=$mandfldhtml;?><input name="host" type="text" class="form-control" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
<?php if ($resolved && $type): ?>
<td>
<?php
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<td><?=gettext("Hostname or IP");?></td>
<td><?=$mandfldhtml;?><input name="host" type="text" class="form-control" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
<?php if ($resolved && $type): ?>
<td>
<?php
$found = 0;
if(is_array($resolved)) {
if(is_array($resolved)) {
foreach($resolved as $hostitem) {
if($hostitem <> "") {
echo $hostitem . "<br />";
@ -204,38 +204,38 @@ include("head.inc"); ?>
}
}
} else {
echo $resolved;
}
echo $resolved;
}
?>
</td>
<td>
<? if($found > 0): ?>
</td>
<td>
<? if($found > 0): ?>
<?PHP if($alias_exists): ?>
An alias already exists for the hostname <?= htmlspecialchars($host) ?>. <br />
<input type="hidden" name="override" value="true"/>
<input type="submit" class="btn btn-default" name="create_alias" value="Overwrite Alias"/>
<?php else: ?>
<?php if(!$createdalias): ?>
<input type="submit" class="btn btn-default" name="create_alias" value="Create Alias"/>
<input type="submit" class="btn btn-default" name="create_alias" value="Create Alias"/>
<?php else: ?>
Alias created with name <?= htmlspecialchars($newalias['name']) ?>
<? endif; endif; endif; ?>
</td>
<? else: ?>
<td></td><td></td>
<? endif; ?>
</tr>
<?php if (!empty($_POST)): ?>
<tr>
<td><?=gettext("Resolution time per server");?></td>
<td colspan="3">
<table class="table table-striped">
<tr>
<th><?=gettext("Server");?></th>
<th><?=gettext("Query time");?></th>
</tr>
<?php if(is_array($dns_speeds)): foreach($dns_speeds as $qt): ?>
<? else: ?>
<td></td><td></td>
<? endif; ?>
</tr>
<?php if (!empty($_POST)): ?>
<tr>
<td><?=gettext("Resolution time per server");?></td>
<td colspan="3">
<table class="table table-striped">
<tr>
<th><?=gettext("Server");?></th>
<th><?=gettext("Query time");?></th>
</tr>
<?php if(is_array($dns_speeds)): foreach($dns_speeds as $qt): ?>
<tr>
<td>
<?=$qt['dns_server']?>
@ -245,14 +245,14 @@ include("head.inc"); ?>
</td>
</tr>
<?php endforeach; endif; ?>
</table>
</td>
</tr>
<?php endif; ?>
<?php if (!$input_errors && $ipaddr): ?>
<tr>
<td><?=gettext("More Information:");?></td>
<td colspan="3"><a href ="/diag_ping.php?host=<?=htmlspecialchars($host)?>&amp;interface=wan&amp;count=3"><?=gettext("Ping");?></a> <br />
</table>
</td>
</tr>
<?php endif; ?>
<?php if (!$input_errors && $ipaddr): ?>
<tr>
<td><?=gettext("More Information:");?></td>
<td colspan="3"><a href ="/diag_ping.php?host=<?=htmlspecialchars($host)?>&amp;interface=wan&amp;count=3"><?=gettext("Ping");?></a> <br />
<a href ="/diag_traceroute.php?host=<?=htmlspecialchars($host)?>&amp;ttl=18"><?=gettext("Traceroute");?></a>
<p>
<?=gettext("NOTE: The following links are to external services, so their reliability cannot be guaranteed.");?><br /><br />
@ -260,21 +260,21 @@ include("head.inc"); ?>
<a target="_blank" href="http://private.dnsstuff.com/tools/ipall.ch?ip=<?php echo $ipaddr; ?>"><?=gettext("IP Info @ DNS Stuff");?></a>
</p>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<div class="container-fluid">
<input type="submit" class="btn btn-primary btn-fixed pull-right" value="<?=gettext("DNS Lookup");?>" />
</div>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<div class="container-fluid">
<input type="submit" class="btn btn-primary btn-fixed pull-right" value="<?=gettext("DNS Lookup");?>" />
</div>
</div>
</div>
</section>
</div>
</div>
</section>
</section>

View File

@ -119,11 +119,11 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[0] = array(gettext("States"), true, "diag_dump_states.php");
@ -131,41 +131,41 @@ include("head.inc");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<form action="<?=$_SERVER['SCRIPT_NAME'];?>" method="post" name="iform">
<form action="<?=$_SERVER['SCRIPT_NAME'];?>" method="post" name="iform">
<?php
$current_statecount=`pfctl -si | grep "current entries" | awk '{ print $3 }'`;
?>
<table class="table table-striped">
<tbody>
<tr>
<td><?=gettext("Current total state count");?>: <?= $current_statecount ?></td>
<td><?=gettext("Filter expression:");?></td>
<td><input type="text" name="filter" class="form-control search" value="<?=htmlspecialchars($_POST['filter']);?>" size="30" /></td>
<td> <input type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
<tbody>
<tr>
<td><?=gettext("Current total state count");?>: <?= $current_statecount ?></td>
<td><?=gettext("Filter expression:");?></td>
<td><input type="text" name="filter" class="form-control search" value="<?=htmlspecialchars($_POST['filter']);?>" size="30" /></td>
<td> <input type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
<?php if (isset($_POST['filter']) && (is_ipaddr($_POST['filter']) || is_subnet($_POST['filter']))): ?>
<input type="submit" class="btn" name="killfilter" value="<?=gettext("Kill");?>" />
<?php endif; ?>
</td>
</tr>
</tbody>
</table>
<?php endif; ?>
</td>
</tr>
</tbody>
</table>
</form>
<div class="container-fluid tab-content">
<div class="tab-pane active" id="system">
<div class="content-box">
<div class="container-fluid tab-content">
<div class="tab-pane active" id="system">
<div class="content-box">
<div class="table-responsive">
<table class="table table-striped table-sort sortable __nomb">
<tr class="content-box-head">
<th>
@ -209,7 +209,7 @@ include("head.inc");
</table>
</th>
<th></th>
</tr>
</tr>
<?php
$row = 0;
/* get our states */
@ -218,24 +218,24 @@ include("head.inc");
while ($line = chop(fgets($fd))) {
if($row >= 10000)
break;
$line_split = preg_split("/\s+/", $line);
$iface = array_shift($line_split);
$proto = array_shift($line_split);
$state = array_pop($line_split);
$info = implode(" ", $line_split);
// We may want to make this optional, with a large state table, this could get to be expensive.
$iface = convert_real_interface_to_friendly_descr($iface);
/* break up info and extract $srcip and $dstip */
$ends = preg_split("/\<?-\>?/", $info);
$parts = explode(":", $ends[0]);
$srcip = trim($parts[0]);
$parts = explode(":", $ends[count($ends) - 1]);
$dstip = trim($parts[0]);
?>
<tr id="r:<?= $srcip ?>:<?= $dstip ?>">
<td class="listlr"><?= $iface ?></td>
@ -244,15 +244,15 @@ include("head.inc");
<td class="listr"><?= $state ?></td>
<td class="list">
<a href="#" onclick="removeState('<?= $srcip ?>', '<?= $dstip ?>');" name="i:<?= $srcip ?>:<?= $dstip ?>" class="btn btn-default" title="<?= gettext('Remove all state entries from') ?> <?= $srcip ?> <?= gettext('to') ?> <?= $dstip ?>"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
<?php
$row++;
ob_flush();
}
if ($row == 0): ?>
<tr>
<td class="list" colspan="5" align="center" valign="top">
@ -262,18 +262,18 @@ include("head.inc");
<?php endif;
pclose($fd);
?>
</table>
</table>
<?php if (isset($_POST['filter']) && !empty($_POST['filter'])): ?>
<div class="col-xs-12"><p><?=gettext("States matching current filter")?>: <?= $row ?></p></div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
@ -281,4 +281,4 @@ include("head.inc");
</section>
<?php include('foot.inc');?>
<?php include('foot.inc');?>

View File

@ -28,7 +28,7 @@
*/
/*
pfSense_BUILDER_BINARIES: /sbin/pfctl
pfSense_BUILDER_BINARIES: /sbin/pfctl
pfSense_MODULE: filter
*/

View File

@ -1,4 +1,4 @@
<?php
<?php
/*
Copyright (C) 2014 Deciso B.V.
All rights reserved.
@ -26,4 +26,4 @@
*/
?>
<? include("edit.php"); ?>
<? include("edit.php"); ?>

View File

@ -1,4 +1,4 @@
<?php
<?php
/*
Copyright (C) 2014 Deciso B.V.
All rights reserved.
@ -26,4 +26,4 @@
*/
?>
<? include("exec.php"); ?>
<? include("exec.php"); ?>

View File

@ -105,7 +105,7 @@ if ($_POST) {
$input_errors[] = gettext("Consumer is already present on specified mirror.");
if (!gmirror_consumer_has_metadata($_POST['consumer']))
$input_errors[] = gettext("Consumer has no metadata and cannot be reactivated.");
break;
case "remove":
case "deactivate":
@ -166,35 +166,35 @@ foreach ($unused_disks as $disk) {
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="row">
<?
if ($input_errors)
print_input_errors($input_errors);
if ($_GET["error"] && ($_GET["error"] != 0))
print_info_box(gettext("There was an error performing the chosen mirror operation. Check the System Log for details."));
?>
<section class="col-xs-12">
<div class="content-box">
<form action="diag_gmirror.php" method="post" name="iform" id="iform">
<div class="col-xs-12">
<p class="vexpl">
<div class="content-box">
<form action="diag_gmirror.php" method="post" name="iform" id="iform">
<div class="col-xs-12">
<p class="vexpl">
<br/><span class="text-danger">
<strong><?=gettext("NOTE:")?>&nbsp;</strong>
</span>
<?=gettext("The options on this page are intended for use by advanced users only. This page is for managing existing mirrors, not creating new mirrors.")?>
<br />
</p>
</div>
<div class="table-responsive">
<table class="table table-striped table-sort">
</div>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?PHP if ($_GET["action"]): ?>
<tr>
<td colspan="2" valign="top" class="listtopic"><?PHP echo gettext("Confirm Action"); ?></td>
@ -222,11 +222,11 @@ foreach ($unused_disks as $disk) {
<tr>
<td colspan="2" valign="top" class="listtopic"><?PHP echo gettext("GEOM Mirror information"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?PHP echo gettext("Mirror Status"); ?></td>
<td width="78%" class="vtable">
<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="gmirror status">
<tbody id="gmirror_status_table">
<?PHP if (count($mirror_status) > 0): ?>
@ -235,7 +235,7 @@ foreach ($unused_disks as $disk) {
<td width="30%" class="vncellt"><?PHP echo gettext("Status"); ?></td>
<td width="40%" class="vncellt"><?PHP echo gettext("Component"); ?></td>
</tr>
<?PHP foreach ($mirror_status as $mirror => $name):
<?PHP foreach ($mirror_status as $mirror => $name):
$components = count($name["components"]); ?>
<tr>
<td width="30%" rowspan="<?PHP echo $components; ?>" class="listr">
@ -285,15 +285,15 @@ foreach ($unused_disks as $disk) {
<br /><?PHP echo gettext("Some disk operations may only be performed when there are multiple consumers present in a mirror."); ?>
</td>
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic"><?PHP echo gettext("Consumer information"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?PHP echo gettext("Available Consumers"); ?></td>
<td width="78%" class="vtable">
<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="consumer list">
<tbody id="consumer_list">
<?PHP if (count($unused_consumers) > 0): ?>
@ -344,7 +344,7 @@ foreach ($unused_disks as $disk) {
</table>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
@ -358,4 +358,3 @@ echo "</script>";
?>
<?php require("foot.inc"); ?>

View File

@ -1,4 +1,4 @@
<?php
<?php
/*
Copyright (C) 2014 Deciso B.V.
All rights reserved.
@ -26,4 +26,4 @@
*/
?>
<? include("halt.php"); ?>
<? include("halt.php"); ?>

View File

@ -84,19 +84,19 @@ $status = ipsec_smp_dump_status();
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_ipsec.php"; include('diag_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<? $active_tab = "/diag_ipsec.php"; include('diag_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<thead>
<tr>
@ -119,7 +119,7 @@ $status = ipsec_smp_dump_status();
foreach ($status['query']['ikesalist']['ikesa'] as $ikeid => $ikesa) {
$con_id = substr($ikesa['peerconfig'], 3);
$ipsecconnected[$con_id] = $con_id;
if (ipsec_phase1_status($status['query']['ikesalist']['ikesa'], $ikesa['id'])) {
$icon = "pass";
} elseif(!isset($config['ipsec']['enable'])) {
@ -170,7 +170,7 @@ $status = ipsec_smp_dump_status();
else
$identity = htmlspecialchars($ikesa['remote']['identification']);
}
if (is_array($ikesa['remote']['auth']) && !empty($ikesa['remote']['auth'][0]['identity'])) {
echo htmlspecialchars($ikesa['remote']['auth'][0]['identity']);
echo "<br/>{$identity}";
@ -200,7 +200,7 @@ $status = ipsec_smp_dump_status();
IKEv<?php echo htmlspecialchars($ikesa['version']);?>
<br/>
<?php echo htmlspecialchars($ikesa['role']);?>
</td>
<td class="listr">
<?php echo htmlspecialchars($ikesa['reauth']);?>
@ -300,7 +300,7 @@ $status = ipsec_smp_dump_status();
echo "Rekey: " . htmlspecialchars($childsa['rekey']);
echo "<br/>Life: " . htmlspecialchars($childsa['lifetime']);
echo "<br/>Install: " .htmlspecialchars($childsa['installtime']);
?>
</td>
<td class="listr nowrap">
@ -348,12 +348,12 @@ $status = ipsec_smp_dump_status();
</table>
</td>
</tr>
<?php endif;
<?php endif;
unset($con_id);
}
}
$rgmap = array();
foreach ($a_phase1 as $ph1ent):
$rgmap[$ph1ent['remote-gateway']] = $ph1ent['remote-gateway'];
@ -431,7 +431,7 @@ $status = ipsec_smp_dump_status();
<tr style="display:none;"><td></td></tr>
</tbody>
</table>
<div class="container-fluid">
<p class="vexpl">
<span class="text-danger">
@ -440,16 +440,16 @@ $status = ipsec_smp_dump_status();
<?php echo gettext("You can configure IPsec");?>
<a href="vpn_ipsec.php">here</a>.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<script type="text/javascript">
@ -461,4 +461,4 @@ function show_childsa(id, buttonid) {
}
//]]>
</script>
<?php unset($status); include("foot.inc"); ?>
<?php unset($status); include("foot.inc"); ?>

View File

@ -54,21 +54,21 @@ $mobile = ipsec_dump_mobile();
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_ipsec_leases.php"; include('diag_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $active_tab = "/diag_ipsec_leases.php"; include('diag_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<div class="table-responsive">
<?php if (isset($mobile['pool']) && is_array($mobile['pool'])): ?>
<?php foreach($mobile['pool'] as $pool): ?>
<table class="table table-striped table-sort">
@ -110,16 +110,16 @@ $mobile = ipsec_dump_mobile();
<p><strong><?=gettext("No IPsec pools.");?></strong></p>
<?php endif; ?>
</div>
<p class="vexpl">
<span class="text-danger"><strong><?=gettext("Note:");?><br /></strong></span>
<?=gettext("You can configure your IPsec");?> <a href="vpn_ipsec.php"><?=gettext("here.");?></a>
</p>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -56,19 +56,19 @@ $sad = ipsec_dump_sad();
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_ipsec_sad.php"; include('diag_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<? $active_tab = "/diag_ipsec_sad.php"; include('diag_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php if (count($sad)): ?>
<tr>
@ -102,17 +102,17 @@ $sad = ipsec_dump_sad();
</tr>
<?php endif; ?>
</table>
<div class="container-fluid">
<p class="vexpl">
<span class="text-danger"><strong><?=gettext("Note:");?><br /></strong></span>
<?=gettext("You can configure your IPsec");?> <a href="vpn_ipsec.php"><?=gettext("here.");?></a>
</p>
</div>
</div>
</div>
</div>
</section>
</div>
@ -120,4 +120,4 @@ $sad = ipsec_dump_sad();
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -55,20 +55,20 @@ $spd = ipsec_dump_spd();
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_ipsec_spd.php"; include('diag_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<? $active_tab = "/diag_ipsec_spd.php"; include('diag_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort __nomb">
<?php if (count($spd)): ?>
<tr>
@ -120,13 +120,13 @@ $spd = ipsec_dump_spd();
<?php endif; ?>
</table>
</div>
<div class="container-fluid">
<p class="vexpl">
<span class="text-danger"><strong><?= gettext("Note:"); ?><br /></strong></span>
<?= gettext("You can configure your IPsec"); ?> <a href="vpn_ipsec.php"><?= gettext("here."); ?></a>
</p>
</div>
</div>
</div>
</section>
</div>

View File

@ -31,4 +31,4 @@
$tab_array[3] = array(gettext("SPD"), $_SERVER['PHP_SELF'] == '/diag_ipsec_spd.php', "diag_ipsec_spd.php");
$tab_array[4] = array(gettext("Logs"), $_SERVER['PHP_SELF'] == '/diag_logs_ipsec.php', "diag_logs_ipsec.php");
display_top_tabs($tab_array);
?>
?>

View File

@ -46,7 +46,7 @@ $shortcut_section = "trafficshaper-limiters";
if($_REQUEST['getactivity']) {
$text = `/sbin/ipfw pipe show`;
if($text == "")
if($text == "")
$text = "We could not find any limiters on this system.";
echo "Limiters:\n";
echo $text;
@ -95,12 +95,12 @@ include("head.inc");
if($savemsg) {
echo "<div id=\"savemsg\">";
print_info_box($savemsg);
echo "</div>";
echo "</div>";
}
if ($input_errors)
print_input_errors($input_errors);
?>
<div id="limiteractivitydiv">
<?=gettext("Gathering Limiter information, please wait...");?>
</div>
@ -110,4 +110,4 @@ include("head.inc");
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: system
*/
@ -47,7 +47,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($system_logfile);
if ($_GET['filtertext'])
@ -69,51 +69,51 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? include('diag_logs_pills.php'); ?>
</div>
</div>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php
<table class="table table-striped table-sort">
<?php
if($filtertext)
dump_clog($system_logfile, $nentries, true, array("$filtertext"), array("ppp"));
else
dump_clog($system_logfile, $nentries, true, array(), array("ppp"));
?>
</table>
</table>
</div>
<div class="container-fluid">
<form action="diag_logs.php" method="post">
<input name="clear" type="submit" class="btn btn-default" value="<?= gettext("Clear log");?>" />
</form>
<form id="clearform" name="clearform" action="diag_logs.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -27,7 +27,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: captiveportal
*/
@ -46,7 +46,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($portal_logfile);
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Portal Auth"));
@ -60,32 +60,32 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s Portal Auth log entries"),$nentries);?></p>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s Portal Auth log entries"),$nentries);?></p>
<pre> <?php dump_clog($portal_logfile, $nentries, true); ?></pre>
<form action="diag_logs_auth.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: dhcpserver
*/
@ -63,32 +63,32 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s DHCP service log entries"), $nentries);?></p>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s DHCP service log entries"), $nentries);?></p>
<pre> <?php dump_clog($dhcpd_logfile, $nentries); ?></pre>
<form action="diag_logs_dhcp.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
<p>NOTE: Clearing the log file will restart the DHCP daemon.</p>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -29,7 +29,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: filter
*/
@ -47,12 +47,12 @@ require_once("filter_log.inc");
if (isset($_POST['resolve'])) {
$ip = strtolower($_POST['resolve']);
$res = (is_ipaddr($ip) ? gethostbyaddr($ip) : '');
if ($res && $res != $ip)
$response = array('resolve_ip' => $ip, 'resolve_text' => $res);
else
$response = array('resolve_ip' => $ip, 'resolve_text' => gettext("Cannot resolve"));
echo json_encode(str_replace("\\","\\\\", $response)); // single escape chars can break JSON decode
exit;
}
@ -130,79 +130,79 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_logs_filter.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $active_tab = "/diag_logs_filter.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $tab_group = 'firewall'; include('diag_logs_pills.php'); ?>
<form id="filterlogentries" name="filterlogentries" action="diag_logs_filter.php" method="post">
<?php
<?php
$Include_Act = explode(",", str_replace(" ", ",", $filterfieldsarray['act']));
if ($filterfieldsarray['interface'] == "All") $interface = "";
?>
<div class="table-responsive widgetconfigdiv" id="filterlogentries_show" style="<?=(!isset($config['syslog']['rawfilter']))?"":"display:none"?>">
<table class="table table-striped">
<thead>
<tr>
<th>Action</th>
<th>Time and interface</th>
<th>Source and destination IP Address</th>
<th>Source and destination port</th>
<th>Protocol</th>
<th>Protocol</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<label class="__nowrap">
<thead>
<tr>
<th>Action</th>
<th>Time and interface</th>
<th>Source and destination IP Address</th>
<th>Source and destination port</th>
<th>Protocol</th>
<th>Protocol</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<label class="__nowrap">
<input id="actpass" name="actpass" type="checkbox" value="Pass" <?php if (in_arrayi('Pass', $Include_Act)) echo "checked=\"checked\""; ?> />&nbsp;&nbsp;Pass
</label>
</td>
<td><input type="text" class="form-control" placeholder="Time" id="filterlogentries_time" name="filterlogentries_time" value="<?= $filterfieldsarray['time'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Source IP Address" id="filterlogentries_sourceipaddress" name="filterlogentries_sourceipaddress" value="<?= $filterfieldsarray['srcip'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Source Port" id="filterlogentries_sourceport" name="filterlogentries_sourceport" value="<?= $filterfieldsarray['srcport'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Protocol" id="filterlogentries_protocol" name="filterlogentries_protocol" value="<?= $filterfieldsarray['proto'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Quantity" id="filterlogentries_qty" name="filterlogentries_qty" value="<?= $filterlogentries_qty ?>"></td>
</tr>
<tr>
<td>
<label class="__nowrap">
<td><input type="text" class="form-control" placeholder="Time" id="filterlogentries_time" name="filterlogentries_time" value="<?= $filterfieldsarray['time'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Source IP Address" id="filterlogentries_sourceipaddress" name="filterlogentries_sourceipaddress" value="<?= $filterfieldsarray['srcip'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Source Port" id="filterlogentries_sourceport" name="filterlogentries_sourceport" value="<?= $filterfieldsarray['srcport'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Protocol" id="filterlogentries_protocol" name="filterlogentries_protocol" value="<?= $filterfieldsarray['proto'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Quantity" id="filterlogentries_qty" name="filterlogentries_qty" value="<?= $filterlogentries_qty ?>"></td>
</tr>
<tr>
<td>
<label class="__nowrap">
<input id="actblock" name="actblock" type="checkbox" value="Block" <?php if (in_arrayi('Block', $Include_Act)) echo "checked=\"checked\""; ?> /> &nbsp;&nbsp;Block
</label>
</td>
<td><input type="text" class="form-control" placeholder="Interface" id="filterlogentries_interfaces" name="filterlogentries_interfaces" value="<?= $filterfieldsarray['interface'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Destination IP Address" id="filterlogentries_destinationipaddress" name="filterlogentries_destinationipaddress" value="<?= $filterfieldsarray['dstip'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Destination Port" id="filterlogentries_destinationport" name="filterlogentries_destinationport" value="<?= $filterfieldsarray['dstport'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Protocol Flags" id="filterlogentries_protocolflags" name="filterlogentries_protocolflags" value="<?= $filterfieldsarray['tcpflags'] ?>"></td>
<td><input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" style="vertical-align:top;" value="<?=gettext("Filter");?>" /></td>
</tr>
</tbody>
</table>
<td><input type="text" class="form-control" placeholder="Interface" id="filterlogentries_interfaces" name="filterlogentries_interfaces" value="<?= $filterfieldsarray['interface'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Destination IP Address" id="filterlogentries_destinationipaddress" name="filterlogentries_destinationipaddress" value="<?= $filterfieldsarray['dstip'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Destination Port" id="filterlogentries_destinationport" name="filterlogentries_destinationport" value="<?= $filterfieldsarray['dstport'] ?>"></td>
<td><input type="text" class="form-control" placeholder="Protocol Flags" id="filterlogentries_protocolflags" name="filterlogentries_protocolflags" value="<?= $filterfieldsarray['tcpflags'] ?>"></td>
<td><input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" style="vertical-align:top;" value="<?=gettext("Filter");?>" /></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
</div>
</section>
<!--
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<!--
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<div id="filterform_show" class="widgetconfigdiv" style="<?=(!isset($config['syslog']['rawfilter']))?"display:none":""?>">
<form id="filterform" name="filterform" action="diag_logs_filter.php" method="post">
<table width="0%" border="0" cellpadding="0" cellspacing="0" summary="firewall log">
@ -212,31 +212,31 @@ include("head.inc");
<div align="center" style="vertical-align:top;">
<select name="interface" onchange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
<option value="" <?=$interfacefilter?"":"selected=\"selected\""?>>*Any interface</option>
<?php
<?php
$iflist = get_configured_interface_with_descr(false, true);
//$iflist = get_interface_list();
// Allow extending of the firewall edit interfaces
// Allow extending of the firewall edit interfaces
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
foreach ($iflist as $if => $ifdesc)
$interfaces[$if] = $ifdesc;
if ($config['l2tp']['mode'] == "server")
$interfaces['l2tp'] = "L2TP VPN";
if ($config['pptpd']['mode'] == "server")
$interfaces['pptp'] = "PPTP VPN";
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
$interfaces['pppoe'] = "PPPoE VPN";
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable']))
$interfaces["enc0"] = "IPsec";
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
$interfaces["openvpn"] = "OpenVPN";
foreach ($interfaces as $iface => $ifacename): ?>
<option value="<?=$iface;?>" <?=($iface==$interfacefilter)?"selected=\"selected\"":"";?>><?=htmlspecialchars($ifacename);?></option>
<?php endforeach; ?>
@ -264,39 +264,39 @@ include("head.inc");
</tr>
</table>
</form>
<div style="float: right; vertical-align:middle">
<br />
<?php if (!isset($config['syslog']['rawfilter']) && (isset($config['syslog']['filterdescriptions']) && $config['syslog']['filterdescriptions'] === "2")):?>
<a href="#" onclick="toggleListDescriptions()">Show/hide rule descriptions</a>
<?php endif;?>
</div>
</div>
</div>
</div>
</div>
</section>
-->
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<?php if (!isset($config['syslog']['rawfilter'])):
$iflist = get_configured_interface_with_descr(false, true);
if ($iflist[$interfacefilter])
$interfacefilter = $iflist[$interfacefilter];
if ($filterlogentries_submit)
if ($filterlogentries_submit)
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filterfieldsarray);
else
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filtertext, $interfacefilter);
?>
<tr>
<td colspan="<?=$config['syslog']['filterdescriptions']==="1"?7:6?>" class="listtopic">
@ -322,7 +322,7 @@ include("head.inc");
if ($config['syslog']['filterdescriptions'])
buffer_rules_load();
$rowIndex = 0;
foreach ($filterlog as $filterent):
foreach ($filterlog as $filterent):
$evenRowClass = $rowIndex % 2 ? " listMReven" : " listMRodd";
$rowIndex++;?>
<tr class="<?=$evenRowClass?>">
@ -335,10 +335,10 @@ include("head.inc");
<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/out.gif" alt="Direction=OUT" title="Direction=OUT"/>
<?php endif; ?>
<?php echo htmlspecialchars($filterent['interface']);?></td>
<?php
<?php
if ($config['syslog']['filterdescriptions'] === "1")
echo("<td class=\"listMRr nowrap\">".find_rule_by_number_buffer($filterent['rulenum'],$filterent['act'])."</td>");
$int = strtolower($filterent['interface']);
$proto = strtolower($filterent['proto']);
if($filterent['version'] == '6') {
@ -348,7 +348,7 @@ include("head.inc");
} else {
$ipproto = "inet";
}
$srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto);
$src_htmlclass = str_replace(array('.', ':'), '-', $filterent['srcip']);
$dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto);
@ -378,7 +378,7 @@ include("head.inc");
<td colspan="4" class="listMRDescriptionR listMRr nowrap"><?=find_rule_by_number_buffer($filterent['rulenum'],$filterent['act']);?></td>
</tr>
<?php endif;
endforeach;
endforeach;
buffer_rules_clear(); ?>
<?php else: ?>
<tr>
@ -392,24 +392,24 @@ include("head.inc");
dump_clog($filter_logfile, $nentries);
?>
<?php endif; ?>
</table>
</div>
</td>
</tr>
</table>
<form id="clearform" name="clearform" action="diag_logs_filter.php" method="post" style="margin-top: 14px;">
<input id="submit" name="clear" type="submit" class="btn btn-primary" value="<?=gettext("Clear log");?>" />
</form>
<p><span class="vexpl"><a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">TCP Flags</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, W - CWR</span></p>
</div>
</div>
</section>
</section>
</div>
</div>
</section>
@ -438,12 +438,12 @@ function resolve_ip_callback(transport) {
var response = jQuery.parseJSON(transport.responseText);
var resolve_class = htmlspecialchars(response.resolve_ip.replace(/[.:]/g, '-'));
var resolve_text = '<small><br />' + htmlspecialchars(response.resolve_text) + '<\/small>';
jQuery('span.RESOLVE-' + resolve_class).html(resolve_text);
jQuery('img.ICON-' + resolve_class).removeAttr('title');
jQuery('img.ICON-' + resolve_class).removeAttr('alt');
jQuery('img.ICON-' + resolve_class).attr('src', '/themes/<?= $g['theme']; ?>/images/icons/icon_log_d.gif');
jQuery('img.ICON-' + resolve_class).prop('onclick', null);
jQuery('img.ICON-' + resolve_class).prop('onclick', null);
// jQuery cautions that "removeAttr('onclick')" fails in some versions of IE
}
@ -453,5 +453,5 @@ function htmlspecialchars(str) {
}
//]]>
</script>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: filter
*/
@ -50,7 +50,7 @@ $nentries = 50;
/* AJAX related routines */
handle_ajax($nentries, $nentries + 20);
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($filter_logfile);
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100);
@ -92,25 +92,25 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_logs_filter.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $active_tab = "/diag_logs_filter.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $tab_group = 'firewall'; include('diag_logs_pills.php'); ?>
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<thead>
<tr>
<td colspan="6" class="listtopic">
@ -134,7 +134,7 @@ include("head.inc");
$rowIndex++;?>
<tr class="<?=$evenRowClass?>">
<td class="listMRlr nowrap" align="center">
<a href="#" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['act']}"; ?>', outputrule);" title="<?php echo $filterent['act'];?>"><span class="glyphicon glyphicon-remove"></span>
<a href="#" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['act']}"; ?>', outputrule);" title="<?php echo $filterent['act'];?>"><span class="glyphicon glyphicon-remove"></span>
</a>
</td>
<td class="listMRr nowrap"><?php echo htmlspecialchars($filterent['time']);?></td>
@ -152,12 +152,12 @@ include("head.inc");
</tbody>
</table>
</div>
<p><span class="vexpl"><a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F"><?=gettext("TCP Flags"); ?></a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR</span></p></div>
</div>
</section>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -26,8 +26,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_BUILDER_BINARIES:
/*
pfSense_BUILDER_BINARIES:
pfSense_MODULE: filter
*/
@ -183,21 +183,21 @@ include("head.inc"); ?>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_logs_filter.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $active_tab = "/diag_logs_filter.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $tab_group = 'firewall'; include('diag_logs_pills.php'); ?>
<p><?php printf (gettext('This is a firewall log summary, of the last %1$s lines of the firewall log (Max %2$s).'), $gotlines, $lines)?><br />
<?=gettext("NOTE: IE8 users must enable compatibility view.")?></p>
@ -211,10 +211,10 @@ include("head.inc"); ?>
}
?>
</pre>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -29,7 +29,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: system
*/
@ -48,7 +48,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($system_logfile);
if ($_GET['filtertext'])
@ -71,50 +71,50 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? include('diag_logs_pills.php'); ?>
</div>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php
<table class="table table-striped table-sort">
<?php
if($filtertext)
dump_clog($system_logfile, $nentries, true, array("$filtertext"));
else
dump_clog($system_logfile, $nentries, true, array());
?>
</table>
</table>
</div>
<div class="container-fluid">
<div class="container-fluid">
<form action="diag_logs_gateways.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</form>
<form id="clearform" name="clearform" action="diag_logs_gateways.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" type="text" class="pull-left __mr"/>
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" type="text" class="pull-left __mr"/>
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -28,8 +28,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_BUILDER_BINARIES: /sbin/ifconfig /usr/bin/awk
/*
pfSense_BUILDER_BINARIES: /sbin/ifconfig /usr/bin/awk
pfSense_MODULE: ipsec
*/
@ -49,7 +49,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($ipsec_logfile);
$ipsec_logarr = return_clog($ipsec_logfile, $nentries);
@ -65,25 +65,25 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s IPsec log entries"),$nentries);?></p>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s IPsec log entries"),$nentries);?></p>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php
<table class="table table-striped table-sort">
<?php
foreach($ipsec_logarr as $logent){
$logent = htmlspecialchars($logent);
$logent = preg_split("/\s+/", $logent, 6);
@ -94,18 +94,18 @@ include("head.inc");
echo "</tr>\n";
}
?>
</table>
</table>
</div>
<form action="diag_logs_ipsec.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: ntpd
*/
@ -47,7 +47,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($ntpd_logfile);
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("NTP"));
@ -61,37 +61,37 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p><?php printf(gettext("Last %s NTP log entries"), $nentries);?></p>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p><?php printf(gettext("Last %s NTP log entries"), $nentries);?></p>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php dump_clog($ntpd_logfile, $nentries); ?>
</table>
<table class="table table-striped table-sort">
<?php dump_clog($ntpd_logfile, $nentries); ?>
</table>
</div>
<form action="diag_logs_ntpd.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: openvpn
*/
@ -51,7 +51,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($openvpn_logfile);
include("head.inc");
@ -63,37 +63,37 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p><?php printf(gettext("Last %s OpenVPN log entries"),$nentries)?></p>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p><?php printf(gettext("Last %s OpenVPN log entries"),$nentries)?></p>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php dump_clog($openvpn_logfile, $nentries); ?>
</table>
<table class="table table-striped table-sort">
<?php dump_clog($openvpn_logfile, $nentries); ?>
</table>
</div>
<form action="diag_logs_openvpn.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -24,9 +24,9 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
$tab_group = isset($tab_group) ? $tab_group : 'system';
$tab_array = array();
$tab_group = isset($tab_group) ? $tab_group : 'system';
$tab_array = array();
if ($tab_group == 'vpn') {
@ -48,15 +48,15 @@ if ($tab_group == 'vpn') {
$tab_array[] = array(gettext("L2TP Raw"),
(($vpntype == "l2tp") && ($mode == "raw")),
"/diag_logs_vpn.php?vpntype=l2tp&amp;mode=raw");
}
else if ($tab_group == 'firewall') {
$tab_array[] = array(gettext("Normal View"), true, "/diag_logs_filter.php");
$tab_array[] = array(gettext("Dynamic View"), false, "/diag_logs_filter_dynamic.php");
$tab_array[] = array(gettext("Summary View"), false, "/diag_logs_filter_summary.php");
}
else {
@ -71,4 +71,4 @@ else {
<ul class="nav nav-pills __mb" role="tablist"><? foreach ($tab_array as $tab): ?>
<li role="presentation" <? if (str_replace('amp;','', $tab[2]) == $_SERVER['REQUEST_URI']):?>class="active"<? endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li>
<? endforeach; ?></ul>
<? endforeach; ?></ul>

View File

@ -28,8 +28,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_BUILDER_BINARIES: /sbin/ifconfig /usr/bin/awk
/*
pfSense_BUILDER_BINARIES: /sbin/ifconfig /usr/bin/awk
pfSense_MODULE:
*/
@ -48,7 +48,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($ppp_logfile);
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("PPP"));
@ -61,37 +61,37 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s PPP log entries"),$nentries);?></p>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s PPP log entries"),$nentries);?></p>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php dump_clog($ppp_logfile, $nentries); ?>
</table>
<table class="table table-striped table-sort">
<?php dump_clog($ppp_logfile, $nentries); ?>
</table>
</div>
<form action="diag_logs_ppp.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: routing
*/
@ -47,7 +47,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($relayd_logfile);
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Load Balancer"));
@ -62,37 +62,37 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s Load Balancer log entries"),$nentries);?></p>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s Load Balancer log entries"),$nentries);?></p>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php dump_clog($relayd_logfile, $nentries); ?>
</table>
<table class="table table-striped table-sort">
<?php dump_clog($relayd_logfile, $nentries); ?>
</table>
</div>
<form action="diag_logs_relayd.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -29,7 +29,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: system
*/
@ -48,7 +48,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($system_logfile);
if ($_GET['filtertext'])
@ -71,48 +71,48 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? include('diag_logs_pills.php'); ?>
</div>
</div>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php
<table class="table table-striped table-sort">
<?php
if($filtertext)
dump_clog($system_logfile, $nentries, true, array("$filtertext"), array("ppp"));
else
dump_clog($system_logfile, $nentries, true, array(), array("ppp"));
?>
</table>
</table>
</div>
<div class="container-fluid">
<div class="container-fluid">
<form action="diag_logs_resolver.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
<form id="clearform" name="clearform" action="diag_logs_resolver.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" type="text" class="pull-left __mr" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</div>
</div>
</section>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -27,7 +27,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: routing
*/
@ -46,7 +46,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($routing_logfile);
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Routing"));
@ -60,37 +60,37 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? include('diag_logs_pills.php'); ?>
</div>
</div>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php dump_clog($routing_logfile, $nentries); ?>
</table>
<table class="table table-striped table-sort">
<?php dump_clog($routing_logfile, $nentries); ?>
</table>
</div>
<div class="container-fluid">
<form action="diag_logs_routing.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</div>
</div>
</section>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -255,26 +255,26 @@ function check_everything() {
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_logs_settings.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<section class="col-xs-12">
<? $active_tab = "/diag_logs_settings.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<form action="diag_logs_settings.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped">
<table class="table table-striped">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("General Logging Options");?></td>
</tr>

View File

@ -38,4 +38,4 @@
$tab_array[] = array(gettext("NTP"), $active_tab == "/diag_logs_ntpd.php", "diag_logs_ntpd.php");
$tab_array[] = array(gettext("Settings"), $active_tab == "/diag_logs_settings.php", "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
?>

View File

@ -27,7 +27,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_BUILDER_BINARIES: /usr/sbin/fifolog_reader /usr/local/sbin/clog
pfSense_MODULE: vpn
*/
@ -86,10 +86,10 @@ function dump_clog_vpn($logfile, $tail) {
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
$logarr = "";
if(isset($config['system']['usefifolog']))
if(isset($config['system']['usefifolog']))
exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr);
else
else
exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr);
foreach ($logarr as $logent) {
@ -122,25 +122,25 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_logs_vpn.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $active_tab = "/diag_logs_vpn.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $tab_group = 'vpn'; include('diag_logs_pills.php'); ?>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php if ($mode != "raw"): ?>
<table class="table table-striped table-sort">
<?php if ($mode != "raw"): ?>
<tr>
<td class="listhdrr"><?=gettext("Time");?></td>
<td class="listhdrr"><?=gettext("Action");?></td>
@ -148,24 +148,24 @@ include("head.inc");
<td class="listhdrr"><?=gettext("IP address");?></td>
</tr>
<?php dump_clog_vpn("/var/log/vpn.log", $nentries); ?>
<?php else:
<?php else:
dump_clog("/var/log/{$logname}.log", $nentries);
endif; ?>
</table>
</table>
</div>
<form action="diag_logs_vpn.php" method="post">
<input type="hidden" name="vpntype" id="vpntype" value="<?=$vpntype;?>" />
<input type="hidden" name="mode" id="mode" value="<?=$mode;?>" />
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</div>
</div>
</section>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -29,7 +29,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_MODULE: routing
*/
@ -48,7 +48,7 @@ $nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear'])
if ($_POST['clear'])
clear_log_file($wireless_logfile);
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Wireless"));
@ -62,38 +62,38 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? $active_tab = "/diag_logs.php"; include('diag_logs_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<? include('diag_logs_pills.php'); ?>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php dump_clog($wireless_logfile, $nentries); ?>
</table>
<table class="table table-striped table-sort">
<?php dump_clog($wireless_logfile, $nentries); ?>
</table>
</div>
<form action="diag_logs_wireless.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</div>
</div>
</section>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -26,7 +26,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
pfSense_BUILDER_BINARIES: /sbin/mount /sbin/glabel /usr/bin/grep /usr/bin/cut /usr/bin/head /bin/cp
pfSense_BUILDER_BINARIES: /usr/sbin/boot0cfg /bin/mkdir /sbin/fsck_ufs /sbin/mount /bin/dd /sbin/tunefs
pfSense_MODULE: nanobsd
@ -66,10 +66,10 @@ nanobsd_detect_slice_info();
$NANOBSD_SIZE = nanobsd_get_size();
if($_POST['bootslice']) {
$statusmsg = gettext("Setting slice information, please wait...");
$statusmsg = gettext("Setting slice information, please wait...");
echo <<<EOF
<div id="loading">
<img src="/themes/{$g['theme']}/images/misc/loader.gif">
<div id="loading">
<img src="/themes/{$g['theme']}/images/misc/loader.gif">
$statusmsg
<p/>&nbsp;
</div>
@ -84,7 +84,7 @@ EOF;
if($_POST['destslice']) {
$statusmsg = gettext("Duplicating slice. Please wait, this will take a moment...");
echo <<<EOF
<div id="loading">
<div id="loading">
<img src="/themes/{$g['theme']}/images/misc/loader.gif">
$statusmsg
<p/>&nbsp;
@ -143,7 +143,7 @@ if ($savemsg)
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Bootup information");?></td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("NanoBSD Image size");?></td>
<td width="78%" class="vtable">
<?php echo $NANOBSD_SIZE; ?>
@ -162,7 +162,7 @@ if ($savemsg)
</tr>
<tr>
<td colspan="2" valign="top" class="">&nbsp;</td>
</tr>
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Media Read/Write Status");?></td>
</tr>
@ -236,7 +236,7 @@ if ($savemsg)
<?php if(file_exists("/conf/upgrade_log.txt")): ?>
<tr>
<td colspan="2" valign="top" class="">&nbsp;</td>
</tr>
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("View upgrade log");?></td>
</tr>
@ -264,7 +264,7 @@ if ($savemsg)
<?php endif; ?>
<tr>
<td colspan="2" valign="top" class="">&nbsp;</td>
</tr>
</tr>
</table>
</div>
</td>
@ -279,6 +279,6 @@ if ($savemsg)
// Clear the loading indicator
echo "<script type=\"text/javascript\">";
echo "jQuery('#loading').html('');";
echo "</script>";
echo "</script>";
?>

View File

@ -56,8 +56,8 @@ foreach ($ifdescrs as $key =>$interface) {
$hwif[$config['interfaces'][$key]['if']] = $interface;
}
/* Array ( [0] => Neighbor [1] => Linklayer [2] => Address
[3] => Netif [4] => Expire [5] => S
/* Array ( [0] => Neighbor [1] => Linklayer [2] => Address
[3] => Netif [4] => Expire [5] => S
[6] => Flags ) */
$data = array();
array_shift($rawdata);
@ -73,7 +73,7 @@ foreach ($rawdata as $line) {
/* FIXME: Not ipv6 compatible dns resolving. PHP needs fixing */
function _getHostName($mac,$ip)
{
{
if(is_ipaddr($ip)) {
list($ip, $scope) = explode("%", $ip);
if(gethostbyaddr($ip) <> "" and gethostbyaddr($ip) <> $ip)
@ -93,7 +93,7 @@ foreach ($data as &$entry) {
else
$entry['dnsresolve'] = "Z_ ";
}
// Sort the data alpha first
$data = msort($data, "dnsresolve");
@ -120,14 +120,14 @@ ob_implicit_flush(1);
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<div class="table-responsive">
<table class="table table-striped table-sort sortable __nomb">
<tr class="content-box-head">
<th>
@ -171,7 +171,7 @@ ob_implicit_flush(1);
</table>
</th>
</tr>
<?php foreach ($data as $entry): ?>
@ -191,7 +191,7 @@ ob_implicit_flush(1);
?>
</td>
<td class="listr">
<?php
<?php
if(isset($hwif[$entry['interface']]))
echo $hwif[$entry['interface']];
else
@ -201,15 +201,15 @@ ob_implicit_flush(1);
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include('foot.inc');?>
<?php include('foot.inc');?>

View File

@ -130,7 +130,7 @@ if ($_POST) {
if ($proto !== "" && !in_array(strip_not($proto), $protos)) {
$input_errors[] = gettext("Invalid protocol.");
}
if ($host != "") {
$host_string = str_replace(array(" ", "|", ","), array("", "#|", "#+"), $host);
if (strpos($host_string, '#') === false) {
@ -229,27 +229,27 @@ include("fbegin.inc");
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<header class="content-box-head container-fluid">
<h3><?=gettext("Packet capture");?></h3>
</header>
<div class="content-box-main">
<div class="table-responsive">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" name="iform" id="iform">
<table class="table table-striped">
<tbody>
<tr>
<td><?=gettext("Interface");?></td>
<td>
<select name="interface" class="form-control">
<table class="table table-striped">
<tbody>
<tr>
<td><?=gettext("Interface");?></td>
<td>
<select name="interface" class="form-control">
<?php foreach ($interfaces as $iface => $ifacename): ?>
<option value="<?=$iface;?>" <?php if ($selectedif == $iface) echo "selected=\"selected\""; ?>>
<?php echo $ifacename;?>
@ -258,30 +258,30 @@ include("fbegin.inc");
</select>
<p class="text-muted"><em><small><?=gettext("Select the interface on which to capture traffic.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Promiscuous");?></td>
<td>
<input name="promiscuous" type="checkbox"<?php if($_POST['promiscuous']) echo " checked=\"checked\""; ?> />
<p class="text-muted"><em><small><?=gettext("If checked, the");?> <a target="_blank" href="http://www.freebsd.org/cgi/man.cgi?query=tcpdump&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+8.3-stable&amp;arch=default&amp;format=html"><?= gettext("packet capture")?></a> <?= gettext("will be performed using promiscuous mode.");?>
</tr>
<tr>
<td><?=gettext("Promiscuous");?></td>
<td>
<input name="promiscuous" type="checkbox"<?php if($_POST['promiscuous']) echo " checked=\"checked\""; ?> />
<p class="text-muted"><em><small><?=gettext("If checked, the");?> <a target="_blank" href="http://www.freebsd.org/cgi/man.cgi?query=tcpdump&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+8.3-stable&amp;arch=default&amp;format=html"><?= gettext("packet capture")?></a> <?= gettext("will be performed using promiscuous mode.");?>
<br /><b><?=gettext("Note");?>: </b><?=gettext("Some network adapters do not support or work well in promiscuous mode.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Address Family");?></td>
<td>
<select name="fam" class="form-control">
</td>
</tr>
<tr>
<td><?=gettext("Address Family");?></td>
<td>
<select name="fam" class="form-control">
<option value="">Any</option>
<option value="ip" <?php if ($fam == "ip") echo "selected=\"selected\""; ?>>IPv4 Only</option>
<option value="ip6" <?php if ($fam == "ip6") echo "selected=\"selected\""; ?>>IPv6 Only</option>
</select>
<p class="text-muted"><em><small><?=gettext("Select the type of traffic to be captured, either Any, IPv4 only or IPv6 only.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Protocol");?></td>
<td>
<select name="proto" class="form-control">
</tr>
<tr>
<td><?=gettext("Protocol");?></td>
<td>
<select name="proto" class="form-control">
<option value="">Any</option>
<option value="icmp" <?php if ($proto == "icmp") echo "selected=\"selected\""; ?>>ICMP</option>
<option value="!icmp" <?php if ($proto == "!icmp") echo "selected=\"selected\""; ?>>Exclude ICMP</option>
@ -298,45 +298,45 @@ include("fbegin.inc");
<option value="esp" <?php if ($proto == "esp") echo "selected=\"selected\""; ?>>ESP</option>
</select>
<p class="text-muted"><em><small><?=gettext("Select the protocol to capture, or Any.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Host Address");?></td>
<td>
<input name="host" class="form-control host" id="host" size="20" value="<?=htmlspecialchars($host);?>" />
</td>
</tr>
<tr>
<td><?=gettext("Host Address");?></td>
<td>
<input name="host" class="form-control host" id="host" size="20" value="<?=htmlspecialchars($host);?>" />
<p class="text-muted"><em><small><?=gettext("This value is either the Source or Destination IP address or subnet in CIDR notation. The packet capture will look for this address in either field.");?>
<br /><?=gettext("Matching can be negated by preceding the value with \"!\". Multiple IP addresses or CIDR subnets may be specified. Comma (\",\") separated values perform a boolean \"and\". Separating with a pipe (\"|\") performs a boolean \"or\".");?>
<br /><?=gettext("If you leave this field blank, all packets on the specified interface will be captured.");?>
</small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Port");?></td>
<td>
<input name="port" class="formfld unknown" id="port" size="5" value="<?=$port;?>" />
</td>
</tr>
<tr>
<td><?=gettext("Port");?></td>
<td>
<input name="port" class="formfld unknown" id="port" size="5" value="<?=$port;?>" />
<p class="text-muted"><em><small><?=gettext("The port can be either the source or destination port. The packet capture will look for this port in either field.");?> <?=gettext("Leave blank if you do not want to filter by port.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Packet Length");?></td>
<td>
<input name="snaplen" class="formfld unknown" id="snaplen" size="5" value="<?=$snaplen;?>" />
</tr>
<tr>
<td><?=gettext("Packet Length");?></td>
<td>
<input name="snaplen" class="formfld unknown" id="snaplen" size="5" value="<?=$snaplen;?>" />
<p class="text-muted"><em><small><?=gettext("The Packet length is the number of bytes of each packet that will be captured. Default value is 0, which will capture the entire frame regardless of its size.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Count");?></td>
<td>
<input name="count" class="formfld unknown" id="count" size="5" value="<?=$count;?>" />
</td>
</tr>
<tr>
<td><?=gettext("Count");?></td>
<td>
<input name="count" class="formfld unknown" id="count" size="5" value="<?=$count;?>" />
<p class="text-muted"><em><small><?=gettext("This is the number of packets the packet capture will grab. Default value is 100.") . "<br />" . gettext("Enter 0 (zero) for no count limit.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Level of Detail");?></td>
<td>
<select name="detail" class="formselect" id="detail" size="1">
</td>
</tr>
<tr>
<td><?=gettext("Level of Detail");?></td>
<td>
<select name="detail" class="formselect" id="detail" size="1">
<option value="normal" <?php if ($detail == "normal") echo "selected=\"selected\""; ?>><?=gettext("Normal");?></option>
<option value="medium" <?php if ($detail == "medium") echo "selected=\"selected\""; ?>><?=gettext("Medium");?></option>
<option value="high" <?php if ($detail == "high") echo "selected=\"selected\""; ?>><?=gettext("High");?></option>
@ -345,31 +345,31 @@ include("fbegin.inc");
<p class="text-muted"><em><small><?=gettext("This is the level of detail that will be displayed after hitting 'Stop' when the packets have been captured.") . "<br /><b>" .
gettext("Note:") . "</b> " .
gettext("This option does not affect the level of detail when downloading the packet capture.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Reverse DNS Lookup");?></td>
<td>
<input name="dnsquery" type="checkbox" <?php if($_POST['dnsquery']) echo " checked=\"checked\""; ?> />
<p class="text-muted"><em><small><?=gettext("This check box will cause the packet capture to perform a reverse DNS lookup associated with all IP addresses.");?>
<br /><b><?=gettext("Note");?>: </b><?=gettext("This option can cause delays for large packet captures.");?></small></em></p>
</td>
</tr>
<tr>
</td>
</tr>
<tr>
<td><?=gettext("Reverse DNS Lookup");?></td>
<td>
<input name="dnsquery" type="checkbox" <?php if($_POST['dnsquery']) echo " checked=\"checked\""; ?> />
<p class="text-muted"><em><small><?=gettext("This check box will cause the packet capture to perform a reverse DNS lookup associated with all IP addresses.");?>
<br /><b><?=gettext("Note");?>: </b><?=gettext("This option can cause delays for large packet captures.");?></small></em></p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<?php
/* check to see if packet capture tcpdump is already running */
$processcheck = (trim(shell_exec("/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep {$fn} | /usr/bin/egrep -v '(pflog|grep)'")));
if ($processcheck != "")
$processisrunning = true;
else
$processisrunning = false;
if (($action == gettext("Stop") or $action == "") and $processisrunning != true)
echo "<input type=\"submit\" class=\"btn\" name=\"startbtn\" value=\"" . gettext("Start") . "\" />&nbsp;";
else {
@ -383,16 +383,16 @@ include("fbegin.inc");
?>
</td>
</tr>
</tbody>
</table>
</tbody>
</table>
</form>
</div>
</div>
</section>
<?php
$title = '';
@ -437,7 +437,7 @@ if ($do_tcpdump) {
if ($action == gettext("Start")) {
$matchstr = implode($matches, " and ");
$title = gettext("Packet Capture is running.");
$cmd = "/usr/sbin/tcpdump -i {$selectedif} {$disablepromiscuous} {$searchcount} -s {$snaplen} -w {$fp}{$fn} " . escapeshellarg($matchstr);
// Debug
//echo $cmd;
@ -450,9 +450,9 @@ if ($do_tcpdump) {
}
if (!empty($title)): ?>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=$title; ?></h3>
</header>
@ -484,20 +484,20 @@ if (!empty($title)): ?>
break;
}
system("/usr/sbin/tcpdump {$disabledns} {$detail_args} -r {$fp}{$fn}");
conf_mount_ro();
?>
</pre>
</div>
<? endif; ?>
</div>
<? endif; ?>
</div>
</section>
</section>
<? endif; ?>
</div>
</div>
</section>

View File

@ -71,19 +71,19 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="row">
<section class="col-xs-12">
<div class="content-box">
<form action="diag_patterns.php" method="post" enctype="multipart/form-data" name="frmPattern">
<?php if ($ulmsg) echo "<p class=\"text-danger\"><strong>" . $ulmsg . "</strong></p>\n"; ?>
<div class="table-responsive">
<table class="table table-striped table-sort">
<div class="content-box">
<form action="diag_patterns.php" method="post" enctype="multipart/form-data" name="frmPattern">
<?php if ($ulmsg) echo "<p class=\"text-danger\"><strong>" . $ulmsg . "</strong></p>\n"; ?>
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Upload layer7 pattern file");?></td>
</tr>
@ -100,12 +100,12 @@ include("head.inc");
</td>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -84,13 +84,13 @@ jQuery(document).ready(function() {setTimeout('getpfinfo()', 5000);});
<div class="container-fluid col-xs-12 col-sm-10 col-md-9">
<div class="row">
<section class="col-xs-12">
<?php
if($savemsg) {
echo "<div id=\"savemsg\">";
print_info_box($savemsg);
echo "</div>";
echo "</div>";
}
if ($input_errors)
print_input_errors($input_errors);
@ -99,11 +99,11 @@ jQuery(document).ready(function() {setTimeout('getpfinfo()', 5000);});
<div id="pfactivitydiv">
<?=gettext("Gathering PF information, please wait...");?>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -85,38 +85,38 @@ include("head.inc"); ?>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Ping"); ?></h3>
</header>
<div class="content-box-main">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Host"); ?></td>
<td><?=$mandfldhtml;?><input name="host" type="text" class="form-control" id="host" value="<?=htmlspecialchars($host);?>" /></td>
</tr>
<tr>
<td><?=gettext("IP Protocol"); ?></td>
<td><select name="ipproto" class="form-control">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Host"); ?></td>
<td><?=$mandfldhtml;?><input name="host" type="text" class="form-control" id="host" value="<?=htmlspecialchars($host);?>" /></td>
</tr>
<tr>
<td><?=gettext("IP Protocol"); ?></td>
<td><select name="ipproto" class="form-control">
<option value="ipv4" <?php if ($ipproto == "ipv4") echo "selected=\"selected\"" ?>>IPv4</option>
<option value="ipv6" <?php if ($ipproto == "ipv6") echo "selected=\"selected\"" ?>>IPv6</option>
</select></td>
</tr>
<tr>
<td><?=gettext("Source Address"); ?></td>
<td><select name="sourceip" class="form-control">
</tr>
<tr>
<td><?=gettext("Source Address"); ?></td>
<td><select name="sourceip" class="form-control">
<option value="">Default</option>
<?php $sourceips = get_possible_traffic_source_addresses(true);
foreach ($sourceips as $sip):
@ -129,28 +129,28 @@ include("head.inc"); ?>
</option>
<?php endforeach; ?>
</select></td>
</tr>
<tr>
<td><?= gettext("Count"); ?></td>
<td><select name="count" class="form-control" id="count">
</tr>
<tr>
<td><?= gettext("Count"); ?></td>
<td><select name="count" class="form-control" id="count">
<?php for ($i = 1; $i <= MAX_COUNT; $i++): ?>
<option value="<?=$i;?>" <?php if ($i == $count) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Ping"); ?>" /></td>
</tr>
</tbody>
</table>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Ping"); ?>" /></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
</section>
<?php if ($do_ping): ?>
<section class="col-xs-12">
<script type="text/javascript">
@ -161,17 +161,17 @@ include("head.inc"); ?>
//]]>
</script>
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Ping output"); ?></h3>
</header>
<div class="content-box-main col-xs-12">
<pre>
<pre>
<?php
$ifscope = '';
$command = "/sbin/ping";
if ($ipproto == "ipv6") {
@ -187,7 +187,7 @@ include("head.inc"); ?>
if (is_linklocal($host) && !strstr($host, "%") && !empty($ifscope))
$host .= "%{$ifscope}";
}
$cmd = "{$command} {$srcip} -c" . escapeshellarg($count) . " " . escapeshellarg($host);
//echo "Ping command: {$cmd}\n";
system($cmd);
@ -198,8 +198,8 @@ include("head.inc"); ?>
</div>
</section>
<? endif; ?>
</div>
</div>
</div>
</section>
<?php include('foot.inc'); ?>
<?php include('foot.inc'); ?>

View File

@ -38,7 +38,7 @@
*/
/*
pfSense_BUILDER_BINARIES: /usr/bin/netstat
pfSense_BUILDER_BINARIES: /usr/bin/netstat
pfSense_MODULE: pkgs
*/
@ -54,7 +54,7 @@ require("pkg-utils.inc");
if(!($nentries = $config['syslog']['nentries'])) $nentries = 50;
//if ($_POST['clear'])
//if ($_POST['clear'])
// clear_log_file($logfile);
$i = 0;
@ -87,48 +87,48 @@ include("head.inc");
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
if($pkgwithlogging == false) {
print_info_box(gettext("No packages with logging facilities are currently installed."));
}
else {
?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
foreach($config['installedpackages']['package'] as $package) {
if(is_array($package['logging'])) {
if(!($logtab = $package['logging']['logtab'])) $logtab = $package['name'];
if($apkg == $package['name']) {
if($apkg == $package['name']) {
$curtab = $logtab;
$tab_array[] = array(sprintf(gettext("%s"),$logtab), true, "diag_pkglogs.php?pkg=".$package['name']);
} else {
$tab_array[] = array(sprintf(gettext("%s"),$logtab), false, "diag_pkglogs.php?pkg=".$package['name']);
}
}
}
}
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<?php printf(gettext('Last %1$s %2$s log entries'),$nentries,$curtab); ?>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php
?>
<div class="tab-content content-box col-xs-12">
<?php printf(gettext('Last %1$s %2$s log entries'),$nentries,$curtab); ?>
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php
$package =& $config['installedpackages']['package'][$apkgid];
dump_clog($g['varlog_path'] . '/' . $package['logging']['logfilename'], $nentries);
?>
</table>
</div>
</table>
</div>
</div>
@ -138,4 +138,4 @@ include("head.inc");
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -1 +1 @@
<? include("reboot.php"); ?>
<? include("reboot.php"); ?>

View File

@ -66,16 +66,16 @@ include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[0] = array(gettext("States"), false, "diag_dump_states.php");
@ -83,27 +83,27 @@ include("head.inc");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="container-fluid tab-content">
<div class="tab-pane active" id="system">
<div class="container-fluid tab-content">
<div class="tab-pane active" id="system">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post">
<input name="statetable" type="checkbox" id="statetable" value="yes" checked="checked" />
<strong><?= gettext("Firewall state table"); ?></strong><br />
<span class="vexpl"><br />
<?=gettext("Resetting the state tables will remove all entries from " .
"the corresponding tables. This means that all open connections " .
"will be broken and will have to be re-established. This " .
"will be broken and will have to be re-established. This " .
"may be necessary after making substantial changes to the " .
"firewall and/or NAT rules, especially if there are IP protocol " .
"mappings (e.g. for PPTP or IPv6) with open connections."); ?><br />
@ -114,7 +114,7 @@ include("head.inc");
<?=gettext("NOTE: If you reset the firewall state table, the browser " .
"session may appear to be hung after clicking &quot;Reset&quot;. " .
"Simply refresh the page to continue."); ?></span></p>
<?php if (isset($config['system']['lb_use_sticky'])): ?>
<p>
<input name="sourcetracking" type="checkbox" id="sourcetracking" value="yes" checked="checked" />
@ -128,10 +128,10 @@ include("head.inc");
</p>
<?php endif; ?>
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Reset"); ?>" />
</form>
</div>
</div>
</div>
@ -140,4 +140,4 @@ include("head.inc");
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -30,7 +30,7 @@
*/
/*
pfSense_BUILDER_BINARIES: /usr/bin/netstat
pfSense_BUILDER_BINARIES: /usr/bin/netstat
pfSense_MODULE: routing
*/
##|+PRIV
@ -90,7 +90,7 @@ include('head.inc');
if (section == "IPv6")
params += "&IPv6=true";
var myAjax = $.ajax(
{
url:url,
type: 'post',
@ -161,34 +161,34 @@ include('head.inc');
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Routing tables"); ?></h3>
</header>
<div class="content-box-main">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Name resolution");?></td>
<td><input type="checkbox" class="formfld" id="resolve" name="resolve" value="yes" <?php if ($_POST['resolve'] == 'yes') echo "checked=\"checked\""; ?> />&nbsp;<?=gettext("Enable");?>
<p class="text-muted"><em><small><?=gettext("Enable this to attempt to resolve names when displaying the tables.");?></small></em></p>
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Name resolution");?></td>
<td><input type="checkbox" class="formfld" id="resolve" name="resolve" value="yes" <?php if ($_POST['resolve'] == 'yes') echo "checked=\"checked\""; ?> />&nbsp;<?=gettext("Enable");?>
<p class="text-muted"><em><small><?=gettext("Enable this to attempt to resolve names when displaying the tables.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Number of rows");?></td>
<td><select id="limit" name="limit" class="form-control">
</tr>
<tr>
<td><?=gettext("Number of rows");?></td>
<td><select id="limit" name="limit" class="form-control">
<?php
foreach (array("10", "50", "100", "200", "500", "1000", gettext("all")) as $item) {
echo "<option value=\"{$item}\" " . ($item == "100" ? "selected=\"selected\"" : "") . ">{$item}</option>\n";
@ -197,38 +197,38 @@ include('head.inc');
</select>
<p class="text-muted"><em><small><?=gettext("Select how many rows to display.");?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Filter expression");?></td>
<td>
<input type="text" class="form-control search" name="filter" id="filter" />
<p class="text-muted"><em><small><?=gettext("Use a regular expression to filter IP address or hostnames.");?></small></em></p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="button" class="btn btn-primary" name="update" onclick="update_all_routes();" value="<?=gettext("Update"); ?>" />
</tr>
<tr>
<td><?=gettext("Filter expression");?></td>
<td>
<input type="text" class="form-control search" name="filter" id="filter" />
<p class="text-muted"><em><small><?=gettext("Use a regular expression to filter IP address or hostnames.");?></small></em></p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="button" class="btn btn-primary" name="update" onclick="update_all_routes();" value="<?=gettext("Update"); ?>" />
<p class="text-muted"><em><small><span class="text-danger"><strong><?=gettext("Note:")?></strong></span> <?=gettext("By enabling name resolution, the query should take a bit longer. You can stop it at any time by clicking the Stop button in your browser.");?></small></em></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
</section>
<section class="col-xs-12">
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3>IPv4</h3>
</header>
<table class="table table-striped table-sort sortable __nomb" id="IPv4" summary="ipv4 routes">
<tbody>
<tr><td class="listhdrr"><?=gettext("Gathering data, please wait...");?></td></tr>
@ -236,16 +236,16 @@ include('head.inc');
</table>
</div>
</section>
<section class="col-xs-12">
<div class="content-box">
<section class="col-xs-12">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3>IPv6</h3>
</header>
<table class="table table-striped table-sort sortable __nomb" id="IPv6" summary="IPv6 routes">
<tbody>
<tr><td class="listhdrr"><?=gettext("Gathering data, please wait...");?></td></tr>
</tbody>
@ -259,4 +259,4 @@ include('head.inc');
<?php
include('foot.inc');
?>
?>

View File

@ -27,15 +27,15 @@ include("head.inc");
</head>
<body>
<?php
include("fbegin.inc");
<?php
include("fbegin.inc");
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?
@ -253,37 +253,37 @@ switch($action) {
// Default page, prints the forms to view info, test, etc...
default:
{
// Get all AD* and DA* (IDE and SCSI) devices currently installed and stores them in the $devs array
exec("ls /dev | grep '^\(ad\|da\|ada\)[0-9]\{1,2\}$'", $devs);
?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Info"); ?></h3>
</header>
<div class="content-box-main">
<form action="<?= $_SERVER['PHP_SELF']?>" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Info type"); ?></td>
<td><div class="radio">
<label><input type="radio" name="type" value="i" /><?=gettext("Info"); ?></label>
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Info type"); ?></td>
<td><div class="radio">
<label><input type="radio" name="type" value="i" /><?=gettext("Info"); ?></label>
<label><input type="radio" name="type" value="H" checked="checked" /><?=gettext("Health"); ?></label>
<label><input type="radio" name="type" value="c" /><?=gettext("SMART Capabilities"); ?></label>
<label><input type="radio" name="type" value="A" /><?=gettext("Attributes"); ?></label>
<label><input type="radio" name="type" value="a" /><?=gettext("All"); ?></label>
</div>
</td>
</tr>
</div>
</td>
</tr>
<tr>
<td><?=gettext("Device: /dev/"); ?></td>
<td >
@ -311,32 +311,32 @@ switch($action) {
</div>
</div>
</section>
<section class="col-xs-12">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Perform Self-tests"); ?></h3>
</header>
<div class="content-box-main">
<form action="<?= $_SERVER['PHP_SELF']?>" method="post" name="test" id="iform">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Test type"); ?></td>
<td>
<div class="radio">
<label><input type="radio" name="testType" value="offline" /><?=gettext("Offline"); ?></label>
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Test type"); ?></td>
<td>
<div class="radio">
<label><input type="radio" name="testType" value="offline" /><?=gettext("Offline"); ?></label>
<label><input type="radio" name="testType" value="short" checked="checked" /><?=gettext("Short"); ?></label>
<label><input type="radio" name="testType" value="long" /><?=gettext("Long"); ?></label>
<label><input type="radio" name="testType" value="conveyance" /><?=gettext("Conveyance (ATA Disks Only)"); ?></label>
</div>
</td>
</tr>
<label><input type="radio" name="testType" value="conveyance" /><?=gettext("Conveyance (ATA Disks Only)"); ?></label>
</div>
</td>
</tr>
<tr>
<td><?=gettext("Device: /dev/"); ?></td>
<td >
@ -365,29 +365,29 @@ switch($action) {
</div>
</section>
<section class="col-xs-12">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("View Logs"); ?></h3>
</header>
<div class="content-box-main">
<form action="<?= $_SERVER['PHP_SELF']?>" method="post" name="logs" id="iform">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Log type"); ?></td>
<td>
<div class="radio">
<label><input type="radio" name="type" value="error" checked="checked" /><?=gettext("Error"); ?></label>
<label><input type="radio" name="type" value="selftest" /><?=gettext("Self-test"); ?></label>
</div>
</td>
</tr>
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Log type"); ?></td>
<td>
<div class="radio">
<label><input type="radio" name="type" value="error" checked="checked" /><?=gettext("Error"); ?></label>
<label><input type="radio" name="type" value="selftest" /><?=gettext("Self-test"); ?></label>
</div>
</td>
</tr>
<tr>
<td><?=gettext("Device: /dev/"); ?></td>
<td >
@ -415,21 +415,21 @@ switch($action) {
</div>
</div>
</section>
<section class="col-xs-12">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Abort tests"); ?></h3>
</header>
<div class="content-box-main">
<form action="<?= $_SERVER['PHP_SELF']?>" method="post" name="abort" id="iform">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Device: /dev/"); ?></td>
<td >
@ -478,4 +478,4 @@ if(isset($_POST['submit']) && $_POST['submit'] != "Save")
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -30,7 +30,7 @@
*/
/*
pfSense_BUILDER_BINARIES: /usr/bin/sockstat
pfSense_BUILDER_BINARIES: /usr/bin/sockstat
*/
##|+PRIV
##|*IDENT=page-diagnostics-sockets
@ -56,19 +56,19 @@ $showAllOption = $showAll ? "" : "?showAll";
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<p>Information about listening sockets for both <a href="#IPv4">IPv4</a> and <a href="#IPv6">IPv6</a>.</p>
<p>For explanation about the meaning of the information listed for each socket click <a href="#about">here</a>.</p>
<p><input type="button" class="btn btn-default" value="<?=$showAllText?>" onclick="window.location.href='diag_sockets.php<?=$showAllOption?>'"/><br/>To show information about both listening and connected sockets click this.</p>
<?php if ($input_errors) print_input_errors($input_errors); ?>
</section>
<?php
if (isset($_GET['showAll']))
{
@ -83,15 +83,15 @@ $showAllOption = $showAll ? "" : "?showAll";
$name = ($tabindex == 0 ? 'IPv4' : 'IPv6');
?>
<section class="col-xs-12">
<div class="content-box">
<section class="col-xs-12">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><a name="<?=$name;?>"></a><?=$name;?></h3>
</header>
<table class="table table-striped table-sort sortable __nomb" id="IPv4" summary="ipv4 routes">
<?php
foreach (explode("\n", $table) as $i => $line) {
@ -99,7 +99,7 @@ $showAllOption = $showAll ? "" : "?showAll";
$class = 'listhdrr';
else
$class = 'listlr';
if (trim($line) == "")
continue;
print("<tr id=\"$name$i\">\n");
@ -108,41 +108,41 @@ $showAllOption = $showAll ? "" : "?showAll";
if ($entry == '' || $entry == "ADDRESS") continue;
if ($i == 0)
print("<th class=\"$class\">$entry</th>\n");
else
else
print("<td class=\"$class\">$entry</td>\n");
if ($i > 0)
$class = 'listr';
$j++;
}
print("</tr>\n");
print("</tr>\n");
}?>
</table>
</div>
</section>
</section>
<?php
}
}
?>
<section class="col-xs-12">
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><a name="about"></a>Socket information explanation</h3>
</header>
<div class="content-box-main col-xs-12">
<p>This page show the output for the commands: "sockstat -4lL" and "sockstat -6lL".<br />
Or in case of showing all sockets the output for: "sockstat -4" and "sockstat -6".<br />
<br />
The information listed for each socket is:</p>
</div>
<table class="table table-striped table-sort sortable __nomb" id="IPv4" summary="ipv4 routes">
<tr><td class="listlr">USER </td><td class="listr">The user who owns the socket.</td></tr>
<tr><td class="listlr">COMMAND </td><td class="listr">The command which holds the socket.</td></tr>
<tr><td class="listlr">PID </td><td class="listr">The process ID of the command which holds the socket.</td></tr>
<tr><td class="listlr">FD </td><td class="listr">The file descriptor number of the socket.</td></tr>
<tr><td class="listlr">FD </td><td class="listr">The file descriptor number of the socket.</td></tr>
<tr><td class="listlr">PROTO </td><td class="listr">The transport protocol associated with the socket for Internet sockets, or the type of socket (stream or data-gram) for UNIX sockets.</td></tr>
<tr><td class="listlr">ADDRESS </td><td class="listr">(UNIX sockets only) For bound sockets, this is the file-name of the socket. <br />For other sockets, it is the name, PID and file descriptor number of the peer, or ``(none)'' if the socket is neither bound nor connected.</td></tr>
<tr><td class="listlr">LOCAL ADDRESS </td><td class="listr">(Internet sockets only) The address the local end of the socket is bound to (see getsockname(2)).</td></tr>
@ -155,4 +155,4 @@ The information listed for each socket is:</p>
</div>
</section>
<?php include('foot.inc'); ?>
<?php include('foot.inc'); ?>

View File

@ -145,13 +145,13 @@ function build_port_info($portarr, $proto) {
function print_summary_table($label, $iparr, $sort = TRUE) { ?>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?php echo $label; ?></h3>
</header>
<div class="table-responsive">
<table class="table table-striped table-sort sortable __nomb">
<tr>
<td class="listhdrr"><?=gettext("IP");?></td>
@ -183,7 +183,7 @@ function print_summary_table($label, $iparr, $sort = TRUE) { ?>
</tr>
<?php } ?>
<?php } ?>
</table>
</div>
</section>
@ -198,11 +198,11 @@ echo "<body>";
include("fbegin.inc");
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?
print_summary_table(gettext("By Source IP"), $srcipinfo);
@ -216,4 +216,4 @@ print_summary_table(gettext("By IP Pair"), $pairipinfo, FALSE);
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -80,16 +80,16 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php
if($savemsg) {
echo "<div id=\"savemsg\">";
print_info_box($savemsg);
echo "</div>";
echo "</div>";
}
if ($input_errors)
print_input_errors($input_errors);
@ -97,12 +97,12 @@ include("head.inc");
<div id="cpuactivitydiv">
<?=gettext("Gathering CPU activity, please wait...");?>
</div>
</div>
</section>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -116,13 +116,13 @@ if($_REQUEST['sorttype'] && in_array($_REQUEST['sorttype'], $sorttypes)
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<div class="table-responsive">
<form method="post" action="<?=$_SERVER['REQUEST_URI'];?>">
<table class="table table-striped __nomb">
<thead>
@ -172,26 +172,26 @@ if($_REQUEST['sorttype'] && in_array($_REQUEST['sorttype'], $sorttypes)
</table>
</form>
</div>
<section class="col-xs-12">
<?php
<?php
if($savemsg) {
echo "<div id=\"savemsg\">";
print_info_box($savemsg);
echo "</div>";
echo "</div>";
}
if ($input_errors)
print_input_errors($input_errors);
?>
<div id="pftopactivitydiv"><?=gettext("Gathering pfTOP activity, please wait...");?></div>
<div id="pftopactivitydiv"><?=gettext("Gathering pfTOP activity, please wait...");?></div>
</section>
</section>
</div>
</div>
@ -216,4 +216,4 @@ jQuery("#viewtype").change(function() {
</script>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>

View File

@ -117,15 +117,15 @@ include("head.inc");
</script>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<form method="post" action="<?=$_SERVER['REQUEST_URI'];?>">
<form method="post" action="<?=$_SERVER['REQUEST_URI'];?>">
<section class="col-xs-12">
<?php if ($savemsg) print_info_box($savemsg); ?>
<select id="type" onchange="method_change(jQuery('#type').val());" name="type" class='form-control'>
<option value="">Table</option>
<?php foreach ($tables as $table) {
@ -138,11 +138,11 @@ include("head.inc");
</select>
</section>
<section class="col-xs-12">
<div class="content-box">
<div class="table-responsive">
<div class="content-box">
<div class="table-responsive">
<table class="table table-striped table-sort sortable __nomb">
<tr>
@ -170,7 +170,7 @@ include("head.inc");
else
echo "<tr><td>" . gettext("No entries exist in this table.");
?>
<?php
if($count > 0)
if( ($tablename == "bogons") || ($tablename == "bogonsv6") ) {
@ -184,13 +184,13 @@ include("head.inc");
</table>
</div>
</div>
</section>
</form>
</div>
</div>
</section>
<?php include('foot.inc');?>

View File

@ -106,52 +106,52 @@ include("head.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php echo gettext("This page allows you to perform a simple TCP connection test to determine if a host is up and accepting connections on a given port. This test does not function for UDP since there is no way to reliably determine if a UDP port accepts connections in this manner."); ?>
<br /><br />
<?php echo gettext("No data is transmitted to the remote host during this test, it will only attempt to open a connection and optionally display the data sent back from the server."); ?>
<br /><br /><br />
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Test Port"); ?></h3>
</header>
<div class="content-box-main ">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Host"); ?></td>
<td><?=$mandfldhtml;?><input name="host" type="text" class="form-control" id="host" value="<?=htmlspecialchars($host);?>" /></td>
</tr>
<tr>
<td><?= gettext("Port"); ?></td>
<td><input name="port" type="text" class="form-control" id="port" size="10" value="<?=htmlspecialchars($port);?>" /></td>
</tr>
<tr>
<td><?= gettext("Source Port"); ?></td>
<td><input name="srcport" type="text" class="form-control" id="srcport" size="10" value="<?=htmlspecialchars($srcport);?>" />
<p class="text-muted"><em><small><?php echo gettext("This should typically be left blank."); ?></small></em></p>
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Host"); ?></td>
<td><?=$mandfldhtml;?><input name="host" type="text" class="form-control" id="host" value="<?=htmlspecialchars($host);?>" /></td>
</tr>
<tr>
<td><?= gettext("Port"); ?></td>
<td><input name="port" type="text" class="form-control" id="port" size="10" value="<?=htmlspecialchars($port);?>" /></td>
</tr>
<tr>
<td><?= gettext("Source Port"); ?></td>
<td><input name="srcport" type="text" class="form-control" id="srcport" size="10" value="<?=htmlspecialchars($srcport);?>" />
<p class="text-muted"><em><small><?php echo gettext("This should typically be left blank."); ?></small></em></p>
</td>
</tr>
<tr>
<td><?= gettext("Show Remote Text"); ?></td>
<td><input name="showtext" type="checkbox" id="showtext" <?php if ($showtext) echo "checked=\"checked\"" ?> />
<p class="text-muted"><em><small><?php echo gettext("Shows the text given by the server when connecting to the port. Will take 10+ seconds to display if checked."); ?></small></em></p>
</tr>
<tr>
<td><?= gettext("Show Remote Text"); ?></td>
<td><input name="showtext" type="checkbox" id="showtext" <?php if ($showtext) echo "checked=\"checked\"" ?> />
<p class="text-muted"><em><small><?php echo gettext("Shows the text given by the server when connecting to the port. Will take 10+ seconds to display if checked."); ?></small></em></p>
</td>
</tr>
<tr>
<td><?=gettext("Source Address"); ?></td>
<td><select name="sourceip" class="form-control">
</tr>
<tr>
<td><?=gettext("Source Address"); ?></td>
<td><select name="sourceip" class="form-control">
<option value="">Any</option>
<?php $sourceips = get_possible_traffic_source_addresses(true);
foreach ($sourceips as $sip):
@ -165,11 +165,11 @@ include("head.inc"); ?>
<?php endforeach; ?>
</select>
</td>
</tr>
<tr>
<td><?=gettext("IP Protocol"); ?></td>
<td>
<select name="ipprotocol" class="form-control">
</tr>
<tr>
<td><?=gettext("IP Protocol"); ?></td>
<td>
<select name="ipprotocol" class="form-control">
<option value="any" <?php if ("any" == $ipprotocol) echo "selected=\"selected\""; ?>>
Any
</option>
@ -182,23 +182,23 @@ include("head.inc"); ?>
</select>
<p class="text-muted"><em><small><?php echo gettext("If you force IPv4 or IPv6 and use a hostname that does not contain a result using that protocol, <br />it will result in an error. For example if you force IPv4 and use a hostname that only returns an AAAA IPv6 IP address, it will not work."); ?></small></em></p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Test"); ?>" /></td>
</tr>
</tbody>
</table>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Test"); ?>" /></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
</section>
<?php if ($do_testport): ?>
<section class="col-xs-12">
<script type="text/javascript">
@ -209,17 +209,17 @@ include("head.inc"); ?>
//]]>
</script>
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Port Test Results"); ?></h3>
</header>
<div class="content-box-main col-xs-12">
<pre>
<pre>
<?php
$result = "";
$nc_base_cmd = "/usr/bin/nc";
$nc_args = "-w " . escapeshellarg($timeout);
@ -306,8 +306,8 @@ include("head.inc"); ?>
</div>
</section>
<? endif; ?>
</div>
</div>
</div>
</section>
<?php include('foot.inc'); ?>
<?php include('foot.inc'); ?>

View File

@ -95,38 +95,38 @@ if (!isset($do_traceroute)) {
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Traceroute");?></h3>
</header>
<div class="content-box-main ">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Host"); ?></td>
<td><?=$mandfldhtml;?><input name="host" type="text" class="form-control" id="host" value="<?=htmlspecialchars($host);?>" /></td>
</tr>
<tr>
<td><?=gettext("IP Protocol"); ?></td>
<td><select name="ipproto" class="form-control">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Host"); ?></td>
<td><?=$mandfldhtml;?><input name="host" type="text" class="form-control" id="host" value="<?=htmlspecialchars($host);?>" /></td>
</tr>
<tr>
<td><?=gettext("IP Protocol"); ?></td>
<td><select name="ipproto" class="form-control">
<option value="ipv4" <?php if ($ipproto == "ipv4") echo "selected=\"selected\"" ?>>IPv4</option>
<option value="ipv6" <?php if ($ipproto == "ipv6") echo "selected=\"selected\"" ?>>IPv6</option>
</select></td>
</tr>
<tr>
<td><?=gettext("Source Address"); ?></td>
<td><select name="sourceip" class="form-control">
</tr>
<tr>
<td><?=gettext("Source Address"); ?></td>
<td><select name="sourceip" class="form-control">
<option value="">Any</option>
<?php $sourceips = get_possible_traffic_source_addresses(true);
foreach ($sourceips as $sip):
@ -139,45 +139,45 @@ if (!isset($do_traceroute)) {
</option>
<?php endforeach; ?>
</select></td>
</tr>
<tr>
<td><?=gettext("Maximum number of hops");?></td>
<td><select name="ttl" class="form-control" id="ttl">
</tr>
<tr>
<td><?=gettext("Maximum number of hops");?></td>
<td><select name="ttl" class="form-control" id="ttl">
<?php for ($i = 1; $i <= MAX_TTL; $i++): ?>
<option value="<?=$i;?>" <?php if ($i == $ttl) echo "selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select></td>
</tr>
<tr>
<td><?=gettext("Reverse Address Lookup");?></td>
<td><input name="resolve" type="checkbox"<?php echo (!isset($resolve) ? "" : " checked=\"checked\""); ?> /></td>
</tr>
<tr>
<td><?=gettext("Use ICMP");?></td>
<td><input name="useicmp" type="checkbox"<?php if($_REQUEST['useicmp']) echo " checked=\"checked\""; ?> /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Traceroute"); ?>" /></td>
</tr>
</tbody>
</table>
<div class="container-fluid">
<p><span class="text-danger"><b><?=gettext("Note: ");?></b></span>
</tr>
<tr>
<td><?=gettext("Reverse Address Lookup");?></td>
<td><input name="resolve" type="checkbox"<?php echo (!isset($resolve) ? "" : " checked=\"checked\""); ?> /></td>
</tr>
<tr>
<td><?=gettext("Use ICMP");?></td>
<td><input name="useicmp" type="checkbox"<?php if($_REQUEST['useicmp']) echo " checked=\"checked\""; ?> /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Traceroute"); ?>" /></td>
</tr>
</tbody>
</table>
<div class="container-fluid">
<p><span class="text-danger"><b><?=gettext("Note: ");?></b></span>
<?=gettext("Traceroute may take a while to complete. You may hit the Stop button on your browser at any time to see the progress of failed traceroutes.");?>
<br /><br />
<?=gettext("Using a source interface/IP address that does not match selected type (IPv4, IPv6) will result in an error or empty output.");?>
</p>
</div>
</p>
</div>
</div>
</form>
</div>
</div>
</section>
<?php if ($do_traceroute): ob_end_flush(); ?>
<section class="col-xs-12">
<script type="text/javascript">
@ -188,20 +188,20 @@ if (!isset($do_traceroute)) {
//]]>
</script>
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Traceroute output"); ?></h3>
</header>
<div class="content-box-main col-xs-12">
<pre>
<pre>
<?php
$useicmp = isset($_REQUEST['useicmp']) ? "-I" : "";
$n = isset($resolve) ? "" : "-n";
$command = "/usr/sbin/traceroute";
if ($ipproto == "ipv6") {
$command .= "6";
@ -209,12 +209,12 @@ if (!isset($do_traceroute)) {
} else {
$ifaddr = is_ipaddr($sourceip) ? $sourceip : get_interface_ip($sourceip);
}
if ($ifaddr && (is_ipaddr($host) || is_hostname($host)))
$srcip = "-s " . escapeshellarg($ifaddr);
$cmd = "{$command} {$n} {$srcip} -w 2 {$useicmp} -m " . escapeshellarg($ttl) . " " . escapeshellarg($host);
//echo "Traceroute command: {$cmd}\n";
system($cmd);
@ -224,8 +224,8 @@ if (!isset($do_traceroute)) {
</div>
</section>
<? endif; ?>
</div>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<?php include("foot.inc"); ?>