Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 633)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 636)
@@ -11,4 +11,6 @@
         parent::__construct();
         $this->load->helper('cookie');
+		$this->load->helper('language');
+		$this->lang->load('messages', 'message');
     }
 
@@ -82,8 +84,8 @@
         if (isset($input['fullname'])) {
             if (strlen($input['fullname']) < 1) {
-                $result['errors'][] = "Vui lÃ²ng nháº­p há» tÃªn Äáº§y Äá»§ tiáº¿ng Viá»t";
+                $result['errors'][] = lang('_SBG_REGISTER_VIP_FULLNAME_REQUIRED_MSG');
             }
             if (strlen($input['school']) < 1) {
-                $result['errors'][] = "Vui lÃ²ng nháº­p ÄÆ¡n vá» cÃŽng tÃ¡c";
+                $result['errors'][] = lang('_SBG_REGISTER_VIP_SCHOOL_REQUIRED_MSG');
             }
             if (!isset($result['errors'])) {
@@ -148,5 +150,6 @@
 
         if ($user['acc_balanced'] < $package['p_price']) {
-            $message = 'Sá» tiá»n trong TÃ i khoáº£n SBG Online hiá»n táº¡i cá»§a QuÃœ vá» lÃ  ' . $user['acc_balanced'] . ' Äá»ng.<br /> Äá» ÄÄng kÃ­ Sá»­ dá»¥ng dá»ch vá»¥ Soáº¡n BÃ i giáº£ng trá»±c tuyáº¿n, QuÃœ vá» cáº§n náº¡p thÃªm tiá»n vÃ o tÃ i khoáº£n.';
+			$aryPatterns = array('/:acc_balanced:/');
+			$message = preg_replace($aryPatterns, array(number_format($user['acc_balanced'], 0)), lang('_SBG_ACC_BALANCE_LESS_PACKAGE_PRICE_MSG'));
         } else {
             $user['acc_balanced'] = $user['acc_balanced'] - $package['p_price'];
@@ -159,7 +162,10 @@
 
             $this->user_model->updateUser($us_id, $user);
+			$aryPatterns = array('/:period:/');
+			$message = preg_replace($aryPatterns, array(date('d-m-Y', strtotime($user['expire_date']))), lang('_SBG_REGISTER_VIP_SUCCESS_MS')); 
 			$source = 'web';
 			$this->user_model->insertRegisterVipLog($source,  $package['p_code']);
-            $message = 'QuÃœ vá» ÄÃ£ ÄÄng kÃ­ sá»­ dá»¥ng CÃŽng cá»¥ Soáº¡n BÃ i giáº£ng trá»©c tuyáº¿n. QuÃœ vá» ÄÆ°á»£c sá»­ dá»¥ng dá»ch vá»¥ Äáº¿n háº¿t ngÃ y ' . date('d-m-Y', strtotime($user['expire_date']));
+           
+
         }
 
@@ -205,5 +211,5 @@
     
 	public function update_info() {
-        $result['success']=0;
+        $result['success'] = 0;
         $user_info = $this->session->userdata('userInfo');
         if ($user_info) {
@@ -218,8 +224,8 @@
             if ($input) {
                 if (strlen($input['fullname']) == 0) {
-                    $result['errors'][] = array("content"=>"Há» tÃªn khÃŽng ÄÆ°á»£c Äá» trá»ng!","field"=>"fullname");
+                    $result['errors'][] = array("content"=>lang('_SBG_FULLNAME_REQUIRED_MSG'),"field"=>"fullname");
                 }
                 if (strlen($input['school']) == 0) {
-                    $result['errors'][] = array("content"=>"TÃªn ÄÆ¡n vá» khÃŽng ÄÆ°á»£c Äá» trá»ng!","field"=>"school");
+                    $result['errors'][] = array("content"=>lang('_SBG_REGISTER_VIP_SCHOOL_REQUIRED_MSG'),"field"=>"school");
                 }
 
@@ -231,6 +237,6 @@
                     $result['data'] = $this->user_model->update_user($src, $token, $input, $us_id);
                     $result['success'] = 1;
-                    $info['fullname']=$input['fullname'];
-                    $info['school']=$input['school'];
+                    $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']);
@@ -258,5 +264,5 @@
                 if (array_key_exists('fullname', $input)) {
                     if (strlen($input['fullname']) == 0) {
-                        $result['errors']['fullname_err'] = "Há» tÃªn khÃŽng ÄÆ°á»£c Äá» trá»ng!";
+                        $result['errors']['fullname_err'] = lang('_SBG_FULLNAME_REQUIRED_MSG');
                     }
                 } else {
@@ -289,21 +295,21 @@
 
             if (strlen($input['passwd']) == 0) {
-                $result['errors']['passwd_old_err'] = "Máº­t kháº©u khÃŽng ÄÆ°á»£c Äá» trá»ng!";
+                $result['errors']['passwd_old_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG');
             }
 			
             if (strlen($input['passwd_new']) == 0) {
-                $result['errors']['passwd_new_err'] = "Máº­t kháº©u khÃŽng ÄÆ°á»£c Äá» trá»ng!";
+                $result['errors']['passwd_new_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG');
             } else if (strcmp($input['passwd'], $input['passwd_new']) == 0) {
-                $result['errors']['passwd_new_err'] = "Máº­t kháº©u trÃ¹ng vá»i máº­t kháº©u hiá»n táº¡i!";
+                $result['errors']['passwd_new_err'] = lang('_SBG_PASSWORD_DUPLICATE_MSG');
             }else
 			{
 				if (!preg_match('/^([0-9a-zA-Z]{6,65})*$/', $input['passwd_new']))
 				{
-					$result['errors']['passwd_new_err'] = "Máº­t kháº©u Ã­t nháº¥t lÃ  6 kÃ­ tá»±, vÃ  chá» chá»©a cÃ¡c kÃ­ tá»± sá» hoáº·c chá»¯, <br> khÃŽng chá»©a khoáº£ng tráº¯ng vÃ  khÃŽng chá»©a kÃœ tá»± Äáº·c biá»t!";
+					$result['errors']['passwd_new_err'] = lang('_SBG_USER_PASSWORD_CHANGE_REQUIRED_MSG');
 				}
 			}
 			
             if ($input['passwd_new'] != $input['confirm_passwd_new']) {
-                $result['errors']['confirm_passwd_new_err'] = "Máº­t kháº©u khÃŽng trÃ¹ng nhau!";
+                $result['errors']['confirm_passwd_new_err'] = lang('_SBG_PASSWORD_CONFIRM_MSG');
             }
 
@@ -317,5 +323,5 @@
                         break;
                     case 6:
-                        $result['errors']['passwd_old_err'] = "Máº­t kháº©u cung cáº¥p khÃŽng ÄÃºng!";
+                        $result['errors']['passwd_old_err'] = lang('_SBG_OLD_PASSWORD_FAIL_MSG');
                         break;
                     default:
