-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path_header.inc.php
executable file
·211 lines (193 loc) · 10.3 KB
/
_header.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<?php
if (session_status() !== PHP_SESSION_ACTIVE){
@session_start();
}
//echo $_SERVER['DOCUMENT_ROOT'] . "/Delivery/login/globals.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/Delivery/login/globals.php";
include ROOTDIR . DIR . "/includes/_url.php"; /* URL ENCODE DECODE */
include ROOTDIR . DIR . "/includes/config/config.php";
require ROOTDIR . DIR . "/includes/Sql/sql.class.php";
include ROOTDIR . DIR . "/includes/data.php";
include CLASSES . "/User.php";
include(dirname(__FILE__) . SYSPATH_LANG);
$array_categories = GenericSql::getCategories($database);
$total_categ = GenericSql::getTotalNumberOfCategories($database);
$array_company = GenericSql::getEmpresa($database);
$linkfollow_heredoc = HTTP . SERVER_NAME . DIRROOT;
// Delivery Charge is in session and has public access
$_SESSION['valor_entrega'] = $array_company['0']['valor_entrega'];
$_SESSION['company_id'] = $array_company['0']['id'];
$session_customer_show = '';
if (isset($_SESSION['IDCUSTOMER']) and !empty($_SESSION['IDCUSTOMER']))
{
$array_customer = GenericSql::getCustomerById($database, $_SESSION['IDCUSTOMER']);
// link to inform zipcode
$link = '<a class="link_1" href="javascript:void(0);" onclick="tb_show(\'Inform your ZIPCODE\', \'' . $linkfollow_heredoc . '/change-zipcode.php?item_id=&item_pos=&KeepThis=true&TB_iframe=true&height=100&width=270\', false);"> </a>';
if (SYSPATH_LANG == "/includes/lang/pt-br.php")
{
$session_customer_show .= <<<XYZ
<div class="headerChatLoged">
<div class="headerChatHelp"><a href="JavaScript:void(0)" onclick="var url=\''. {$linkfollow_heredoc} .'/Suporte/> </a></div>
<div class="headerLoged"><a href="' . {$linkfollow_heredoc} . "/customer-data" .'" class="headerSigup"> </a></div>
<div class="headerZipcodeLoged">
{$link}
</div>
<div class="headerLogout"><a href="'. {$linkfollow_heredoc} .'/log-out"> </a></div>
</div>
XYZ;
}
else
{
$session_customer_show .= <<<XYZ
<div class="headerChatLogedEN">
<div class="headerChatHelp"><a target="_blank" href="{$linkfollow_heredoc}/Suporte/"> </a></div>
<div class="headerLoged"><a href="{$linkfollow_heredoc}/customer-data" class="headerSigup"> </a></div>
<div class="headerZipcodeLoged">
{$link}
</div>
<div class="headerLogout"><a href="{$linkfollow_heredoc}/log-out"> </a></div>
</div>
XYZ;
}
}
else
{
if (SYSPATH_LANG == "/includes/lang/pt-br.php")
{
$session_customer_show .= <<<XYZ
<div class="headerChat">
<div class="headerChatHelp"><a href="{$linkfollow_heredoc}/Suporte/"> </a></div>
<div class="headerSigup"><a href="{$linkfollow_heredoc}/log-in" class="headerSigup"> </a></div>
<div class="headerZipcode"><a href="javascript:void(0);" onclick="tb_show(\'Informar CEP\', \'{$linkfollow_heredoc}/change-zipcode.php?item_id=&item_pos=&KeepThis=true&TB_iframe=true&height=100&width=250\', false);"> </a> </div>
</div>
XYZ;
}
else
{
$session_customer_show = '';
$session_customer_show .= <<<XYZ
<div class="headerChatEN">
<div class="headerChatHelp"><a href="{$linkfollow_heredoc}/Suporte/"> </a></div>
<div class="headerSigup"><a href="{$linkfollow_heredoc}/log-in" class="headerSigup"> </a></div>
<div class="headerZipcode"><a href="javascript:void(0);" onclick="tb_show(\'Informar CEP\', \'{$linkfollow_heredoc}//change-zipcode.php?item_id=&item_pos=&KeepThis=true&TB_iframe=true&height=100&width=250\', false);"> </a> </div>
</div>
XYZ;
}
}
?>
<script language="JavaScript">
function abrir(w,h,URL)
{
var width = w;
var height = h;
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
window.open(URL,'janela', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}
</script>
<!-- top header : logotipo; tel; infos; right menu -->
<div>
<table width="997" border="0" cellpadding="0" cellspacing="0" align="center" id="table990" class="table bg">
<tr>
<td width="410" valign="top"> <!-- https://placehold.it/350x120 -->
<a href="<?php echo $linkfollow_heredoc; ?>/index" class="top_header_hide"><img src="<?php echo $linkfollow_heredoc; ?>/images/logo/<?php echo $array_company['0']['logotipo'];?>" height="120" border="0"></a>
</td>
<td valign="top">
<div align="right">
<table>
<tr>
<td>
<?php echo $session_customer_show;?>
</td>
<td> </td>
<td>
<!-- validate ZIPCODE -->
<!-- <div id="cart"></div> -->
<script type="text/javascript">
function cart_update() {
$.post("<?php echo $linkfollow_heredoc; ?>/cart-zipcode.php", {}, function(data) {
$("#cart").html(data);
});
}
function cart_delete(id, item_pos) {
if (typeof(item_pos) == 'undefined') item_post = 0;
$.post("<?php echo $linkfollow_heredoc; ?>/cart-zipcode.php", {'delete_id': id, 'item_pos': item_pos}, function(data) {
$("#cart").html(data);
});
}
function cart_add(id, qty, option_id) {
if (typeof(option_id) == 'undefined') option_id = 0;
$.post("<?php echo $linkfollow_heredoc; ?>/cart-zipcode.php", {'item_id': id, 'qty': qty, 'option_id': option_id}, function(data) {
$("#cart").html(data);
});
}
$(function() { cart_update();});
</script>
<!-- validate ZIPCODE -->
</td>
</tr>
</table>
</div>
<table border="0" cellspacing="0" cellpadding="0">
<tr class="top_header_hide">
<td valign="top" height="77" align="right" style="font-size:24px; line-height:28px; font-weight:bold; color:#FFFFFF;">
<div class="top_header_open_time">
<div style="font-size:32px; font-weight:normal; color:#333; text-shadow: 2px 2px 5px #999; 3px 3px 5px red;"><img src="<?php echo $linkfollow_heredoc; ?>/images/Cell-Phone.png" /> <?=LBL_CALL_NOW;?> <?php echo $array_company['0']['tel1'];?> </div> <br />
<div style="font-size:32px; font-weight:normal; color:#333; text-shadow: 2px 2px 5px #999; 3px 3px 5px red;"> <?=LBL_OPEN_DAILY_FROM;?>
<?php echo strftime("%H:%M", strtotime($array_company['0']['abre']));?> <?=LBL_OPEN_DAILY_TO;?>
<?php echo strftime("%H:%M", strtotime($array_company['0']['fecha']));?>
</div>
</div>
</td>
</tr>
<tr> <!-- style="border-radius:5px; -moz-border-radius:5px; -webkit-border-radius: 5px; border:solid black 0px; background:#000;" -->
<td>
<link rel="stylesheet" type="text/css" href="<?php echo $linkfollow_heredoc; ?>/scripts/superfish/css/superfish.css" media="screen">
<script type="text/javascript" src="<?php echo $linkfollow_heredoc; ?>/scripts/superfish/js/hoverIntent.js"></script>
<script type="text/javascript" src="<?php echo $linkfollow_heredoc; ?>/scripts/superfish/js/superfish.js"></script>
<script type="text/javascript">jQuery(function(){jQuery('ul.sf-menu').superfish();});</script>
<?php if (basename($_SERVER['PHP_SELF']) == "menu.php") $position = 'absolute'; else $position = 'absolute'; ?>
<div style="position:<?php echo $position; ?>; z-index:-1; background:#000000; overflow:hidden; width:100%; height:40px;" id="blackbar_id"> </div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<a class="header" style="width:0px; margin-right:45px;"></a>
</td>
<td><img src="<?php echo $linkfollow_heredoc; ?>/images/left_round_old.jpg"></td>
<td valign="top">
<a class="header" href="<?php echo $linkfollow_heredoc; ?>/index"><?=MENU_HOME;?></a>
</td>
<td valign="top">
<a class="header" href="<?php echo $linkfollow_heredoc; ?>/how-to-order" style="margin-right:0px; background-color:#000; "><?=MENU_HOW_TO_ORDER;?></a>
</td>
<td valign="top">
<ul class="sf-menu">
<li>
<a href="<?php echo $linkfollow_heredoc; ?>/menu" class="header_submenu_menu"><?=MENU_MENU;?></a>
<!--- not used at this moment
<ul>
<li><a href="<?php echo $linkfollow_heredoc; ?>/menu" class="header_submenu_submenu"><?=MENU_MENU_ALACARTE;?></a></li>
<li><a href="<?php echo $linkfollow_heredoc; ?>/404/" class="header_submenu_submenu"><?=MENU_MENU_COMBO_SET;?></a></li>
<li><a href="<?php echo $linkfollow_heredoc; ?>/pedido-grupos" class="header_submenu_submenu"><?=MENU_MENU_ORDER_FOR_GROUP;?></a></li>
</ul>
------->
</li>
</ul>
</td>
<td valign="top">
<a class="header" href="<?php echo $linkfollow_heredoc; ?>/map" style="margin-right:0px; background-color:#000; "><?=MENU_DINE_IN;?></a>
</td>
</tr>
</table>
<script>
function set_black_bar() { $("#blackbar_id").css("width", $("body").width() - $("#blackbar_id").offset().left);}
$(function() { set_black_bar();setInterval('set_black_bar();', 1000);});
</script>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- top header : logotipo; tel; infos; right menu -->