install.php
changeset 245 54392ae2c222
parent 244 09f8a9a03ccf
child 248 ed13b72b13cc
equal deleted inserted replaced
242:78a94f7bb5e3 245:54392ae2c222
    23 }
    23 }
    24 
    24 
    25 define('IN_ENANO_INSTALL', 'true');
    25 define('IN_ENANO_INSTALL', 'true');
    26 
    26 
    27 define('ENANO_VERSION', '1.1.1');
    27 define('ENANO_VERSION', '1.1.1');
       
    28 define('ENANO_CODE_NAME', 'Germination');
    28 // In beta versions, define ENANO_BETA_VERSION here
    29 // In beta versions, define ENANO_BETA_VERSION here
    29 
    30 
    30 // This is required to make installation work right
    31 // This is required to make installation work right
    31 define("ENANO_ALLOW_LOAD_NOLANG", 1);
    32 define("ENANO_ALLOW_LOAD_NOLANG", 1);
    32 
    33 
    63 
    64 
    64 require('includes/wikiformat.php');
    65 require('includes/wikiformat.php');
    65 require('includes/constants.php');
    66 require('includes/constants.php');
    66 require('includes/rijndael.php');
    67 require('includes/rijndael.php');
    67 require('includes/functions.php');
    68 require('includes/functions.php');
       
    69 require('includes/dbal.php');
       
    70 require('includes/lang.php');
       
    71 require('includes/json.php');
    68 
    72 
    69 strip_magic_quotes_gpc();
    73 strip_magic_quotes_gpc();
    70 $neutral_color = 'C';
       
    71 
    74 
    72 //
    75 //
    73 // INSTALLER LIBRARY
    76 // INSTALLER LIBRARY
    74 //
    77 //
       
    78 
       
    79 $neutral_color = 'C';
    75 
    80 
    76 function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true)
    81 function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true)
    77 {
    82 {
    78   static $resumed = false;
    83   static $resumed = false;
    79   static $resume_stack = array();
    84   static $resume_stack = array();
   655   $cv = not($cv);
   660   $cv = not($cv);
   656   $val = eval($code);
   661   $val = eval($code);
   657   if($val)
   662   if($val)
   658   {
   663   {
   659     if($cv) $color='CCFFCC'; else $color='AAFFAA';
   664     if($cv) $color='CCFFCC'; else $color='AAFFAA';
   660     echo "<tr><td style='background-color: #$color; width: 500px;'>$desc</td><td style='padding-left: 10px;'><img alt='Test passed' src='images/good.gif' /></td></tr>";
   665     echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc</td><td style='padding-left: 10px;'><img alt='Test passed' src='images/good.gif' /></td></tr>";
   661   } elseif(!$val && $warn) {
   666   } elseif(!$val && $warn) {
   662     if($cv) $color='FFFFCC'; else $color='FFFFAA';
   667     if($cv) $color='FFFFCC'; else $color='FFFFAA';
   663     echo "<tr><td style='background-color: #$color; width: 500px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test passed with warning' src='images/unknown.gif' /></td></tr>";
   668     echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test passed with warning' src='images/unknown.gif' /></td></tr>";
   664     $warned = true;
   669     $warned = true;
   665   } else {
   670   } else {
   666     if($cv) $color='FFCCCC'; else $color='FFAAAA';
   671     if($cv) $color='FFCCCC'; else $color='FFAAAA';
   667     echo "<tr><td style='background-color: #$color; width: 500px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test failed' src='images/bad.gif' /></td></tr>";
   672     echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test failed' src='images/bad.gif' /></td></tr>";
   668     $failed = true;
   673     $failed = true;
   669   }
   674   }
   670 }
   675 }
   671 function is_apache() { $r = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? true : false; return $r; }
   676 function is_apache()
       
   677 {
       
   678   return strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? true : false;
       
   679 }
   672 
   680 
   673 require_once('includes/template.php');
   681 require_once('includes/template.php');
   674 
   682 
   675 if(!isset($_GET['mode'])) $_GET['mode'] = 'welcome';
   683 //
       
   684 // Startup localization
       
   685 //
       
   686 
       
   687 // We need $db just for the _die function
       
   688 $db = new mysql();
       
   689 
       
   690 $lang = new Language('eng');
       
   691 $lang->load_file('./language/english/install.json');
       
   692 
       
   693 if ( !isset($_GET['mode']) )
       
   694   $_GET['mode'] = 'welcome';
       
   695 
   676 switch($_GET['mode'])
   696 switch($_GET['mode'])
   677 {
   697 {
   678   case 'mysql_test':
   698   case 'mysql_test':
   679     error_reporting(0);
   699     error_reporting(0);
   680     $dbhost     = rawurldecode($_POST['host']);
   700     $dbhost     = rawurldecode($_POST['host']);
   800   </body>
   820   </body>
   801 </html>
   821 </html>
   802 EOF;
   822 EOF;
   803     exit;
   823     exit;
   804     break;
   824     break;
       
   825   case 'langjs':
       
   826     header('Content-type: text/javascript');
       
   827     $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
       
   828     $lang_js = $json->encode($lang->strings);
       
   829     // use EEOF here because jEdit misinterprets "typ'eof'"
       
   830     echo <<<EEOF
       
   831 if ( typeof(enano_lang) != 'object' )
       
   832   var enano_lang = new Object();
       
   833 
       
   834 enano_lang[1] = $lang_js;
       
   835 
       
   836 EEOF;
       
   837     exit;
       
   838     break;
   805   default:
   839   default:
   806     break;
   840     break;
   807 }
   841 }
   808 
   842 
   809 $template = new template_nodb();
   843 $template = new template_nodb();
   810 $template->load_theme('stpatty', 'shamrock', false);
   844 $template->load_theme('stpatty', 'shamrock', false);
   811 
   845 
   812 $modestrings = Array(
   846 $modestrings = Array(
   813               'welcome' => 'Welcome',
   847               'welcome' => $lang->get('welcome_modetitle'),
   814               'license' => 'License Agreement',
   848               'license' => $lang->get('license_modetitle'),
   815               'sysreqs' => 'Server requirements',
   849               'sysreqs' => $lang->get('sysreqs_modetitle'),
   816               'database'=> 'Database information',
   850               'database'=> $lang->get('database_modetitle'),
   817               'website' => 'Website configuration',
   851               'website' => $lang->get('website_modetitle'),
   818               'login'   => 'Administration login',
   852               'login'   => $lang->get('login_modetitle'),
   819               'confirm' => 'Confirm installation',
   853               'confirm' => $lang->get('confirm_modetitle'),
   820               'install' => 'Database installation',
   854               'install' => $lang->get('install_modetitle'),
   821               'finish'  => 'Installation complete'
   855               'finish'  => $lang->get('finish_modetitle')
   822             );
   856             );
   823 
   857 
   824 $sideinfo = '';
   858 $sideinfo = '';
   825 $vars = $template->extract_vars('elements.tpl');
   859 $vars = $template->extract_vars('elements.tpl');
   826 $p = $template->makeParserText($vars['sidebar_button']);
   860 $p = $template->makeParserText($vars['sidebar_button']);
   848 if(isset($_GET['mode']) && $_GET['mode'] == 'css')
   882 if(isset($_GET['mode']) && $_GET['mode'] == 'css')
   849 {
   883 {
   850   header('Content-type: text/css');
   884   header('Content-type: text/css');
   851   echo $template->get_css();
   885   echo $template->get_css();
   852   exit;
   886   exit;
       
   887 }
       
   888 
       
   889 if ( defined('ENANO_IS_STABLE') )
       
   890   $branch = 'stable';
       
   891 else if ( defined('ENANO_IS_UNSTABLE') )
       
   892   $branch = 'unstable';
       
   893 else
       
   894 {
       
   895   $version = explode('.', ENANO_VERSION);
       
   896   if ( !isset($version[1]) )
       
   897     // unknown branch, really
       
   898     $branch = 'unstable';
       
   899   else
       
   900   {
       
   901     $version[1] = intval($version[1]);
       
   902     if ( $version[1] % 2 == 1 )
       
   903       $branch = 'unstable';
       
   904     else
       
   905       $branch = 'stable';
       
   906   }
   853 }
   907 }
   854 
   908 
   855 $template->header();
   909 $template->header();
   856 if(!isset($_GET['mode'])) $_GET['mode'] = 'license';
   910 if(!isset($_GET['mode'])) $_GET['mode'] = 'license';
   857 switch($_GET['mode'])
   911 switch($_GET['mode'])
   859   default:
   913   default:
   860   case 'welcome':
   914   case 'welcome':
   861     ?>
   915     ?>
   862     <div style="text-align: center; margin-top: 10px;">
   916     <div style="text-align: center; margin-top: 10px;">
   863       <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-green.png" style="display: block; margin: 0 auto; padding-left: 100px;" />
   917       <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-green.png" style="display: block; margin: 0 auto; padding-left: 100px;" />
   864       <h2>Welcome to Enano</h2>
   918       <h2><?php echo $lang->get('welcome_heading'); ?></h2>
   865       <h3>version 1.1.1 &ndash; unstable</h3>
   919       <h3>
       
   920         <?php
       
   921         $branch_l = $lang->get("welcome_branch_$branch");
       
   922         
       
   923         $v_string = sprintf('%s %s &ndash; %s', $lang->get('welcome_version'), ENANO_VERSION, $branch_l);
       
   924         echo $v_string;
       
   925         ?>
       
   926       </h3>
   866       <?php
   927       <?php
   867       if ( file_exists('./_nightly.php') )
   928         if ( defined('ENANO_CODE_NAME') )
   868       {
   929         {
   869         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>';
   930           echo '<p>';
   870       }
   931           echo $lang->get('welcome_aka', array(
       
   932               'codename' => strtolower(ENANO_CODE_NAME)
       
   933             ));
       
   934           echo '</p>';
       
   935         }
   871       ?>
   936       ?>
   872       <form action="install.php?mode=license" method="post">
   937       <form action="install.php?mode=license" method="post">
   873         <input type="submit" value="Start installation" />
   938         <input type="submit" value="<?php echo $lang->get('welcome_btn_start'); ?>" />
   874       </form>
   939       </form>
   875     </div>
   940     </div>
   876     <?php
   941     <?php
   877     break;
   942     break;
   878   case "license":
   943   case "license":
   879     ?>
   944     ?>
   880     <h3>Welcome to the Enano installer.</h3>
   945     <h3><?php echo $lang->get('license_heading'); ?></h3>
   881      <p>Thank you for choosing Enano as your CMS. You've selected the finest in design, the strongest in security, and the latest in Web 2.0 toys. Trust us, you'll like it.</p>
   946      <p><?php echo $lang->get('license_blurb_thankyou'); ?></p>
   882      <p>To get started, please read and accept the following license agreement. You've probably seen it before.</p>
   947      <p><?php echo $lang->get('license_blurb_pleaseread'); ?></p>
   883      <div style="height: 500px; clip: rect(0px,auto,500px,auto); overflow: auto; padding: 10px; border: 1px dashed #456798; margin: 1em;">
   948      <div style="height: 500px; clip: rect(0px,auto,500px,auto); overflow: auto; padding: 10px; border: 1px dashed #456798; margin: 1em;">
   884        <h2>GNU General Public License</h2>
       
   885        <h3>Declaration of license usage</h3>
       
   886        <p>Enano is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p>
       
   887        <p>This program is distributed in the hope that it will be useful, but <u>without any warranty</u>; without even the implied warranty of <u>merchantability</u> or <u>fitness for a particular purpose</u>. See the GNU General Public License (below) for more details.</p>
       
   888        <p><b>By clicking the button below or otherwise continuing the installation, you indicate your acceptance of this license agreement.</b></p>
       
   889        <h3>Human-readable version</h3>
       
   890        <p>Enano is distributed under certain licensing terms that we believe make it of the greatest possible use to the public. The license we distribute it under, the GNU General Public License, provides certain terms and conditions that, rather than limit your use of Enano, allow you to get the most out of it. If you would like to read the full text, it can be found below. Here is a human-readable version that we think is a little easier to understand.</p>
       
   891        <ul>
       
   892        <li>You may to run Enano for any purpose.</li>
       
   893        <li>You may study how Enano works and adapt it to your needs.</li>
       
   894        <li>You may redistribute copies so you can help your neighbor.</li>
       
   895        <li>You may improve Enano and release your improvements to the public, so that the whole community benefits.</li>
       
   896        </ul>
       
   897        <p>You may exercise the freedoms specified here provided that you comply with the express conditions of this license. The principal conditions are:</p>
       
   898        <ul>
       
   899        <li>You must conspicuously and appropriately publish on each copy distributed an appropriate copyright notice and disclaimer of warranty and keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of Enano a copy of the GNU General Public License along with Enano. Any translation of the GNU General Public License must be accompanied by the GNU General Public License.</li>
       
   900        <li>If you modify your copy or copies of Enano or any portion of it, or develop a program based upon it, you may distribute the resulting work provided you do so under the GNU General Public License. Any translation of the GNU General Public License must be accompanied by the GNU General Public License.</li>
       
   901        <li>If you copy or distribute Enano, you must accompany it with the complete corresponding machine-readable source code or with a written offer, valid for at least three years, to furnish the complete corresponding machine-readable source code.</li>
       
   902        </ul>
       
   903        <p><b>Disclaimer</b>: The above text is not a license. It is simply a handy reference for understanding the Legal Code (the full license) &ndash; it is a human-readable expression of some of its key terms. Think of it as the user-friendly interface to the Legal Code beneath. The above text itself has no legal value, and its contents do not appear in the actual license.<br /><span style="color: #CCC">Text copied from the <a href="http://creativecommons.org/licenses/GPL/2.0/">Creative Commons GPL Deed page</a></span></p>
       
   904        <?php
   949        <?php
   905        if ( defined('ENANO_BETA_VERSION') )
   950        if ( !file_exists('./GPL') || !file_exists('./language/english/install/license-deed.html') )
       
   951        {
       
   952          echo 'Cannot find the license files.';
       
   953        }
       
   954        echo file_get_contents('./language/english/install/license-deed.html');
       
   955        if ( defined('ENANO_BETA_VERSION') || $branch == 'unstable' )
   906        {
   956        {
   907          ?>
   957          ?>
   908          <h3>Notice for prerelease versions</h3>
   958          <h3><?php echo $lang->get('license_info_unstable_title'); ?></h3>
   909          <p>This version of Enano is designed only for testing and evaluation purposes. <b>It is not yet completely stable, and should not be used on production websites.</b> As with any Enano version, Dan Fuhry and the Enano team cannot be responsible for any damage, physical or otherwise, to any property as a result of the use of Enano. While security is a number one priority, sometimes things slip through.</p>
   959          <p><?php echo $lang->get('license_info_unstable_body'); ?></p>
   910          <?php
   960          <?php
   911        }
   961        }
   912        ?>
   962        ?>
   913        <h3>Lawyer-readable version</h3>
   963        <h3><?php echo $lang->get('license_section_gpl_heading'); ?></h3>
       
   964        <?php if ( $lang->lang_code != 'eng' ): ?>
       
   965        <p><i><?php echo $lang->get('license_gpl_blurb_inenglish'); ?></i></p>
       
   966        <?php endif; ?>
   914        <?php echo wikiFormat(file_get_contents(ENANO_ROOT . '/GPL')); ?>
   967        <?php echo wikiFormat(file_get_contents(ENANO_ROOT . '/GPL')); ?>
   915      </div>
   968      </div>
   916      <div class="pagenav">
   969      <div class="pagenav">
   917        <form action="install.php?mode=sysreqs" method="post">
   970        <form action="install.php?mode=sysreqs" method="post">
   918          <table border="0">
   971          <table border="0">
   919          <tr>
   972          <tr>
   920          <td><input type="submit" value="I agree to the license terms" /></td><td><p><span style="font-weight: bold;">Before clicking continue:</span><br />&bull; Ensure that you agree with the terms of the license<br />&bull; Have your database host, name, username, and password available</p></td>
   973            <td>
       
   974              <input type="submit" value="<?php echo $lang->get('license_btn_i_agree'); ?>" />
       
   975            </td>
       
   976            <td>
       
   977              <p>
       
   978                <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
       
   979                &bull; <?php echo $lang->get('license_objective_ensure_agree'); ?><br />
       
   980                &bull; <?php echo $lang->get('license_objective_have_db_info'); ?>
       
   981              </p>
       
   982            </td>
   921          </tr>
   983          </tr>
   922          </table>
   984          </table>
   923        </form>
   985        </form>
   924      </div>
   986      </div>
   925     <?php
   987     <?php
   926     break;
   988     break;
   927   case "sysreqs":
   989   case "sysreqs":
   928     error_reporting(E_ALL);
   990     error_reporting(E_ALL);
   929     ?>
   991     ?>
   930     <h3>Checking your server</h3>
   992     <h3><?php echo $lang->get('sysreqs_heading'); ?></h3>
   931      <p>Enano has several requirements that must be met before it can be installed. If all is good then note any warnings and click Continue below.</p>
   993      <p><?php echo $lang->get('sysreqs_blurb'); ?></p>
   932     <table border="0" cellspacing="0" cellpadding="0">
   994     <table border="0" cellspacing="0" cellpadding="0">
   933     <?php
   995     <?php
   934     run_test('return version_compare(\'4.3.0\', PHP_VERSION, \'<\');', 'PHP Version >=4.3.0', 'It seems that the version of PHP that your server is running is too old to support Enano properly. If this is your server, please upgrade to the most recent version of PHP, remembering to use the --with-mysql configure option if you compile it yourself. If this is not your server, please contact your webhost and ask them if it would be possible to upgrade PHP. If this is not possible, you will need to switch to a different webhost in order to use Enano.');
   996     run_test('return version_compare(\'4.3.0\', PHP_VERSION, \'<\');', $lang->get('sysreqs_req_php'), $lang->get('sysreqs_req_desc_php') );
   935     run_test('return function_exists(\'mysql_connect\');', 'MySQL extension for PHP', 'It seems that your PHP installation does not have the MySQL extension enabled. If this is your own server, you may need to just enable the "libmysql.so" extension in php.ini. If you do not have the MySQL extension installed, you will need to either use your distribution\'s package manager to install it, or you will have to compile PHP from source. If you compile PHP from source, please remember to use the "--with-mysql" configure option, and you will have to have the MySQL development files installed (they usually are). If this is not your server, please contact your hosting company and ask them to install the PHP MySQL extension.');
   997     run_test('return function_exists(\'mysql_connect\');', $lang->get('sysreqs_req_mysql'), $lang->get('sysreqs_req_desc_mysql') );
   936     run_test('return @ini_get(\'file_uploads\');', 'File upload support', 'It seems that your server does not support uploading files. Enano *requires* this functionality in order to work properly. Please ask your server administrator to set the "file_uploads" option in php.ini to "On".');
   998     run_test('return @ini_get(\'file_uploads\');', $lang->get('sysreqs_req_uploads'), $lang->get('sysreqs_req_desc_uploads') );
   937     run_test('return is_apache();', 'Apache HTTP Server', 'Apparently your server is running a web server other than Apache. Enano will work nontheless, but there are some known bugs with non-Apache servers, and the "fancy" URLs will not work properly. The "Standard URLs" option will be set on the website configuration page, only change it if you are absolutely certain that your server is running Apache.', true);
   999     run_test('return is_apache();', $lang->get('sysreqs_req_apache'), $lang->get('sysreqs_req_desc_apache'), true);
   938     //run_test('return function_exists(\'finfo_file\');', 'Fileinfo PECL extension', 'The MIME magic PHP extension is used to determine the type of a file by looking for a certain "magic" string of characters inside it. This functionality is used by Enano to more effectively prevent malicious file uploads. The MIME magic option will be disabled by default.', true);
  1000     run_test('return is_writable(ENANO_ROOT.\'/config.new.php\');', $lang->get('sysreqs_req_config'), $lang->get('sysreqs_req_desc_config') );
   939     run_test('return is_writable(ENANO_ROOT.\'/config.new.php\');', 'Configuration file writable', 'It looks like the configuration file, config.new.php, is not writable. Enano needs to be able to write to this file in order to install.<br /><br /><b>If you are installing Enano on a SourceForge web site:</b><br />SourceForge mounts the web partitions read-only now, so you will need to use the project shell service to symlink config.php to a file in the /tmp/persistent directory.');
  1001     run_test('return file_exists(\'/usr/bin/convert\');', $lang->get('sysreqs_req_magick'), $lang->get('sysreqs_req_desc_magick'), true);
   940     run_test('return file_exists(\'/usr/bin/convert\');', 'ImageMagick support', 'Enano uses ImageMagick to scale images into thumbnails. Because ImageMagick was not found on your server, Enano will use the width= and height= attributes on the &lt;img&gt; tag to scale images. This can cause somewhat of a performance increase, but bandwidth usage will be higher, especially if you use high-resolution images on your site.<br /><br />If you are sure that you have ImageMagick, you can set the location of the "convert" program using the administration panel after installation is complete.', true);
  1002     run_test('return is_writable(ENANO_ROOT.\'/cache/\');', $lang->get('sysreqs_req_cachewriteable'), $lang->get('sysreqs_req_desc_cachewriteable'), true);
   941     run_test('return is_writable(ENANO_ROOT.\'/cache/\');', 'Cache directory writable', 'Apparently the cache/ directory is not writable. Enano will still work, but you will not be able to cache thumbnails, meaning the server will need to re-render them each time they are requested. In some cases, this can cause a significant slowdown.', true);
  1003     run_test('return is_writable(ENANO_ROOT.\'/files/\');', $lang->get('sysreqs_req_fileswriteable'), $lang->get('sysreqs_req_desc_fileswriteable'), true);
   942     run_test('return is_writable(ENANO_ROOT.\'/files/\');', 'File uploads directory writable', 'It seems that the directory where uploaded files are stored (' . ENANO_ROOT . '/files) cannot be written by the server. Enano will still function, but file uploads will not function, and will be disabled by default.', true);
       
   943     echo '</table>';
  1004     echo '</table>';
   944     if(!$failed)
  1005     if(!$failed)
   945     {
  1006     {
   946       ?>
  1007       ?>
   947       
  1008       
   948       <div class="pagenav">
  1009       <div class="pagenav">
   949       <?php
  1010       <?php
   950       if($warned) {
  1011       if($warned) {
   951         echo '<table border="0" cellspacing="0" cellpadding="0">';
  1012         echo '<table border="0" cellspacing="0" cellpadding="0">';
   952         run_test('return false;', 'Some scalebacks were made due to your server configuration.', 'Enano has detected that some of the features or configuration settings on your server are not optimal for the best behavior and/or performance for Enano. As a result, certain features or enhancements that are part of Enano have been disabled to prevent further errors. You have seen those "fatal error" notices that spew from PHP, haven\'t you?<br /><br />Fatal error:</b> call to undefined function wannahokaloogie() in file <b>'.__FILE__.'</b> on line <b>'.__LINE__.'', true);
  1013         run_test('return false;', $lang->get('sysreqs_summary_warn_title'), $lang->get('sysreqs_summary_warn_body'), true);
   953         echo '</table>';
  1014         echo '</table>';
   954       } else {
  1015       } else {
   955         echo '<table border="0" cellspacing="0" cellpadding="0">';
  1016         echo '<table border="0" cellspacing="0" cellpadding="0">';
   956         run_test('return true;', '<b>Your server meets all the requirements for running Enano.</b><br />Click the button below to continue the installation.', 'You should never see this text. Congratulations for being an Enano hacker!');
  1017         run_test('return true;', '<b>' . $lang->get('sysreqs_summary_success_title') . '</b><br />' . $lang->get('sysreqs_summary_success_body'), 'You should never see this text. Congratulations for being an Enano hacker!');
   957         echo '</table>';
  1018         echo '</table>';
   958       }
  1019       }
   959       ?>
  1020       ?>
   960        <form action="install.php?mode=database" method="post">
  1021       <form action="install.php?mode=database" method="post">
   961          <table border="0">
  1022         <table border="0">
   962          <tr>
  1023         <tr>
   963          <td><input type="submit" value="Continue" /></td><td><p><span style="font-weight: bold;">Before clicking continue:</span><br />&bull; Ensure that you are satisfied with any scalebacks that may have been made to accomodate your server configuration<br />&bull; Have your database host, name, username, and password available</p></td>
  1024           <td>
   964          </tr>
  1025             <input type="submit" value="<?php echo $lang->get('meta_btn_continue'); ?>" />
   965          </table>
  1026           </td>
   966        </form>
  1027           <td>
   967      </div>
  1028             <p>
   968      <?php
  1029               <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
   969     } else {
  1030               &bull; <?php echo $lang->get('sysreqs_objective_scalebacks'); ?><br />
   970       if($failed) {
  1031               &bull; <?php echo $lang->get('license_objective_have_db_info'); ?>
       
  1032             </p>
       
  1033           </td>
       
  1034         </tr>
       
  1035         </table>
       
  1036       </form>
       
  1037       </div>
       
  1038     <?php
       
  1039     }
       
  1040     else
       
  1041     {
       
  1042       if ( $failed )
       
  1043       {
   971         echo '<div class="pagenav"><table border="0" cellspacing="0" cellpadding="0">';
  1044         echo '<div class="pagenav"><table border="0" cellspacing="0" cellpadding="0">';
   972         run_test('return false;', 'Your server does not meet the requirements for Enano to run.', 'As a precaution, Enano will not install until the above requirements have been met. Contact your server administrator or hosting company and convince them to upgrade. Good luck.');
  1045         run_test('return false;', $lang->get('sysreqs_summary_fail_title'), $lang->get('sysreqs_summary_fail_body'));
   973         echo '</table></div>';
  1046         echo '</table></div>';
   974       }
  1047       }
   975     }
  1048     }
   976     ?>
  1049     ?>
   977     <?php
  1050     <?php
  1016       function ajaxTestConnection()
  1089       function ajaxTestConnection()
  1017       {
  1090       {
  1018         v = verify();
  1091         v = verify();
  1019         if(!v)
  1092         if(!v)
  1020         {
  1093         {
  1021           alert('One or more of the form fields is incorrect. Please correct any information in the form that has an "X" next to it.');
  1094           alert($lang.get('meta_msg_err_verification'));
  1022           return false;
  1095           return false;
  1023         }
  1096         }
  1024         var frm = document.forms.dbinfo;
  1097         var frm = document.forms.dbinfo;
  1025         db_host      = escape(frm.db_host.value.replace('+', '%2B'));
  1098         db_host      = escape(frm.db_host.value.replace('+', '%2B'));
  1026         db_name      = escape(frm.db_name.value.replace('+', '%2B'));
  1099         db_name      = escape(frm.db_name.value.replace('+', '%2B'));
  1039               {
  1112               {
  1040                 document.getElementById('s_db_host').src='images/good.gif';
  1113                 document.getElementById('s_db_host').src='images/good.gif';
  1041                 document.getElementById('s_db_name').src='images/good.gif';
  1114                 document.getElementById('s_db_name').src='images/good.gif';
  1042                 document.getElementById('s_db_auth').src='images/good.gif';
  1115                 document.getElementById('s_db_auth').src='images/good.gif';
  1043                 document.getElementById('s_db_root').src='images/good.gif';
  1116                 document.getElementById('s_db_root').src='images/good.gif';
  1044                 if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = '<b>Warning:<\/b> The database you specified does not exist. It will be created during installation.';
  1117                 if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_warn_creating_db');
  1045                 if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = '<b>Warning:<\/b> The specified regular user does not exist or the password is incorrect. The user will be created during installation. If the user already exists, the password will be reset.';
  1118                 if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_warn_creating_user');
  1046                 document.getElementById('s_mysql_version').src='images/good.gif';
  1119                 document.getElementById('s_mysql_version').src='images/good.gif';
  1047                 document.getElementById('e_mysql_version').innerHTML = 'Your version of MySQL meets Enano requirements.';
  1120                 document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_info_mysql_good');
  1048               }
  1121               }
  1049               else
  1122               else
  1050               {
  1123               {
  1051                 switch(s)
  1124                 switch(s)
  1052                 {
  1125                 {
  1053                 case 'host':
  1126                 case 'host':
  1054                   document.getElementById('s_db_host').src='images/bad.gif';
  1127                   document.getElementById('s_db_host').src='images/bad.gif';
  1055                   document.getElementById('s_db_name').src='images/unknown.gif';
  1128                   document.getElementById('s_db_name').src='images/unknown.gif';
  1056                   document.getElementById('s_db_auth').src='images/unknown.gif';
  1129                   document.getElementById('s_db_auth').src='images/unknown.gif';
  1057                   document.getElementById('s_db_root').src='images/unknown.gif';
  1130                   document.getElementById('s_db_root').src='images/unknown.gif';
  1058                   document.getElementById('e_db_host').innerHTML = '<b>Error:<\/b> The database server "'+document.forms.dbinfo.db_host.value+'" couldn\'t be contacted.<br \/>'+t;
  1131                   document.getElementById('e_db_host').innerHTML = $lang.get('database_msg_err_mysql_connect', { db_host: document.forms.dbinfo.db_host.value, mysql_error: t });
  1059                   document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.';
  1132                   document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
  1060                   break;
  1133                   break;
  1061                 case 'auth':
  1134                 case 'auth':
  1062                   document.getElementById('s_db_host').src='images/good.gif';
  1135                   document.getElementById('s_db_host').src='images/good.gif';
  1063                   document.getElementById('s_db_name').src='images/unknown.gif';
  1136                   document.getElementById('s_db_name').src='images/unknown.gif';
  1064                   document.getElementById('s_db_auth').src='images/bad.gif';
  1137                   document.getElementById('s_db_auth').src='images/bad.gif';
  1065                   document.getElementById('s_db_root').src='images/unknown.gif';
  1138                   document.getElementById('s_db_root').src='images/unknown.gif';
  1066                   document.getElementById('e_db_auth').innerHTML = '<b>Error:<\/b> Access to MySQL under the specified credentials was denied.<br \/>'+t;
  1139                   document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_err_mysql_auth', { mysql_error: t });
  1067                   document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.';
  1140                   document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
  1068                   break;
  1141                   break;
  1069                 case 'perm':
  1142                 case 'perm':
  1070                   document.getElementById('s_db_host').src='images/good.gif';
  1143                   document.getElementById('s_db_host').src='images/good.gif';
  1071                   document.getElementById('s_db_name').src='images/bad.gif';
  1144                   document.getElementById('s_db_name').src='images/bad.gif';
  1072                   document.getElementById('s_db_auth').src='images/good.gif';
  1145                   document.getElementById('s_db_auth').src='images/good.gif';
  1073                   document.getElementById('s_db_root').src='images/unknown.gif';
  1146                   document.getElementById('s_db_root').src='images/unknown.gif';
  1074                   document.getElementById('e_db_name').innerHTML = '<b>Error:<\/b> Access to the specified database using those login credentials was denied.<br \/>'+t;
  1147                   document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_err_mysql_dbperm', { mysql_error: t });
  1075                   document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.';
  1148                   document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
  1076                   break;
  1149                   break;
  1077                 case 'name':
  1150                 case 'name':
  1078                   document.getElementById('s_db_host').src='images/good.gif';
  1151                   document.getElementById('s_db_host').src='images/good.gif';
  1079                   document.getElementById('s_db_name').src='images/bad.gif';
  1152                   document.getElementById('s_db_name').src='images/bad.gif';
  1080                   document.getElementById('s_db_auth').src='images/good.gif';
  1153                   document.getElementById('s_db_auth').src='images/good.gif';
  1081                   document.getElementById('s_db_root').src='images/unknown.gif';
  1154                   document.getElementById('s_db_root').src='images/unknown.gif';
  1082                   document.getElementById('e_db_name').innerHTML = '<b>Error:<\/b> The specified database does not exist<br \/>'+t;
  1155                   document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_err_mysql_dbexist', { mysql_error: t });
  1083                   document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.';
  1156                   document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
  1084                   break;
  1157                   break;
  1085                 case 'root':
  1158                 case 'root':
  1086                   document.getElementById('s_db_host').src='images/good.gif';
  1159                   document.getElementById('s_db_host').src='images/good.gif';
  1087                   document.getElementById('s_db_name').src='images/unknown.gif';
  1160                   document.getElementById('s_db_name').src='images/unknown.gif';
  1088                   document.getElementById('s_db_auth').src='images/unknown.gif';
  1161                   document.getElementById('s_db_auth').src='images/unknown.gif';
  1089                   document.getElementById('s_db_root').src='images/bad.gif';
  1162                   document.getElementById('s_db_root').src='images/bad.gif';
  1090                   document.getElementById('e_db_root').innerHTML = '<b>Error:<\/b> Access to MySQL under the specified credentials was denied.<br \/>'+t;
  1163                   document.getElementById('e_db_root').innerHTML = $lang.get('database_msg_err_mysql_auth', { mysql_error: t });
  1091                   document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.';
  1164                   document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
  1092                   break;
  1165                   break;
  1093                 case 'vers':
  1166                 case 'vers':
  1094                   document.getElementById('s_db_host').src='images/good.gif';
  1167                   document.getElementById('s_db_host').src='images/good.gif';
  1095                   document.getElementById('s_db_name').src='images/good.gif';
  1168                   document.getElementById('s_db_name').src='images/good.gif';
  1096                   document.getElementById('s_db_auth').src='images/good.gif';
  1169                   document.getElementById('s_db_auth').src='images/good.gif';
  1097                   document.getElementById('s_db_root').src='images/good.gif';
  1170                   document.getElementById('s_db_root').src='images/good.gif';
  1098                   if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = '<b>Warning:<\/b> The database you specified does not exist. It will be created during installation.';
  1171                   if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_warn_creating_db');
  1099                   if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = '<b>Warning:<\/b> The specified regular user does not exist or the password is incorrect. The user will be created during installation. If the user already exists, the password will be reset.';
  1172                   if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_warn_creating_user');
  1100                   
  1173                   
  1101                   document.getElementById('e_mysql_version').innerHTML = '<b>Error:<\/b> Your version of MySQL ('+t+') is older than 4.1.17. Enano will still work, but there is a known bug with the comment system and MySQL 4.1.11 that involves some comments not being displayed, due to an issue with the PHP function mysql_fetch_row().';
  1174                   document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_err_mysql_version', { mysql_version: t });
  1102                   document.getElementById('s_mysql_version').src='images/bad.gif';
  1175                   document.getElementById('s_mysql_version').src='images/bad.gif';
  1103                 default:
  1176                 default:
  1104                   alert(t);
  1177                   alert(t);
  1105                   break;
  1178                   break;
  1106                 }
  1179                 }
  1169         else    frm._cont.disabled = true;
  1242         else    frm._cont.disabled = true;
  1170         return ret;
  1243         return ret;
  1171       }
  1244       }
  1172       window.onload = verify;
  1245       window.onload = verify;
  1173     </script>
  1246     </script>
  1174     <p>Now we need some information that will allow Enano to contact your database server. Enano uses MySQL as a data storage backend,
  1247     <p><?php echo $lang->get('database_blurb_needdb'); ?></p>
  1175        and we need to have access to a MySQL server in order to continue.</p>
  1248     <p><?php echo $lang->get('database_blurb_howtomysql'); ?></p>
  1176     <p>If you do not have access to a MySQL server, and you are using your own server, you can download MySQL for free from
       
  1177        <a href="http://www.mysql.com/">MySQL.com</a>. <b>Please note that, like Enano, MySQL is licensed under the GNU GPL.</b>
       
  1178        If you need to modify MySQL and then distribute your modifications, you must either distribute them under the terms of the GPL
       
  1179        or purchase a proprietary license.</p>
       
  1180     <?php
  1249     <?php
  1181     if ( file_exists('/etc/enano-is-virt-appliance') )
  1250     if ( file_exists('/etc/enano-is-virt-appliance') )
  1182     {
  1251     {
  1183       echo '<p><b>MySQL login information for this virtual appliance:</b><br /><br />Database hostname: localhost<br />Database login: username "enano", password: "clurichaun" (without quotes)<br />Database name: enano_www1</p>';
  1252       echo '<p>
       
  1253               ' . $lang->get('database_vm_login_info', array( 'host' => 'localhost', 'user' => 'enano', 'pass' => 'clurichaun', 'name' => 'enano_www1' )) . '
       
  1254             </p>';
  1184     }
  1255     }
  1185     ?>
  1256     ?>
  1186     <form name="dbinfo" action="install.php?mode=website" method="post">
  1257     <form name="dbinfo" action="install.php?mode=website" method="post">
  1187       <table border="0">
  1258       <table border="0">
  1188         <tr><td colspan="3" style="text-align: center"><h3>Database information</h3></td></tr>
  1259         <tr>
  1189         <tr><td><b>Database hostname</b><br />This is the hostname (or sometimes the IP address) of your MySQL server. In many cases, this is "localhost".<br /><span style="color: #993300" id="e_db_host"></span></td><td><input onkeyup="verify();" name="db_host" size="30" type="text" /></td><td><img id="s_db_host" alt="Good/bad icon" src="images/bad.gif" /></td></tr>
  1260           <td colspan="3" style="text-align: center">
  1190         <tr><td><b>Database name</b><br />The name of the actual database. If you don't already have a database, you can create one here, if you have the username and password of a MySQL user with administrative rights.<br /><span style="color: #993300" id="e_db_name"></span></td><td><input onkeyup="verify();" name="db_name" size="30" type="text" /></td><td><img id="s_db_name" alt="Good/bad icon" src="images/bad.gif" /></td></tr>
  1261             <h3><?php echo $lang->get('database_table_title'); ?></h3>
  1191         <tr><td rowspan="2"><b>Database login</b><br />These fields should be the username and password of a user with "select", "insert", "update", "delete", "create table", and "replace" privileges for your database.<br /><span style="color: #993300" id="e_db_auth"></span></td><td><input onkeyup="verify();" name="db_user" size="30" type="text" /></td><td rowspan="2"><img id="s_db_auth" alt="Good/bad icon" src="images/bad.gif" /></td></tr>
  1262           </td>
  1192         <tr><td><input name="db_pass" size="30" type="password" /></td></tr>
  1263         </tr>
  1193         <tr><td colspan="3" style="text-align: center"><h3>Optional information</h3></td></tr>
  1264         <tr>
  1194         <tr><td><b>Table prefix</b><br />The value that you enter here will be added to the beginning of the name of each Enano table. You may use lowercase letters (a-z), numbers (0-9), and underscores (_).</td><td><input onkeyup="verify();" name="table_prefix" size="30" type="text" /></td><td><img id="s_table_prefix" alt="Good/bad icon" src="images/good.gif" /></td></tr>
  1265           <td>
  1195         <tr><td rowspan="2"><b>Database administrative login</b><br />If the MySQL database or username that you entered above does not exist yet, you can create them here, assuming that you have the login information for an administrative user (such as root). Leave these fields blank unless you need to use them.<br /><span style="color: #993300" id="e_db_root"></span></td><td><input onkeyup="verify();" name="db_root_user" size="30" type="text" /></td><td rowspan="2"><img id="s_db_root" alt="Good/bad icon" src="images/good.gif" /></td></tr>
  1266             <b><?php echo $lang->get('database_field_hostname_title'); ?></b>
  1196         <tr><td><input onkeyup="verify();" name="db_root_pass" size="30" type="password" /></td></tr>
  1267             <br /><?php echo $lang->get('database_field_hostname_body'); ?>
  1197         <tr><td><b>MySQL version</b></td><td id="e_mysql_version">MySQL version information will be checked when you click "Test Connection".</td><td><img id="s_mysql_version" alt="Good/bad icon" src="images/unknown.gif" /></td></tr>
  1268             <br /><span style="color: #993300" id="e_db_host"></span>
  1198         <tr><td><b>Delete existing tables?</b><br />If this option is checked, all the tables that will be used by Enano will be dropped (deleted) before the schema is executed. Do NOT use this option unless specifically instructed to.</td><td><input type="checkbox" name="drop_tables" id="dtcheck" />  <label for="dtcheck">Drop existing tables</label></td></tr>
  1269           </td>
  1199         <tr><td colspan="3" style="text-align: center"><input type="button" value="Test connection" onclick="ajaxTestConnection();" /></td></tr>
  1270           <td>
       
  1271             <input onkeyup="verify();" name="db_host" size="30" type="text" />
       
  1272           </td>
       
  1273           <td>
       
  1274             <img id="s_db_host" alt="Good/bad icon" src="images/bad.gif" />
       
  1275           </td>
       
  1276         </tr>
       
  1277         <tr>
       
  1278           <td>
       
  1279             <b><?php echo $lang->get('database_field_dbname_title'); ?></b><br />
       
  1280             <?php echo $lang->get('database_field_dbname_body'); ?><br />
       
  1281             <span style="color: #993300" id="e_db_name"></span>
       
  1282           </td>
       
  1283           <td>
       
  1284             <input onkeyup="verify();" name="db_name" size="30" type="text" />
       
  1285           </td>
       
  1286           <td>
       
  1287             <img id="s_db_name" alt="Good/bad icon" src="images/bad.gif" />
       
  1288           </td>
       
  1289         </tr>
       
  1290         <tr>
       
  1291           <td rowspan="2">
       
  1292             <b><?php echo $lang->get('database_field_dbauth_title'); ?></b><br />
       
  1293             <?php echo $lang->get('database_field_dbauth_body'); ?><br />
       
  1294             <span style="color: #993300" id="e_db_auth"></span>
       
  1295           </td>
       
  1296           <td>
       
  1297             <input onkeyup="verify();" name="db_user" size="30" type="text" />
       
  1298           </td>
       
  1299           <td rowspan="2">
       
  1300             <img id="s_db_auth" alt="Good/bad icon" src="images/bad.gif" />
       
  1301           </td>
       
  1302         </tr>
       
  1303         <tr>
       
  1304           <td>
       
  1305             <input name="db_pass" size="30" type="password" />
       
  1306           </td>
       
  1307         </tr>
       
  1308         <tr>
       
  1309           <td colspan="3" style="text-align: center">
       
  1310             <h3><?php echo $lang->get('database_heading_optionalinfo'); ?></h3>
       
  1311           </td>
       
  1312         </tr>
       
  1313         <tr>
       
  1314           <td>
       
  1315             <b><?php echo $lang->get('database_field_tableprefix_title'); ?></b><br />
       
  1316             <?php echo $lang->get('database_field_tableprefix_body'); ?>
       
  1317           </td>
       
  1318           <td>
       
  1319             <input onkeyup="verify();" name="table_prefix" size="30" type="text" />
       
  1320           </td>
       
  1321           <td>
       
  1322             <img id="s_table_prefix" alt="Good/bad icon" src="images/good.gif" />
       
  1323           </td>
       
  1324         </tr>
       
  1325         <tr>
       
  1326           <td rowspan="2">
       
  1327             <b><?php echo $lang->get('database_field_rootauth_title'); ?></b><br />
       
  1328             <?php echo $lang->get('database_field_rootauth_body'); ?><br />
       
  1329             <span style="color: #993300" id="e_db_root"></span>
       
  1330           </td>
       
  1331           <td>
       
  1332             <input onkeyup="verify();" name="db_root_user" size="30" type="text" />
       
  1333           </td>
       
  1334           <td rowspan="2">
       
  1335             <img id="s_db_root" alt="Good/bad icon" src="images/good.gif" />
       
  1336           </td>
       
  1337         </tr>
       
  1338         <tr>
       
  1339           <td>
       
  1340             <input onkeyup="verify();" name="db_root_pass" size="30" type="password" />
       
  1341           </td>
       
  1342         </tr>
       
  1343         <tr>
       
  1344           <td>
       
  1345             <b><?php echo $lang->get('database_field_mysqlversion_title'); ?></b>
       
  1346           </td>
       
  1347           <td id="e_mysql_version">
       
  1348             <?php echo $lang->get('database_field_mysqlversion_blurb_willbechecked'); ?>
       
  1349           </td>
       
  1350           <td>
       
  1351             <img id="s_mysql_version" alt="Good/bad icon" src="images/unknown.gif" />
       
  1352           </td>
       
  1353         </tr>
       
  1354         <tr>
       
  1355           <td>
       
  1356             <b><?php echo $lang->get('database_field_droptables_title'); ?></b><br />
       
  1357             <?php echo $lang->get('database_field_droptables_body'); ?>
       
  1358           </td>
       
  1359           <td>
       
  1360             <input type="checkbox" name="drop_tables" id="dtcheck" />  <label for="dtcheck"><?php echo $lang->get('database_field_droptables_lbl'); ?></label>
       
  1361           </td>
       
  1362         </tr>
       
  1363         <tr>
       
  1364           <td colspan="3" style="text-align: center">
       
  1365             <input type="button" value="<?php echo $lang->get('database_btn_testconnection'); ?>" onclick="ajaxTestConnection();" />
       
  1366           </td>
       
  1367         </tr>
  1200       </table>
  1368       </table>
  1201       <div class="pagenav">
  1369       <div class="pagenav">
  1202        <table border="0">
  1370         <table border="0">
  1203        <tr>
  1371           <tr>
  1204        <td><input type="submit" value="Continue" onclick="return verify();" name="_cont" /></td><td><p><span style="font-weight: bold;">Before clicking continue:</span><br />&bull; Check your MySQL connection using the "Test Connection" button.<br />&bull; Be aware that your database information will be transmitted unencrypted several times.</p></td>
  1372             <td>
  1205        </tr>
  1373               <input type="submit" value="<?php echo $lang->get('meta_btn_continue'); ?>" onclick="return verify();" name="_cont" />
  1206        </table>
  1374             </td>
  1207      </div>
  1375             <td>
       
  1376               <p>
       
  1377                 <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
       
  1378                 &bull; <?php echo $lang->get('database_objective_test'); ?><br />
       
  1379                 &bull; <?php echo $lang->get('database_objective_uncrypt'); ?>
       
  1380               </p>
       
  1381             </td>
       
  1382           </tr>
       
  1383         </table>
       
  1384       </div>
  1208     </form>
  1385     </form>
  1209     <?php
  1386     <?php
  1210     break;
  1387     break;
  1211   case "website":
  1388   case "website":
  1212     if(!isset($_POST['_cont'])) {
  1389     if ( !isset($_POST['_cont']) )
       
  1390     {
  1213       echo 'No POST data signature found. Please <a href="install.php?mode=license">restart the installation</a>.';
  1391       echo 'No POST data signature found. Please <a href="install.php?mode=license">restart the installation</a>.';
  1214       $template->footer();
  1392       $template->footer();
  1215       exit;
  1393       exit;
  1216     }
  1394     }
  1217     unset($_POST['_cont']);
  1395     unset($_POST['_cont']);
  1270         <tr><td><b>URL scheme</b><br />Choose how the page URLs will look. Depending on your server configuration, you may need to select the first option. If you don't know, select the first option, and you can always change it later.</td><td colspan="2"><input type="radio" <?php if(!is_apache()) echo 'checked="checked" '; ?>name="urlscheme" value="ugly" id="ugly">  <label for="ugly">Standard URLs - compatible with any web server (www.example.com/index.php?title=Page_name)</label><br /><input type="radio" <?php if(is_apache()) echo 'checked="checked" '; ?>name="urlscheme" value="short" id="short">  <label for="short">Short URLs - requires Apache with a PHP module (www.example.com/index.php/Page_name)</label><br /><input type="radio" name="urlscheme" value="tiny" id="petite">  <label for="petite">Tiny URLs - requires Apache on Linux/Unix/BSD with PHP module and mod_rewrite enabled (www.example.com/Page_name)</label></td></tr>
  1448         <tr><td><b>URL scheme</b><br />Choose how the page URLs will look. Depending on your server configuration, you may need to select the first option. If you don't know, select the first option, and you can always change it later.</td><td colspan="2"><input type="radio" <?php if(!is_apache()) echo 'checked="checked" '; ?>name="urlscheme" value="ugly" id="ugly">  <label for="ugly">Standard URLs - compatible with any web server (www.example.com/index.php?title=Page_name)</label><br /><input type="radio" <?php if(is_apache()) echo 'checked="checked" '; ?>name="urlscheme" value="short" id="short">  <label for="short">Short URLs - requires Apache with a PHP module (www.example.com/index.php/Page_name)</label><br /><input type="radio" name="urlscheme" value="tiny" id="petite">  <label for="petite">Tiny URLs - requires Apache on Linux/Unix/BSD with PHP module and mod_rewrite enabled (www.example.com/Page_name)</label></td></tr>
  1271       </table>
  1449       </table>
  1272       <div class="pagenav">
  1450       <div class="pagenav">
  1273        <table border="0">
  1451        <table border="0">
  1274        <tr>
  1452        <tr>
  1275        <td><input type="submit" value="Continue" onclick="return verify();" name="_cont" /></td><td><p><span style="font-weight: bold;">Before clicking continue:</span><br />&bull; Verify that your site information is correct. Again, all of the above settings can be changed from the administration panel.</p></td>
  1453        <td><input type="submit" value="Continue" onclick="return verify();" name="_cont" /></td><td><p><span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />&bull; Verify that your site information is correct. Again, all of the above settings can be changed from the administration panel.</p></td>
  1276        </tr>
  1454        </tr>
  1277        </table>
  1455        </table>
  1278      </div>
  1456      </div>
  1279     </form>
  1457     </form>
  1280     <?php
  1458     <?php
  1383         <tr><td colspan="3">If your browser supports Javascript, the password you enter here will be encrypted with AES before it is sent to the server.</td></tr>
  1561         <tr><td colspan="3">If your browser supports Javascript, the password you enter here will be encrypted with AES before it is sent to the server.</td></tr>
  1384       </table>
  1562       </table>
  1385       <div class="pagenav">
  1563       <div class="pagenav">
  1386        <table border="0">
  1564        <table border="0">
  1387        <tr>
  1565        <tr>
  1388        <td><input type="submit" value="Continue" onclick="return cryptdata();" name="_cont" /></td><td><p><span style="font-weight: bold;">Before clicking continue:</span><br />&bull; Remember the username and password you enter here! You will not be able to administer your site without the information you enter on this page.</p></td>
  1566        <td><input type="submit" value="Continue" onclick="return cryptdata();" name="_cont" /></td><td><p><span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />&bull; Remember the username and password you enter here! You will not be able to administer your site without the information you enter on this page.</p></td>
  1389        </tr>
  1567        </tr>
  1390        </table>
  1568        </table>
  1391       </div>
  1569       </div>
  1392       <div id="cryptdebug"></div>
  1570       <div id="cryptdebug"></div>
  1393      <input type="hidden" name="use_crypt" value="no" />
  1571      <input type="hidden" name="use_crypt" value="no" />
  1496         <li>Cipher strength: <?php echo (string)AES_BITS; ?>-bit AES<br /><small>Cipher strength is defined in the file constants.php; if you desire to change the cipher strength, you may do so and then restart installation. Unless your site is mission-critical, changing the cipher strength is not necessary.</small></li>
  1674         <li>Cipher strength: <?php echo (string)AES_BITS; ?>-bit AES<br /><small>Cipher strength is defined in the file constants.php; if you desire to change the cipher strength, you may do so and then restart installation. Unless your site is mission-critical, changing the cipher strength is not necessary.</small></li>
  1497       </ul>
  1675       </ul>
  1498       <div class="pagenav">
  1676       <div class="pagenav">
  1499         <table border="0">
  1677         <table border="0">
  1500           <tr>
  1678           <tr>
  1501             <td><input type="submit" value="Install Enano!" name="_cont" /></td><td><p><span style="font-weight: bold;">Before clicking continue:</span><br />&bull; Pray.</p></td>
  1679             <td><input type="submit" value="Install Enano!" name="_cont" /></td><td><p><span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />&bull; Pray.</p></td>
  1502           </tr>
  1680           </tr>
  1503         </table>
  1681         </table>
  1504       </div>
  1682       </div>
  1505     </form>
  1683     </form>
  1506     <?php
  1684     <?php