[ Index ] |
|
Code source de Joomla 1.0.13 |
1 <?php 2 /** 3 * @version $Id: install3.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', '' ); 25 $sitename = mosGetParam( $_POST, 'sitename', '' ); 26 $adminEmail = mosGetParam( $_POST, 'adminEmail', ''); 27 $filePerms = mosGetParam( $_POST, 'filePerms', ''); 28 $dirPerms = mosGetParam( $_POST, 'dirPerms', ''); 29 $configArray['siteUrl'] = trim( mosGetParam( $_POST, 'siteUrl', '' ) ); 30 $configArray['absolutePath'] = trim( mosGetParam( $_POST, 'absolutePath', '' ) ); 31 if (get_magic_quotes_gpc()) { 32 $configArray['absolutePath'] = stripslashes(stripslashes($configArray['absolutePath'])); 33 $sitename = stripslashes(stripslashes($sitename)); 34 } 35 36 if ($sitename == '') { 37 echo "<form name=\"stepBack\" method=\"post\" action=\"install2.php\"> 38 <input type=\"hidden\" name=\"DBhostname\" value=\"$DBhostname\"> 39 <input type=\"hidden\" name=\"DBuserName\" value=\"$DBuserName\"> 40 <input type=\"hidden\" name=\"DBpassword\" value=\"$DBpassword\"> 41 <input type=\"hidden\" name=\"DBname\" value=\"$DBname\"> 42 <input type=\"hidden\" name=\"DBPrefix\" value=\"$DBPrefix\"> 43 <input type=\"hidden\" name=\"DBcreated\" value=1> 44 </form>"; 45 46 echo "<script>alert('The sitename has not been provided'); document.stepBack.submit();</script>"; 47 return; 48 } 49 50 echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; 51 ?> 52 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 53 <html xmlns="http://www.w3.org/1999/xhtml"> 54 <head> 55 <title>Joomla! - Web Installer</title> 56 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 57 <link rel="shortcut icon" href="../images/favicon.ico" /> 58 <link rel="stylesheet" href="install.css" type="text/css" /> 59 <script type="text/javascript"> 60 <!-- 61 function check() { 62 // form validation check 63 var formValid = true; 64 var f = document.form; 65 if ( f.siteUrl.value == '' ) { 66 alert('Please enter Site URL'); 67 f.siteUrl.focus(); 68 formValid = false; 69 } else if ( f.absolutePath.value == '' ) { 70 alert('Please enter the absolute path to your site'); 71 f.absolutePath.focus(); 72 formValid = false; 73 } else if ( f.adminEmail.value == '' ) { 74 alert('Please enter an email address to contact your administrator'); 75 f.adminEmail.focus(); 76 formValid = false; 77 } else if ( f.adminPassword.value == '' ) { 78 alert('Please enter a password for you administrator'); 79 f.adminPassword.focus(); 80 formValid = false; 81 } 82 83 return formValid; 84 } 85 86 function changeFilePermsMode(mode) 87 { 88 if(document.getElementById) { 89 switch (mode) { 90 case 0: 91 document.getElementById('filePermsFlags').style.display = 'none'; 92 break; 93 default: 94 document.getElementById('filePermsFlags').style.display = ''; 95 } // switch 96 } // if 97 } 98 99 function changeDirPermsMode(mode) 100 { 101 if(document.getElementById) { 102 switch (mode) { 103 case 0: 104 document.getElementById('dirPermsFlags').style.display = 'none'; 105 break; 106 default: 107 document.getElementById('dirPermsFlags').style.display = ''; 108 } // switch 109 } // if 110 } 111 //--> 112 </script> 113 </head> 114 <body onload="document.form.siteUrl.focus();"> 115 <div id="wrapper"> 116 <div id="header"> 117 <div id="joomla"><img src="header_install.png" alt="Joomla! Installation" /></div> 118 </div> 119 </div> 120 <div id="ctr" align="center"> 121 <form action="install4.php" method="post" name="form" id="form" onsubmit="return check();"> 122 <input type="hidden" name="DBhostname" value="<?php echo "$DBhostname"; ?>" /> 123 <input type="hidden" name="DBuserName" value="<?php echo "$DBuserName"; ?>" /> 124 <input type="hidden" name="DBpassword" value="<?php echo "$DBpassword"; ?>" /> 125 <input type="hidden" name="DBname" value="<?php echo "$DBname"; ?>" /> 126 <input type="hidden" name="DBPrefix" value="<?php echo "$DBPrefix"; ?>" /> 127 <input type="hidden" name="sitename" value="<?php echo "$sitename"; ?>" /> 128 <div class="install"> 129 <div id="stepbar"> 130 <div class="step-off">pre-installation check</div> 131 <div class="step-off">license</div> 132 <div class="step-off">step 1</div> 133 <div class="step-off">step 2</div> 134 <div class="step-on">step 3</div> 135 <div class="step-off">step 4</div> 136 </div> 137 <div id="right"> 138 <div id="step">step 3</div> 139 <div class="far-right"> 140 <input class="button" type="submit" name="next" value="Next >>"/> 141 </div> 142 <div class="clr"></div> 143 <h1>Confirm the site URL, path, admin e-mail and file/directory chmods</h1> 144 <div class="install-text"> 145 <p>If URL and Path look correct then please do not change them. 146 If you are not sure then please contact your ISP or administrator. Usually 147 the values displayed will work for your site.<br/> 148 <br/> 149 Enter your e-mail address, this will be the e-mail address of the site 150 SuperAdministrator.<br /> 151 <br/> 152 The permission settings will be used while installing Joomla! itself, by 153 the Joomla! addon-installers and by the media manager. If you are unsure 154 what flags shall be set, leave the default settings at the moment. 155 You can still change these flags later in the site global configuration.</p> 156 </div> 157 <div class="install-form"> 158 <div class="form-block"> 159 <table class="content2"> 160 <tr> 161 <td width="100">URL</td> 162 <?php 163 $url = ""; 164 if ($configArray['siteUrl']) 165 $url = $configArray['siteUrl']; 166 else { 167 $port = ( $_SERVER['SERVER_PORT'] == 80 ) ? '' : ":".$_SERVER['SERVER_PORT']; 168 $root = $_SERVER['SERVER_NAME'].$port.$_SERVER['PHP_SELF']; 169 $root = str_replace("installation/","",$root); 170 $root = str_replace("/install3.php","",$root); 171 $url = "http://".$root; 172 } 173 ?> <td align="center"><input class="inputbox" type="text" name="siteUrl" value="<?php echo $url; ?>" size="50"/></td> 174 </tr> 175 <tr> 176 <td>Path</td> 177 <?php 178 $abspath = ""; 179 if ($configArray['absolutePath']) 180 $abspath = $configArray['absolutePath']; 181 else { 182 $path = getcwd(); 183 if (preg_match("/\/installation/i", "$path")) 184 $abspath = str_replace('/installation',"",$path); 185 else 186 $abspath = str_replace('\installation',"",$path); 187 } 188 ?> <td align="center"><input class="inputbox" type="text" name="absolutePath" value="<?php echo $abspath; ?>" size="50"/></td> 189 </tr> 190 <tr> 191 <td>Your E-mail</td> 192 <td align="center"><input class="inputbox" type="text" name="adminEmail" value="<?php echo "$adminEmail"; ?>" size="50" /></td> 193 </tr> 194 <tr> 195 <td>Admin password</td> 196 <td align="center"><input class="inputbox" type="text" name="adminPassword" value="<?php echo mosMakePassword(8); ?>" size="50"/></td> 197 </tr> 198 <tr> 199 <?php 200 $mode = 0; 201 $flags = 0644; 202 if ($filePerms!='') { 203 $mode = 1; 204 $flags = octdec($filePerms); 205 } // if 206 ?> 207 <td colspan="2"> 208 <fieldset><legend>File Permissions</legend> 209 <table cellpadding="1" cellspacing="1" border="0"> 210 <tr> 211 <td><input type="radio" id="filePermsMode0" name="filePermsMode" value="0" onclick="changeFilePermsMode(0)"<?php if (!$mode) echo ' checked="checked"'; ?>/></td> 212 <td><label for="filePermsMode0">Dont CHMOD files (use server defaults)</label></td> 213 </tr> 214 <tr> 215 <td><input type="radio" id="filePermsMode1" name="filePermsMode" value="1" onclick="changeFilePermsMode(1)"<?php if ($mode) echo ' checked="checked"'; ?>/></td> 216 <td><label for="filePermsMode1"> CHMOD files to:</label></td> 217 </tr> 218 <tr id="filePermsFlags"<?php if (!$mode) echo ' style="display:none"'; ?>> 219 <td> </td> 220 <td> 221 <table cellpadding="1" cellspacing="0" border="0"> 222 <tr> 223 <td>User:</td> 224 <td><input type="checkbox" id="filePermsUserRead" name="filePermsUserRead" value="1"<?php if ($flags & 0400) echo ' checked="checked"'; ?>/></td> 225 <td><label for="filePermsUserRead">read</label></td> 226 <td><input type="checkbox" id="filePermsUserWrite" name="filePermsUserWrite" value="1"<?php if ($flags & 0200) echo ' checked="checked"'; ?>/></td> 227 <td><label for="filePermsUserWrite">write</label></td> 228 <td><input type="checkbox" id="filePermsUserExecute" name="filePermsUserExecute" value="1"<?php if ($flags & 0100) echo ' checked="checked"'; ?>/></td> 229 <td width="100%"><label for="filePermsUserExecute">execute</label></td> 230 </tr> 231 <tr> 232 <td>Group:</td> 233 <td><input type="checkbox" id="filePermsGroupRead" name="filePermsGroupRead" value="1"<?php if ($flags & 040) echo ' checked="checked"'; ?>/></td> 234 <td><label for="filePermsGroupRead">read</label></td> 235 <td><input type="checkbox" id="filePermsGroupWrite" name="filePermsGroupWrite" value="1"<?php if ($flags & 020) echo ' checked="checked"'; ?>/></td> 236 <td><label for="filePermsGroupWrite">write</label></td> 237 <td><input type="checkbox" id="filePermsGroupExecute" name="filePermsGroupExecute" value="1"<?php if ($flags & 010) echo ' checked="checked"'; ?>/></td> 238 <td width="100%"><label for="filePermsGroupExecute">execute</label></td> 239 </tr> 240 <tr> 241 <td>World:</td> 242 <td><input type="checkbox" id="filePermsWorldRead" name="filePermsWorldRead" value="1"<?php if ($flags & 04) echo ' checked="checked"'; ?>/></td> 243 <td><label for="filePermsWorldRead">read</label></td> 244 <td><input type="checkbox" id="filePermsWorldWrite" name="filePermsWorldWrite" value="1"<?php if ($flags & 02) echo ' checked="checked"'; ?>/></td> 245 <td><label for="filePermsWorldWrite">write</label></td> 246 <td><input type="checkbox" id="filePermsWorldExecute" name="filePermsWorldExecute" value="1"<?php if ($flags & 01) echo ' checked="checked"'; ?>/></td> 247 <td width="100%"><label for="filePermsWorldExecute">execute</label></td> 248 </tr> 249 </table> 250 </td> 251 </tr> 252 </table> 253 </fieldset> 254 </td> 255 </tr> 256 <tr> 257 <?php 258 $mode = 0; 259 $flags = 0755; 260 if ($dirPerms!='') { 261 $mode = 1; 262 $flags = octdec($dirPerms); 263 } // if 264 ?> 265 <td colspan="2"> 266 <fieldset><legend>Directory Permissions</legend> 267 <table cellpadding="1" cellspacing="1" border="0"> 268 <tr> 269 <td><input type="radio" id="dirPermsMode0" name="dirPermsMode" value="0" onclick="changeDirPermsMode(0)"<?php if (!$mode) echo ' checked="checked"'; ?>/></td> 270 <td><label for="dirPermsMode0">Dont CHMOD directories (use server defaults)</label></td> 271 </tr> 272 <tr> 273 <td><input type="radio" id="dirPermsMode1" name="dirPermsMode" value="1" onclick="changeDirPermsMode(1)"<?php if ($mode) echo ' checked="checked"'; ?>/></td> 274 <td><label for="dirPermsMode1"> CHMOD directories to:</label></td> 275 </tr> 276 <tr id="dirPermsFlags"<?php if (!$mode) echo ' style="display:none"'; ?>> 277 <td> </td> 278 <td> 279 <table cellpadding="1" cellspacing="0" border="0"> 280 <tr> 281 <td>User:</td> 282 <td><input type="checkbox" id="dirPermsUserRead" name="dirPermsUserRead" value="1"<?php if ($flags & 0400) echo ' checked="checked"'; ?>/></td> 283 <td><label for="dirPermsUserRead">read</label></td> 284 <td><input type="checkbox" id="dirPermsUserWrite" name="dirPermsUserWrite" value="1"<?php if ($flags & 0200) echo ' checked="checked"'; ?>/></td> 285 <td><label for="dirPermsUserWrite">write</label></td> 286 <td><input type="checkbox" id="dirPermsUserSearch" name="dirPermsUserSearch" value="1"<?php if ($flags & 0100) echo ' checked="checked"'; ?>/></td> 287 <td width="100%"><label for="dirPermsUserSearch">search</label></td> 288 </tr> 289 <tr> 290 <td>Group:</td> 291 <td><input type="checkbox" id="dirPermsGroupRead" name="dirPermsGroupRead" value="1"<?php if ($flags & 040) echo ' checked="checked"'; ?>/></td> 292 <td><label for="dirPermsGroupRead">read</label></td> 293 <td><input type="checkbox" id="dirPermsGroupWrite" name="dirPermsGroupWrite" value="1"<?php if ($flags & 020) echo ' checked="checked"'; ?>/></td> 294 <td><label for="dirPermsGroupWrite">write</label></td> 295 <td><input type="checkbox" id="dirPermsGroupSearch" name="dirPermsGroupSearch" value="1"<?php if ($flags & 010) echo ' checked="checked"'; ?>/></td> 296 <td width="100%"><label for="dirPermsGroupSearch">search</label></td> 297 </tr> 298 <tr> 299 <td>World:</td> 300 <td><input type="checkbox" id="dirPermsWorldRead" name="dirPermsWorldRead" value="1"<?php if ($flags & 04) echo ' checked="checked"'; ?>/></td> 301 <td><label for="dirPermsWorldRead">read</label></td> 302 <td><input type="checkbox" id="dirPermsWorldWrite" name="dirPermsWorldWrite" value="1"<?php if ($flags & 02) echo ' checked="checked"'; ?>/></td> 303 <td><label for="dirPermsWorldWrite">write</label></td> 304 <td><input type="checkbox" id="dirPermsWorldSearch" name="dirPermsWorldSearch" value="1"<?php if ($flags & 01) echo ' checked="checked"'; ?>/></td> 305 <td width="100%"><label for="dirPermsWorldSearch">search</label></td> 306 </tr> 307 </table> 308 </td> 309 </tr> 310 </table> 311 </fieldset> 312 </td> 313 </tr> 314 </table> 315 </div> 316 </div> 317 <div id="break"></div> 318 </div> 319 <div class="clr"></div> 320 </div> 321 </form> 322 </div> 323 <div class="clr"></div> 324 <div class="ctr"> 325 <a href="http://www.joomla.org" target="_blank">Joomla!</a> is Free Software released under the GNU/GPL License. 326 </div> 327 </body> 328 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 14:43:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |