<?php
/*
  $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

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

  Copyright (c) 2003 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')) {
      $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
    }
  }

// 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')) ) {
      $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
    }
  }

// check if the session folder is writeable
  if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
    if (STORE_SESSIONS == '') {
      if (!is_dir(tep_session_save_path())) {
        $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
      } elseif (!is_writeable(tep_session_save_path())) {
        $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
      }
    }
  }

// check session.auto_start is disabled
  if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
    if (ini_get('session.auto_start') == '1') {
      $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
    }
  }

  if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
    if (!is_dir(DIR_FS_DOWNLOAD)) {
      $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
    }
  }

  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
?>
<!--

              


<?   // ---- MANUFACTURERS


  $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
  if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {

      echo '<table cellspacing=0 cellpadding=0 width=177 align=center> '.
              tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get')
             .' <tr><td colspan=2><b>Search by manufacturers:</b></td></tr>
                <tr><td height=2 colspan=2></td></tr>
                <tr><td colspan=2>
           ';      
      
      $manufacturers_array = array();
      while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
        $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
        $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
                                       'text' => $manufacturers_name);
      }

      echo tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" class=se1') . tep_hide_session_id();
      echo ' </td>
          </form>
         </table>
           ';
  }

?>


-->

  <table cellspacing=0 cellpadding=0 width=766 align=center>
   <tr><td>
        <table cellspacing=0 cellpadding=0>
         <tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/m01.gif width=252 height=137 border=0></a><img src=images/m02.jpg width=321 height=137><img src=images/m03.jpg width=193 height=137></td></tr>
         <tr><td><img src=images/m04.gif width=573 height=14><img src=images/m05.jpg width=193 height=14></td></tr>
         <tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/m11.gif width=77 height=37 border=0></a><a href=<?=tep_href_link('products_new.php')?>><img src=images/m10.gif width=132 height=37 border=0></a><a href=<?=tep_href_link('account.php')?>><img src=images/m09.gif width=117 height=37 border=0></a><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m08.gif width=138 height=37 border=0></a><a href=<?=tep_href_link('checkout_shipping.php')?>><img src=images/m07.gif width=109 height=37 border=0></a><img src=images/m06.jpg width=193 height=37></td></tr>
         <tr><td><a href=<?=tep_href_link('specials.php')?>><img src=images/m12.jpg width=209 height=173 border=0><img src=images/m13.jpg width=255 height=173 border=0><img src=images/m14.jpg width=125 height=173 border=0></a><img src=images/m16.jpg width=177 height=173></td></tr>
        </table>
        <table cellspacing=0 cellpadding=0>
         <tr><td width=4></td>
             <td width=496 height=28 bgcolor=#6DCFF6>
              <table cellspacing=0 cellpadding=0>
               <tr><td height=8 colspan=9></td></tr>
               <tr><td width=62 align=center><a class=ml href=<?=tep_href_link('specials.php')?>>Specials</a></td>
                   <td width=1><font color=#131379>|</font></td>
                   <td width=52 align=center><a class=ml href=<?=tep_href_link('advanced_search.php')?>>Search</a></td>
                   <td width=1><font color=#131379>|</font></td>
                   <td width=70 align=center><a class=ml href=<?=tep_href_link('contact_us.php')?>>Contact Us</a></td>
                   <td width=1><font color=#131379>|</font></td>
                   <td width=103 align=center><a class=ml href=<?=tep_href_link('create_account.php')?>>Create an account</a></td>
                   <td width=1><font color=#131379>|</font></td>
                   <td width=82 align=right><a class=ml href=<?=tep_href_link('login.php')?>>Customer Login</a></td>
                   <td width=123></td></tr>
               <tr><td height=7 colspan=9></td></tr>
              </table>
             </td>
             <td width=262 height=28 bgcolor=#6DCFF6>
              <table cellspacing=0 cellpadding=0 width=203 align=center> 
               <tr><td height=8></td></tr>
               <tr><td><font color=#131379>Shopping Cart: now in your cart</font> &nbsp;<a class=ml1 href=<?=tep_href_link('shopping_cart.php')?>><?=$cart->count_contents()?> items</a></td></tr>
               <tr><td height=8></td></tr>
              </table>
             </td>
             <td width=4></td></tr>
        </table>
        <table cellspacing=0 cellpadding=0>
         <tr><td width=4></td>
             <td width=496 valign=top>


