0) { $x++; } } $crash = glob("/var/crash/*"); $skip_files = array(".", "..", "minfree", ""); if (is_array($crash)) { foreach ($crash as $c) { if (!in_array(basename($c), $skip_files)) { $x++; } } if ($x > 0) { $savemsg = "{$g['product_name']} has detected a crash report or programming bug. Click here for more information."; } } } ##build list of widgets foreach (glob("/usr/local/www/widgets/widgets/*.widget.php") as $file) { $name = basename($file, '.widget.php'); $widgets[ $name ] = array('name' => ucwords(str_replace('_', ' ', $name)), 'display' => 'none'); } ##insert the system information widget as first, so as to be displayed first unset($widgets['system_information']); $widgets = array_merge(array('system_information' => array('name' => 'System Information')), $widgets); ##if no config entry found, initialize config entry if (!is_array($config['widgets'])) { $config['widgets'] = array(); } if ($_POST && $_POST['sequence']) { $config['widgets']['sequence'] = rtrim($_POST['sequence'], ','); foreach ($widgets as $widgetname => $widgetconfig) { if ($_POST[$widgetname . '-config']) { $config['widgets'][$widgetname . '-config'] = $_POST[$name . '-config']; } } write_config(gettext("Widget configuration has been changed.")); header("Location: /"); exit; } ## Load Functions Files require_once('includes/functions.inc.php'); ## 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'] <> '' && is_array($config['installedpackages']['package'])) { if ($g['platform'] == "pfSense" || $g['platform'] == "nanobsd") { ## If the user has logged into webGUI quickly while the system is booting then do not redirect them to ## the package reinstall page. That is about to be done by the boot script anyway. ## The code in head.inc will put up a notice to the user. if (!platform_booting()) { header('Location: pkg_mgr_install.php?mode=reinstallall'); exit; } } } else { conf_mount_rw(); @unlink('/conf/needs_package_sync'); conf_mount_ro(); } } ## If it is the first time webConfigurator has been ## accessed since initial install show this stuff. if (file_exists('/conf/trigger_initial_wizard')) { ?>
=gettext("One moment while we start the initial setup wizard.")?>
=gettext("Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.")?>
=sprintf(gettext("To bypass the wizard, click on the %s logo on the initial page."), $g['product_name'])?>