Commit 17568c17 authored by Franco Fichtner's avatar Franco Fichtner

www: various whitespace cleanups (2/2)

parent 042cbf2c
......@@ -26,7 +26,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*
......@@ -74,7 +74,7 @@ if ($filter == "local") {
//get the sort method
$sort = $_GET['sort'];
if ($sort == "out")
if ($sort == "out")
{$sort_method = "-T";}
else
{$sort_method = "-R";}
......
......@@ -98,20 +98,20 @@ 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 if ($savemsg) print_info_box($savemsg); ?>
<?PHP if ($carp_detected_problems) print_info_box(gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . "<br />" . gettext("Check link status on all interfaces with configured CARP VIPs.")); ?>
<div class="content-box">
<div class="content-box">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post">
<?php
$carpcount = 0;
......@@ -138,10 +138,10 @@ include("head.inc");
}
}
?>
<div class="table-responsive">
<table class="table table-striped table-sort sortable">
<table class="table table-striped table-sort sortable">
<tr>
<td class="listhdrr" align="center"><?=gettext("CARP Interface"); ?></td>
<td class="listhdrr" align="center"><?=gettext("Virtual IP"); ?></td>
......@@ -150,8 +150,8 @@ include("head.inc");
<?php
if ($carpcount == 0) {
echo "</table></div></form><center><br />" . gettext("Could not locate any defined CARP interfaces.");
}
elseif(is_array($config['virtualip']['vip'])) {
foreach($config['virtualip']['vip'] as $carp) {
......@@ -186,9 +186,9 @@ include("head.inc");
}
?>
</table>
</div>
<div class="col-xs-12">
<p class="vexpl">
<span class="red"><strong><?=gettext("Note"); ?>:</strong></span>
......@@ -203,11 +203,11 @@ include("head.inc");
echo "</pre>";
?>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -95,7 +95,7 @@ class MainTable {
}
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>\n";
echo "</tr>\n";
......@@ -134,24 +134,24 @@ class MainTable {
}
private function display_footer() {
global $g;
}
private function display_buttons($row) {
if ($this->buttons['move'])
echo $this->display_button('move', $row);
if ($this->buttons['edit'])
echo $this->display_button('edit', $row);
if ($this->buttons['del'])
echo $this->display_button('del', $row);
if ($this->buttons['dup'])
echo $this->display_button('dup', $row);
}
private function display_button($button, $row) {
global $g;
switch ($button) {
case "move": {
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>";
......@@ -170,9 +170,9 @@ class MainTable {
break;
}
}
}
}
?>
\ No newline at end of file
?>
......@@ -58,7 +58,7 @@ function upload_crash_report($files) {
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;)");
curl_setopt($ch, CURLOPT_URL, $g['crashreporterurl']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
return $response;
}
......@@ -91,11 +91,11 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors);
<?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">
<div class="content-box">
<div class="content-box">
<form action="crash_reporter.php" method="post">
<div class="col-xs-12">
......@@ -145,7 +145,7 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors);
$crash_reports .= file_get_contents($cf);
}
}
} else {
} else {
echo "Could not locate any crash data.";
}
output_crash_reporter_html($crash_reports);
......@@ -158,5 +158,5 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors);
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -340,5 +340,3 @@ include("head.inc");
<?php include("foot.inc"); ?>
......@@ -65,7 +65,7 @@ if(stristr($retval, "error") == true)
include("head.inc"); ?>
<body link="#000000" vlink="#000000" alink="#000000">
<?php include("fbegin.inc"); ?>
......
......@@ -50,7 +50,7 @@ if($_POST['action']) {
echo "|1|" . gettext("Failed to read file") . ".|";
} else {
$data = base64_encode($data);
echo "|0|{$_POST['file']}|{$data}|";
echo "|0|{$_POST['file']}|{$data}|";
}
}
exit;
......@@ -86,14 +86,14 @@ require("head.inc");
?>
<body>
<?php
<?php
outputJavaScriptFileInline("filebrowser/browser.js");
outputJavaScriptFileInline("javascript/base64.js");
include("fbegin.inc");
include("fbegin.inc");
?>
<script type="text/javascript">
<script type="text/javascript">
//<![CDATA[
function loadFile() {
jQuery("#fileStatus").html("<?=gettext("Loading file"); ?> ...");
......@@ -129,10 +129,10 @@ include("fbegin.inc");
function saveFile(file) {
jQuery("#fileStatus").html("<?=gettext("Saving file"); ?> ...");
jQuery("#fileStatusBox").show(500);
var fileContent = Base64.encode(jQuery("#fileContent").val());
fileContent = fileContent.replace(/\+/g,"%2B");
jQuery.ajax(
"<?=$_SERVER['SCRIPT_NAME'];?>", {
type: "post",
......@@ -153,46 +153,46 @@ include("fbegin.inc");
<div class="row">
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<div class="content-box-head container-fluid">
<div class="content-box-head container-fluid">
<!-- file status box -->
<div style="display:none; background:#eeeeee;" id="fileStatusBox">
<div class="vexpl" style="padding-left:15px;">
<strong id="fileStatus"></strong>
</div>
</div>
</div>
</div>
<!-- control buttons -->
<div class="content-box-main ">
<div class="table-responsive">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Save / Load from path"); ?>:</td>
<td><input type="text" class="form-control file" id="fbTarget" size="45" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<div class="btn-group">
<input type="button" class="btn btn-primary" onclick="loadFile();" value="<?=gettext('Load');?>" />
<input type="button" class="btn btn-default" id="fbOpen" value="<?=gettext('Browse');?>" />
<input type="button" class="btn btn-default" onclick="saveFile();" value="<?=gettext('Save');?>" />
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- file browser window, is hidden by default -->
<div id="fbBrowser" style="display:none; background-color:#ffffff; border: 1px solid #cccccc; padding: 10px;"></div>
<!-- file viewer/editor -->
<div style="background:#eeeeee;" id="fileOutput">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td><?=gettext("Save / Load from path"); ?>:</td>
<td><input type="text" class="form-control file" id="fbTarget" size="45" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<div class="btn-group">
<input type="button" class="btn btn-primary" onclick="loadFile();" value="<?=gettext('Load');?>" />
<input type="button" class="btn btn-default" id="fbOpen" value="<?=gettext('Browse');?>" />
<input type="button" class="btn btn-default" onclick="saveFile();" value="<?=gettext('Save');?>" />
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- file browser window, is hidden by default -->
<div id="fbBrowser" style="display:none; background-color:#ffffff; border: 1px solid #cccccc; padding: 10px;"></div>
<!-- file viewer/editor -->
<div style="background:#eeeeee;" id="fileOutput">
<script type="text/javascript">
//<![CDATA[
window.onload=function(){
......@@ -202,9 +202,9 @@ include("fbegin.inc");
</script>
<textarea id="fileContent" name="fileContent" style="display:none; width: 100%; max-width:100%;" rows="30" cols=""></textarea>
</div>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
</section>
......@@ -215,7 +215,7 @@ include("fbegin.inc");
function() {
jQuery("#fbTarget").focus();
}
);
......@@ -230,4 +230,4 @@ include("fbegin.inc");
//]]>
</script>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -2,7 +2,7 @@
/* $Id$ */
/*
Copyright (C) 2014 - Deciso B.V.
Exec+ v1.02-000 - Copyright 2001-2003
Exec+ v1.02-000 - Copyright 2001-2003
Created by technologEase (http://www.technologEase.com)
All rights reserved.
......@@ -185,23 +185,23 @@ if (isBlank( $_POST['txtRecallBuffer'] )) {
<?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" enctype="multipart/form-data" name="frmExecPlus" onsubmit="return frmExecPlus_onSubmit( this );">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" enctype="multipart/form-data" name="frmExecPlus" onsubmit="return frmExecPlus_onSubmit( this );">
<?php if ($ulmsg) echo "<p><strong>" . $ulmsg . "</strong></p>\n"; ?>
<?php if (!isBlank($_POST['txtCommand']) || !isBlank($_POST['txtPHPCommand'])):?>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Execute result"); ?></h3>
</header>
<h3><?=gettext("Execute result"); ?></h3>
</header>
<div class="content-box-main col-xs-12">
<?php
<?php
if (!isBlank($_POST['txtCommand'])) {
puts("<pre>");
puts("\$ " . htmlspecialchars($_POST['txtCommand']));
......@@ -227,27 +227,27 @@ if (!isBlank($_POST['txtPHPCommand'])) {
</div>
</section>
<? endif; ?>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Execute Shell command"); ?></h3>
</header>
<h3><?=gettext("Execute Shell command"); ?></h3>
</header>
<div class="content-box-main">
<?php if (isBlank($_POST['txtCommand'])): ?>
<p class="text-danger container-fluid"><strong><?=gettext("Note: this function is unsupported. Use it " .
"on your own risk"); ?>!</strong></p>
<?php endif; ?>
<table class="table table-striped __nomb">
<tbody>
<tr>
<td width="150"><?=gettext("Command"); ?>:</td>
<td><input id="txtCommand" name="txtCommand" type="text" class="form-control" size="80" value="<?=htmlspecialchars($_POST['txtCommand']);?>" /></td>
</tr>
<tr>
<tbody>
<tr>
<td width="150"><?=gettext("Command"); ?>:</td>
<td><input id="txtCommand" name="txtCommand" type="text" class="form-control" size="80" value="<?=htmlspecialchars($_POST['txtCommand']);?>" /></td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;</td>
<td>
<input type="hidden" name="txtRecallBuffer" value="<?=htmlspecialchars($_POST['txtRecallBuffer']) ?>" />
......@@ -256,106 +256,106 @@ if (!isBlank($_POST['txtPHPCommand'])) {
<input type="button" class="btn" name="btnRecallNext" value=">" onclick="btnRecall_onClick( this.form, 1 );" />
<input type="button" class="btn" value="<?=gettext("Clear"); ?>" onclick="return Reset_onClick( this.form );" />
</td>
</tr>
</tbody>
</tr>
</tbody>
</table>
</div>
</div>
</section>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Download"); ?></h3>
</header>
<h3><?=gettext("Download"); ?></h3>
</header>
<div class="content-box-main ">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td width="150"><?=gettext("File to download"); ?>:</td>
<td><input name="dlPath" type="text" class="form-control file" id="dlPath" size="50" /></td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">
<input name="submit" type="submit" class="btn btn-primary" id="download" value="<?=gettext("Download"); ?>" />
</td>
</tr>
</tbody>
<tbody>
<tr>
<td width="150"><?=gettext("File to download"); ?>:</td>
<td><input name="dlPath" type="text" class="form-control file" id="dlPath" size="50" /></td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">
<input name="submit" type="submit" class="btn btn-primary" id="download" value="<?=gettext("Download"); ?>" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("Upload"); ?></h3>
</header>
<h3><?=gettext("Upload"); ?></h3>
</header>
<div class="content-box-main">
<table class="table table-striped __nomb">
<tbody>
<tr>
<td width="150"><?=gettext("File to upload"); ?>:</td>
<td><input name="ulfile" type="file" class="formfld file" id="ulfile" /></td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">
<input name="submit" type="submit" class="btn btn-primary" id="upload" value="<?=gettext("Upload"); ?>" />
</td>
</tr>
</tbody>
<tbody>
<tr>
<td width="150"><?=gettext("File to upload"); ?>:</td>
<td><input name="ulfile" type="file" class="formfld file" id="ulfile" /></td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">
<input name="submit" type="submit" class="btn btn-primary" id="upload" value="<?=gettext("Upload"); ?>" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
<section class="col-xs-12">
<div class="content-box">
<div class="content-box">
<header class="content-box-head container-fluid">
<h3><?=gettext("PHP Execute"); ?></h3>
</header>
<h3><?=gettext("PHP Execute"); ?></h3>
</header>
<div class="content-box-main col-xs-12">
<textarea id="txtPHPCommand" name="txtPHPCommand" rows="9" cols="80"><?=htmlspecialchars($_POST['txtPHPCommand']);?></textarea>
<br />
<input type="submit" class="btn btn-primary" value="<?=gettext("Execute"); ?>" />
<p><strong><?=gettext("Example"); ?>:</strong> interfaces_carp_setup();</p>
</div>
</div>
</section>
</form>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
<!--
......@@ -382,7 +382,7 @@ if (!isBlank($_POST['txtPHPCommand'])) {
</p>
</td>
</tr>
</table>
</form>
</div>
......
......@@ -75,7 +75,7 @@ function return_ext_menu($section) {
if($menuitem['section'] != $section) continue;
if($menuitem['url'] <> "") {
$test_url=$menuitem['url'];
$addresswithport = getenv("HTTP_HOST");
$addresswithport = getenv("HTTP_HOST");
$colonpos = strpos($addresswithport, ":");
if ($colonpos !== False){
//my url is actually just the IP address of the pfsense box
......@@ -99,20 +99,20 @@ function return_ext_menu($section) {
function output_menu($arrayitem, $target = null) {
foreach ($arrayitem as $item) {
if (isAllowedPage($item[1]) || $item[1]=="/index.php?logout") {
$attr = sprintf("href=\"%s\"", htmlentities($item[1]));
if ($target) {
$attr .= sprintf(" target=\"%s\"", htmlentities($target));
}
$class = "list-group-item";
$check = substr($item[1],1,-4);
if (stripos($_SERVER['PHP_SELF'], $check) !== false) {
$class .= " active";
}
if ($item['class']) {
$class .= " {$item['class']}";
}
......@@ -130,27 +130,27 @@ function output_menu($arrayitem, $target = null) {
function active_menu($arrayitem, $pagename) {
$pagename = "/".ltrim($pagename,"/");
foreach ($arrayitem as $item) {
$check = substr($item[1],1,-4);
if (stripos($pagename, $check) !== false) {
return true;
}
}
}
return false;
}
function active_main_menu() {
$options = func_get_args();
foreach ($options as $uri) {
if (substr($_SERVER['PHP_SELF'], 0, strlen($uri)) == $uri) {
return true;
}
}
return false;
}
......@@ -352,14 +352,14 @@ if(is_subsystem_dirty('packagelock')) {
<header class="page-head">
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/">
<img class="brand-logo" src="/themes/<?=$g['theme'];?>/assets/images/default-logo.png" height="30" width="150"/>
<img class="brand-icon" src="/themes/<?=$g['theme'];?>/assets/images/icon-logo.png" height="30" width="29"/>
<img class="brand-logo" src="/themes/<?=$g['theme'];?>/assets/images/default-logo.png" height="30" width="150"/>
<img class="brand-icon" src="/themes/<?=$g['theme'];?>/assets/images/icon-logo.png" height="30" width="29"/>
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navigation">
<span class="sr-only">Toggle navigation</span>
......@@ -368,113 +368,113 @@ if(is_subsystem_dirty('packagelock')) {
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li id="menu_messages">
<?php
echo get_menu_messages();
?>
</li>
<?php
echo '<li>'.get_shortcut_main_link($shortcut_section, false).'</li>';
echo '<li>'.get_shortcut_status_link($shortcut_section, false).'</li>';
echo '<li>'.get_shortcut_log_link($shortcut_section, false).'</li>';
?>
<?php if(! $g['disablehelpicon']): ?>
<?php if(! $g['disablehelpicon']): ?>
<li><a href="<?php echo $helpurl; ?>" target="_blank" title="<?php echo gettext("Help for items on this page"); ?>">Help</a></li>
<?php endif; ?>
<li class="active"><a href="/index.php?logout">Logout</a></li>
</ul>
</div>
</div>
</nav>
</header>
<main class="page-content col-sm-10 col-sm-push-2 ">
<aside id="navigation" class="page-side col-xs-12 col-sm-2 hidden-xs">
<div class="row">
<nav class="page-side-nav" role="navigation">
<div class="list-group" id="mainmenu">
<?php $active = active_main_menu("/system"); ?>
<a href="#system" class="list-group-item <?php if ($active):?>active-menu-title<? endif; ?>" data-toggle="collapse" data-parent="#mainmenu"><span class="glyphicon glyphicon-dashboard __iconspacer"></span><?php echo gettext("System"); ?></a>
<div class="collapse <?php if ($active):?>active-menu in<? endif; ?>" id="system">
<?php
output_menu($system_menu);
?>
</div>
<?php $active = active_main_menu("/interface"); ?>
<a href="#interfaces" class="list-group-item <?php if ($active):?>active-menu-title<? endif; ?>" data-toggle="collapse" data-parent="#mainmenu"><span class="glyphicon glyphicon-wrench __iconspacer"></span><?php echo gettext("Interfaces"); ?></a>
<div class="collapse <?php if ($active):?>active-menu in<? endif; ?>" id="interfaces">
<?php
output_menu($interfaces_menu);
?>
</div>
<?php $active = active_main_menu("/firewall"); ?>
<a href="#firewall" class="list-group-item <?php if ($active):?>active-menu-title<? endif; ?>" data-toggle="collapse" data-parent="#mainmenu"><span class="glyphicon glyphicon-fire __iconspacer"></span><?php echo gettext("Firewall"); ?></a>
<div class="collapse <?php if ($active):?>active-menu in<? endif; ?>" id="firewall">
<?php
output_menu($firewall_menu);
?>
</div>
<?php $active = active_main_menu("/service", "/load_balancer"); ?>
<a href="#services" class="list-group-item <?php if ($active):?>active-menu-title<? endif; ?>" data-toggle="collapse" data-parent="#mainmenu"><span class="glyphicon glyphicon-cog __iconspacer"></span><?php echo gettext("Services"); ?></a>
<div class="collapse <?php if ($active):?>active-menu in<? endif; ?>" id="services">
<?php
output_menu($services_menu);
?>
</div>
<?php $active = active_main_menu("/vpn"); ?>
<a href="#vpn" class="list-group-item <?php if ($active):?>active-menu-title<? endif; ?>" data-toggle="collapse" data-parent="#mainmenu"><span class="glyphicon glyphicon-lock __iconspacer"></span><?php echo gettext("VPN"); ?></a>
<div class="collapse <?php if ($active):?>active-menu in<? endif; ?>" id="vpn">
<?php
output_menu($vpn_menu);
?>
</div>
<?php $active = active_main_menu("/status"); ?>
<a href="#statusmenu" class="list-group-item <?php if ($active):?>active-menu-title<? endif; ?>" data-toggle="collapse" data-parent="#mainmenu"><span class="glyphicon glyphicon-tasks __iconspacer"></span><?php echo gettext("Status"); ?></a>
<div class="collapse <?php if (active_menu($status_menu, $pagename)):?>active-menu in<? endif; ?>" id="statusmenu">
<?php
output_menu($status_menu);
?>
</div>
<?php $active = active_main_menu("/diag"); ?>
<a href="#diagnostics" class="list-group-item <?php if ($active):?>active-menu-title<? endif; ?>" data-toggle="collapse" data-parent="#mainmenu"><span class="glyphicon glyphicon-stats __iconspacer"></span><?php echo gettext("Diagnostics"); ?></a>
<div class="collapse <?php if ($active):?>active-menu in<? endif; ?>" id="diagnostics">
<?php
output_menu($diagnostics_menu);
?>
</div>
<?php if(! $g['disablehelpmenu']): ?>
<?php $active = active_main_menu("/help"); ?>
<a href="#help" class="list-group-item <?php if ($active):?>active-menu-title<? endif; ?>" data-toggle="collapse" data-parent="#mainmenu"><span class="glyphicon glyphicon-question-sign __iconspacer"></span><?php echo gettext("Help"); ?></a>
<div class="collapse <?php if ($active):?>active-menu in<? endif; ?>" id="help">
<?php
output_menu($help_menu, "_blank");
......@@ -482,25 +482,25 @@ if(is_subsystem_dirty('packagelock')) {
</div>
<?php endif; ?>
</div>
</nav>
</div>
</aside>
<div class="row">
<header class="page-content-head">
<div class="container-fluid">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post">
<ul class="list-inline">
<li class="__mb"><h1><?=genhtmltitle($pgtitle);?></h1></li>
<li class="btn-group-container">
<?php
if (!$hide_service_status && !empty($shortcuts[$shortcut_section]['service'])) {
$ssvc = array();
switch ($shortcut_section) {
......@@ -512,31 +512,31 @@ if(is_subsystem_dirty('packagelock')) {
break;
default:
$ssvc = find_service_by_name($shortcuts[$shortcut_section]['service']);
}
if (!empty($ssvc)) {
echo get_service_status_icon($ssvc, false);
echo get_service_control_links($ssvc, false);
}
}
?>
<? if (!empty($main_buttons)): foreach ($main_buttons as $button): ?>
<a href="<?=$button['href'];?>" class="btn btn-primary"><span class="glyphicon glyphicon-plus-sign __iconspacer"></span><?=$button['label'];?></a>
<? if (!empty($main_buttons)): foreach ($main_buttons as $button): ?>
<a href="<?=$button['href'];?>" class="btn btn-primary"><span class="glyphicon glyphicon-plus-sign __iconspacer"></span><?=$button['label'];?></a>
<? endforeach; endif; ?>
<? if (isset($widgetfiles)): ?>
<a href="#" id="updatepref" style="display:none" onclick="return updatePref();" class="btn btn-primary"><?=gettext("Save Settings");?></a>
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal_widgets"><span class="glyphicon glyphicon-plus-sign __iconspacer"></span>Add widget</button>
<? endif; ?>
<!-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal_widgets"><span class="glyphicon glyphicon-plus-sign __iconspacer"></span>Add widget</button> -->
</li>
</ul>
</form>
</form>
</div>
</header>
\ No newline at end of file
</header>
<?php include("foot.inc"); exit; ?>
\ No newline at end of file
<?php include("foot.inc"); exit; ?>
<footer class="page-foot col-sm-push-2">
<div class="container-fluid">
<a target="_blank" href="<?=$g['product_website_footer']?>" class="redlnk"><?=$g['product_name']?></a> is &copy;
<div class="container-fluid">
<a target="_blank" href="<?=$g['product_website_footer']?>" class="redlnk"><?=$g['product_name']?></a> is &copy;
<?=$g['product_copyright_years']?> by <a href="<?=$g['product_copyright_url']?>" class="tblnk"><?=$g['product_copyright']?></a> All Rights Reserved.
[<a href="/license.php" class="tblnk">view license</a>]
</div>
</footer>
</div>
<!-- /row-->
</main>
[<a href="/license.php" class="tblnk">view license</a>]
</div>
</footer>
</div>
<!-- /row-->
</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-dialog">
......@@ -24,11 +24,11 @@
<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"><?=gettext("Available Widgets"); ?></h4>
</div>
<div class="modal-body">
<table class="table table-striped table-hover">
<?php
foreach($widgetfiles_add as $widget):
foreach($widgetfiles_add as $widget):
if(!stristr($widget, "widget.php"))
continue;
......@@ -43,16 +43,16 @@
$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 != ""): ?>
<?php elseif ($nicename != ""): ?>
<tr><td style="cursor: pointer;" onclick='return addWidget("<?php echo $widgetname; ?>")'><?php echo $nicename; ?></td></tr>
<?php endif; endforeach; ?>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
......@@ -60,6 +60,6 @@
</div><!-- /modal-dialog -->
</div><!-- /modal -->
<?php endif; ?>
</body>
</html>
\ No newline at end of file
</html>
......@@ -47,4 +47,4 @@ include_once("includes/functions.inc.php");
echo get_stats();
?>
\ No newline at end of file
?>
......@@ -2,21 +2,21 @@
/*
graph.php
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2004-2006 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
and Jonathan Watt <jwatt@jwatt.org>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
......@@ -98,7 +98,7 @@ $fetch_link = "ifstats.php?if=" . htmlspecialchars($ifnum);
if(file_exists("/usr/local/www/themes/{$g['theme']}/graph.php")) {
$themetxt = file_get_contents("/usr/local/www/themes/{$g['theme']}/graph.php");
eval($themetxt);
}
}
/********* Graph DATA **************/
print('<?xml version="1.0" ?>' . "\n");?>
......@@ -243,15 +243,15 @@ function plot_data(obj) {
last_ifout = ifout;
var graphTimerId = 0;
switch (plot_in.length) {
case 0:
SVGDoc.getElementById("collect_initial").setAttributeNS(null, 'visibility', 'visible');
case 0:
SVGDoc.getElementById("collect_initial").setAttributeNS(null, 'visibility', 'visible');
plot_in[0] = diff_ifin / diff_ugmt;
plot_out[0] = diff_ifout / diff_ugmt;
setTimeout('fetch_data()',<?=1000*($time_interval + $init_delay)?>);
return;
case 1:
SVGDoc.getElementById("collect_initial").setAttributeNS(null, 'visibility', 'hidden');
break;
SVGDoc.getElementById("collect_initial").setAttributeNS(null, 'visibility', 'hidden');
break;
case max_num_points:
// shift plot to left if the maximum number of plot points has been reached
var i = 0;
......@@ -314,7 +314,7 @@ function plot_data(obj) {
rmax *= 1.25;
else
rmax *= 2;
if (i == 8)
rmax *= 1.024;
}
......
......@@ -2,21 +2,21 @@
/*
$Id$
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
and Jonathan Watt <jwatt@jwatt.org>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
......
......@@ -35,7 +35,7 @@
/* Include authentication routines */
/* THIS MUST BE ABOVE ALL OTHER CODE */
if(!$nocsrf) {
function csrf_startup() {
csrf_conf('rewrite-js', '/csrf/csrf-magic.js');
$timeout_minutes = isset($config['system']['webgui']['session_timeout']) ? $config['system']['webgui']['session_timeout'] : 240;
......@@ -267,8 +267,8 @@ function print_input_errors($input_errors) {
echo '<div class="col-xs-12"><div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
';
echo "<p>" . gettext("The following input errors were detected:") . "</p>\n<ul>";
echo "<p>" . gettext("The following input errors were detected:") . "</p>\n<ul>";
foreach ($input_errors as $ierr) {
echo "<li>" . htmlspecialchars($ierr) . "</li>";
}
......@@ -335,10 +335,10 @@ function print_info_box_np_undo($msg, $name="apply",$value="Apply changes", $und
global $g;
if(stristr($msg, "apply") != false || stristr($msg, "save") != false || stristr($msg, "create") != false) {
$savebutton .= "<input class=\"btn btn-default\" type=\"button\" value=\"". gettext("Undo") . "\" onclick=\"document.location='{$undo}'\" />";
$savebutton .= "<input class=\"btn btn-default\" name=\"{$name}\" type=\"submit\" class=\"formbtn\" id=\"${name}\" value=\"{$value}\" />";
if($_POST['if'])
$savebutton .= "<input type=\"hidden\" name=\"if\" value=\"" . htmlspecialchars($_POST['if']) . "\" />";
}
......@@ -361,11 +361,11 @@ function print_info_box_np_undo($msg, $name="apply",$value="Apply changes", $und
if(!$savebutton) {
$savebutton = "<input class=\"btn btn-default\" value=\"" . gettext("Close") . "\" type=\"button\" onclick=\"$('#redboxtable').hide();\" />";
}
$url = $_SERVER['REQUEST_URI'];
echo <<<EOFnp
<div class="col-xs-12" id="redboxtable"><form action="{$url}" method="post">
<div class="alert alert-warning" summary="red box table">
<p>{$msg}<br /><br /></p>
......@@ -374,7 +374,7 @@ function print_info_box_np_undo($msg, $name="apply",$value="Apply changes", $und
{$undobutton}
</div>
</div>
</form></div>
</form></div>
EOFnp;
}
......
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