diff --git a/www/application/controllers/Member.php b/www/application/controllers/Member.php index 553de6cd..2e910187 100644 --- a/www/application/controllers/Member.php +++ b/www/application/controllers/Member.php @@ -661,15 +661,8 @@ class Member extends Users_Controller { $data['sendmoney_table_result'] = $query->result(); $data['card_payment_data_result'] = $this->report_model->getCardPurchase(6)['card_payment_data_result']; - $dollar_wallet = $this->account_model->getUserWallet( $_SESSION['member_id'],'USD'); - // var_dump($dollar_wallet[0]['amount']); - // var_dump($dollar_wallet['amount']); - // exit(); - $data['dollar_balance'] = 0; - if ( count($dollar_wallet) > 0 && isset ($dollar_wallet[0]['amount']) ){ - $data['dollar_balance'] = $dollar_wallet[0]['amount']*0.01; - } - //account_model + $data['wallet'] = $this->account_model->getUserWallet( $_SESSION['member_id']); + if ($_POST) { $data['comment'] = $this->input->post('comment'); diff --git a/www/application/models/Account_model.php b/www/application/models/Account_model.php index 060efb67..d69505ae 100644 --- a/www/application/models/Account_model.php +++ b/www/application/models/Account_model.php @@ -6,9 +6,10 @@ class Account_model extends CI_Model { } - public function getUserWallet($member_id,$currency) { + public function getUserWallet($member_id,$currency='') { $num = 0; - $mysql = "SELECT * FROM members_wallet WHERE member_id = $member_id AND currency='".$currency."' "; + //$mysql = "SELECT * FROM members_wallet WHERE member_id = $member_id AND currency='".$currency."' "; + $mysql = "SELECT w.amount,c.* FROM members_wallet w LEFT JOIN currency c ON c.code=w.currency WHERE w.member_id = $member_id ORDER BY c.lorder DESC"; $query = $this->db->query($mysql); return $query->result_array(); } diff --git a/www/application/views/users/view_balance.php b/www/application/views/users/view_balance.php index 7a1c7060..e74c8171 100644 --- a/www/application/views/users/view_balance.php +++ b/www/application/views/users/view_balance.php @@ -1,5 +1,34 @@ + + + + + + + + + + + "; +} + +?>
| - | - | - | |
|---|---|---|---|
|
-
-
-
-
-
-
-
- |
- - Who Knows Geography - By Zoey Dylan - | -- 3:22PM, 07 Sep - Date - | -- - - - | -
|
-
-
-
-
-
-
-
- |
- - Maths Championship - By Tom Gere - | -- 10:05PM, 25 Oct - Date - | -- - - - | -
|
-
-
-
-
-
-
-
- |
- - School Music Festival - by Rose Liam - | -- 4:20PM, 03 Sep - Date - | -- - - - | -
| - | - | - | |
|---|---|---|---|
|
-
-
-
-
-
-
-
- |
- - Maths Championship - By Tom Gere - | -- 10:05PM, 25 Oct - Date - | -- - - - | -
|
-
-
-
-
-
-
-
- |
- - Who Knows Geography - By Zoey Dylan - | -- 3:22PM, 07 Sep - Date - | -- - - - | -
|
-
-
-
-
-
-
-
- |
- - Napoleon Days - By Luke Owen - | -- 1:20PM, 02 Dec - Date - | -- - - - | -
|
-
-
-
-
-
-
-
- |
- - School Music Festival - by Rose Liam - | -- 4:20PM, 03 Sep - Date - | -- - - - | -