input->post('username');
$data['name'] = $_SESSION['name']; // = $this->input->post('username');
$data['firstname'] = $_SESSION['firstname']; // = $ret->firstname;
$data['lastname'] = $_SESSION['lastname']; // = $ret->lastname;
$data['email'] = $_SESSION['email']; // = $ret->email;
// print_r($_SESSION);
//Array ( [__ci_last_regenerate] => 1474689025 [username] => ses66181+1@gmail.com [name] => ses66181+1@gmail.com [firstname] => Olusesan [lastname] => Amey [email] => ses66181+1@gmail.com )
//
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
} else {
// $this->load->view('users/view_header_user', $data);
// $this->load->view('users/view_dash', $data);
// $this->load->view('users/view_footer_user', $data);
redirect(dash);
}
}
/*
* 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. ";
$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'] = "
Your Account and Information Deleted.
";
redirect('/logout');
} else {
$data['delete_message'] = "Unable to complete account delete at this time.
";
}
echo $data['delete_message'];
}
public function addreccipient() {
$data = $this->getSessionArray();
$data['firstname'] = $data['lastname'] = $data['account_no'] = $data['account_no_repeat'] = '';
$data['state'] = $data['city'] = '';
$data['add_error'] = '';
// $this->load->model('country_model');
$data["status"] = 1;
// $out = $this->country_model->loadCountry($data);
// print_r($out);
$data['country'] = $this->input->post('country');
$data['banks'] = $this->input->post('banks');
$data['account_type'] = $this->input->post('account_type');
$this->load->model('combo_model');
$data['country_combo'] = $this->combo_model->getCountryCombo('country', $data['country']);
$data['bank_combo'] = $this->combo_model->getBankCombo('banks', $data['banks']);
$data['account_type_combo'] = $this->combo_model->getAccountTypeCombo('account_type', $data['account_type']);
if ($_POST) {
$data['firstname'] = $this->input->post('firstname');
$data['lastname'] = $this->input->post('lastname');
$data['account_no'] = $this->input->post('account_no');
$data['account_no_repeat'] = $this->input->post('account_no_repeat');
$data['state'] = $this->input->post('state');
$data['city'] = $this->input->post('city');
// now let us verify the data
$this->load->model('recipient_model');
$out = $this->recipient_model->verifyNewRecipientInfo($data, $_SESSION['member_id']);
if ($out['error_state'] == true) {
$data['add_error'] = "