Changeset 1499 for trunk/gregarius/install.php
- Timestamp:
- 06/15/06 15:43:33 (2 years ago)
- Files:
-
- 1 modified
-
trunk/gregarius/install.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/install.php
r1246 r1499 26 26 ############################################################################### 27 27 28 define('GREGARIUS_RELEASE', '0.5. 4');29 define('GREGARIUS_CODENAME', ' Coots');28 define('GREGARIUS_RELEASE', '0.5.5'); 29 define('GREGARIUS_CODENAME', 'null'); 30 30 31 31 define('DBINIT', dirname(__FILE__) . '/dbinit.php'); … … 50 50 define('ADMIN_PASSWORD_HELP', 'The administrator password used to connect to the database. Make sure this user has GRANT privileges!'); 51 51 define('WEBSERVER_HELP', 'The location of the webserver. If in doubt, leave the default. Default: ' . WEB_SERVER_DEFAULT . ''); 52 53 global $hasWritePerm; 52 54 53 55 function install_main() { … … 246 248 . "<p><input type=\"hidden\" name=\"process\" value=\"1\" /></p>\n" 247 249 . "</form>\n" 248 . "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">\n"249 . "<h2>Step 5: Activate mod-rewrite (optional)</h2>\n"250 . "<p><input type=\"submit\" name=\"action\" value=\"" . ($hasWritePerm ? "Activate mod-rewrite" : "Download .htaccess file") . "\" /></p>\n"251 . "<p><input type=\"hidden\" name=\"process\" value=\"2\" /></p>\n"252 . "</form>\n"253 . "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">\n"254 . "<h2>Step 6: Goto Admin Section</h2>\n"255 . "<p><input type=\"submit\" name=\"action\" value=\"Start Using Gregarius!\" /></p>\n"256 . "<p><input type=\"hidden\" name=\"process\" value=\"3\" /></p>\n"257 . "</form>\n"258 250 . "</div>\n" 259 251 . "</body>\n" … … 261 253 } 262 254 263 if(file_exists(DBINIT) ) {255 if(file_exists(DBINIT) && empty($_POST['process'])) { 264 256 print("The dbinit.php file already exists in the Gregarius directory! Please remove it if you would like to use this installer."); 265 } else if(!empty($_POST['process'])){ 266 // process the post data 267 if(3 == $_POST['process']) { 268 header('Location: admin/'); 269 exit(); 270 } else if(2 == $_POST['process']) { 271 $success = @rename('.htaccess.disabled', '.htaccess'); 272 if(false == $success) { 273 $htaccess = file('.htaccess.disabled', 'r'); 274 header('Content-type: application/text'); 275 header('Content-Disposition: attachment; filename=".htaccess"'); 276 echo($htaccess); 277 } 278 279 exit(); 280 } else if(1 == $_POST['process']) { 257 } else if(1 == $_POST['process']) { 281 258 if(empty($_POST['server']) || 282 259 empty($_POST['database']) || … … 304 281 if(!$sql) { 305 282 print("Unable to connect to database! Please create manually."); 306 } else { 307 } 283 } 308 284 } else { 309 285 print("Invalid SQL Type!"); … … 382 358 fclose($fp); 383 359 384 exit();385 } 386 }360 header('Location: admin/'); 361 exit(); 362 } 387 363 } 388 364 } else { // dbinit.php does not exist and we are not asked to process
