fix
This commit is contained in:
@@ -26,10 +26,24 @@ class Member extends Users_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Schedule account delete in the backend
|
||||
*/
|
||||
public function deleteacc(){
|
||||
echo "Please log out of your account, and you will not be able to log in anymore. ";
|
||||
// echo "Please log out of your account, and you will not be able to log in anymore. ";
|
||||
$data = $this->getSessionArray();
|
||||
$in = [];
|
||||
|
||||
$in['member_id'] = $_SESSION['member_id'];
|
||||
$in['reason'] = "Not accepted in this version";
|
||||
$in['action'] = WRENCHBOARD_USER_DELETEACC;
|
||||
if ($this->wrenchboard_api($in, $outx) == PHP_API_OK) {
|
||||
$data['delete_message'] = "<div class=\"text-left\"><div class=\"alert alert-info no-border\">Your Account and Information Deleted.</div></div>";
|
||||
redirect('/logout');
|
||||
} else {
|
||||
$data['delete_message'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">Unable to complete account delete at this time. </div></div>";
|
||||
}
|
||||
echo $data['delete_message'];
|
||||
}
|
||||
|
||||
public function addreccipient() {
|
||||
@@ -702,11 +716,9 @@ class Member extends Users_Controller {
|
||||
|
||||
|
||||
public function smoney() {
|
||||
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
|
||||
|
||||
//var_dump($data);
|
||||
//exit();
|
||||
|
||||
$data['add_error'] = '';
|
||||
$data['amount'] = 0;
|
||||
@@ -717,6 +729,9 @@ class Member extends Users_Controller {
|
||||
$data['comment'] = '';
|
||||
// $data['fee'] = 0;
|
||||
//$data['escrow_balance'] = 0;
|
||||
$this->load->model('account_model');
|
||||
$data['wallet'] = $this->account_model->getUserWallet($_SESSION['member_id'],$currency='NAIRA'); // $out['current_balance'];
|
||||
$data['current_balance'] = $data['wallet'][0]['current_balance'];
|
||||
|
||||
if ($_POST) {
|
||||
$data['comment'] = $this->input->post('comment');
|
||||
@@ -739,7 +754,7 @@ class Member extends Users_Controller {
|
||||
$TotalAmount = $data['total'];
|
||||
|
||||
// now let us do initial check if you have enough money
|
||||
if ($_SESSION['current_balance'] < $TotalAmount) {
|
||||
if ($data['current_balance'] < $TotalAmount) {
|
||||
$out['error'] = 'You do not have enough balance for this transfer';
|
||||
$data['add_error'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $out['error'] . "</div></div>";
|
||||
} else {
|
||||
@@ -765,6 +780,9 @@ class Member extends Users_Controller {
|
||||
$data['sendmoney_table'] = $this->table->generate($query);
|
||||
$data['sendmoney_table_result'] = $query->result();
|
||||
$data['page_title'] ="Wallet";
|
||||
|
||||
|
||||
|
||||
$this->RenderUserPage('users/view_smoney', $data);
|
||||
}
|
||||
|
||||
@@ -793,19 +811,7 @@ class Member extends Users_Controller {
|
||||
$final_page = false;
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//$data = $this->getSessionArray();
|
||||
if ($_POST) {
|
||||
// case 'sendmoney':$in["action"] = WRENCHBOARD_USER_SENDMONEY;
|
||||
//$data = array();
|
||||
$data['member_id'] = $_SESSION['member_id'];
|
||||
$data['action'] = WRENCHBOARD_SMONEY_MEMBER;
|
||||
$data["senderid"] = $_SESSION['member_id'];
|
||||
@@ -830,13 +836,13 @@ class Member extends Users_Controller {
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($data, $out);
|
||||
// print_r($out);
|
||||
//exit;
|
||||
exit;
|
||||
$data = $this->getSessionArray(); // you will need this for new balace
|
||||
$data["fee"] = $out["Fee"];
|
||||
$data["amount"] = $out["InitiatingAmount"];
|
||||
$data["total"] = $data["fee"] + $data["amount"];
|
||||
$data["recipient_account_detail"] = "Recipient Account Here";
|
||||
$data["comment"] = "Coment Here";
|
||||
$data["comment"] = "Comment Here";
|
||||
|
||||
$data["rec_firstname"] = $out["firstname"];
|
||||
$data["rec_lastname"] = $out["lastname"];
|
||||
@@ -879,17 +885,11 @@ class Member extends Users_Controller {
|
||||
$this->load->model('combo_model');
|
||||
$this->combo_model->setReadOnly(true);
|
||||
$data['recipient_account_combo'] = $this->combo_model->getUserRecipientCombo('recipient_account', $_SESSION['member_id'], $data['recipient_account']);
|
||||
|
||||
// $this->load->view('users/view_header_user', $data);
|
||||
$data['sendmoney_table_result'] = $this->getSendMoneyRecent();
|
||||
$this->RenderUserPage('users/view_confirmwithdraw', $data);
|
||||
// $this->load->view('users/view_footer_user', $data);
|
||||
} else {
|
||||
|
||||
//$this->load->view('users/view_header_user', $data);
|
||||
$data['sendmoney_table_result'] = $this->getSendMoneyRecent();
|
||||
$this->RenderUserPage('users/view_finalwithdraw', $data);
|
||||
// $this->load->view('users/view_footer_user', $data);
|
||||
$this->RenderUserPage('users/view_confirmwithdraw', $data);
|
||||
} else {
|
||||
$data['sendmoney_table_result'] = $this->getSendMoneyRecent();
|
||||
$this->RenderUserPage('users/view_finalwithdraw', $data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user