Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php	(revision 345)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php	(revision 345)
@@ -0,0 +1,107 @@
+<?php
+
+if (!defined('BASEPATH'))
+    exit('No direct script access allowed');
+
+class Collaborator extends MX_Controller {
+
+    public function __construct() {
+        parent::__construct();
+        $this->load->helper('cookie');
+    }
+
+    public function index() {
+        $data=array();
+        $this->load->driver("pp");
+        $admin_info = $this->session->userdata('adminInfo');
+        if ($admin_info) {
+            $data['content'] = $this->getCollaborators();
+            $this->parser->parse('collaborator/index',$data);
+        } else {
+            $this->load->view('login');
+        }
+    }
+    public function getCollaborators($filters=array())
+    {
+        $this->load->driver("pp");
+        $data['current_page'] = $this->uri->segment(4,1);
+        $data['itemsoptions']=array(10,25,50,100);
+        $data['perpage'] = 10;    
+        if ($this->input->post('items'))
+        {
+        $data['perpage'] = $this->input->post('items');    
+        }
+        
+        $data['keyword']='';
+        $sql=" FROM Entities\Tblcollaborator c";
+        if ($this->input->post('keyword'))
+        {
+        $sql.=" WHERE c.full_name LIKE '%".$this->input->post('keyword')."%'"; 
+        $data['keyword']=$this->input->post('keyword');
+        }
+        
+        $query = $this->doctrine->em->createQuery('SELECT COUNT(c.id) '.$sql);
+        $data['total'] = $query->getSingleScalarResult();
+        
+        $query = $this->doctrine->em->createQuery('SELECT c '.$sql);
+        $query->setFirstResult(($data['current_page']-1)*$data['perpage']);
+        $query->setMaxResults($data['perpage']);
+        $data['collaborators'] = $query->getArrayResult();
+        
+        
+        $this->load->library('pagination');
+        $url = "http://$_SERVER[HTTP_HOST]/admin/cong_tac_vien/trang/";
+        $config['base_url'] = $url;
+        $config['total_rows'] = $data['total'];
+        $config['use_page_numbers'] = TRUE;
+        $config['per_page'] = $data['perpage'];
+        $config['num_tag_open'] = "<li>";
+        $config['num_tag_close'] = "</li>";
+        $config['cur_tag_open'] = "<li class='active'><a>";
+        $config['cur_tag_close'] = '</a></li>';
+        $config['last_link'] = 'Â»';
+        $config['first_link'] = 'Â«';
+        $config['first_tag_open'] = "<li title='Trang Äáº§u tiÃªn'>";
+        $config['first_tag_close'] = '</li>';
+        $config['last_tag_open'] = "<li title='Trang cuá»i cÃ¹ng'>";
+        $config['last_tag_close'] = '</li>';
+        $config['next_link'] = '>';
+        $config['next_tag_open'] = "<li title='Trang káº¿ tiáº¿p'>";
+        $config['next_tag_close'] = '</li>';
+        $config['prev_link'] = '<';
+        $config['prev_tag_open'] = "<li title='Trang trÆ°á»c'>";
+        $config['prev_tag_close'] = '</li>';
+        $config['num_links'] = 2;
+        $config['current_page'] = $data['current_page'];
+        $config['ajax_class'] = 'ajax_paging';
+        $this->pagination->initialize($config);
+        $data['paging'] = $this->pagination->create_links();
+
+        if ($this->input->is_ajax_request()) {
+        return $this->pp->parse('modules/admin/views/collaborator/listview', $data);   
+        }
+        return $this->pp->parse('modules/admin/views/collaborator/listview', $data,true);   
+    }
+    public function test() {
+        for ($i = 1; $i <= 500; $i++) {
+            $collaborator = new Entities\Tblcollaborator();
+            $collaborator->setActivated(rand(0, 1));
+            $collaborator->setAuthor(1);
+            $collaborator->setCellphone('0' . (1695061706+$i));
+            $collaborator->setCreatedTime(date("Y-m-d H:i:s"));
+            $collaborator->setFullName("Full Name ".$i);
+            $collaborator->setLoginName("loginname".$i);
+            $collaborator->setPasswd(md5("12345678"));
+            $collaborator->setUpdatedTime(date("Y-m-d H:i:s"));
+            try {
+                $this->doctrine->em->persist($collaborator);
+                $this->doctrine->em->flush();
+                $result['success'] = 1;
+            } catch (Exception $e) {
+
+                echo $e;
+            }
+        }
+    }
+
+}
