| [ 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_escaping.php,v 1.7.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 <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.</p> 37 </body> 38 <?php 39 exit(); 40 } 41 42 # check to see if the new installer was used 43 if ( -1 != config_get( 'database_version', -1 ) ) { 44 if ( OFF == $g_use_iis ) { 45 header( 'Status: 302' ); 46 } 47 header( 'Content-Type: text/html' ); 48 49 if ( ON == $g_use_iis ) { 50 header( "Refresh: 0;url=install.php" ); 51 } else { 52 header( "Location: install.php" ); 53 } 54 exit; # additional output can cause problems so let's just stop output here 55 } 56 ?> 57 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 58 <html> 59 <head> 60 <title> Mantis Administration - String Escaping Database Fixes </title> 61 <link rel="stylesheet" type="text/css" href="admin.css" /> 62 </head> 63 <body> 64 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff"> 65 <tr class="top-bar"> 66 <td class="links"> 67 [ <a href="upgrade_list.php">Back to Upgrade List</a> ] 68 [ <a href="upgrade_escaping.php">Refresh view</a> ] 69 </td> 70 <td class="title"> 71 String Escaping Database Fixes 72 </td> 73 </tr> 74 </table> 75 <br /><br /> 76 <?php 77 if ( ! db_table_exists( config_get( 'mantis_upgrade_table' ) ) ) { 78 # Create the upgrade table if it does not exist 79 $query = "CREATE TABLE " . config_get( 'mantis_upgrade_table' ) . 80 "(upgrade_id char(20) NOT NULL, 81 description char(255) NOT NULL, 82 PRIMARY KEY (upgrade_id))"; 83 84 $result = db_query( $query ); 85 } 86 87 88 # link the data structures and upgrade list 89 require_once ( 'upgrade_inc.php' ); 90 91 # drop the database upgrades and load the escaping ones 92 $upgrade_set = new UpgradeSet(); 93 94 $upgrade_set->add_items( include ( 'upgrades/0_17_escaping_fixes_inc.php' ) ); 95 96 $upgrade_set->process_post_data(); 97 ?> 98 </body> 99 </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 |
|