Quick Search:

View

Revision:

Diff

Diff from 311 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/branches/hpdl/oscommerce/includes/classes/boxes.php

Annotated File View

hpdl
308
1 <?php
2 /*
3   $Id: $
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
8   Copyright (c) 2005 osCommerce
9
10   Released under the GNU General Public License
11 */
12
13   class osC_Boxes {
14     var $_boxes,
15         $_title,
16         $_title_link,
17         $_content;
18
19     function osC_Boxes() {
20       $this->_boxes['left'] = array('categories.php', 'manufacturers.php', 'whats_new.php', 'search.php', 'information.php');
hpdl
311
21       $this->_boxes['right'] = array('shopping_cart.php', 'manufacturer_info.php', 'order_history.php', 'best_sellers.php', 'product_notifications.php', 'tell_a_friend.php', 'specials.php', 'reviews.php', 'languages.php', 'currencies.php');
hpdl
308
22     }
23
24     function getTitle() {
25       return $this->_title;
26     }
27
28     function getTitleLink() {
29       return $this->_title_link;
30     }
31
32     function hasTitleLink() {
33       return !empty($this->_title_link);
34     }
35
36     function getContent() {
37       return $this->_content;
38     }
39
40     function hasContent() {
41       return !empty($this->_content);
42     }
43
44     function getGroup($group) {
45       $boxes = array();
46
hpdl
310
47       if (isset($this->_boxes[$group])) {
48         foreach ($this->_boxes[$group] as $box) {
49           if (file_exists('includes/boxes/' . $box)) {
50             $box_class = 'osC_Boxes_' . substr($box, 0, strrpos($box, '.'));
hpdl
308
51
hpdl
310
52             if (class_exists($box_class) === false) {
53               include('includes/boxes/' . $box);
54             }
55
56             $boxes[] = array('class' => $box, 'object' => $box_class);
hpdl
308
57           }
58         }
59       }
60
61       return $boxes;
62     }
63   }
64 ?>