. 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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, oR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ ## Load Essential Includes require_once('guiconfig.inc'); require_once('notices.inc'); ## Load Functions Files require_once('includes/functions.inc.php'); ## Load AJAX, Initiate Class ############################################### require_once('includes/sajax.class.php'); ## Initiate Class and Set location of ajax file containing ## the information that we need for this page. Also set functions ## that SAJAX will be using. $oSajax = new sajax(); $oSajax->sajax_remote_uri = 'sajax/index.sajax.php'; $oSajax->sajax_request_type = 'POST'; $oSajax->sajax_export("get_stats"); $oSajax->sajax_handle_client_request(); ############################################################################ ## Check to see if we have a swap space, ## if true, display, if false, hide it ... if(file_exists("/usr/sbin/swapinfo")) { $swapinfo = `/usr/sbin/swapinfo`; if(stristr($swapinfo,'%') == true) $showswap=true; } ## User recently restored his config. ## If packages are installed lets resync if(file_exists('/conf/needs_package_sync')) { if($config['installedpackages'] <> '') { conf_mount_rw(); unlink('/conf/needs_package_sync'); header('Location: pkg_mgr_install.php?mode=reinstallall'); exit; } } ## If it is the first time webGUI has been ## accessed since initial install show this stuff. if(file_exists('/conf/trigger_initial_wizard')) { echo << {$g['product_name']}.local - {$g['product_name']} first time setup EOF; echo "\n"; if(file_exists("/usr/local/www/themes/{$g['theme']}/wizard.css")) echo "\n"; else echo ""; echo "
\n"; echo "
\n"; echo "

\n"; echo "

\n"; echo "Welcome to {$g['product_name']}!

\n"; echo "One moment while we start the initial setup wizard.

\n"; echo "Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.

\n"; echo "To bypass the wizard, click on the {$g['product_name']} logo on the initial page.\n"; echo "

\n"; echo "\n"; echo "\n"; exit; } ## Find out whether there's hardware encryption or not unset($hwcrypto); $fd = @fopen("{$g['varlog_path']}/dmesg.boot", "r"); if ($fd) { while (!feof($fd)) { $dmesgl = fgets($fd); if (preg_match("/^hifn.: (.*?),/", $dmesgl, $matches)) { $hwcrypto = $matches[1]; break; } } fclose($fd); } ## Set Page Title and Include Header $pgtitle = "{$g['product_name']} webGUI"; include("head.inc"); ?>

"; ?>

System Overview

System information
Name
Version
built on
Platform / Current Date /
Hardware crypto
Uptime
Last config change
State table size
Show states
MBUF Usage /
CPU usage left barred bargray barright bar  
Memory usage left barred bargray barright bar  
SWAP usage left barred bargray barright bar  
Disk usage /images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" />/images/misc/bar_blue.gif" height="15" width="" border="0" align="middle" alt="red bar" />/images/misc/bar_gray.gif" height="15" width="" border="0" align="middle" alt="gray bar" />/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" />