From 52edbead10e6c71b8e89c3fbe3aef56c06b837e1 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 16 Jan 2010 22:41:04 +0000 Subject: [PATCH] transmit more statistics in event list git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@429 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- wob/event.wolf | 6 ++++++ www/inc/wext/event.php | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) diff --git a/wob/event.wolf b/wob/event.wolf index 28fb4c2..ca28f00 100644 --- a/wob/event.wolf +++ b/wob/event.wolf @@ -213,6 +213,12 @@ + + + + + + diff --git a/www/inc/wext/event.php b/www/inc/wext/event.php index b4e2311..9595974 100644 --- a/www/inc/wext/event.php +++ b/www/inc/wext/event.php @@ -35,6 +35,25 @@ class WOEventPrice extends WOEventPriceAbstract class WOEvent extends WOEventAbstract { + /**get amount of sold tickets from DB*/ + public function getAmountSoldFromDB() + { + global $db; + $res=$db->select("ticket","status", "eventid=".$db->escapeInt($this->prop_id)); + $cnt=0; + foreach($res as $r) + if($r["status"] == WTticket::Ordered || $r["status"] == WTticket::Used) + $cnt++; + return $cnt; + } + /**get amount of reserved tickets from DB*/ + public function getAmountReservedFromDB() + { + global $db; + $res=$db->select("ticket","status", "eventid=".$db->escapeInt($this->prop_id)." AND status=".$db->escapeInt(WTticket::Reserved)); + return count($res); + } + /**XML iface: get all events*/ public static function getAllEvents($trans) { -- 1.7.2.5