[ Index ]
osCommerce Docs :: PHP Cross Reference For osCommerce 2.2 MS2
Provided By OSCdox.com

/install/templates/pages/ -> install_4.php (source)

[Summary view]

   1  <?php
   2  /*
   3    $Id: install_4.php,v 1.11 2003/07/11 14:59:01 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    $cookie_path = substr(dirname(getenv('SCRIPT_NAME')), 0, -7);
  14  
  15    $www_location = 'http://' . getenv('HTTP_HOST') . getenv('SCRIPT_NAME');
  16    $www_location = substr($www_location, 0, strpos($www_location, 'install'));
  17  
  18    $script_filename = getenv('PATH_TRANSLATED');
  19    if (empty($script_filename)) {
  20      $script_filename = getenv('SCRIPT_FILENAME');
  21    }
  22  
  23    $script_filename = str_replace('\\', '/', $script_filename);
  24    $script_filename = str_replace('//', '/', $script_filename);
  25  
  26    $dir_fs_www_root_array = explode('/', dirname($script_filename));
  27    $dir_fs_www_root = array();
  28    for ($i=0, $n=sizeof($dir_fs_www_root_array)-1; $i<$n; $i++) {
  29      $dir_fs_www_root[] = $dir_fs_www_root_array[$i];
  30    }
  31    $dir_fs_www_root = implode('/', $dir_fs_www_root) . '/';
  32  ?>
  33  <p class="pageTitle">New Installation</p>
  34  
  35  <p><b>osCommerce Configuration</b></p>
  36  
  37  <form name="install" action="install.php?step=5" method="post">
  38  
  39  <p><b>Please enter the web server information:</b></p>
  40  
  41  <table width="95%" border="0" cellpadding="2" class="formPage">
  42    <tr>
  43      <td width="30%" valign="top">WWW Address:</td>
  44      <td width="70%" class="smallDesc">
  45        <?php echo osc_draw_input_field('HTTP_WWW_ADDRESS', $www_location); ?>
  46        <img src="images/layout/help_icon.gif" onClick="toggleBox('dbWWW');"><br>
  47        <div id="dbWWWSD">The full website address to the online store</div>
  48        <div id="dbWWW" class="longDescription">The web address to the online store, for example <i>http://www.my-server.com/catalog/</i></div>
  49      </td>
  50    </tr>
  51    <tr>
  52      <td width="30%" valign="top">Webserver Root Directory:</td>
  53      <td width="70%" class="smallDesc">
  54        <?php echo osc_draw_input_field('DIR_FS_DOCUMENT_ROOT', $dir_fs_www_root); ?>
  55        <img src="images/layout/help_icon.gif"  onClick="toggleBox('dbRoot');"><br>
  56        <div id="dbRootSD">The server path to the online store</div>
  57        <div id="dbRoot" class="longDescription">The directory where osCommerce is installed on the server, for example <i>/home/myname/public_html/osCommerce/</i></div>
  58      </td>
  59    </tr>
  60    <tr>
  61      <td width="30%" valign="top">HTTP Cookie Domain:</td>
  62      <td width="70%" class="smallDesc">
  63        <?php echo osc_draw_input_field('HTTP_COOKIE_DOMAIN', getenv('HTTP_HOST')); ?>
  64        <img src="images/layout/help_icon.gif" onClick="toggleBox('dbCookieD');"><br>
  65        <div id="dbCookieDSD">The domain to store cookies in</div>
  66        <div id="dbCookieD" class="longDescription">The full or top-level domain to store the cookies in, for example <i>.my-server.com</i></div>
  67      </td>
  68    </tr>
  69    <tr>
  70      <td width="30%" valign="top">HTTP Cookie Path:</td>
  71      <td width="70%" class="smallDesc">
  72        <?php echo osc_draw_input_field('HTTP_COOKIE_PATH', $cookie_path); ?>
  73        <img src="images/layout/help_icon.gif" onClick="toggleBox('dbCookieP');"><br>
  74        <div id="dbCookiePSD">The path to store cookies under</div>
  75        <div id="dbCookieP" class="longDescription">The web address to limit the cookie to, for example <i>/catalog/</i></div>
  76      </td>
  77    </tr>
  78    <tr>
  79      <td width="30%" valign="top">Enable SSL Connections:</td>
  80      <td width="70%" class="smallDesc">
  81        <?php echo osc_draw_checkbox_field('ENABLE_SSL', 'true'); ?>
  82        <img src="images/layout/help_icon.gif" onClick="toggleBox('dbSSL');"><br>
  83        <div id="dbSSLSD"></div>
  84        <div id="dbSSL" class="longDescription">Enable secure SSL/HTTPS connections (requires a secure certificate installed on the web server)</div>
  85      </td>
  86    </tr>
  87  </table>
  88  
  89  <p>&nbsp;</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    echo osc_draw_hidden_field('install[]', 'configure');
 113  ?>
 114  
 115  </form>


Generated: Tue Nov 4 23:53:39 2003
Hosted By :: AABox.com
Cross-referenced by PHPXref 0.4