[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/installation/ -> install1.php (source)

   1  <?php
   2  /**
   3  * @version $Id: install1.php 5975 2006-12-11 01:26:33Z robs $
   4  * @package Joomla
   5  * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
   6  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
   7  * Joomla! is free software. This version may have been modified pursuant
   8  * to the GNU General Public License, and as distributed it includes or
   9  * is derivative of works licensed under the GNU General Public License or
  10  * other free or open source software licenses.
  11  * See COPYRIGHT.php for copyright notices and details.
  12  */
  13  
  14  // Set flag that this is a parent file
  15  define( "_VALID_MOS", 1 );
  16  
  17  /** Include common.php */
  18  require_once ( 'common.php' );
  19  
  20  $DBhostname = mosGetParam( $_POST, 'DBhostname', '' );
  21  $DBuserName = mosGetParam( $_POST, 'DBuserName', '' );
  22  $DBpassword = mosGetParam( $_POST, 'DBpassword', '' );
  23  $DBname      = mosGetParam( $_POST, 'DBname', '' );
  24  $DBPrefix      = mosGetParam( $_POST, 'DBPrefix', 'jos_' );
  25  $DBDel      = intval( mosGetParam( $_POST, 'DBDel', 0 ) );
  26  $DBBackup      = intval( mosGetParam( $_POST, 'DBBackup', 0 ) );
  27  $DBSample      = intval( mosGetParam( $_POST, 'DBSample', 1 ) );
  28  
  29  echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">";
  30  ?>
  31  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  32  <html xmlns="http://www.w3.org/1999/xhtml">
  33  <head>
  34  <title>Joomla! - Web Installer</title>
  35  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  36  <link rel="shortcut icon" href="../images/favicon.ico" />
  37  <link rel="stylesheet" href="install.css" type="text/css" />
  38  <script  type="text/javascript">
  39  <!--
  40  function check() {
  41      // form validation check
  42      var formValid=false;
  43      var f = document.form;
  44      if ( f.DBhostname.value == '' ) {
  45          alert('Please enter a Host name');
  46          f.DBhostname.focus();
  47          formValid=false;
  48      } else if ( f.DBuserName.value == '' ) {
  49          alert('Please enter a Database User Name');
  50          f.DBuserName.focus();
  51          formValid=false;
  52      } else if ( f.DBname.value == '' ) {
  53          alert('Please enter a Name for your new Database');
  54          f.DBname.focus();
  55          formValid=false;
  56      } else if ( f.DBPrefix.value == '' ) {
  57          alert('You must enter a MySQL Table Prefix for Joomla! to operate correctly.');
  58          f.DBPrefix.focus();
  59          formValid=false;
  60      } else if ( f.DBPrefix.value == 'old_' ) {
  61          alert('You cannot use "old_" as the MySQL Table Prefix because Joomla! uses this prefix for backup tables.');
  62          f.DBPrefix.focus();
  63          formValid=false;
  64      } else if ( confirm('Are you sure these settings are correct? \nJoomla! will now attempt to populate a Database with the settings you have supplied')) {
  65          formValid=true;
  66      }
  67  
  68      return formValid;
  69  }
  70  //-->
  71  </script>
  72  </head>
  73  <body onload="document.form.DBhostname.focus();">
  74  <div id="wrapper">
  75      <div id="header">
  76          <div id="joomla"><img src="header_install.png" alt="Joomla! Installation" /></div>
  77      </div>
  78  </div>
  79  <div id="ctr" align="center">
  80      <form action="install2.php" method="post" name="form" id="form" onsubmit="return check();">
  81      <div class="install">
  82          <div id="stepbar">
  83              <div class="step-off">
  84                  pre-installation check
  85              </div>
  86              <div class="step-off">
  87                  license
  88              </div>
  89              <div class="step-on">
  90                  step 1
  91              </div>
  92              <div class="step-off">
  93                  step 2
  94              </div>
  95              <div class="step-off">
  96                  step 3
  97              </div>
  98              <div class="step-off">
  99                  step 4
 100              </div>
 101          </div>
 102          <div id="right">
 103              <div class="far-right">
 104                  <input class="button" type="submit" name="next" value="Next >>"/>
 105                </div>
 106                <div id="step">
 107                    step 1
 108                </div>
 109                <div class="clr"></div>
 110                <h1>MySQL database configuration:</h1>
 111                <div class="install-text">
 112                    <p>Setting up Joomla! to run on your server involves 4 simple steps...</p>
 113                    <p>Please enter the hostname of the server Joomla! is to be installed on.</p>
 114                  <p>Enter the MySQL username, password and database name you wish to use with Joomla!</p>
 115                  <p>Enter a table name prefix to be used by this Joomla! install and select what
 116                      to do with existing tables from former installations.</p>
 117                  <p>Install the sample data unless you are an experienced Joomla! User wanting to start with a completely empty site.</p>
 118                </div>
 119              <div class="install-form">
 120                    <div class="form-block">
 121                         <table class="content2">
 122                          <tr>
 123                            <td></td>
 124                            <td></td>
 125                            <td></td>
 126                        </tr>
 127                          <tr>
 128                            <td colspan="2">
 129                                Host Name
 130                                <br/>
 131                                <input class="inputbox" type="text" name="DBhostname" value="<?php echo "$DBhostname"; ?>" />
 132                            </td>
 133                            <td>
 134                                <em>This is usually 'localhost'</em>
 135                            </td>
 136                        </tr>
 137                      <tr>
 138                            <td colspan="2">
 139                                MySQL User Name
 140                                <br/>
 141                                <input class="inputbox" type="text" name="DBuserName" value="<?php echo "$DBuserName"; ?>" />
 142                            </td>
 143                            <td>
 144                                <em>Either something as 'root' or a username given by the hoster</em>
 145                            </td>
 146                        </tr>
 147                        <tr>
 148                            <td colspan="2">
 149                                MySQL Password
 150                                <br/>
 151                                <input class="inputbox" type="text" name="DBpassword" value="<?php echo "$DBpassword"; ?>" />
 152                            </td>
 153                            <td>
 154                                <em>For site security using a password for the mysql account is mandatory</em>
 155                            </td>
 156                      </tr>
 157                          <tr>
 158                            <td colspan="2">
 159                                MySQL Database Name
 160                                <br/>
 161                                <input class="inputbox" type="text" name="DBname" value="<?php echo "$DBname"; ?>" />
 162                            </td>
 163                            <td>
 164                                <em>Some hosts allow only a certain DB name per site. Use table prefix in this case for distinct Joomla! sites.</em>
 165                            </td>
 166                        </tr>
 167                          <tr>
 168                            <td colspan="2">
 169                                MySQL Table Prefix
 170                                <br/>
 171                                <input class="inputbox" type="text" name="DBPrefix" value="<?php echo "$DBPrefix"; ?>" />
 172                            </td>
 173                            <td>
 174                            <!--
 175                            <em>Don't use 'old_' since this is used for backup tables</em>
 176                            -->
 177                            </td>
 178                        </tr>
 179                          <tr>
 180                            <td>
 181                                <input type="checkbox" name="DBDel" id="DBDel" value="1" <?php if ($DBDel) echo 'checked="checked"'; ?> />
 182                            </td>
 183                          <td>
 184                              <label for="DBDel">Drop Existing Tables</label>
 185                          </td>
 186                            <td>
 187                            </td>
 188                        </tr>
 189                          <tr>
 190                            <td>
 191                                <input type="checkbox" name="DBBackup" id="DBBackup" value="1" <?php if ($DBBackup) echo 'checked="checked"'; ?> />
 192                            </td>
 193                          <td>
 194                              <label for="DBBackup">Backup Old Tables</label>
 195                          </td>
 196                            <td>
 197                                <em>Any existing backup tables from former Joomla! installations will be replaced</em>
 198                            </td>
 199                        </tr>
 200                          <tr>
 201                            <td>
 202                                <input type="checkbox" name="DBSample" id="DBSample" value="1" <?php if ($DBSample) echo 'checked="checked"'; ?> />
 203                            </td>
 204                          <td>
 205                              <label for="DBSample">Install Sample Data</label>
 206                          </td>
 207                            <td>
 208                                <em>Don't uncheck this option unless you are experienced in using Joomla!</em>
 209                            </td>
 210                        </tr>
 211                         </table>
 212                    </div>
 213              </div>
 214          </div>
 215          <div class="clr"></div>
 216      </div>
 217      </form>
 218  </div>
 219  <div class="clr"></div>
 220  <div class="ctr">
 221      <a href="http://www.joomla.org" target="_blank">Joomla!</a> is Free Software released under the GNU/GPL License.
 222  </div>
 223  </body>
 224  </html>


Généré le : Wed Nov 21 14:43:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics