Index: pro-violet-viettel/sourcecode/application/config/routes.php
===================================================================
--- pro-violet-viettel/sourcecode/application/config/routes.php	(revision 423)
+++ pro-violet-viettel/sourcecode/application/config/routes.php	(revision 424)
@@ -87,4 +87,7 @@
 $route['admin/quan_tri_vien/cap_nhat'] = 'admin/admin_acc/update_admin';
 $route['admin/quan_tri_vien/xem/:any'] = 'admin/admin_acc/get_admin_by_id/$1';
+$route['admin/quan_tri_vien/thong_tin_ca_nhan'] = 'admin/admin_acc/admin_profile';
+$route['admin/quan_tri_vien/cap_nhat_thong_tin_ca_nhan'] = 'admin/admin_acc/update_info';
+$route['admin/quan_tri_vien/doi_mat_khau'] = 'admin/admin_acc/change_password';
 
 $route['admin/nguoi_dung'] = 'admin/user';
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php	(revision 423)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php	(revision 424)
@@ -65,6 +65,6 @@
 		{
 			$this->load->helper('email');
-			$result['success'] = 0;
-			$result = array();
+			$result = array();
+			$result['success'] = 0;
 			$input = $this->input->post();
 			$this->load->model('admin_model');
@@ -115,4 +115,5 @@
 			{
 				unset($input['pwd2']);
+				$input['passwd'] = md5($input['passwd']);
 				$input['created_time']=date("Y-m-d H:i:s");
 				$input['updated_time']=date("Y-m-d H:i:s");
@@ -131,20 +132,4 @@
 		if ($admin_info)
 		{
-			/*
-			$input = $this->input->post();
-			$result = array();
-			$result['success'] = 0;
-			$admin_id = (int)$this->uri->segment(4, 0);
-			if ($admin_id==0){
-				$result['success'] = 0;
-			}else
-			{
-				$this->load->model('admin_model');
-				$input['updated_time']=date("Y-m-d H:i:s");
-				$this->admin_model->update($admin_id, $input);
-				$result['success'] = 1;
-			}
-			echo json_encode($result);*
-			*/
 			$admin_id = $this->uri->segment(4);
 			$this->load->model('admin_model');
@@ -165,5 +150,4 @@
 			$result = array();
 			$result['success'] = 0;
-			//$admin_id = $this->uri->segment(4);
 			$this->load->model('admin_model');
 			$input['updated_time']=date("Y-m-d H:i:s");
@@ -214,3 +198,102 @@
 		}
 	}
+	
+	public function admin_profile()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if($admin_info)
+		{
+			$admin_id = $admin_info['admin_id'];
+			$this->load->model(array('admin_model'));
+			$data = $this->admin_model->search_by_id($admin_id);
+			$this->load->view('admin_acc/admin_profile', $data);
+		}else
+		{
+			$this->load->view('login');
+		}
+	}
+	
+	public function update_info()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if ($admin_info)
+		{
+			$this->load->helper('email');
+			$input = $this->input->post();
+			$result = array();
+			$result['success'] = 0;
+			if(strlen($input['email'])>0){
+				if(!valid_email($input['email']))
+				{
+					$result['errors']['email_err']="Email khÃŽng ÄÃºng Äá»nh dáº¡ng";
+				}
+			}
+			if(strlen($input['phone'])>0){
+				if (!preg_match('/[0-9]/', $input['phone']))
+				{
+					$result['errors']['phone_err']="Phone khÃŽng ÄÃºng Äá»nh dáº¡ng";
+				}
+			}
+			if (!isset($result['errors']))
+			{
+				$input['admin_id'] = $admin_info['admin_id'];
+				$input['updated_time']=date("Y-m-d H:i:s");
+				$this->load->model('admin_model');
+				$this->admin_model->update($input['admin_id'], $input);
+				$result['success'] = 1;
+			}
+			echo json_encode($result);
+		}else
+		{
+			$this->load->view('login');
+		}
+	}
+	
+	public function change_password()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if ($admin_info){
+			$result = array();
+			$result['success'] = 0;
+			$this->load->model('admin_model');
+			$input = $this->input->post();
+			$input['admin_id'] = $admin_info['admin_id'];
+			if (strlen($input['passwd']) == 0)
+			{
+				$result['errors']['passwd_old_err'] = "Máº­t kháº©u khÃŽng ÄÆ°á»£c Äá» trá»ng !";
+			}else
+			{
+				$check_pass = $this->admin_model->check_password($input['admin_id'], $input['passwd']);
+				if (!$check_pass)
+				{
+					$result['errors']['passwd_old_err'] = "Máº­t kháº©u cung cáº¥p khÃŽng ÄÃºng !";
+				}
+			}
+			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 !";
+			}
+			if ($input['passwd_new'] != $input['confirm_passwd_new'])
+			{
+				$result['errors']['confirm_passwd_new_err'] = "Máº­t kháº©u khÃŽng trÃ¹ng nhau !";
+			}
+			if (!isset($result['errors']))
+			{
+				$updated_time=date("Y-m-d H:i:s");
+				$data = array('passwd'=>md5($input['passwd_new']), 'updated_time'=>$updated_time);
+				$this->admin_model->update($input['admin_id'], $data);
+				$result['success'] = 1;
+			}
+			
+			echo json_encode($result);
+		}else
+		{
+			$this->load->view('login');
+		}
+		
+	}
+	
 }
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php	(revision 423)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php	(revision 424)
@@ -48,18 +48,3 @@
 		redirect("/admin/home");
 	}
