PageRenderTime 53ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/catalog/install/templates/pages/index.php

https://github.com/jrivett/oscommerce2
PHP | 234 lines | 178 code | 46 blank | 10 comment | 40 complexity | ca74dad0495ee321bd1643dcf0444314 MD5 | raw file
Possible License(s): AGPL-1.0
  1. <?php
  2. /*
  3. $Id$
  4. osCommerce, Open Source E-Commerce Solutions
  5. http://www.oscommerce.com
  6. Copyright (c) 2007 osCommerce
  7. Released under the GNU General Public License
  8. */
  9. $compat_register_globals = true;
  10. if (function_exists('ini_get') && (PHP_VERSION < 4.3) && ((int)ini_get('register_globals') == 0)) {
  11. $compat_register_globals = false;
  12. }
  13. ?>
  14. <div class="mainBlock">
  15. <h1>Welcome to osCommerce Online Merchant v2.2!</h1>
  16. <p>osCommerce Online Merchant allows you to sell products worldwide with your own online store. The administration side manages products, customers, orders, newsletters, specials, and more to successfully build and thrive on the success of your online business.</p>
  17. <p>We have attracted the largest community for an online shop shopping cart solution that consists of over 140,000 registered store owners and developers who help one another out and have provided over 4,000 add-ons that extend the features and potential of your online store.</p>
  18. <p>osCommerce Online Merchant and its add-ons are available for free under an Open Source license to help you start selling online sooner without any licensing fees or limitations involved.</p>
  19. </div>
  20. <div class="contentBlock">
  21. <div class="infoPane">
  22. <h3>Server Capabilities</h3>
  23. <div class="infoPaneContents">
  24. <table border="0" width="100%" cellspacing="0" cellpadding="2">
  25. <tr>
  26. <td><strong>PHP Version</strong></td>
  27. <td align="right"><?php echo PHP_VERSION; ?></td>
  28. <td align="right" width="25"><img src="images/<?php echo ((PHP_VERSION >= 4) ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  29. </tr>
  30. </table>
  31. <?php
  32. if (function_exists('ini_get')) {
  33. ?>
  34. <br />
  35. <table border="0" width="100%" cellspacing="0" cellpadding="2">
  36. <tr>
  37. <td><strong>PHP Settings</strong></td>
  38. <td align="right"></td>
  39. <td align="right" width="25"></td>
  40. </tr>
  41. <tr>
  42. <td>register_globals</td>
  43. <td align="right"><?php echo (((int)ini_get('register_globals') == 0) ? 'Off' : 'On'); ?></td>
  44. <td align="right"><img src="images/<?php echo (($compat_register_globals == true) ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  45. </tr>
  46. <tr>
  47. <td>magic_quotes</td>
  48. <td align="right"><?php echo (((int)ini_get('magic_quotes') == 0) ? 'Off' : 'On'); ?></td>
  49. <td align="right"><img src="images/<?php echo (((int)ini_get('magic_quotes') == 0) ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  50. </tr>
  51. <tr>
  52. <td>file_uploads</td>
  53. <td align="right"><?php echo (((int)ini_get('file_uploads') == 0) ? 'Off' : 'On'); ?></td>
  54. <td align="right"><img src="images/<?php echo (((int)ini_get('file_uploads') == 1) ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  55. </tr>
  56. <tr>
  57. <td>session.auto_start</td>
  58. <td align="right"><?php echo (((int)ini_get('session.auto_start') == 0) ? 'Off' : 'On'); ?></td>
  59. <td align="right"><img src="images/<?php echo (((int)ini_get('session.auto_start') == 0) ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  60. </tr>
  61. <tr>
  62. <td>session.use_trans_sid</td>
  63. <td align="right"><?php echo (((int)ini_get('session.use_trans_sid') == 0) ? 'Off' : 'On'); ?></td>
  64. <td align="right"><img src="images/<?php echo (((int)ini_get('session.use_trans_sid') == 0) ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  65. </tr>
  66. </table>
  67. <br />
  68. <table border="0" width="100%" cellspacing="0" cellpadding="2">
  69. <tr>
  70. <td><strong>Required PHP Extensions</strong></td>
  71. <td align="right" width="25"></td>
  72. </tr>
  73. <tr>
  74. <td>MySQL</td>
  75. <td align="right"><img src="images/<?php echo (extension_loaded('mysql') ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  76. </tr>
  77. </table>
  78. <br />
  79. <table border="0" width="100%" cellspacing="0" cellpadding="2">
  80. <tr>
  81. <td><strong>Optional PHP Extensions</strong></td>
  82. <td align="right" width="25"></td>
  83. </tr>
  84. <tr>
  85. <td>GD</td>
  86. <td align="right"><img src="images/<?php echo (extension_loaded('gd') ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  87. </tr>
  88. <tr>
  89. <td>cURL</td>
  90. <td align="right"><img src="images/<?php echo (extension_loaded('curl') ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  91. </tr>
  92. <tr>
  93. <td>OpenSSL</td>
  94. <td align="right"><img src="images/<?php echo (extension_loaded('openssl') ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  95. </tr>
  96. </table>
  97. <?php
  98. }
  99. ?>
  100. </div>
  101. </div>
  102. <div class="contentPane">
  103. <h2>New Installation</h2>
  104. <?php
  105. $configfile_array = array();
  106. if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
  107. @chmod(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php', 0777);
  108. }
  109. if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) {
  110. @chmod(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php', 0777);
  111. }
  112. if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
  113. $configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php';
  114. }
  115. if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) {
  116. $configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php';
  117. }
  118. $warning_array = array();
  119. if (function_exists('ini_get')) {
  120. if ($compat_register_globals == false) {
  121. $warning_array['register_globals'] = 'Compatibility with register_globals is supported from PHP 4.3+. This setting <u>must be enabled</u> due to an older PHP version being used.';
  122. }
  123. }
  124. if (!extension_loaded('mysql')) {
  125. $warning_array['mysql'] = 'The MySQL extension is required but is not installed. Please enable it to continue installation.';
  126. }
  127. if ((sizeof($configfile_array) > 0) || (sizeof($warning_array) > 0)) {
  128. ?>
  129. <div class="noticeBox">
  130. <?php
  131. if (sizeof($warning_array) > 0) {
  132. ?>
  133. <table border="0" width="100%" cellspacing="0" cellpadding="2" style="background: #fffbdf; border: 1px solid #ffc20b; padding: 2px;">
  134. <?php
  135. reset($warning_array);
  136. while (list($key, $value) = each($warning_array)) {
  137. echo ' <tr>' . "\n" .
  138. ' <td valign="top"><strong>' . $key . '</strong></td>' . "\n" .
  139. ' <td valign="top">' . $value . '</td>' . "\n" .
  140. ' </tr>' . "\n";
  141. }
  142. ?>
  143. </table>
  144. <?php
  145. }
  146. if (sizeof($configfile_array) > 0) {
  147. ?>
  148. <p>The webserver is not able to save the installation parameters to its configuration files.</p>
  149. <p>The following files need to have their file permissions set to world-writeable (chmod 777):</p>
  150. <p>
  151. <?php
  152. for ($i=0, $n=sizeof($configfile_array); $i<$n; $i++) {
  153. echo $configfile_array[$i];
  154. if (isset($configfile_array[$i+1])) {
  155. echo '<br />';
  156. }
  157. }
  158. ?>
  159. </p>
  160. <?php
  161. }
  162. ?>
  163. </div>
  164. <?php
  165. }
  166. if ((sizeof($configfile_array) > 0) || (sizeof($warning_array) > 0)) {
  167. ?>
  168. <p>Please correct the above errors and retry the installation procedure with the changes in place.</p>
  169. <?php
  170. if (sizeof($warning_array) > 0) {
  171. echo ' <p><i>Changing webserver configuration parameters may require the webserver service to be restarted before the changes take affect.</i></p>' . "\n";
  172. }
  173. ?>
  174. <p align="right"><a href="index.php"><img src="images/button_retry.gif" border="0" alt="Retry" /></a></p>
  175. <?php
  176. } else {
  177. ?>
  178. <p>The webserver environment has been verified to proceed with a successful installation and configuration of your online store.</p>
  179. <p>Please continue to start the installation procedure.</p>
  180. <p align="right"><a href="install.php"><img src="images/button_continue.gif" border="0" alt="Continue" /></a></p>
  181. <?php
  182. }
  183. ?>
  184. </div>
  185. </div>