Changeset 717
- Timestamp:
- Jan 29, 2015 5:32:13 PM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php
r670 r717 14 14 public function __construct() { 15 15 parent::__construct(); 16 $this->load->helper('language'); 17 $this->lang->load('messages', 'message'); 16 18 } 17 19 … … 42 44 $update_user_info=1; 43 45 } 46 47 if ($u['province'] == '' && $u['p_id'] != ''){ 48 $update_user_info=1; 49 } 44 50 45 51 if (!$this->session->userdata('first_visit')) … … 49 55 } 50 56 51 $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams,'update_user_info'=>$update_user_info,'us_id'=>$us_id,"p_period"=>$u['p_period'],"expire_date"=>date("d-m-Y", strtotime($u['expire_date'])) ));57 $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams,'update_user_info'=>$update_user_info,'us_id'=>$us_id,"p_period"=>$u['p_period'],"expire_date"=>date("d-m-Y", strtotime($u['expire_date'])), "fullname"=>$info['fullname'], "school"=>$info['school'], "province"=>$u['province'], "provinces"=>lang('_PROVINCES_'))); 52 58 } else { 53 59 redirect('/frontend/home/'); -
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r716 r717 242 242 parse_str($user_info['user'], $info); 243 243 if ($input) { 244 if (strlen($input['fullname']) == 0) { 245 $result['errors'][] = array("content"=>lang('_SBG_FULLNAME_REQUIRED_MSG'),"field"=>"fullname"); 246 } 244 if (array_key_exists('fullname', $input)) { 245 if (strlen($input['fullname']) == 0) { 246 $result['errors'][] = array("content"=>lang('_SBG_FULLNAME_REQUIRED_MSG'),"field"=>"fullname"); 247 } 248 }else{ 249 $input['fullname'] = $user['fullname']; 250 } 247 251 if (strlen($input['school']) == 0) { 248 252 $result['errors'][] = array("content"=>lang('_SBG_REGISTER_VIP_SCHOOL_REQUIRED_MSG'),"field"=>"school"); … … 251 255 $input['password'] = ''; 252 256 $input['oldpass'] = ''; 253 $input['province'] = '';257 //$input['province'] = ''; 254 258 $this->load->model('user_model'); 255 259 if (!isset($result['errors'])) { -
pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php
r663 r717 58 58 Há» và tên</label> 59 59 <div class="col-sm-8"> 60 <input name="fullname" type="text" value=" " placeholder="Há» và tên" id="form-field-first" class="input-large">60 <input name="fullname" type="text" value="<?php echo $fullname; ?>" placeholder="Há» và tên" id="form-field-first" class="input-large" <?php if($fullname) echo "disabled"; ?>> 61 61 <label class="block clearfix has-error"> 62 62 <div id="fullname" class="help-block error"></div> … … 71 71 ÄÆ¡n vá»</label> 72 72 <div class="col-sm-8"> 73 <input name="school" type="text" value=" " placeholder="ÄÆ¡n vá»" id="form-field-first" class="input-large">73 <input name="school" type="text" value="<?php echo $school; ?>" placeholder="ÄÆ¡n vá»" id="form-field-first" class="input-large"> 74 74 <label class="block clearfix has-error"> 75 75 <div id="school" class="help-block error"></div> … … 77 77 </div> 78 78 </div> 79 <div class="form-group"> 80 <label for="form-field-province" class="col-sm-4 control-label no-padding-right">Tá»nh / Thà nh phá»</label> 81 <div class="col-sm-8"> 82 <select name="province" id="form-field-province" class="input-large"> 83 <?php foreach ($provinces as $pro):?> 84 <option></option> 85 <option value="<?php echo $pro;?>" <?php if($province == $pro) echo "selected"; ?>><?php echo $pro; ?></option> 86 <?php endforeach;?> 87 </select> 88 </div> 89 </div> 79 90 80 91 Lưu Ü: -
pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php
r714 r717 50 50 <select name="province" id="form-field-province" class="input-large"> 51 51 <?php foreach (lang('_PROVINCES_') as $pro):?> 52 <option></option> 52 53 <option value="<?php echo $pro;?>" <?php if($user['province'] == $pro) echo "selected"; ?> ><?php echo $pro; ?></option> 53 54 <?php endforeach;?> -
pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
r716 r717 104 104 <select name="province" id="form-field-province" class="col-xs-12 col-sm-10"> 105 105 <?php foreach ($provinces as $pro):?> 106 <option></option> 106 107 <option value="<?php echo $pro;?>" <?php if($province==$pro) echo "selected"; ?>><?php echo $pro; ?></option> 107 108 <?php endforeach;?> -
pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php
r716 r717 481 481 } 482 482 } 483 484 public function deleteCollaborator($id){ 485 $sql = "DELETE FROM tblcollaborator WHERE id = ". $id; 486 $this->db->query($sql); 487 if ($this->db->affected_rows()){ 488 $logMsg = date('Y-m-d H:i:s') . " Collaborator ID: ".$id.". Delete success! !\n"; 489 write_file('./log/delete_collaborator.log', $logMsg, FOPEN_WRITE_CREATE); 490 }else{ 491 $logMsg = date('Y-m-d H:i:s') . " Collaborator ID: ".$id.". Delete fail! !. Sql = ".$sql."\n"; 492 write_file('./log/delete_collaborator.log', $logMsg, FOPEN_WRITE_CREATE); 493 } 494 } 495 496 public function getAllCollaboratorID(){ 497 $sql = "Select id from tblcollaborator"; 498 $query = $this->db->query($sql); 499 if ($this->db->affected_rows()){ 500 return $query->result(); 501 }else 502 { 503 return array(); 504 } 505 } 483 506 } -
pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js
r716 r717 6 6 } 7 7 } 8 if (first_visit == '1') {8 //if (first_visit == '1') { 9 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 10 if (p_period == -1) 11 { 12 $('#alert-trial-services').modal('show'); 13 $('#alert-trial-services').on('hidden.bs.modal', function () { 14 if (update_user_info == "1") 15 { 16 $('#update_user_info').modal({backdrop: 'static',keyboard: false,}); 17 } 18 }); 19 } 20 else 21 { 22 if (update_user_info == "1") 23 { 24 $('#update_user_info').modal({backdrop: 'static'}); 25 } 26 } 27 27 28 }28 //} 29 29 30 30
Note: See TracChangeset
for help on using the changeset viewer.