-	
-	public function admin_profile()
-	{
-		$admin_info = $this->session->userdata('adminInfo');
-		if($admin_info)
-		{
-			$admin_id = $admin_info['admin_id'];
-			$this->load->model(array('admin_model'));
-			$data = $this->admin_model->search_by_id($admin_id);
-			$this->load->view('admin_acc/admin_profile', $data);
-		}else
-		{
-			redirect("/admin/home");
-		}
-	}
 }
Index: pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php	(revision 423)
+++ pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php	(revision 424)
@@ -16,5 +16,5 @@
 		$hash_password = md5($password);
 		$query = "SELECT * FROM tbladmin WHERE  login_name = ? AND  passwd = ?";
-                $result = $this->db->query($query, array($login_name, $hash_password));
+		$result = $this->db->query($query, array($login_name, $hash_password));
 		if($result->num_rows() == 1){
 			return $result->row(0);
@@ -61,3 +61,17 @@
 		return $this->db->query($sql)->row_array()['total'];
 	}
+	
+	function check_password($admin_id, $passwd)
+	{
+		$hash_passwd = md5($passwd);
+		$sql = "SELECT * FROM ".$this->table_name." WHERE admin_id = ? AND  passwd = ?";
+		$result = $this->db->query($sql, array($admin_id, $hash_passwd));
+		if($result->num_rows() == 1){
+			return true;
+		}else
+		{
+			return false;
+		}
+		
+	}
 }
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc/admin_profile.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc/admin_profile.php	(revision 423)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc/admin_profile.php	(revision 424)
@@ -44,5 +44,5 @@
 									<div class="col-sm-offset-1 col-sm-10">
 
-										<form id="profile" class="form-horizontal">
+										<!--form id="profile" class="form-horizontal"-->
 											<div class="tabbable">
 												<ul class="nav nav-tabs padding-16">
@@ -63,73 +63,94 @@
 
 												<div class="tab-content profile-edit-tab-content">
-													<div class="tab-pane in active" id="edit-basic">
+													<div class="tab-pane in active" id="edit-basic" class="form-horizontal">
+														<div class="space-10"></div>
+														<form id="frm1" role="form" class="form-horizontal">
 														<h4 class="header blue bolder smaller">ThÃŽng tin chung</h4>
-
-														<div class="row">
-
-															<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" value="<?php echo $login_name; ?>" name="login_name"  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" value="<?php echo $full_name; ?>" name="full_name" placeholder="Há» tÃªn" id="form-field-full_name" class="col-xs-12 col-sm-10">
-																	</div>
-																</div>
-															</div>
-														</div>
-
+														
+														<div class="form-group">
+															<label for="form-field-1" class="col-sm-3 control-label no-padding-right"> TÃ i khoáº£n </label>
+															<div class="col-sm-9">
+																<span class="input-icon">
+																	<input type="text" name="login_name" placeholder="TÃ i khoáº£n" value="<?php echo $login_name; ?>" disabled>
+																	<i class="icon-user blue"></i>
+																</span>
+															</div>
+															<label class="block clearfix has-error">
+																<div class="help-block"> </div>
+															</label>
+														</div>
+														
+														
+														<div class="form-group">
+															<label for="form-field-2" class="col-sm-3 control-label no-padding-right"> Há» tÃªn </label>
+															<div class="col-sm-9">
+																<span class="input-icon">
+																	<input type="text" name="full_name" placeholder="Há» tÃªn" value="<?php echo $full_name; ?>">
+																	<i class="icon-user blue"></i>
+																</span>
+															</div>
+															<label class="block clearfix has-error">
+																<div class="help-block"> </div>
+															</label>
+														</div>
+					
 														<hr>
 
 														<div class="space-4"></div>
 														<h4 class="header blue bolder smaller">ThÃŽng tin liÃªn há»</h4>
-
-														<div class="row">
-
-															<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">Email</label>
-
-																	<div class="col-sm-8">
-																		<span class="input-icon input-icon-right">
-																			<input type="email" value="<?php echo $email; ?>" name="email" style="width: 308px;" placeholder="Email" id="form-field-email">
-																			<i class="icon-envelope"></i>
+														<div class="form-group">
+															<label for="form-field-3" class="col-sm-3 control-label no-padding-right"> Email </label>
+																<div class="col-sm-9">
+																	<label class="block clearfix has-error">
+																		<span class="input-icon">
+																			<input type="text" name="email" placeholder="Email" value="<?php echo $email; ?>">
+																			<i class="icon-envelope blue"></i>
 																		</span>
