Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php	(revision 706)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php	(revision 707)
@@ -63,4 +63,5 @@
 			parse_str ( $result['data'] );
 			$is_viettel = $this->is_viettel ( $phone );
+			
 			if ($autologin == 1) {
 				$cookie_name = 'siteCookie';
@@ -69,4 +70,5 @@
 				setcookie ( $cookie_name, 'username=' . $username . '&user=' . $result['data'] . '&us_id=' . $id, time () + $cookie_time );
 			}
+
 			$userdata = array (
 					'username' => $username,
@@ -82,6 +84,7 @@
 	
 	public function signout() {
-		$this->session->sess_destroy ();
+		//$this->session->sess_destroy ();
 		// unset($this->session->userdata);
+		$this->session->unset_userdata('userInfo');
 		$cookie_name = "siteCookie";
 		setcookie ( $cookie_name, 'username=' . "", time () - 3600 );
Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 706)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 707)
@@ -17,4 +17,5 @@
     public function profile() {
         $user_info = $this->session->userdata('userInfo');
+
         if ($user_info) {
             $this->load->model('User_model');
Index: pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 706)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 707)
@@ -103,6 +103,6 @@
 				$sms = preg_replace($aryPatterns, array($trialdays. ' ngay', $username, $password), lang('_SBG_MO_USER_REGISTER_SUCCESS_MSG'));
 				$status = 1;
-				$aryPatterns = array('/:collaborator:/');
-				$collaboratorMsg = $status . '|'. preg_replace($aryPatterns, array($collaborator), lang('_SBG_MO_COLLABOLATOR_REGISTER_SUCCESS_MSG'));
+				$aryPatterns = array('/:username:/');
+				$collaboratorMsg = $status . '|'. preg_replace($aryPatterns, array($username), lang('_SBG_MO_COLLABOLATOR_REGISTER_SUCCESS_MSG'));
 				break;
 			case 2 :
@@ -327,5 +327,5 @@
 	}
 	
-	public function registerVip($username, $p_code) {
+	public function registerVip($username, $p_code, &$packageData = null) {
 		$user = array ();
 		$sms = '';
@@ -333,4 +333,5 @@
 		$result = $this->get_user_by_cellphone ( $username );
 		$package = $this->get_package ( ( int ) $p_code );
+		
 		if (!$package)
 		{
@@ -339,6 +340,8 @@
 			return $status . '|' . $sms;
 		}
+			
+		$packageData = $package;
+
 		if ($result) {
-			
 			if ($result ['acc_balanced'] >= $package ['p_price']) {
 				$us_id = $result ['us_id'];
@@ -497,5 +500,5 @@
 		$this->db->query ( 'UNLOCK TABLES' );
 		$sql = 'INSERT INTO tblcardlog(sender, us_id, status, pin_code, serial_num, card_value, created_time) VALUES(?,?,?,?,?,?,?)';
-		$query = $this->db->query ($sql, $cardlog);
+		return $this->db->query ($sql, $cardlog);
 	}
 	
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 706)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 707)
@@ -119,5 +119,5 @@
                                             </div>
 											<div class="col-sm-3">
-											<h4><small><a href="#" data-toggle="modal" data-target="#changeProfile"><i>Äá»i sá» Äiá»n thoáº¡i</i></a></small></h4>
+											<!--<h4><small><a href="#" data-toggle="modal" data-target="#changeProfile"><i>Äá»i sá» Äiá»n thoáº¡i</i></a></small></h4>-->
 											</div>
                                         </div>
@@ -245,6 +245,6 @@
                                         <h4 class="header blue bolder smaller">Náº¡p tiá»n báº±ng tÃ i khoáº£n gá»c</h4>
                                         <div class="alert alert-block alert-success">						
-                                            <p> 
-                                                <span <?php if(($is_viettel==1)) echo 'style="display: none;"'?> >Sá»­ dá»¥ng thuÃª bao <strong><?php echo @$username; ?></strong> soáº¡n tin nháº¯n: <strong>SBG NAP [SoTien] gá»­i 8062</strong>. </span><br/>
+                                            <p>
+                                                <span <?php if(($is_viettel==1)) /*echo 'style="display: none;"'*/{?> >Sá»­ dá»¥ng thuÃª bao <strong><?php echo @$username; ?></strong> soáº¡n tin nháº¯n: <strong>SBG NAP [SoTien] gá»­i 8062</strong>.<?php } ?> </span><br/>
                                                 Náº¿u QuÃœ vá» sá»­ dá»¥ng thuÃª bao Viettel khÃ¡c thÃ¬ soáº¡n tin nháº¯n: <strong>SBG NAP [SoTien] <?php  echo $username; ?> gá»­i tá»i 8062</strong>.
           
