當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Model_Users::getWithdraws方法代碼示例

本文整理匯總了PHP中Model_Users::getWithdraws方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model_Users::getWithdraws方法的具體用法?PHP Model_Users::getWithdraws怎麽用?PHP Model_Users::getWithdraws使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Model_Users的用法示例。


在下文中一共展示了Model_Users::getWithdraws方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: indexAction

 public function indexAction()
 {
     if ($this->session->get('successfu_edite')) {
         $this->view->successfu_edite = true;
         $this->session->clear('successfu_edite');
     }
     $this->view->page_num = $page = $this->getRequest()->getRequest('page', 1);
     $data = array('start' => $page * JO_Registry::get('admin_limit') - JO_Registry::get('admin_limit'), 'limit' => JO_Registry::get('admin_limit'));
     $this->view->withdraws = array();
     $withdraws = Model_Users::getWithdraws($data);
     if ($withdraws) {
         foreach ($withdraws as $withdraw) {
             $withdraw['earning'] = WM_Currency::format($withdraw['earning']);
             $date = new JO_Date($withdraw['datetime'], 'dd MM yy');
             $withdraw['datetime'] = $date->toString();
             if ($withdraw['paid'] == 'true') {
                 $date = new JO_Date($withdraw['paid_datetime'], 'dd MM yy');
                 $withdraw['paid_datetime'] = $date->toString();
             } else {
                 $withdraw['paid_datetime'] = '';
             }
             $withdraw['amount'] = WM_Currency::format($withdraw['amount']);
             $this->view->withdraws[] = $withdraw;
         }
     }
     $total_records = Model_Users::getTotalWithdraws($data);
     $this->view->total_pages = ceil($total_records / JO_Registry::get('admin_limit'));
     $this->view->total_rows = $total_records;
     $pagination = new Model_Pagination();
     $pagination->setLimit(JO_Registry::get('admin_limit'));
     $pagination->setPage($page);
     $pagination->setTotal($total_records);
     $pagination->setUrl($this->getRequest()->getModule() . '/gainpayingup/?page={page}');
     $this->view->pagination = $pagination->render();
 }
開發者ID:noikiy,項目名稱:PD,代碼行數:35,代碼來源:GainpayingupController.php

示例2: indexAction


//.........這裏部分代碼省略.........
     }
     #LOAD WITHDRAW
     $this->view->withdraw = array();
     $this->view->withdraw['no'] = Model_Deposit::getWithdrawCount(" `paid` = 'false' AND `datetime` > '" . date('Y-m') . "-01 00:00:00' ");
     if ($this->view->withdraw['no']) {
         $this->view->withdraw['no']['total_f'] = WM_Currency::format($this->view->withdraw['no']['total']);
     }
     $this->view->withdraw['paid'] = Model_Deposit::getWithdrawCount(" `paid` = 'true' AND `paid_datetime` > '" . date('Y-m') . "-01 00:00:00' ");
     if ($this->view->withdraw['paid']) {
         $this->view->withdraw['paid']['total_f'] = WM_Currency::format($this->view->withdraw['paid']['total']);
     }
     #LOAD THEMES
     $this->view->items = Model_Items::getItems(array('filter_status' => 'queue', 'start' => 0, 'limit' => 5));
     $this->view->updated_items = Model_Items::getItems(array('filter_update' => true, 'start' => 0, 'limit' => 5));
     #LOAD LAST REQUEST
     $this->view->contacts = array();
     $contacts = Model_Contacts::getContacts(array('filter_answer_datetime' => '0000-00-00', 'start' => 0, 'limit' => 5));
     if ($contacts) {
         foreach ($contacts as $contact) {
             $data = new JO_Date($contact['datetime'], 'dd MM yy');
             $contact['datetime'] = $data->toString();
             $contact['has_response'] = $contact['answer_datetime'] != '0000-00-00 00:00:00';
             if ($contact['answer_datetime'] != '0000-00-00 00:00:00') {
                 $data = new JO_Date($contact['answer_datetime'], 'dd MM yy');
                 $contact['answer_datetime'] = $data->toString();
             } else {
                 $contact['answer_datetime'] = '';
             }
             $this->view->contacts[] = $contact;
         }
     }
     #Withdrawals
     $this->view->withdraws = array();
     $withdraws = Model_Users::getWithdraws(array('start' => 0, 'limit' => 5));
     if ($withdraws) {
         foreach ($withdraws as $withdraw) {
             $withdraw['earning'] = WM_Currency::format($withdraw['earning']);
             $date = new JO_Date($withdraw['datetime'], 'dd MM yy');
             $withdraw['datetime'] = $date->toString();
             if ($withdraw['paid'] == 'true') {
                 $date = new JO_Date($withdraw['paid_datetime'], 'dd MM yy');
                 $withdraw['paid_datetime'] = $date->toString();
             } else {
                 $withdraw['paid_datetime'] = '';
             }
             $withdraw['amount'] = WM_Currency::format($withdraw['amount']);
             $this->view->withdraws[] = $withdraw;
         }
     }
     #TAGS NO ACTIVE
     $this->view->tags = Model_Tags::getTags(array('filter_visible' => 'false', 'start' => 0, 'limit' => 20));
     #DRAW GRAPHCS
     $referal_sum = Model_Orders::getSalesStatusByDay(" AND `datetime` > '" . date('Y-m') . "-01 00:00:00' ", 'referal');
     $sales_sum = Model_Orders::getSalesStatusByDay(" AND `datetime` > '" . date('Y-m') . "-01 00:00:00' ");
     $referal_money = array();
     $sales_money = array();
     $user_money = array();
     $win_money = array();
     $sales_num = array();
     $referal_num = array();
     $days = array();
     //		for($i=1; $i<= date('t'); $i++) {
     //			if(isset($referal_sum[date("Y-m-") . sprintf('%02d', $i)])) {
     //				$referal_money[] = number_format($referal_sum[date("Y-m-") . sprintf('%02d', $i)]['receive'], 2, '.', '');
     //			} else {
     //				$referal_money[] = 0;
開發者ID:noikiy,項目名稱:PD,代碼行數:67,代碼來源:IndexController.php


注:本文中的Model_Users::getWithdraws方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。