- Timestamp:
- Jan 27, 2015 10:50:04 AM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/frontend
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r701 r706 25 25 $token = md5($us_id . self::TOKENPW); 26 26 $data = $this->get_data($src, $token, $us_id); 27 $data['can_edit'] = 0; 27 28 $u = $this->User_model->get_user_by_id($us_id); 29 if ($u['p_id'] < 1) { 30 $data['can_edit'] = 1; 31 } 32 if ($data['fullname']=="") 33 { 34 $data['can_edit'] = 1; 35 } 28 36 $data['current_tab'] = $this->uri->segment(4, 'edit-basic'); 29 37 $data['packages'] = $this->Servicepackage_model->getAllPackages(); … … 59 67 } 60 68 69 if(strtotime($user['expire_date'])<strtotime(date('Y-m-d'))){ 70 $result['can_edit'] = 1; 71 } 61 72 if ($user['p_id'] < 1) { 62 73 $result['can_edit'] = 1; … … 133 144 $user['expire_date'] = date('Y-m-d', strtotime("+" . $package['p_period'] . " ".$package['p_unit'], strtotime($currentExpireDate))); 134 145 $user['p_id'] = $package['p_id']; 135 $user['district'] = $input['district'];146 //$user['district'] = $input['district']; 136 147 $user['province'] = $input['province']; 137 148 $this->user_model->updateUser($us_id, $user); -
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r700 r706 166 166 ), 'user' ); 167 167 $u = array('province'=>$user['province'], 168 'district'=>$user['district'],169 168 'updated_time'=>date('Y-m-d H:i:s') 170 169 ); -
pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php
r701 r706 50 50 <select name="province" id="form-field-province" class="input-large"> 51 51 <?php foreach (lang('_PROVINCES_') as $pro):?> 52 <option value="<?php echo $pro;?>" ><?php echo $pro; ?></option>52 <option value="<?php echo $pro;?>" <?php if($user['province'] == $pro) echo "selected"; ?> ><?php echo $pro; ?></option> 53 53 <?php endforeach;?> 54 54 </select> 55 55 </div> 56 56 </div> 57 < div class="form-group">57 <!--div class="form-group"> 58 58 <label for="form-field-district" class="col-sm-4 control-label no-padding-right">Quáºn / Huyá»n</label> 59 59 60 60 <div class="col-sm-8"> 61 <input type="text" name="district" value="<?php echo @$district; ?>" placeholder="Quáºn / Huyá»n" id="form-field-district" class="input-large">61 <input type="text" name="district" value="<?php echo $user['district']; ?>" placeholder="Quáºn / Huyá»n" id="form-field-district" class="input-large"> 62 62 </div> 63 </div >63 </div--> 64 64 65 65 <?php if ($can_edit == 1) { ?> -
pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
r701 r706 78 78 79 79 <div class="col-sm-8"> 80 <input type="text" name="fullname" value="<?php echo @$fullname; ?>" placeholder="Há» và tên" id="form-field-first" class="col-xs-12 col-sm-10" <?php if ( isset($p_id)) echo 'disabled'; ?>>80 <input type="text" name="fullname" value="<?php echo @$fullname; ?>" placeholder="Há» và tên" id="form-field-first" class="col-xs-12 col-sm-10" <?php if ($can_edit == 0) echo 'disabled'; ?>> 81 81 82 82 </div> … … 109 109 </div> 110 110 </div> 111 < div class="form-group">111 <!--div class="form-group"> 112 112 <label for="form-field-username" class="col-sm-4 control-label no-padding-right">Quáºn / Huyá»n</label> 113 113 … … 115 115 <input type="text" name="district" value="<?php echo @$district; ?>" placeholder="Quáºn / Huyá»n" id="form-field-district" class="col-xs-12 col-sm-10"> 116 116 </div> 117 </div >117 </div--> 118 118 119 119 </div>
Note: See TracChangeset
for help on using the changeset viewer.