Commit 0f02a3d8 authored by Ad Schellevis's avatar Ad Schellevis

update gui 28/11/2014

parent d99025a1
...@@ -360,7 +360,6 @@ EOD; ...@@ -360,7 +360,6 @@ EOD;
/* Release allocated pipes for this zone */ /* Release allocated pipes for this zone */
captiveportal_free_dnrules(); captiveportal_free_dnrules();
mwexec("/sbin/ipfw zone {$cpzoneid} destroy", true);
if (empty($config['captiveportal'])) if (empty($config['captiveportal']))
set_single_sysctl("net.link.ether.ipfw", "0"); set_single_sysctl("net.link.ether.ipfw", "0");
...@@ -456,7 +455,6 @@ function captiveportal_init_rules($reinit = false) { ...@@ -456,7 +455,6 @@ function captiveportal_init_rules($reinit = false) {
return; return;
captiveportal_load_modules(); captiveportal_load_modules();
mwexec("/sbin/ipfw zone {$cpzoneid} create", true);
$cpips = array(); $cpips = array();
$ifaces = get_configured_interface_list(); $ifaces = get_configured_interface_list();
...@@ -473,7 +471,6 @@ function captiveportal_init_rules($reinit = false) { ...@@ -473,7 +471,6 @@ function captiveportal_init_rules($reinit = false) {
if (!empty($carpif)) { if (!empty($carpif)) {
$carpsif = explode(" ", $carpif); $carpsif = explode(" ", $carpif);
foreach ($carpsif as $cpcarp) { foreach ($carpsif as $cpcarp) {
mwexec("/sbin/ipfw zone {$cpzoneid} madd {$cpcarp}", true);
$carpip = find_interface_ip($cpcarp); $carpip = find_interface_ip($cpcarp);
if (is_ipaddr($carpip)) if (is_ipaddr($carpip))
$cpips[] = $carpip; $cpips[] = $carpip;
...@@ -481,7 +478,6 @@ function captiveportal_init_rules($reinit = false) { ...@@ -481,7 +478,6 @@ function captiveportal_init_rules($reinit = false) {
} }
$cpips[] = $cpipm; $cpips[] = $cpipm;
} }
mwexec("/sbin/ipfw zone {$cpzoneid} madd {$tmpif}", true);
} }
} }
if (count($cpips) > 0) { if (count($cpips) > 0) {
...@@ -583,7 +579,7 @@ EOD; ...@@ -583,7 +579,7 @@ EOD;
/* load rules */ /* load rules */
$cprules = "flush\n{$cprules}"; $cprules = "flush\n{$cprules}";
file_put_contents("{$g['tmp_path']}/ipfw_{$cpzone}.cp.rules", $cprules); file_put_contents("{$g['tmp_path']}/ipfw_{$cpzone}.cp.rules", $cprules);
mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/ipfw_{$cpzone}.cp.rules", true); mwexec("/sbin/ipfw -q {$g['tmp_path']}/ipfw_{$cpzone}.cp.rules", true);
//@unlink("{$g['tmp_path']}/ipfw_{$cpzone}.cp.rules"); //@unlink("{$g['tmp_path']}/ipfw_{$cpzone}.cp.rules");
unset($cprules, $tmprules); unset($cprules, $tmprules);
...@@ -1461,7 +1457,7 @@ function captiveportal_get_dn_passthru_ruleno($value) { ...@@ -1461,7 +1457,7 @@ function captiveportal_get_dn_passthru_ruleno($value) {
if (file_exists("{$g['vardb_path']}/captiveportaldn.rules")) { if (file_exists("{$g['vardb_path']}/captiveportaldn.rules")) {
$rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportaldn.rules")); $rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportaldn.rules"));
unset($output); unset($output);
$_gb = exec("/sbin/ipfw -x {$cpzoneid} show | /usr/bin/grep " . escapeshellarg($value) . " | /usr/bin/grep -v grep | /usr/bin/awk '{print $5}' | /usr/bin/head -n 1", $output); $_gb = exec("/sbin/ipfw show | /usr/bin/grep " . escapeshellarg($value) . " | /usr/bin/grep -v grep | /usr/bin/awk '{print $5}' | /usr/bin/head -n 1", $output);
$ruleno = intval($output[0]); $ruleno = intval($output[0]);
if (!$rules[$ruleno]) if (!$rules[$ruleno])
$ruleno = NULL; $ruleno = NULL;
...@@ -1549,7 +1545,7 @@ function captiveportal_get_ipfw_passthru_ruleno($value) { ...@@ -1549,7 +1545,7 @@ function captiveportal_get_ipfw_passthru_ruleno($value) {
if (file_exists("{$g['vardb_path']}/captiveportal_{$cpzone}.rules")) { if (file_exists("{$g['vardb_path']}/captiveportal_{$cpzone}.rules")) {
$rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportal_{$cpzone}.rules")); $rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportal_{$cpzone}.rules"));
unset($output); unset($output);
$_gb = exec("/sbin/ipfw -x {$cpzoneid} show | /usr/bin/grep " . escapeshellarg($value) . " | /usr/bin/grep -v grep | /usr/bin/awk '{print $1}' | /usr/bin/head -n 1", $output); $_gb = exec("/sbin/ipfw show | /usr/bin/grep " . escapeshellarg($value) . " | /usr/bin/grep -v grep | /usr/bin/awk '{print $1}' | /usr/bin/head -n 1", $output);
$ruleno = intval($output[0]); $ruleno = intval($output[0]);
if (!$rules[$ruleno]) if (!$rules[$ruleno])
$ruleno = NULL; $ruleno = NULL;
...@@ -1824,7 +1820,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut ...@@ -1824,7 +1820,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut
$config['captiveportal'][$cpzone]['passthrumac'][] = $mac; $config['captiveportal'][$cpzone]['passthrumac'][] = $mac;
$macrules .= captiveportal_passthrumac_configure_entry($mac); $macrules .= captiveportal_passthrumac_configure_entry($mac);
file_put_contents("{$g['tmp_path']}/macentry_{$cpzone}.rules.tmp", $macrules); file_put_contents("{$g['tmp_path']}/macentry_{$cpzone}.rules.tmp", $macrules);
mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/macentry_{$cpzone}.rules.tmp"); mwexec("/sbin/ipfw -q {$g['tmp_path']}/macentry_{$cpzone}.rules.tmp");
$writecfg = true; $writecfg = true;
$sessionid = true; $sessionid = true;
break; break;
...@@ -1925,7 +1921,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut ...@@ -1925,7 +1921,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut
unlock($cpdblck); unlock($cpdblck);
$macrules = captiveportal_passthrumac_configure_entry($mac); $macrules = captiveportal_passthrumac_configure_entry($mac);
file_put_contents("{$g['tmp_path']}/macentry_{$cpzone}.rules.tmp", $macrules); file_put_contents("{$g['tmp_path']}/macentry_{$cpzone}.rules.tmp", $macrules);
mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/macentry_{$cpzone}.rules.tmp"); mwexec("/sbin/ipfw -q {$g['tmp_path']}/macentry_{$cpzone}.rules.tmp");
$writecfg = true; $writecfg = true;
} else { } else {
/* See if a pipeno is passed, if not start sessions because this means there isn't one atm */ /* See if a pipeno is passed, if not start sessions because this means there isn't one atm */
......
...@@ -73,7 +73,7 @@ class MainTable { ...@@ -73,7 +73,7 @@ class MainTable {
function display() { function display() {
echo "<!-- begin content table -->\n"; echo "<!-- begin content table -->\n";
echo "<table class=\"tabcont\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"display\">\n"; echo "<table class=\"table table-striped table-sort\" >\n";
echo " <!-- begin content table header -->\n"; echo " <!-- begin content table header -->\n";
echo $this->display_header(); echo $this->display_header();
echo " <!-- end content table header -->\n"; echo " <!-- end content table header -->\n";
...@@ -95,12 +95,7 @@ class MainTable { ...@@ -95,12 +95,7 @@ class MainTable {
} }
echo " <td width=\"{$this->width[$this->columns - 1]}%\" class=\"listhdr\">{$this->headers[$this->columns - 1]}</td>\n"; echo " <td width=\"{$this->width[$this->columns - 1]}%\" class=\"listhdr\">{$this->headers[$this->columns - 1]}</td>\n";
echo " <td width=\"10%\" class=\"list\">\n"; echo " <td width=\"10%\" class=\"list\">\n";
echo " <table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" summary=\"display header\">\n";
echo " <tr>\n";
echo " <td width=\"17\"></td>\n";
echo " <td valign=\"middle\"><a href=\"{$this->edit_uri}\"><img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" alt=\"plus\" /></a></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n"; echo " </td>\n";
echo "</tr>\n"; echo "</tr>\n";
...@@ -139,56 +134,43 @@ class MainTable { ...@@ -139,56 +134,43 @@ class MainTable {
} }
private function display_footer() { private function display_footer() {
global $g; global $g;
echo "<tr>\n";
echo " <td class=\"list\" colspan=\"{$this->columns}\"></td>\n";
echo " <td class=\"list\">\n";
echo " <table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" summary=\"display footer\">\n";
echo " <tr>\n";
echo " <td width=\"17\"></td>\n";
echo " <td valign=\"middle\"><a href=\"{$this->edit_uri}\"><img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" alt=\"plus\" /></a></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo "</tr>\n";
} }
private function display_buttons($row) { private function display_buttons($row) {
echo " <table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" summary=\"display buttons\">\n";
echo " <tr>\n";
if ($this->buttons['move']) if ($this->buttons['move'])
echo $this->display_button('move', $row); echo $this->display_button('move', $row);
if ($this->buttons['edit']) if ($this->buttons['edit'])
echo $this->display_button('edit', $row); echo $this->display_button('edit', $row);
echo " </tr>\n";
echo " <tr>\n";
if ($this->buttons['del']) if ($this->buttons['del'])
echo $this->display_button('del', $row); echo $this->display_button('del', $row);
if ($this->buttons['dup']) if ($this->buttons['dup'])
echo $this->display_button('dup', $row); echo $this->display_button('dup', $row);
echo " </tr>\n";
echo " </table>\n";
} }
private function display_button($button, $row) { private function display_button($button, $row) {
global $g; global $g;
echo "<td valign=\"middle\">";
switch ($button) { switch ($button) {
case "move": { case "move": {
echo "<input name=\"move_{$row}\" type=\"image\" src=\"./themes/{$g['theme']}/images/icons/icon_left.gif\" width=\"17\" height=\"17\" title=\"Move selected entries before this entry\" onmouseover=\"fr_insline({$row}, true)\" onmouseout=\"fr_insline({$row}, false)\" />"; echo "<button name=\"move_{$row}\" type=\"submit\" title=\"Move selected entries before this entry\" onmouseover=\"fr_insline({$row}, true)\" onmouseout=\"fr_insline({$row}, false)\" class=\"btn btn-default btn-xs\"><span class=\"glyphicon glyphicon-arrow-left\"></span></button>";
break; break;
} }
case "edit": { case "edit": {
echo "<a href=\"{$this->edit_uri}?id={$row}\"><img src=\"/themes/{$g['theme']}/images/icons/icon_e.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"Edit entry\" alt=\"edit\" /></a>"; echo "<a href=\"{$this->edit_uri}?id={$row}\" class=\"btn btn-default btn-xs\"><span class=\"glyphicon glyphicon-pencil\"></span></a>";
break; break;
} }
case "del": { case "del": {
echo "<a href=\"{$this->my_uri}?act=del&amp;id={$row}\" onclick=\"return confirm('Do you really want to delete this entry?')\"><img src=\"/themes/{$g['theme']}/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"Delete entry\" alt=\"delete\" /></a>"; echo "<a href=\"{$this->my_uri}?act=del&amp;id={$row}\" onclick=\"return confirm('Do you really want to delete this entry?')\" class=\"btn btn-default btn-xs\"><span class=\"glyphicon glyphicon-remove\"></span></a>";
break; break;
} }
case "dup": { case "dup": {
echo "<a href=\"{$this->edit_uri}?act=dup&amp;id={$row}\"><img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"Duplicate entry\" alt=\"duplicate\" /></a>"; echo "<a href=\"{$this->edit_uri}?act=dup&amp;id={$row}\" class=\"btn btn-default btn-xs\" title=\"Duplicate entry\" alt=\"duplicate\" /><span class=\"glyphicon glyphicon-plus\"></span></a>";
break; break;
} }
} }
echo "</td>";
} }
} }
......
<? include("edit.php"); ?>
\ No newline at end of file
<? include("exec.php"); ?>
\ No newline at end of file
This diff is collapsed.
<? include("halt.php"); ?>
\ No newline at end of file
...@@ -64,33 +64,47 @@ $pgtitle = array(gettext("Diagnostics"), gettext("Add layer7 pattern")); ...@@ -64,33 +64,47 @@ $pgtitle = array(gettext("Diagnostics"), gettext("Add layer7 pattern"));
include("head.inc"); include("head.inc");
?> ?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<?php if ($ulmsg) echo "<p class=\"red\"><strong>" . $ulmsg . "</strong></p>\n"; ?>
<div id="mainarea"> <section class="page-content-main">
<form action="diag_patterns.php" method="post" enctype="multipart/form-data" name="frmPattern">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="upload pattern"> <div class="container-fluid">
<tr>
<td colspan="4" valign="top" class="listtopic"><?=gettext("Upload layer7 pattern file");?></td> <div class="row">
</tr>
<tr> <section class="col-xs-12">
<td align="right"><strong><?=gettext("File to upload:");?></strong></td>
<td valign="top" class="label"> <div class="content-box">
<input name="ulfile" type="file" class="formfld file" id="ulfile" />
</td> <form action="diag_patterns.php" method="post" enctype="multipart/form-data" name="frmPattern">
</tr>
<tr> <?php if ($ulmsg) echo "<p class=\"text-danger\"><strong>" . $ulmsg . "</strong></p>\n"; ?>
<td valign="top">&nbsp;&nbsp;&nbsp;</td>
<td valign="top" class="label"> <div class="table-responsive">
<input name="submit" type="submit" class="button" id="upload" value="<?=gettext("Upload Pattern file");?>" /> <table class="table table-striped table-sort">
</td> <tr>
</tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("Upload layer7 pattern file");?></td>
<tr> </tr>
<td colspan="2" valign="top" height="16"></td> <tr>
</tr> <td align="right"><strong><?=gettext("File to upload:");?></strong></td>
</table> <td valign="top" >
</form> <input name="ulfile" type="file" class="formfld file" id="ulfile" />
</div> </td>
<?php include("fend.inc"); ?> </tr>
</body> <tr>
</html> <td valign="top" width="22%"></td>
<td valign="top" width="78%">
<input name="submit" type="submit" class="btn btn-primary" id="upload" value="<?=gettext("Upload Pattern file");?>" />
</td>
</tr>
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<? include("reboot.php"); ?>
\ No newline at end of file
...@@ -64,11 +64,16 @@ if(stristr($retval, "error") == true) ...@@ -64,11 +64,16 @@ if(stristr($retval, "error") == true)
$message = $retval; $message = $retval;
include("head.inc"); ?> include("head.inc"); ?>
<body link="#000000" vlink="#000000" alink="#000000"> <body link="#000000" vlink="#000000" alink="#000000">
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <section class="page-content-main">
<td> <div class="container-fluid col-xs-12 col-sm-10 col-md-9">
<div class="row">
<section class="col-xs-12">
<?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($message) { ?> <?php if ($message) { ?>
...@@ -83,5 +88,9 @@ include("head.inc"); ?> ...@@ -83,5 +88,9 @@ include("head.inc"); ?>
"Firewall Tab"); ?></a>. "Firewall Tab"); ?></a>.
<br /> <br />
<?php } ?> <?php } ?>
</td></tr></table> </section>
<?php include("fend.inc"); ?> </div>
</div>
</section>
<?php include("foot.inc"); ?>
...@@ -88,14 +88,16 @@ if($_POST['action']) { ...@@ -88,14 +88,16 @@ if($_POST['action']) {
$closehead = false; $closehead = false;
require("head.inc"); require("head.inc");
outputCSSFileInline("code-syntax-highlighter/SyntaxHighlighter.css");
outputJavaScriptFileInline("filebrowser/browser.js");
outputJavaScriptFileInline("javascript/base64.js");
?> ?>
</head>
<body> <body>
<?php include("fbegin.inc"); ?> <?php
outputJavaScriptFileInline("filebrowser/browser.js");
outputJavaScriptFileInline("javascript/base64.js");
include("fbegin.inc");
?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
...@@ -122,18 +124,6 @@ outputJavaScriptFileInline("javascript/base64.js"); ...@@ -122,18 +124,6 @@ outputJavaScriptFileInline("javascript/base64.js");
var fileContent = Base64.decode(values.join("|")); var fileContent = Base64.decode(values.join("|"));
jQuery("#fileStatus").html("<?=gettext("File successfully loaded"); ?>."); jQuery("#fileStatus").html("<?=gettext("File successfully loaded"); ?>.");
jQuery("#fileContent").val(fileContent); jQuery("#fileContent").val(fileContent);
var lang = "none";
if(file.indexOf(".php") > 0) lang = "php";
else if(file.indexOf(".inc") > 0) lang = "php";
else if(file.indexOf(".xml") > 0) lang = "xml";
else if(file.indexOf(".js" ) > 0) lang = "js";
else if(file.indexOf(".css") > 0) lang = "css";
if(jQuery("#highlight").checked && lang != "none") {
jQuery("fileContent").prop("className",lang + ":showcolumns");
dp.SyntaxHighlighter.HighlightAll("fileContent", true, false);
}
} }
else { else {
jQuery("#fileStatus").html(values[0]); jQuery("#fileStatus").html(values[0]);
...@@ -164,76 +154,66 @@ outputJavaScriptFileInline("javascript/base64.js"); ...@@ -164,76 +154,66 @@ outputJavaScriptFileInline("javascript/base64.js");
//]]> //]]>
</script> </script>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid col-xs-12 col-sm-10 col-md-9"> <div class="container-fluid">
<div class="row"> <div class="row">
<section class="col-xs-12">
<section class="col-xs-12">
<div class="content-box">
<div class="content-box-head col-xs-12">
<!-- file status box -->
<div style="display:none; background:#eeeeee;" id="fileStatusBox">
<div class="vexpl" style="padding-left:15px;">
<strong id="fileStatus"></strong>
</div>
</div>
<!-- file status box --> <!-- control buttons -->
<div style="display:none; background:#eeeeee;" id="fileStatusBox"> <div class="content-box-main col-xs-12">
<div class="vexpl" style="padding-left:15px;"> <div class="table-responsive">
<strong id="fileStatus"></strong> <table class="table table-striped">
</div> <tbody>
</div> <tr>
<td><?=gettext("Save / Load from path"); ?>:</td>
<div class="content-box-main col-xs-12"> <td><input type="text" class="form-control file" id="fbTarget" size="45" /></td>
<div class="table-responsive"> </tr>
<table class="table table-striped"> <tr>
<tbody> <td>&nbsp;</td>
<tr> <td>
<td><?=gettext("Save / Load from path"); ?>:</td> <div class="btn-group">
<td><input type="text" class="form-control file" id="fbTarget" size="45" /></td> <input type="button" class="btn btn-primary" onclick="loadFile();" value="<?=gettext('Load');?>" />
</tr> <input type="button" class="btn btn-default" id="fbOpen" value="<?=gettext('Browse');?>" />
<tr> <input type="button" class="btn btn-default" onclick="saveFile();" value="<?=gettext('Save');?>" />
<td>&nbsp;</td> </div>
<td> </td>
<div class="btn-group"> </tr>
<input type="button" class="btn btn-primary" onclick="loadFile();" value="<?=gettext('Load');?>" /> </tbody>
<input type="button" class="btn btn-default" id="fbOpen" value="<?=gettext('Browse');?>" /> </table>
<input type="button" class="btn btn-default" onclick="saveFile();" value="<?=gettext('Save');?>" /> </div>
</div>
</td>
</tr> <!-- file browser window, is hidden by default -->
</tbody> <div id="fbBrowser" style="display:none; background-color:#ffffff; border: 1px solid #cccccc; padding: 10px;"></div>
</table>
</div> <!-- file viewer/editor -->
<div style="background:#eeeeee;" id="fileOutput">
<div id="fbBrowser" style="display:none; border:1px dashed gray; width:98%;"></div> <script type="text/javascript">
<!-- file viewer/editor -->
<table width="100%" summary="file editor">
<tr>
<td valign="top">
<div style="background:#eeeeee;" id="fileOutput">
<script type="text/javascript">
//<![CDATA[ //<![CDATA[
window.onload=function(){ window.onload=function(){
document.getElementById("fileContent").wrap='off'; document.getElementById("fileContent").wrap='off';
} }
//]]> //]]>
</script> </script>
<textarea id="fileContent" name="fileContent" style="width:100%;" rows="30" cols=""></textarea> <textarea id="fileContent" name="fileContent" style="display:none; width: 100%; max-width:100%;" rows="30" cols=""></textarea>
</div> </div>
</td> </div>
</tr>
</table>
</div> </div>
</section>
</section>
</div> </div>
</div> </div>
</section> </section>
<script type="text/javascript" src="/code-syntax-highlighter/shCore.js"></script>
<script type="text/javascript" src="/code-syntax-highlighter/shBrushCss.js"></script>
<script type="text/javascript" src="/code-syntax-highlighter/shBrushJScript.js"></script>
<script type="text/javascript" src="/code-syntax-highlighter/shBrushPhp.js"></script>
<script type="text/javascript" src="/code-syntax-highlighter/shBrushXml.js"></script>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
jQuery(window).load( jQuery(window).load(
......
This diff is collapsed.
...@@ -40,11 +40,11 @@ if(is_file($path)) ...@@ -40,11 +40,11 @@ if(is_file($path))
<table width="100%"> <table width="100%">
<tr> <tr>
<td class="fbHome" width="25px" align="left"> <td class="fbHome" width="25px" align="left">
<img onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('/');" src="/filebrowser/images/icon_home.gif" alt="Home" title="Home" /> <span onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('/');" alt="Home" title="Home" class="glyphicon glyphicon-home"></span>
</td> </td>
<td><b><?=$path;?></b></td> <td><b><?=$path;?></b></td>
<td class="fbClose" align="right"> <td class="fbClose" align="right">
<img onClick="jQuery('#fbBrowser').fadeOut();" border="0" src="/filebrowser/images/icon_cancel.gif" alt="Close" title="Close" /> <span onClick="jQuery('#fbBrowser').fadeOut();" border="0" class="glyphicon glyphicon-remove" alt="Close" title="Close" ></span>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -78,7 +78,7 @@ foreach($dirs as $dir): ...@@ -78,7 +78,7 @@ foreach($dirs as $dir):
<td></td> <td></td>
<td class="fbDir vexpl" id="<?=$realDir;?>" align="left"> <td class="fbDir vexpl" id="<?=$realDir;?>" align="left">
<div onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('<?=$realDir?>');"> <div onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('<?=$realDir?>');">
<img src="/filebrowser/images/folder_generic.gif" /> <span class="glyphicon glyphicon-folder-close text-primary"></span>
&nbsp;<?=$dir;?> &nbsp;<?=$dir;?>
</div> </div>
</td> </td>
...@@ -95,7 +95,7 @@ foreach($files as $file): ...@@ -95,7 +95,7 @@ foreach($files as $file):
case ".css": case ".css":
case ".html": case ".html":
case ".xml": case ".xml":
$type = "code"; $type = "glyphicon glyphicon-globe";
break; break;
case ".rrd": case ".rrd":
$type = "database"; $type = "database";
...@@ -103,31 +103,31 @@ foreach($files as $file): ...@@ -103,31 +103,31 @@ foreach($files as $file):
case ".gif": case ".gif":
case ".jpg": case ".jpg":
case ".png": case ".png":
$type = "image"; $type = "glyphicon glyphicon-picture";
break; break;
case ".js": case ".js":
$type = "js"; $type = "glyphicon glyphicon-globe";
break; break;
case ".pdf": case ".pdf":
$type = "pdf"; $type = "glyphicon glyphicon-book";
break; break;
case ".inc": case ".inc":
case ".php": case ".php":
$type = "php"; $type = "glyphicon glyphicon-globe";
break; break;
case ".conf": case ".conf":
case ".pid": case ".pid":
case ".sh": case ".sh":
$type = "system"; $type = "glyphicon glyphicon-wrench";
break; break;
case ".bz2": case ".bz2":
case ".gz": case ".gz":
case ".tgz": case ".tgz":
case ".zip": case ".zip":
$type = "zip"; $type = "glyphicon glyphicon-compressed";
break; break;
default: default:
$type = "generic"; $type = "glyphicon glyphicon-cog";
} }
$fqpn = "{$path}/{$file}"; $fqpn = "{$path}/{$file}";
...@@ -145,7 +145,7 @@ foreach($files as $file): ...@@ -145,7 +145,7 @@ foreach($files as $file):
<td class="fbFile vexpl" id="<?=$fqpn;?>" align="left"> <td class="fbFile vexpl" id="<?=$fqpn;?>" align="left">
<?php $filename = str_replace("//","/", "{$path}/{$file}"); ?> <?php $filename = str_replace("//","/", "{$path}/{$file}"); ?>
<div onClick="jQuery('#fbTarget').val('<?=$filename?>'); loadFile(); jQuery('#fbBrowser').fadeOut();"> <div onClick="jQuery('#fbTarget').val('<?=$filename?>'); loadFile(); jQuery('#fbBrowser').fadeOut();">
<img src="/filebrowser/images/file_<?=$type;?>.gif" alt="" title=""> <span class="<?=$type;?>"></span>
&nbsp;<?=$file;?> &nbsp;<?=$file;?>
</div> </div>
</td> </td>
......
This diff is collapsed.
This diff is collapsed.
...@@ -157,75 +157,87 @@ if($_POST['aliasimport'] <> "") { ...@@ -157,75 +157,87 @@ if($_POST['aliasimport'] <> "") {
include("head.inc"); include("head.inc");
?> ?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div id="niftyOutter">
<form action="firewall_aliases_import.php" method="post" name="iform" id="iform"> <section class="page-content-main">
<div id="inputerrors"></div> <div class="container-fluid">
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="firewall alias import"> <div class="row">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Alias Import"); ?></td> <?php if ($input_errors) print_input_errors($input_errors); ?>
</tr> <div id="inputerrors"></div>
<tr>
<td valign="top" class="vncellreq"><?=gettext("Alias Name"); ?></td>
<td class="vtable"> <section class="col-xs-12">
<input name="name" type="text" class="formfld unknown" id="name" size="40" maxlength="31" value="<?=htmlspecialchars($_POST['name']);?>" />
<br /> <div class="content-box">
<span class="vexpl">
<?=gettext("The name of the alias may only consist of the characters \"a-z, A-Z and 0-9\"."); ?> <header class="content-box-head col-xs-12">
</span> <h3><?=gettext("Alias Import");?></h3>
</td> </header>
</tr>
<tr> <div class="content-box-main col-xs-12">
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable"> <form action="firewall_aliases_import.php" method="post" name="iform" id="iform">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($_POST['descr']);?>" />
<br /> <div class="table-responsive">
<span class="vexpl"> <table class="table table-striped table-sort">
<?=gettext("You may enter a description here for your reference (not parsed)"); ?>. <tr>
</span> <td valign="top" class="vncellreq"><?=gettext("Alias Name"); ?></td>
</td> <td class="vtable">
</tr> <input name="name" type="text" class="form-control unknown" id="name" size="40" maxlength="31" value="<?=htmlspecialchars($_POST['name']);?>" />
<tr> <br />
<td valign="top" class="vncellreq"><?=gettext("Aliases to import"); ?></td> <span class="vexpl">
<td class="vtable"> <?=gettext("The name of the alias may only consist of the characters \"a-z, A-Z and 0-9\"."); ?>
<textarea name="aliasimport" rows="15" cols="40"><?php echo $_POST['aliasimport']; ?></textarea> </span>
<br /> </td>
<span class="vexpl"> </tr>
<?=gettext("Paste in the aliases to import separated by a carriage return. Common examples are lists of IPs, networks, blacklists, etc."); ?> <tr>
<br /> <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<?=gettext("The list may contain IP addresses, with or without CIDR prefix, IP ranges, blank lines (ignored) and an optional description after each IP. e.g.:"); ?> <td width="78%" class="vtable">
<br />172.16.1.2 <input name="descr" type="text" class="form-control unknown" id="descr" size="40" value="<?=htmlspecialchars($_POST['descr']);?>" />
<br />172.16.0.0/24 <br />
<br />10.11.12.100-10.11.12.200 <span class="vexpl">
<br />192.168.1.254 Home router <?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
<br />10.20.0.0/16 Office network </span>
<br />10.40.1.10-10.40.1.19 Managed switches </td>
</span> </tr>
</td> <tr>
</tr> <td valign="top" class="vncellreq"><?=gettext("Aliases to import"); ?></td>
<tr> <td class="vtable">
<td width="22%" valign="top">&nbsp;</td> <textarea name="aliasimport" rows="15" cols="40"><?php echo $_POST['aliasimport']; ?></textarea>
<td width="78%"> <br />
<input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /> <span class="vexpl">
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> <?=gettext("Paste in the aliases to import separated by a carriage return. Common examples are lists of IPs, networks, blacklists, etc."); ?>
</td> <br />
</tr> <?=gettext("The list may contain IP addresses, with or without CIDR prefix, IP ranges, blank lines (ignored) and an optional description after each IP. e.g.:"); ?>
</table> <br />172.16.1.2
<br />172.16.0.0/24
<br />10.11.12.100-10.11.12.200
</form> <br />192.168.1.254 Home router
</div> <br />10.20.0.0/16 Office network
<br />10.40.1.10-10.40.1.19 Managed switches
<?php include("fend.inc"); ?> </span>
</td>
<script type="text/javascript"> </tr>
//<![CDATA[ <tr>
NiftyCheck(); <td width="22%" valign="top">&nbsp;</td>
Rounded("div#nifty","top","#FFF","#EEEEEE","smooth"); <td width="78%">
//]]> <input id="submit" name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
</script> <input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
</td>
</body> </tr>
</html> </table>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -78,106 +78,106 @@ if ($_GET['act'] == "del") { ...@@ -78,106 +78,106 @@ if ($_GET['act'] == "del") {
$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("NPt")); $pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("NPt"));
include("head.inc"); include("head.inc");
$main_buttons = array(
array('label'=>'Add rule', 'href'=>'firewall_nat_npt_edit.php'),
);
?> ?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<form action="firewall_nat_npt.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?> <script type="text/javascript" src="/javascript/row_toggle.js"></script>
<?php if (is_subsystem_dirty('natconf')): ?>
<?php print_info_box_np(gettext("The NAT configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br /> <section class="page-content-main">
<?php endif; ?> <div class="container-fluid">
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="firewall nat npt"> <tr><td> <div class="row">
<?php
$tab_array = array(); <?php if ($savemsg) print_info_box($savemsg); ?>
$tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php"); <?php if (is_subsystem_dirty('natconf')): ?>
$tab_array[] = array(gettext("1:1"), false, "firewall_nat_1to1.php"); <?php print_info_box_np(gettext("The NAT configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
$tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php"); <?php endif; ?>
$tab_array[] = array(gettext("NPt"), true, "firewall_nat_npt.php");
display_top_tabs($tab_array); <section class="col-xs-12">
?>
</td></tr> <?php
<tr> $tab_array = array();
<td> $tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
<div id="mainarea"> $tab_array[] = array(gettext("1:1"), false, "firewall_nat_1to1.php");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area"> $tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
<tr> $tab_array[] = array(gettext("NPt"), true, "firewall_nat_npt.php");
<td width="10%" class="listhdrr"><?=gettext("Interface"); ?></td> display_top_tabs($tab_array);
<td width="20%" class="listhdrr"><?=gettext("External Prefix"); ?></td> ?>
<td width="15%" class="listhdrr"><?=gettext("Internal prefix"); ?></td>
<td width="30%" class="listhdr"><?=gettext("Description"); ?></td> <div class="tab-content content-box col-xs-12">
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1" summary="add"> <div class="container-fluid">
<tr>
<td width="17"></td> <form action="firewall_nat_npt.php" method="post" name="iform" id="iform">
<td valign="middle"><a href="firewall_nat_npt_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add rule"); ?>" alt="add" /></a></td>
</tr> <div class="table-responsive">
</table> <table class="table table-striped table-sort">
</td>
</tr> <tr>
<?php <td width="10%" class="listhdrr"><?=gettext("Interface"); ?></td>
$textse = "</span>"; <td width="20%" class="listhdrr"><?=gettext("External Prefix"); ?></td>
<td width="15%" class="listhdrr"><?=gettext("Internal prefix"); ?></td>
$i = 0; foreach ($a_npt as $natent): <td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list">
if (isset($natent['disabled']))
$textss = "<span class=\"gray\">"; </td>
else </tr>
$textss = "<span>"; ?> <?php
<tr> $textse = "</span>";
<td class="listlr" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';">
<?php $i = 0; foreach ($a_npt as $natent):
echo $textss;
if (!$natent['interface']) if (isset($natent['disabled']))
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan")); $textss = "<span class=\"gray\">";
else else
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); $textss = "<span>"; ?>
echo $textse; <tr>
?> <td class="listlr" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';">
</td> <?php
<?php echo $textss;
$source_net = pprint_address($natent['source']); if (!$natent['interface'])
$source_cidr = strstr($source_net, '/'); echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan"));
$destination_net = pprint_address($natent['destination']); else
$destination_cidr = strstr($destination_net, '/'); echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface']));
?> echo $textse;
<td class="listr" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';"> ?>
<?php echo $textss . $destination_net . $textse; ?> </td>
</td> <?php
<td class="listr" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';"> $source_net = pprint_address($natent['source']);
<?php echo $textss . $source_net . $textse; ?> $source_cidr = strstr($source_net, '/');
</td> $destination_net = pprint_address($natent['destination']);
<td class="listbg" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';"> $destination_cidr = strstr($destination_net, '/');
<?=$textss;?> ?>
<?=htmlspecialchars($natent['descr']);?>&nbsp; <td class="listr" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';">
<?=$textse;?> <?php echo $textss . $destination_net . $textse; ?>
</td> </td>
<td class="list nowrap"> <td class="listr" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';">
<table border="0" cellspacing="0" cellpadding="1" summary="edit"> <?php echo $textss . $source_net . $textse; ?>
<tr> </td>
<td valign="middle"><a href="firewall_nat_npt_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit rule"); ?>" alt="edit" /></a></td> <td class="listbg" ondblclick="document.location='firewall_nat_npt_edit.php?id=<?=$i;?>';">
<td valign="middle"><a href="firewall_nat_npt.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule"); ?>" alt="delete" /></a></td> <?=$textss;?>
</tr> <?=htmlspecialchars($natent['descr']);?>&nbsp;
</table> <?=$textse;?>
</td> </td>
</tr> <td class="list nowrap">
<?php $i++; endforeach; ?> <a href="firewall_nat_npt_edit.php?id=<?=$i;?>" title="<?=gettext("edit rule"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a><a href="firewall_nat_npt.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')" title="<?=gettext("delete rule"); ?>" alt="delete" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
<tr> </td>
<td class="list" colspan="4"></td> </tr>
<td class="list"> <?php $i++; endforeach; ?>
<table border="0" cellspacing="0" cellpadding="1" summary="add">
<tr> </table>
<td width="17"></td> </div>
<td valign="middle"><a href="firewall_nat_npt_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add rule"); ?>" alt="add" /></a></td> </form>
</tr> </div>
</table> </div>
</td> </section>
</tr> </div>
</table> </div>
</div> </section>
</td>
</tr> <?php include("foot.inc"); ?>
</table> \ No newline at end of file
</form>
<?php include("fend.inc"); ?>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -347,7 +347,7 @@ $output_form .= "<tr><td width=\"22%\" valign=\"middle\" class=\"vncellreq\">"; ...@@ -347,7 +347,7 @@ $output_form .= "<tr><td width=\"22%\" valign=\"middle\" class=\"vncellreq\">";
$output_form .= "<br />" . gettext("Queue Actions") . "<br />"; $output_form .= "<br />" . gettext("Queue Actions") . "<br />";
$output_form .= "</td><td valign=\"middle\" class=\"vncellreq\" width=\"78%\"><br />"; $output_form .= "</td><td valign=\"middle\" class=\"vncellreq\" width=\"78%\"><br />";
$output_form .= "<input type=\"submit\" name=\"Submit\" value=\"" . gettext("Save") . "\" class=\"formbtn\" />"; $output_form .= "<input type=\"submit\" name=\"Submit\" value=\"" . gettext("Save") . "\" class=\"btn btn-primary\" />";
if ($can_add || $addnewaltq) { if ($can_add || $addnewaltq) {
$output_form .= "<a href=\"firewall_shaper.php?interface="; $output_form .= "<a href=\"firewall_shaper.php?interface=";
$output_form .= $interface; $output_form .= $interface;
...@@ -355,7 +355,7 @@ if ($can_add || $addnewaltq) { ...@@ -355,7 +355,7 @@ if ($can_add || $addnewaltq) {
$output_form .= "&amp;queue=" . $queue->GetQname(); $output_form .= "&amp;queue=" . $queue->GetQname();
} }
$output_form .= "&amp;action=add\">"; $output_form .= "&amp;action=add\">";
$output_form .= "<input type=\"button\" class=\"formbtn\" name=\"add\" value=\"" . gettext("Add new queue") . "\" />"; $output_form .= "<input type=\"button\" class=\"btn btn-default\" name=\"add\" value=\"" . gettext("Add new queue") . "\" />";
$output_form .= "</a>"; $output_form .= "</a>";
} }
$output_form .= "<a href=\"firewall_shaper.php?interface="; $output_form .= "<a href=\"firewall_shaper.php?interface=";
...@@ -364,7 +364,7 @@ if ($queue) { ...@@ -364,7 +364,7 @@ if ($queue) {
$output_form .= "&amp;queue=" . $queue->GetQname(); $output_form .= "&amp;queue=" . $queue->GetQname();
} }
$output_form .= "&amp;action=delete\">"; $output_form .= "&amp;action=delete\">";
$output_form .= "<input type=\"button\" class=\"formbtn\" name=\"delete\""; $output_form .= "<input type=\"button\" class=\"btn btn-default\" name=\"delete\"";
if ($queue) if ($queue)
$output_form .= " value=\"" . gettext("Delete this queue") . "\" />"; $output_form .= " value=\"" . gettext("Delete this queue") . "\" />";
else else
...@@ -383,70 +383,87 @@ $output .= $output_form; ...@@ -383,70 +383,87 @@ $output .= $output_form;
$closehead = false; $closehead = false;
include("head.inc"); include("head.inc");
?> ?>
<body>
<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" /> <link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
<script type="text/javascript" src="./tree/tree.js"></script> <script type="text/javascript" src="./tree/tree.js"></script>
</head>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC" >
<?php <?php
if ($queue) if ($queue)
echo $queue->build_javascript(); echo $queue->build_javascript();
echo $newjavascript; echo $newjavascript;
include("fbegin.inc"); include("fbegin.inc");
?> ?>
<div id="inputerrors"></div>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<form action="firewall_shaper.php" method="post" id="iform" name="iform">
<?php if ($savemsg) print_info_box($savemsg); ?> <section class="page-content-main">
<?php if (is_subsystem_dirty('shaper')): ?><p> <div class="container-fluid">
<?php print_info_box_np(gettext("The traffic shaper configuration has been changed.")."<br />".gettext("You must apply the changes in order for them to take effect."));?><br /></p> <div class="row">
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="traffic shaper"> <div id="inputerrors"></div>
<tr><td> <?php if ($input_errors) print_input_errors($input_errors); ?>
<?php
$tab_array = array(); <?php if ($savemsg) print_info_box($savemsg); ?>
$tab_array[0] = array(gettext("By Interface"), true, "firewall_shaper.php"); <?php if (is_subsystem_dirty('shaper')): ?>
$tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php"); <?php print_info_box_np(gettext("The traffic shaper configuration has been changed.")."<br />".gettext("You must apply the changes in order for them to take effect."));?><br />
$tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php"); <?php endif; ?>
$tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
$tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php"); <section class="col-xs-12">
display_top_tabs($tab_array);
?>
</td></tr> <?php
<tr> $tab_array = array();
<td> $tab_array[0] = array(gettext("By Interface"), true, "firewall_shaper.php");
<div id="mainarea"> $tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area"> $tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
<?php if (count($altq_list_queues) > 0): ?> $tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
<tr class="tabcont"><td width="25%" align="left"> $tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
<a href="firewall_shaper.php?action=resetall" > display_top_tabs($tab_array);
<input type="button" value="<?=gettext("Remove Shaper")?>" class="formbtn" /> ?>
</a>
</td><td width="75%"> </td></tr>
<?php endif; ?> <div class="tab-content content-box col-xs-12">
<tr>
<td width="25%" valign="top" align="left"> <div class="container-fluid">
<?php
echo $tree;
?> <form action="firewall_shaper.php" method="post" name="iform" id="iform">
</td>
<td width="75%" valign="top" align="center"> <div class="table-responsive">
<div id="shaperarea" style="position:relative"> <table class="table table-striped table-sort">
<?php
echo $output; <?php if (count($altq_list_queues) > 0): ?>
?> <tr class="tabcont"><td width="25%" align="left">
<a href="firewall_shaper.php?action=resetall" >
<input type="button" value="<?=gettext("Remove Shaper")?>" class="btn btn-primary" />
</a>
</td><td width="75%"> </td></tr>
<?php endif; ?>
<tr>
<td width="25%" valign="top" align="left" style="vertical-align:top">
<?php
echo $tree;
?>
</td>
<td width="75%" valign="top" align="center">
<div id="shaperarea" style="position:relative">
<?php
echo $output;
?>
</div>
</td></tr>
</table>
</div>
</form>
</div>
</div>
</section>
</div> </div>
</td></tr>
</table>
</div> </div>
</td> </section>
</tr>
</table> <?php include("foot.inc"); ?>
</form> \ No newline at end of file
<?php include("fend.inc"); ?>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -12,34 +12,54 @@ ...@@ -12,34 +12,54 @@
</main> </main>
<?php if (isset($widgetfiles)):
$widgetfiles_add = $widgetfiles;
sort($widgetfiles_add);
?>
<div class="modal fade" id="modal_widgets" tabindex="-1" role="dialog" aria-labelledby="modal_widgets_label" aria-hidden="true"> <div class="modal fade" id="modal_widgets" tabindex="-1" role="dialog" aria-labelledby="modal_widgets_label" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="modal_widgets_label">Widgets</h4> <h4 class="modal-title" id="modal_widgets_label"><?=gettext("Available Widgets"); ?></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<tr><td>pfSense.localdomain</td></tr> <?php
<tr><td>pfSense.localdomain</td></tr> foreach($widgetfiles_add as $widget):
<tr><td>pfSense.localdomain</td></tr> if(!stristr($widget, "widget.php"))
<tr><td>pfSense.localdomain</td></tr> continue;
<tr><td>pfSense.localdomain</td></tr>
<tr><td>pfSense.localdomain</td></tr> $periodpos = strpos($widget, ".");
<tr><td>pfSense.localdomain</td></tr> $widgetname = substr($widget, 0, $periodpos);
$nicename = $widgetname;
$nicename = str_replace("_", " ", $nicename);
//make the title look nice
$nicename = ucwords($nicename);
$widgettitle = $widgetname . "_title";
$widgettitlelink = $widgetname . "_title_link";
if ($$widgettitle != ""):
?>
<tr><td style="cursor: pointer;" onclick='return addWidget("<?php echo $widgetname; ?>")'><?php echo $$widgettitle; ?></td></tr>
<?php elseif ($nicename != ""): ?>
<tr><td style="cursor: pointer;" onclick='return addWidget("<?php echo $widgetname; ?>")'><?php echo $nicename; ?></td></tr>
<?php endif; endforeach; ?>
</table> </table>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Add widgets</button>
</div> </div>
</div><!-- /modal-content --> </div><!-- /modal-content -->
</div><!-- /modal-dialog --> </div><!-- /modal-dialog -->
</div><!-- /modal --> </div><!-- /modal -->
<?php endif; ?>
</body> </body>
</html> </html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment