Пример #1
0
 function list_all($offset = 0, $limit = 100)
 {
     if ($_SERVER['REQUEST_METHOD'] == "POST") {
         foreach ($_POST as $key => $value) {
             if (substr($key, 0, 8) == "position") {
                 if (trim($this->input->post($key)) != "") {
                     $keylist = explode("_", $key);
                     $cityId = $keylist[1];
                     $city = new Estatecity($cityId);
                     $city->position = $this->input->post($key);
                     $city->save();
                     $city->clear();
                 }
             }
         }
         flash_message('success', 'Cập nhật thành công.');
         redirect($this->admin . 'estatecitys/list_all/');
     }
     $citys = new Estatecity();
     $citys->order_by('position', 'asc');
     $citys->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estatecitys/list_all/', $citys->paged->total_rows, $limit, 4);
     $dis['citys'] = $citys;
     $dis['base_url'] = base_url();
     $dis['view'] = 'estatecity/list_all';
     $dis['menu_active'] = 'Thành phố/Tỉnh';
     $dis['title'] = "Danh sách các Thành phố/Tỉnh";
     $dis['title_table'] = "Trang hiện tại:" . $citys->paged->current_page . '/' . $citys->paged->total_pages;
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}estatecitys/edit/", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #2
0
 function listAll($offset = 0, $limit = 20)
 {
     $jobmethods = new Jobsmethod();
     $jobmethods->order_by('position');
     $searchKey = "";
     if ($_SERVER['METHOD_REQUEST'] == 'GET') {
     } else {
         $searchKey = $this->input->post("search_name");
         $jobmethods->distinct();
         $jobmethods->group_start();
         $jobmethods->like('name_vietnamese', $searchKey);
         $jobmethods->group_end();
     }
     $jobmethods->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'levels/listAll/', $jobmethods->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'jobsmethod/list';
     $dis['jobmethods'] = $jobmethods;
     $dis['searchKey'] = $searchKey;
     $dis['menu_active'] = "Phương thức làm việc";
     $dis['title_table'] = "Trang hiện tại:" . $jobmethods->paged->current_page . '/' . $jobmethods->paged->total_pages;
     $dis['title'] = "Danh sách 'Phương thức làm việc'";
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm jobsmethods", "link" => "{$this->admin_url}jobsmethods/edit/0", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #3
0
 function listAll($offset = 0, $limit = 50)
 {
     $locations = new Province();
     $locations->order_by('position');
     $searchKey = "";
     if ($_SERVER['METHOD_REQUEST'] == 'GET') {
     } else {
         $searchKey = $this->input->post("search_name");
         $locations->distinct();
         $locations->group_start();
         $locations->like('name', $searchKey);
         $locations->group_end();
     }
     $locations->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'locations/listAll/', $locations->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'location/list';
     $dis['locations'] = $locations;
     $dis['searchKey'] = $searchKey;
     $dis['menu_active'] = "Tỉnh thành";
     $dis['title_table'] = "Trang hiện tại:" . $levels->paged->current_page . '/' . $levels->paged->total_pages;
     $dis['title'] = "Danh sách Locations";
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm Location", "link" => "{$this->admin_url}locations/edit/0", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #4
0
 function listAll($offset = 0, $limit = 20)
 {
     $dis['base_url'] = base_url();
     $showrooms = new showroom();
     $showrooms->order_by('position');
     $searchKey = "";
     if ($_SERVER['METHOD_REQUEST'] == 'GET') {
     } else {
         $searchKey = $this->input->post("search_name");
         $showrooms->distinct();
         $showrooms->group_start();
         $showrooms->like('name_vietnamese', $searchKey);
         $showrooms->group_end();
     }
     $showrooms->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'levels/listAll/', $showrooms->paged->total_rows, $limit, 4);
     $showrooms->order_by('position', 'asc');
     $showrooms->get();
     $dis['view'] = 'showroom/list';
     $dis['menu_active'] = "Showroom";
     $dis['title_table'] = "Showroom";
     $dis['showrooms'] = $showrooms;
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm showroom", "link" => "{$this->admin_url}showrooms/edit/0", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #5
0
 function list_all($offset = 0, $limit = 10)
 {
     $landcategories = new Landcategory();
     $landcategories->order_by('position', 'asc');
     /*$landcategories->where('parentcat_id', NULL);*/
     $landcategories->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estatecatalogues/list_all/', $landcategories->paged->total_rows, $limit, 4);
     $dis['catalogues'] = $landcategories;
     $dis['base_url'] = base_url();
     $dis['view'] = 'landcategory/list_all';
     $dis['menu_active'] = 'Danh mục nhà đất';
     $dis['title'] = "Danh sách các Danh mục nhà đất";
     $dis['title_table'] = "Trang hiện tại:" . $landcategories->paged->current_page . '/' . $landcategories->paged->total_pages;
     /*$dis['nav_menu']=array(
     		array(
     			"type"=>"add",
     			"text"=>"Thêm",
     			"link"=>"{$this->admin_url}estatecatalogues/edit/",
     			"onclick"=>""		
     		)
         );*/
     /*$estatesCatalogue = new Estatecatalogue();
       $estatesCatalogue->where('parentcat_id !=', 0);
       $estatesCatalogue->order_by('position');
       $estatesCatalogue->get_iterated();
       $dis['estatesCatalogue'] = $estatesCatalogue;*/
     $this->viewadmin($dis);
 }
Пример #6
0
 function list_all($offset = 0, $limit = 20)
 {
     $menu = new menu();
     $menu->order_by('position', 'asc');
     if ($_SERVER['REQUEST_METHOD'] == "POST") {
         foreach ($_POST as $key => $value) {
             if (substr($key, 0, 8) == "position") {
                 if (trim($this->input->post($key)) != "") {
                     $keylist = explode("_", $key);
                     $mId = $keylist[1];
                     $menu = new menu($mId);
                     $menu->position = $this->input->post($key);
                     $menu->save();
                     $menu->clear();
                 }
             }
         }
         flash_message('success', 'Cập nhật thành công.');
         redirect($this->admin . 'menus/list_all/');
     }
     $menu->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'menus/list_all/', $menu->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'menu/list_all';
     $dis['object'] = $menu;
     $dis['menu_active'] = "Menu";
     $dis['title_table'] = "Trang hiện tại:" . $menu->paged->current_page . '/' . $menu->paged->total_pages;
     $dis['title'] = "Danh sách Menu cha";
     $dis['nav_menu'] = array();
     $this->viewadmin($dis);
 }
Пример #7
0
 function list_by_cat($id, $offset = 0, $limit = 10)
 {
     $menu = new menu($id);
     $menuitem = new menuitem();
     $menuitem->where('menu_id', $id);
     $menuitem->order_by('position', 'asc');
     if ($_SERVER['REQUEST_METHOD'] == "POST") {
         foreach ($_POST as $key => $value) {
             if (substr($key, 0, 8) == "position") {
                 if (trim($this->input->post($key)) != "") {
                     $keylist = explode("_", $key);
                     $mId = $keylist[1];
                     $menuitem = new menuitem($mId);
                     $menuitem->position = $this->input->post($key);
                     $menuitem->save();
                     $menuitem->clear();
                 }
             }
         }
         flash_message('success', 'Cập nhật thành công.');
         redirect($this->admin . 'menuitems/list_by_cat/' . $id);
     }
     $menuitem->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'menuitems/list_by_cat/' . $id, $menu->paged->total_rows, $limit, 5);
     $dis['base_url'] = base_url();
     $dis['view'] = 'menuitem/list_by_cat';
     $dis['object'] = $menuitem;
     $dis['menu_id'] = $id;
     $dis['menu_active'] = "Menu";
     $dis['title_table'] = "Trang hiện tại:" . $menu->paged->current_page . '/' . $menu->paged->total_pages;
     $dis['title'] = "Danh sách Menu con của " . $menu->name;
     $dis['nav_menu'] = array(array("type" => "back", "text" => "Quay về", "link" => "{$this->admin_url}menus/list_all", "onclick" => ""), array("type" => "add", "text" => "Thêm Menu Con", "link" => "{$this->admin_url}menuitems/edit/" . $id, "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #8
0
 function index($offset = 0, $limit = 100)
 {
     $o = new Emailsignup();
     $o->order_by('created', 'desc');
     $o->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'emails_signups/index/', $o->paged->total_rows, $limit, 4);
     $dis['o'] = $o;
     $dis['base_url'] = base_url();
     $dis['view'] = 'emails_signups/list_all';
     $dis['menu_active'] = 'Email đăng ký';
     $dis['title'] = "Danh sách email đăng ký";
     $dis['title_table'] = "Trang hiện tại:" . $o->paged->current_page . '/' . $o->paged->total_pages;
     $this->viewadmin($dis);
 }
Пример #9
0
 function list_all($offset = 0, $limit = 10)
 {
     $districts = new Estatedistrict();
     $districts->order_by('position', 'asc');
     $districts->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estatecitys/list_all/', $districts->paged->total_rows, $limit, 4);
     $dis['districts'] = $districts;
     $dis['base_url'] = base_url();
     $dis['view'] = 'estatedistrict/list_all';
     $dis['menu_active'] = 'Thành phố/Tỉnh';
     $dis['title'] = "Danh sách các Quận/Huyện";
     $dis['title_table'] = "Trang hiện tại:" . $districts->paged->current_page . '/' . $districts->paged->total_pages;
     $this->viewadmin($dis);
 }
Пример #10
0
 function listAll($offset = 0, $limit = 20)
 {
     $showroomphotos = new Productphoto();
     $showroomphotos->order_by('id', 'asc');
     $showroomphotos->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'productphoto/list_all/', $showroomphotos->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'showroomphoto/list';
     $dis['showroomphotos'] = $showroomphotos;
     $dis['menu_active'] = "Hình ảnh";
     $dis['title_table'] = "Trang hiện tại:" . $showroomphotos->paged->current_page . '/' . $showroomphotos->paged->total_pages;
     $dis['title'] = "Tất cả hình ảnh";
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}productphotos/edit", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #11
0
 function list_all($offset = 0, $limit = 5)
 {
     $productstatus = new Productstatu();
     $productstatus->order_by('position', 'asc');
     $productstatus->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'productstatus/list_all/', $productstatus->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'productstatus/list';
     $dis['productstatus'] = $productstatus;
     $dis['menu_active'] = "Trạng thái sản phẩm";
     $dis['title_table'] = "Trang hiện tại:" . $productstatus->paged->current_page . '/' . $productstatus->paged->total_pages;
     $dis['title'] = "Danh sách trạng thái sản phẩm";
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}productstatus/edit", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #12
0
 function list_all($offset = 0, $limit = 5)
 {
     $banners = new Banner();
     $banners->order_by('id', 'desc');
     $banners->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'banners/list_all/', $banners->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'banners/list';
     $dis['menu_active'] = "Banner top";
     $dis['title_table'] = "Trang hiện tại:" . $banners->paged->current_page . '/' . $banners->paged->total_pages;
     $dis['title'] = "Danh sách banner";
     $dis['banners'] = $banners;
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}banners/edit", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #13
0
 function list_all($offset = 0, $limit = 20)
 {
     $areas = new Estatearea();
     $areas->order_by('position', 'asc');
     $areas->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estateareas/list_all/', $areas->paged->total_rows, $limit, 4);
     $dis['areas'] = $areas;
     $dis['base_url'] = base_url();
     $dis['view'] = 'estatearea/list_all';
     $dis['menu_active'] = 'Diện tích';
     $dis['title'] = "Danh sách các Diện tích";
     $dis['title_table'] = "Trang hiện tại:" . $areas->paged->current_page . '/' . $areas->paged->total_pages;
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}estateareas/edit/", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #14
0
 function list_all($offset = 0, $limit = 10)
 {
     $directions = new Estatedirection();
     $directions->order_by('id', 'desc');
     $directions->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estatedirections/list_all/', $directions->paged->total_rows, $limit, 4);
     $dis['directions'] = $directions;
     $dis['base_url'] = base_url();
     $dis['view'] = 'estatedirection/list_all';
     $dis['menu_active'] = 'Hướng';
     $dis['title'] = "Danh sách các Hướng";
     $dis['title_table'] = "Trang hiện tại:" . $directions->paged->current_page . '/' . $directions->paged->total_pages;
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}estatedirections/edit/", "onclick" => ""));
     $this->viewadmin($dis);
 }
 public function index()
 {
     //criando paginação
     $this->load->helper('pagination_helper');
     $total_rows = $this->tipo_ocorrencia->count();
     $limit[0] = _PER_PAGE;
     $limit[1] = $this->uri->segment(3) ? $this->uri->segment(3) : 0;
     setPagination($total_rows, __CLASS__ . '/' . __FUNCTION__);
     //selecionando os dados
     $this->dados['tipo_ocorrencias'] = $this->tipo_ocorrencia->getAll(null, null, $limit);
     $this->dados['pagination'] = $this->pagination->create_links();
     //padronizando o caminho da página
     $pagina = page($this->dados['modulo'], 'list');
     //chamando a pagina pelo template
     $this->template->view($pagina, $this->dados);
 }
Пример #16
0
 public function index()
 {
     //criando paginação
     $this->load->helper('pagination_helper');
     $total_rows = $this->monitoramento->count();
     $limit[0] = _PER_PAGE;
     $limit[1] = $this->uri->segment(3) ? $this->uri->segment(3) : 0;
     setPagination($total_rows, __CLASS__ . '/' . __FUNCTION__);
     //selecionando os dados
     //$this->dados['checklists'] = $this->checklist->getAll(null, null, $limit);
     $qry = "select distinct monitoramento_dia, count(monitoramento_id) as qtd from monitoramento group by monitoramento_dia order by monitoramento_dia desc ";
     $this->dados['monitoramentos'] = $this->monitoramento->execute($qry);
     $this->dados['pagination'] = $this->pagination->create_links();
     //padronizando o caminho da página
     $pagina = page($this->dados['modulo'], 'list');
     //chamando a pagina pelo template
     $this->template->view($pagina, $this->dados);
 }
Пример #17
0
 function list_all($offset = 0, $limit = 20)
 {
     $estatecatalogues = new Estatecatalogue();
     $estatecatalogues->get_iterated();
     $dis['estatecatalogues'] = $estatecatalogues;
     $prices = new Estateprice();
     $prices->order_by('position');
     $prices->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estateprices/list_all/', $prices->paged->total_rows, $limit, 4);
     $dis['prices'] = $prices;
     $dis['base_url'] = base_url();
     $dis['view'] = 'estateprice/list_all';
     $dis['menu_active'] = 'Mức giá';
     $dis['title'] = "Danh sách các Mức giá";
     $dis['title_table'] = "Trang hiện tại:" . $prices->paged->current_page . '/' . $prices->paged->total_pages;
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}estateprices/edit/", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #18
0
 function list_by_parent($id, $offset = 0, $limit = 20)
 {
     $catalogue = new Landcategory($id);
     $lands = new Land();
     $lands->where('landcategory_id', $id);
     $lands->order_by('name', 'asc');
     $lands->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estatetypes/list_by_parent/', $lands->paged->total_rows, $limit, 5);
     $dis['types'] = $lands;
     $dis['catalogue'] = $catalogue;
     $dis['base_url'] = base_url();
     $dis['view'] = 'land/list_by_parent';
     $dis['menu_active'] = 'Danh mục nhà đất';
     $dis['title'] = "Danh sách các loại thuộc <span style='color:#F00;'>" . $catalogue->name . '</span>';
     $dis['title_table'] = "Trang hiện tại:" . $lands->paged->current_page . '/' . $lands->paged->total_pages;
     $dis['nav_menu'] = array(array("type" => "back", "text" => "Quay về", "link" => "{$this->admin_url}estatecatalogues/list_all/", "onclick" => ""), array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}lands/edit_by_parent/" . $catalogue->id, "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #19
0
 public function index()
 {
     //criando paginação
     $this->load->helper('pagination_helper');
     $total_rows = $this->ocorrencia->count();
     $limit[0] = _PER_PAGE;
     $limit[1] = $this->uri->segment(3) ? $this->uri->segment(3) : 0;
     setPagination($total_rows, __CLASS__ . '/' . __FUNCTION__);
     //se for ADMINISTRADOR mostra todas as ocorrencias pendentes e ativas de TODOS os usuários
     //se for USUÁRIO mostra SÓ as ocorrencias QUE ELE cadastro
     $where = $this->administrador_nivel == 'A' ? array('oc.ocorrencia_status != ' => 'I') : array('oc.administrador_id' => $this->administrador_id);
     //selecionando os dados
     $this->dados['ocorrencias'] = $this->ocorrencia->getAll($where, array('oc.ocorrencia_id', 'desc'), $limit);
     $this->dados['pagination'] = $this->pagination->create_links();
     //padronizando o caminho da página
     $pagina = page($this->dados['modulo'], 'list');
     //chamando a pagina pelo template
     $this->template->view($pagina, $this->dados);
 }
Пример #20
0
 function list_all($searchKey = "%20", $cartStatus = 0, $offset = 0, $limit = 20)
 {
     $carts = new Cartitem();
     if ($_SERVER['REQUEST_METHOD'] == "POST") {
         $searchKey = $this->input->post("search_name");
         $cartStatus = $this->input->post('cartStatus');
         redirect("admin/carts/list_all/" . urlencode(htmlentities($searchKey)) . "/" . $cartStatus);
     }
     $searchKey = html_entity_decode(urldecode($searchKey));
     if (trim($searchKey) != "") {
         $customers = new Customer();
         $customers->like("name", "%" . $searchKey . "%");
         $customers->or_like('username', "%" . $searchKey . "%");
         $customers->or_like('address', "%" . $searchKey . "%");
         $customers->or_like('homePhone', "%" . $searchKey . "%");
         $customers->or_like('mobilePhone', "%" . $searchKey . "%");
         $customers->or_like('email', "%" . $searchKey . "%");
         $customers->order_by('id', 'desc');
         $customers->get_iterated();
         $cusArr = array(0);
         foreach ($customers as $row) {
             array_push($cusArr, $row->id);
         }
         //$carts->like('code',"%".$searchKey."%");
         $carts->where_in('customer_id', $cusArr);
     }
     if ($cartStatus != 0) {
         $carts->where('status', $cartStatus);
     }
     $carts->order_by('id', 'desc');
     $carts->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'carts/list_all/' . urlencode(htmlentities($searchKey)) . "/" . $cartStatus, $carts->paged->total_rows, $limit, 6);
     $dis['base_url'] = base_url();
     $dis['view'] = "cart/list";
     $dis['searchKey'] = $searchKey;
     $dis['cartStatus'] = $cartStatus;
     $dis['menu_active'] = 'Giỏ hàng';
     $dis['title'] = "Danh sách đơn hàng";
     $dis['title_table'] = "Tìm được " . $carts->paged->total_rows . " kết quả. Trang hiện tại:" . $carts->paged->current_page . '/' . $carts->paged->total_pages;
     $dis['carts'] = $carts;
     $this->viewadmin($dis);
 }
Пример #21
0
 function edit($id = 0)
 {
     $customer = new customer($id);
     if ($_SERVER['REQUEST_METHOD'] == "GET") {
     } else {
         $customer->name = $this->input->post('name');
         $customer->address = $this->input->post('address');
         $customer->username = $this->input->post('username');
         $customer->homePhone = $this->input->post('homePhone');
         $customer->mobilePhone = $this->input->post('mobilePhone');
         $customer->email = $this->input->post('email');
         $customer->username = $this->input->post('username');
         if ($this->input->post('password') != "") {
             if ($this->input->post('password') == $this->input->post('confirmPassword')) {
                 $customer->password = md5($this->input->post('password'));
                 if ($customer->save()) {
                     redirect($this->admin . 'customers/edit/' . $customer->id);
                 }
             } else {
                 flash_message("error", "Xác nhận mật khẩu phải giống mật khẩu");
             }
         } else {
             if ($customer->save()) {
                 redirect($this->admin . 'customers/edit/' . $customer->id);
             }
         }
     }
     setPagination($this->admin . 'carts/list_all/', 1, 100000000, 4);
     $dis['carts'] = $customer->cartitem;
     $dis['nav_menu'] = array(array("type" => "back", "text" => "Back", "link" => $this->admin . 'customers/list_all/', "onclick" => ""));
     $dis['title_table'] = "Danh sách đơn hàng ";
     $dis['base_url'] = base_url();
     $dis['title'] = "Menu";
     $dis['menu_active'] = "Khách hàng";
     $dis['view'] = "customer/edit";
     $dis['object'] = $customer;
     $this->viewadmin($dis);
 }
Пример #22
0
 function list_all($offset = 0, $limit = 40)
 {
     $productmanufactures = new Productmanufacture();
     $dis['title'] = "Tất cả nhà sản xuất/thương hiệu";
     $searchKey = "";
     if ($_SERVER['REQUEST_METHOD'] == "POST") {
         $searchKey = $this->input->post('searchName');
         $productmanufactures->like("name", $searchKey);
         $dis['title'] = "Kết quả tìm kiếm";
     }
     $productmanufactures->order_by('name', 'asc');
     $productmanufactures->where('recycle', 0);
     $productmanufactures->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'productmanufactures/list_all/', $productmanufactures->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'productmanufactures/list';
     $dis['productmanufactures'] = $productmanufactures;
     $dis['menu_active'] = "Nhà sản xuất";
     $dis['title_table'] = "Trang hiện tại:" . $productmanufactures->paged->current_page . '/' . $productmanufactures->paged->total_pages;
     $dis['searchKey'] = $searchKey;
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}productmanufactures/edit", "onclick" => ""));
     $this->viewadmin($dis);
 }
Пример #23
0
 function listAll($offset = 0, $limit = 20)
 {
     $jobs = new Job();
     $jobs->order_by('position');
     $searchKey = "";
     if ($_SERVER['METHOD_REQUEST'] == 'GET') {
     } else {
         $searchKey = $this->input->post("search_name");
         $jobs->distinct();
         $jobs->group_start();
         $jobs->like('name_vietnamese', $searchKey);
         $jobs->group_end();
     }
     $jobs->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'jobs/listAll/', $jobs->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'job/list';
     $dis['jobs'] = $jobs;
     $dis['searchKey'] = $searchKey;
     $dis['menu_active'] = "Công việc";
     $dis['title_table'] = "Trang hiện tại:" . $jobs->paged->current_page . '/' . $jobs->paged->total_pages;
     $dis['title'] = "Danh sách 'Công việc'";
     $this->viewadmin($dis);
 }
Пример #24
0
 function listAll($offset = 0, $limit = 30)
 {
     $recruiters = new Recruiter();
     $recruiters->order_by('position');
     $searchKey = "";
     if ($_SERVER['METHOD_REQUEST'] == 'GET') {
     } else {
         $searchKey = $this->input->post("search_name");
         $recruiters->distinct();
         $recruiters->group_start();
         $recruiters->like('name', $searchKey);
         $recruiters->group_end();
     }
     $recruiters->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'recruiters/listAll/', $recruiters->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'recruiter/list';
     $dis['recruiters'] = $recruiters;
     $dis['searchKey'] = $searchKey;
     $dis['menu_active'] = "Nhà tuyển dụng";
     $dis['title_table'] = "Trang hiện tại:" . $recruiters->paged->current_page . '/' . $recruiters->paged->total_pages;
     $dis['title'] = "Danh sách 'Nhà tuyển dụng'";
     $this->viewadmin($dis);
 }
Пример #25
0
 function listAll($offset = 0, $limit = 30)
 {
     $candidates = new Candidate();
     $candidates->order_by('position', 'desc');
     $searchKey = "";
     if ($_SERVER['METHOD_REQUEST'] == 'GET') {
     } else {
         $searchKey = $this->input->post("search_name");
         $candidates->distinct();
         $candidates->group_start();
         $candidates->like('lastname', $searchKey);
         $candidates->group_end();
     }
     $candidates->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'candidates/listAll/', $candidates->paged->total_rows, $limit, 4);
     $dis['base_url'] = base_url();
     $dis['view'] = 'candidate/list';
     $dis['candidates'] = $candidates;
     $dis['searchKey'] = $searchKey;
     $dis['menu_active'] = "Ứng viên";
     $dis['title_table'] = "Trang hiện tại:" . $candidates->paged->current_page . '/' . $candidates->paged->total_pages;
     $dis['title'] = "Danh sách 'Ứng viên'";
     $this->viewadmin($dis);
 }
