Exemplo n.º 1
0
function save_conf($save_con, $array = false)
{
    global $handler;
    foreach ($save_con as $name => $value) {
        if (is_array($value)) {
            fwrite($handler, "'{$name}' => array (\n\n");
            save_conf($value, true);
        } else {
            $value = strtr($value, '"', "'");
            $value = trim(stripslashes($value));
            $value = htmlspecialchars($value, ENT_QUOTES);
            fwrite($handler, "'{$name}' => \"{$value}\",\n\n");
        }
    }
    if ($array) {
        fwrite($handler, "),\n\n");
    }
}
Exemplo n.º 2
0
    }
    if (file_exists(ENGINE_DIR . '/data/job_conf.php') && !is_writable(ENGINE_DIR . '/data/job_conf.php')) {
        $errors[] = $job->lang['settings_file_not_writable'];
    } elseif (!file_exists(ENGINE_DIR . '/data/job_conf.php') && !is_writable(ENGINE_DIR . '/data')) {
        $errors[] = $job->lang['settings_dir_not_writable'];
    }
    if (!$errors) {
        if ($job->member['group'] != 1) {
            $tpl->msg($lang['opt_denied'], $lang['opt_denied']);
        }
        $save_con['version_id'] = $job->config['version_id'];
        $save_con['use_country'] = $job->config['use_country'];
        $save_con['use_city'] = $job->config['use_city'];
        $handler = fopen(ENGINE_DIR . '/data/job_conf.php', "w");
        fwrite($handler, "<?PHP \n//Job Configurations\n\n\$job_cfg = array(\n\n");
        save_conf($save_con);
        fwrite($handler, ");\n\n?>");
        fclose($handler);
        Cache::ClearAllCache();
        $tpl->msg("info", $lang['opt_sysok'], $PHP_SELF);
    }
}
$JScript = <<<JS
<script type="text/javascript">
\$(document).ready(function()
{
\t\$("#setting").find("#general").show();
\t\$("#submenu").find("#general").css("border", "1px solid");
\t\$("#setting input:text").css("text-align", "center");
\t\$("#submenu").find("a").click(function()
\t{
Exemplo n.º 3
0
 function save_conf($save_con, $array = false)
 {
     global $handler, $find, $replace;
     foreach ($save_con as $name => $value) {
         if (is_array($value)) {
             fwrite($handler, "'{$name}' => array (\n\n");
             save_conf($value, true);
         } else {
             $value = strtr($value, '"', "'");
             fwrite($handler, "'{$name}' => \"" . stripslashes($value) . "\",\n\n");
         }
     }
     if ($array) {
         fwrite($handler, "),\n\n");
     }
 }
Exemplo n.º 4
0
 case "backcsv":
     BackupCSV($id, $option);
     break;
     ////// config
 ////// config
 case 'config':
     showConfig($option);
     break;
 case 'saveconfig':
     saveSettings($option);
     break;
 case 'cancelconfig':
     cancelSettings($option);
     break;
 case 'save_conf':
     save_conf($option);
     break;
     ////// wizard
 ////// wizard
 case 'form_wizard':
     form_wizard('', $option);
     break;
 case 'wizardedit':
     form_wizard($cid[0], $option);
     break;
 case 'wizard_elements':
     wizard_elements($option);
     break;
 case 'save_form_wizard':
     save_form_wizard($option);
     break;