[ Index ]

PHP Cross Reference of Mambo 4.6.5

[ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/installation/ -> install1.php (source)

   1  <?php
   2  /**
   3  * Install instructions
   4  * @package Mambo
   5  * @author Mambo Foundation Inc see README.php
   6  * @copyright (C) 2000 - 2009 Mambo Foundation Inc.
   7  * See COPYRIGHT.php for copyright notices and details.
   8  * @license GNU/GPL Version 2, see LICENSE.php
   9  *
  10  * Redistributions of files must retain the above copyright notice.
  11  *
  12  * Mambo is free software; you can redistribute it and/or
  13  * modify it under the terms of the GNU General Public License
  14  * as published by the Free Software Foundation; version 2 of the License.
  15  */
  16  
  17  if (!defined('_VALID_MOS')) define( '_VALID_MOS', 1 );
  18  
  19  /** Include common.php */
  20  include_once ( 'common.php' );
  21  include_once ( 'langconfig.php' );
  22  
  23  $DBhostname = mosGetParam( $_POST, 'DBhostname', '' );
  24  $DBuserName = mosGetParam( $_POST, 'DBuserName', '' );
  25  $DBpassword = mosGetParam( $_POST, 'DBpassword', '' );
  26  $DBverifypassword = mosGetParam( $_POST, 'DBverifypassword', '' );
  27  $DBname      = mosGetParam( $_POST, 'DBname', '' );
  28  $DBPrefix      = mosGetParam( $_POST, 'DBPrefix', 'mos_' );
  29  $DBDel      = intval( mosGetParam( $_POST, 'DBDel', 0 ) );
  30  $DBBackup      = intval( mosGetParam( $_POST, 'DBBackup', 0 ) );
  31  $DBSample      = intval( mosGetParam( $_POST, 'DBSample', 1 ) );
  32  
  33  echo "<?xml version=\"1.0\" encoding=\"".$charset."\"?".">";
  34  ?>
  35  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  36  <html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $text_direction;?>">
  37  <head>
  38  <title><?php echo T_('Mambo - Web Installer') ?></title>
  39  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
  40  <link rel="shortcut icon" href="../images/favicon.ico" />
  41  <link rel="stylesheet" href="install<?php if($text_direction=='rtl') echo '_'.$text_direction ?>.css" type="text/css" />
  42  <script  type="text/javascript">
  43  <!--
  44  function check()
  45  {
  46      // form validation check
  47      var formValid=false;
  48      var f = document.form;
  49      if ( f.DBhostname.value == '' ) {
  50          alert('<?php echo T_('Please enter a Host name') ?>');
  51          f.DBhostname.focus();
  52          formValid=false;
  53      } else if ( f.DBuserName.value == '' ) {
  54          alert('<?php echo T_('Please enter a Database User Name') ?>');
  55          f.DBuserName.focus();
  56          formValid=false;    
  57      } else if ( f.DBname.value == '' ) {
  58          alert('<?php echo T_('Please enter a Name for your new Database') ?>');
  59          f.DBname.focus();
  60          formValid=false;
  61      } else if ( confirm('<?php echo T_('Are you sure these settings are correct? \nMambo will now attempt to populate a Database with the settings you have supplied') ?>')) {
  62          formValid=true;
  63      } 
  64      return formValid;
  65  }
  66  //-->
  67  </script>
  68  </head>
  69  <body onload="document.form.DBhostname.focus();">
  70  <div id="wrapper">
  71      <div id="header">
  72          <div id="mambo"><img src="header_install.png" alt="<?php echo T_('Mambo Installation') ?>" /></div>
  73      </div>
  74  </div>
  75  <div id="ctr" align="center">
  76      <form action="install2.php" method="post" name="form" id="form" onsubmit="return check();">
  77      <div class="install">
  78          <div id="stepbar">
  79              <div class="step-off"><?php echo T_('pre-installation check') ?></div>
  80              <div class="step-off"><?php echo T_('license') ?></div>
  81              <div class="step-on"><?php echo T_('step 1') ?></div>
  82              <div class="step-off"><?php echo T_('step 2') ?></div>
  83              <div class="step-off"><?php echo T_('step 3') ?></div>
  84              <div class="step-off"><?php echo T_('step 4') ?></div>
  85              <div class="far-right">
  86                  <input class="button" type="submit" name="next" value="<?php echo T_('Next') ?> >>"/>
  87                </div>
  88          </div>
  89          <div id="right">
  90                <div id="step"><?php echo T_('step 1') ?></div>
  91              <div id="steposi"></div>
  92                <div class="clr"></div>
  93                <h1><?php echo T_('MySQL database configuration:') ?></h1>
  94                <div class="install-text"><?php echo T_('<p>Setting up Mambo to run on your server involves 4 simple steps...</p><p>Please enter the hostname of the server Mambo is to be installed on.</p><p>Enter the MySQL username, password and database name you wish to use with Mambo.</p><p>Enter the table name prefix to be used by this Mambo instance and select how to do with in case existing tables from former installations.</p><p>Install the samples unless you are experienced Mambo user wanting to start with a completely empty site.</p><p><span class="red">Note:</span> MySQL Strict Mode is not supported!</p>') ?>
  95                </div>
  96              <div class="install-form">
  97                       <div class="form-block">
  98                         <table class="content2">
  99                          <tr>
 100                            <td></td>
 101                            <td></td>
 102                            <td></td>
 103                        </tr>
 104                          <tr>
 105                            <td colspan="2"><?php echo T_('Host Name') ?><br /><input class="inputbox" type="text" name="DBhostname" value="<?php echo "$DBhostname"; ?>" /></td>
 106                            <td><em><?php echo T_('This is usually "localhost"') ?></em></td>
 107                        </tr>
 108                      <tr>
 109                            <td colspan="2"><?php echo T_('MySQL User Name') ?><br /><input class="inputbox" type="text" name="DBuserName" value="<?php echo "$DBuserName"; ?>" /></td>
 110                            <td><em><?php echo T_('Either something as "root" or a username given by the hoster') ?></em></td>
 111                        </tr>
 112                        <tr>
 113                            <td colspan="2"><?php echo T_('MySQL Password') ?><br /><input class="inputbox" type="password" name="DBpassword" value="<?php echo "$DBpassword"; ?>" /></td>
 114                            <td><em><?php echo T_('For site security using a password for the mysql account is mandatory') ?></em></td>
 115                      </tr>
 116                      <tr>
 117                            <td colspan="2"><?php echo T_('Verify MySQL Password') ?><br /><input class="inputbox" type="password" name="DBverifypassword" value="<?php echo "$DBverifypassword"; ?>" /></td>
 118                            <td><em><?php echo T_('Retype password for verification') ?></em></td>
 119                      </tr>
 120                          <tr>
 121                            <td colspan="2"><?php echo T_('MySQL Database Name') ?><br /><input class="inputbox" type="text" name="DBname" value="<?php echo "$DBname"; ?>" /></td>
 122                            <td><em><?php echo T_('Some hosts allow only a certain DB name per site. Use table prefix in this case for distinct mambo sites.') ?></em></td>
 123                        </tr>
 124                          <tr>
 125                            <td colspan="2"><?php echo T_('MySQL Table Prefix') ?><br /><input class="inputbox" type="text" name="DBPrefix" value="<?php echo "$DBPrefix"; ?>" /></td>
 126                            <td><em><?php echo T_('Dont use "old_" since this is used for backup tables') ?></em></td>
 127                        </tr>
 128                          <tr>
 129                            <td><input type="checkbox" name="DBBackup" id="DBBackup" value="1" <?php if ($DBBackup) echo 'checked="checked"'; ?> /></td>
 130                          <td><label for="DBBackup"><?php echo T_('Backup Old Tables') ?></label></td>
 131                            <td><em><?php echo T_('Any tables with the same prefix as that given in MySQL Table Prefix are renamed with the prefix old_ in preparation for a fresh install. If any tables with the old_ prefix already exist they will be removed and replaced by these new backups. Not selecting this option will cause any existing tables with the same names to simply be dropped without any backup copies being made.') ?></em></td>
 132                        </tr>
 133                          <tr>
 134                            <td><input type="checkbox" name="DBSample" id="DBSample" value="1" <?php if ($DBSample) echo 'checked="checked"'; ?> /></td>
 135                          <td><label for="DBSample"><?php echo T_('Install Sample Data') ?></label></td>
 136                            <td><em><?php echo T_('Dont uncheck this unless you are experienced with mambo!') ?></em></td>
 137                        </tr>
 138                         </table>
 139                    </div>
 140              </div>
 141          </div>
 142          <div class="clr"></div>
 143      </div>
 144      </form>
 145  </div>
 146  <div class="clr"></div>
 147  <div class="ctr">
 148  <?php echo T_('<a href="http://www.mambo-foundation.org" target="_blank">Mambo </a> is Free Software released under the <a href="http://www.opensource.org/licenses/gpl-2.0.php" target="_blank">GNU/GPL License</a>.') ?>
 149  </div>
 150  </body>
 151  </html>