Quick Search:

View

Revision:

Diff

Diff from 1764 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/branches/frank/osc_trunk/templates/default.php

Annotated File View

hpdl
44
1 <?php
2 /*
3   $Id: default.php 1764 2007-12-27 21:54:07Z frank $
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
hpdl
410
8   Copyright (c) 2006 osCommerce
hpdl
44
9
hpdl
1498
10   This program is free software; you can redistribute it and/or modify
11   it under the terms of the GNU General Public License v2 (1991)
12   as published by the Free Software Foundation.
hpdl
44
13 */
14 ?>
hpdl
373
15 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
hpdl
94
16
hpdl
410
17 <html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $osC_Language->getTextDirection(); ?>" xml:lang="<?php echo $osC_Language->getCode(); ?>" lang="<?php echo $osC_Language->getCode(); ?>">
hpdl
44
18
19 <head>
20
hpdl
410
21 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $osC_Language->getCharacterSet(); ?>" />
hpdl
44
22
hpdl
410
23 <title><?php echo STORE_NAME . ($osC_Template->hasPageTitle() ? ': ' . $osC_Template->getPageTitle() : ''); ?></title>
hpdl
44
24
hpdl
754
25 <base href="<?php echo osc_href_link(null, null, 'AUTO', false); ?>" />
hpdl
44
26
hpdl
373
27 <link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/stylesheet.css" />
hpdl
44
28
hpdl
146
29 <?php
hpdl
373
30   if ($osC_Template->hasPageTags()) {
31     echo $osC_Template->getPageTags();
32   }
33
hpdl
146
34   if ($osC_Template->hasJavascript()) {
35     $osC_Template->getJavascript();
36   }
37 ?>
38
hpdl
754
39 <meta name="Generator" content="osCommerce" />
hpdl
751
40
hpdl
44
41 </head>
42
43 <body>
44
hpdl
373
45 <div id="pageBlockLeft">
46   <div id="pageContent">
hpdl
146
47
hpdl
373
48 <?php
49   if ($messageStack->size('header') > 0) {
50     echo $messageStack->output('header');
51   }
52
hpdl
608
53   if ($osC_Template->hasPageContentModules()) {
54     foreach ($osC_Services->getCallBeforePageContent() as $service) {
55       $$service[0]->$service[1]();
56     }
hpdl
373
57
hpdl
608
58     foreach ($osC_Template->getContentModules('before') as $box) {
59       $osC_Box = new $box();
60       $osC_Box->initialize();
hpdl
373
61
hpdl
608
62       if ($osC_Box->hasContent()) {
hpdl
639
63         if ($osC_Template->getCode() == DEFAULT_TEMPLATE) {
64           include('templates/' . $osC_Template->getCode() . '/modules/content/' . $osC_Box->getCode() . '.php');
65         } else {
66           if (file_exists('templates/' . $osC_Template->getCode() . '/modules/content/' . $osC_Box->getCode() . '.php')) {
67             include('templates/' . $osC_Template->getCode() . '/modules/content/' . $osC_Box->getCode() . '.php');
68           } else {
69             include('templates/' . DEFAULT_TEMPLATE . '/modules/content/' . $osC_Box->getCode() . '.php');
70           }
71         }
hpdl
608
72       }
73
74       unset($osC_Box);
hpdl
373
75     }
76   }
77
hpdl
639
78   if ($osC_Template->getCode() == DEFAULT_TEMPLATE) {
79     include('templates/' . $osC_Template->getCode() . '/content/' . $osC_Template->getGroup() . '/' . $osC_Template->getPageContentsFilename());
80   } else {
81     if (file_exists('templates/' . $osC_Template->getCode() . '/content/' . $osC_Template->getGroup() . '/' . $osC_Template->getPageContentsFilename())) {
82       include('templates/' . $osC_Template->getCode() . '/content/' . $osC_Template->getGroup() . '/' . $osC_Template->getPageContentsFilename());
83     } else {
84       include('templates/' . DEFAULT_TEMPLATE . '/content/' . $osC_Template->getGroup() . '/' . $osC_Template->getPageContentsFilename());
85     }
86   }
hpdl
751
87 ?>
hpdl
373
88
hpdl
751
89 <div style="clear: both;"></div>
90
91 <?php
hpdl
608
92   if ($osC_Template->hasPageContentModules()) {
93     foreach ($osC_Services->getCallAfterPageContent() as $service) {
94       $$service[0]->$service[1]();
95     }
hpdl
373
96
hpdl
608
97     foreach ($osC_Template->getContentModules('after') as $box) {
98       $osC_Box = new $box();
99       $osC_Box->initialize();
hpdl
373
100
hpdl
608
101       if ($osC_Box->hasContent()) {
hpdl
639
102         if ($osC_Template->getCode() == DEFAULT_TEMPLATE) {
103           include('templates/' . $osC_Template->getCode() . '/modules/content/' . $osC_Box->getCode() . '.php');
104         } else {
105           if (file_exists('templates/' . $osC_Template->getCode() . '/modules/content/' . $osC_Box->getCode() . '.php')) {
106             include('templates/' . $osC_Template->getCode() . '/modules/content/' . $osC_Box->getCode() . '.php');
107           } else {
108             include('templates/' . DEFAULT_TEMPLATE . '/modules/content/' . $osC_Box->getCode() . '.php');
109           }
110         }
hpdl
608
111       }
112
113       unset($osC_Box);
hpdl
373
114     }
115   }
116 ?>
117
hpdl
146
118   </div>
hpdl
44
119
hpdl
608
120 <?php
hpdl
751
121   $content_left = '';
122
hpdl
608
123   if ($osC_Template->hasPageBoxModules()) {
hpdl
751
124     ob_start();
hpdl
608
125
126     foreach ($osC_Template->getBoxModules('left') as $box) {
127       $osC_Box = new $box();
128       $osC_Box->initialize();
hpdl
373
129
hpdl
608
130       if ($osC_Box->hasContent()) {
hpdl
639
131         if ($osC_Template->getCode() == DEFAULT_TEMPLATE) {
132           include('templates/' . $osC_Template->getCode() . '/modules/boxes/' . $osC_Box->getCode() . '.php');
133         } else {
134           if (file_exists('templates/' . $osC_Template->getCode() . '/modules/boxes/' . $osC_Box->getCode() . '.php')) {
135             include('templates/' . $osC_Template->getCode() . '/modules/boxes/' . $osC_Box->getCode() . '.php');
136           } else {
137             include('templates/' . DEFAULT_TEMPLATE . '/modules/boxes/' . $osC_Box->getCode() . '.php');
138           }
139         }
hpdl
608
140       }
141
142       unset($osC_Box);
hpdl
373
143     }
hpdl
751
144
145     $content_left = ob_get_contents();
146     ob_end_clean();
147   }
148
149   if (!empty($content_left)) {
hpdl
608
150 ?>
hpdl
373
151
hpdl
751
152   <div id="pageColumnLeft">
153     <div class="boxGroup">
154
155 <?php
156     echo $content_left;
157 ?>
158
hpdl
608
159     </div>
160   </div>
161
162 <?php
hpdl
751
163   } else {
164 ?>
165
166 <style type="text/css"><!--
167 #pageContent {
168   width: 99%;
169   padding-left: 5px;
170 }
171 //--></style>
172
173 <?php
hpdl
373
174   }
175 ?>
176
177 </div>
hpdl
94
178
hpdl
608
179 <?php
hpdl
751
180   $content_right = '';
181
hpdl
608
182   if ($osC_Template->hasPageBoxModules()) {
hpdl
751
183     ob_start();
hpdl
608
184
185     foreach ($osC_Template->getBoxModules('right') as $box) {
186       $osC_Box = new $box();
187       $osC_Box->initialize();
hpdl
373
188
hpdl
608
189       if ($osC_Box->hasContent()) {
hpdl
639
190         if ($osC_Template->getCode() == DEFAULT_TEMPLATE) {
191           include('templates/' . $osC_Template->getCode() . '/modules/boxes/' . $osC_Box->getCode() . '.php');
192         } else {
193           if (file_exists('templates/' . $osC_Template->getCode() . '/modules/boxes/' . $osC_Box->getCode() . '.php')) {
194             include('templates/' . $osC_Template->getCode() . '/modules/boxes/' . $osC_Box->getCode() . '.php');
195           } else {
196             include('templates/' . DEFAULT_TEMPLATE . '/modules/boxes/' . $osC_Box->getCode() . '.php');
197           }
198         }
hpdl
608
199       }
200
201       unset($osC_Box);
hpdl
373
202     }
hpdl
751
203
204     $content_right = ob_get_contents();
205     ob_end_clean();
206   }
207
208   if (!empty($content_right)) {
hpdl
373
209 ?>
210
hpdl
751
211 <div id="pageColumnRight">
212   <div class="boxGroup">
213
214 <?php
215     echo $content_right;
216 ?>
217
hpdl
373
218   </div>
219 </div>
220
hpdl
608
221 <?php
hpdl
918
222   } elseif (empty($content_left)) {
223 ?>
224
225 <style type="text/css"><!--
226 #pageBlockLeft {
227   width: 99%;
228 }
229 //--></style>
230
231 <?php
hpdl
751
232   } else {
233 ?>
234
235 <style type="text/css"><!--
236 #pageContent {
237   width: 82%;
238   padding-right: 5px;
239 }
240
241 #pageBlockLeft {
242   width: 99%;
243 }
244
245 #pageColumnLeft {
246   width: 16%;
247 }
248 //--></style>
249
250 <?php
hpdl
608
251   }
252
hpdl
918
253   unset($content_left);
hpdl
751
254   unset($content_right);
255
hpdl
608
256   if ($osC_Template->hasPageHeader()) {
257 ?>
258
hpdl
373
259 <div id="pageHeader">
260
261 <?php
frank
1764
262     echo osc_link_object(osc_href_link(FILENAME_DEFAULT), osc_image(DIR_WS_IMAGES . 'store_logo' . STORE_LOGO_TYPE, STORE_NAME), 'id="siteLogo"');
hpdl
373
263 ?>
264
hpdl
751
265   <ul id="navigationIcons">
hpdl
373
266
267 <?php
hpdl
754
268     echo '<li>' . osc_link_object(osc_href_link(FILENAME_ACCOUNT, null, 'SSL'), osc_image(DIR_WS_IMAGES . 'header_account.gif', $osC_Language->get('my_account'))) . '</li>' .
269          '<li>' . osc_link_object(osc_href_link(FILENAME_CHECKOUT, null, 'SSL'), osc_image(DIR_WS_IMAGES . 'header_cart.gif', $osC_Language->get('cart_contents'))) . '</li>' .
270          '<li>' . osc_link_object(osc_href_link(FILENAME_CHECKOUT, 'shipping', 'SSL'), osc_image(DIR_WS_IMAGES . 'header_checkout.gif', $osC_Language->get('checkout'))) . '</li>';
hpdl
373
271 ?>
272
hpdl
751
273   </ul>
hpdl
373
274
hpdl
751
275   <div id="navigationBar">
hpdl
373
276
277 <?php
hpdl
608
278     if ($osC_Services->isStarted('breadcrumb')) {
hpdl
751
279 ?>
280
281     <div id="breadcrumbPath">
282
283 <?php
hpdl
608
284       echo $breadcrumb->trail(' &raquo; ');
hpdl
94
285 ?>
286
hpdl
751
287     </div>
hpdl
94
288
289 <?php
hpdl
751
290     }
291
hpdl
608
292     if ($osC_Customer->isLoggedOn()) {
hpdl
754
293       echo osc_link_object(osc_href_link(FILENAME_ACCOUNT, 'logoff', 'SSL'), $osC_Language->get('sign_out')) . ' &nbsp;|&nbsp; ';
hpdl
608
294     }
hpdl
94
295
hpdl
754
296     echo osc_link_object(osc_href_link(FILENAME_ACCOUNT, null, 'SSL'), $osC_Language->get('my_account')) . ' &nbsp;|&nbsp; ' . osc_link_object(osc_href_link(FILENAME_CHECKOUT, null, 'SSL'), $osC_Language->get('cart_contents')) . ' &nbsp;|&nbsp; ' . osc_link_object(osc_href_link(FILENAME_CHECKOUT, 'shipping', 'SSL'), $osC_Language->get('checkout'));
hpdl
94
297 ?>
298
299   </div>
300 </div>
301
hpdl
608
302 <?php
hpdl
751
303   } // ($osC_Template->hasPageHeader())
hpdl
608
304
305   if ($osC_Template->hasPageFooter()) {
306 ?>
307
hpdl
94
308 <div id="pageFooter">
309
hpdl
751
310 <?php
hpdl
754
311     echo sprintf($osC_Language->get('footer'), date('Y'), osc_href_link(FILENAME_DEFAULT), STORE_NAME);
hpdl
751
312 ?>
313
hpdl
146
314 </div>
hpdl
94
315
hpdl
146
316 <?php
hpdl
608
317     if ($osC_Services->isStarted('banner') && $osC_Banner->exists('468x60')) {
318       echo '<p align="center">' . $osC_Banner->display() . '</p>';
319     }
hpdl
94
320   }
321 ?>
322
hpdl
44
323 </body>
324
325 </html>