Changeset 502
- Timestamp:
- Nov 14, 2014 4:19:21 PM (11 years ago)
- Location:
- pro-violet-viettel/sourcecode
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r491 r502 74 74 $data = array('us_id'=>$us_id, 'username'=>$username, 'fullname'=>$fullname, 75 75 'gender'=>$gender, 'email'=>$email, 'phone'=>$phone, 'school'=>$school, 'province'=>$province, 76 'acc_balanced'=>$us['acc_balanced'], 'expire_date'=> $us['expire_date'], 'date_diff'=>$this->dateDiff($us['expire_date'])76 'acc_balanced'=>$us['acc_balanced'], 'expire_date'=>date('d/m/Y', strtotime($us['expire_date'])), 'date_diff'=>$this->dateDiff($us['expire_date']), 'use_package'=>$us['use_package'] 77 77 ); 78 78 return $data; … … 109 109 public function update_user() 110 110 { 111 $this->load->helper('email');112 111 $us_id=$this->uri->segment(4); 113 112 $user_info = $this->session->userdata('userInfo'); … … 122 121 if ($input){ 123 122 $input['username'] = $user['username']; 124 $input['fullname'] = $user['fullname']; 123 if (array_key_exists('fullname', $input)) 124 { 125 if (strlen($input['fullname'])==0) 126 { 127 $result['errors']['fullname_err'] = "Há» tên khÃŽng ÄÆ°á»£c Äá» trá»ng !"; 128 } 129 }else 130 { 131 $input['fullname'] = $user['fullname']; 132 } 133 /* 134 if ($strlen($input['school']) == 0) 135 { 136 $result['errors']['school_err'] = "ÄÆ¡n vá» khÃŽng ÄÆ°á»£c Äá» trá»ng !"; 137 } 138 if ($strlen($input['province']) == 0) 139 { 140 $result['errors']['province_err'] = "Tá»nh/thà nh khÃŽng ÄÆ°á»£c Äá» trá»ng !"; 141 }*/ 125 142 $input['password'] = ''; 126 143 $input['oldpass'] = ''; 127 144 $this->load->model('user_model'); 128 $result['fullname'] = $input['fullname']; 129 if (strlen($input['email'])>0){ 130 if(!valid_email($input['email'])) 131 { 132 $result['errors']['email_err'] = "Email khÃŽng Äúng Äá»nh dạng"; 133 } 134 } 145 //$result['fullname'] = $input['fullname']; 135 146 if (!isset($result['errors'])){ 136 147 $result['data'] = $this->user_model->update_user($src, $token, $input, $us_id); … … 156 167 $src = "SBG"; 157 168 $token = md5($us_id.self::TOKENPW); 169 $input = $this->input->post(); 158 170 if (strlen($input['passwd']) == 0) 159 171 { … … 173 185 if (!isset($result['errors'])) 174 186 { 175 $user = array('username'=>$user name, 'fullname'=>null,);187 $user = array('username'=>$user_info['username'], 'fullname'=>null, 'gender'=>null, 'email'=>null, 'school'=>null, 'province'=>null, 'password'=>$input['passwd_new'], 'oldpass'=>$input['passwd']); 176 188 $data = $this->user_model->update_user($src, $token, $user, $us_id); 177 189 parse_str($data); -
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r499 r502 153 153 { 154 154 $data = $this->vservices->actionExecute('update', array('src'=>$src, 'token'=>$token, 'us_id'=>$us_id, 155 'password'=>$user['password'], 'fullname'=>$user['fullname'], 'gender'=>$user['gender'],156 ' email'=>$user['email'], 'school'=>$user['school'], 'province'=>$user['province'], 'oldpass'=>$user['oldpass']),155 'password'=>$user['password'], 'fullname'=>$user['fullname'], 156 'school'=>$user['school'], 'province'=>$user['province'], 'oldpass'=>$user['oldpass']), 157 157 'user'); 158 158 return $data; … … 166 166 $errMsg = ''; 167 167 $sms = ''; 168 $checkSentNumber = $this->get_user_by_cellphone($sentNumber); 169 if($checkSentNumber) 170 { 171 $sms = "So Dien thoai ".$sentNumber." da dang ky tren he thong SBG Online soanbaigiang.smas.vn nen Qui vi khong the doi sang so dien thoai nay duoc."; 172 $status = 0; 173 return $status.'|'.$sms; 174 } 168 175 $result = $this->get_user_by_cellphone($username); 169 176 if($result) -
pro-violet-viettel/sourcecode/application/modules/frontend/views/home.php
r489 r502 74 74 <label class="block clearfix has-error"> 75 75 <span class="block input-icon input-icon-right"> 76 <input type="text" class="form-control" name="username" placeholder=" Tà i khoản |Sá» Äiá»n thoại" />76 <input type="text" class="form-control" name="username" placeholder="Sá» Äiá»n thoại" /> 77 77 <i class="icon-user"></i> 78 78 </span> … … 129 129 </div> 130 130 <div class="modal-body"> 131 <div class="alert alert-block alert-success"> 132 <p> 133 Äá» ÄÄng kÜ tà i khoản tà i khoản SBGOnline 134 </p> 135 <strong> 136 <i class="icon-commnet"></i> 137 Soạn tin: SBG DK gá»i 8062 138 </strong> 139 </div> 131 <div class="alert alert-block alert-success" style="text-align: justify;"> 132 133 <p> 134 Äá» ÄÄ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: 135 <strong> 136 SBG DK 137 </strong> 138 gá»i tá»i 139 <strong> 140 8062</strong>. 141 </p> 142 <p> 143 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á». 144 </p> 145 <p> 146 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. 147 </p> 148 <p> 149 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ợ. 150 </p> 151 </div> 140 152 </div> 141 153 </div> … … 153 165 <div class="alert alert-block alert-success"> 154 166 <p> 155 Äá» 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 <s pan class="red"><strong>sá» Äiá»n thoại Äã ÄÄng kà tà i khoản</strong></span> và soạn tin theo cú pháp: <span class="red"><strong>SBG MK gá»i tá»i 8062.</span>167 Äá» 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> 156 168 </p> 157 169 </div> -
pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
r500 r502 60 60 <div class="tab-pane in active" id="edit-basic"> 61 61 <form id="frm1" role="form" class="form-horizontal"> 62 <h4 class="header blue bolder smaller">ThÃŽng tin c hung</h4>62 <h4 class="header blue bolder smaller">ThÃŽng tin cá nhân</h4> 63 63 64 64 <div class="row"> … … 66 66 <div class="vspace-xs"></div> 67 67 68 <div class="col- xs-12 col-sm-8">68 <div class="col-sm-9"> 69 69 <div class="form-group"> 70 <label for="form-field-username" class="col-sm-4 control-label no-padding-right"> Tà i khoản</label>70 <label for="form-field-username" class="col-sm-4 control-label no-padding-right">Sá» Äiá»n thoại</label> 71 71 72 72 <div class="col-sm-8"> … … 76 76 77 77 <div class="space-4"></div> 78 78 79 79 <div class="form-group"> 80 <label for="form-field-first" class="col-sm-4 control-label no-padding-right">Há» tên</label> 81 82 <div class="col-sm-8"> 83 <input type="text" name="fullname" value="<?php echo @$fullname; ?>" placeholder="Há»" id="form-field-first" class="col-xs-12 col-sm-10" disabled> 84 85 </div> 80 <label for="form-field-first" class="col-sm-4 control-label no-padding-right">Há» và tên</label> 81 <label class="block clearfix has-error"> 82 83 <div class="col-sm-8"> 84 <input type="text" name="fullname" value="<?php echo @$fullname; ?>" placeholder="Há»" id="form-field-first" class="col-xs-12 col-sm-10" <?php if (@$use_package) echo 'disabled'; ?>> 85 86 </div> 87 <small><div class="col-sm-8 help-block" id="fullname_err"> </div></small> 88 </label> 86 89 </div> 87 90 … … 105 108 </div> 106 109 </div> 107 110 108 111 </div> 109 </div>110 111 <hr>112 112 <div class="col-sm-3"> 113 <h4><small><a href="#" data-toggle="modal" data-target="#changeProfile"><i>Äá»i sá» Äiá»n thoại</i></a></small></h4> 114 </div> 115 </div> 113 116 <div class="space-4"></div> 114 115 <div class="form-group">116 <label class="col-sm-3 control-label no-padding-right">Giá»i tÃnh</label>117 118 <div class="col-sm-9">119 <label class="inline">120 <input type="radio" <?php if (@$gender == "male") echo "checked"; ?> class="ace" name="gender" value="male">121 <span class="lbl"> Nam</span>122 </label>123 124 125 <label class="inline">126 <input type="radio" <?php if (@$gender == "female") echo "checked"; ?> class="ace" name="gender" value="female">127 <span class="lbl"> Nữ</span>128 </label>129 </div>130 </div>131 132 <div class="space"></div>133 <h4 class="header blue bolder smaller">ThÃŽng tin liên há»</h4>134 135 <div class="form-group">136 <label for="form-field-email" class="col-sm-3 control-label no-padding-right">Email</label>137 138 <div class="col-sm-9">139 <label class="block clearfix has-error">140 <span class="input-icon input-icon-right">141 <input name="email" type="email" value="<?php echo @$email; ?>" id="form-field-email">142 <i class="icon-envelope"></i>143 </span>144 <div class="help-block" id="email_err"> </div>145 </label>146 </div>147 </div>148 117 149 118 <div class="clearfix form-actions"> … … 153 122 Cáºp nháºt 154 123 </button> 124 155 125 </div> 156 </div> 126 <div class="col-md-offset-3 col-md-9"><label id="updating" style="display: none;;"><span class="icon-refresh icon-refresh-animate"></span> Äang xá» lÜ...</label> 127 </div> 128 </div> 157 129 </form> 158 130 </div> … … 160 132 161 133 <div class="tab-pane" id="edit-password"> 162 <div class="alert alert-block alert-success"> 163 <p> 164 Quà vá» có thá» thay Äá»i máºt khẩu bằng cách dùng sá» Äiá»n thoại [SoDTKhachhang] và soạn tin theo cú pháp: <strong>SBG MK [matkhaumoi] gá»i tá»i 8062</strong>. <br/> 165 Äá» 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 sá» Äiá»n thoại Äã ÄÄng kà tà i khoản và soạn tin theo cú pháp: <strong>SBG MK gá»i tá»i 8062</strong>. 166 </p> 167 </div> 134 <form id="frm2" class="form-horizontal" role="form"> 135 <h4 class="header blue bolder smaller">Äá»i máºt khẩu</h4> 136 <div class="form-group"> 137 <label for="form-field-passwd" class="col-sm-3 control-label no-padding-right">Máºt khẩu cÅ©</label> 138 <div class="col-sm-9"> 139 <label class="block clearfix has-error"> 140 <span class="input-icon"> 141 <input type="password" name="passwd" id="form-field-pass1"> 142 <i class="icon-lock blue"></i> 143 </span> 144 145 <small><div class="help-block" id="passwd_old_err"> </div></small> 146 </label> 147 148 </div> 149 </div> 150 151 <div class="form-group"> 152 <label for="form-field-pass1" class="col-sm-3 control-label no-padding-right">Máºt khẩu má»i</label> 153 154 <div class="col-sm-9"> 155 <label class="block clearfix has-error"> 156 <span class="input-icon"> 157 <input type="password" name="passwd_new" id="form-field-pass1"> 158 <i class="icon-lock blue"></i> 159 </span> 160 <small><div class="help-block" id="passwd_new_err"> </div></small> 161 </label> 162 </div> 163 </div> 164 165 <div class="space-4"></div> 166 167 <div class="form-group"> 168 <label for="form-field-pass2" class="col-sm-3 control-label no-padding-right">Gõ lại máºt khẩu má»i</label> 169 <div class="col-sm-9"> 170 <label class="block clearfix has-error"> 171 <span class="input-icon"> 172 <input type="password" name="confirm_passwd_new" id="form-field-pass2"> 173 </span> 174 <small><div class="help-block" id="confirm_passwd_new_err"> </div></small> 175 </label> 176 </div> 177 </div> 178 <div class="clearfix form-actions"> 179 <div class="col-md-offset-3 col-md-9"> 180 <button type="button" onclick="return changePassword(<?php echo @$us_id; ?>);" class="btn btn-info"> 181 <i class="icon-ok bigger-110"></i> 182 Thay Äá»i 183 </button> 184 </div> 185 </div> 186 187 </form> 188 189 <div class="alert alert-block alert-success"> 190 191 <p> 192 Quà vá» cÅ©ng có thá» thay Äá»i máºt khẩu bằng cách dùng sá» Äiá»n thoại <strong>[SoDTKhachhang]</strong> và soạn tin theo cú pháp: <strong>SBG MK [MatKhauMoi]</strong> gá»i tá»i <strong>8062</strong>. 193 <p/> 194 <p> 195 Äá» 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>. 196 </p> 197 </div> 168 198 </div> 169 199 … … 175 205 </div> 176 206 <div class="col-sm-6"> 177 <h4>Thá»i bạn sá» dụng </h4> <h3><?php echo $expire_date; ?> <span class="badge"><?php echo$date_diff; ?></span></h3>207 <h4>Thá»i bạn sá» dụng </h4> <h3><?php echo @$expire_date; ?> <span class="badge"><?php echo @$date_diff; ?></span></h3> 178 208 </div> 179 209 … … 212 242 <div class="alert alert-block alert-success"> 213 243 <p> 214 Sá» dụng thuê bao <strong> 016825764</strong> soạn tin nhắn: <strong>SBG NAP [sotien] gá»i 8062</strong>. <br/>244 Sá» dụng thuê bao <strong><?php echo @$username; ?></strong> soạn tin nhắn: <strong>SBG NAP [sotien] gá»i 8062</strong>. <br/> 215 245 Nếu quà vá» sá» dụng thuê bao Viettel khác thì soạn tin nhắn: <strong>SBG NAP [tentruynhap] 216 246 [sotien] gá»i tá»i 8062</strong>. … … 226 256 </div> 227 257 <div class="col-sm-6"> 228 <h4>Thá»i bạn sá» dụng </h4> <h3><?php echo $expire_date; ?> <span class="badge"><?php echo$date_diff; ?></span></h3>258 <h4>Thá»i bạn sá» dụng </h4> <h3><?php echo @$expire_date; ?> <span class="badge"><?php echo @$date_diff; ?></span></h3> 229 259 </div> 230 260 <h4 class="header blue bolder smaller">ÄÄng kÜ dá»ch vụ</h4> … … 357 387 </div> 358 388 359 389 <div class="modal fade" id="changeProfile" tabindex="-1" role="dialog"aria-hidden="true"> 390 <div class="modal-dialog"> 391 <div class="modal-content"> 392 <div class="modal-header"> 393 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> 394 <h4 class="modal-title">Thay Äá»i sá» Äiá»n thoại</h4> 395 </div> 396 <div class="modal-body"> 397 <div class="alert alert-block alert-success"> 398 <p> 399 Quà vá» có thá» thay Äá»i Sá» Äiá»n thoại Äang sá» dụng bằng cách: Trên sá» Äiá»n thoại má»i, quà vá» soạn tin theo cú pháp: <strong>SBG DDT [SoDTCu] [MatKhau]</strong> gá»i tá»i <strong>8062</strong>. 400 </p> 401 </div> 402 </div> 403 </div> 404 </div> 405 </div> 406 407 <div class="modal fade" id="changePassSuccess" tabindex="-1" role="dialog"aria-hidden="true"> 408 <div class="modal-dialog"> 409 <div class="modal-content"> 410 <div class="modal-header"> 411 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> 412 <h4 class="modal-title">Äá»i máºt khẩu</h4> 413 </div> 414 <div class="modal-body"> 415 <div class="alert alert-block alert-success"><center>Quà vá» Äã Äá»i máºt khẩu thà nh cÃŽng !</center></div> 416 <center><button class="btn btn-primary" data-dismiss="modal">Äóng</button></center> 417 </div> 418 419 </div> 420 </div> 421 </div> 422 423 <div class="modal fade" id="updateInfoSuccess" tabindex="-1" role="dialog"aria-hidden="true"> 424 <div class="modal-dialog"> 425 <div class="modal-content"> 426 <div class="modal-header"> 427 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> 428 <h4 class="modal-title">Cáºp nháºt thÃŽng tin</h4> 429 </div> 430 <div class="modal-body"> 431 <div class="alert alert-block alert-success"><center>Quà vá» Äã cáºp nháºt thÃŽng tin thà nh cÃŽng!</center></div> 432 <center><button id="close" class="btn btn-primary" data-dismiss="modal">Äóng</button></center> 433 </div> 434 435 </div> 436 </div> 437 </div> 360 438 361 439 <?php -
pro-violet-viettel/sourcecode/application/views/layout/frontend/header.php
r480 r502 21 21 <style type="text/css" media="screen"> 22 22 .sidebar:before, .sidebar {background-color: transparent;} 23 .icon-refresh-animate { 24 -animation: spin .7s infinite linear; 25 -webkit-animation: spin2 .7s infinite linear; 26 } 27 28 @-webkit-keyframes spin2 { 29 from { -webkit-transform: rotate(0deg);} 30 to { -webkit-transform: rotate(360deg);} 31 } 32 33 @keyframes spin { 34 from { transform: scale(1) rotate(0deg);} 35 to { transform: scale(1) rotate(360deg);} 36 } 23 37 </style> 24 38 <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> -
pro-violet-viettel/sourcecode/assets/js/frontend/user.js
r490 r502 1 1 function updateInfo(us_id){ 2 $("#updating").css("display", "block"); 2 3 $.ajax({ 3 4 url: 'update_user/' + us_id, … … 6 7 success: function (data, textStatus, jqXHR) 7 8 { 9 $("#updating").css("display", "none"); 8 10 result = jQuery.parseJSON(data); 9 11 if (result.success == "1") 10 12 { 11 window.location.reload(true); 13 $("#updateInfoSuccess").modal('show'); 14 //$("#close").click(function(){window.location.reload(true)}); 15 $('#updateInfoSuccess').on('hidden.bs.modal', function () { 16 window.location.reload(true); 17 }); 12 18 } 13 19 else … … 41 47 event.preventDefault(); 42 48 }); 49 50 function changePassword(us_id) 51 { 52 $('#passwd_old_err').html(""); 53 $('#passwd_new_err').html(""); 54 $('#confirm_passwd_new_err').html(""); 55 $.ajax({ 56 url: 'change_password/' + us_id, 57 type: 'POST', 58 data: $("#frm2").serialize(), 59 success: function (data, textStatus, jqXHR) 60 { 61 result = jQuery.parseJSON(data); 62 if (result.success == "1") 63 { 64 $("#changePassSuccess").modal('show'); 65 } 66 else 67 { 68 for (var key in result.errors) 69 { 70 $('#'+key).html(result.errors[key]); 71 } 72 } 73 } 74 }); 75 } 76 77 function clearFormFields(id){ 78 $(id).find('input:text, input:hidden, input:password, input:file, select, textarea').val(''); 79 $(id).find('input:radio, input:checkbox').removeAttr('checked').removeAttr('selected'); 80 $(id).find('.help-block').html(""); 81 } 82 83 $('body').on('hidden.bs.modal', '.modal', function () { 84 clearFormFields('#frm2'); 85 });
Note: See TracChangeset
for help on using the changeset viewer.