
<?php
/*
  $Id: header.php,v 1.36 2002/08/15 17:29:47 dgw_ Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2001 osCommerce

  Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
  if (WARN_INSTALL_EXISTENCE == 'true') {
    if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
      tep_output_warning(WARNING_INSTALL_DIRECTORY_EXISTS);
    }
  }

// check if the configure.php file is writeable
  if (WARN_CONFIG_WRITEABLE == 'true') {
    if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
      tep_output_warning(WARNING_CONFIG_FILE_WRITEABLE);
    }
  }

// check if the session folder is writeable
  if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
    if (STORE_SESSIONS == '') {
      if (!is_dir(tep_session_save_path())) {
        tep_output_warning(WARNING_SESSION_DIRECTORY_NON_EXISTENT);
      } elseif (!is_writeable(tep_session_save_path())) {
        tep_output_warning(WARNING_SESSION_DIRECTORY_NOT_WRITEABLE);
      }
    }
  }

// check session.auto_start is disabled
  if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
    if (ini_get('session.auto_start') == '1') {
      tep_output_warning(WARNING_SESSION_AUTO_START);
    }
  }

  if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
    if (!is_dir(DIR_FS_DOWNLOAD)) {
      tep_output_warning(WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT);
    }
  }
?>
<?php
  if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<table width="780" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <TD width="215" height="111" valign="top"> <IMG SRC="images/header/template1_01.gif" WIDTH=215 HEIGHT=111 ALT=""></TD>
          <TD width="180" valign="top"> <IMG SRC="images/header/template1_02.gif" WIDTH=180 HEIGHT=111 ALT=""></TD>
          <TD width="156" valign="top"> <IMG SRC="images/header/template1_03.gif" WIDTH=156 HEIGHT=111 ALT=""></TD>
          <TD width="152" valign="top"> <IMG SRC="images/header/template1_04.gif" WIDTH=152 HEIGHT=111 ALT=""></TD>
          <TD width="77" valign="top"> <IMG SRC="images/header/template1_05.gif" WIDTH=77 HEIGHT=111 ALT=""></TD>
        </tr>
        <tr>
          <TD height="27" COLSPAN=5 valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <TD width="255" height="27" valign="top"> <IMG SRC="images/header/template1_06.gif" WIDTH=255 HEIGHT=27 ALT=""></TD>
                <TD width="48" valign="top"><a href="index.php"><IMG SRC="images/header/template1_07.gif" WIDTH=48 HEIGHT=27 ALT="" border=0></a></TD>
                <TD width="83" valign="top"><a href="products_new.php"><IMG SRC="images/header/template1_08.gif" WIDTH=83 HEIGHT=27 ALT="" border=0></a></TD>
                <TD width="74" valign="top"><a href="account.php"><IMG SRC="images/header/template1_09.gif" WIDTH=74 HEIGHT=27 ALT="" border=0></a></TD>
                <TD width="56" valign="top"><a href="#"><IMG SRC="images/header/template1_10.gif" WIDTH=56 HEIGHT=27 ALT="" border=0></a></TD>
                <TD width="80" valign="top"><a href="shopping_cart.php"><IMG SRC="images/header/template1_11.gif" WIDTH=80 HEIGHT=27 ALT="" border=0></a></TD>
                <TD width="74" valign="top"><a href="conditions.php"><IMG SRC="images/header/template1_12.gif" WIDTH=74 HEIGHT=27 ALT="" border=0></a></TD>
                <TD width="73" valign="top"><a href="contact_us.php"><IMG SRC="images/header/template1_13.gif" WIDTH=73 HEIGHT=27 ALT="" border=0></a></TD>
                <TD width="37" valign="top"> <IMG SRC="images/header/template1_14.gif" WIDTH=37 HEIGHT=27 ALT=""></TD>
              </tr>
            </table></TD>
        </tr>
        <tr>
          <TD height="8" COLSPAN=5 valign="top"> <IMG SRC="images/header/template1_15.gif" WIDTH=780 HEIGHT=8 ALT=""></TD>
        </tr>
      </table>
<?php
  }
?>
<?php
  if ($HTTP_GET_VARS['error_message'] != '') {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr class="headerError">
    <td class="headerError"><?php echo urldecode($HTTP_GET_VARS['error_message']); ?></td>
  </tr>
</table>
<?php
  }

  if ($HTTP_GET_VARS['info_message'] != '') {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr class="headerInfo">
    <td class="headerInfo"><?php echo $HTTP_GET_VARS['info_message']; ?></td>
  </tr>
<?php
  }
?>
</table>