[ Index ] |
|
Code source de osCommerce 2.2ms2-060817 |
1 <?php 2 /* 3 $Id: upgrade_2.php,v 1.2 2003/07/09 01:11:06 hpdl Exp $ 4 5 osCommerce, Open Source E-Commerce Solutions 6 http://www.oscommerce.com 7 8 Copyright (c) 2003 osCommerce 9 10 Released under the GNU General Public License 11 */ 12 ?> 13 14 <p class="pageTitle">Upgrade</p> 15 16 <?php 17 $db = array(); 18 $db['DB_SERVER'] = trim(stripslashes($HTTP_POST_VARS['DB_SERVER'])); 19 $db['DB_SERVER_USERNAME'] = trim(stripslashes($HTTP_POST_VARS['DB_SERVER_USERNAME'])); 20 $db['DB_SERVER_PASSWORD'] = trim(stripslashes($HTTP_POST_VARS['DB_SERVER_PASSWORD'])); 21 $db['DB_DATABASE'] = trim(stripslashes($HTTP_POST_VARS['DB_DATABASE'])); 22 23 $db_error = false; 24 osc_db_connect($db['DB_SERVER'], $db['DB_SERVER_USERNAME'], $db['DB_SERVER_PASSWORD']); 25 26 if ($db_error == false) { 27 osc_db_test_create_db_permission($db['DB_DATABASE']); 28 } 29 30 if ($db_error != false) { 31 ?> 32 33 <form name="upgrade" action="upgrade.php" method="post"> 34 35 <table width="95%" border="0" cellpadding="2" class="formPage"> 36 <tr> 37 <td> 38 <p>A test connection made to the database was <b>NOT</b> successful.</p> 39 <p>The error message returned is:</p> 40 <p class="boxme"><?php echo $db_error; ?></p> 41 <p>Please click on the <i>Back</i> button below to review your database server settings.</p> 42 <p>If you require help with your database server settings, please consult your hosting company.</p> 43 </td> 44 </tr> 45 </table> 46 47 <p> </p> 48 49 <table border="0" width="100%" cellspacing="0" cellpadding="0"> 50 <tr> 51 <td align="center"><a href="index.php"><img src="images/button_cancel.gif" border="0" alt="Cancel"></a></td> 52 <td align="center"><input type="image" src="images/button_back.gif" border="0" alt="Back"></td> 53 </tr> 54 </table> 55 56 <?php 57 reset($HTTP_POST_VARS); 58 while (list($key, $value) = each($HTTP_POST_VARS)) { 59 if ($key != 'x' && $key != 'y') { 60 if (is_array($value)) { 61 for ($i=0; $i<sizeof($value); $i++) { 62 echo osc_draw_hidden_field($key . '[]', $value[$i]); 63 } 64 } else { 65 echo osc_draw_hidden_field($key, $value); 66 } 67 } 68 } 69 ?> 70 71 </form> 72 73 <?php 74 } else { 75 ?> 76 77 <form name="upgrade" action="upgrade.php?step=3" method="post"> 78 79 <table width="95%" border="0" cellpadding="2" class="formPage"> 80 <tr> 81 <td> 82 <p>A test connection made to the database was <b>successful</b>.</p> 83 <p>Please continue the upgrade process to execute the database upgrade procedure.</p> 84 <p>It is important this procedure is not interrupted, otherwise the database may end up corrupt.</p> 85 </td> 86 </tr> 87 </table> 88 89 <p> </p> 90 91 <table border="0" width="100%" cellspacing="0" cellpadding="0"> 92 <tr> 93 <td align="center"><a href="index.php"><img src="images/button_cancel.gif" border="0" alt="Cancel"></a></td> 94 <td align="center"><input type="image" src="images/button_continue.gif" border="0" alt="Continue"></td> 95 </tr> 96 </table> 97 98 <?php 99 reset($HTTP_POST_VARS); 100 while (list($key, $value) = each($HTTP_POST_VARS)) { 101 if ($key != 'x' && $key != 'y') { 102 if (is_array($value)) { 103 for ($i=0; $i<sizeof($value); $i++) { 104 echo osc_draw_hidden_field($key . '[]', $value[$i]); 105 } 106 } else { 107 echo osc_draw_hidden_field($key, $value); 108 } 109 } 110 } 111 ?> 112 113 </form> 114 115 <?php 116 } 117 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 19:48:25 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |