[521] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | if (!defined('BASEPATH'))
|
---|
| 4 | exit('No direct script access allowed');
|
---|
| 5 |
|
---|
[503] | 6 | class User extends MX_Controller {
|
---|
[466] | 7 |
|
---|
[521] | 8 | const TOKENPW = 'violet';
|
---|
[503] | 9 |
|
---|
[521] | 10 | public function __construct() {
|
---|
| 11 | parent::__construct();
|
---|
[554] | 12 | $this->load->helper('cookie');
|
---|
[636] | 13 | $this->load->helper('language');
|
---|
| 14 | $this->lang->load('messages', 'message');
|
---|
[521] | 15 | }
|
---|
| 16 |
|
---|
| 17 | public function profile() {
|
---|
| 18 | $user_info = $this->session->userdata('userInfo');
|
---|
[503] | 19 | if ($user_info) {
|
---|
[538] | 20 | $this->load->model('user_model');
|
---|
[503] | 21 | $this->load->model('servicepackage_model');
|
---|
| 22 | $user = $user_info['user'];
|
---|
| 23 | $us_id = $user_info['us_id'];
|
---|
| 24 | $src = "SBG";
|
---|
| 25 | $token = md5($us_id . self::TOKENPW);
|
---|
| 26 | $data = $this->get_data($src, $token, $us_id);
|
---|
[538] | 27 | $u = $this->user_model->get_user_by_id($us_id);
|
---|
[508] | 28 | $data['current_tab'] = $this->uri->segment(4, 'edit-basic');
|
---|
[503] | 29 | $data['packages'] = $this->servicepackage_model->getAllPackages();
|
---|
[554] | 30 | $data['is_viettel'] = $user_info['is_viettel'];
|
---|
[580] | 31 |
|
---|
[554] | 32 | $data = array_merge($data, $u);
|
---|
| 33 | $data = array_merge($data, $user_info);
|
---|
[559] | 34 |
|
---|
[503] | 35 | $this->load->view('frontend/user_profile', $data);
|
---|
[508] | 36 | } else {
|
---|
[503] | 37 | redirect('frontend/home');
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | public function packageRegister() {
|
---|
| 42 | $result = array();
|
---|
| 43 | $input = $this->input->post();
|
---|
| 44 | $this->load->model('user_model');
|
---|
| 45 | $user_info = $this->session->userdata('userInfo');
|
---|
| 46 | if ($user_info) {
|
---|
| 47 | parse_str($user_info['user'], $info);
|
---|
| 48 | $this->load->model('servicepackage_model');
|
---|
[508] | 49 |
|
---|
[503] | 50 | $package = $this->servicepackage_model->getPackage($input['p_id']);
|
---|
| 51 | $user = $user_info['user'];
|
---|
| 52 | $us_id = $user_info['us_id'];
|
---|
| 53 | $user = $this->user_model->get_user_by_id($us_id);
|
---|
| 54 | $result['can_buy'] = 1;
|
---|
| 55 | $result['can_edit'] = 0;
|
---|
| 56 | if ($user['acc_balanced'] < $package['p_price']) {
|
---|
| 57 | $result['can_buy'] = 0;
|
---|
| 58 | }
|
---|
[580] | 59 |
|
---|
[503] | 60 | if ($user['p_id'] < 1) {
|
---|
| 61 | $result['can_edit'] = 1;
|
---|
| 62 | }
|
---|
[580] | 63 | if ($info['fullname']=="")
|
---|
| 64 | {
|
---|
| 65 | $result['can_edit'] = 1;
|
---|
| 66 | }
|
---|
[503] | 67 | $result['info'] = $info;
|
---|
| 68 | $result['user'] = $user;
|
---|
| 69 | $result['package'] = $package;
|
---|
| 70 | $result['modal'] = $this->load->view('frontend/package_register_modal', $result, true);
|
---|
| 71 | } else {
|
---|
| 72 |
|
---|
| 73 | }
|
---|
| 74 | echo json_encode($result);
|
---|
| 75 | }
|
---|
[554] | 76 |
|
---|
[503] | 77 | public function finishRegisterPackage() {
|
---|
| 78 | $result = array();
|
---|
| 79 | $result['success'] = 0;
|
---|
| 80 | $this->load->model('user_model');
|
---|
| 81 | $input = $this->input->post();
|
---|
| 82 | $user_info = $this->session->userdata('userInfo');
|
---|
[508] | 83 | parse_str($user_info['user'], $info);
|
---|
[503] | 84 | if (isset($input['fullname'])) {
|
---|
[548] | 85 | if (strlen($input['fullname']) < 1) {
|
---|
[636] | 86 | $result['errors'][] = lang('_SBG_REGISTER_VIP_FULLNAME_REQUIRED_MSG');
|
---|
[503] | 87 | }
|
---|
[548] | 88 | if (strlen($input['school']) < 1) {
|
---|
[636] | 89 | $result['errors'][] = lang('_SBG_REGISTER_VIP_SCHOOL_REQUIRED_MSG');
|
---|
[503] | 90 | }
|
---|
| 91 | if (!isset($result['errors'])) {
|
---|
[490] | 92 | $user_info = $this->session->userdata('userInfo');
|
---|
[503] | 93 | if ($user_info) {
|
---|
[508] | 94 |
|
---|
[503] | 95 | $src = "SBG";
|
---|
[508] | 96 | $us_id = $user_info['us_id'];
|
---|
[503] | 97 | $input['password'] = '';
|
---|
| 98 | $input['oldpass'] = '';
|
---|
| 99 | $input['gender'] = '';
|
---|
[508] | 100 | $input['email'] = '';
|
---|
[503] | 101 | $input['province'] = '';
|
---|
[508] | 102 | $info['fullname'] = $input['fullname'];
|
---|
| 103 | $info['school'] = $input['school'];
|
---|
[503] | 104 | $token = md5($us_id . self::TOKENPW);
|
---|
| 105 | $user = $this->get_data($src, $token, $us_id);
|
---|
| 106 | if ($input) {
|
---|
[490] | 107 | $this->load->model('user_model');
|
---|
[503] | 108 | $update = $this->user_model->update_user($src, $token, $input, $us_id);
|
---|
[508] | 109 | $info = urldecode(http_build_query($info));
|
---|
[554] | 110 | $userdata = array('username' => $user_info['username'], 'user' => $info, 'us_id' => $user_info['us_id'], 'logined_in' => TRUE, 'is_viettel' => $user_info['is_viettel']);
|
---|
[503] | 111 | $this->session->set_userdata('userInfo', $userdata);
|
---|
| 112 | }
|
---|
| 113 | }
|
---|
| 114 | }
|
---|
| 115 | }
|
---|
[647] | 116 |
|
---|
[503] | 117 | if (isset($result['errors'])) {
|
---|
[554] | 118 | echo json_encode($result);
|
---|
[647] | 119 | exit();
|
---|
[503] | 120 | }
|
---|
[647] | 121 |
|
---|
[503] | 122 | $this->load->model('servicepackage_model');
|
---|
| 123 | $us_id = $user_info['us_id'];
|
---|
| 124 | $user = $this->user_model->get_user_by_id($us_id);
|
---|
| 125 | $package = $this->servicepackage_model->getPackage($input['p_id']);
|
---|
[508] | 126 | $user['acc_balanced'] = $user['acc_balanced'] - $package['p_price'];
|
---|
[556] | 127 |
|
---|
| 128 | $currentExpireDate = $user['expire_date'] == NULL || trim($user['expire_date']) == '' ? date('Y-m-d 00:00:00') : $user['expire_date'];
|
---|
| 129 | $user['expire_date'] = date('Y-m-d', strtotime("+" . $package['p_period'] . " ".$package['p_unit'], strtotime($currentExpireDate)));
|
---|
[508] | 130 | $user['p_id'] = $package['p_id'];
|
---|
| 131 | $this->user_model->updateUser($us_id, $user);
|
---|
| 132 | $user['expire_date'] = date("d-m-Y", (strtotime($user['expire_date'])));
|
---|
| 133 | $result['expire_date'] = $user['expire_date'];
|
---|
[503] | 134 | $result['success'] = 1;
|
---|
[647] | 135 | $message = str_replace(':period:', date("d/m/Y", (strtotime($user['expire_date']))), lang('_SBG_REGISTER_VIP_SUCCESS_MSG'));
|
---|
| 136 | $result['message'] = $message;
|
---|
| 137 |
|
---|
[633] | 138 | $toDate = date("Y-m-d", (strtotime($result['expire_date'])));
|
---|
[646] | 139 | $this->user_model->insertRegisterVipLog($user['cellphone'],$package['p_code'], false);
|
---|
[503] | 140 | echo json_encode($result);
|
---|
| 141 | }
|
---|
[554] | 142 |
|
---|
| 143 | public function regpackage() {
|
---|
| 144 | $user_info = $this->session->userdata('userInfo');
|
---|
| 145 | parse_str($user_info['user'], $info);
|
---|
| 146 | $p_id = $this->input->post('p_id', TRUE);
|
---|
| 147 |
|
---|
| 148 | $us_id = (int) $info['id'];
|
---|
| 149 | $this->load->model('servicepackage_model');
|
---|
| 150 | $this->load->model('user_model');
|
---|
| 151 |
|
---|
| 152 | $user = $this->user_model->get_user_by_id($us_id);
|
---|
| 153 | $package = $this->servicepackage_model->getPackage($p_id);
|
---|
| 154 |
|
---|
| 155 | if ($user['acc_balanced'] < $package['p_price']) {
|
---|
[636] | 156 | $aryPatterns = array('/:acc_balanced:/');
|
---|
| 157 | $message = preg_replace($aryPatterns, array(number_format($user['acc_balanced'], 0)), lang('_SBG_ACC_BALANCE_LESS_PACKAGE_PRICE_MSG'));
|
---|
[554] | 158 | } else {
|
---|
| 159 | $user['acc_balanced'] = $user['acc_balanced'] - $package['p_price'];
|
---|
| 160 | $currentExpireDate = $user['expire_date'] == NULL || trim($user['expire_date']) == '' ? date('Y-m-d 00:00:00') : $user['expire_date'];
|
---|
| 161 |
|
---|
| 162 | $user['expire_date'] = date('Y-m-d', strtotime("+" . $package['p_period'] . " " . $package['p_unit'], strtotime($currentExpireDate)));
|
---|
| 163 | //$user['expire_date'] = date("Y-m-d", (strtotime($user['expire_date']) - 1));
|
---|
| 164 |
|
---|
| 165 | $user['p_id'] = $package['p_id'];
|
---|
| 166 |
|
---|
| 167 | $this->user_model->updateUser($us_id, $user);
|
---|
[636] | 168 | $aryPatterns = array('/:period:/');
|
---|
| 169 | $message = preg_replace($aryPatterns, array(date('d-m-Y', strtotime($user['expire_date']))), lang('_SBG_REGISTER_VIP_SUCCESS_MS'));
|
---|
[646] | 170 | $this->user_model->insertRegisterVipLog($user['cellphone'], $package['p_code'], false);
|
---|
[554] | 171 | }
|
---|
| 172 |
|
---|
| 173 | $this->session->set_flashdata('message', $message);
|
---|
| 174 | redirect('frontend/user/profile#services-register');
|
---|
[521] | 175 | }
|
---|
[503] | 176 |
|
---|
| 177 | private function get_data($src, $token, $us_id) {
|
---|
| 178 | $this->load->model('user_model');
|
---|
| 179 | $user = $this->user_model->get_user_info($src, $token, $us_id);
|
---|
| 180 |
|
---|
| 181 | if (strpos($user, '&')) {
|
---|
| 182 | parse_str($user);
|
---|
| 183 | $us = $this->user_model->get_user_by_id($us_id);
|
---|
| 184 | $data = array('us_id' => $us_id, 'username' => $username, 'fullname' => $fullname,
|
---|
| 185 | 'gender' => $gender, 'email' => $email, 'phone' => $phone, 'school' => $school, 'province' => $province,
|
---|
| 186 | 'acc_balanced' => $us['acc_balanced'], 'expire_date' => $us['expire_date'], 'date_diff' => $this->dateDiff($us['expire_date'])
|
---|
| 187 | );
|
---|
| 188 | return $data;
|
---|
| 189 | } else {
|
---|
| 190 | return "";
|
---|
| 191 | }
|
---|
| 192 | }
|
---|
| 193 |
|
---|
| 194 | private function dateDiff($expire_date) {
|
---|
| 195 | $date1 = date("Y-m-d");
|
---|
| 196 | if ((strtotime($expire_date) - strtotime($date1)) < 0)
|
---|
| 197 | return "0 ngà y còn lại";
|
---|
| 198 | $diff = strtotime($expire_date) - strtotime($date1);
|
---|
| 199 | $years = floor($diff / (365 * 60 * 60 * 24));
|
---|
| 200 | $months = floor(($diff - $years * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24));
|
---|
| 201 | $days = floor(($diff - $years * 365 * 60 * 60 * 24 - $months * 30 * 60 * 60 * 24) / (60 * 60 * 24));
|
---|
| 202 | if ($years > 0) {
|
---|
| 203 | return $years . " nÄm, " . $months . " tháng, " . $days . " ngà y còn lại";
|
---|
| 204 | } else {
|
---|
| 205 | if ($months > 0) {
|
---|
| 206 | return $months . " tháng, " . $days . " ngà y còn lại";
|
---|
| 207 | } else {
|
---|
| 208 | return $days . " ngà y còn lại";
|
---|
| 209 | }
|
---|
| 210 | }
|
---|
| 211 | }
|
---|
[604] | 212 |
|
---|
| 213 | public function update_info() {
|
---|
[636] | 214 | $result['success'] = 0;
|
---|
[580] | 215 | $user_info = $this->session->userdata('userInfo');
|
---|
| 216 | if ($user_info) {
|
---|
| 217 | $us_id = $user_info['us_id'];
|
---|
| 218 | $result = array();
|
---|
| 219 | $result['success'] = 0;
|
---|
| 220 | $src = "SBG";
|
---|
| 221 | $token = md5($us_id . self::TOKENPW);
|
---|
| 222 | $user = $this->get_data($src, $token, $us_id);
|
---|
| 223 | $input = $this->input->post();
|
---|
| 224 | parse_str($user_info['user'], $info);
|
---|
| 225 | if ($input) {
|
---|
| 226 | if (strlen($input['fullname']) == 0) {
|
---|
[636] | 227 | $result['errors'][] = array("content"=>lang('_SBG_FULLNAME_REQUIRED_MSG'),"field"=>"fullname");
|
---|
[580] | 228 | }
|
---|
| 229 | if (strlen($input['school']) == 0) {
|
---|
[636] | 230 | $result['errors'][] = array("content"=>lang('_SBG_REGISTER_VIP_SCHOOL_REQUIRED_MSG'),"field"=>"school");
|
---|
[580] | 231 | }
|
---|
[508] | 232 |
|
---|
[580] | 233 | $input['password'] = '';
|
---|
| 234 | $input['oldpass'] = '';
|
---|
| 235 | $input['province'] = '';
|
---|
| 236 | $this->load->model('user_model');
|
---|
| 237 | if (!isset($result['errors'])) {
|
---|
| 238 | $result['data'] = $this->user_model->update_user($src, $token, $input, $us_id);
|
---|
| 239 | $result['success'] = 1;
|
---|
[636] | 240 | $info['fullname'] = $input['fullname'];
|
---|
| 241 | $info['school'] = $input['school'];
|
---|
[580] | 242 | $info = urldecode(http_build_query($info));
|
---|
| 243 | $userdata = array('username' => $user_info['username'], 'user' => $info, 'us_id' => $user_info['us_id'], 'logined_in' => TRUE, 'is_viettel' => $user_info['is_viettel']);
|
---|
| 244 | $this->session->set_userdata('userInfo', $userdata);
|
---|
| 245 | }
|
---|
| 246 | echo json_encode($result);
|
---|
| 247 | }
|
---|
| 248 | } else {
|
---|
| 249 | redirect('frontend/home');
|
---|
| 250 | }
|
---|
| 251 | }
|
---|
[604] | 252 |
|
---|
[503] | 253 | public function update_user() {
|
---|
| 254 | $us_id = $this->uri->segment(4);
|
---|
| 255 | $user_info = $this->session->userdata('userInfo');
|
---|
| 256 | if ($user_info) {
|
---|
| 257 | $result = array();
|
---|
| 258 | $result['success'] = 0;
|
---|
| 259 | $src = "SBG";
|
---|
| 260 | $token = md5($us_id . self::TOKENPW);
|
---|
| 261 | $user = $this->get_data($src, $token, $us_id);
|
---|
| 262 | $input = $this->input->post();
|
---|
| 263 | if ($input) {
|
---|
| 264 | $input['username'] = $user['username'];
|
---|
[508] | 265 | if (array_key_exists('fullname', $input)) {
|
---|
| 266 | if (strlen($input['fullname']) == 0) {
|
---|
[636] | 267 | $result['errors']['fullname_err'] = lang('_SBG_FULLNAME_REQUIRED_MSG');
|
---|
[508] | 268 | }
|
---|
| 269 | } else {
|
---|
| 270 | $input['fullname'] = $user['fullname'];
|
---|
| 271 | }
|
---|
[604] | 272 |
|
---|
[503] | 273 | $input['password'] = '';
|
---|
| 274 | $input['oldpass'] = '';
|
---|
| 275 | $this->load->model('user_model');
|
---|
| 276 | if (!isset($result['errors'])) {
|
---|
| 277 | $result['data'] = $this->user_model->update_user($src, $token, $input, $us_id);
|
---|
| 278 | $result['success'] = 1;
|
---|
| 279 | }
|
---|
[490] | 280 | echo json_encode($result);
|
---|
[503] | 281 | }
|
---|
| 282 | } else {
|
---|
| 283 | redirect('frontend/home');
|
---|
[490] | 284 | }
|
---|
[508] | 285 | }
|
---|
| 286 |
|
---|
| 287 | public function change_password() {
|
---|
| 288 | $us_id = $this->uri->segment(4);
|
---|
| 289 | $user_info = $this->session->userdata('userInfo');
|
---|
| 290 | if ($user_info) {
|
---|
| 291 | $this->load->model('user_model');
|
---|
| 292 | $us_id = $user_info['us_id'];
|
---|
| 293 | $src = "SBG";
|
---|
| 294 | $token = md5($us_id . self::TOKENPW);
|
---|
| 295 | $input = $this->input->post();
|
---|
[554] | 296 |
|
---|
[508] | 297 | if (strlen($input['passwd']) == 0) {
|
---|
[636] | 298 | $result['errors']['passwd_old_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG');
|
---|
[508] | 299 | }
|
---|
[602] | 300 |
|
---|
[508] | 301 | if (strlen($input['passwd_new']) == 0) {
|
---|
[636] | 302 | $result['errors']['passwd_new_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG');
|
---|
[614] | 303 | } else if (strcmp($input['passwd'], $input['passwd_new']) == 0) {
|
---|
[636] | 304 | $result['errors']['passwd_new_err'] = lang('_SBG_PASSWORD_DUPLICATE_MSG');
|
---|
[602] | 305 | }else
|
---|
| 306 | {
|
---|
| 307 | if (!preg_match('/^([0-9a-zA-Z]{6,65})*$/', $input['passwd_new']))
|
---|
| 308 | {
|
---|
[636] | 309 | $result['errors']['passwd_new_err'] = lang('_SBG_USER_PASSWORD_CHANGE_REQUIRED_MSG');
|
---|
[602] | 310 | }
|
---|
| 311 | }
|
---|
| 312 |
|
---|
[554] | 313 | if ($input['passwd_new'] != $input['confirm_passwd_new']) {
|
---|
[636] | 314 | $result['errors']['confirm_passwd_new_err'] = lang('_SBG_PASSWORD_CONFIRM_MSG');
|
---|
[508] | 315 | }
|
---|
[554] | 316 |
|
---|
[508] | 317 | if (!isset($result['errors'])) {
|
---|
| 318 | $user = array('username' => $user_info['username'], 'fullname' => null, 'gender' => null, 'email' => null, 'school' => null, 'province' => null, 'password' => $input['passwd_new'], 'oldpass' => $input['passwd']);
|
---|
| 319 | $data = $this->user_model->update_user($src, $token, $user, $us_id);
|
---|
| 320 | parse_str($data);
|
---|
| 321 | switch ($status) {
|
---|
| 322 | case 0:
|
---|
| 323 | $result['success'] = 1;
|
---|
| 324 | break;
|
---|
| 325 | case 6:
|
---|
[636] | 326 | $result['errors']['passwd_old_err'] = lang('_SBG_OLD_PASSWORD_FAIL_MSG');
|
---|
[508] | 327 | break;
|
---|
| 328 | default:
|
---|
| 329 | break;
|
---|
| 330 | }
|
---|
| 331 | }
|
---|
| 332 |
|
---|
| 333 | echo json_encode($result);
|
---|
| 334 | } else {
|
---|
| 335 | redirect('frontend/home');
|
---|
| 336 | }
|
---|
| 337 | }
|
---|
[574] | 338 |
|
---|
| 339 | public function trade_history()
|
---|
| 340 | {
|
---|
| 341 | $this->load->helper('pagging');
|
---|
| 342 | $us_id = $this->uri->segment(4);
|
---|
| 343 | $user_info = $this->session->userdata('userInfo');
|
---|
| 344 | if ($user_info)
|
---|
| 345 | {
|
---|
| 346 |
|
---|
| 347 | $data['us_id'] = $us_id;
|
---|
| 348 | $data['perpage'] = 10;
|
---|
| 349 | $data['current_page'] = $this->uri->segment(6, 1);
|
---|
| 350 | $data['start'] = ($data['current_page'] - 1) * $data['perpage'];
|
---|
| 351 | $this->load->model('user_model');
|
---|
| 352 | $result = $this->user_model->getPaidlog($data);
|
---|
| 353 | $data['total'] = $this->user_model->countPaiglogs($us_id);
|
---|
| 354 | $data['num_links'] = 2;
|
---|
| 355 | $data['paging_url'] = base_url() . "frontend/user/trade_history/".$us_id."/page/";
|
---|
| 356 | $data['paging'] = pagging($data);
|
---|
| 357 | $paidlogs = array();
|
---|
| 358 | foreach ($result as $paidlog):
|
---|
| 359 | $paidlog['amount'] = number_format($paidlog['amount'], 0);
|
---|
| 360 | $paidlog['paid_time'] = date('d-m-Y H:i:s', strtotime($paidlog['paid_time']));
|
---|
| 361 | array_push($paidlogs, $paidlog);
|
---|
| 362 | endforeach;
|
---|
| 363 | $data['paidlogs'] = $paidlogs;
|
---|
| 364 | echo json_encode($data);
|
---|
| 365 | }else {
|
---|
| 366 | redirect('frontend/home');
|
---|
| 367 | }
|
---|
| 368 | }
|
---|
[642] | 369 |
|
---|
| 370 | public function regis_history()
|
---|
| 371 | {
|
---|
| 372 | $this->load->helper('pagging');
|
---|
| 373 | $us_id = $this->uri->segment(4);
|
---|
| 374 | $this->load->model('user_model');
|
---|
| 375 | $user = $this->user_model->get_user_by_id($us_id);
|
---|
| 376 | $username = $user['cellphone'];
|
---|
| 377 | $user_info = $this->session->userdata('userInfo');
|
---|
| 378 | if ($user_info)
|
---|
| 379 | {
|
---|
| 380 | $data['username'] = $username;
|
---|
| 381 | $data['perpage'] = 10;
|
---|
| 382 | $data['current_page'] = $this->uri->segment(6, 1);
|
---|
| 383 | $data['start'] = ($data['current_page'] - 1) * $data['perpage'];
|
---|
| 384 | $this->load->model('user_model');
|
---|
| 385 | $result = $this->user_model->getPackagelog($data);
|
---|
| 386 | $data['total'] = $this->user_model->countPackagelogs($username);
|
---|
| 387 | $data['num_links'] = 2;
|
---|
| 388 | $data['paging_url'] = base_url() . "frontend/user/regis_history/".$us_id."/page/";
|
---|
| 389 | $data['paging'] = pagging($data);
|
---|
| 390 | $packagelogs = array();
|
---|
| 391 | foreach ($result as $packagelog):
|
---|
[643] | 392 | $packagelog['created_time'] = date('d/m/Y H:i:s', strtotime($packagelog['created_time']));
|
---|
[642] | 393 | array_push($packagelogs, $packagelog);
|
---|
| 394 | endforeach;
|
---|
| 395 | $data['packagelogs'] = $packagelogs;
|
---|
| 396 | echo json_encode($data);
|
---|
| 397 | }else
|
---|
| 398 | {
|
---|
| 399 | redirect('frontend/home');
|
---|
| 400 | }
|
---|
| 401 |
|
---|
| 402 | }
|
---|
[508] | 403 |
|
---|
[554] | 404 | }
|
---|