Ejemplo n.º 1
0
function html_replace($data)
{
    $data = str_replace("<", "&lt", $data);
    $data = str_replace(">", "&gt", $data);
    return html_nl($data);
}
Ejemplo n.º 2
0
         }
         if ($db->query($sql8) !== TRUE) {
             echo "<h3>1. " . $text["no_db"] . "</h3>";
             echo "<pre>" . html_nl($sql8) . "</pre>";
         }
         if ($db->query($sql9) !== TRUE) {
             echo "<h3>1. " . $text["no_db"] . "</h3>";
             echo "<pre>" . html_nl($sql9) . "</pre>";
         }
         if ($db->query($sql10) !== TRUE) {
             echo "<h3>1. " . $text["no_db"] . "</h3>";
             echo "<pre>" . html_nl($sql10) . "</pre>";
         }
         if ($db->query($sql11) !== TRUE) {
             echo "<h3>1. " . $text["no_db"] . "</h3>";
             echo "<pre>" . html_nl($sql11) . "</pre>";
         }
         $db->close();
         echo "<h3>1. " . $text["db_created"] . "</h3>";
     }
     $config_file = "<?php\n\$config = array(\n\t// Database\n\t'dbhost' => '" . $_POST["dbhost"] . "',\n\t'dbname' => '" . $_POST["dbname"] . "',\n\t'dbuser' => '" . $_POST["dbuser"] . "',\n\t'dbpassword' => '" . $_POST["dbpassword"] . "',\n\t'dbprefix' => '" . $_POST["dbprefix"] . "',\n\n\t// User\n\t'salt' => '" . $_POST["salt"] . "',\n\n\t// Logfiles\n\t'log' => '" . $_POST["logfiles"] . "', // NO, NORMAL, PARANOID, DEBUG\n\n\t// deadline Server time\n\t'dlyear' => " . $_POST["dlyear"] . ",\n\t'dlday' => " . $_POST["dlday"] . ",\n\t'dlmonth' => " . $_POST["dlmonth"] . ",\n\t'dlhour' => " . $_POST["dlhour"] . ",\n\t'dlminute' => " . $_POST["dlminute"] . ",\n\t'dlsecond' => " . $_POST["dlsecond"] . ",\n\n\t// jury goal\n\t'goal' => " . $_POST["goal"] . ",\n\n\t// language\n\t'language' => '" . $_POST["language"] . "', // de-at, de, en, sr\n\n\t// category Commons\n\t'catadd' => array(\n\t\t" . $_POST["catadd"] . "\n\t),\n\t'catremove' => array(\n\t\t" . $_POST["catremove"] . "\n\t),\n\n\t'license' => array(\n\t\t" . $_POST["license"] . "\n\t),\n\n\t// general settings\n\t'title' => '" . $_POST["title"] . "',\n\t'name' => '" . $_POST["name"] . "',\n\t'version' => '" . $_POST["version"] . "',\n\t'url' => '" . $_POST["url"] . "',\n\t'mail' => '" . $_POST["mail"] . "',\n\t'logo' => '" . $_POST["logo"] . "',\n\t'icon' => '" . $_POST["icon"] . "',\n\t'time' => '" . $_POST["time"] . "', // commons loves UTC but MESZ is +2\n);\n?>\n";
     save_file("config/config.php", unix_nl($config_file));
     if (file_exists("config/config.php")) {
         echo "<h3>2. " . $text["config_created"] . "</h3>";
     } else {
         echo "<h3>2. " . $text["no_config"] . "</h3>";
         echo "<pre>" . html_replace($config_file) . "</pre>";
     }
     echo "<h3>3. " . $text["clean_up"] . "</h3>";
 } else {
     ?>