| Line 122... |
Line 122... |
| 122 |
$_POST['userId'] = -1;
|
122 |
$_POST['userId'] = -1;
|
| 123 |
$_POST['isLoggedIn'] = 'false';
|
123 |
$_POST['isLoggedIn'] = 'false';
|
| 124 |
}
|
124 |
}
|
| 125 |
$data['stylesheet'] = 'recharge.css';
|
125 |
$data['stylesheet'] = 'recharge.css';
|
| 126 |
$data['title'] = 'Instant recharge for your mobile and DTH';
|
126 |
$data['title'] = 'Instant recharge for your mobile and DTH';
|
| - |
|
127 |
$data['response']=$this->recharge_model->getList($this->input->get(),$this->input->post(),$this->config->item('rechargeGetUser'));
|
| - |
|
128 |
if(isset($data['response']['response']['recharge_confirmation'][0]->userId) && !empty($data['response']['response']['recharge_confirmation'][0]->userId)){
|
| - |
|
129 |
$this->session->set_userdata('recharge_confirmation' , $data['response']['response']['recharge_confirmation']);
|
| - |
|
130 |
$this->session->set_userdata('userId',$data['response']['response']['recharge_confirmation'][0]->userId);
|
| - |
|
131 |
$_POST['userId'] = $data['response']['response']['recharge_confirmation'][0]->userId;
|
| - |
|
132 |
} else{
|
| - |
|
133 |
redirect(base_url().'recharge');
|
| - |
|
134 |
}
|
| 127 |
$data['response']=$this->recharge_model->getList($this->input->get(),$this->input->post(),$rechargeconfig);
|
135 |
$data['response']=$this->recharge_model->getList($this->input->get(),$this->input->post(),$this->config->item('rechargeAmount'));
|
| - |
|
136 |
$data['response']['response']['recharge_confirmation'] = $this->session->userdata('recharge_confirmation');
|
| 128 |
if(isset($data['response']['response']['recharge_amount'][0]->payAmount) && $data['response']['response']['recharge_amount'][0]->payAmount == 0){
|
137 |
if(isset($data['response']['response']['recharge_amount'][0]->payAmount) && $data['response']['response']['recharge_amount'][0]->payAmount == 0){
|
| 129 |
$captcha = $this->captcha_model->generateCaptcha();
|
138 |
$captcha = $this->captcha_model->generateCaptcha();
|
| 130 |
$this->session->set_userdata('captcha',$captcha['word']);
|
139 |
$this->session->set_userdata('captcha',$captcha['word']);
|
| 131 |
$data['captcha'] = $captcha;
|
140 |
$data['captcha'] = $captcha;
|
| 132 |
}
|
141 |
}
|
| 133 |
if(isset($data['response']['response']['recharge_confirmation'][0]->userId) && !empty($data['response']['response']['recharge_confirmation'][0]->userId)){
|
- |
|
| 134 |
$this->session->set_userdata('userId',$data['response']['response']['recharge_confirmation'][0]->userId);
|
- |
|
| 135 |
$this->layout->view('recharge/recharge_view',$data);
|
142 |
$this->layout->view('recharge/recharge_view',$data);
|
| 136 |
}
|
- |
|
| 137 |
else{
|
- |
|
| 138 |
redirect(base_url().'recharge');
|
- |
|
| 139 |
}
|
- |
|
| 140 |
|
- |
|
| 141 |
}
|
143 |
}
|
| 142 |
elseif(isset($_POST['submit']) && (($_POST['submit'] == 'Confirm') || ($_POST['submit'] == 'Recharge Now')) && (isset($_POST['captcha_response_field']) && !empty($_POST['captcha_response_field']))) {
|
144 |
elseif(isset($_POST['submit']) && (($_POST['submit'] == 'Confirm') || ($_POST['submit'] == 'Recharge Now')) && (isset($_POST['captcha_response_field']) && !empty($_POST['captcha_response_field']))) {
|
| 143 |
$userId = $this->session->userdata('userId');
|
145 |
$userId = $this->session->userdata('userId');
|
| 144 |
$captcha = $this->session->userdata('captcha');
|
146 |
$captcha = $this->session->userdata('captcha');
|
| 145 |
if(strcmp($captcha,$_POST['captcha_response_field']) != 0){
|
147 |
if(strcmp($captcha,$_POST['captcha_response_field']) != 0){
|