コード例 #1
0
ファイル: Discount.php プロジェクト: robjcordes/nexnewwp
 public function getTextDiscount()
 {
     if ($this->type == 1) {
         return $this->discount . "%";
     } else {
         $currency = Wpjb_List_Currency::getCurrency($this->currency);
         $code = $currency['code'] . ' ';
         if ($currency['symbol'] != null) {
             $code = $currency['symbol'];
         }
         return $code . $this->discount;
     }
 }
コード例 #2
0
ファイル: Listing.php プロジェクト: robjcordes/nexnewwp
 public function getTextPrice($format = null)
 {
     $currency = Wpjb_List_Currency::getCurrency($this->currency);
     $price = $this->price;
     if ($format) {
         $price = sprintf($format, $price);
     }
     if ($currency['symbol'] != null) {
         return $currency['symbol'] . $price;
     } else {
         return $currency['code'] . ' ' . $price;
     }
 }
コード例 #3
0
ファイル: Stats.php プロジェクト: robjcordes/nexnewwp
 public static function render()
 {
     $list = new Daq_Db_Query();
     $list->select("t.payment_currency as curr");
     $list->from("Wpjb_Model_Payment t");
     $list->where("payment_paid > 0");
     $list->group("payment_currency");
     $result = $list->fetchAll();
     $curr = array();
     foreach ($result as $r) {
         $c = Wpjb_List_Currency::getCurrency($r->curr);
         $curr[$r->curr] = $c["name"];
     }
     $view = Wpjb_Project::getInstance()->getAdmin()->getView();
     /* @var $view  Daq_View */
     $view->currency = $curr;
     $view->render("dashboard/stats.php");
 }