aboutsummaryrefslogtreecommitdiffstats
path: root/config/sarg
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-09-06 21:51:34 +0200
committerdoktornotor <notordoktor@gmail.com>2015-09-06 21:51:34 +0200
commitcaf0843f5836ef21b6512fbd724a40aa57db4095 (patch)
tree0ac307daafc0d01d0f3c23135fce013e2b3369eb /config/sarg
parent6c8bd2e8dd2173261722aa9ab9cc990643eeb112 (diff)
downloadpfsense-packages-caf0843f5836ef21b6512fbd724a40aa57db4095.tar.gz
pfsense-packages-caf0843f5836ef21b6512fbd724a40aa57db4095.tar.bz2
pfsense-packages-caf0843f5836ef21b6512fbd724a40aa57db4095.zip
sarg - code style cleanup and fixes
sarg_reports.php - Code style and indentation fixes - Nuke useless pfSense 1.2.x cruft
Diffstat (limited to 'config/sarg')
-rwxr-xr-xconfig/sarg/sarg_reports.php113
1 files changed, 51 insertions, 62 deletions
diff --git a/config/sarg/sarg_reports.php b/config/sarg/sarg_reports.php
index f18eb80e..81e1fd02 100755
--- a/config/sarg/sarg_reports.php
+++ b/config/sarg/sarg_reports.php
@@ -1,8 +1,9 @@
<?php
/*
sarg_reports.php
- part of pfSense (https://www.pfsense.org/)
+ part of pfSense (https://www.pfSense.org/)
Copyright (C) 2012 Marcello Coutinho <marcellocoutinho@gmail.com>
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -26,70 +27,58 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-
require("guiconfig.inc");
- $pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
- if ($pf_version < 2.0)
- $one_two = true;
-
- $pgtitle = "Status: Sarg Reports";
- include("head.inc");
-
- ?>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
- <?php include("fbegin.inc"); ?>
+$pgtitle = "Status: Sarg Reports";
+include("head.inc");
- <?php if($one_two): ?>
- <p class="pgtitle"><?=$pgtitle?></font></p>
- <?php endif; ?>
+?>
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<?php include("fbegin.inc"); ?>
- <?php if ($savemsg) print_info_box($savemsg); ?>
+<?php if ($savemsg) print_info_box($savemsg); ?>
- <form>
-
- <div id="mainlevel">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr><td>
- <?php
- $tab_array = array();
- $tab_array[] = array(gettext("General"), false, "/pkg_edit.php?xml=sarg.xml&id=0");
- $tab_array[] = array(gettext("Users"), false, "/pkg_edit.php?xml=sarg_users.xml&id=0");
- $tab_array[] = array(gettext("Schedule"), false, "/pkg.php?xml=sarg_schedule.xml");
- $tab_array[] = array(gettext("View Report"), true, "/sarg_reports.php");
- $tab_array[] = array(gettext("Realtime"), false, "/sarg_realtime.php");
- $tab_array[] = array(gettext("XMLRPC Sync"), false, "/pkg_edit.php?xml=sarg_sync.xml&id=0");
- $tab_array[] = array(gettext("Help"), false, "/pkg_edit.php?xml=sarg_about.php");
- display_top_tabs($tab_array);
- conf_mount_rw();
- exec('rm -f /usr/local/www/sarg-images/temp/*');
- conf_mount_ro();
- ?>
- </td></tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="8" cellspacing="0">
- <tr><td></td></tr>
- <tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("Sarg Reports"); ?></td></tr>
- </table>
- </div>
- <br>
- <script language="JavaScript">
- var axel = Math.random() + "";
- var num = axel * 1000000000000000000;
- document.writeln('<IFRAME SRC="/sarg_frame.php?prevent='+ num +'?" frameborder=0 width="100%" height="600"></IFRAME>');
- </script>
- <div id="file_div"></div>
-
- </td>
- </tr>
+<form>
+<div id="mainlevel">
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr><td>
+ <?php
+ $tab_array = array();
+ $tab_array[] = array(gettext("General"), false, "/pkg_edit.php?xml=sarg.xml&id=0");
+ $tab_array[] = array(gettext("Users"), false, "/pkg_edit.php?xml=sarg_users.xml&id=0");
+ $tab_array[] = array(gettext("Schedule"), false, "/pkg.php?xml=sarg_schedule.xml");
+ $tab_array[] = array(gettext("View Report"), true, "/sarg_reports.php");
+ $tab_array[] = array(gettext("Realtime"), false, "/sarg_realtime.php");
+ $tab_array[] = array(gettext("XMLRPC Sync"), false, "/pkg_edit.php?xml=sarg_sync.xml&id=0");
+ $tab_array[] = array(gettext("Help"), false, "/pkg_edit.php?xml=sarg_about.php");
+ display_top_tabs($tab_array);
+ conf_mount_rw();
+ mwexec('/bin/rm -f /usr/local/www/sarg-images/temp/*');
+ conf_mount_ro();
+ ?>
+ </td></tr>
+ <tr><td>
+ <div id="mainarea">
+ <table class="tabcont" width="100%" border="0" cellpadding="8" cellspacing="0">
+ <tr><td></td></tr>
+ <tr><td colspan="2" valign="top" class="listtopic"><?=gettext("Sarg Reports"); ?></td></tr>
</table>
- </div>
- </form>
- <?php
- include("fend.inc");
- ?>
- </body>
- </html>
+ </div>
+ <br />
+ <script type="text/javascript">
+ //<![CDATA[
+ var axel = Math.random() + "";
+ var num = axel * 1000000000000000000;
+ document.writeln('<iframe src="/sarg_frame.php?prevent='+ num +'?" frameborder="0" width="100%" height="600"></iframe>');
+ //]]>
+ </script>
+ <div id="file_div"></div>
+ </td></tr>
+</table>
+</div>
+</form>
+<?php
+include("fend.inc");
+?>
+</body>
+</html>