Quick Search:

View

Revision:

Diff

Diff from 310 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');
21     }
22
23     function getTitle() {
24       return $this->_title;
25     }
26
27     function getTitleLink() {
28       return $this->_title_link;
29     }
30
31     function hasTitleLink() {
32       return !empty($this->_title_link);
33     }
34
35     function getContent() {
36       return $this->_content;
37     }
38
39     function hasContent() {
40       return !empty($this->_content);
41     }
42
43     function getGroup($group) {
44       $boxes = array();
45
hpdl
310
46       if (isset($this->_boxes[$group])) {
47         foreach ($this->_boxes[$group] as $box) {
48           if (file_exists('includes/boxes/' . $box)) {
49             $box_class = 'osC_Boxes_' . substr($box, 0, strrpos($box, '.'));
hpdl
308
50
hpdl
310
51             if (class_exists($box_class) === false) {
52               include('includes/boxes/' . $box);
53             }
54
55             $boxes[] = array('class' => $box, 'object' => $box_class);
hpdl
308
56           }
57         }
58       }
59
60       return $boxes;
61     }
62   }
63 ?>