Index: /pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php	(revision 635)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php	(revision 636)
@@ -7,4 +7,6 @@
 		parent::__construct();
 		$this->load->helper('cookie');
+		$this->load->helper('language');
+		$this->lang->load('messages', 'message');
 	}
 	
@@ -79,9 +81,9 @@
 			if (strlen($input['full_name'])==0)
 			{
-				$result['errors']['full_name_err']="TÃªn Admin khÃŽng ÄÆ°á»£c Äá» trá»ng";
+				$result['errors']['full_name_err'] = lang('_SBG_FULLNAME_REQUIRED_MSG');
 			}
 			if (strlen($input['login_name'])==0)
 			{
-				$result['errors']['login_name_err']="TÃªn ÄÄng nháº­p khÃŽng ÄÆ°á»£c Äá» trá»ng";
+				$result['errors']['login_name_err'] = lang('_SBG_LOGIN_NAME_REQUIRED_MSG');
 			}
 			else
@@ -89,18 +91,18 @@
 				if ($this->admin_model->check_exist(array('field'=>'login_name','value'=>$input['login_name'])))
 				{
-					$result['errors']['login_name_err']="TÃªn ÄÄng nháº­p ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng";
+					$result['errors']['login_name_err'] = lang('_SBG_LOGIN_NAME_DUPLICATE_MSG');
 				}
 			}
 			if (strlen($input['phone'])==0)
 			{
-				$result['errors']['phone_err']="Sá» Äiá»n thoáº¡i khÃŽng ÄÆ°á»£c Äá» trá»ng";
+				$result['errors']['phone_err'] = lang('_SBG_PHONE_REQUIRED_MSG');
 			}
 			else
 			{
-				if(!preg_match('/[0-9]/', $input['phone'])){
-					$result['errors']['phone_err']="Phone khÃŽng ÄÃºng Äá»nh dáº¡ng";
+				if(!preg_match('/^([0-9]{10,11}$)$/', $input['phone'])){
+					$result['errors']['phone_err'] = lang('_SBG_PHONE_FORMAT_ERROR_MSG');
 				}else if ($this->admin_model->check_exist(array('field'=>'phone','value'=>$input['phone'])))
 				{
-					$result['errors']['phone_err']="Sá» Äiá»n thoáº¡i ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng";
+					$result['errors']['phone_err'] = lang('_SBG_PHONE_DUPLICATE_MSG');
 				}
 				
@@ -108,17 +110,17 @@
 			if (strlen($input['passwd'])==0)
 			{
-				$result['errors']['pwd1_err']="Máº­t kháº©u khÃŽng ÄÆ°á»£c Äá» trá»ng";
+				$result['errors']['pwd1_err'] = lang('_SBG_PASSWORD_REQUIRED_MSG');
 			}
 			if ($input['passwd'] != $input['pwd2'])
 			{
-				$result['errors']['pwd2_err']="Máº­t kháº©u khÃŽng trÃ¹ng nhau";
+				$result['errors']['pwd2_err'] = lang('_SBG_PASSWORD_CONFIRM_MSG');
 			}
 			if(strlen($input['email'])==0)
 			{
-				$result['errors']['email_err']="Email khÃŽng ÄÆ°á»£c Äá» trá»ng";
+				$result['errors']['email_err'] = lang('_SBG_EMAIL_REQUIRED_MSG');
 			}else{
 				if(!valid_email($input['email']))
 				{
-					$result['errors']['email_err']="Email khÃŽng ÄÃºng Äá»nh dáº¡ng";
+					$result['errors']['email_err'] = lang('_SBG_EMAIL_FORMAT_ERROR_MSG');
 				}
 			}
@@ -237,5 +239,5 @@
 				if(!valid_email($input['email']))
 				{
-					$result['errors']['email_err']="Email khÃŽng ÄÃºng Äá»nh dáº¡ng";
+					$result['errors']['email_err'] = lang('_SBG_EMAIL_FORMAT_ERROR_MSG');
 				}
 			}
@@ -243,5 +245,5 @@
 				if (!preg_match('/[0-9]/', $input['phone']))
 				{
-					$result['errors']['phone_err']="Phone khÃŽng ÄÃºng Äá»nh dáº¡ng";
+					$result['errors']['phone_err'] = lang('_SBG_PHONE_FORMAT_ERROR_MSG');
 				}
 			}
