<?php

/*+++++++++++++++++++++++++++++++++++++++++++++

  Script: Maian Gallery v2.0
  Written by: David Ian Bennett
  E-Mail: support@maianscriptworld.co.uk
  Website: http://www.maianscriptworld.co.uk

  +++++++++++++++++++++++++++++++++++++++++++++
  
  This File: header.php
  Description: Public Header

  +++++++++++++++++++++++++++++++++++++++++++++*/

if (!defined('PARENT')) {
  exit;
}

$tpl_header = new Savant2();
$tpl_header->assign('TITLE', $title);
$tpl_header->assign('GALLERY_NAME', $msg_header12);
$tpl_header->assign('META_DESC', $meta_desc);
$tpl_header->assign('META_KEYS', $meta_keys);
$tpl_header->assign('BASE_HREF', $SETTINGS->folder);
$tpl_header->assign('CART',$msg_header13);
$tpl_header->assign('IS_CART_ENABLED',($SETTINGS->cart && !isset($banned) ? true : false));
$tpl_header->assign('CHARSET', $msg_charset);
$tpl_header->assign('FEED_URL',($SETTINGS->modr ? $SETTINGS->folder.'/rss-feed.html' : $SETTINGS->folder.'/index.php?cmd=rss-feed'));
$tpl_header->assign('THEME', $theme);
$tpl_header->assign('HOME', $msg_header2);
$tpl_header->assign('CONTACT', $msg_header3);
$tpl_header->assign('ABOUT', $msg_header4);
$tpl_header->assign('SEARCH', $msg_header5);
$tpl_header->assign('CATEGORIES_TXT', $msg_header14);
$tpl_header->assign('CART_TXT', $msg_header13);
$tpl_header->assign('VIEW_CART_TXT', $msg_header15);
$tpl_header->assign('ADV_SEARCH', $msg_header9);
$tpl_header->assign('KEY_VALUE',(isset($_GET['keywords']) ? cleanEvilTags($_GET['keywords']) : ''));
$tpl_header->assign('LICENCE', $msg_header8);
$tpl_header->assign('H_URL', ($SETTINGS->modr ? 'index.html' : 'index.php'));
$tpl_header->assign('C_URL', ($SETTINGS->modr ? 'contact.html' : 'index.php?cmd=contact'));
$tpl_header->assign('A_URL', ($SETTINGS->modr ? 'about.html' : 'index.php?cmd=about'));
$tpl_header->assign('L_URL', ($SETTINGS->modr ? 'licence.html' : 'index.php?cmd=licence'));
$tpl_header->assign('AS_URL', ($SETTINGS->modr ? 'advanced-search.html' : 'index.php?cmd=advanced-search'));
$tpl_header->assign('H_CURRENT', ($cmd=='home' ? ' class="current_page_item"' : ''));
$tpl_header->assign('C_CURRENT', ($cmd=='contact' ? ' class="current_page_item"' : ''));
$tpl_header->assign('A_CURRENT', ($cmd=='about' ? ' class="current_page_item"' : ''));
$tpl_header->assign('L_CURRENT', ($cmd=='licence' ? ' class="current_page_item"' : ''));
$tpl_header->assign('S_CURRENT', ($cmd=='search' || $cmd=='advanced-search' ? ' class="current_page_item"' : ''));
$tpl_header->assign('CART_DATA', ($SETTINGS->cart && !isset($banned) ? ($MGA_CART->cartCount()>0 ? '<a href="'.($SETTINGS->modr ? 'view-cart.html' : 'index.php?cmd=view-cart').'" title="'.$msg_header10.'"><span class="bold">'.$MGA_CART->cartCount().'</span></a> ' : '<span class="bold">'.$MGA_CART->cartCount().'</span>').' '.($MGA_CART->cartCount()==1 ? $msg_header6 : $msg_header7).'<span class="bold_price">'.get_cur_symbol($MGA_CART->cartTotal(),$PP->ppCurrency).($MGA_CART->cartCount()>0 ? ' - <a href="'.($SETTINGS->modr ? 'view-cart.html' : 'index.php?cmd=view-cart').'" title="'.$msg_header10.'">'.$msg_header11.'</a>' : '').'</span>' : date($SETTINGS->date_format)));
$tpl_header->assign('CART_LINKS', ($SETTINGS->cart && !isset($banned) ? ($MGA_CART->cartCount()>0 ? '<a href="'.($SETTINGS->modr ? 'view-cart.html' : 'index.php?cmd=view-cart').'" title="'.$msg_header10.'"><span class="bold">'.$MGA_CART->cartCount().'</span></a> ' : '<span class="bold">'.$MGA_CART->cartCount().'</span>').' '.($MGA_CART->cartCount()==1 ? $msg_header6 : $msg_header7).'<span class="bold_price">'.get_cur_symbol($MGA_CART->cartTotal(),$PP->ppCurrency).($MGA_CART->cartCount()>0 ? ' - <a href="'.($SETTINGS->modr ? 'view-cart.html' : 'index.php?cmd=view-cart').'" title="'.$msg_header10.'">'.$msg_header11.'</a>' : '').'</span>' : ''));
$tpl_header->assign('ITEMS_IN_CART',$MGA_CART->cartCount().' '.($MGA_CART->cartCount()==1 ? $msg_header6 : $msg_header7));
$tpl_header->assign('ITEMS_IN_CART_COUNT',$MGA_CART->cartCount());
$tpl_header->assign('CART_TOTAL',get_cur_symbol($MGA_CART->cartTotal(),$PP->ppCurrency));
$tpl_header->assign('CART_URL', ($SETTINGS->modr ? 'view-cart.html' : 'index.php?cmd=view-cart'));
$tpl_header->assign('AUTO_FORM', (isset($runForm) ? ' onload="document.form.submit();"' : ''));
$tpl_header->assign('THEME_SWITCHER',themeSwitcher($theme));
$tpl_header->assign('CATEGORIES_ORDERED_LIST',buildCategoriesOrderedList());
$tpl_header->assign('CATEGORIES_SELECT_LIST',buildCategoriesSelectList());
$tpl_header->display('themes/'.$theme.'/header.tpl.php');

?>
