Changeset 636
- Timestamp:
- Dec 3, 2014 2:59:16 PM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php
r590 r636 7 7 parent::__construct(); 8 8 $this->load->helper('cookie'); 9 $this->load->helper('language'); 10 $this->lang->load('messages', 'message'); 9 11 } 10 12 … … 79 81 if (strlen($input['full_name'])==0) 80 82 { 81 $result['errors']['full_name_err'] ="Tên Admin khÃŽng ÄÆ°á»£c Äá» trá»ng";83 $result['errors']['full_name_err'] = lang('_SBG_FULLNAME_REQUIRED_MSG'); 82 84 } 83 85 if (strlen($input['login_name'])==0) 84 86 { 85 $result['errors']['login_name_err'] ="Tên ÄÄng nháºp khÃŽng ÄÆ°á»£c Äá» trá»ng";87 $result['errors']['login_name_err'] = lang('_SBG_LOGIN_NAME_REQUIRED_MSG'); 86 88 } 87 89 else … … 89 91 if ($this->admin_model->check_exist(array('field'=>'login_name','value'=>$input['login_name']))) 90 92 { 91 $result['errors']['login_name_err'] ="Tên ÄÄng nháºp Äã ÄÆ°á»£c sá» dụng";93 $result['errors']['login_name_err'] = lang('_SBG_LOGIN_NAME_DUPLICATE_MSG'); 92 94 } 93 95 } 94 96 if (strlen($input['phone'])==0) 95 97 { 96 $result['errors']['phone_err'] ="Sá» Äiá»n thoại khÃŽng ÄÆ°á»£c Äá» trá»ng";98 $result['errors']['phone_err'] = lang('_SBG_PHONE_REQUIRED_MSG'); 97 99 } 98 100 else 99 101 { 100 if(!preg_match('/ [0-9]/', $input['phone'])){101 $result['errors']['phone_err'] ="Phone khÃŽng Äúng Äá»nh dạng";102 if(!preg_match('/^([0-9]{10,11}$)$/', $input['phone'])){ 103 $result['errors']['phone_err'] = lang('_SBG_PHONE_FORMAT_ERROR_MSG'); 102 104 }else if ($this->admin_model->check_exist(array('field'=>'phone','value'=>$input['phone']))) 103 105 { 104 $result['errors']['phone_err'] ="Sá» Äiá»n thoại Äã ÄÆ°á»£c sá» dụng";106 $result['errors']['phone_err'] = lang('_SBG_PHONE_DUPLICATE_MSG'); 105 107 } 106 108 … … 108 110 if (strlen($input['passwd'])==0) 109 111 { 110 $result['errors']['pwd1_err'] ="Máºt khẩu khÃŽng ÄÆ°á»£c Äá» trá»ng";112 $result['errors']['pwd1_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG'); 111 113 } 112 114 if ($input['passwd'] != $input['pwd2']) 113 115 { 114 $result['errors']['pwd2_err'] ="Máºt khẩu khÃŽng trùng nhau";116 $result['errors']['pwd2_err'] = lang('_SBG_PASSWORD_CONFIRM_MSG'); 115 117 } 116 118 if(strlen($input['email'])==0) 117 119 { 118 $result['errors']['email_err'] ="Email khÃŽng ÄÆ°á»£c Äá» trá»ng";120 $result['errors']['email_err'] = lang('_SBG_EMAIL_REQUIRED_MSG'); 119 121 }else{ 120 122 if(!valid_email($input['email'])) 121 123 { 122 $result['errors']['email_err'] ="Email khÃŽng Äúng Äá»nh dạng";124 $result['errors']['email_err'] = lang('_SBG_EMAIL_FORMAT_ERROR_MSG'); 123 125 } 124 126 } … … 237 239 if(!valid_email($input['email'])) 238 240 { 239 $result['errors']['email_err'] ="Email khÃŽng Äúng Äá»nh dạng";241 $result['errors']['email_err'] = lang('_SBG_EMAIL_FORMAT_ERROR_MSG'); 240 242 } 241 243 } … … 243 245 if (!preg_match('/[0-9]/', $input['phone'])) 244 246 { 245 $result['errors']['phone_err'] ="Phone khÃŽng Äúng Äá»nh dạng";247 $result['errors']['phone_err'] = lang('_SBG_PHONE_FORMAT_ERROR_MSG'); 246 248 } 247 249 } … … 272 274 if (strlen($input['passwd']) == 0) 273 275 { 274 $result['errors']['passwd_old_err'] = "Máºt khẩu khÃŽng ÄÆ°á»£c Äá» trá»ng !";276 $result['errors']['passwd_old_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG'); 275 277 }else 276 278 { … … 278 280 if (!$check_pass) 279 281 { 280 $result['errors']['passwd_old_err'] = "Máºt khẩu cung cấp khÃŽng Äúng !";282 $result['errors']['passwd_old_err'] = lang('_SBG_OLD_PASSWORD_FAIL_MSG'); 281 283 } 282 284 } 283 285 if (strlen($input['passwd_new']) == 0) 284 286 { 285 $result['errors']['passwd_new_err'] = "Máºt khẩu khÃŽng ÄÆ°á»£c Äá» trá»ng !";286 }else if( $input['passwd'] == $input['passwd_new'])287 { 288 $result['errors']['passwd_new_err'] = "Máºt khẩu trùng vá»i máºt khẩu hiá»n tại !";287 $result['errors']['passwd_new_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG'); 288 }else if(strcmp($input['passwd'], $input['passwd_new']) == 0) 289 { 290 $result['errors']['passwd_new_err'] = lang('_SBG_PASSWORD_DUPLICATE_MSG'); 289 291 } 290 292 if ($input['passwd_new'] != $input['confirm_passwd_new']) 291 293 { 292 $result['errors']['confirm_passwd_new_err'] = "Máºt khẩu khÃŽng trùng nhau !";294 $result['errors']['confirm_passwd_new_err'] = lang('_SBG_PASSWORD_CONFIRM_MSG'); 293 295 } 294 296 if (!isset($result['errors'])) -
pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php
r624 r636 9 9 parent::__construct(); 10 10 $this->load->helper('cookie'); 11 $this->load->helper('language'); 12 $this->lang->load('messages', 'message'); 11 13 } 12 14 -
pro-violet-viettel/sourcecode/application/modules/admin/views/login.php
r423 r636 1 <?php $base_url = base_url(); ?>1 <?php $base_url = base_url(); ?> 2 2 <!DOCTYPE html> 3 3 <html lang="en"> … … 59 59 <?php 60 60 if($this->session->flashdata('login_error')){ 61 echo 'Sai username hoặc password!'; 61 //echo 'Sai username hoặc password!'; 62 echo lang('_SBG_ADMIN_LOGIN_FAIL_MSG'); 62 63 } 63 64 ?> … … 140 141 jQuery('#'+id).addClass('visible'); 141 142 } 142 $('# validation-form').validate({143 $('#frmLogin').validate({ 143 144 errorElement: 'label', 144 145 errorClass: 'help-block', 145 146 focusInvalid: true, 146 147 rules: { 147 passw ord: {148 passwd: { 148 149 required: true, 149 150 }, 150 account: {151 login_name: { 151 152 required: true 152 153 } … … 154 155 155 156 messages: { 156 account: {157 login_name: { 157 158 required: "Chưa nháºp tà i khoản admin", 158 159 }, 159 passw ord: {160 passwd: { 160 161 required: "Vui lòng nháºp máºt khẩu.", 161 162 } -
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php
r633 r636 14 14 parent::__construct (); 15 15 $this->load->helper ( 'cookie' ); 16 $this->load->helper('language'); 17 $this->lang->load('messages', 'message'); 16 18 } 17 19 … … 88 90 public function register() { 89 91 $this->load->model ( 'user_model' ); 90 //$collaborator = '0979947802';92 $collaborator = '0979947802'; 91 93 $serviceID = 1; 92 $username = '097 9947802';94 $username = '0978618113'; 93 95 $commandcode = 'commandcode1'; 94 96 $info = 'ABCD'; 95 97 // $receiveTime = time(); 96 98 $receiveTime = date ( "Y-m-d H:i:s" ); 97 $data = $this->user_model->register ( $username, null);99 $data = $this->user_model->register ( $username, $collaborator ); 98 100 echo $data; 99 101 } … … 103 105 $sentNumber = '0979947802'; 104 106 $serviceID = 1; 105 $password = ' 123456';107 $password = '2933369'; 106 108 $commandcode = "SBG"; 107 109 $receiveID = '0977274183'; … … 144 146 $vipNum = 1; 145 147 $mainAccBalanced = 15000; 146 $amount = 1000 0;147 $info = "SBG NAP 0166286000010000";148 $amount = 1000; 149 $info = "SBG NAP 10000"; 148 150 $status = 0; 149 151 $receiveTime = date ( "Y-m-d H:i:s" ); 150 //$data = $this->user_model->rechargeAccount ( $sentNumber, $amount );151 $data = $this->user_model->insertPaidlog($sentNumber, $sentNumber, 2, $amount, $receiveTime);152 $data = $this->user_model->rechargeAccount ( $sentNumber, $amount ); 153 //$data = $this->user_model->insertPaidlog($sentNumber, $sentNumber, 2, $amount, $receiveTime); 152 154 echo $data; 153 155 } -
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r633 r636 11 11 parent::__construct(); 12 12 $this->load->helper('cookie'); 13 $this->load->helper('language'); 14 $this->lang->load('messages', 'message'); 13 15 } 14 16 … … 82 84 if (isset($input['fullname'])) { 83 85 if (strlen($input['fullname']) < 1) { 84 $result['errors'][] = "Vui lòng nháºp há» tên Äầy Äá»§ tiếng Viá»t";86 $result['errors'][] = lang('_SBG_REGISTER_VIP_FULLNAME_REQUIRED_MSG'); 85 87 } 86 88 if (strlen($input['school']) < 1) { 87 $result['errors'][] = "Vui lòng nháºp ÄÆ¡n vá» cÃŽng tác";89 $result['errors'][] = lang('_SBG_REGISTER_VIP_SCHOOL_REQUIRED_MSG'); 88 90 } 89 91 if (!isset($result['errors'])) { … … 148 150 149 151 if ($user['acc_balanced'] < $package['p_price']) { 150 $message = 'Sá» tiá»n trong Tà i khoản SBG Online hiá»n tại cá»§a QuÜ vá» là ' . $user['acc_balanced'] . ' Äá»ng.<br /> Äá» ÄÄng kà Sá» dụng dá»ch vụ Soạn Bà i giảng trá»±c tuyến, QuÜ vá» cần nạp thêm tiá»n và o tà i khoản.'; 152 $aryPatterns = array('/:acc_balanced:/'); 153 $message = preg_replace($aryPatterns, array(number_format($user['acc_balanced'], 0)), lang('_SBG_ACC_BALANCE_LESS_PACKAGE_PRICE_MSG')); 151 154 } else { 152 155 $user['acc_balanced'] = $user['acc_balanced'] - $package['p_price']; … … 159 162 160 163 $this->user_model->updateUser($us_id, $user); 164 $aryPatterns = array('/:period:/'); 165 $message = preg_replace($aryPatterns, array(date('d-m-Y', strtotime($user['expire_date']))), lang('_SBG_REGISTER_VIP_SUCCESS_MS')); 161 166 $source = 'web'; 162 167 $this->user_model->insertRegisterVipLog($source, $package['p_code']); 163 $message = 'QuÜ vá» Äã ÄÄng kà sá» dụng CÃŽng cụ Soạn Bà i giảng trức tuyến. QuÜ vá» ÄÆ°á»£c sá» dụng dá»ch vụ Äến hết ngà y ' . date('d-m-Y', strtotime($user['expire_date'])); 168 169 164 170 } 165 171 … … 205 211 206 212 public function update_info() { 207 $result['success'] =0;213 $result['success'] = 0; 208 214 $user_info = $this->session->userdata('userInfo'); 209 215 if ($user_info) { … … 218 224 if ($input) { 219 225 if (strlen($input['fullname']) == 0) { 220 $result['errors'][] = array("content"=> "Há» tên khÃŽng ÄÆ°á»£c Äá» trá»ng!","field"=>"fullname");226 $result['errors'][] = array("content"=>lang('_SBG_FULLNAME_REQUIRED_MSG'),"field"=>"fullname"); 221 227 } 222 228 if (strlen($input['school']) == 0) { 223 $result['errors'][] = array("content"=> "Tên ÄÆ¡n vá» khÃŽng ÄÆ°á»£c Äá» trá»ng!","field"=>"school");229 $result['errors'][] = array("content"=>lang('_SBG_REGISTER_VIP_SCHOOL_REQUIRED_MSG'),"field"=>"school"); 224 230 } 225 231 … … 231 237 $result['data'] = $this->user_model->update_user($src, $token, $input, $us_id); 232 238 $result['success'] = 1; 233 $info['fullname'] =$input['fullname'];234 $info['school'] =$input['school'];239 $info['fullname'] = $input['fullname']; 240 $info['school'] = $input['school']; 235 241 $info = urldecode(http_build_query($info)); 236 242 $userdata = array('username' => $user_info['username'], 'user' => $info, 'us_id' => $user_info['us_id'], 'logined_in' => TRUE, 'is_viettel' => $user_info['is_viettel']); … … 258 264 if (array_key_exists('fullname', $input)) { 259 265 if (strlen($input['fullname']) == 0) { 260 $result['errors']['fullname_err'] = "Há» tên khÃŽng ÄÆ°á»£c Äá» trá»ng!";266 $result['errors']['fullname_err'] = lang('_SBG_FULLNAME_REQUIRED_MSG'); 261 267 } 262 268 } else { … … 289 295 290 296 if (strlen($input['passwd']) == 0) { 291 $result['errors']['passwd_old_err'] = "Máºt khẩu khÃŽng ÄÆ°á»£c Äá» trá»ng!";297 $result['errors']['passwd_old_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG'); 292 298 } 293 299 294 300 if (strlen($input['passwd_new']) == 0) { 295 $result['errors']['passwd_new_err'] = "Máºt khẩu khÃŽng ÄÆ°á»£c Äá» trá»ng!";301 $result['errors']['passwd_new_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG'); 296 302 } else if (strcmp($input['passwd'], $input['passwd_new']) == 0) { 297 $result['errors']['passwd_new_err'] = "Máºt khẩu trùng vá»i máºt khẩu hiá»n tại!";303 $result['errors']['passwd_new_err'] = lang('_SBG_PASSWORD_DUPLICATE_MSG'); 298 304 }else 299 305 { 300 306 if (!preg_match('/^([0-9a-zA-Z]{6,65})*$/', $input['passwd_new'])) 301 307 { 302 $result['errors']['passwd_new_err'] = "Máºt khẩu Ãt nhất là 6 kà tá»±, và chá» chứa các kà tá»± sá» hoặc chữ, <br> khÃŽng chứa khoảng trắng và khÃŽng chứa kÜ tá»± Äặc biá»t!";308 $result['errors']['passwd_new_err'] = lang('_SBG_USER_PASSWORD_CHANGE_REQUIRED_MSG'); 303 309 } 304 310 } 305 311 306 312 if ($input['passwd_new'] != $input['confirm_passwd_new']) { 307 $result['errors']['confirm_passwd_new_err'] = "Máºt khẩu khÃŽng trùng nhau!";313 $result['errors']['confirm_passwd_new_err'] = lang('_SBG_PASSWORD_CONFIRM_MSG'); 308 314 } 309 315 … … 317 323 break; 318 324 case 6: 319 $result['errors']['passwd_old_err'] = "Máºt khẩu cung cấp khÃŽng Äúng!";325 $result['errors']['passwd_old_err'] = lang('_SBG_OLD_PASSWORD_FAIL_MSG'); 320 326 break; 321 327 default: -
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r633 r636 14 14 $this->vservices->setApiUrl ( $this->config->item ( 'api_url' ) ); 15 15 $this->vservices->setConnection ( $this->curl ); 16 $this->load->helper('language'); 17 $this->lang->load('messages', 'message'); 16 18 } 17 19 … … 54 56 if (! is_null ( $collaborator ) || $collaborator != '') { 55 57 if (! $this->isExistcollaborator ( $collaborator )) { 56 $sms = "Khong tim thay cong tac vien nao co so dien thoai [" . $collaborator . "] tren SBG Online."; 58 $aryPatterns = array('/:collaborator:/'); 59 $sms = preg_replace($aryPatterns, array($collaborator), lang('_SBG_MO_COLLABORATOR_NOT_FOUND_MSG')); 57 60 $collaboratorMsg = $status . '|'.$sms; 58 61 return $status . '|' . $sms; … … 71 74 if(!($data) || is_null($data)) 72 75 { 73 $sms = "Tam thoi ban khong the dang ky duoc. Xin thu lai sau. Cam on!";76 $sms = lang('_SBG_MO_REGISTER_DISCONTINUE_MSG'); 74 77 $collaboratorMsg = $status . '|'.$sms; 75 78 return $status . '|' . $sms; … … 89 92 $this->db->query ( 'UNLOCK TABLES' ); 90 93 $this->db->insert ( 'tbluser', $user ); 91 $sms = "Chuc mung ban da dang ky thanh cong tai khoan SBG Online. Hay dang nhap vao soanbaigiang.smas.vn voi ten truy nhap " . $username . ", mat khau " . $password . " de su dung. Tran trong."; 94 $aryPatterns = array ('/:username:/', '/:password:/'); 95 $sms = preg_replace($aryPatterns, array($collaborator), lang('_SBG_MO_USER_REGISTER_SUCCESS_MSG')); 92 96 $status = 1; 93 $collaboratorMsg = $status . '|'. 'Ban da dang ky thanh cong dich vu SBG Online cho so dien thoai '.$username; 97 $aryPatterns = array('/:username:/'); 98 $collaboratorMsg = $status . '|'. preg_replace($aryPatterns, array($username), lang('_SBG_MO_COLLABOLATOR_REGISTER_SUCCESS_MSG')); 94 99 break; 95 100 case 2 : 96 101 case 4 : 97 $sms = "So dien thoai cua ban da duoc dang ky tai khoan tren SBG Online, vui long kiem tra lai. Tran trong.";102 $sms = lang('_SBG_MO_USER_REGISTER_DUPLICATE_MSG'); 98 103 $status = 0; 99 $collaboratorMsg = $status . '|'. 'So dien thoai '.$username.' da duoc dang ky tai khoan tren SBG Online.'; 104 $aryPatterns = array('/:username:/'); 105 $collaboratorMsg = $status . '|'. preg_replace($aryPatterns, array($username), lang('_SBG_MO_COLLABOLATOR_REGISTER_DUPLICATE_MSG')); 100 106 break; 101 107 default : … … 162 168 163 169 if ($checkSentNumber) { 164 $sms = "So dien thoai " . $sentNumber . " da dang ky tai khoan tren he thong SBG Online. Tran trong."; 170 $aryPatterns = array('/:sentNumber:/'); 171 $sms = preg_replace($aryPatterns, array($sentNumber), lang('_SBG_MO_USER_PHONENUM_CHANGE_DUPLICATE_MSG')); 165 172 $status = 0; 166 173 return $status . '|' . $sms; … … 174 181 $token = md5 ( $us_id . self::TOKENPW ); 175 182 $isCorrectPassword = $this->checkPassword($src, $us_id, $token, $password); 176 if(!$isCorrectPassword) return '0| Mat khau cua ban khong dung. Vui long kiem tra lai.';183 if(!$isCorrectPassword) return '0|'.lang('_SBG_MO_USER_PHONENUM_CHANGE_INCORRECT_PASSWORD_MSG'); 177 184 178 185 $data = $this->vservices->actionExecute ( 'update', array ( … … 188 195 if(!($data) || is_null($data)) 189 196 { 190 $sms = "Tam thoi ban khong the thay doi duoc so dien thoai. Xin thu lai sau. Cam on!";197 $sms = lang('_SBG_MO_PHONENUM_CHANGE_DISCONTINUE_MSG'); 191 198 $status = 0; 192 199 return $status . '|' . $sms; … … 200 207 $user ['cellphone'] = $sentNumber; 201 208 $this->updateUser ( $us_id, $user ); 202 $sms = "Ban da doi thanh cong tai khoan " .$username. " tren SBG Online sang so dien thoai " . $sentNumber. ". Tran trong."; 209 $aryPatterns = array('/:username:/', '/:sentNumber:/'); 210 $sms = preg_replace($aryPatterns, array($username, $sentNumber), lang('_SBG_MO_USER_NEW_PHONENUM_CHANGE_SUCCESS_MSG')); 203 211 $status = 1; 204 212 break; 205 213 case 2: 206 $sms = "So dien thoai " . $sentNumber . " da dang ky tai khoan tren he thong SBG Online. Tran trong"; 214 $aryPatterns = array('/:sentNumber:/'); 215 $sms = preg_replace($aryPatterns, array($sentNumber), lang('_SBG_MO_USER_PHONENUM_CHANGE_DUPLICATE_MSG')); 207 216 $status = 0; 208 217 break; 209 218 case 5 : 210 $sms = "So dien thoai ".$username." chua dang ky tai khoan tren he thong SBG Online. Tran trong."; 219 $aryPatterns = array('/:username:/'); 220 $sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_USER_PHONENUM_NOT_REGISTER_MSG')); 211 221 $status = 0; 212 222 break; … … 217 227 } 218 228 } else { 219 $sms = "So dien thoai ".$username." chua dang ky tai khoan tren he thong SBG Online. Tran trong."; 229 $aryPatterns = array('/:username:/'); 230 $sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_USER_PHONENUM_NOT_REGISTER_MSG')); 220 231 $status = 0; 221 232 } … … 250 261 if(!($data) || is_null($data)) 251 262 { 252 $sms = "Tam thoi ban khong the lay lai hoac thay doi mat khau. Xin thu lai sau. Cam on!";263 $sms = lang('_SBG_MO_PASSWORD_CHANGE_DISCONTINUE_MSG'); 253 264 $status = 0; 254 265 return $status . '|' . $sms; … … 261 272 $this->updateUser ( $us_id, $user ); 262 273 if ($isForgotPassword) { 263 $sms = "Mat khau moi cua ban tren SBG online la " . $pass. ". Tran trong."; 274 $aryPatterns = array('/:pass:/'); 275 $sms = preg_replace($aryPatterns, array($pass), lang('_SBG_MO_USER_PASSWORD_RECOVERY_MSG')); 264 276 } else { 265 $sms = "Ban da doi thanh cong mat khau tren SBG Online. Mat khau moi cua ban la " .$password. ". Tran trong."; 277 $aryPatterns = array('/:password:/'); 278 $sms = preg_replace($aryPatterns, array($pass), lang('_SBG_MO_USER_PASSWORD_CHANGE_SUCCESS_MSG')); 266 279 } 267 280 $status = 1; 268 281 break; 269 282 case 5 : 270 $sms = "So dien thoai ".$username." chua dang ky tai khoan tren he thong SBG Online"; 283 $aryPatterns = array('/:username:/'); 284 $sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_USER_PHONENUM_NOT_REGISTER_MSG')); 271 285 $status = 0; 272 286 break; … … 277 291 } 278 292 } else { 279 $sms = "So dien thoai ".$username." chua dang ky tai khoan tren he thong SBG Online"; 293 $aryPatterns = array('/:username:/'); 294 $sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_USER_PHONENUM_NOT_REGISTER_MSG')); 280 295 $status = 0; 281 296 } … … 307 322 if (!$package) 308 323 { 309 $sms = "Khong co goi dich vu ban da dang ki tren SBG Online";324 $sms = lang('_SBG_MO_USER_REGISTER_VIP_NOT_FOUND_MSG'); 310 325 $status = 0; 311 326 return $status . '|' . $sms; … … 326 341 327 342 $this->updateUser ( $us_id, $user ); 328 $sms = "Chuc mung ban da dang ky thanh cong dich vu SBG Online. Thoi han su dung dich vu cua ban la ".date ( 'd/m/Y', strtotime ( $user ['expire_date'] ) ).". Tran trong." ; 343 $aryPatterns = array('/:period:/'); 344 $sms = preg_replace($aryPatterns, array(date ( 'd/m/Y', strtotime ( $user ['expire_date'] ) )), lang('_SBG_MO_USER_REGISTER_VIP_SUCCESS_MSG')); 329 345 $status = 1; 330 346 } else { 331 $sms = "Tai khoan cua ban khong du de dang ky dich vu SBG Online. Vui long nap tien va dang ky lai. Tran trong.";347 $sms = lang('_SBG_MO_USER_REGISTER_VIP_FAIL_NOT_ENOUGH_MSG'); 332 348 $status = 0; 333 349 } 334 350 } else { 335 $sms = "So dien thoai " .$username. " chua dang ky tai khoan tren he thong SBG Online. De dang ky, soan tin SBG DK gui 8062 (500d)."; 351 $aryPatterns = array('/:username:/'); 352 $sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_ACCOUNT_NOT_FOUND_MSG')); 336 353 $status = 0; 337 354 } … … 348 365 $user ['updated_time'] = date ( 'Y-m-d H:i:s' ); 349 366 $this->updateUser ( $us_id, $user ); 350 $sms = "Ban da nap thanh cong " . $amount . "VND vao tai khoan " . $username . " tren SBG Online. Tran trong."; 367 $aryPatterns = array('/:amount:/', '/:username:/'); 368 $sms = preg_replace($aryPatterns, array($amount, $username), lang('_SBG_MO_PAY_TO_ACCOUNT_SUCCESS_MSG')); 351 369 $status = 1; 352 370 } else { 353 $sms = "So dien thoai " .$username. " chua dang ky tai khoan tren he thong SBG Online. De dang ky, soan tin SBG DK gui 8062 (500d)."; 371 $aryPatterns = array('/:username:/'); 372 $sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_ACCOUNT_NOT_FOUND_MSG')); 354 373 $status = 0; 355 374 } -
pro-violet-viettel/sourcecode/application/modules/frontend/views/home.php
r633 r636 1 <?php $base_url = base_url(); ?>1 <?php $base_url = base_url(); ?> 2 2 <!DOCTYPE html> 3 3 <html lang="en"> … … 132 132 <div class="modal-body"> 133 133 <div class="alert alert-block alert-success" style="text-align: justify;"> 134 135 <p> 136 Äá» ÄÄng kÜ tà i khoản tà i khoản trên há» thá»ng Soạn Bà i giảng trá»±c tuyến (SBG Online), QuÜ vá» hãy soạn tin nhắn theo cú pháp: 137 <strong> 138 SBG DK 139 </strong> 140 gá»i tá»i 141 <strong> 142 8062</strong> (500Ä/tin). 143 </p> 144 <p> 145 Sau khi nháºn ÄÆ°á»£c tin nhắn ÄÄng kà tà i khoản cá»§a QuÜ vá», há» thá»ng SBG Online sẜ gá»i lại thÃŽng tin ÄÄng nháºp và o Äiá»n thoại cá»§a QuÜ vá». 146 </p> 147 <p> 148 Nếu Äã nháºn ÄÆ°á»£c thÃŽng tin ÄÄng nháºp há» thá»ng SBG Online gá»i tá»i Äiá»n thoại cá»§a mình, QuÜ vá» hãy Äiá»n thÃŽng tin và nhấn và o <strong>ÄÄng nháºp</strong> Äá» ÄÄng nháºp và o há» thá»ng. 149 </p> 150 <p> 151 Nếu có vưá»ng mắc gì vá» viá»c ÄÄng kÃ, QuÜ vá» hãy gá»i sá» <strong>01662860000</strong> Äá» ÄÆ°á»£c há» trợ. 152 </p> 134 <?php echo lang('_SBG_USER_REGISTER_MSG'); ?> 153 135 </div> 154 136 </div> … … 166 148 <div class="modal-body"> 167 149 <div class="alert alert-block alert-success"> 168 <p> 169 Äá» lấy lại máºt khẩu cá»§a mình trên há» thá»ng SBG Online, QuÜ vá» hãy dùng <strong>sá» Äiá»n thoại Äã ÄÄng kà tà i khoản</strong> và soạn tin theo cú pháp: <strong>SBG MK</strong> gá»i tá»i <strong>8062 </strong>(500Ä/tin). 170 </p> 150 <?php echo lang('_SBG_USER_PASSWORD_RECOVERY_MSG'); ?> 171 151 </div> 172 152 </div> … … 225 205 messages: { 226 206 username: { 227 required: " Vui lòng nháºp tà i khoản hoặc sá» Äiá»n thoại",207 required: "<?php echo lang('_SBG_USER_LOGIN_NAME_REQUIRED_MSG'); ?>", 228 208 }, 229 209 password: { 230 required: " Vui lòng nháºp máºt khẩu.",210 required: "<?php echo lang('_SBG_USER_LOGIN_PASSWORD_REQUIRED_MSG'); ?>", 231 211 } 232 212 }, -
pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
r631 r636 204 204 205 205 <div class="col-sm-10"> 206 <input type="text" id=" form-field-pass1" name="pin_card" class="form-control">206 <input type="text" id="pin_card" name="pin_card" class="form-control"> 207 207 </div> 208 208 </div> … … 214 214 215 215 <div class="col-sm-10"> 216 <input type="text" id=" form-field-pass2" name="card_serial" class="form-control">216 <input type="text" id="card_serial" name="card_serial" class="form-control"> 217 217 </div> 218 218 </div> -
pro-violet-viettel/sourcecode/application/modules/services/controllers/recharge.php
r627 r636 9 9 $this->load->helper('lockfile'); 10 10 $this->load->model('services_model'); 11 $this->load->helper('language'); 12 $this->lang->load('messages', 'message'); 11 13 } 12 14 … … 33 35 $result['tmp'] = $maxReach; 34 36 35 $lockedMsg = 'QuÜ vá» Äã nháºp sai thÃŽng tin thẻ cà o '. $maxReach .' lần liên tiếp.<br />Xin chá» '. $timeToUnlock .' phút sau Äá» thao tác lại!'; 36 $chargErrMsg = 'Mã thẻ hoặc Serial khÃŽng Äúng hoặc Äã ÄÆ°á»£c sá» dụng. QuÜ vá» vui lòng kiá»m tra lại!'; 37 //$lockedMsg = 'QuÜ vá» Äã nháºp sai thÃŽng tin thẻ cà o '. $maxReach .' lần liên tiếp.<br />Xin chá» '. $timeToUnlock .' phút sau Äá» thao tác lại!'; 38 $aryPatterns = array('/:maxReach:/', '/:timeToUnlock:/'); 39 $lockedMsg = preg_replace($aryPatterns, array($maxReach, $timeToUnlock), lang('_SBG_CHARGING_FROM_CARD_LOCKED_MSG')); 40 //$chargErrMsg = 'Mã thẻ hoặc Serial khÃŽng Äúng hoặc Äã ÄÆ°á»£c sá» dụng. QuÜ vá» vui lòng kiá»m tra lại!'; 41 $chargErrMsg = lang('_SBG_CHARGING_FROM_CARD_FAIL_MSG'); 37 42 $errMsg = ''; 38 43 … … 59 64 60 65 if ($chargCard == _SBG_CARD_PAY_SUCCESS){ 61 $result['username'] = $user['cellphone'];66 //$result['username'] = $user['cellphone']; 62 67 $result['acc_balanced'] = $user['acc_balanced']; 63 $result['amount'] = $amount; 68 //$result['amount'] = $amount; 69 $aryPatterns = array('/:amount:/', '/:username:/', '/:acc_balanced:/'); 70 $result['message'] = preg_replace($aryPatterns, array($amount, $user['cellphone'], $user['acc_balanced']), lang('_SBG_CHARGING_FROM_CARD_SUCCESS_MSG')); 64 71 $this->objUserModel->insertPaidlog($user['cellphone'], $user['cellphone'], $paidType, $amount, $paidTime); 65 72 releaseLockFile($lockFilePreFix, $lockFilePath); -
pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php
r633 r636 43 43 if ( ! defined('_SBG_SERVICE_COMMAND_CODE')) define('_SBG_SERVICE_COMMAND_CODE', 'SBG'); 44 44 if ( ! defined('_SBG_SERVICE_SERVICEID')) define('_SBG_SERVICE_SERVICEID', '8062'); 45 46 if ( ! defined('_SBG_MO_PROCCESS_ERR')) define('_SBG_MO_PROCCESS_ERR', 0); 45 47 46 48 Class Services_model extends CI_Model … … 62 64 public function __construct(){ 63 65 parent::__construct(); 66 $this->load->helper('language'); 67 $this->lang->load('messages', 'message'); 64 68 } 65 69 … … 147 151 if ($case == _SBG_MO_REGISTER_FOR) { 148 152 if (!preg_match('/^([0-9]{10,11}$)$/', $aryContents[2])) { 149 $smsReturn = '0|So dien thoai khach hang khong hop le. Vui long kiem tra lai.';153 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_PHONENUM_WRONG_FORMAT_MSG'); 150 154 break; 151 155 } … … 169 173 case _SBG_MO_PHONENUM_CHANGE: 170 174 if (!preg_match('/^(09\d{8}|01\d{9})$/', $aryContents[2])) { 171 $smsReturn = '0|So dien thoai khach hang khong hop le. Vui long kiem tra lai.';175 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_PHONENUM_WRONG_FORMAT_MSG'); 172 176 break; 173 177 } … … 180 184 $changeResult = (int)$arySMS[0]; 181 185 182 $sms = 'Ban da doi thanh cong so dien thoai tren SBG Online sang so dien thoai ' .$sentNumber. '. Tran trong.'; 186 //$sms = 'Ban da doi thanh cong so dien thoai tren SBG Online sang so dien thoai ' .$sentNumber. '. Tran trong.'; 187 $aryPatterns = array('/:sentNumber:/'); 188 $sms = preg_replace($aryPatterns, array($sentNumber), lang('_SBG_MO_USER_OLD_PHONENUM_CHANGE_SUCCESS_MSG')); 183 189 $sendMT = $changeResult == 1 ? $this->sendMT($this->formatPhoneNumber($oldPhoneNumber, -1), $sms) : ''; 184 190 break; … … 199 205 200 206 if ($case == _SBG_MO_PAY_TO_ACCOUNT_FOR && !preg_match('/^(09\d{8}|01\d{9})$/', $userName)) { 201 $smsReturn = '0|So dien thoai khach hang khong hop le. Vui long kiem tra lai.';207 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_PHONENUM_WRONG_FORMAT_MSG'); 202 208 break; 203 209 } … … 205 211 $amount = $aryContents[2]; 206 212 if (!preg_match('/^[0-9]{3,}$/', $amount)) { 207 $smsReturn = '0|So tien nap khong hop le. Vui long kiem tra lai.';213 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_AMOUNT_WRONG_FORMAT_MSG'); 208 214 break; 209 215 } … … 215 221 if ($case == _SBG_MO_PAY_TO_ACCOUNT_FOR) { 216 222 $arySmsReturn = explode ('|', $smsReturn); 217 $smsMT = 'Ban da nap thanh cong ' .$amount . 'VND vao tai khoan ' .$username. ' tren SBG Online tu thue bao ' .$sentNumber. '. Tran trong.'; 223 //$smsMT = 'Ban da nap thanh cong ' .$amount . 'VND vao tai khoan ' .$username. ' tren SBG Online tu thue bao ' .$sentNumber. '. Tran trong.'; 224 $aryPatterns = array('/:amount:/', '/:username:/', '/:sentNumber:/'); 225 $smsMT = preg_replace($aryPatterns, array($amount, $username, $sentNumber), lang('_SBG_MO_PAY_TO_ACCOUNT_FOR_MSG')); 218 226 $sendMT = $this->sendMT($this->formatPhoneNumber($userName, -1), $smsMT); 219 227 } … … 226 234 //$smsReturn = preg_replace($aryPatterns, array($sentNumber, $amount, $userName), _SBG_CHARGING_FAIL_NOT_ENOUGH_MSG); 227 235 $aryPatterns = array ('/:amount:/', '/:username:/'); 228 $smsReturn = preg_replace($aryPatterns, array($amount, $userName), _SBG_CHARGING_FAIL_NOT_ENOUGH_MSG); 229 $smsReturn = '0|'.$smsReturn; 236 //$smsReturn = preg_replace($aryPatterns, array($amount, $userName), _SBG_CHARGING_FAIL_NOT_ENOUGH_MSG); 237 $smsReturn = preg_replace($aryPatterns, array($amount, $userName), lang('_SBG_MO_CHARGING_FAIL_NOT_ENOUGH_MSG')); 238 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.$smsReturn; 230 239 } 231 240 else if ($result == _SBG_CHARGING_FAIL_MORETHAN_LIMIT) { 232 241 $aryPatterns = array ('/:sendid:/'); 233 $smsReturn = preg_replace($aryPatterns, array($sentNumber), _SBG_CHARGING_FAIL_MORETHAN_LIMIT_MSG); 234 $smsReturn = '0|'.$smsReturn; 242 //$smsReturn = preg_replace($aryPatterns, array($sentNumber), _SBG_CHARGING_FAIL_MORETHAN_LIMIT_MSG); 243 $smsReturn = preg_replace($aryPatterns, array($sentNumber), lang('_SBG_MO_CHARGING_FAIL_MORETHAN_LIMIT_MSG')); 244 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.$smsReturn; 235 245 }else if ($result == _SBG_CHARGING_FAIL_NOT_VIETTEL || $result == _SBG_CHARGING_NUMBER_NOT_EXISTED || $result == _SBG_CHARGING_NUMBER_NOT_AVAILABLE) { 236 $smsReturn = '0|'._SBG_CHARGING_FAIL_NOT_VIETTEL_MSG;246 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_CHARGING_FAIL_NOT_VIETTEL_MSG'); 237 247 } 238 248 else { 239 $smsReturn = '0|Loi, khong thanh toan duoc tu tai khoan goc';249 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_CHARGING_FAIL_MSG'); 240 250 } 241 251 break; … … 243 253 case _SBG_MO_SYNTAX_ERR: 244 254 default: 245 $smsReturn = '0|'._SBG_MO_SYNTAX_ERR_MSG;255 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_SYNTAX_ERR_MSG'); 246 256 break; 247 257 } -
pro-violet-viettel/sourcecode/assets/js/frontend/user.js
r626 r636 153 153 { 154 154 $("#success_charge").find('#success_charge_info').text("QuÜ vá» Äã nạp thà nh cÃŽng " + result.amount + " VNÄ và o tà i khoản " + result.username + ", tà i khoản ảo cá»§a QuÜ vá» là " + result.acc_balanced + " VNÄ!"); 155 //$("#success_charge").find('#success_charge_info').text(result.message); 155 156 $("#success_charge").modal('show'); 156 157 $("#vip-regis-money").text(addCommas(result.acc_balanced));
Note: See TracChangeset
for help on using the changeset viewer.