<?php
//
// $Id: tpl_header.php 1170 2005-04-12 01:38:32Z ajeh $
// Purpleshades Table based layout - hard coded images - for Zencart V1.3.1
// Coded by JollyJim

  // this file can be copied to /templates/your_template_dir/pagename
  // example: to override the privacy page
  // make a directory /templates/my_template/privacy
  // copy /templates/templates_defaults/common/tpl_header.php to /templates/my_template/privacy/tpl_header.php
  // to override the global settings and turn off the header un-comment the following line:

  // $flag_disable_header = true;

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

<!-- Show the banners table -->
<table class="centershop" border="0" cellspacing="0" cellpadding="0">
<?php
if (!isset($flag_disable_header) || $flag_disable_header == false) {
?>

<?php
  if ($banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {
    if ($banner->RecordCount() > 0) {
?>
<tr>
<td align="center"><div class="banners"><?php echo zen_display_banner('static', $banner); ?></div></td>
</tr>
<?php
    }
  }
?>
<tr><td>
</table>
<!-- End Show the banners table -->
<!-- Start the header CSS table, logo and background includes/templates/purpleshades/images -->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="header" background="includes/templates/purpleshades/images/hdr_bg.gif">
<tr> 
<td width="39%" rowspan="2"> <table align="left" border="0" cellpadding="0" cellspacing="0" width="398">
<tr> 
<td width="22"><table align="left" border="0" cellpadding="0" cellspacing="0" width="22">
<tr> 
<td><img name="hdr_topleft_bg" src="includes/templates/purpleshades/images/pixel_trans.gif" width="1" height="38" border="0" alt=""></td>
</tr>
<tr> 
<td><img name="hdr_midleft_bg" src="includes/templates/purpleshades/images/hdr_midleft_bg.gif" width="22" height="62" border="0" alt=""></td>
</tr>
<tr> 
<td><img name="hdr_mid_divline" src="includes/templates/purpleshades/images/hdr_mid_divline.gif" width="22" height="6" border="0" alt=""></td>
</tr>
<tr> 
<td><img name="hdr_bot_left_bg" src="includes/templates/purpleshades/images/pixel_trans.gif" width="1" height="48" border="0" alt=""></td>
</tr>
</table></td>
<td width="125" valign="top"><a href="./"><img src="includes/templates/purpleshades/images/sitelogo.gif" alt="Home Page" border="0"></a></td>
<td width="251"> <table align="left" border="0" cellpadding="0" cellspacing="0" width="251">
<tr> 
<td><img name="hdr_strapline_bg" src="includes/templates/purpleshades/images/pixel_trans.gif" width="1" height="38" border="0" alt=""></td>
</tr>
<tr> 
<td><img name="hdr_mid_pics" src="includes/templates/purpleshades/images/hdr_mid_pics.gif" width="251" height="62" border="0" alt=""></td>
</tr>
<tr> 
<td><img name="hdr_mid_divline_2" src="includes/templates/purpleshades/images/pixel_trans.gif" width="1" height="6" border="0" alt=""></td>
</tr>
<tr> 
<td><img name="hdr_bot_bgr" src="includes/templates/purpleshades/images/pixel_trans.gif" width="1" height="48" border="0" alt=""></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="61%" height="140" align="center"> 
<?php
              if (HEADER_SALES_TEXT != '') {
                echo HEADER_SALES_TEXT;
              }
              if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                if ($banner->RecordCount() > 0) {
                  echo zen_display_banner('static', $banner);
                }
              }
?>
</td>
</tr>
<tr>
<td align="right"> 
<?php require(DIR_WS_MODULES . 'sideboxes/' . 'search_header.php'); ?>
</td>
</tr>
</table>
<!-- End the header CSS TABLE -->
<!-- Start the headerNavigationCSS Table -->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="headerNavigation" align="center">
<tr class="headerNavigation"> 
<td width="124" height="58"align="left" valign="top" class="headerNavigation" >&nbsp; 
<script language="JavaScript">

var months=new Array(13);

months[1]="January";

months[2]="February";

months[3]="March";

months[4]="April";

months[5]="May";

months[6]="June";

months[7]="July";

months[8]="August";

months[9]="September";

months[10]="October";

months[11]="November";

months[12]="December";

var time=new Date();

var lmonth=months[time.getMonth() + 1];

var date=time.getDate();

var year=time.getYear();

if (year < 2000)

year = year + 1900;

document.write(lmonth + " ");

document.write(date + ", " + year);

</script> </td>
<td align="left" valign="top" class="headerNavigation">&nbsp;| <a href="<?php echo zen_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>&nbsp;|&nbsp; 
<?php if (isset($_SESSION['customer_id'])) { ?>
<a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a>&nbsp;|&nbsp; 
<a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> 
<?php
      } else {
        if (STORE_STATUS == '0') {
?>
<a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a>&nbsp;|&nbsp; 
<a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CREATE_ACCOUNT; ?></a> 
<?php } } ?> </td>
<td class="headerNavigation" align="right" valign="top" width="291"> 
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>&nbsp;|&nbsp;<a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?>&raquo;</a> 
<?php }?>
</td>
</tr>
</table>
<!-- End the headerNavigationCSS Table -->

<?php
  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(urldecode($_GET['error_message'])); ?></td>
</tr>
</table>
<?php
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars($_GET['info_message']); ?></td>
</tr>
</table>
<?php
  }
?>
<?php
} else {
?>
<tr><td>
<?php
}
?>

<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->
