[ Index ] |
|
Code source de Mantis 1.1.0rc3 |
1 <?php 2 # Mantis - a php based bugtracking system 3 4 # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 5 # Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net 6 7 # Mantis is free software: you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation, either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # Mantis is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with Mantis. If not, see <http://www.gnu.org/licenses/>. 19 20 # -------------------------------------------------------- 21 # $Id: upgrade.php,v 1.16.2.1 2007-10-13 22:34:58 giallu Exp $ 22 # -------------------------------------------------------- 23 ?> 24 <?php 25 $g_skip_open_db = true; # don't open the database in database_api.php 26 require_once ( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core.php' ); 27 $g_error_send_page_header = false; # suppress page headers in the error handler 28 29 # @@@ upgrade list moved to the bottom of upgrade_inc.php 30 31 $f_advanced = gpc_get_bool( 'advanced', false ); 32 33 $result = @db_connect( config_get_global( 'dsn', false ), config_get_global( 'hostname' ), config_get_global( 'db_username' ), config_get_global( 'db_password' ), config_get_global( 'database_name' ) ); 34 if ( false == $result ) { 35 ?> 36 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 37 <html> 38 <head> 39 <title> Mantis Administration - Upgrade Installation </title> 40 <link rel="stylesheet" type="text/css" href="admin.css" /> 41 </head> 42 <body> 43 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff"> 44 <tr class="top-bar"> 45 <td class="links"> 46 [ <a href="upgrade_list.php">Back to Upgrade List</a> ] 47 [ <a href="upgrade.php">Refresh view</a> ] 48 [ <a href="upgrade.php?advanced=<?php echo ( $f_advanced ? 0 : 1 ) ?>"><?php echo ( $f_advanced ? 'Simple' : 'Advanced' ) ?></a> ] 49 </td> 50 <td class="title"> 51 Upgrade Installation 52 </td> 53 </tr> 54 </table> 55 <br /><br /> 56 <p>Opening connection to database [<?php echo config_get_global( 'database_name' ) ?>] on host [<?php echo config_get_global( 'hostname' ) ?>] with username [<?php echo config_get_global( 'db_username' ) ?>] failed ( <?php echo db_error_msg() ?> ).</p> 57 </body> 58 <?php 59 exit(); 60 } 61 62 # check to see if the new installer was used 63 if ( -1 != config_get( 'database_version', -1 ) ) { 64 if ( OFF == $g_use_iis ) { 65 header( 'Status: 302' ); 66 } 67 header( 'Content-Type: text/html' ); 68 69 if ( ON == $g_use_iis ) { 70 header( "Refresh: 0;url=install.php" ); 71 } else { 72 header( "Location: install.php" ); 73 } 74 exit; # additional output can cause problems so let's just stop output here 75 } 76 ?> 77 <html> 78 <head> 79 <title> Mantis Administration - Upgrade Installation </title> 80 <link rel="stylesheet" type="text/css" href="admin.css" /> 81 </head> 82 <body> 83 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff"> 84 <tr class="top-bar"> 85 <td class="links"> 86 [ <a href="upgrade_list.php">Back to Upgrade List</a> ] 87 [ <a href="upgrade.php">Refresh view</a> ] 88 [ <a href="upgrade.php?advanced=<?php echo ( $f_advanced ? 0 : 1 ) ?>"><?php echo ( $f_advanced ? 'Simple' : 'Advanced' ) ?></a> ] 89 </td> 90 <td class="title"> 91 Upgrade Installation 92 </td> 93 </tr> 94 </table> 95 <br /><br /> 96 <?php 97 if ( ! db_table_exists( config_get( 'mantis_upgrade_table' ) ) ) { 98 # Create the upgrade table if it does not exist 99 $query = "CREATE TABLE " . config_get( 'mantis_upgrade_table' ) . 100 "(upgrade_id char(20) NOT NULL, 101 description char(255) NOT NULL, 102 PRIMARY KEY (upgrade_id))"; 103 104 $result = db_query( $query ); 105 } 106 107 # link the data structures and upgrade list 108 require_once ( 'upgrade_inc.php' ); 109 110 $upgrade_set->process_post_data( $f_advanced ); 111 ?> 112 </body> 113 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 09:42:17 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |