summaryrefslogtreecommitdiff
path: root/htdocs/src/Category.inc.php
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2011-06-09 16:56:39 -0700
committerJesse Morgan <jesse@jesterpm.net ; true>2011-06-09 16:56:39 -0700
commit8439ed9ba5b36fa382e32ea883a0877d6ec536c0 (patch)
treecb49279c74804503d42c543e4a2c244695d5ce8a /htdocs/src/Category.inc.php
parent0b1deccfe6cbe7fca0a6abd03abb18cafca59c60 (diff)
Finished added prices. Added more buttons to the headers. Fixed the categories.
Diffstat (limited to 'htdocs/src/Category.inc.php')
-rw-r--r--htdocs/src/Category.inc.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/htdocs/src/Category.inc.php b/htdocs/src/Category.inc.php
index fdcd210..cfef06b 100644
--- a/htdocs/src/Category.inc.php
+++ b/htdocs/src/Category.inc.php
@@ -12,10 +12,16 @@ require_once "base.inc.php";
class Category {
private $info;
-
+ private $options = array('price' => false);
public function __construct($info=null) {
$this->info = $info;
+
+ if (isset($this->info['options'])) {
+ foreach (split(',', $this->info['options']) as $op) {
+ $this->options[$op] = true;
+ }
+ }
}
public static function getCategories() {
@@ -54,8 +60,7 @@ class Category {
$row = $db->fetchAssocRow($query);
if ($row) {
- $category = new Category();
- $category->info = $row;
+ $category = new Category($row);
return $category;
@@ -85,7 +90,14 @@ class Category {
public function getDescription() {
return htmlspecialchars($this->info['description']);
}
+
+ public function getOption($name) {
+ return $this->options[$name];
+ }
+
+ public function setOption($value) {
+ $this->options[$name] = $value;
+ }
}
?>
-