-																	</div>
+																		<div class="help-block" id="email_err"> </div>
+																	</label>
+																</div>		
+															</label>
+														</div>
+														
+														<div class="form-group">
+															<label for="form-field-4" class="col-sm-3 control-label no-padding-right"> Phone </label>
+																<div class="col-sm-9">
+																	<label class="block clearfix has-error">
+																		<span class="input-icon">
+																			<input type="text" name="phone" placeholder="Phone" value="<?php echo $phone; ?>">
+																			<i class="icon-phone blue"></i>
+																		</span>
+																		<div class="help-block" id="phone_err"> </div>
+																	</label>
 																</div>
-
-																<div class="space-4"></div>
-
-																<div class="form-group">
-																	<label for="form-field-first" class="col-sm-4 control-label no-padding-right">Phone</label>
-
-																	<div class="col-sm-8">
-																		<span class="input-icon input-icon-right">
-																			<input type="number" value="<?php echo $phone; ?>" name="phone" style="width: 308px;" placeholder="Phone" id="form-field-phone" class="col-xs-12 col-sm-10">
-																			<i class="icon-phone"></i>
-																		</span>
-																	</div>
-																</div>
-															</div>
-														</div>
-														
+															</label>
+														</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">
 														<div class="space-10"></div>
-														<form>
-														<div class="form-group">
-															<label for="form-field-passwd" class="col-sm-3 control-label no-padding-right">Máº­t kháº©u cÅ©</label>
-															<div class="col-sm-9">
-																<input type="password" name="passwd" id="form-field-pass1">
+														<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>
@@ -139,5 +160,11 @@
 
 															<div class="col-sm-9">
-																<input type="password" name="passwd_new" id="form-field-pass1">
+																<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>
@@ -146,10 +173,24 @@
 
 														<div class="form-group">
-															<label for="form-field-pass2" class="col-sm-3 control-label no-padding-right">Nháº­p láº¡i máº­t kháº©u</label>
-
-															<div class="col-sm-9">
-																<input type="password" name="passwd_new_2" id="form-field-pass2">
-															</div>
-														</div>
+															<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>
@@ -157,13 +198,6 @@
 											</div>
 
-											<div class="clearfix form-actions">
-												<div class="col-md-offset-3 col-md-9">
-													<button type="button" id="edit-tab" class="btn btn-info">
-														<i class="icon-ok bigger-110"></i>
-														Cáº­p nháº­t
-													</button>
-												</div>
-											</div>
-										</form>
+											
+										<!--/form-->
 									</div><!-- /span -->
 								</div>
Index: pro-violet-viettel/sourcecode/application/views/layout/admin/header.php
===================================================================
--- pro-violet-viettel/sourcecode/application/views/layout/admin/header.php	(revision 423)
+++ pro-violet-viettel/sourcecode/application/views/layout/admin/header.php	(revision 424)
@@ -61,5 +61,5 @@
 							<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
 								<li>
-									<a href="<?php echo $base_url; ?>admin/home/admin_profile">
+									<a href="<?php echo $base_url; ?>admin/quan_tri_vien/thong_tin_ca_nhan">
 										<i class="icon-user"></i>
 										ThÃŽng tin cÃ¡ nhÃ¢n
Index: pro-violet-viettel/sourcecode/assets/js/admin/admin.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/admin/admin.js	(revision 423)
+++ pro-violet-viettel/sourcecode/assets/js/admin/admin.js	(revision 424)
@@ -89,10 +89,5 @@
 			else
 			{	
-				/*
-				for(var i =0;i < $result.errors.length;i++)
-				{
-				  var er= $result.errors[i];
-				  $("#add_user_"+id).append("<div class='error'>"+er+"</div>");
-				}*/
+				console.log("Update error");
 			}
 		},
@@ -149,4 +144,60 @@
 });
 
-$("#edit_tab").click(function(){
-});
+function updateInfo()
+{
+	$('#email_err').html("");
+	$('#phone_err').html("");
+	$.ajax({
+		url: "cap_nhat_thong_tin_ca_nhan",
+		type: "POST",
+		data: $("#frm1").serialize(),
+		success: function (data, textStatus, jqXHR)
+		{
+			result = jQuery.parseJSON(data);
+			if (result.success == "1")
+			{   
+				window.location.reload(true);
+			}
+			else
+			{
+				for (var key in result.errors)
+				{
+					//console.log(result.errors[key]);
+					$('#'+key).html(result.errors[key]);
+				}
+			}
+			
+		},
+               
+	});
+}
+
+function changePassword()
+{
+	$('#passwd_old_err').html("");
+	$('#passwd_new_err').html("");
+	$('#confirm_passwd_new_err').html("");
+	$.ajax({
+		url: "doi_mat_khau",
+		type: "POST",
+		data: $("#frm2").serialize(),
+		success: function (data, textStatus, jqXHR)
+		{
+			result = jQuery.parseJSON(data);
+			if (result.success == "1")
+			{   
+				window.location.reload(true);
+			}
+			else
+			{
+				for (var key in result.errors)
+				{
+					//console.log(result.errors[key]);
+					$('#'+key).html(result.errors[key]);
+				}
+			}
+			
+		},
+               
+	});
+}
