Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php	(revision 587)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php	(revision 590)
@@ -14,6 +14,14 @@
 		if ($admin_info)
 		{
-			$data['content'] = $this->get_admins();
-			$this->load->view('admin_acc/index', $data);
+			$role_id = $admin_info['role_id'];
+			if($role_id == 1){
+				$data['content'] = $this->get_admins();
+				$this->load->model('admin_model');
+				$data['roles'] = $this->admin_model->get_roles();
+				$this->load->view('admin_acc/index', $data);
+			}else
+			{
+				show_404();
+			}
 		}else
 		{
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php	(revision 587)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php	(revision 590)
@@ -10,6 +10,5 @@
 	
 	public function index ()
-	{
-            
+	{         
 		$admin_info = $this->session->userdata('adminInfo');
 		if ($admin_info)
@@ -225,5 +224,5 @@
 		else
 		{
-			$admindata = array('login_name' => $login_name, 'admin_id'=>$data->admin_id, "logined_in" => TRUE);
+			$admindata = array('login_name' => $login_name, 'admin_id'=>$data->admin_id, 'role_id'=>$data->role_id, 'logined_in' => TRUE);
 			$this->session->set_userdata('adminInfo', $admindata);
 			redirect("/admin/home");
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/smstemplate.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/smstemplate.php	(revision 587)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/smstemplate.php	(revision 590)
@@ -14,7 +14,13 @@
         $data = array();
         $admin_info = $this->session->userdata('adminInfo');
+		$role_id = $admin_info['role_id'];
         if ($admin_info) {
-            $data['content'] = $this->getSmstemplates();
-            $this->load->view('smstemplate/index', $data);
+			if($role_id == 1){
+				$data['content'] = $this->getSmstemplates();
+				$this->load->view('smstemplate/index', $data);
+			}else
+			{
+				show_404();
+			}
         } else {
             $this->load->view('login');
Index: pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php	(revision 587)
+++ pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php	(revision 590)
@@ -77,3 +77,11 @@
 		
 	}
+	
+	function get_roles()
+	{
+		$sql = "SELECT * FROM tbladminrole";
+		$query = $this->db->query($sql);
+		$result = $query->result_array();
+		return $result;
+	}
 }
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc/index.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc/index.php	(revision 587)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc/index.php	(revision 590)
@@ -127,5 +127,5 @@
 									<i class="icon-user blue"></i>
 								</span>
-								<div class="help-block" id="full_name_err" > </div>
+								<small><div class="help-block" id="full_name_err" > </div><small>
 							</label>
 						</div>
@@ -143,5 +143,5 @@
 									<i class="icon-user blue"></i>
 								</span>
-								<div class="help-block" id="login_name_err" > </div>
+								<small><div class="help-block" id="login_name_err" > </div></small>
 							</label>
 							
@@ -158,5 +158,5 @@
 								</span>
 								
-								<div class="help-block" id="pwd1_err"> </div>
+								<small><div class="help-block" id="pwd1_err"> </div></small>
 							</label>
 						</div>			
@@ -173,5 +173,5 @@
 								</span>
 								
-								<div class="help-block" id="pwd2_err"> </div>
+								<small><div class="help-block" id="pwd2_err"> </div></small>
 							</label>
 						</div>			
@@ -187,5 +187,5 @@
 									<i class="icon-envelope blue"></i>
 								</span>
-								<div class="help-block" id="email_err"> </div>
+								<small><div class="help-block" id="email_err"> </div></small>
 							</label>
 						</div>
@@ -204,5 +204,24 @@
 									<i class="icon-phone blue"></i>
 								</span>
-								<div class="help-block" id="phone_err"> </div>
+								<small><div class="help-block" id="phone_err"> </div></small>
+							</label>
+						</div>
+						<div class="help-block"> </div>
+					</div>
+					<div class="space-4"></div>
+					
+					<div class="form-group">
+						<label for="form-field-7" class="col-sm-3 control-label no-padding-right"> PhÃ¢n quyá»n </label>
+
+						<div class="col-sm-9">
+							<label class="block clearfix has-error">
+								<span class="input-icon">
+									<select name="role_id"  id="form-field-7">
+									<?php foreach ($roles as $role):?>
+									<option value=<?php echo $role['role_id']; ?>><?php echo $role['role_name']; ?></option>
+									<?php endforeach; ?>
+									</select>
+								</span>
+								<small><div class="help-block" id="role_err"> </div></small>
 							</label>
 						</div>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php	(revision 587)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php	(revision 590)
@@ -1,2 +1,6 @@
+<?php 
+$admin_info = $this->session->userdata('adminInfo');
+$role_id = $admin_info['role_id'];
+?>
 <div id="breadcrumbs" class="breadcrumbs">
 
@@ -41,9 +45,10 @@
             <div style="padding-bottom:4px" class="table-header">
                 Thá»ng kÃª tÃ i khoáº£n
-
+				<?php if($role_id == 1): ?>
                 <button href="#addUser" data-toggle="modal" class="btn btn-success pull-right">
                     <i class="icon-plus"></i>
                     ThÃªm cá»ng tÃ¡c viÃªn
                 </button>
+				<?php endif; ?>
 
             </div>
@@ -87,5 +92,5 @@
                                 </th>
                                 <th class="<?php if ($sorting_field=='activated') {echo $sorting_order;} else {echo "sorting";}?>" id="activated" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 158px;" aria-label="Tráº¡ng thÃ¡i: activate to sort column ascending">Tráº¡ng thÃ¡i</th>
-                                <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 133px;" aria-label="">Chá»©c nÄng</th></tr>
+                                <?php if($role_id == 1): ?><th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 133px;" aria-label="">Chá»©c nÄng</th><?php endif; ?></tr>
                         </thead>
 
@@ -118,5 +123,5 @@
                                     ?>
                                 </td>
-
+								<?php if($role_id == 1): ?>
                                 <td class=" ">
                                     <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
@@ -168,4 +173,5 @@
                                     </div>
                                 </td>
+								<?php endif; ?>
                             </tr>
                             <?php } ?>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php	(revision 587)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php	(revision 590)
@@ -41,8 +41,8 @@
             <div style="padding-bottom:4px" class="table-header">
                 Danh sÃ¡ch
-                <button href="#addUser" data-toggle="modal" class="btn btn-success pull-right">
+                <!--button href="#addUser" data-toggle="modal" class="btn btn-success pull-right">
                     <i class="icon-plus"></i>
                     ThÃªm ngÆ°á»i dÃ¹ng
-                </button>
+                </button-->
 
             </div>
@@ -91,12 +91,12 @@
                                     </label>
                                 </th>
-								<th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="TÃ i khoáº£n: activate to sort column ascending">TÃ i khoáº£n</th>
+								<th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="TÃ i khoáº£n: activate to sort column ascending">Username</th>
                                 <th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Sá» Äiá»n thoáº¡i: activate to sort column ascending">Sá» Äiá»n thoáº¡i</th>
-                                <th class="<?php if ($sorting_field == 'acc_balanced') {echo $sorting_order;} else {echo "sorting";}?>" id="acc_balanced" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 122px;" aria-label="Tiá»n: activate to sort column ascending">Tiá»n</th>
-                                <th class="<?php if ($sorting_field == 'created_time') {echo $sorting_order;} else {echo "sorting";}?>" id="created_time" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="NgÃ y ÄÄng kÃœ: activate to sort column ascending">
+                                <th class="<?php if ($sorting_field == 'acc_balanced') {echo $sorting_order;} else {echo "sorting";}?>" id="acc_balanced" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Tiá»n: activate to sort column ascending">TÃ i khoáº£n (VNÄ)</th>
+                                <th class="<?php if ($sorting_field == 'created_time') {echo $sorting_order;} else {echo "sorting";}?>" id="created_time" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 150px;" aria-label="NgÃ y ÄÄng kÃœ: activate to sort column ascending">
                                     <i class="icon-time bigger-110 hidden-480"></i>
                                     NgÃ y ÄÄng kÃœ
                                 </th>
-								<th class="<?php if ($sorting_field == 'expire_date') {echo $sorting_order;} else {echo "sorting";}?>" id="expire_date" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="NgÃ y háº¿t háº¡n: activate to sort column ascending">
+								<th class="<?php if ($sorting_field == 'expire_date') {echo $sorting_order;} else {echo "sorting";}?>" id="expire_date" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 150px;" aria-label="NgÃ y háº¿t háº¡n: activate to sort column ascending">
                                     <i class="icon-time bigger-110 hidden-480"></i>
                                     NgÃ y háº¿t háº¡n
@@ -124,5 +124,5 @@
                                     <?php echo $user['cellphone']; ?>
                                 </td>
-                                <td class="hidden-480 "><?php echo $user['acc_balanced']. " VNÄ"; ?></td>
+                                <td class="hidden-480 "><?php echo number_format($user['acc_balanced'], 0); ?></td>
                                 <td class=" "><?php echo $user['created_time']; ?></td>
 								<td class=" "><?php echo isset($user['expire_date']) && strtotime($user['expire_date'])>0 ? date('d/m/Y', strtotime($user['expire_date'])) : '';?></td>
