Example #1
0
            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')) {
    $lang_code = system_get_language_code();
    $lang_codeset = system_get_language_codeset();
    echo <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{$lang_code}" xml:lang="{$lang_code}">
<head>
\t<title>{$g['product_name']}.localdomain - {$g['product_name']} first time setup</title>
\t<meta http-equiv="Content-Type" content="text/html; charset={$lang_codeset}" />
\t<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print" />
\t<script type="text/javascript">var theme = "{$g['theme']}"</script>
\t<script type="text/javascript" src="/themes/{$g['theme']}/loader.js"></script>

EOF;
    echo "<body link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">\n";
    if (file_exists("/usr/local/www/themes/{$g['theme']}/wizard.css")) {
        echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/wizard.css\" media=\"all\" />\n";
$curcfg = $config['system']['firmware'];
if (isset($curcfg['alturl']['enable'])) {
    $updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
} else {
    $updater_url = $g['update_url'];
}
if ($_POST['backupbeforeupgrade']) {
    touch("/tmp/perform_full_backup.txt");
}
$closehead = false;
$pgtitle = array(gettext("Diagnostics"), gettext("Firmware"), gettext("Auto Update"));
include "head.inc";
?>

<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo system_get_language_codeset();
?>
" />
<link href="gui.css" rel="stylesheet" type="text/css" />
</head>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC">

<?php 
include "fbegin.inc";
?>

<form action="system_firmware_auto.php" method="post">
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="firmware auto-check">
	<tr>
		<td>
Example #3
0
$attribs['bg'] = 'fill="#000000" stroke="none" stroke-width="0" opacity="1"';
$attribs['axis'] = 'fill="white" stroke="black"';
$attribs['cpu'] = 'fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="6"';
$attribs['graph_cpu'] = 'fill="none" stroke="#CA6110" stroke-opacity="0.8"';
$attribs['legend'] = 'fill="white" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"';
$attribs['graphname'] = 'fill="#435370" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="7"';
$attribs['grid_txt'] = 'fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="5"';
$attribs['grid'] = 'stroke="#C3C3C3" stroke-opacity="0.5"';
$attribs['error'] = 'fill="red" font-family="Arial" font-size="4"';
$attribs['collect_initial'] = 'fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"';
$error_text = gettext("Cannot get CPU load");
$height = 100;
//SVG internal height : do not modify
$width = 200;
//SVG internal width : do not modify
$encoding = system_get_language_codeset();
/********* Graph DATA **************/
header("Last-Modified: " . gmdate("D, j M Y H:i:s") . " GMT");
header("Expires: " . gmdate("D, j M Y H:i:s", time()) . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
// HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", FALSE);
header("Pragma: no-cache");
// HTTP/1.0
header("Content-type: image/svg+xml");
echo "<?xml version=\"1.0\" encoding=\"{$encoding}\"?>\n";
?>
<svg width="100%" height="100%" viewBox="0 0 <?php 
echo $width;
?>
 <?php