@@ -272,5 +274,5 @@
 			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');
 			}else
 			{
@@ -278,17 +280,17 @@
 				if (!$check_pass)
 				{
-					$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');
 				}
 			}
 			if (strlen($input['passwd_new']) == 0)
 			{
-				$result['errors']['passwd_new_err'] = "Máº­t kháº©u khÃŽng ÄÆ°á»£c Äá» trá»ng !";
-			}else if($input['passwd'] == $input['passwd_new'])
-			{
-				$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_REQUIRED_MSG');
+			}else if(strcmp($input['passwd'], $input['passwd_new']) == 0)
+			{
+				$result['errors']['passwd_new_err'] = lang('_SBG_PASSWORD_DUPLICATE_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');
 			}
 			if (!isset($result['errors']))
Index: /pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php	(revision 635)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php	(revision 636)
@@ -9,4 +9,6 @@
         parent::__construct();
         $this->load->helper('cookie');
+		$this->load->helper('language');
+		$this->lang->load('messages', 'message');
     }
 
Index: /pro-violet-viettel/sourcecode/application/modules/admin/views/login.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/views/login.php	(revision 635)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/views/login.php	(revision 636)
@@ -1,3 +1,3 @@
-<?php $base_url = base_url();?>
+<?php $base_url = base_url(); ?>
 <!DOCTYPE html>
 <html lang="en">
@@ -59,5 +59,6 @@
 														<?php 
 															if($this->session->flashdata('login_error')){
-																echo 'Sai username hoáº·c password!';
+																//echo 'Sai username hoáº·c password!';
+																echo lang('_SBG_ADMIN_LOGIN_FAIL_MSG');
 															}
 														?>
@@ -140,13 +141,13 @@
 			 jQuery('#'+id).addClass('visible');
 			}
