Quick Search:

View

Revision:

Diff

Diff from 1497 to:

Annotations

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

Annotated File View

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