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_Manufacturer {
|
|
14
|
var $_data = array();
|
|
15
|
|
|
16
|
function osC_Manufacturer($id) {
|
|
17
|
global $osC_Database;
|
|
18
|
|
|
19
|
$Qmanufacturer = $osC_Database->query('select manufacturers_name as name, manufacturers_image as image from :table_manufacturers where manufacturers_id = :manufacturers_id');
|
|
20
|
$Qmanufacturer->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
|
|
21
|
$Qmanufacturer->bindInt(':manufacturers_id', $id);
|
|
22
|
$Qmanufacturer->execute();
|
|
23
|
|
|
24
|
if ($Qmanufacturer->numberOfRows() === 1) {
|
|
25
|
$this->_data = $Qmanufacturer->toArray();
|
|
26
|
}
|
|
27
|
}
|
|
28
|
|
|
29
|
function getTitle() {
|
|
30
|
if (isset($this->_data['name'])) {
|
|
31
|
return $this->_data['name'];
|
|
32
|
}
|
|
33
|
|
|
34
|
return false;
|
|
35
|
}
|
|
36
|
|
|
37
|
function getImage() {
|
|
38
|
if (isset($this->_data['image'])) {
|
|
39
|
return $this->_data['image'];
|
|
40
|
}
|
|
41
|
|
|
42
|
return false;
|
|
43
|
}
|
|
44
|
}
|
|
45
|
?>
|