Пример #26
0
 /**
  * Cnews::dosearch()
  * 
  * @param string $st
  * @param integer $offset
  * @param integer $limit
  * @return
  */
 function dosearch($st = "", $offset = 0, $limit = 5)
 {
     $this->load->helper('text');
     $separate = "aaaaaaa23423dddeeeeee838234eeeeefffffff99923ffffffsdfsdfsdfsdf";
     $sep = "239847293dlkfaslf::sdflksdf::sdkfjsldf";
     $this->load->helper('remove_vn');
     $logged_role = $this->logged_in_user->adminrole->id;
     if ($_SERVER['REQUEST_METHOD'] == "GET") {
         $key_list = explode($sep, $st);
         $news = new article();
         if ($key_list[0] != $separate) {
             $news->like('title_vietnamese', $key_list[0]);
         }
         if ($key_list[1] != $separate) {
             $news->where('newscatalogue_id', $key_list[1]);
         } else {
             $news->where_related_newscatalogue('parentcat_id', 7);
         }
         if ($key_list[2] != $separate) {
             $news->where('created >', $key_list[2]);
             $news->where('created <', $key_list[3]);
         }
         if ($key_list[4] != 3) {
             $news->where('active', $key_list[4]);
         }
         if ($key_list[5] != 3) {
             $news->where('hot', $key_list[5]);
         }
         if ($key_list[6] != 3) {
             $news->where('home_hot', $key_list[6]);
         }
         $news->where('recycle', $key_list[7]);
         //arrange by
         switch ($key_list[8]) {
             case "thoigian":
                 $news->order_by('id', $key_list[9]);
                 break;
             case "docnhieu":
                 $news->order_by('view_count', $key_list[9]);
                 break;
         }
         $news->get_paged($offset, $key_list[10], TRUE);
         //       $this->firephp->log($news->check_last_query());
         setPagination($this->admin . 'cnews/dosearch/' . $st, $news->paged->total_rows, $key_list[10], 5);
         $dis['base_url'] = base_url();
         $dis['view'] = 'news/search';
         $dis['news'] = $news;
         $dis['search_result'] = 1;
         $dis['menu_active'] = "Tìm kiếm";
         $dis['title_table'] = "Trang hiện tại:" . $news->paged->current_page . '/' . $news->paged->total_pages;
         $dis['title'] = "Kết quả tìm kiếm";
         $dis['searchkey'] = $key_list[0] != $separate ? $key_list[0] : "";
         $dis['catalogue_id'] = $key_list[1];
         $dis['date_start'] = $key_list[2] != $separate ? $key_list[2] : "";
         $dis['date_end'] = $key_list[3] != $separate ? $key_list[3] : "";
         $dis['active'] = $key_list[4];
         $dis['hot_cat'] = $key_list[5];
         $dis['hot_home'] = $key_list[6];
         $dis['recycle'] = $key_list[7];
         $dis['arrange_by'] = $key_list[8];
         $dis['arrange_direct'] = $key_list[9];
         $dis['showperpage'] = $key_list[10];
         $newscatalogue = new Newscatalogue();
         $newscatalogue->where('parentcat_id', 7);
         $newscatalogue->order_by('position', 'asc');
         $newscatalogue->get();
         $dis['newscatalogue'] = $newscatalogue;
         $this->viewadmin($dis);
     } else {
         $searchkey = trim($this->input->post('searchkey'));
         $catalogue_id = $this->input->post('newscatalogue');
         $date_start = $this->input->post('date_start');
         $date_end = $this->input->post('date_end');
         $active = $this->input->post('active');
         $hot_cat = $this->input->post('hot_cat');
         $hot_home = $this->input->post('hot_home');
         $arrange_by = $this->input->post('arrange_by');
         $arrange_direct = $this->input->post('arrange_direct');
         $showperpage = $this->input->post('showperpage');
         $recycle = $this->input->post('recycle') == 1 ? $this->input->post('recycle') : 0;
         //create string uri query
         $search_string = "";
         $search_string .= $searchkey == "" ? $separate : $searchkey;
         $search_string .= $sep . ($catalogue_id ? $catalogue_id : $separate);
         $search_string .= $sep . ($date_start != "" ? $date_start : $separate);
         $search_string .= $sep . ($date_end != "" ? $date_end : $separate);
         $search_string .= $sep . $active;
         $search_string .= $sep . $hot_cat;
         $search_string .= $sep . $hot_home;
         $search_string .= $sep . $recycle;
         $search_string .= $sep . $arrange_by;
         $search_string .= $sep . $arrange_direct;
         $search_string .= $sep . $showperpage;
         $this->firephp->log($search_string);
         redirect($this->admin . 'cnews/dosearch/' . $search_string . '/0/' . $showperpage);
     }
 }
