[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/admin/ -> upgrade_warning.php (source)

   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_warning.php,v 1.6.2.1 2007-10-13 22:35:00 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  ?>
  35  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  36  <html>
  37  <head>
  38  <title> Mantis Administration - Check Installation </title>
  39  <link rel="stylesheet" type="text/css" href="admin.css" />
  40  </head>
  41  <body>
  42  
  43  <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
  44      <tr class="top-bar">
  45          <td class="links">
  46              [ <a href="index.php">Back to Administration</a> ]
  47          </td>
  48          <td class="title">
  49              Upgrade Installation
  50          </td>
  51      </tr>
  52  </table>
  53  <br /><br />
  54  
  55  <p><b>WARNING:</b> - Always backup your database data before upgrading.  For example, if you use a mysql database, From the command line you can do this with the mysqldump command.</p>
  56  <p>eg:</p>
  57  <p><tt>mysqldump -u[username] -p[password] [database_name] > [filename]</tt></p>
  58  <p>This will dump the contents of the specified database into the specified filename.</p>
  59  <p>If an error occurs you can re-create your previous database by just importing your backed up database data.  You'll need to drop and recreate your database (or remove each table).</p>
  60  <p><tt>mysql -u[username] -p[password] [database_name] < [filename]</tt></p>
  61  
  62  <p>Upgrades may take several minutes depending on the size of your database.</p>
  63  
  64  <div align="center">
  65      <table width="80%" bgcolor="#222222" border="0" cellpadding="10" cellspacing="1">
  66          <tr bgcolor="#ffffff">
  67              <?php if ( false == $result ) { ?>
  68               <td align="center" nowrap="nowrap"><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></td>
  69              <?php } else { 
  70                  # check to see if the new installer was used
  71                  if ( -1 != config_get( 'database_version', -1 ) ) {
  72                  ?>
  73                  <td align="center" nowrap="nowrap"><p>When you have backed up your database click the link below to continue</p>[ <a href="install.php">Upgrade Now</a> ]</td>
  74                  <?php } else { ?>
  75                  <td align="center" nowrap="nowrap"><p>When you have backed up your database click the link below to continue</p>[ <a href="upgrade_list.php">Upgrade Now</a> ]</td>
  76                  <?php } ?>
  77              <?php } ?>
  78          </tr>
  79      </table>
  80  </div>
  81  </body>
  82  </html>


Généré le : Thu Nov 29 09:42:17 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics