Index: /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php	(revision 541)
+++ /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php	(revision 542)
@@ -43,4 +43,6 @@
         $this->load->model(array('user_model'));
         $data = $this->user_model->checkLogin($src, $token, $username, $password);
+        
+        
         if ($data == null) {
             $this->session->set_flashdata('login_error', TRUE);
@@ -48,4 +50,5 @@
         } else {
             parse_str($data);
+            $is_viettel=$this->is_viettel($phone);
             switch ($status) {
                 case 0:
@@ -58,5 +61,5 @@
                         setcookie($cookie_name, 'username=' . $username . '&user=' . $data . '&us_id=' . $id, time() + $cookie_time);
                     }
-                    $userdata = array('username' => $username, 'user' => $data, 'us_id' => $id, 'logined_in' => TRUE);
+                    $userdata = array('username' => $username, 'user' => $data, 'us_id' => $id, 'logined_in' => TRUE,'is_viettel'=>$is_viettel);
                     $this->session->set_userdata('userInfo', $userdata);
                     redirect('/frontend/lecture');
@@ -90,5 +93,5 @@
         redirect('/frontend/home');
     }
-
+    
     public function register() {
         $this->load->model('user_model');
@@ -164,4 +167,16 @@
 		echo $data;
 	}
+        public function is_viettel($number)
+        {
+            $viettel=array('096','097','098','0163','0164','0165','0166','0167','0168','0169');
+            foreach ($viettel as $num)
+            {
+                if (strpos($number, $num)===0)
+                {
+                  return true;                
+                }
+            }
+            return false; 
+        }
 }
 
Index: /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 541)
+++ /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 542)
@@ -15,5 +15,4 @@
     public function profile() {
         $user_info = $this->session->userdata('userInfo');
-		
         if ($user_info) {
             $this->load->model('user_model');
@@ -30,5 +29,5 @@
             parse_str($user, $info);
             $data=  array_merge($data,$u);
-            $data=  array_merge($data,$info);
+            $data=  array_merge($data,$user_info);
             $this->load->view('frontend/user_profile', $data);
         } else {
Index: /pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php	(revision 541)
+++ /pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php	(revision 542)
@@ -41,6 +41,8 @@
                 <?php } ?>
                 <div class="modal-footer">
-                    <a id="package_register_back" class="btn btn-success" data-dismiss="modal">Quay láº¡i</a>
-                    <?php if ($can_buy == 1) { ?>
+                    <?php if ($can_buy == 0) { ?>
+                    <a id="package_register_back" class="btn btn-success" data-dismiss="modal">Náº¡p thÃªm tiá»n</a>
+                    <?php } ?>
+                        <?php if ($can_buy == 1) { ?>
                         <a href="#" id="finish_package_register" class="btn btn-success" >HoÃ n táº¥t</a>
                     <?php } ?>
Index: /pro-violet-viettel/sourcecode/assets/js/frontend/user.js
===================================================================
--- /pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 541)
+++ /pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 542)
@@ -70,5 +70,5 @@
                 
                 $("#package_register_finish_button").click(function () {
-                window.location.href = url+"frontend/user/profile/account-info";
+                window.location.href = url+"frontend/lecture"; 
                 
             });
