Source for file install1.php

Documentation is available at install1.php

  1. <?php
  2. /**
  3. * Install instructions
  4. @package Mambo
  5. @author Mambo Foundation Inc see README.php
  6. @copyright Mambo Foundation Inc.
  7. *  See COPYRIGHT.php for copyright notices and details.
  8. @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see
  9. *  LICENSE.php
  10. *  Mambo is free software; you can redistribute it and/or
  11. *  modify it under the terms of the GNU General Public License
  12. *  as published by the Free Software Foundation; version 2 of the
  13. *  License.
  14. */ 
  15. if (!defined('_VALID_MOS')) define'_VALID_MOS');
  16.  
  17. /** Include common.php */
  18. include_once'common.php' );
  19. include_once'langconfig.php' );
  20.  
  21. $DBhostname mosGetParam$_POST'DBhostname''' );
  22. $DBuserName mosGetParam$_POST'DBuserName''' );
  23. $DBpassword mosGetParam$_POST'DBpassword''' );
  24. $DBverifypassword mosGetParam$_POST'DBverifypassword''' );
  25. $DBname      mosGetParam$_POST'DBname''' );
  26. $DBPrefix      mosGetParam$_POST'DBPrefix''mos_' );
  27. $DBDel      intvalmosGetParam$_POST'DBDel') );
  28. $DBBackup      intvalmosGetParam$_POST'DBBackup') );
  29. $DBSample      intvalmosGetParam$_POST'DBSample') );
  30.  
  31. echo "<?xml version=\"1.0\" encoding=\"".$charset."\"?".">";
  32. ?>
  33. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  34. <html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $text_direction;?>">
  35. <head>
  36. <title><?php echo T_('Mambo - Web Installer'?></title>
  37. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
  38. <link rel="shortcut icon" href="../images/favicon.ico" />
  39. <link rel="stylesheet" href="install<?php if($text_direction=='rtl'echo '_'.$text_direction ?>.css" type="text/css" />
  40. <script  type="text/javascript">
  41. <!--
  42. function check()
  43. {
  44.     // form validation check
  45.     var formValid=false;
  46.     var f = document.form;
  47.     if ( f.DBhostname.value == '' ) {
  48.         alert('<?php echo T_('Please enter a Host name'?>');
  49.         f.DBhostname.focus();
  50.         formValid=false;
  51.     } else if ( f.DBuserName.value == '' ) {
  52.         alert('<?php echo T_('Please enter a Database User Name'?>');
  53.         f.DBuserName.focus();
  54.         formValid=false;    
  55.     } else if ( f.DBname.value == '' ) {
  56.         alert('<?php echo T_('Please enter a Name for your new Database'?>');
  57.         f.DBname.focus();
  58.         formValid=false;
  59.     } 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'?>')) {
  60.         formValid=true;
  61.     } 
  62.     return formValid;
  63. }
  64. //-->
  65. </script>
  66. </head>
  67. <body onload="document.form.DBhostname.focus();">
  68. <div id="wrapper">
  69.     <div id="header">
  70.         <div id="mambo"><img src="header_install.png" alt="<?php echo T_('Mambo Installation'?>" /></div>
  71.     </div>
  72. </div>
  73. <div id="ctr" align="center">
  74.     <form action="install2.php" method="post" name="form" id="form" onsubmit="return check();">
  75.     <div class="install">
  76.         <div id="stepbar">
  77.             <div class="step-off"><?php echo T_('pre-installation check'?></div>
  78.             <div class="step-off"><?php echo T_('license'?></div>
  79.             <div class="step-on"><?php echo T_('step 1'?></div>
  80.             <div class="step-off"><?php echo T_('step 2'?></div>
  81.             <div class="step-off"><?php echo T_('step 3'?></div>
  82.             <div class="step-off"><?php echo T_('step 4'?></div>
  83.             <div class="far-right">
  84.                 <input class="button" type="submit" name="next" value="<?php echo T_('Next'?> >>"/>
  85.               </div>
  86.         </div>
  87.         <div id="right">
  88.               <div id="step"><?php echo T_('step 1'?></div>
  89.             <div id="steposi"></div>
  90.               <div class="clr"></div>
  91.               <h1><?php echo T_('MySQL database configuration:'?></h1>
  92.               <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>'?>
  93.               </div>
  94.             <div class="install-form">
  95.                      <div class="form-block">
  96.                        <table class="content2">
  97.                         <tr>
  98.                           <td></td>
  99.                           <td></td>
  100.                           <td></td>
  101.                       </tr>
  102.                         <tr>
  103.                           <td colspan="2"><?php echo T_('Host Name'?><br/><input class="inputbox" type="text" name="DBhostname" value="<?php echo "$DBhostname"?>" /></td>
  104.                           <td><em><?php echo T_('This is usually "localhost"'?></em></td>
  105.                       </tr>
  106.                     <tr>
  107.                           <td colspan="2"><?php echo T_('MySQL User Name'?><br/><input class="inputbox" type="text" name="DBuserName" value="<?php echo "$DBuserName"?>" /></td>
  108.                           <td><em><?php echo T_('Either something as "root" or a username given by the hoster'?></em></td>
  109.                       </tr>
  110.                       <tr>
  111.                           <td colspan="2"><?php echo T_('MySQL Password'?><br/><input class="inputbox" type="password" name="DBpassword" value="<?php echo "$DBpassword"?>" /></td>
  112.                           <td><em><?php echo T_('For site security using a password for the mysql account is mandatory'?></em></td>
  113.                     </tr>
  114.                     <tr>
  115.                           <td colspan="2"><?php echo T_('Verify MySQL Password'?><br/><input class="inputbox" type="password" name="DBverifypassword" value="<?php echo "$DBverifypassword"?>" /></td>
  116.                           <td><em><?php echo T_('Retype password for verification'?></em></td>
  117.                     </tr>
  118.                         <tr>
  119.                           <td colspan="2"><?php echo T_('MySQL Database Name'?><br/><input class="inputbox" type="text" name="DBname" value="<?php echo "$DBname"?>" /></td>
  120.                           <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>
  121.                       </tr>
  122.                         <tr>
  123.                           <td colspan="2"><?php echo T_('MySQL Table Prefix'?><br/><input class="inputbox" type="text" name="DBPrefix" value="<?php echo "$DBPrefix"?>" /></td>
  124.                           <td><em><?php echo T_('Dont use "old_" since this is used for backup tables'?></em></td>
  125.                       </tr>
  126.                         <tr>
  127.                           <td><input type="checkbox" name="DBBackup" id="DBBackup" value="1" <?php if ($DBBackupecho 'checked="checked"'?> /></td>
  128.                         <td><label for="DBBackup"><?php echo T_('Backup Old Tables'?></label></td>
  129.                           <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>
  130.                       </tr>
  131.                         <tr>
  132.                           <td><input type="checkbox" name="DBSample" id="DBSample" value="1" <?php if ($DBSampleecho 'checked="checked"'?> /></td>
  133.                         <td><label for="DBSample"><?php echo T_('Install Sample Data'?></label></td>
  134.                           <td><em><?php echo T_('Dont uncheck this unless you are experienced with mambo!'?></em></td>
  135.                       </tr>
  136.                        </table>
  137.                   </div>
  138.             </div>
  139.         </div>
  140.         <div class="clr"></div>
  141.     </div>
  142.     </form>
  143. </div>
  144. <div class="clr"></div>
  145. <div class="ctr">
  146. <?php echo T_('<a href="http://www.mambo-foundation.org" target="_blank">Mambo </a> is Free Software released under the <a href="http://www.gnu.org/copyleft/gpl.html" target="_blank">GNU/GPL License</a>.'?>
  147. </div>
  148. </body>
  149. </html>

Documentation generated on Mon, 05 May 2008 16:20:33 +0400 by phpDocumentor 1.4.0