install.php
changeset 21 663fcf528726
parent 16 64e0d3d4cf14
child 27 dd659f6ba891
equal deleted inserted replaced
20:40105681f495 21:663fcf528726
     1 <?php
     1 <?php
     2 /*
     2 /*
     3  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     3  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     4  * Version 1.0 release candidate 3 (Druid)
     4  * Version 1.0 (Banshee)
     5  * Copyright (C) 2006-2007 Dan Fuhry
     5  * Copyright (C) 2006-2007 Dan Fuhry
     6  * install.php - handles everything related to installation and initial configuration
     6  * install.php - handles everything related to installation and initial configuration
     7  *
     7  *
     8  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     8  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     9  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
     9  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    21 }
    21 }
    22 
    22 
    23 define('IN_ENANO_INSTALL', 'true');
    23 define('IN_ENANO_INSTALL', 'true');
    24 
    24 
    25 define('ENANO_VERSION', '1.0');
    25 define('ENANO_VERSION', '1.0');
    26 define('ENANO_BETA_VERSION', '3'); // This is really RC
       
    27 // In beta versions, define ENANO_BETA_VERSION here
    26 // In beta versions, define ENANO_BETA_VERSION here
    28 
    27 
    29 if(!defined('scriptPath')) {
    28 if(!defined('scriptPath')) {
    30   $sp = dirname($_SERVER['REQUEST_URI']);
    29   $sp = dirname($_SERVER['REQUEST_URI']);
    31   if($sp == '/' || $sp == '\\') $sp = '';
    30   if($sp == '/' || $sp == '\\') $sp = '';
   256   default:
   255   default:
   257     break;
   256     break;
   258 }
   257 }
   259 
   258 
   260 $template = new template_nodb();
   259 $template = new template_nodb();
   261 $template->load_theme('stpatty', 'shamrock', false);
   260 $template->load_theme('oxygen', 'bleu', false);
   262 
   261 
   263 $modestrings = Array(
   262 $modestrings = Array(
   264               'welcome' => 'Welcome',
   263               'welcome' => 'Welcome',
   265               'license' => 'License Agreement',
   264               'license' => 'License Agreement',
   266               'sysreqs' => 'Server requirements',
   265               'sysreqs' => 'Server requirements',
   311   case 'welcome':
   310   case 'welcome':
   312     ?>
   311     ?>
   313     <div style="text-align: center; margin-top: 10px;">
   312     <div style="text-align: center; margin-top: 10px;">
   314       <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-blue.png" style="display: block; margin: 0 auto; padding-left: 100px;" />
   313       <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-blue.png" style="display: block; margin: 0 auto; padding-left: 100px;" />
   315       <h2>Welcome to Enano</h2>
   314       <h2>Welcome to Enano</h2>
   316       <h3>version 1.0rc3 &ndash; security release<br />
   315       <h3>version 1.0 &ndash; stable<br />
   317       <span style="font-weight: normal;">also affectionately known as "druid" <tt>:)</tt></span></h3>
   316       <span style="font-weight: normal;">also affectionately known as "banshee" <tt>:)</tt></span></h3>
   318       <?php
   317       <?php
   319       if ( file_exists('./_nightly.php') )
   318       if ( file_exists('./_nightly.php') )
   320       {
   319       {
   321         echo '<div class="warning-box" style="text-align: left; margin: 10px 0;"><b>You are about to install a NIGHTLY BUILD of Enano.</b><br />Nightly builds are NOT upgradeable and may contain serious flaws, security problems, or extraneous debugging information. Installing this version of Enano on a production site is NOT recommended.</div>';
   320         echo '<div class="warning-box" style="text-align: left; margin: 10px 0;"><b>You are about to install a NIGHTLY BUILD of Enano.</b><br />Nightly builds are NOT upgradeable and may contain serious flaws, security problems, or extraneous debugging information. Installing this version of Enano on a production site is NOT recommended.</div>';
   322       }
   321       }
  1040       $schema = str_replace('{{ENABLE_CACHE}}', mysql_real_escape_string($cacheonoff          ), $schema);
  1039       $schema = str_replace('{{ENABLE_CACHE}}', mysql_real_escape_string($cacheonoff          ), $schema);
  1041       $schema = str_replace('{{REAL_NAME}}',    '',                                              $schema);
  1040       $schema = str_replace('{{REAL_NAME}}',    '',                                              $schema);
  1042       $schema = str_replace('{{TABLE_PREFIX}}', $_POST['table_prefix'],                          $schema);
  1041       $schema = str_replace('{{TABLE_PREFIX}}', $_POST['table_prefix'],                          $schema);
  1043       $schema = str_replace('{{VERSION}}',      ENANO_VERSION,                                   $schema);
  1042       $schema = str_replace('{{VERSION}}',      ENANO_VERSION,                                   $schema);
  1044       $schema = str_replace('{{ADMIN_EMBED_PHP}}', $_POST['admin_embed_php'],                    $schema);
  1043       $schema = str_replace('{{ADMIN_EMBED_PHP}}', $_POST['admin_embed_php'],                    $schema);
  1045       $schema = str_replace('{{BETA_VERSION}}', ENANO_BETA_VERSION,                              $schema);
  1044       // Not anymore!! :-D
       
  1045       // $schema = str_replace('{{BETA_VERSION}}', ENANO_BETA_VERSION,                              $schema);
  1046       
  1046       
  1047       if(isset($_POST['wiki_mode'])) $schema = str_replace('{{WIKI_MODE}}', '1', $schema);
  1047       if(isset($_POST['wiki_mode'])) $schema = str_replace('{{WIKI_MODE}}', '1', $schema);
  1048       else $schema = str_replace('{{WIKI_MODE}}', '0', $schema);
  1048       else $schema = str_replace('{{WIKI_MODE}}', '0', $schema);
  1049       
  1049       
  1050       // Build an array of queries      
  1050       // Build an array of queries