Example #1
0
 public function all($start = '0')
 {
     $value['posts'] = $this->users_model->get_all_users_by_range($start, $this->per_page, 'id');
     $total = $this->users_model->count_all_pages();
     $value['pages'] = configPagination('admin/users/all', $total, 5, $this->per_page);
     $data['title'] = 'Users';
     $data['content'] = $this->load->view('admin/users/allusers_view', $value, TRUE);
     $this->load->view('admin/template/template_view', $data);
 }
 public function all($start = '0')
 {
     $value['posts'] = $this->slider_model->get_all_posts_by_range('all', $this->per_page, 'slide_order', 'asc');
     $total = $this->slider_model->count_all_posts();
     $value['pages'] = configPagination('admin/slider/all', $total, 5, $total);
     $data['title'] = lang_key('all_slides');
     $data['content'] = load_admin_view('slider/allposts_view', $value, TRUE);
     load_admin_view('template/template_view', $data);
 }
Example #3
0
 public function all($start = '0')
 {
     $value['posts'] = $this->category_model->get_all_categories_by_range($start, $this->per_page, 'create_time');
     $total = $this->category_model->count_all_categories();
     $value['pages'] = configPagination('admin/category/all', $total, 5, $this->per_page);
     $data['title'] = 'All Categories';
     $data['content'] = $this->load->view('admin/categories/allcategories_view', $value, TRUE);
     $this->load->view('admin/template/template_view', $data);
 }
Example #4
0
 public function index($start = 0)
 {
     $dados['role'] = $this->getUser()->getRole();
     $dados['faturas'] = $this->faturas_model->getFaturas(null, $start, $this->per_page);
     $total = $this->faturas_model->countFaturas(null);
     $dados['pages'] = configPagination('faturas/index', $total, 2, $this->per_page);
     $data['title'] = 'Faturas';
     $data['content'] = $this->load->view('faturas/listaFaturas', $dados, TRUE);
     $this->load->view('template/template_view', $data);
 }
Example #5
0
 public function home($start = 0)
 {
     $filtros = array();
     $dados['role'] = $this->getUser()->getRole();
     $dados['usuarios'] = $this->users_model->getUsers($filtros, $start, $this->per_page);
     $total = $this->users_model->countUsers($filtros);
     $dados['pages'] = configPagination('usuarios', $total, 2, $this->per_page);
     $data['title'] = 'Usuários Cadastrados';
     $data['content'] = $this->load->view('usuario/lista', $dados, TRUE);
     $this->load->view('template/template_view', $data);
 }
Example #6
0
 public function index($start = 0)
 {
     $user = $this->getUser();
     $filtro['role'] = $user->getRole();
     $dados['role'] = $filtro['role'];
     $dados['cursos'] = $this->cursos_model->getCursos($filtro, $start, $this->per_page);
     $total = $this->cursos_model->countCursos($filtro);
     $dados['pages'] = configPagination('cursos', $total, 2, $this->per_page);
     $data['title'] = 'Cursos';
     $data['content'] = $this->load->view('cursos/listaCursos', $dados, TRUE);
     $this->load->view('template/template_view', $data);
 }
Example #7
0
 public function payments($start = 0)
 {
     $this->load->model('admin/realestate_model');
     $value['start'] = $start;
     $value['posts'] = $this->realestate_model->get_all_payment_history($start, $this->per_page, 'id', 'desc');
     $total = $this->realestate_model->count_all_payment_history();
     $value['pages'] = configPagination('admin/realestate/payments', $total, 5, $this->per_page);
     $data['title'] = 'Payment History';
     $data['content'] = $this->load->view('admin/estate/all_payments_view', $value, TRUE);
     $this->load->view('admin/template/template_view', $data);
 }
Example #8
0
 public function allusers($start = 0)
 {
     if (!is_admin()) {
         echo lang_key('dont_have_permission');
         die;
     }
     $this->load->model('user/user_model');
     $value['users'] = $this->user_model->get_all_users_by_range($start, $this->per_page, 'id');
     $total = $this->user_model->count_all_users();
     $value['pages'] = configPagination('admin/allusers', $total, 3, $this->per_page);
     $data['content'] = load_admin_view('users/allusers_view', $value, TRUE);
     load_admin_view('template/template_view', $data);
 }
 public function emailtracker($start = '0')
 {
     $value['posts'] = $this->classified_model->get_all_emails_admin($start, $this->per_page);
     $total = $this->classified_model->get_all_emails_admin('total');
     $value['pages'] = configPagination('admin/classified/emailtracker', $total, 5, $this->per_page);
     $value['start'] = $start;
     $data['title'] = lang_key('email_tracker');
     $data['content'] = load_admin_view('classified/all_emails_view', $value, TRUE);
     load_admin_view('template/template_view', $data);
 }
