
<?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 height="111" COLSPAN=3 valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <TD width="223" height="111" valign="top"> <IMG SRC="images/header/header_01.gif" WIDTH=223 HEIGHT=111 ALT=""></TD>
          <TD width="146" valign="top"> <IMG SRC="images/header/header_02.gif" WIDTH=146 HEIGHT=111 ALT=""></TD>
          <TD width="139" valign="top"> <IMG SRC="images/header/header_03.gif" WIDTH=139 HEIGHT=111 ALT=""></TD>
          <TD width="126" valign="top"> <IMG SRC="images/header/header_04.gif" WIDTH=126 HEIGHT=111 ALT=""></TD>
          <TD width="146" valign="top"> <IMG SRC="images/header/header_05.gif" WIDTH=146 HEIGHT=111 ALT=""></TD>
        </tr>
      </table></TD>
  </TR>
  <TR>
    <TD width="253" height="28"> <IMG SRC="images/header/header_06.gif" WIDTH=253 HEIGHT=28 ALT=""></TD>
    <TD width="490" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <TD width="51" height="28" valign="top"> <a href="index.php"><IMG SRC="images/header/header_07.gif" ALT="" WIDTH=51 HEIGHT=28 border="0"></a></TD>
          <TD width="84" valign="top"> <a href="products_new.php"><IMG SRC="images/header/header_08.gif" ALT="" WIDTH=84 HEIGHT=28 border="0"></a></TD>
          <TD width="73" valign="top"> <a href="account.php"><IMG SRC="images/header/header_09.gif" ALT="" WIDTH=73 HEIGHT=28 border="0"></a></TD>
          <TD width="55" valign="top"> <a href="advanced_search.php"><IMG SRC="images/header/header_10.gif" ALT="" WIDTH=55 HEIGHT=28 border="0"></a></TD>
          <TD width="80" valign="top"> <a href="shopping_cart.php"><IMG SRC="images/header/header_11.gif" ALT="" WIDTH=80 HEIGHT=28 border="0"></a></TD>
          <TD width="73" valign="top"> <a href="conditions.php"><IMG SRC="images/header/header_12.gif" ALT="" WIDTH=73 HEIGHT=28 border="0"></a></TD>
          <TD width="74" valign="top"> <a href="contact_us.php"><IMG SRC="images/header/header_13.gif" ALT="" WIDTH=74 HEIGHT=28 border="0"></a></TD>
        </tr>
      </table></TD>
    <TD width="37"> <IMG SRC="images/header/header_14.gif" WIDTH=37 HEIGHT=28 ALT=""></TD>
  </TR>
  <TR>
    <TD height="7" COLSPAN=3> <IMG SRC="images/header/header_15.gif" WIDTH=780 HEIGHT=7 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>