Index: pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc.php	(revision 350)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc.php	(revision 351)
@@ -47,5 +47,5 @@
 						<script src="<?php echo $base_url;?>assets/js/jquery.dataTables.bootstrap.js"></script>
 						<script type="text/javascript">
-
+							
 							jQuery(function($) {
 								var oTable1 = $('#sample-table-2').dataTable( {
@@ -132,11 +132,9 @@
 															<i class="icon-zoom-in bigger-130"></i>
 														</a>
-														<a class="green" data-admin-id="<?php echo $key; ?>" data-toggle="modal" href="#editAdmin">
-														<!--a class="green" href="#"-->
+														<a class="green" data-admin-index="<?php echo $key; ?>" data-toggle="modal" href="#editAdmin">
 															<i class="icon-pencil bigger-130"></i>
-														<!--/a-->
 														</a>
-
-														<a class="red" href="#">
+														<!-- Delete -->
+														<a class="red" data-admin-id="<?php echo $value->admin_id; ?>" data-toggle="modal" href="#deleteAdmin">
 															<i class="icon-trash bigger-130"></i>
 														</a>
@@ -159,15 +157,15 @@
 
 																<li>
-																	<button class="btn btn-edit pull-right" data-toggle="modal" href="#addUser">
+																	<a class="green" data-admin-index="<?php echo $key; ?>" data-toggle="modal" href="#editAdmin">
 																	<!--a href="#" class="tooltip-success" data-rel="tooltip" title="Edit"-->
 																		<span class="green">
 																			<i class="icon-edit bigger-120"></i>
 																		</span>
-																	<!--/a-->
+																	</a>
 																	</button>
 																</li>
 
 																<li>
-																	<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
+																	<a class="red" data-admin-id=<?php echo $value->admin_id; ?> data-toggle="modal" href="#deleteAdmin">
 																		<span class="red">
 																			<i class="icon-trash bigger-120"></i>
@@ -185,4 +183,6 @@
 									</table>
 								</div>
+								
+								<!-- Edit User -->
 								<div tabindex="-1" class="modal fade in" id="editAdmin">
 									<div class="modal-dialog">
@@ -196,7 +196,8 @@
 												</div>
 											</div>
-
+									
 											<div class="modal-body">
-												<form role="form" class="form-horizontal">
+												<form method="post" class="form-horizontal validation-form" id="validation-form" action="<?php echo $base_url; ?>admin/home/update">
+													<input type="hidden" name="id" id="form-field-0" value="">
 													<div class="form-group">
 														<label for="form-field-1" class="col-sm-3 control-label no-padding-right"> TÃ i khoáº£n </label>
@@ -205,4 +206,44 @@
 																<input type="text" name="username" placeholder="TÃ i khoáº£n" id="form-field-1" value="">
 																<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="fullname" placeholder="Há» tÃªn" id="form-field-2" value="">
+																<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-3" class="col-sm-3 control-label no-padding-right"> Email </label>
+														<div class="col-sm-9">
+															<span class="input-icon">
+																<input type="text" name="email" placeholder="Email" id="form-field-3" value="">
+																<i class="icon-envelope 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-4" class="col-sm-3 control-label no-padding-right"> Phone </label>
+														<div class="col-sm-9">
+															<span class="input-icon">
+																<input type="text" name="phone" placeholder="Phone" id="form-field-4" value="">
+																<i class="icon-phone blue"></i>
 															</span>
 														</div>
@@ -216,5 +257,5 @@
 													<div class="clearfix form-actions">
 														<div class="col-md-offset-3 col-md-9">
-															<button type="button" name="submit" class="btn btn-info">
+															<button type="submit" name="submit" class="btn btn-info">
 																<i class="icon-ok bigger-110"></i>
 																HoÃ n táº¥t
@@ -233,14 +274,67 @@
 									</div>
 								</div>
+								<!-- End Edit User -->
+								
+								<!-- Delete User -->
+								<div tabindex="-1" class="modal fade in" id="deleteAdmin">
+									<div class="modal-dialog">
+										<div class="modal-content">
+											<div class="modal-header no-padding">
+												<div class="table-header">
+													<button aria-hidden="true" data-dismiss="modal" class="close" type="button">
+														<span class="white">Ã</span>
+													</button>
+													XÃ³a quáº£n trá» viÃªn
+												</div>
+											</div>
+											
+											<div class="modal-body">
+												<form method="post" class="form-horizontal" id="validation-form" action="<?php echo $base_url; ?>admin/home/delete">
+													<input type="hidden" name="id" id="form-field-0" value="">
+													<div class="form-group">
+														<center><h4> Cháº¯c cháº¯n muá»n xÃ³a tÃ i khoáº£n nÃ y? </h4></center>
+													</div>
+													<div class="clearfix form-actions">
+														<div class="col-md-offset-3 col-md-9">
+															<button type="submit" name="submit" class="btn btn-info">
+																<i class="icon-ok bigger-110"></i>
+																XÃ³a
+															</button>
+
+															&nbsp; &nbsp; &nbsp;
+															<button type="reset" name="reset" class="btn" data-dismiss="modal">
+																<i class="icon-undo bigger-110"></i>
+																Há»§y
+															</button>
+														</div>
+													</div>
+												</form>
+											</div>
+										</div>
+									</div>
+								</div>					
+								<!-- End Delete User -->
+									
 								<script>
+									$('#deleteAdmin').on('show.bs.modal', function(e) {
+										var id = parseInt($(e.relatedTarget).data('admin-id'));
+										$(e.currentTarget).find('input[name="id"]').val(id);
+									});
+									
 									$('#editAdmin').on('show.bs.modal', function(e) {
 										//get data-id attribute of the clicked element
-										var index = parseInt($(e.relatedTarget).data('admin-id'));
+										var index = parseInt($(e.relatedTarget).data('admin-index'));
 										//populate the textbox
-										//var data = <?php echo json_encode($data); ?>;
-										$(e.currentTarget).find('input[name="username"]').val();
-									});
-								</script>			
-
+										var ar = <?php echo json_encode($data) ?>;
+										
+										$(e.currentTarget).find('input[name="username"]').val(ar[index].login_name);
+										$(e.currentTarget).find('input[name="fullname"]').val(ar[index].full_name);
+										$(e.currentTarget).find('input[name="email"]').val(ar[index].email);
+										$(e.currentTarget).find('input[name="phone"]').val(ar[index].phone);
+										$(e.currentTarget).find('input[name="id"]').val(ar[index].admin_id);
+									});	
+								</script>
+								
+								<!-- Add User -->
 								<div tabindex="-1" class="modal fade in" id="addUser">
 									<div class="modal-dialog">
@@ -256,8 +350,7 @@
 
 											<div class="modal-body">
-												<form role="form" class="form-horizontal">
+												<form method="post" class="form-horizontal validation-add-form" id="validation-form" action="<?php echo $base_url; ?>admin/home/insert">
 													<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">
@@ -269,12 +362,8 @@
 															<div class="help-block"> </div>
 														</label>
-														
-													</div>
-
-													<div class="space-4"></div>
+													</div>
 
 													<div class="form-group">
 														<label for="form-field-2" class="col-sm-3 control-label no-padding-right"> Máº­t kháº©u </label>
-
 														<div class="col-sm-9">
 															<span class="input-icon">
@@ -291,9 +380,8 @@
 													
 													<div class="form-group">
-														<label for="form-field-1" 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="fullname" placeholder="Há» tÃªn" id="form-field-1">
+														<label for="form-field-3" 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="fullname" placeholder="Há» tÃªn" id="form-field-3">
 																<i class="icon-user blue"></i>
 															</span>
@@ -305,9 +393,8 @@
 													
 													<div class="form-group">
-														<label for="form-field-1" class="col-sm-3 control-label no-padding-right"> Email </label>
-
-														<div class="col-sm-9">
-															<span class="input-icon">
-																<input type="text" name="email" placeholder="Email" id="form-field-1">
+														<label for="form-field-3" class="col-sm-3 control-label no-padding-right"> Email </label>
+														<div class="col-sm-9">
+															<span class="input-icon">
+																<input type="text" name="email" placeholder="Email" id="form-field-3">
 																<i class="icon-envelope blue"></i>
 															</span>
@@ -319,9 +406,9 @@
 													
 													<div class="form-group">
-														<label for="form-field-1" class="col-sm-3 control-label no-padding-right"> Phone </label>
-
-														<div class="col-sm-9">
-															<span class="input-icon">
-																<input type="text" name="phone" placeholder="Phone" id="form-field-1">
+														<label for="form-field-4" class="col-sm-3 control-label no-padding-right"> Phone </label>
+
+														<div class="col-sm-9">
+															<span class="input-icon">
+																<input type="text" name="phone" placeholder="Phone" id="form-field-4">
 																<i class="icon-phone blue"></i>
 															</span>
@@ -334,5 +421,5 @@
 													<div class="clearfix form-actions">
 														<div class="col-md-offset-3 col-md-9">
-															<button type="button" name="submit" class="btn btn-info">
+															<button type="submit" name="submit" class="btn btn-info">
 																<i class="icon-ok bigger-110"></i>
 																HoÃ n táº¥t
@@ -353,4 +440,5 @@
 									</div><!-- /.modal-dialog -->
 								</div>
+								<!-- End Add User -->
 
 								<!-- PAGE CONTENT ENDS -->
