示例#1
0
 }
 if ($disable_languages = get_post_bool('disable_languages')) {
     $config_output .= "\$disable_languages = true;\r\n";
 }
 if ($config_windows) {
     $config_output .= "\$config_windows = true;\r\n";
 }
 if ($defaultlanguage != 'en') {
     $config_output .= "\$defaultlanguage = '{$defaultlanguage}';\r\n";
 }
 //Advanced Settings
 if ($_REQUEST['applicationname'] != $applicationname) {
     $applicationname = get_post('applicationname');
     $config_output .= "\$applicationname = '{$applicationname}';\r\n";
 }
 if (get_post_bool('configstoragelocations')) {
     $configstoragelocations = true;
     $storagedir = get_post('storagedir');
     $storageurl = get_post('storageurl');
     $config_output .= "\$storagedir = '{$storagedir}';\r\n";
     $config_output .= "\$storageurl = '{$storageurl}';\r\n";
 } else {
     $storagedir = dirname(__FILE__) . "/../filestore";
     $configstoragelocations = false;
 }
 $ftp_server = get_post('ftp_server');
 $ftp_username = get_post('ftp_username');
 $ftp_password = get_post('ftp_password');
 $ftp_defaultfolder = get_post('ftp_defaultfolder');
 $config_output .= "\$ftp_server = '{$ftp_server}';\r\n";
 $config_output .= "\$ftp_username = '******';\r\n";
示例#2
0
        $smtp_password = get_post('smtp_password');
        $config_output .= "#SMTP settings\r\n";
        $config_output .= "\$use_smtp = true;\r\n";
        $config_output .= "\$use_phpmailer = true;\r\n";
        $config_output .= "\$smtp_secure = '{$smtp_secure}';\r\n";
        $config_output .= "\$smtp_host = '{$smtp_host}';\r\n";
        $config_output .= "\$smtp_port = {$smtp_port};\r\n";
        if ($smtp_auth) {
            $config_output .= "\$smtp_auth = true;\r\n";
            $config_output .= "\$smtp_username = '******';\r\n";
            $config_output .= "\$smtp_password = '******';\r\n";
        }
        $config_output .= " \r\n";
    }
    //Design Configuration
    $slimtheme = get_post_bool('slim-theme');
    if ($slimtheme) {
        $config_output .= "\r\n#Design Changes\r\n\$slimheader=true;\r\n";
        #$config_output.= "\$available_themes=array('slimcharcoal', 'multi', 'whitegry','greyblu','black');\r\n\$defaulttheme='slimcharcoal';\r\n";
    }
    # Append defaults for new systems.
    $config_output .= file_get_contents(dirname(__FILE__) . "/../include/config.new_installs.php");
}
//Output Section
if (isset($_REQUEST['submit']) && !isset($errors)) {
    //Form submission was a success.  Output the config file and refrain from redisplaying the form.
    $fhandle = fopen($outputfile, 'w') or die("Error opening output file.  (This should never happen, we should have caught this before we got here)");
    fwrite($fhandle, "<?php\r\n" . $config_output);
    //NOTE: php opening tag is prepended to the output.
    fclose($fhandle);
    if (!empty($structural_plugin) && !$develmode) {