From b834ead9426382bfbe52be9912f28a353bc6d83d Mon Sep 17 00:00:00 2001 From: akulikov Date: Thu, 15 Jan 2009 13:45:25 +0000 Subject: [PATCH] Win lots, bid result alerts, last finished lot git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@42 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- classes/Env.class.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/classes/Env.class.php b/classes/Env.class.php index d10e32f..b5ec987 100644 --- a/classes/Env.class.php +++ b/classes/Env.class.php @@ -58,8 +58,8 @@ final class Env { self::$params = self::$params + $params; } - - static public function Files($name = '', $default = array(), $param = false) + + static public function Files($name = '', $default = array(), $param = false) { if(!isset($_FILES)){ return $default; @@ -70,5 +70,19 @@ final class Env $res = isset($_FILES[$name]) ? $_FILES[$name] : $default; return $param ? $res[$param] : $res; } + + /** + * Получить цену ставки + * + * @param integer $dis - некое число от кооторого считается скидка + */ + static public function getBidCost($dis = 0) + { + if ($dis > 0 && $dis <= 100) { + return AUC_BID_COST - intval($dis); + } + + return AUC_BID_COST; + } } ?> \ No newline at end of file