Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_account.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_account.php	(revision 368)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_account.php	(revision 368)
@@ -0,0 +1,110 @@
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+class Admin_Account extends MX_Controller
+{
+	public function __construct() 
+	{
+		parent::__construct();
+		$this->load->helper('cookie');
+	}
+	
+	public function index ()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if($admin_info){
+			$this->load->model('admin_model');
+			$data = $this->admin_model->get_list();
+			$this->load->view('admin_acc', array('data'=>$data));
+		}else
+		{
+			redirect("/admin/home");
+		}
+	}
+	
+	public function insert()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if($admin_info)
+		{
+			$login_name = $this->input->post('username');
+			$password = md5($this->input->post('password'));
+			$full_name = $this->input->post('fullname');
+			$email = $this->input->post('email');
+			$phone = $this->input->post('phone');
+			$created_time = date('Y-m-d H:i:s', time());
+			$updated_time = date('Y-m-d H:i:s', time());
+			$data = array('login_name'=>$login_name, 'full_name'=>$full_name, 'email'=>$email, 'phone'=>$phone, 'created_time'=>$created_time, 'updated_time'=>$updated_time);
+			$this->load->model('admin_model');
+			/*
+			$check = $this->admin_model->check_data($login_name);
+			if ($check)
+			{
+				$this->session->flashdata('insert_error');
+				echo "TÃªn ÄÄng nháº­p ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng !";
+				//redirect("/admin/home/admin_acc");
+			}else
+			{
+				$this->admin_model->insert($data);
+				redirect("/admin/admin_account");
+			}*/
+			$this->admin_model->insert($data);
+			redirect("/admin/admin_account");
+			
+		}else
+		{
+			redirect("/admin/home");
+		}
+	}
+	
+	public function update()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if($admin_info)
+		{
+			$admin_id = (int)$this->input->post('id');
+			$login_name = $this->input->post('username');
+			//$password = $this->input->post('password');
+			$full_name = $this->input->post('fullname');
+			$email = $this->input->post('email');
+			$phone = $this->input->post('phone');
+			$updated_time = date('Y-m-d H:i:s', time());
+			$data = array('login_name'=>$login_name, 'full_name'=>$full_name, 'email'=>$email, 'phone'=>$phone, 'updated_time'=>$updated_time);
+			$this->load->model('user_model');
+			$this->user_model->update($admin_id, $data);
+			redirect("/admin/admin_account");
+		}else
+		{
+			redirect("/admin/home");
+		}	
+	}
+	
+	public function delete()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if($admin_info)
+		{
+			$admin_id = (int)$this->input->post('id');
+			//echo $admin_id;
+			$this->load->model('admin_model');
+			$this->admin_model->delete($admin_id);
+			redirect("/admin/admin_account");
+		}else
+		{
+			redirect("/admin/home");
+		}	
+	}
+	
+	public function check_data()
+	{
+		$login_name = $this->input->post('username');
+		//var_dump($login_name);
+		$this->load->model('admin_model');
+		$check = $this->admin_model->check_data($login_name);
+		if ($check){
+			echo 1;
+		}else
+		{
+			echo 0;
+		}
+	}
+}
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php	(revision 367)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php	(revision 368)
@@ -49,78 +49,4 @@
 	}
 	