Пример #27
0
 function listFree($offset = 0, $limit = 50)
 {
     $estates = new Estate();
     if ($_SERVER['REQUEST_METHOD'] == "POST") {
         $searchKey = $this->input->post('searchKey');
         $estates->like('code', $searchKey);
     }
     $estates->where('isFree', 1);
     $estates->order_by('id', 'desc');
     $estates->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'estates/listFree/', $estates->paged->total_rows, $limit, 4);
     $estateareas = new Estatearea();
     $estateareas->order_by('position', 'asc');
     $estateareas->get_iterated();
     $dis['estateareas'] = $estateareas;
     $dis['estates'] = $estates;
     $dis['base_url'] = base_url();
     $dis['view'] = 'estate/list_free';
     $dis['menu_active'] = 'Tin bất động sản (miễn phí)';
     $dis['title'] = "Danh sách các Tin bất động sản (miễn phí)";
     $dis['title_table'] = "Trang hiện tại:" . $estates->paged->current_page . '/' . $estates->paged->total_pages;
     $this->viewadmin($dis);
 }
Пример #28
0
 function listByParent($id, $offset = 0, $limit = 20)
 {
     $products = new Product();
     $products->where_related_productcat('id', $id);
     $products->get_paged($offset, $limit, TRUE);
     setPagination($this->admin . 'products/listByParent/' . $id . '/', $products->paged->total_rows, $limit, 5);
     $dis['base_url'] = base_url();
     $dis['title_table'] = "Trang hiện tại:" . $products->paged->current_page . '/' . $products->paged->total_pages;
     $dis['products'] = $products;
     $dis['view'] = 'products/list';
     $dis['menu_active'] = "Sản phẩm";
     $dis['searchKey'] = "";
     $dis['title'] = "";
     $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}products/edit/0/" . $id, "onclick" => ""));
     $this->viewadmin($dis);
 }