-			$('#validation-form').validate({
+			$('#frmLogin').validate({
 				errorElement: 'label',
 				errorClass: 'help-block',
 				focusInvalid: true,
 				rules: {
-					password: {
+					passwd: {
 						required: true,
 					},
-					account: {
+					login_name: {
 						required: true
 					}
@@ -154,8 +155,8 @@
 		
 				messages: {
-					account: {
+					login_name: {
 						required: "ChÆ°a nháº­p tÃ i khoáº£n admin",
 					},
-					password: {
+					passwd: {
 						required: "Vui lÃ²ng nháº­p máº­t kháº©u.",
 					}
Index: /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php	(revision 635)
+++ /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php	(revision 636)
@@ -14,4 +14,6 @@
 		parent::__construct ();
 		$this->load->helper ( 'cookie' );
+		$this->load->helper('language');
+		$this->lang->load('messages', 'message');
 	}
 	
@@ -88,12 +90,12 @@
 	public function register() {
 		$this->load->model ( 'user_model' );
-		//$collaborator = '0979947802';
+		$collaborator = '0979947802';
 		$serviceID = 1;
-		$username = '0979947802';
+		$username = '0978618113';
 		$commandcode = 'commandcode1';
 		$info = 'ABCD';
 		// $receiveTime = time();
 		$receiveTime = date ( "Y-m-d H:i:s" );
-		$data = $this->user_model->register ( $username, null );
+		$data = $this->user_model->register ( $username, $collaborator );
 		echo $data;
 	}
@@ -103,5 +105,5 @@
 		$sentNumber = '0979947802';
 		$serviceID = 1;
-		$password = '123456';
+		$password = '2933369';
 		$commandcode = "SBG";
 		$receiveID = '0977274183';
@@ -144,10 +146,10 @@
 		$vipNum = 1;
 		$mainAccBalanced = 15000;
-		$amount = 10000;
-		$info = "SBG NAP 01662860000 10000";
+		$amount = 1000;
+		$info = "SBG NAP 10000";
 		$status = 0;
 		$receiveTime = date ( "Y-m-d H:i:s" );
-		//$data = $this->user_model->rechargeAccount ( $sentNumber, $amount );
-		$data = $this->user_model->insertPaidlog($sentNumber, $sentNumber, 2, $amount, $receiveTime);
+		$data = $this->user_model->rechargeAccount ( $sentNumber, $amount );
+		//$data = $this->user_model->insertPaidlog($sentNumber, $sentNumber, 2, $amount, $receiveTime);
 		echo $data;
 	}
Index: /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 635)
+++ /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:
Index: /pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 635)
+++ /pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 636)
@@ -14,4 +14,6 @@
 		$this->vservices->setApiUrl ( $this->config->item ( 'api_url' ) );
 		$this->vservices->setConnection ( $this->curl );
+		$this->load->helper('language');
+		$this->lang->load('messages', 'message');
 	}
 	
@@ -54,5 +56,6 @@
 		if (! is_null ( $collaborator ) || $collaborator != '') {
 			if (! $this->isExistcollaborator ( $collaborator )) {
-				$sms = "Khong tim thay cong tac vien nao co so dien thoai [" . $collaborator . "] tren SBG Online.";
+				$aryPatterns = array('/:collaborator:/');
+				$sms = preg_replace($aryPatterns, array($collaborator), lang('_SBG_MO_COLLABORATOR_NOT_FOUND_MSG'));
 				$collaboratorMsg = $status . '|'.$sms;
 				return $status . '|' . $sms;
@@ -71,5 +74,5 @@
 		if(!($data) || is_null($data))
 		{
-			$sms = "Tam thoi ban khong the dang ky duoc. Xin thu lai sau. Cam on!";
+			$sms = lang('_SBG_MO_REGISTER_DISCONTINUE_MSG');
 			$collaboratorMsg = $status . '|'.$sms;
 			return $status . '|' . $sms;
@@ -89,13 +92,16 @@
 				$this->db->query ( 'UNLOCK TABLES' );
 				$this->db->insert ( 'tbluser', $user );
-				$sms = "Chuc mung ban da dang ky thanh cong tai khoan SBG Online. Hay dang nhap vao soanbaigiang.smas.vn voi ten truy nhap " . $username . ", mat khau " . $password . " de su dung. Tran trong.";
+				$aryPatterns = array ('/:username:/', '/:password:/');
+				$sms = preg_replace($aryPatterns, array($collaborator), lang('_SBG_MO_USER_REGISTER_SUCCESS_MSG'));
 				$status = 1;
-				$collaboratorMsg = $status . '|'. 'Ban da dang ky thanh cong dich vu SBG Online cho so dien thoai '.$username;
+				$aryPatterns = array('/:username:/');
+				$collaboratorMsg = $status . '|'. preg_replace($aryPatterns, array($username), lang('_SBG_MO_COLLABOLATOR_REGISTER_SUCCESS_MSG'));
 				break;
 			case 2 :
 			case 4 :
-				$sms = "So dien thoai cua ban da duoc dang ky tai khoan tren SBG Online, vui long kiem tra lai. Tran trong.";
+				$sms = lang('_SBG_MO_USER_REGISTER_DUPLICATE_MSG');
 				$status = 0;
-				$collaboratorMsg = $status . '|'. 'So dien thoai '.$username.' da duoc dang ky tai khoan tren SBG Online.';
+				$aryPatterns = array('/:username:/');
+				$collaboratorMsg = $status . '|'. preg_replace($aryPatterns, array($username), lang('_SBG_MO_COLLABOLATOR_REGISTER_DUPLICATE_MSG'));
 				break;
 			default :
@@ -162,5 +168,6 @@
 		
 		if ($checkSentNumber) {
-			$sms = "So dien thoai " . $sentNumber . " da dang ky tai khoan tren he thong SBG Online. Tran trong.";
+			$aryPatterns = array('/:sentNumber:/');
+			$sms =  preg_replace($aryPatterns, array($sentNumber), lang('_SBG_MO_USER_PHONENUM_CHANGE_DUPLICATE_MSG'));
 			$status = 0;
 			return $status . '|' . $sms;
@@ -174,5 +181,5 @@
 			$token = md5 ( $us_id . self::TOKENPW );
 			$isCorrectPassword = $this->checkPassword($src, $us_id, $token, $password);
-			if(!$isCorrectPassword) return '0|Mat khau cua ban khong dung. Vui long kiem tra lai.';
+			if(!$isCorrectPassword) return '0|'.lang('_SBG_MO_USER_PHONENUM_CHANGE_INCORRECT_PASSWORD_MSG');
 
 			$data = $this->vservices->actionExecute ( 'update', array (
@@ -188,5 +195,5 @@
 			if(!($data) || is_null($data))
 			{
-				$sms = "Tam thoi ban khong the thay doi duoc so dien thoai. Xin thu lai sau. Cam on!";
+				$sms = lang('_SBG_MO_PHONENUM_CHANGE_DISCONTINUE_MSG');
 				$status = 0;
 				return $status . '|' . $sms;
@@ -200,13 +207,16 @@
 					$user ['cellphone'] = $sentNumber;
 					$this->updateUser ( $us_id, $user );
-					$sms = "Ban da doi thanh cong tai khoan " .$username. " tren SBG Online sang so dien thoai " . $sentNumber. ". Tran trong.";
+					$aryPatterns = array('/:username:/', '/:sentNumber:/');
+					$sms =  preg_replace($aryPatterns, array($username, $sentNumber), lang('_SBG_MO_USER_NEW_PHONENUM_CHANGE_SUCCESS_MSG'));
 					$status = 1;
 					break;
 				case 2:
-					$sms = "So dien thoai " . $sentNumber . " da dang ky tai khoan tren he thong SBG Online. Tran trong";
+					$aryPatterns = array('/:sentNumber:/');
+					$sms = preg_replace($aryPatterns, array($sentNumber), lang('_SBG_MO_USER_PHONENUM_CHANGE_DUPLICATE_MSG'));
 					$status = 0;
 					break;
 				case 5 :
-					$sms = "So dien thoai ".$username." chua dang ky tai khoan tren he thong SBG Online. Tran trong.";
+					$aryPatterns = array('/:username:/');
+					$sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_USER_PHONENUM_NOT_REGISTER_MSG'));
 					$status = 0;
 					break;
@@ -217,5 +227,6 @@
 			}
 		} else {
-			$sms = "So dien thoai ".$username." chua dang ky tai khoan tren he thong SBG Online. Tran trong.";
+			$aryPatterns = array('/:username:/');
+			$sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_USER_PHONENUM_NOT_REGISTER_MSG'));
 			$status = 0;
 		}
@@ -250,5 +261,5 @@
 			if(!($data) || is_null($data))
 			{
-				$sms = "Tam thoi ban khong the lay lai hoac thay doi mat khau. Xin thu lai sau. Cam on!";
+				$sms = lang('_SBG_MO_PASSWORD_CHANGE_DISCONTINUE_MSG');
 				$status = 0;
 				return $status . '|' . $sms;
@@ -261,12 +272,15 @@
 					$this->updateUser ( $us_id, $user );
 					if ($isForgotPassword) {
-						$sms = "Mat khau moi cua ban tren SBG online la " . $pass. ". Tran trong.";
+						$aryPatterns = array('/:pass:/');
+						$sms = preg_replace($aryPatterns, array($pass), lang('_SBG_MO_USER_PASSWORD_RECOVERY_MSG'));
 					} else {
-						$sms = "Ban da doi thanh cong mat khau tren SBG Online. Mat khau moi cua ban la " .$password. ". Tran trong.";
+						$aryPatterns = array('/:password:/');
+						$sms = preg_replace($aryPatterns, array($pass), lang('_SBG_MO_USER_PASSWORD_CHANGE_SUCCESS_MSG'));
 					}
 					$status = 1;
 					break;
 				case 5 :
-					$sms = "So dien thoai ".$username." chua dang ky tai khoan tren he thong SBG Online";
+					$aryPatterns = array('/:username:/');
+					$sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_USER_PHONENUM_NOT_REGISTER_MSG'));
 					$status = 0;
 					break;
@@ -277,5 +291,6 @@
 			}
 		} else {
-			$sms = "So dien thoai ".$username." chua dang ky tai khoan tren he thong SBG Online";
+			$aryPatterns = array('/:username:/');
+			$sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_USER_PHONENUM_NOT_REGISTER_MSG'));
 			$status = 0;
 		}
@@ -307,5 +322,5 @@
 		if (!$package)
 		{
-			$sms = "Khong co goi dich vu ban da dang ki tren SBG Online";
+			$sms = lang('_SBG_MO_USER_REGISTER_VIP_NOT_FOUND_MSG');
 			$status = 0;
 			return $status . '|' . $sms;
@@ -326,12 +341,14 @@
 				
 				$this->updateUser ( $us_id, $user );
-				$sms = "Chuc mung ban da dang ky thanh cong dich vu SBG Online. Thoi han su dung dich vu cua ban la ".date ( 'd/m/Y', strtotime ( $user ['expire_date'] ) ).". Tran trong." ;
+				$aryPatterns = array('/:period:/');
+				$sms = preg_replace($aryPatterns, array(date ( 'd/m/Y', strtotime ( $user ['expire_date'] ) )), lang('_SBG_MO_USER_REGISTER_VIP_SUCCESS_MSG'));
 				$status = 1;
 			} else {
-				$sms = "Tai khoan cua ban khong du de dang ky dich vu SBG Online. Vui long nap tien va dang ky lai. Tran trong.";
+				$sms = lang('_SBG_MO_USER_REGISTER_VIP_FAIL_NOT_ENOUGH_MSG');
 				$status = 0;
 			}
 		} else {
-			$sms = "So dien thoai " .$username. " chua dang ky tai khoan tren he thong SBG Online. De dang ky, soan tin SBG DK gui 8062 (500d).";
+			$aryPatterns = array('/:username:/');
+			$sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_ACCOUNT_NOT_FOUND_MSG'));
 			$status = 0;
 		}
@@ -348,8 +365,10 @@
 			$user ['updated_time'] = date ( 'Y-m-d H:i:s' );
 			$this->updateUser ( $us_id, $user );
-			$sms = "Ban da nap thanh cong " . $amount . "VND vao tai khoan " . $username . " tren SBG Online. Tran trong.";
+			$aryPatterns = array('/:amount:/', '/:username:/');
+			$sms = preg_replace($aryPatterns, array($amount, $username), lang('_SBG_MO_PAY_TO_ACCOUNT_SUCCESS_MSG'));
 			$status = 1;
 		} else {
-			$sms = "So dien thoai " .$username. " chua dang ky tai khoan tren he thong SBG Online. De dang ky, soan tin SBG DK gui 8062 (500d).";
+			$aryPatterns = array('/:username:/');
+			$sms = preg_replace($aryPatterns, array($username), lang('_SBG_MO_ACCOUNT_NOT_FOUND_MSG'));
 			$status = 0;
 		}
Index: /pro-violet-viettel/sourcecode/application/modules/frontend/views/home.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/frontend/views/home.php	(revision 635)
+++ /pro-violet-viettel/sourcecode/application/modules/frontend/views/home.php	(revision 636)
@@ -1,3 +1,3 @@
-<?php $base_url = base_url();?>
+<?php $base_url = base_url(); ?>
 <!DOCTYPE html>
 <html lang="en">
@@ -132,23 +132,5 @@
 		      <div class="modal-body">
 		      	<div class="alert alert-block alert-success" style="text-align: justify;">
-	
-						<p>
-							Äá» ÄÄng kÃœ tÃ i khoáº£n tÃ i khoáº£n trÃªn há» thá»ng Soáº¡n BÃ i giáº£ng trá»±c tuyáº¿n (SBG Online), QuÃœ vá» hÃ£y soáº¡n tin nháº¯n theo cÃº phÃ¡p:
-						<strong>
-							SBG DK
-						</strong>
-						gá»­i tá»i
-						<strong>
-						8062</strong> (500Ä/tin).
-						</p>
-						<p>
-						Sau khi nháº­n ÄÆ°á»£c tin nháº¯n ÄÄng kÃ­ tÃ i khoáº£n cá»§a QuÃœ vá», há» thá»ng SBG Online sáºœ gá»­i láº¡i thÃŽng tin ÄÄng nháº­p vÃ o Äiá»n thoáº¡i cá»§a QuÃœ vá».
-						</p>
-						<p>
-						Náº¿u ÄÃ£ nháº­n ÄÆ°á»£c thÃŽng tin ÄÄng nháº­p há» thá»ng SBG Online gá»­i tá»i Äiá»n thoáº¡i cá»§a mÃ¬nh, QuÃœ vá» hÃ£y Äiá»n thÃŽng tin vÃ  nháº¥n vÃ o <strong>ÄÄng nháº­p</strong> Äá» ÄÄng nháº­p vÃ o há» thá»ng.
-						</p>
-						<p>
-						Náº¿u cÃ³ vÆ°á»ng máº¯c gÃ¬ vá» viá»c ÄÄng kÃ­, QuÃœ vá» hÃ£y gá»i sá» <strong>01662860000</strong> Äá» ÄÆ°á»£c há» trá»£.
-						</p>
+						<?php echo lang('_SBG_USER_REGISTER_MSG'); ?>
 				</div>
 		      </div>
@@ -166,7 +148,5 @@
 		      <div class="modal-body">
 		      	<div class="alert alert-block alert-success">						
-							<p>
-								Äá» láº¥y láº¡i máº­t kháº©u cá»§a mÃ¬nh trÃªn há» thá»ng SBG Online, QuÃœ vá» hÃ£y dÃ¹ng <strong>sá» Äiá»n thoáº¡i ÄÃ£ ÄÄng kÃ­ tÃ i khoáº£n</strong> vÃ  soáº¡n tin theo cÃº phÃ¡p: <strong>SBG MK</strong> gá»­i tá»i <strong>8062 </strong>(500Ä/tin).
-							</p>
+					<?php echo lang('_SBG_USER_PASSWORD_RECOVERY_MSG'); ?>
 				</div>
 		      </div>
@@ -225,8 +205,8 @@
 				messages: {
 					username: {
-						required: "Vui lÃ²ng nháº­p tÃ i khoáº£n hoáº·c sá» Äiá»n thoáº¡i",
+						required: "<?php echo lang('_SBG_USER_LOGIN_NAME_REQUIRED_MSG'); ?>",
 					},
 					password: {
-						required: "Vui lÃ²ng nháº­p máº­t kháº©u.",
+						required: "<?php echo lang('_SBG_USER_LOGIN_PASSWORD_REQUIRED_MSG'); ?>",
 					}
 				},
Index: /pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 635)
+++ /pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 636)
@@ -204,5 +204,5 @@
 
                                                 <div class="col-sm-10">
-                                                    <input type="text" id="form-field-pass1" name="pin_card" class="form-control">
+                                                    <input type="text" id="pin_card" name="pin_card" class="form-control">
                                                 </div>
                                             </div>
@@ -214,5 +214,5 @@
 
                                                 <div class="col-sm-10">
-                                                    <input type="text" id="form-field-pass2" name="card_serial" class="form-control">
+                                                    <input type="text" id="card_serial" name="card_serial" class="form-control">
                                                 </div>
                                             </div>
Index: /pro-violet-viettel/sourcecode/application/modules/services/controllers/recharge.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/services/controllers/recharge.php	(revision 635)
+++ /pro-violet-viettel/sourcecode/application/modules/services/controllers/recharge.php	(revision 636)
@@ -9,4 +9,6 @@
 		$this->load->helper('lockfile');
 		$this->load->model('services_model');
+		$this->load->helper('language');
+		$this->lang->load('messages', 'message');
 	}
 	
@@ -33,6 +35,9 @@
 		$result['tmp'] = $maxReach;
 		
-		$lockedMsg = 'QuÃœ vá» ÄÃ£ nháº­p sai thÃŽng tin tháº» cÃ o '. $maxReach .' láº§n liÃªn tiáº¿p.<br />Xin chá» '. $timeToUnlock .' phÃºt sau Äá» thao tÃ¡c láº¡i!';
-		$chargErrMsg = 'MÃ£ tháº» hoáº·c Serial khÃŽng ÄÃºng hoáº·c ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng. QuÃœ vá» vui lÃ²ng kiá»m tra láº¡i!';
+		//$lockedMsg = 'QuÃœ vá» ÄÃ£ nháº­p sai thÃŽng tin tháº» cÃ o '. $maxReach .' láº§n liÃªn tiáº¿p.<br />Xin chá» '. $timeToUnlock .' phÃºt sau Äá» thao tÃ¡c láº¡i!';
+		$aryPatterns = array('/:maxReach:/', '/:timeToUnlock:/');
+		$lockedMsg = preg_replace($aryPatterns, array($maxReach, $timeToUnlock), lang('_SBG_CHARGING_FROM_CARD_LOCKED_MSG'));
+		//$chargErrMsg = 'MÃ£ tháº» hoáº·c Serial khÃŽng ÄÃºng hoáº·c ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng. QuÃœ vá» vui lÃ²ng kiá»m tra láº¡i!';
+		$chargErrMsg = lang('_SBG_CHARGING_FROM_CARD_FAIL_MSG');
 		$errMsg = '';
 		
@@ -59,7 +64,9 @@
 			
 			if ($chargCard == _SBG_CARD_PAY_SUCCESS){
-				$result['username'] = $user['cellphone'];
+				//$result['username'] = $user['cellphone'];
 				$result['acc_balanced'] = $user['acc_balanced'];
-				$result['amount'] = $amount;
+				//$result['amount'] = $amount;
+				$aryPatterns = array('/:amount:/', '/:username:/', '/:acc_balanced:/');
+				$result['message'] = preg_replace($aryPatterns, array($amount, $user['cellphone'], $user['acc_balanced']), lang('_SBG_CHARGING_FROM_CARD_SUCCESS_MSG'));
 				$this->objUserModel->insertPaidlog($user['cellphone'], $user['cellphone'], $paidType, $amount, $paidTime);
 				releaseLockFile($lockFilePreFix, $lockFilePath);
Index: /pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php	(revision 635)
+++ /pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php	(revision 636)
@@ -43,4 +43,6 @@
 if ( ! defined('_SBG_SERVICE_COMMAND_CODE')) define('_SBG_SERVICE_COMMAND_CODE', 'SBG');
 if ( ! defined('_SBG_SERVICE_SERVICEID')) define('_SBG_SERVICE_SERVICEID', '8062');
+
+if ( ! defined('_SBG_MO_PROCCESS_ERR')) define('_SBG_MO_PROCCESS_ERR', 0);
 
 Class Services_model extends CI_Model 
@@ -62,4 +64,6 @@
 	public function __construct(){
 		parent::__construct();
+		$this->load->helper('language');
+		$this->lang->load('messages', 'message');
 	}
 	
@@ -147,5 +151,5 @@
 				if ($case == _SBG_MO_REGISTER_FOR) {
 					if (!preg_match('/^([0-9]{10,11}$)$/', $aryContents[2])) {
-						$smsReturn = '0|So dien thoai khach hang khong hop le. Vui long kiem tra lai.';
+						$smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_PHONENUM_WRONG_FORMAT_MSG');
 						break;
 					}
@@ -169,5 +173,5 @@
 			case _SBG_MO_PHONENUM_CHANGE:
 				if (!preg_match('/^(09\d{8}|01\d{9})$/', $aryContents[2])) {
-					$smsReturn = '0|So dien thoai khach hang khong hop le. Vui long kiem tra lai.';
+					$smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_PHONENUM_WRONG_FORMAT_MSG');
 					break;
 				}
@@ -180,5 +184,7 @@
 				$changeResult = (int)$arySMS[0];
 				
-				$sms = 'Ban da doi thanh cong so dien thoai tren SBG Online sang so dien thoai ' .$sentNumber. '. Tran trong.';
+				//$sms = 'Ban da doi thanh cong so dien thoai tren SBG Online sang so dien thoai ' .$sentNumber. '. Tran trong.';
+				$aryPatterns = array('/:sentNumber:/');
+				$sms = preg_replace($aryPatterns, array($sentNumber), lang('_SBG_MO_USER_OLD_PHONENUM_CHANGE_SUCCESS_MSG'));
 				$sendMT = $changeResult == 1 ? $this->sendMT($this->formatPhoneNumber($oldPhoneNumber, -1), $sms) : '';
 				break;
@@ -199,5 +205,5 @@
 				
 				if ($case == _SBG_MO_PAY_TO_ACCOUNT_FOR && !preg_match('/^(09\d{8}|01\d{9})$/', $userName)) {
-					$smsReturn = '0|So dien thoai khach hang khong hop le. Vui long kiem tra lai.';
+					$smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_PHONENUM_WRONG_FORMAT_MSG');
 					break;
 				}
@@ -205,5 +211,5 @@
 				$amount = $aryContents[2];
 				if (!preg_match('/^[0-9]{3,}$/', $amount)) {
-					$smsReturn = '0|So tien nap khong hop le. Vui long kiem tra lai.';
+					$smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_AMOUNT_WRONG_FORMAT_MSG');
 					break;
 				}
@@ -215,5 +221,7 @@
 					if ($case == _SBG_MO_PAY_TO_ACCOUNT_FOR) {
 						$arySmsReturn = explode ('|', $smsReturn);
-						$smsMT = 'Ban da nap thanh cong ' .$amount . 'VND vao tai khoan ' .$username. ' tren SBG Online tu thue bao ' .$sentNumber. '. Tran trong.';
+						//$smsMT = 'Ban da nap thanh cong ' .$amount . 'VND vao tai khoan ' .$username. ' tren SBG Online tu thue bao ' .$sentNumber. '. Tran trong.';
+						$aryPatterns = array('/:amount:/', '/:username:/', '/:sentNumber:/');
+						$smsMT = preg_replace($aryPatterns, array($amount, $username, $sentNumber), lang('_SBG_MO_PAY_TO_ACCOUNT_FOR_MSG'));
 						$sendMT = $this->sendMT($this->formatPhoneNumber($userName, -1), $smsMT);
 					}
@@ -226,16 +234,18 @@
 					//$smsReturn = preg_replace($aryPatterns, array($sentNumber, $amount, $userName), _SBG_CHARGING_FAIL_NOT_ENOUGH_MSG);
 					$aryPatterns = array ('/:amount:/', '/:username:/');
-					$smsReturn = preg_replace($aryPatterns, array($amount, $userName), _SBG_CHARGING_FAIL_NOT_ENOUGH_MSG);
-					$smsReturn = '0|'.$smsReturn;
+					//$smsReturn = preg_replace($aryPatterns, array($amount, $userName), _SBG_CHARGING_FAIL_NOT_ENOUGH_MSG);
+					$smsReturn = preg_replace($aryPatterns, array($amount, $userName), lang('_SBG_MO_CHARGING_FAIL_NOT_ENOUGH_MSG'));
+					$smsReturn = _SBG_MO_PROCCESS_ERR.'|'.$smsReturn;
 				}
 				else if ($result == _SBG_CHARGING_FAIL_MORETHAN_LIMIT) {
 					$aryPatterns = array ('/:sendid:/');
-					$smsReturn = preg_replace($aryPatterns, array($sentNumber), _SBG_CHARGING_FAIL_MORETHAN_LIMIT_MSG);
-					$smsReturn = '0|'.$smsReturn;
+					//$smsReturn = preg_replace($aryPatterns, array($sentNumber), _SBG_CHARGING_FAIL_MORETHAN_LIMIT_MSG);
+					$smsReturn = preg_replace($aryPatterns, array($sentNumber), lang('_SBG_MO_CHARGING_FAIL_MORETHAN_LIMIT_MSG'));
+					$smsReturn = _SBG_MO_PROCCESS_ERR.'|'.$smsReturn;
 				}else if ($result == _SBG_CHARGING_FAIL_NOT_VIETTEL || $result == _SBG_CHARGING_NUMBER_NOT_EXISTED || $result == _SBG_CHARGING_NUMBER_NOT_AVAILABLE) {
-					$smsReturn = '0|'._SBG_CHARGING_FAIL_NOT_VIETTEL_MSG;
+					$smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_CHARGING_FAIL_NOT_VIETTEL_MSG');
 				}				
 				else {
-					$smsReturn = '0|Loi, khong thanh toan duoc tu tai khoan goc';
+					$smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_CHARGING_FAIL_MSG');
 				}
 				break;
@@ -243,5 +253,5 @@
 			case _SBG_MO_SYNTAX_ERR:
 			default:
-				$smsReturn = '0|'._SBG_MO_SYNTAX_ERR_MSG;
+				$smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_SYNTAX_ERR_MSG');
 				break;
 		}
Index: /pro-violet-viettel/sourcecode/assets/js/frontend/user.js
===================================================================
--- /pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 635)
+++ /pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 636)
@@ -153,4 +153,5 @@
 			{
 				$("#success_charge").find('#success_charge_info').text("QuÃœ vá» ÄÃ£ náº¡p thÃ nh cÃŽng " + result.amount + " VNÄ vÃ o tÃ i khoáº£n " + result.username + ", tÃ i khoáº£n áº£o cá»§a QuÃœ vá» lÃ  " + result.acc_balanced + " VNÄ!");
+				//$("#success_charge").find('#success_charge_info').text(result.message);
 				$("#success_charge").modal('show');
 				$("#vip-regis-money").text(addCommas(result.acc_balanced));
