Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 454)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 454)
@@ -0,0 +1,84 @@
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+class User extends MX_Controller
+{
+	public function __construct()
+	{
+		parent::__construct();
+		$this->load->helper('cookie');
+	}
+	
+	public function profile()
+	{
+		$user = "us_id=9075011&username=0979947802&fullname=Nam Nguyen&gender=female&email=namndmk@gmail.com&phone=&school=&province=&status=4&errMsg=Account is not activated";
+		$data = $this->get_data($user);
+		$this->load->view('frontend/user_profile', $data);
+		/*
+		$user_info = $this->session->userdata('userInfo');
+		if ($user_info)
+		{
+			$user = $user_info['user'];
+			$data = $this->get_data($user);
+			$this->load->view('/frontend/user_profile', $data);
+			
+		}else
+		{
+			redirect('/frontend/home');
+		}*/
+	}
+	
+	private function get_data($user)
+	{
+		$this->load->model('user_model');
+		$arr_users = explode("&", $user);
+		$str_id = $arr_users[0];
+		$str_username = $arr_users[1];
+		$str_fullname = $arr_users[2];
+		$str_gender = $arr_users[3];
+		$str_email = $arr_users[4];
+		$str_phone = $arr_users[5];
+		$str_school = $arr_users[6];
+		$str_province = $arr_users[7];
+		$str_money = $arr_users[8];
+		$str_level = $arr_users[9];
+		$arr_id = explode("=", $str_id);
+		$arr_username = explode("=", $str_username);
+		$arr_fullname = explode("=", $str_fullname);
+		$arr_gender = explode("=", $str_gender);
+		$arr_email = explode("=", $str_email);
+		$arr_phone = explode("=", $str_phone);
+		$arr_school = explode("=", $str_school);
+		$arr_province = explode("=", $str_province);
+		$arr_money = explode("=", $str_money);
+		$arr_level = explode("=", $str_level);
+		$us = $this->user_model->get_user_by_id($arr_id[1]);
+		$data = array('us_id'=>$arr_id[1], 'username'=>$arr_username[1], 'full_name'=>$arr_fullname[1],
+					'gender'=>$arr_gender[1], 'email'=>$arr_email[1], 'phone'=>$arr_phone[1], 'school'=>$arr_school[1],
+					'acc_balanced'=>$us['acc_balanced'], 'expire_date'=>$us['expire_date'], 'date_diff'=>$this->dateDiff($us['expire_date'])
+				);
+		return $data;
+	}
+	
+	private function dateDiff($expire_date)
+	{
+		$date1 = date("Y-m-d");
+		$diff = abs(strtotime($expire_date) - strtotime($date1));
+		$years = floor($diff / (365*60*60*24));
+		$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
+		$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
+		if ($years>0){
+			return $years." nÄm, ".$months." thÃ¡ng, ".$days." ngÃ y cÃ²n láº¡i";
+		}
+		else{
+			if ($months>0)
+			{
+				return  $months." thÃ¡ng, ".$days." ngÃ y cÃ²n láº¡i";
+			}
+			else
+			{
+				return $days." ngÃ y cÃ²n láº¡i";
+			}
+		}
+		
+	}
+}
Index: pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 450)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 454)
@@ -133,3 +133,14 @@
 		return implode($pass);
 	}
