????
| Current Path : /home2/morganrand/www/store/includes/ |
| Current File : /home2/morganrand/www/store/includes/template_top.php |
<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2012 osCommerce
Released under the GNU General Public License
*/
$oscTemplate->buildBlocks();
if (!$oscTemplate->hasBlocks('boxes_column_left')) {
$oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
}
if (!$oscTemplate->hasBlocks('boxes_column_right')) {
$oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head><script src="//cdn.optimizely.com/js/1865631164.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
<link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.22.css" />
<link href="pop/style.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"> </script>
<script type="text/javascript" src="pop/script.js"></script>
<script type="text/javascript" src="ext/jquery/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.22.min.js"></script>
<!-- Nivo Slider -->
<script type="text/javascript" src="ext/jquery/jquery.nivo.slider.js"></script>
<link rel="stylesheet" type="text/css" href="css/nivo-slider.css" />
<!-- Nivo Slider -->
<script type="text/javascript">
// fix jQuery 1.8.0 and jQuery UI 1.8.22 bug with dialog buttons; http://bugs.jqueryui.com/ticket/8484
if ( $.attrFn ) { $.attrFn.text = true; }
</script>
<?php
if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {
?>
<script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script>
<script type="text/javascript">
$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);
</script>
<?php
}
?>
<script src="lightbox/js/lightbox-2.6.min.js"></script>
<script src="mosaic/jquery.mosaicflow.js"></script>
<script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<link rel="stylesheet" type="text/css" href="css/calendar.css" />
<link rel="stylesheet" href="lightbox/css/lightbox.css" media="screen"/>
<script src="js/modernizr.custom.17475.js"></script>
<?php echo $oscTemplate->getBlocks('header_tags'); ?>
<!-- ONE PAGE START -->
<?php if (preg_match("/checkout.php/", $PHP_SELF)) { ?>
<script type="text/javascript" language="javascript" src="ext/jquery/jquery.ajaxq-0.0.1.js"></script>
<script type="text/javascript" language="javascript" src="ext/jquery/jQuery.pstrength.js"></script>
<script type="text/javascript" language="javascript" src="includes/checkout/checkout.js"></script>
<?php } ?>
<!-- ONE PAGE END -->
<!-- ONE PAGE START -->
<?php if (preg_match("/checkout.php/", $PHP_SELF)) { ?>
<style>
.pstrength-minchar {
font-size : 10px;
}
.fieldRed{ background:#F00;}
.buttonP { margin:0 0 0 -6px; text-indent: -9999px; cursor: pointer; width: 16px; height: 16px; float: right; text-align: center; background: url(ext/jquery/ui/redmond/images/ui-icons_2e83ff_256x240.png) 0 -190px no-repeat; }
.dec { background-position: -16px -190px; float:left; }
.title-header { /*background:#FFC0CB !important;*/ background:none; border-color:#fff; border-bottom:1px solid #C9D3E0; padding-left:5px; font-weight:bold; color:#222 }
.contentContainer .ui-widget-content {border-color:#fff;}
.ui-dialog{border-color:#fff;}
.ui-dialog .ui-widget-content {border-color:#fff;}
.ui-tabs .ui-widget-header{ background:none; border:0;}
.ui-tabs .ui-widget-header .ui-state-default { background:#fff; border:1px solid #C0C7D0;}
.ui-tabs .ui-widget-content { border:1px solid #C0C7D0; border-top-right-radius: 5px; margin-left:-1px;}
.ui-tabs .ui-tabs-nav { padding:0;}
.ui-tabs .ui-tabs-nav li a {
font-size: 13px;
font-weight: normal;
padding: 0.3em 1.1em;
}
.ui-tabs .ui-tabs-nav .ui-state-default{ margin:7px 0 0 -1px;}
.ui-tabs .ui-tabs-nav .ui-state-active{ margin-top:0px;}
.ui-tabs .ui-tabs-nav .ui-state-active a{ padding:0.6em 1.1em;}
#loginBox.ui-dialog-content{ height:auto !important;}
#ship_datepicker .ui-datepicker {
border: 1px solid #FFC0CB !important;
padding-top: 0 0.2em 0.2em 0.2em;
width:300px;
margin-top:10px;
}
#ship_datepicker .ui-datepicker-header { padding:0; margin-top:-3px;}
#ship_datepicker .ui-datepicker-title { line-height:1.5em;}
#ship_datepicker .ui-widget-content { border:0;}
#ship_datepicker .ui-datepicker-calendar .ui-state-default{
font-weight:normal;
font-family:Arial, Helvetica, sans-serif;
color:#555;
border:0;
background:#fff;
}
#ship_datepicker .ui-datepicker-calendar TD A {
font-family:Arial, Helvetica, sans-serif;
background: #66FF33 !important;
font-weight:normal;
color:#555;
}
#ship_datepicker .ui-datepicker-calendar TD A:hover { color:#212121;}
#ship_datepicker .ui-datepicker-calendar .ui-state-active{ color:#212121;}
textarea{ width:50%; border:1px solid #ccc; padding:3px;}
</style>
<script language="javascript"><!--
function CVVPopUpWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=233,screenX=150,screenY=150,top=150,left=150')
}
function CVVPopUpWindowEx(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=510,screenX=150,screenY=150,top=150,left=150')
}
var onePage = checkout;
onePage.initializing = true;
onePage.ajaxCharset = '<?php echo CHARSET;?>';
onePage.storeName = '<?php echo STORE_NAME; ?>';
onePage.loggedIn = <?php echo (tep_session_is_registered('customer_id') ? 'true' : 'false');?>;
onePage.stateEnabled = <?php echo (ACCOUNT_STATE == 'true' ? 'true' : 'false');?>;
onePage.ccgvInstalled = <?php echo (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true' ? 'true' : 'false');?>;
//BOF KGT
onePage.kgtInstalled = <?php echo (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ? 'true' : 'false');?>;
//EOF KGT
//BOF POINTS
onePage.pointsInstalled = <?php echo (((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) ? 'true' : 'false');?>;
//EOF POINTS
onePage.shippingEnabled = <?php echo ($onepage['shippingEnabled'] === true ? 'true' : 'false');?>;
onePage.pageLinks = {
checkout: '<?php echo fixSeoLink(tep_href_link(FILENAME_CHECKOUT, session_name() . '=' . session_id() . '&rType=ajax', $request_type));?>',
shoppingCart: '<?php echo fixSeoLink(tep_href_link(FILENAME_SHOPPING_CART));?>'
}
function getFieldErrorCheck($element){
var rObj = {};
switch($element.attr('name')){
case 'billing_firstname':
case 'shipping_firstname':
rObj.minLength = <?php echo addslashes(ENTRY_FIRST_NAME_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_FIRST_NAME_ERROR);?>';
break;
case 'billing_lastname':
case 'shipping_lastname':
rObj.minLength = <?php echo addslashes(ENTRY_LAST_NAME_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_LAST_NAME_ERROR);?>';
break;
case 'billing_email_address':
rObj.minLength = <?php echo addslashes(ENTRY_EMAIL_ADDRESS_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_EMAIL_ADDRESS_ERROR);?>';
break;
case 'billing_street_address':
case 'shipping_street_address':
rObj.minLength = <?php echo addslashes(ENTRY_STREET_ADDRESS_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_STREET_ADDRESS_ERROR);?>';
break;
case 'billing_zipcode':
case 'shipping_zipcode':
rObj.minLength = <?php echo addslashes(ENTRY_POSTCODE_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_POST_CODE_ERROR);?>';
break;
case 'billing_city':
case 'shipping_city':
rObj.minLength = <?php echo addslashes(ENTRY_CITY_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_CITY_ERROR);?>';
break;
case 'billing_dob':
rObj.minLength = <?php echo addslashes(ENTRY_DOB_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_DATE_OF_BIRTH_ERROR);?>';
break;
case 'billing_telephone':
rObj.minLength = <?php echo addslashes(ENTRY_TELEPHONE_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_TELEPHONE_NUMBER_ERROR);?>';
break;
case 'billing_country':
case 'shipping_country':
rObj.minLength = 1;
rObj.errMsg = '<?php echo addslashes(ENTRY_COUNTRY_ERROR);?>';
break;
case 'billing_state':
case 'delivery_state':
rObj.minLength = <?php echo addslashes(ENTRY_STATE_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_STATE_ERROR);?>';
break;
case 'password':
case 'confirmation':
rObj.minLength = <?php echo addslashes(ENTRY_PASSWORD_MIN_LENGTH);?>;
rObj.errMsg = '<?php echo addslashes(ENTRY_PASSWORD_ERROR);?>';
break;
}
return rObj;
}
$(document).ready(function ()
{
$('#pageContentContainer').show();
$('#ajaxMessages').dialog(
{
shadow: true,
modal: false,
width: 400,
height: 130,
open: function (event, ui)
{
$(this).parent().children().children('.ui-dialog-title').hide();
$(this).parent().children().children('.ui-dialog-titlebar').hide();
$(this).parent().children().children('.ui-dialog-titlebar-close').hide();
}
});
$('#confirmationBox').dialog(
{
autoOpen: false,
resizable: false,
shadow: false,
height:300,
modal:true,
width:430,
open: function (){}
});
$('#loginButton').click(function ()
{
$('#loginBox').dialog('open');
return false;
});
$('#singUp').click(function ()
{
var fname = $('input[name="entry_firstname"]').val();
var lname = $('input[name="entry_lastname"]').val();
var email = $('input[name="entry_email_address"]').val();
var pass = $('input[name="entry_password"]').val();
var cpass = $('input[name="entry_password_confirm"]').val();
var news = $('input[name="entry_newsletter"]:checked').length;
if(pass){
if(pass!=cpass){
alert("Password does not match!");
return false;
}
}
$('input[name="billing_firstname"]').val(fname);
$('input[name="billing_lastname"]').val(lname);
$('input[name="billing_email_address"]').val(email);
$('input[name="password"]').val(pass);
$('input[name="confirmation"]').val(cpass);
$('input[name="billing_newsletter"]').val(news);
$('#loginBox').dialog('close');
if(email){
onePage.queueAjaxRequest({
url: onePage.pageLinks.checkout,
data: 'action=checkEmailAddress&emailAddress=' + email,
type: 'post',
beforeSendMsg: 'Checking Email Address',
dataType: 'json',
success: function (data){
if (data.success == 'false'){
alert(data.errMsg.replace('/n', "\n").replace('/n', "\n").replace('/n', "\n"));
//$('input[name="billing_email_address"]').focus();
}
},
errorMsg: 'There was an error checking email address, please inform ' + checkout.storeName + ' about this error.'
});
}
});
$('#loginBox').dialog(
{
autoOpen:<?php echo (tep_session_is_registered('customer_id') ? 'false' : 'false');?>,
resizable: false,
shadow: false,
modal:true,
height:285,
width:400,
position: ['center',100],
open: function ()
{
var $dialog = this;
$('input', $dialog).keypress(function (e)
{
if (e.which == 13)
{
$('#loginWindowSubmit', $dialog).click();
}
});
$('#tabsLogin', $dialog).tabs({
create: function(e, ui) {
$('#closeBtn').click(function() {
$('#loginBox').dialog('close');
});
}
});
$($dialog).parent().children('.ui-dialog-titlebar').remove();
//$(".ui-widget-overlay").live("click", function() { $("#loginBox").dialog("close"); });
$('#loginRegister', $dialog).click(function ()
{
$('#loginBox').dialog('close');
});
$('#loginWindowSubmit', $dialog).hover(function ()
{
this.style.cursor = 'pointer';
}, function ()
{
this.style.cursor = 'default';
}).click(function ()
{
var $this = $(this);
$this.hide();
var email = $('input[name="email_address"]', $dialog).val();
var pass = $('input[name="password"]', $dialog).val();
onePage.queueAjaxRequest({
url: onePage.pageLinks.checkout,
data: 'action=processLogin&email=' + email + '&pass=' + pass,
type: 'post',
beforeSend: function (){
onePage.showAjaxMessage('Refreshing Shopping Cart');
if ($('#loginStatus', $this.parent()).size() <= 0){
$('<div>')
.attr('id', 'loginStatus')
.html('Processing Login')
.attr('align', 'center')
.insertAfter($this);
}
},
success: function (data)
{
var txt = jQuery.parseJSON(data);
if (txt.success === "true")
{
onePage.loggedIn = true;
window.location.reload();
}
else
{
$('#logInRow').show();
$('#loggedInRow').hide();
$('#loginStatus', $dialog).html(txt.msg);
setTimeout(function ()
{
$('#loginStatus').remove();
$('#loginWindowSubmit').show();
}, 6000);
setTimeout(function ()
{
$('#loginStatus').html('Try again in 3');
}, 3000);
setTimeout(function ()
{
$('#loginStatus').html('Try again in 2');
}, 4000);
setTimeout(function ()
{
$('#loginStatus').html('Try again in 1');
}, 5000);
}
},
errorMsg: 'There was an error logging in, please inform <?php echo STORE_NAME; ?> about this error.'
});
});
}
});
$('#changeBillingAddress, #changeShippingAddress').click(function ()
{
var addressType = 'billing';
if ($(this).attr('id') == 'changeShippingAddress')
{
addressType = 'shipping';
}
$('#addressBook').clone().show().appendTo(document.body).dialog(
{
shadow: false,
width: 550,
minWidth: 550,
open: function ()
{
onePage.loadAddressBook($(this), addressType);
},
buttons:
{
'<?php echo addslashes(WINDOW_BUTTON_CANCEL);?>': function ()
{
var $this = $(this);
var action = $('input[name="action"]', $this).val();
if (action == 'selectAddress')
{
$this.dialog('close');
}
else if (action == 'addNewAddress' || action == 'saveAddress')
{
onePage.loadAddressBook($this, addressType);
}
},
'<?php echo addslashes(WINDOW_BUTTON_CONTINUE);?>': function ()
{
var $this = $(this);
var action = $('input[name="action"]', $this).val();
if (action == 'selectAddress')
{
onePage.queueAjaxRequest(
{
url: onePage.pageLinks.checkout,
beforeSendMsg: 'Setting Address',
dataType: 'json',
data: $(':input, :radio', this).serialize(),
type: 'post',
success: function (data)
{
$this.dialog('close');
if (addressType == 'shipping')
{
onePage.updateAddressHTML('shipping');
onePage.updateShippingMethods();
}
else
{
onePage.updateAddressHTML('billing');
onePage.updatePaymentMethods();
}
},
errorMsg: 'There was an error changing your address, please inform <?php echo STORE_NAME; ?> about this error.'
});
}
else if (action == 'addNewAddress')
{
onePage.queueAjaxRequest(
{
url: onePage.pageLinks.checkout,
beforeSendMsg: 'Saving New Address',
dataType: 'json',
data: $(":input", this).serialize(),
type: 'post',
success: function (data)
{
onePage.loadAddressBook($this, addressType);
},
errorMsg: 'There was an error adding your new address, please inform <?php echo STORE_NAME; ?> about this error.'
});
}
else if (action == 'saveAddress')
{
var errors = false;
$('input[name="firstname"],input[name="lastname"],input[name="street_address"],input[name="city"],*[name="state"],input[name="postcode"],select[name="country"]', this).each( function()
{
if($(this).val() == '')
errors = true;
});
if(errors == false)
{
onePage.queueAjaxRequest(
{
url: onePage.pageLinks.checkout,
beforeSendMsg: 'Updating Address',
dataType: 'json',
data: $(":input", this).serialize(),
type: 'post',
success: function (data){
onePage.loadAddressBook($this, addressType);
},
errorMsg: 'There was an error saving your address, please inform <?php echo STORE_NAME; ?> about this error.'
});
}
else
{
alert('Please fill all the required fields to save this address');
}
}
},
'<?php echo addslashes(WINDOW_BUTTON_EDIT_ADDRESS);?>': function ()
{
var $this = $(this);
onePage.queueAjaxRequest(
{
url: onePage.pageLinks.checkout,
data: 'action=getEditAddressForm&addressID=' + $(':radio[name="address"]:checked', $this).val(),
type: 'post',
beforeSendMsg: 'Loading Edit Address Form',
success: function (data)
{
$this.html(data);
if(onePage.stateEnabled == true)
{
onePage.addCountryAjax($('select[name="country"]', $this), 'state', 'stateCol')
}
},
errorMsg: 'There was an error loading edit address form, please inform <?php echo STORE_NAME; ?> about this error.'
});
}
}
});
return false;
});
onePage.initCheckout();
});
<?php
// Start - CREDIT CLASS Gift Voucher Contribution
if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true'){
if (MODULE_ORDER_TOTAL_INSTALLED)
$temp=$order_total_modules->process();
$temp=$temp[count($temp)-1];
$temp=$temp['value'];
$gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
$gv_result = tep_db_fetch_array($gv_query);
if ($gv_result['amount']>=$temp){ $coversAll=true;
/*
?>
function clearRadeos(){
document.checkout.cot_gv.checked=!document.checkout.cot_gv.checked;
for (counter = 0; counter < document.checkout.payment.length; counter++) {
// If a radio button has been selected it will return true
// (If not it will return false)
if (document.checkout.cot_gv.checked){
document.checkout.payment[counter].checked = false;
document.checkout.payment[counter].disabled=true;
} else {
document.checkout.payment[counter].disabled=false;
}
}
}
<?php
} else {
$coversAll=false;?>
function clearRadeos(){
document.checkout.cot_gv.checked=!document.checkout.cot_gv.checked;
}
<?php
*/
}
}?>
function clearRadeos(){
return true;
}
//-->
</script>
<?php } ?>
<!-- ONE PAGE END -->
<?php // ajax_attribute_pricechange
if (basename($PHP_SELF) == FILENAME_PRODUCT_INFO) { ?> <script type="text/javascript" src="js/change_price.js"></script>
<?php } // End ajax_attribute_pricechange ?>
<!-- Start slider HEAD section -->
<link rel="stylesheet" href="css/bjqs.css">
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro|Open+Sans:300' rel='stylesheet' type='text/css'>
<script src="js/bjqs-1.3.min.js"></script>
<!-- End slider HEAD section -->
<script>
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<body>
<?php
//include_once(DIR_WS_INCLUDES . 'analyticstracking.php');
?>
<div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?>">
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- Nivo Slider -->
<?php
if (($oscTemplate->hasBlocks('boxes_under_header'))) {
require(DIR_WS_INCLUDES . 'style.css.php');
?>
<div class="nivoSlider">
<div class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?>">
<div class="grid_24<?php echo $oscTemplate->getGridContainerWidth(); ?>" style="padding-left: 5px;">
<?php echo $oscTemplate->getBlocks('boxes_under_header'); ?>
</div>
</div>
</div>
<?php
}
?>
<!-- Nivo Slider -->
<div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">