From: jamiesensei Date: Wed, 20 Jun 2007 06:32:26 +0000 (+0000) Subject: added styles to install.php for colours for environment table X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=53a0367d10fc4327a1a6f4dc4463bcb8d1b1fed6;p=moodle.git added styles to install.php for colours for environment table --- diff --git a/install.php b/install.php index d46057706a..cb38d300ea 100644 --- a/install.php +++ b/install.php @@ -3,7 +3,7 @@ /// If config.php exists already then we are not needed. -if (file_exists('./config.php')) { +if (file_exists('./config.php')) { header('Location: index.php'); die; } else { @@ -107,13 +107,13 @@ if (isset($_POST['stage'])) { if ($nextstage < 0) { $nextstage = WELCOME; } - + } else { $goforward = true; $nextstage = WELCOME; - + } //==========================================================================// @@ -208,7 +208,7 @@ if (isset($_GET['help'])) { /// Are we in config download mode? if (isset($_GET['download'])) { - header("Content-Type: application/x-forcedownload\n"); + header("Content-Type: application/x-forcedownload\n"); header("Content-Disposition: attachment; filename=\"config.php\""); echo $INSTALL['config']; exit; @@ -225,7 +225,7 @@ if (isset($_GET['download'])) { if ($INSTALL['stage'] == DIRECTORY) { error_reporting(0); - + /// check wwwroot if (ini_get('allow_url_fopen') && false) { /// This was not reliable if (($fh = @fopen($INSTALL['wwwrootform'].'/install.php', 'r')) === false) { @@ -234,12 +234,12 @@ if ($INSTALL['stage'] == DIRECTORY) { } } if ($fh) fclose($fh); - + /// check dirroot if (($fh = @fopen($INSTALL['dirrootform'].'/install.php', 'r')) === false ) { $errormsg .= get_string('dirrooterror', 'install').'
'; $INSTALL['dirrootform'] = $INSTALL['dirroot']; - } + } if ($fh) fclose($fh); /// check dataroot @@ -247,7 +247,7 @@ if ($INSTALL['stage'] == DIRECTORY) { if (make_upload_directory('sessions', false) === false ) { $errormsg .= get_string('datarooterror', 'install').'
'; } - if ($fh) fclose($fh); + if ($fh) fclose($fh); if (!empty($errormsg)) $nextstage = DIRECTORY; @@ -262,7 +262,7 @@ if ($INSTALL['stage'] == DIRECTORY) { /// Try to connect to the database. If that fails then try to create the database if ($INSTALL['stage'] == DATABASE) { - + /// different format for postgres7 by socket if ($INSTALL['dbtype'] == 'postgres7' and ($INSTALL['dbhost'] == 'localhost' || $INSTALL['dbhost'] == '127.0.0.1')) { $INSTALL['dbhost'] = "user='{$INSTALL['dbuser']}' password='{$INSTALL['dbpass']}' dbname='{$INSTALL['dbname']}'"; @@ -334,11 +334,11 @@ if ($INSTALL['stage'] == DATABASE) { if (empty($errormsg)) { - error_reporting(0); // Hide errors + error_reporting(0); // Hide errors if (! $dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'])) { /// The following doesn't seem to work but we're working on it - /// If you come up with a solution for creating a database in MySQL + /// If you come up with a solution for creating a database in MySQL /// feel free to put it in and let us know if ($dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'])) { switch ($INSTALL['dbtype']) { /// Try to create a database @@ -353,7 +353,7 @@ if ($INSTALL['stage'] == DATABASE) { } } } else { - /// We have been able to connect properly, just test the database encoding now. + /// We have been able to connect properly, just test the database encoding now. /// It must be Unicode for 1.8 installations. $encoding = ''; switch ($INSTALL['dbtype']) { @@ -490,7 +490,7 @@ if ($INSTALL['stage'] == DOWNLOADLANG && $INSTALL['downloadlangpack']) { $INSTALL['showdownloadlangpack'] = false; $INSTALL['downloadlangpackerror'] = $downloaderror; } -} +} @@ -539,7 +539,7 @@ if ($nextstage == SAVE) { fwrite($fh, $str); fclose($fh); } - + $INSTALL['config'] = $str; } @@ -629,7 +629,7 @@ if (isset($_GET['help'])) { - + $errormsg

\n"; @@ -646,7 +646,7 @@ if ($nextstage == SAVE) { echo "\n"; echo " \n"; echo " \n"; - echo "\n"; + echo "\n"; print_single_button("index.php", $options, get_string('continue')); echo "\n"; echo "\n"; @@ -654,16 +654,16 @@ if ($nextstage == SAVE) { } else { echo "

".get_string('configfilenotwritten', 'install')."

"; - + echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; echo "\n"; @@ -703,7 +703,7 @@ if ($nextstage == SAVE) { - get_string('mysql', 'install'), 'oci8po' => get_string('oci8po', 'install'), - 'postgres7' => get_string('postgres7', 'install'), - 'mssql' => get_string('mssql', 'install'), - 'mssql_n' => get_string('mssql_n', 'install'), - 'odbc_mssql' => get_string('odbc_mssql', 'install')), + 'postgres7' => get_string('postgres7', 'install'), + 'mssql' => get_string('mssql', 'install'), + 'mssql_n' => get_string('mssql_n', 'install'), + 'odbc_mssql' => get_string('odbc_mssql', 'install')), 'dbtype', $INSTALL['dbtype'], '', 'toggledbinfo();') ?> @@ -889,7 +889,7 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") { print_single_button('install.php', $options, get_string('downloadlanguagebutton','install', $languages[$INSTALL['language']]), 'POST'); print_simple_box_end(); } else { - /// Show result info + /// Show result info /// English lang packs aren't downloaded if (substr($INSTALL['language'],0,2) == 'en') { print_simple_box(get_string('downloadlanguagenotneeded', 'install', $languages[$INSTALL['language']]), 'center', '80%'); @@ -939,7 +939,7 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") { - +
 \n"; + echo "\n"; $installoptions = array(); - $installoptions['download'] = 1; + $installoptions['download'] = 1; print_single_button("install.php", $installoptions, get_string('download', 'install')); echo "\n"; + echo "\n"; print_single_button("index.php", $options, get_string('continue')); echo "
"; echo "\n"; } - + //==========================================================================// @@ -1086,7 +1086,7 @@ function css_styles() {