+	
+	function get_user_by_id($us_id)
+	{
+		$this->db->select('*')->from('tbluser')->where('us_id', $us_id);
+		$query = $this->db->get();
+		if($query->num_rows() > 0)
+		{
+			$row = $query->row_array();
+			return $row;
+		}
+	}
 }
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 454)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 454)
@@ -0,0 +1,330 @@
+<?php
+$this->load->view('layout/frontend/header', array('base_url'=>base_url(), '$username'=>$username));
+$base_url = base_url();
+$this->load->view('layout/frontend/sidebar');
+?>
+<div class="main-content">
+
+	<div class="page-content">
+		<div class="page-header">
+			<h1>
+				ThÃŽng tin cÃ¡ nhÃ¢n
+				<small>
+					<i class="icon-double-angle-right"></i>
+					<?php echo $username; ?>
+				</small>
+			</h1>
+		</div><!-- /.page-header -->
+
+		<div class="row">
+			<div class="col-xs-12">
+				<!-- PAGE CONTENT BEGINS -->
+				<div class="user-profile row" id="user-profile-3">
+					<div class="col-sm-offset-1 col-sm-10">
+
+							<div class="tabbable">
+								<ul class="nav nav-tabs padding-16">
+									<li class="active">
+										<a href="#edit-basic" data-toggle="tab">
+											<i class="green icon-edit bigger-125"></i>
+											ThÃŽng tin cÃ¡ nhÃ¢n
+										</a>
+									</li>
+
+									<li>
+										<a href="#edit-password" data-toggle="tab">
+											<i class="blue icon-key bigger-125"></i>
+											Äá»i máº­t kháº©u
+										</a>
+									</li>
+
+									<li>
+										<a href="#account-info" data-toggle="tab">
+											<img src="<?php echo $base_url; ?>assets/img/payment.png" width="16" class="img-responsive pull-left">
+											ThÃŽng tin tÃ i khoáº£n
+										</a>
+									</li>
+								</ul>
+
+								<div class="tab-content profile-edit-tab-content">
+									<div class="tab-pane in active" id="edit-basic">
+										<form id="frm1" role="form" class="form-horizontal">
+											<h4 class="header blue bolder smaller">ThÃŽng tin chung</h4>
+
+											<div class="row">
+
+												<div class="vspace-xs"></div>
+
+												<div class="col-xs-12 col-sm-8">
+													<div class="form-group">
+														<label for="form-field-username" class="col-sm-4 control-label no-padding-right">TÃ i khoáº£n</label>
+
+														<div class="col-sm-8">
+															<input type="text" name="login_name" value="<?php echo $username; ?>" placeholder="TÃ i khoáº£n" id="form-field-username" class="col-xs-12 col-sm-10" disabled>
+														</div>
+													</div>
+
+													<div class="space-4"></div>
+
+													<div class="form-group">
+														<label for="form-field-first" class="col-sm-4 control-label no-padding-right">Há» tÃªn</label>
+
+														<div class="col-sm-8">
+															<input type="text" name="full_name" value="<?php echo $full_name; ?>" placeholder="Há»" id="form-field-first" class="col-xs-12 col-sm-10">
+								
+														</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 type="text" name="school" value="<?php echo $school; ?>" placeholder="ÄÆ¡n vá»" id="form-field-username" class="col-xs-12 col-sm-10">
+														</div>
+													</div>
+
+												</div>
+											</div>
+
+											<hr>
+
+											<div class="space-4"></div>
+
+											<div class="form-group">
+												<label class="col-sm-3 control-label no-padding-right">Giá»i tÃ­nh</label>
+
+												<div class="col-sm-9">
+													<label class="inline">
+														<input type="radio" class="ace" name="form-field-radio">
+														<span class="lbl"> Nam</span>
+													</label>
+
+													&nbsp; &nbsp; &nbsp;
+													<label class="inline">
+														<input type="radio" class="ace" name="form-field-radio">
+														<span class="lbl"> Ná»¯</span>
+													</label>
+												</div>
+											</div>
+
+											<div class="space"></div>
+											<h4 class="header blue bolder smaller">ThÃŽng tin liÃªn há»</h4>
+
+											<div class="form-group">
+												<label for="form-field-email" class="col-sm-3 control-label no-padding-right">Email</label>
+
+												<div class="col-sm-9">
+													<span class="input-icon input-icon-right">
+														<input name="email" type="email" value="<?php echo $email; ?>" id="form-field-email">
+														<i class="icon-envelope"></i>
+													</span>
+												</div>
+											</div>
+
+											<div class="clearfix form-actions">
+												<div class="col-md-offset-3 col-md-9">
+													<button type="button" onclick="return updateInfo();" class="btn btn-info">
+														<i class="icon-ok bigger-110"></i>
+														Cáº­p nháº­t
+													</button>
+												</div>
+											</div>
+										</form>
+									</div>
+
+									
+									<div class="tab-pane" id="edit-password">
+										<form id="frm2" class="form-horizontal" role="form">
+											<div class="form-group">
+												<label for="form-field-passwd" class="col-sm-3 control-label no-padding-right">Máº­t kháº©u hiá»n táº¡i</label>
+												<div class="col-sm-9">
+													<label class="block clearfix has-error">
+														<span class="input-icon">
+															<input type="password" name="passwd" id="form-field-pass1">
+															<i class="icon-lock blue"></i>
+														</span>
+					
+														<div class="help-block" id="passwd_old_err"> </div>
+													</label>
+													
+												</div>
+											</div>
+											
+											<div class="form-group">
+												<label for="form-field-pass1" class="col-sm-3 control-label no-padding-right">Máº­t kháº©u má»i</label>
+
+												<div class="col-sm-9">
+													<label class="block clearfix has-error">
+														<span class="input-icon">
+															<input type="password" name="passwd_new" id="form-field-pass1">
+															<i class="icon-lock blue"></i>
+														</span>
+														<div class="help-block" id="passwd_new_err"> </div>
+													</label>
+												</div>
+											</div>
+
+											<div class="space-4"></div>
+
+											<div class="form-group">
+												<label for="form-field-pass2" class="col-sm-3 control-label no-padding-right">XÃ¡c nháº­n máº­t kháº©u má»i</label>
+
+												<div class="col-sm-9">
+													<label class="block clearfix has-error">
+														<span class="input-icon">
+															<input type="password" name="confirm_passwd_new" id="form-field-pass2">
+														</span>
+														<div class="help-block" id="confirm_passwd_new_err"> </div>
+													</label>
+												</div>
+											</div>
+											<div class="clearfix form-actions">
+												<div class="col-md-offset-3 col-md-9">
+													<button type="button" onclick="return changePassword();"  class="btn btn-info">
+														<i class="icon-ok bigger-110"></i>
+														Thay Äá»i máº­t kháº©u
+													</button>
+												</div>
+											</div>
+											
+											</form>
+									</div>
+
+									<div class="tab-pane" id="account-info">
+										<form id="frm3" class="form-horizontal" role="form">
+											<h4 class="header blue bolder smaller">ThÃŽng tin tÃ i khoáº£n</h4>
+											<div class="col-sm-6">
+												<h4>Sá» tiá»n </h4> <h3><?php echo $acc_balanced; ?> VND</h3>
+											</div>
+											<div class="col-sm-6">
+												<h4>Thá»i báº¡n sá»­ dá»¥ng </h4> <h3><?php echo $expire_date; ?> <span class="badge"><?php echo $date_diff; ?></span></h3>
+											</div>
+
+											<h4 class="header blue bolder smaller">Náº¡p tiá»n báº±ng tháº» cÃ o</h4>
+											<div class="col-sm-8">
+												<div class="form-group">
+													<label for="form-field-pass1" class="col-sm-2 control-label no-padding-right">MÃ£ tháº»</label>
+
+													<div class="col-sm-10">
+														<input type="text" id="form-field-pass1" class="form-control">
+													</div>
+												</div>
+
+												<div class="space-4"></div>
+
+												<div class="form-group">
+													<label for="form-field-pass2" class="col-sm-2 control-label no-padding-right">Serial</label>
+
+													<div class="col-sm-10">
+														<input type="text" id="form-field-pass2" class="form-control">
+													</div>
+												</div>
+											</div>
+											<div class="col-sm-4">
+												<button type="button" class="btn btn-success" data-toggle="modal" data-target="#alert-payment">
+													<i class="icon-ok bigger-110"></i>
+													Tiáº¿p tá»¥c
+												</button>
+												<div class="space-4"></div>
+												<a href="#" data-toggle="modal" data-target="#trade-history"><i class="icon-archive"></i> Lá»ch sá»­ giao dá»ch</a>
+											</div>
+											<div class="clearfix">
+												
+											</div>
+											<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>
+													Sá»­ dá»¥ng thuÃª bao <strong>016825764</strong> soáº¡n tin nháº¯n: <strong>SBG NAP [sotien] gá»­i 8062</strong>. <br/>
+													Náº¿u quÃ­ vá» sá»­ dá»¥ng thuÃª bao Viettel khÃ¡c thÃ¬ soáº¡n tin nháº¯n: <strong>SBG NAP [tentruynhap] 
+													[sotien] gá»­i tá»i 8062</strong>.
+												</p>
+											</div>
+										</form>
+									</div>
+
+								</div>
+							</div>
+					</div><!-- /span -->
+				</div>
+
+				<!-- PAGE CONTENT ENDS -->
+			</div><!-- /.col -->
+		</div><!-- /.row -->
+	</div><!-- /.page-content -->
+</div><!-- /.main-content -->
+</div><!-- /.main-container-inner -->
+
+<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
+<i class="icon-double-angle-up icon-only bigger-110"></i>
+</a>
+</div><!-- /.main-container -->
+
+<div class="modal fade" id="trade-history" tabindex="-1" role="dialog"aria-hidden="true">
+<div class="modal-dialog">
+<div class="modal-content">
+<div class="modal-header">
+<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+<h4 class="modal-title">Lá»ch sá»­ giao dá»ch</h4>
+</div>
+<div class="modal-body">
+<div class="table-responsive">
+			<table id="sample-table-1" class="table table-striped table-bordered table-hover">
+				<thead>
+					<tr>
+						<th class="center">
+							<label>
+								<input type="checkbox" class="ace" />
+								<span class="lbl"></span>
+							</label>
+						</th>
+						<th>Sá» tiá»n</th>
+
+						<th>
+							<i class="icon-time bigger-110 hidden-480"></i>
+							Thá»i gian
+						</th>
+					</tr>
+				</thead>
+
+				<tbody>
+					<tr>
+						<td class="center">
+							<label>
+								<input type="checkbox" class="ace" />
+								<span class="lbl"></span>
+							</label>
+						</td>
+						<td>$45</td>
+						<td>Feb 12</td>
+					</tr>
+				</tbody>
+			</table>
+		</div><!-- /.table-responsive -->
+</div>
+</div>
+</div>
+</div>
+
+<div class="modal fade" id="alert-payment" tabindex="-1" role="dialog"aria-hidden="true">
+<div class="modal-dialog">
+<div class="modal-content">
+<div class="modal-header">
+<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+<h4 class="modal-title">ThÃŽng bÃ¡o dá»ch vá»¥</h4>
+</div>
+<div class="modal-body">
+<div class="alert alert-block alert-success">						
+			<p>
+				QuÃ­ vá» ÄÃ£ náº¡p thÃ nh cÃŽng <b>10.000 </b>VND vÃ o tÃ i khoáº£n <b>0168942155</b>, tÃ i khoáº£n hiá»n táº¡i cá»§a quÃ­ vá» lÃ  <b>20.000 </b>VND.
+			</p>
+		</div>
+</div>
+</div>
+</div>
+</div>
+		
+<?php
+$this->load->view('layout/frontend/footer');
+?>
