Exemplo n.º 1
0
            config_unlock();
        }
        if ($pconfig['systime'] !== "Not Set" && !empty($pconfig['systime'])) {
            $timestamp = strtotime($pconfig['systime']);
            if (FALSE !== $timestamp) {
                $timestamp = strftime("%g%m%d%H%M", $timestamp);
                // The date utility exits 0 on success, 1 if unable to set the date,
                // and 2 if able to set the local date, but unable to set it globally.
                $retval |= mwexec("/bin/date -n {$timestamp}");
                $pconfig['systime'] = "Not Set";
            }
        }
        $savemsg = get_std_save_message($retval);
        // Update DNS server controls.
        list($pconfig['dns1'], $pconfig['dns2']) = get_ipv4dnsserver();
        list($pconfig['ipv6dns1'], $pconfig['ipv6dns2']) = get_ipv6dnsserver();
        // Reload page if language has been changed, otherwise page is displayed
        // in previous selected language.
        if ($oldlanguage !== $config['system']['language']) {
            header("Location: system.php");
            exit;
        }
    }
}
$pglocalheader = <<<EOD
<link rel="stylesheet" type="text/css" href="datechooser.css" />
<script type="text/javascript" src="datechooser.js"></script>
EOD;
include "fbegin.inc";
?>
<script type="text/javascript">
Exemplo n.º 2
0
</table>
<?php 
// make sure normal user such as www can write to temporary
$perms = fileperms("/tmp");
if (($perms & 01777) != 01777) {
    $errormsg .= sprintf(gettext("Wrong permission on %s."), "/tmp");
    $errormsg .= "<br />\n";
}
$perms = fileperms("/var/tmp");
if (($perms & 01777) != 01777) {
    $errormsg .= sprintf(gettext("Wrong permission on %s."), "/var/tmp");
    $errormsg .= "<br />\n";
}
// check DNS
list($v4dns1, $v4dns2) = get_ipv4dnsserver();
list($v6dns1, $v6dns2) = get_ipv6dnsserver();
if (empty($v4dns1) && empty($v4dns2) && empty($v6dns1) && empty($v6dns2)) {
    // need by service/firmware check?
    if (!isset($config['system']['disablefirmwarecheck']) || isset($config['ftpd']['enable'])) {
        $errormsg .= gettext("No DNS setting found.");
        $errormsg .= "<br />\n";
    }
}
if (!empty($errormsg)) {
    print_error_box($errormsg);
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="tabcont">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">