hpdl
|
208
|
1
|
<?php
|
|
2
|
/*
|
|
3
|
$Id: account.php 207 2005-09-26 01:29:31 +0200 (Mo, 26 Sep 2005) hpdl $
|
|
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_Category {
|
|
14
|
var $_data = array();
|
|
15
|
|
|
16
|
function osC_Category($id) {
|
|
17
|
global $osC_Database;
|
|
18
|
|
|
19
|
$Qcategory = $osC_Database->query('select c.categories_id as id, c.parent_id, c.categories_image as image, cd.categories_name as name from :table_categories c, :table_categories_description cd where c.categories_id = :categories_id and c.categories_id = cd.categories_id and cd.language_id = :language_id');
|
|
20
|
$Qcategory->bindTable(':table_categories', TABLE_CATEGORIES);
|
|
21
|
$Qcategory->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
|
|
22
|
$Qcategory->bindInt(':categories_id', $id);
|
|
23
|
$Qcategory->bindInt(':language_id', $_SESSION['languages_id']);
|
|
24
|
$Qcategory->execute();
|
|
25
|
|
|
26
|
if ($Qcategory->numberOfRows() === 1) {
|
|
27
|
$this->_data = $Qcategory->toArray();
|
|
28
|
}
|
|
29
|
}
|
|
30
|
|
hpdl
|
298
|
31
|
function getID() {
|
|
32
|
return $this->_data['id'];
|
|
33
|
}
|
hpdl
|
208
|
34
|
|
hpdl
|
298
|
35
|
function getTitle() {
|
|
36
|
return $this->_data['name'];
|
hpdl
|
208
|
37
|
}
|
|
38
|
|
|
39
|
function getImage() {
|
hpdl
|
298
|
40
|
return $this->_data['image'];
|
hpdl
|
208
|
41
|
}
|
|
42
|
}
|
|
43
|
?>
|