[218] | 1 | <?php |
---|
[354] | 2 | // +-----------------------------------------------------------------------+ |
---|
[593] | 3 | // | PhpWebGallery - a PHP based picture gallery | |
---|
| 4 | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | |
---|
[1726] | 5 | // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | |
---|
[354] | 6 | // +-----------------------------------------------------------------------+ |
---|
[1855] | 7 | // | file : $Id: install.php 2102 2007-09-21 09:06:00Z patdenice $ |
---|
[354] | 8 | // | last update : $Date: 2007-09-21 09:06:00 +0000 (Fri, 21 Sep 2007) $ |
---|
| 9 | // | last modifier : $Author: patdenice $ |
---|
| 10 | // | revision : $Revision: 2102 $ |
---|
| 11 | // +-----------------------------------------------------------------------+ |
---|
| 12 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 13 | // | it under the terms of the GNU General Public License as published by | |
---|
| 14 | // | the Free Software Foundation | |
---|
| 15 | // | | |
---|
| 16 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 17 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 18 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 19 | // | General Public License for more details. | |
---|
| 20 | // | | |
---|
| 21 | // | You should have received a copy of the GNU General Public License | |
---|
| 22 | // | along with this program; if not, write to the Free Software | |
---|
| 23 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 24 | // | USA. | |
---|
| 25 | // +-----------------------------------------------------------------------+ |
---|
[218] | 26 | |
---|
[367] | 27 | //----------------------------------------------------------- include |
---|
| 28 | define('PHPWG_ROOT_PATH','./'); |
---|
[345] | 29 | |
---|
[367] | 30 | // Guess an initial language ... |
---|
| 31 | function guess_lang() |
---|
[218] | 32 | { |
---|
[463] | 33 | return 'en_UK.iso-8859-1'; |
---|
[218] | 34 | } |
---|
[367] | 35 | |
---|
[1855] | 36 | // |
---|
| 37 | // Pick a language, any language ... |
---|
| 38 | // |
---|
| 39 | function language_select($default, $select_name = "language") |
---|
| 40 | { |
---|
| 41 | $available_lang = get_languages(); |
---|
| 42 | |
---|
| 43 | $lang_select = '<select name="' . $select_name . '" onchange="document.location = \''.PHPWG_ROOT_PATH.'install.php?language=\'+this.options[this.selectedIndex].value;">'; |
---|
| 44 | foreach ($available_lang as $code => $displayname) |
---|
| 45 | { |
---|
| 46 | $selected = ( strtolower($default) == strtolower($code) ) ? ' selected="selected"' : ''; |
---|
| 47 | $lang_select .= '<option value="'.$code.'" ' . $selected . '>' . ucwords($displayname) . '</option>'; |
---|
| 48 | } |
---|
| 49 | $lang_select .= '</select>'; |
---|
| 50 | |
---|
| 51 | return $lang_select; |
---|
| 52 | } |
---|
| 53 | |
---|
[529] | 54 | /** |
---|
| 55 | * loads an sql file and executes all queries |
---|
| 56 | * |
---|
| 57 | * Before executing a query, $replaced is... replaced by $replacing. This is |
---|
| 58 | * useful when the SQL file contains generic words. Drop table queries are |
---|
| 59 | * not executed. |
---|
| 60 | * |
---|
| 61 | * @param string filepath |
---|
| 62 | * @param string replaced |
---|
| 63 | * @param string replacing |
---|
| 64 | * @return void |
---|
| 65 | */ |
---|
| 66 | function execute_sqlfile($filepath, $replaced, $replacing) |
---|
[382] | 67 | { |
---|
[529] | 68 | $sql_lines = file($filepath); |
---|
[382] | 69 | $query = ''; |
---|
[529] | 70 | foreach ($sql_lines as $sql_line) |
---|
| 71 | { |
---|
| 72 | $sql_line = trim($sql_line); |
---|
| 73 | if (preg_match('/(^--|^$)/', $sql_line)) |
---|
| 74 | { |
---|
| 75 | continue; |
---|
| 76 | } |
---|
[382] | 77 | $query.= ' '.$sql_line; |
---|
| 78 | // if we reached the end of query, we execute it and reinitialize the |
---|
| 79 | // variable "query" |
---|
[529] | 80 | if (preg_match('/;$/', $sql_line)) |
---|
[382] | 81 | { |
---|
[529] | 82 | $query = trim($query); |
---|
| 83 | $query = str_replace($replaced, $replacing, $query); |
---|
[382] | 84 | // we don't execute "DROP TABLE" queries |
---|
[529] | 85 | if (!preg_match('/^DROP TABLE/i', $query)) |
---|
| 86 | { |
---|
| 87 | mysql_query($query); |
---|
| 88 | } |
---|
[382] | 89 | $query = ''; |
---|
| 90 | } |
---|
| 91 | } |
---|
| 92 | } |
---|
| 93 | |
---|
[367] | 94 | set_magic_quotes_runtime(0); // Disable magic_quotes_runtime |
---|
| 95 | // |
---|
| 96 | // addslashes to vars if magic_quotes_gpc is off this is a security |
---|
| 97 | // precaution to prevent someone trying to break out of a SQL statement. |
---|
| 98 | // |
---|
| 99 | if( !get_magic_quotes_gpc() ) |
---|
[218] | 100 | { |
---|
[367] | 101 | if( is_array($_POST) ) |
---|
[218] | 102 | { |
---|
[367] | 103 | while( list($k, $v) = each($_POST) ) |
---|
[218] | 104 | { |
---|
[367] | 105 | if( is_array($_POST[$k]) ) |
---|
[218] | 106 | { |
---|
[367] | 107 | while( list($k2, $v2) = each($_POST[$k]) ) |
---|
| 108 | { |
---|
| 109 | $_POST[$k][$k2] = addslashes($v2); |
---|
| 110 | } |
---|
| 111 | @reset($_POST[$k]); |
---|
[218] | 112 | } |
---|
| 113 | else |
---|
| 114 | { |
---|
[367] | 115 | $_POST[$k] = addslashes($v); |
---|
[218] | 116 | } |
---|
| 117 | } |
---|
[367] | 118 | @reset($_POST); |
---|
| 119 | } |
---|
| 120 | |
---|
[1855] | 121 | if( is_array($_GET) ) |
---|
| 122 | { |
---|
| 123 | while( list($k, $v) = each($_GET) ) |
---|
| 124 | { |
---|
| 125 | if( is_array($_GET[$k]) ) |
---|
| 126 | { |
---|
| 127 | while( list($k2, $v2) = each($_GET[$k]) ) |
---|
| 128 | { |
---|
| 129 | $_GET[$k][$k2] = addslashes($v2); |
---|
| 130 | } |
---|
| 131 | @reset($_GET[$k]); |
---|
| 132 | } |
---|
| 133 | else |
---|
| 134 | { |
---|
| 135 | $_GET[$k] = addslashes($v); |
---|
| 136 | } |
---|
| 137 | } |
---|
| 138 | @reset($_GET); |
---|
| 139 | } |
---|
| 140 | |
---|
[367] | 141 | if( is_array($_COOKIE) ) |
---|
| 142 | { |
---|
| 143 | while( list($k, $v) = each($_COOKIE) ) |
---|
[218] | 144 | { |
---|
[367] | 145 | if( is_array($_COOKIE[$k]) ) |
---|
[218] | 146 | { |
---|
[367] | 147 | while( list($k2, $v2) = each($_COOKIE[$k]) ) |
---|
| 148 | { |
---|
| 149 | $_COOKIE[$k][$k2] = addslashes($v2); |
---|
| 150 | } |
---|
| 151 | @reset($_COOKIE[$k]); |
---|
[218] | 152 | } |
---|
| 153 | else |
---|
| 154 | { |
---|
[367] | 155 | $_COOKIE[$k] = addslashes($v); |
---|
[218] | 156 | } |
---|
| 157 | } |
---|
[367] | 158 | @reset($_COOKIE); |
---|
[218] | 159 | } |
---|
[367] | 160 | } |
---|
[218] | 161 | |
---|
[367] | 162 | //----------------------------------------------------- variable initialization |
---|
[1147] | 163 | |
---|
| 164 | define('DEFAULT_PREFIX_TABLE', 'phpwebgallery_'); |
---|
| 165 | |
---|
[367] | 166 | // Obtain various vars |
---|
| 167 | $dbhost = (!empty($_POST['dbhost'])) ? $_POST['dbhost'] : 'localhost'; |
---|
| 168 | $dbuser = (!empty($_POST['dbuser'])) ? $_POST['dbuser'] : ''; |
---|
| 169 | $dbpasswd = (!empty($_POST['dbpasswd'])) ? $_POST['dbpasswd'] : ''; |
---|
| 170 | $dbname = (!empty($_POST['dbname'])) ? $_POST['dbname'] : ''; |
---|
| 171 | |
---|
[1147] | 172 | if (isset($_POST['install'])) |
---|
| 173 | { |
---|
| 174 | $table_prefix = $_POST['prefix']; |
---|
| 175 | } |
---|
| 176 | else |
---|
| 177 | { |
---|
| 178 | $table_prefix = DEFAULT_PREFIX_TABLE; |
---|
| 179 | } |
---|
[367] | 180 | |
---|
| 181 | $admin_name = (!empty($_POST['admin_name'])) ? $_POST['admin_name'] : ''; |
---|
| 182 | $admin_pass1 = (!empty($_POST['admin_pass1'])) ? $_POST['admin_pass1'] : ''; |
---|
| 183 | $admin_pass2 = (!empty($_POST['admin_pass2'])) ? $_POST['admin_pass2'] : ''; |
---|
| 184 | $admin_mail = (!empty($_POST['admin_mail'])) ? $_POST['admin_mail'] : ''; |
---|
| 185 | |
---|
| 186 | $infos = array(); |
---|
| 187 | $errors = array(); |
---|
| 188 | |
---|
| 189 | // Open config.php ... if it exists |
---|
| 190 | $config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php'; |
---|
| 191 | if (@file_exists($config_file)) |
---|
| 192 | { |
---|
[529] | 193 | include($config_file); |
---|
| 194 | // Is PhpWebGallery already installed ? |
---|
| 195 | if (defined("PHPWG_INSTALLED")) |
---|
| 196 | { |
---|
| 197 | die('PhpWebGallery is already installed'); |
---|
| 198 | } |
---|
[367] | 199 | } |
---|
| 200 | |
---|
[682] | 201 | $prefixeTable = $table_prefix; |
---|
[819] | 202 | include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); |
---|
[1079] | 203 | @include(PHPWG_ROOT_PATH. 'include/config_local.inc.php'); |
---|
[529] | 204 | include(PHPWG_ROOT_PATH . 'include/constants.php'); |
---|
| 205 | include(PHPWG_ROOT_PATH . 'include/functions.inc.php'); |
---|
[1221] | 206 | include(PHPWG_ROOT_PATH . 'admin/include/functions.php'); |
---|
[2102] | 207 | include(PHPWG_ROOT_PATH . 'admin/include/functions_upgrade.php'); |
---|
[529] | 208 | include(PHPWG_ROOT_PATH . 'include/template.php'); |
---|
| 209 | |
---|
[2102] | 210 | // Create empty local files to avoid log errors |
---|
| 211 | create_empty_local_files(); |
---|
| 212 | |
---|
[529] | 213 | if ( isset( $_POST['language'] )) |
---|
[405] | 214 | { |
---|
[529] | 215 | $language = strip_tags($_POST['language']); |
---|
[367] | 216 | } |
---|
[1855] | 217 | elseif ( isset( $_GET['language'] )) |
---|
| 218 | { |
---|
| 219 | $language = strip_tags($_GET['language']); |
---|
| 220 | } |
---|
[529] | 221 | else |
---|
| 222 | { |
---|
| 223 | $language = guess_lang(); |
---|
| 224 | } |
---|
[367] | 225 | |
---|
[749] | 226 | if (!file_exists(PHPWG_ROOT_PATH.'language/'.$language.'/install.lang.php')) |
---|
[529] | 227 | { |
---|
| 228 | $language = 'en_UK.iso-8859-1'; |
---|
| 229 | } |
---|
| 230 | |
---|
| 231 | include( './language/'.$language.'/common.lang.php' ); |
---|
[1679] | 232 | // Never: @include( './language/'.$language.'/local.lang.php' ); |
---|
[529] | 233 | include( './language/'.$language.'/admin.lang.php' ); |
---|
| 234 | include( './language/'.$language.'/install.lang.php' ); |
---|
[367] | 235 | //----------------------------------------------------- template initialization |
---|
[860] | 236 | $template=setup_style('yoga'); |
---|
[367] | 237 | $template->set_filenames( array('install'=>'install.tpl') ); |
---|
| 238 | $step = 1; |
---|
[529] | 239 | //---------------------------------------------------------------- form analyze |
---|
[367] | 240 | if ( isset( $_POST['install'] )) |
---|
| 241 | { |
---|
[382] | 242 | if ( @mysql_connect( $_POST['dbhost'], |
---|
| 243 | $_POST['dbuser'], |
---|
| 244 | $_POST['dbpasswd'] ) ) |
---|
| 245 | { |
---|
| 246 | if ( @mysql_select_db($_POST['dbname'] ) ) |
---|
[367] | 247 | { |
---|
[382] | 248 | array_push( $infos, $lang['step1_confirmation'] ); |
---|
[218] | 249 | } |
---|
[367] | 250 | else |
---|
| 251 | { |
---|
[382] | 252 | array_push( $errors, $lang['step1_err_db'] ); |
---|
[367] | 253 | } |
---|
[382] | 254 | } |
---|
| 255 | else |
---|
| 256 | { |
---|
| 257 | array_push( $errors, $lang['step1_err_server'] ); |
---|
| 258 | } |
---|
| 259 | |
---|
| 260 | $webmaster = trim(preg_replace( '/\s{2,}/', ' ', $admin_name )); |
---|
| 261 | if ( empty($webmaster)) |
---|
| 262 | array_push( $errors, $lang['step2_err_login1'] ); |
---|
| 263 | else if ( preg_match( '/[\'"]/', $webmaster ) ) |
---|
| 264 | array_push( $errors, $lang['step2_err_login3'] ); |
---|
| 265 | if ( $admin_pass1 != $admin_pass2 || empty($admin_pass1) ) |
---|
| 266 | array_push( $errors, $lang['step2_err_pass'] ); |
---|
| 267 | if ( empty($admin_mail)) |
---|
| 268 | array_push( $errors, $lang['reg_err_mail_address'] ); |
---|
| 269 | else |
---|
| 270 | { |
---|
| 271 | $error_mail_address = validate_mail_address($admin_mail); |
---|
| 272 | if (!empty($error_mail_address)) |
---|
| 273 | array_push( $errors, $error_mail_address ); |
---|
| 274 | } |
---|
| 275 | |
---|
| 276 | if ( count( $errors ) == 0 ) |
---|
| 277 | { |
---|
| 278 | $step = 2; |
---|
[1147] | 279 | $file_content = '<?php |
---|
| 280 | $cfgBase = \''.$dbname.'\'; |
---|
| 281 | $cfgUser = \''.$dbuser.'\'; |
---|
| 282 | $cfgPassword = \''.$dbpasswd.'\'; |
---|
| 283 | $cfgHote = \''.$dbhost.'\'; |
---|
| 284 | |
---|
| 285 | $prefixeTable = \''.$table_prefix.'\'; |
---|
| 286 | |
---|
| 287 | define(\'PHPWG_INSTALLED\', true); |
---|
| 288 | ?'.'>'; |
---|
[382] | 289 | |
---|
| 290 | @umask(0111); |
---|
| 291 | // writing the configuration file |
---|
| 292 | if ( !($fp = @fopen( $config_file, 'w' ))) |
---|
[367] | 293 | { |
---|
[382] | 294 | $html_content = htmlentities( $file_content, ENT_QUOTES ); |
---|
| 295 | $html_content = nl2br( $html_content ); |
---|
[1284] | 296 | $template->assign_block_vars( |
---|
| 297 | 'error_copy', |
---|
| 298 | array( |
---|
| 299 | 'FILE_CONTENT' => $html_content, |
---|
| 300 | ) |
---|
| 301 | ); |
---|
[382] | 302 | } |
---|
| 303 | @fputs($fp, $file_content, strlen($file_content)); |
---|
| 304 | @fclose($fp); |
---|
| 305 | |
---|
| 306 | // tables creation, based on phpwebgallery_structure.sql |
---|
[1147] | 307 | execute_sqlfile( |
---|
| 308 | PHPWG_ROOT_PATH.'install/phpwebgallery_structure.sql', |
---|
| 309 | DEFAULT_PREFIX_TABLE, |
---|
| 310 | $table_prefix |
---|
| 311 | ); |
---|
[382] | 312 | // We fill the tables with basic informations |
---|
[1147] | 313 | execute_sqlfile( |
---|
| 314 | PHPWG_ROOT_PATH.'install/config.sql', |
---|
| 315 | DEFAULT_PREFIX_TABLE, |
---|
| 316 | $table_prefix |
---|
| 317 | ); |
---|
[218] | 318 | |
---|
[1284] | 319 | // fill $conf global array |
---|
| 320 | load_conf_from_db(); |
---|
| 321 | |
---|
| 322 | $insert = array( |
---|
| 323 | 'id' => 1, |
---|
| 324 | 'galleries_url' => PHPWG_ROOT_PATH.'galleries/', |
---|
| 325 | ); |
---|
| 326 | mass_inserts(SITES_TABLE, array_keys($insert), array($insert)); |
---|
[382] | 327 | |
---|
| 328 | // webmaster admin user |
---|
[1284] | 329 | $inserts = array( |
---|
| 330 | array( |
---|
| 331 | 'id' => 1, |
---|
| 332 | 'username' => $admin_name, |
---|
| 333 | 'password' => md5($admin_pass1), |
---|
| 334 | 'mail_address' => $admin_mail, |
---|
| 335 | ), |
---|
| 336 | array( |
---|
| 337 | 'id' => 2, |
---|
| 338 | 'username' => 'guest', |
---|
| 339 | ), |
---|
| 340 | ); |
---|
| 341 | mass_inserts(USERS_TABLE, array_keys($inserts[0]), $inserts); |
---|
[801] | 342 | |
---|
[1930] | 343 | create_user_infos(array(1,2), array('language' => $language)); |
---|
[808] | 344 | |
---|
[1027] | 345 | // Available upgrades must be ignored after a fresh installation. To |
---|
| 346 | // make PWG avoid upgrading, we must tell it upgrades have already been |
---|
| 347 | // made. |
---|
[1221] | 348 | list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); |
---|
| 349 | define('CURRENT_DATE', $dbnow); |
---|
| 350 | $datas = array(); |
---|
[1027] | 351 | foreach (get_available_upgrade_ids() as $upgrade_id) |
---|
| 352 | { |
---|
[1221] | 353 | array_push( |
---|
| 354 | $datas, |
---|
| 355 | array( |
---|
| 356 | 'id' => $upgrade_id, |
---|
| 357 | 'applied' => CURRENT_DATE, |
---|
| 358 | 'description' => 'upgrade included in installation', |
---|
| 359 | ) |
---|
| 360 | ); |
---|
[1027] | 361 | } |
---|
[1221] | 362 | mass_inserts( |
---|
| 363 | UPGRADE_TABLE, |
---|
| 364 | array_keys($datas[0]), |
---|
| 365 | $datas |
---|
| 366 | ); |
---|
[382] | 367 | } |
---|
[367] | 368 | } |
---|
[218] | 369 | |
---|
[529] | 370 | $template->assign_vars( |
---|
| 371 | array( |
---|
| 372 | 'RELEASE'=>PHPWG_VERSION, |
---|
[367] | 373 | |
---|
[529] | 374 | 'L_BASE_TITLE'=>$lang['Initial_config'], |
---|
| 375 | 'L_LANG_TITLE'=>$lang['Default_lang'], |
---|
| 376 | 'L_DB_TITLE'=>$lang['step1_title'], |
---|
| 377 | 'L_DB_HOST'=>$lang['step1_host'], |
---|
| 378 | 'L_DB_HOST_INFO'=>$lang['step1_host_info'], |
---|
| 379 | 'L_DB_USER'=>$lang['step1_user'], |
---|
| 380 | 'L_DB_USER_INFO'=>$lang['step1_user_info'], |
---|
| 381 | 'L_DB_PASS'=>$lang['step1_pass'], |
---|
| 382 | 'L_DB_PASS_INFO'=>$lang['step1_pass_info'], |
---|
| 383 | 'L_DB_NAME'=>$lang['step1_database'], |
---|
| 384 | 'L_DB_NAME_INFO'=>$lang['step1_database_info'], |
---|
| 385 | 'L_DB_PREFIX'=>$lang['step1_prefix'], |
---|
| 386 | 'L_DB_PREFIX_INFO'=>$lang['step1_prefix_info'], |
---|
| 387 | 'L_ADMIN_TITLE'=>$lang['step2_title'], |
---|
| 388 | 'L_ADMIN'=>$lang['install_webmaster'], |
---|
| 389 | 'L_ADMIN_INFO'=>$lang['install_webmaster_info'], |
---|
| 390 | 'L_ADMIN_PASSWORD'=>$lang['step2_pwd'], |
---|
| 391 | 'L_ADMIN_PASSWORD_INFO'=>$lang['step2_pwd_info'], |
---|
| 392 | 'L_ADMIN_CONFIRM_PASSWORD'=>$lang['step2_pwd_conf'], |
---|
| 393 | 'L_ADMIN_CONFIRM_PASSWORD_INFO'=>$lang['step2_pwd_conf_info'], |
---|
| 394 | 'L_ADMIN_EMAIL'=>$lang['conf_mail_webmaster'], |
---|
| 395 | 'L_ADMIN_EMAIL_INFO'=>$lang['conf_mail_webmaster_info'], |
---|
| 396 | 'L_SUBMIT'=>$lang['Start_Install'], |
---|
[1726] | 397 | 'L_INSTALL_HELP'=>sprintf($lang['install_help'], 'http://forum.'.PHPWG_DOMAIN.'/'), |
---|
[529] | 398 | 'L_ERR_COPY'=>$lang['step1_err_copy'], |
---|
| 399 | 'L_END_TITLE'=>$lang['install_end_title'], |
---|
| 400 | 'L_END_MESSAGE'=>$lang['install_end_message'], |
---|
| 401 | |
---|
[801] | 402 | 'F_ACTION'=>'install.php', |
---|
[529] | 403 | 'F_DB_HOST'=>$dbhost, |
---|
| 404 | 'F_DB_USER'=>$dbuser, |
---|
| 405 | 'F_DB_NAME'=>$dbname, |
---|
[1147] | 406 | 'F_DB_PREFIX' => ( |
---|
| 407 | $table_prefix != DEFAULT_PREFIX_TABLE |
---|
| 408 | ? $table_prefix |
---|
| 409 | : DEFAULT_PREFIX_TABLE |
---|
| 410 | ), |
---|
[529] | 411 | 'F_ADMIN'=>$admin_name, |
---|
| 412 | 'F_ADMIN_EMAIL'=>$admin_mail, |
---|
| 413 | 'F_LANG_SELECT'=>language_select($language), |
---|
| 414 | |
---|
| 415 | 'T_CONTENT_ENCODING' => $lang_info['charset'] |
---|
| 416 | )); |
---|
| 417 | |
---|
| 418 | //------------------------------------------------------ errors & infos display |
---|
[367] | 419 | if ( sizeof( $errors ) != 0 ) |
---|
| 420 | { |
---|
| 421 | $template->assign_block_vars('errors',array()); |
---|
| 422 | for ( $i = 0; $i < sizeof( $errors ); $i++ ) |
---|
[218] | 423 | { |
---|
[367] | 424 | $template->assign_block_vars('errors.error',array('ERROR'=>$errors[$i])); |
---|
[218] | 425 | } |
---|
[367] | 426 | } |
---|
[218] | 427 | |
---|
[367] | 428 | if ( sizeof( $infos ) != 0 ) |
---|
| 429 | { |
---|
| 430 | $template->assign_block_vars('infos',array()); |
---|
| 431 | for ( $i = 0; $i < sizeof( $infos ); $i++ ) |
---|
[218] | 432 | { |
---|
[367] | 433 | $template->assign_block_vars('infos.info',array('INFO'=>$infos[$i])); |
---|
[218] | 434 | } |
---|
[367] | 435 | } |
---|
[218] | 436 | |
---|
[367] | 437 | if ($step ==1) |
---|
| 438 | { |
---|
| 439 | $template->assign_block_vars('install',array()); |
---|
[218] | 440 | } |
---|
| 441 | else |
---|
| 442 | { |
---|
[367] | 443 | $template->assign_block_vars('install_end',array()); |
---|
[218] | 444 | } |
---|
[367] | 445 | |
---|
[218] | 446 | //----------------------------------------------------------- html code display |
---|
[367] | 447 | $template->pparse('install'); |
---|
[362] | 448 | ?> |
---|