????
| Current Path : /home2/morganrand/www/store/includes/ |
| Current File : /home2/morganrand/www/store/includes/template_top_nobox.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_pinfo.css" />-->
<link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/nobox_jquery-ui-1.8.22.css" />
<link href="pop/style.css" rel="stylesheet" type="text/css" media="all" />
<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>
<script type="text/javascript" src="pop/script.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 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/elastislide.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'); ?>
<?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 ?>
<style>
.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;
}
.topopup{cursor: pointer;}
.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;}
</style>
<!-- Start WOWSlider.com HEAD section -->
<link rel="stylesheet" type="text/css" href="slideshow/home/engine1/style.css" />
<!-- End WOWSlider.com HEAD section -->
<?php
$values = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . "");
$values_pr = tep_db_fetch_array($values);
$array = array();
while( $values_pr = tep_db_fetch_array($values)){
array_push($array,$values_pr);
}
$a = $array[1]['products_options_values_price'].'<br>';
$b = $array[2]['products_options_values_price'].'<br>';
$c = $array[3]['products_options_values_price'].'<br>';
$d = $array[4]['products_options_values_price'].'<br>';
$e = $array[5]['products_options_values_price'].'<br>';
$f = $array[6]['products_options_values_price'].'<br>';
?>
<script>
$(document).ready(function (){
$('#custom_input').insertAfter($('#radio2'));
$('#about_imprint').insertAfter($('#custom_input'));
if($('#radio21').is(':checked')){
$('#custom_input,#about_imprint').css('display','block');
}
$('input[type="radio"]').click(function(){
if($('#radio21').is(':checked')){
$('#custom_input,#about_imprint').css('display','block');
}else{
$('#custom_input,#about_imprint').css('display','none');
}
});
$('#wishList').click(function (){
var w_imp = $('input[id="radio21"]:checked').length;
var w_qty = $('input[name="buyqty"]').val();
var w_txt = $('input[id="custom_input"]').val();
var w_txtalt = '';
if (w_imp == 1) {
if(w_txt=='')
w_txtalt = w_txtalt + "Imprints may contain up to 8 capital letters and up to\n6 special characters which are ! - & . , \’\nEach special character will be counted as one letter or space.\n";
else if (/[^a-zA-Z0-9&, '!.-]/.test(w_txt)) {
w_txtalt = w_txtalt + "text can only contain ! - & . , \’ special characters\n";
}
if(w_qty < 4)
w_txtalt = w_txtalt + "The minimum order for imprint is 4 centerpieces.";
if(w_txtalt){
alert(w_txtalt);
return false;
}
}
<?php if(!tep_session_is_registered('customer_id')){?>
$('#loginBox').dialog('open');
return false;
<?php } ?>
});
$('#loginBox').dialog({
autoOpen: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"); });
$('#singUp',$dialog).click(function (){
var fname = $('input[name="entry_firstname"]', $dialog).val();
var lname = $('input[name="entry_lastname"]', $dialog).val();
var email = $('input[name="entry_email_address"]', $dialog).val();
var pass = $('input[name="entry_password"]', $dialog).val();
var cpass = $('input[name="entry_password_confirm"]', $dialog).val();
var news = $('input[name="entry_newsletter"]:checked', $dialog).length;
var prod_id = $('input[name="products_id"]').val();
var w_qtyy = $('input[name="buyqty"]').val();
var attr_id = {};
$("input[type='radio'][name^='id']:checked").each(function (){
var attrid = $(this).attr("name").match(/\[(.*)\]/);
attr_id[attrid[1]] = $(this).attr('value');
});
var textattid = $("input[type='text'][name^='id']").attr("name").match(/\[(.*)\]/);
var textattr = $("input[type='text'][name^='id']").val();
if(textattr){
attr_id[textattid[1]] = textattr;
}
if(pass){
if(pass!=cpass){
alert("Password does not match!");
return false;
}
}
$.ajax({
url: 'ajax_get_val.php',
type: 'POST',
data:{
"entry_firstname":fname,
"entry_lastname":lname,
"entry_email_address":email,
"entry_password":pass,
"entry_password_confirm":cpass,
"action":'creat_account',
"id":attr_id,
"products_id":prod_id,
"qty":w_qtyy
},
success: function (data){
var txt = jQuery.parseJSON(data);
if (txt.success == 'true'){
$('#loginBox').dialog('close');
window.location='<?php echo tep_href_link(FILENAME_WISHLIST);?>';
}else{
alert(txt.msg);
return false;
}
}
});
});
$('#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();
var prod_id = $('input[name="products_id"]').val();
var qty = $('input[name="buyqty"]').val();
var attr_id = {};
$("input[type='radio'][name^='id']:checked").each(function (){
var attrid = $(this).attr("name").match(/\[(.*)\]/);
attr_id[attrid[1]] = $(this).attr('value');
});
var textattid = $("input[type='text'][name^='id']").attr("name").match(/\[(.*)\]/);
var textattr = $("input[type='text'][name^='id']").val();
if(textattr){
attr_id[textattid[1]] = textattr;
}
//alert(JSON.stringify(attr_id));
$.ajax({
url: 'ajax_get_val.php',
type: 'POST',
data:{
"email_address":email,
"password":pass,
"products_id":prod_id,
"action":'login',
"id":attr_id,
"qty":qty
},
error: function(){
alert('An errror occured');
},
beforeSend: function (){
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")
{
$('#loginBox').dialog('close');
window.location='<?php echo tep_href_link(FILENAME_WISHLIST);?>';
}
else
{
$('#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);
}
}
});
});
}
});
var filled = $('input[name = "id[2]"]:checked').val();
var imprint = $('input[name = "id[1]"]:checked').val();
var favor = $('input[name = "id[3]"]:checked').val();
var filled_3 = '<?php echo $a ?>';
var filled_4 = '<?php echo $b ?>';
var favor_5 = '6'; var favor_5_price = '<?php echo $c ?>';
var favor_6 = '8';var favor_6_price = '<?php echo $d ?>';
var favor_7 = '9';var favor_7_price = '<?php echo $e ?>';
var favor_8 = '10';var favor_8_price = '<?php echo $f ?>';
var cp_price = (parseFloat(eval('filled_'+filled))*parseFloat(eval('favor_'+favor)))+parseFloat(6);
if(imprint == '2'){
cp_price = parseFloat(cp_price) + parseFloat(eval('favor_'+favor+'_price'));
}
$('input[name="id[1]"], input[name="id[2]"], input[name="id[3]"]').click(function (){
var filled = $('input[name = "id[2]"]:checked').val();
var imprint = $('input[name = "id[1]"]:checked').val();
var favor = $('input[name = "id[3]"]:checked').val();
var cp_price = (parseFloat(eval('filled_'+filled))*parseFloat(eval('favor_'+favor)))+parseFloat(6);
if(imprint == '2'){
cp_price = parseFloat(cp_price) + parseFloat(eval('favor_'+favor+'_price'));
}
var rValue = parseFloat(cp_price);
$("#display_price_modi").text('$'+rValue.toFixed(2).replace(".00",""));
});
var rValue = parseFloat(cp_price);
$("#display_price_modi").text('$'+rValue.toFixed(2).replace(".00",""));
});
</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'); ?>
<div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php //echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">