Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php	(revision 579)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php	(revision 580)
@@ -29,4 +29,14 @@
             $username = $user_info['username'];    
             $first_visit=0;
+            $update_user_info=0;
+            parse_str($user_info['user'], $info);
+            $this->load->model('user_model');
+            $user = $user_info['user'];
+            $us_id = $user_info['us_id'];
+            $u = $this->user_model->get_user_by_id($us_id);
+            if (($info['fullname']=="")&&($u['p_id']!=""))
+            {
+                $update_user_info=1;
+            }
             if (!$this->session->userdata('first_visit'))
             {
@@ -34,5 +44,5 @@
                $first_visit=1;
             }
-          $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams));
+          $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));
         } else {
             redirect('/frontend/home/');
Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 579)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 580)
@@ -27,8 +27,5 @@
             $data['packages'] = $this->servicepackage_model->getAllPackages();
             $data['is_viettel'] = $user_info['is_viettel'];
-			//$paidlogs = $this->user_model->getPaidlog($us_id);
-			
-			//$data['paidlogs'] = $paidlogs;
-            parse_str($user, $info);
+            
             $data = array_merge($data, $u);
             $data = array_merge($data, $user_info);
@@ -58,5 +55,10 @@
                 $result['can_buy'] = 0;
             }
+            
             if ($user['p_id'] < 1) {
+                $result['can_edit'] = 1;
+            }
+            if ($info['fullname']=="")
+            {
                 $result['can_edit'] = 1;
             }
@@ -198,5 +200,43 @@
         }
     }
-
+public function update_info() {
+        $result['success']=0;
+        $user_info = $this->session->userdata('userInfo');
+        if ($user_info) {
+            $us_id = $user_info['us_id'];
+            $result = array();
+            $result['success'] = 0;
+            $src = "SBG";
+            $token = md5($us_id . self::TOKENPW);
+            $user = $this->get_data($src, $token, $us_id);
+            $input = $this->input->post();
+            parse_str($user_info['user'], $info);
+            if ($input) {
+                if (strlen($input['fullname']) == 0) {
+                    $result['errors'][] = array("content"=>"Há» tÃªn khÃŽng ÄÆ°á»£c Äá» trá»ng!","field"=>"fullname");
+                }
+                if (strlen($input['school']) == 0) {
+                    $result['errors'][] = array("content"=>"TÃªn ÄÆ¡n vá» khÃŽng ÄÆ°á»£c Äá» trá»ng!","field"=>"school");
+                }
+
+                $input['password'] = '';
+                $input['oldpass'] = '';
+                $input['province'] = '';
+                $this->load->model('user_model');
+                if (!isset($result['errors'])) {
+                    $result['data'] = $this->user_model->update_user($src, $token, $input, $us_id);
+                    $result['success'] = 1;
+                    $info['fullname']=$input['fullname'];
+                    $info['school']=$input['school'];
+                    $info = urldecode(http_build_query($info));
+                    $userdata = array('username' => $user_info['username'], 'user' => $info, 'us_id' => $user_info['us_id'], 'logined_in' => TRUE, 'is_viettel' => $user_info['is_viettel']);
+                    $this->session->set_userdata('userInfo', $userdata);
+                }
+                echo json_encode($result);
+            }
+        } else {
+            redirect('frontend/home');
+        }
+    }
     public function update_user() {
         $us_id = $this->uri->segment(4);
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php	(revision 579)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php	(revision 580)
@@ -39,4 +39,61 @@
 			</a>
 		</div><!-- /.main-container -->
+
+                
+                
+                
+<div class="modal fade" id="update_user_info" tabindex="-1" role="dialog"aria-hidden="true">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header">
+                
+                <h4 class="modal-title">Cáº­p nháº­t thÃŽng tin cÃ¡ nhÃ¢n</h4>
+            </div>
+            <div class="modal-body">
+                    <form id="update_user_info" class="form-horizontal form" action="#" method="POST">
+                        
+                        <div class="errors" id="package_register_errors">
+                            
+                        </div>
+                        <div class="form-group" style="margin-bottom:0px;">
+                            <label for="form-field-first" class="col-sm-4 control-label no-padding-right">
+                                Há» vÃ  tÃªn</label>
+                            <div class="col-sm-8">
+                                <input name="fullname" type="text" value="" placeholder="Há» vÃ  tÃªn" id="form-field-first" class="input-large">
+                                <label class="block clearfix has-error">
+                                <div id="fullname" class="help-block error"></div>
+                                </label>    
+                            </div>
+                        </div>
+
+                        <div class="space-4"></div>
+
+                        <div class="form-group">
+                            <label for="form-field-username" class="col-sm-4 control-label no-padding-right">
+                                ÄÆ¡n vá»</label>
+                            <div class="col-sm-8">
+                                <input name="school"  type="text" value="" placeholder="ÄÆ¡n vá»" id="form-field-first" class="input-large">
+                            <label class="block clearfix has-error">
+                                <div id="school" class="help-block error"></div>
+                                </label> 
+                            </div>
+                        </div>
+
+                        LÆ°u Ãœ:
+                        <ul> 
+                        <li>QuÃ­ vá» cáº§n Äiá»n Äáº§y Äá»§ Há» tÃªn chÃ­nh xÃ¡c báº±ng tiáº¿ng Viá»t cÃ³ dáº¥u, cÃ¡c tÃªn ÄÆ¡n vá» sáºœ khÃŽng ÄÆ°á»£c cháº¥p nháº­n. </li><li>ThÃŽng tin Há» tÃªn sáºœ khÃŽng thá» thay Äá»i sau khi QuÃ­ vá» ÄÄng kÃ­ Sá»­ dá»¥ng dá»ch vá»¥.</li>
+                        </ul>
+
+                        
+                    </form>
+               
+                <div class="modal-footer">
+
+                 <a href="#" id="update_user_info" class="btn btn-success" >HoÃ n táº¥t</a>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
                 
 <script type="text/javascript">
@@ -44,4 +101,6 @@
 	var url= "<?php echo base_url();?>";
 	var first_visit= "<?php echo $first_visit;?>";
+        var update_user_info="<?php echo $update_user_info;?>";
+        var us_id="<?php echo $us_id;?>";
 </script>		
 <?php