-	public function admin_acc()
-	{
-		$admin_info = $this->session->userdata('adminInfo');
-		if($admin_info){
-			$this->load->model('admin_model');
-			$data = $this->admin_model->get_list();
-			$this->load->view('admin_acc', array('data'=>$data));
-		}else
-		{
-			redirect("/admin/home");
-		}
-	}
-	
-	public function insert()
-	{
-		$admin_info = $this->session->userdata('adminInfo');
-		if($admin_info)
-		{
-			$login_name = $this->input->post('username');
-			$password = $this->input->post('password');
-			$full_name = $this->input->post('fullname');
-			$email = $this->input->post('email');
-			$phone = $this->input->post('phone');
-			$created_time = date('Y-m-d H:i:s', time());
-			$updated_time = date('Y-m-d H:i:s', time());
-			$data = array('login_name'=>$login_name, 'full_name'=>$full_name, 'email'=>$email, 'phone'=>$phone, 'created_time'=>$created_time, 'updated_time'=>$updated_time);
-			$this->load->model('admin_model');
-			$this->admin_model->insert($data);
-			redirect("/admin/home/admin_acc");
-			
-		}else
-		{
-			redirect("/admin/home");
-		}
-	}
-	
-	public function update()
-	{
-		$admin_info = $this->session->userdata('adminInfo');
-		if($admin_info)
-		{
-			$admin_id = (int)$this->input->post('id');
-			$login_name = $this->input->post('username');
-			//$password = $this->input->post('password');
-			$full_name = $this->input->post('fullname');
-			$email = $this->input->post('email');
-			$phone = $this->input->post('phone');
-			$updated_time = date('Y-m-d H:i:s', time());
-			$data = array('login_name'=>$login_name, 'full_name'=>$full_name, 'email'=>$email, 'phone'=>$phone, 'updated_time'=>$updated_time);
-			$this->load->model('admin_model');
-			$this->admin_model->update($admin_id, $data);
-			redirect("/admin/home/admin_acc");
-		}else
-		{
-			redirect("/admin/home");
-		}	
-	}
-	
-	public function delete()
-	{
-		$admin_info = $this->session->userdata('adminInfo');
-		if($admin_info)
-		{
-			$admin_id = (int)$this->input->post('id');
-			//echo $admin_id;
-			$this->load->model('admin_model');
-			$this->admin_model->delete($admin_id);
-			redirect("/admin/home/admin_acc");
-		}else
-		{
-			redirect("/admin/home");
-		}	
-	}
-	
 	public function user_profile()
 	{
@@ -134,4 +60,3 @@
 		}
 	}
-	
 }
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/user_account.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/user_account.php	(revision 368)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/user_account.php	(revision 368)
@@ -0,0 +1,91 @@
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+class User_Account extends MX_Controller
+{
+	public function __construct() 
+	{
+		parent::__construct();
+		$this->load->helper('cookie');
+	}
+	
+	public function index ()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if($admin_info){
+			$this->load->model('user_model');
+			$users = $this->user_model->get_list();
+			$this->load->view('user_acc', array('users'=>$users));
+		}else
+		{
+			redirect("/admin/home");
+		}
+	}
+	
+	public function insert()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if($admin_info)
+		{
+			$cellphone = $this->input->post('cellphone');
+			
+			$created_time = date('Y-m-d H:i:s', time());
+			$updated_time = date('Y-m-d H:i:s', time());
+			$data = array('cellphone'=>$cellphone, 'created_time'=>$created_time, 'updated_time'=>$updated_time);
+			$this->load->model('admin_model');
+			$this->admin_model->insert($data);
+			redirect("/admin/user_account");
+			
+		}else
+		{
+			redirect("/admin/home");
+		}
+	}
+	
+	public function update()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if($admin_info)
+		{
+			$user_id = (int)$this->input->post('id');
+			$cellphone = $this->input->post('cellphone');
+			$balance = $this->input->post('balance');
+			$updated_time = date('Y-m-d H:i:s', time());
+			$data = array('cellphone'=>$cellphone, 'acc_balanced'=>$balance, 'updated_time'=>$updated_time);
+			$this->load->model('user_model');
+			$this->user_model->update($user_id, $data);
+			redirect("/admin/user_account");
+		}else
+		{
+			redirect("/admin/home");
+		}	
+	}
+	
+	public function delete()
+	{
+		$admin_info = $this->session->userdata('adminInfo');
+		if($admin_info)
+		{
+			$user_id = (int)$this->input->post('id');
+			$this->load->model('user_model');
+			$this->user_model->delete($user_id);
+			redirect("/admin/user_account");
+		}else
+		{
+			redirect("/admin/home");
+		}	
+	}
+	
+	public function check_data()
+	{
+		$login_name = $this->input->post('username');
+		//var_dump($login_name);
+		$this->load->model('user_model');
+		$check = $this->admin_model->check_data($login_name);
+		if ($check){
+			echo 1;
+		}else
+		{
+			echo 0;
+		}
+	}
+}
