PageRenderTime 49ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://github.com/eosc/EosC-3.0
PHP | 221 lines | 168 code | 43 blank | 10 comment | 39 complexity | 8581e3ffde832bae419d808497da23d6 MD5 | raw file
Possible License(s): AGPL-1.0
  1. <?php
  2. /*
  3. $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $
  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><b>PHP Version</b></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><b>PHP Settings</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><b>PHP Extensions</b></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. <tr>
  78. <td>GD</td>
  79. <td align="right"><img src="images/<?php echo (extension_loaded('gd') ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  80. </tr>
  81. <tr>
  82. <td>cURL</td>
  83. <td align="right"><img src="images/<?php echo (extension_loaded('curl') ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  84. </tr>
  85. <tr>
  86. <td>OpenSSL</td>
  87. <td align="right"><img src="images/<?php echo (extension_loaded('openssl') ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
  88. </tr>
  89. </table>
  90. <?php
  91. }
  92. ?>
  93. </div>
  94. </div>
  95. <div class="contentPane">
  96. <h2>New Installation</h2>
  97. <?php
  98. $configfile_array = array();
  99. if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
  100. @chmod(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php', 0777);
  101. }
  102. if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) {
  103. @chmod(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php', 0777);
  104. }
  105. if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
  106. $configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php';
  107. }
  108. if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) {
  109. $configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php';
  110. }
  111. $warning_array = array();
  112. if (function_exists('ini_get')) {
  113. if ($compat_register_globals == false) {
  114. $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.';
  115. }
  116. }
  117. if ((sizeof($configfile_array) > 0) || (sizeof($warning_array) > 0)) {
  118. ?>
  119. <div class="noticeBox">
  120. <?php
  121. if (sizeof($warning_array) > 0) {
  122. ?>
  123. <table border="0" width="100%" cellspacing="0" cellpadding="2" style="background: #fffbdf; border: 1px solid #ffc20b; padding: 2px;">
  124. <?php
  125. reset($warning_array);
  126. while (list($key, $value) = each($warning_array)) {
  127. echo ' <tr>' . "\n" .
  128. ' <td valign="top"><b>' . $key . '</b></td>' . "\n" .
  129. ' <td valign="top">' . $value . '</td>' . "\n" .
  130. ' </tr>' . "\n";
  131. }
  132. ?>
  133. </table>
  134. <?php
  135. }
  136. if (sizeof($configfile_array) > 0) {
  137. ?>
  138. <p>The webserver is not able to save the installation parameters to its configuration files.</p>
  139. <p>The following files need to have their file permissions set to world-writeable (chmod 777):</p>
  140. <p>
  141. <?php
  142. for ($i=0, $n=sizeof($configfile_array); $i<$n; $i++) {
  143. echo $configfile_array[$i];
  144. if (isset($configfile_array[$i+1])) {
  145. echo '<br />';
  146. }
  147. }
  148. ?>
  149. </p>
  150. <?php
  151. }
  152. ?>
  153. </div>
  154. <?php
  155. }
  156. if ((sizeof($configfile_array) > 0) || (sizeof($warning_array) > 0)) {
  157. ?>
  158. <p>Please correct the above errors and retry the installation procedure with the changes in place.</p>
  159. <?php
  160. if (sizeof($warning_array) > 0) {
  161. echo ' <p><i>Changing webserver configuration parameters may require the webserver service to be restarted before the changes take affect.</i></p>' . "\n";
  162. }
  163. ?>
  164. <p align="right"><a href="index.php"><img src="images/button_retry.gif" border="0" alt="Retry" /></a></p>
  165. <?php
  166. } else {
  167. ?>
  168. <p>The webserver environment has been verified to proceed with a successful installation and configuration of your online store.</p>
  169. <p>Please continue to start the installation procedure.</p>
  170. <p align="right"><a href="install.php"><img src="images/button_continue.gif" border="0" alt="Continue" /></a></p>
  171. <?php
  172. }
  173. ?>
  174. </div>
  175. </div>