Exemplo n.º 1
0
<?php

require_once 'lib/init.php';
switch ($task) {
    case 'settings':
        if (checkToken()) {
            if (updateSettings($_REQUEST)) {
                setmsg(t('Settings saved.'), 'notice', 'self');
            }
        }
        $sys = ZSystem::getSettings();
        $tpl_dir = ZH . "/tpl";
        $d = dir($tpl_dir);
        $themes = array();
        while ($f = $d->read()) {
            $param_file = "{$tpl_dir}/{$f}/param.ini";
            if (!is_file($param_file)) {
                continue;
            }
            $param = parse_ini_file($param_file);
            $themes[] = (object) $param;
        }
        break;
    case 'sync':
        syncSystemUsers();
        syncFtpUsers();
        syncVhosts();
        syncCBand();
        syncCrontab();
        setmsg(t('All data updated!'), 'notice');
        break;
Exemplo n.º 2
0
function getSettings()
{
    return ZSystem::getSettings();
}