Example #10
0
 public function agentproperties($user_name = '0', $start = 0)
 {
     $value['user'] = $this->show_model->get_user_by_username($user_name);
     $user = $value['user']->row();
     $user_id = $user->id;
     $value['page_title'] = lang_key('agent_estates');
     //$value['user']= $user;
     $value['query'] = $this->show_model->get_all_estates_agent($user_id, $start, $this->PER_PAGE, 'id');
     $total = $this->show_model->count_all_estates_agent($user_id);
     $value['pages'] = configPagination('show/agentproperties/' . $user_id, $total, 5, $this->PER_PAGE);
     //social load info
     $this->load->model('update_model');
     $value['updates'] = $this->update_model->getViewerUpdates($user_id, '0');
     $value['view_style'] = 'grid';
     $data['content'] = load_view('agent_properties_view', $value, TRUE);
     $data['alias'] = 'type';
     load_template($data, $this->active_theme);
 }
 public function memberposts($user_id = '0', $start = 0)
 {
     $value['user'] = $this->show_model->get_user_by_userid($user_id);
     $value['query'] = $this->show_model->get_all_estates_agent($user_id, $start, $this->PER_PAGE, 'id');
     $total = $this->show_model->count_all_estates_agent($user_id);
     $value['pages'] = configPagination('profile/' . $user_id, $total, 5, $this->PER_PAGE);
     $data['content'] = load_view('member_posts_view', $value, TRUE);
     $data['alias'] = 'member_posts';
     load_template($data, $this->active_theme);
 }
Example #12
0
 public function agentproperties($user_id = '0', $start = 0)
 {
     $value['user'] = $this->show_model->get_user_by_userid($user_id);
     $value['page_title'] = lang_key('agent_estates');
     $value['query'] = $this->show_model->get_all_estates_agent($user_id, $start, $this->PER_PAGE, 'id');
     $total = $this->show_model->count_all_estates_agent($user_id);
     $value['pages'] = configPagination('show/agentproperties/' . $user_id, $total, 5, $this->PER_PAGE);
     $value['view_style'] = 'grid';
     $value['alias'] = 'agent';
     $data['content'] = load_view('agent_properties_view', $value, TRUE);
     $data['alias'] = 'agent';
     load_template($data, $this->active_theme);
 }
Example #13
0
 public function upvotes($user_name, $start = '0')
 {
     $user_name = $this->uri->segment(4);
     $value['profile'] = $this->user_model->get_user_profile_by_user_name($user_name);
     $likes = json_decode($value['profile']->liked);
     $ids = array();
     foreach ($likes as $key => $row) {
         array_push($ids, str_replace('post_', '', $key));
     }
     $value['posts'] = $this->post_model->get_all_liked_posts_by_range($start, $this->per_page, 'publish_time', 'desc', $ids);
     $total = $this->post_model->count_all_liked_posts($ids);
     $value['pages'] = configPagination('user/detail/' . $user_name, $total, 5, $this->per_page);
     $data['content'] = load_view('default_view', $value, TRUE, $this->active_theme);
     $data['tab'] = 'upvotes';
     load_template($data, $this->active_theme, 'template_userprofile_view');
 }
 public function locations($start = '0')
 {
     $data['title'] = lang_key('all_locations');
     $value['posts'] = $this->business_model->get_all_locations($start, 10);
     $total = $this->business_model->get_all_locations('total', $this->per_page);
     $value['pages'] = configPagination('admin/business/locations', $total, 5, $this->per_page);
     $data['content'] = load_admin_view('business/all_locations_view', $value, TRUE);
     load_admin_view('template/template_view', $data);
 }
Example #15
0
 public function agentproperties($user_id = '0', $start = 0)
 {
     if ($this->session->userdata('view_style') == '') {
         $this->session->set_userdata('view_style', 'map');
     }
     if ($this->session->userdata('view_style') == 'map') {
         $start = 'all';
     }
     $value['user'] = $this->show_model->get_user_by_userid($user_id);
     $value['page_title'] = lang_key('agent_estates');
     $value['query'] = $this->show_model->get_all_estates_agent($user_id, $start, $this->PER_PAGE, 'id');
     $total = $this->show_model->count_all_estates_agent($user_id);
     $value['pages'] = configPagination('show/agentproperties/' . $user_id, $total, 5, $this->PER_PAGE);
     $is_user_agent = isAgent($user_id);
     if (!$is_user_agent) {
         redirect(site_url());
     }
     $value['alias'] = 'agent';
     $data['content'] = load_view('agent_properties_view', $value, TRUE);
     $data['alias'] = 'agent';
     load_template($data, $this->active_theme);
 }
Example #16
0
 public function allestatesagent($start = 0)
 {
     $this->load->model('realestate_model');
     if (isset($_POST['filter_purpose'])) {
         $this->session->set_userdata('filter_purpose', $this->input->post('filter_purpose'));
     }
     if (isset($_POST['filter_type'])) {
         $this->session->set_userdata('filter_type', $this->input->post('filter_type'));
     }
     if (isset($_POST['filter_condition'])) {
         $this->session->set_userdata('filter_condition', $this->input->post('filter_condition'));
     }
     if (isset($_POST['filter_status'])) {
         $this->session->set_userdata('filter_status', $this->input->post('filter_status'));
     }
     if (isset($_POST['filter_orderby'])) {
         $this->session->set_userdata('filter_orderby', $this->input->post('filter_orderby'));
     }
     if (isset($_POST['filter_ordertype'])) {
         $this->session->set_userdata('filter_ordertype', $this->input->post('filter_ordertype'));
     }
     $value['posts'] = $this->realestate_model->get_all_estates_agent($start, $this->PER_PAGE, 'create_time', 'desc');
     $total = $this->realestate_model->count_all_estates_agent();
     $value['pages'] = configPagination('profile/allestatesagent', $total, 15, $this->PER_PAGE);
     $value['start'] = $start;
     $data['title'] = 'All estates';
     $data['content'] = load_view('all_estates_view', $value, TRUE);
     //$data['content'] 	= $this->load->view('admin/estate/all_estates_view',$value,TRUE);
     load_template($data, $this->active_theme);
     //$this->load->view('admin/template/template_view',$data);
 }