Quick Search:

View

Revision:

Diff

Diff from 1764 to:

Annotations

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

Annotated File View

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