GRAYBYTE WORDPRESS FILE MANAGER9666

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/public_html/Barga/application/modules/dashboard/controllers/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/public_html/Barga/application/modules/dashboard/controllers//Dashboard.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Dashboard extends Basecontroller {
	public function __construct(){
		parent::__construct();
		$this->load->model('Dashboard_model', 'Dashboard');
		$this->load->model('Jobs/Jobs_model', 'Jobs');
		$this->load->model('services/Services_model', 'Services');
		$this->controller_name = "dashboard";
		$this->folder = "dashboard";
		$this->per_page = APP_PER_PAGE;
        $this->load->library('session');

		if(!$this->session->userdata('is_login')) { redirect('sessions','refresh'); } //Checked is logined in or not	
	}
	public function index()
	{

		$data = array();
		$conditions = array();
        //calc offset number
        $page = $this->input->post('page');
        if(!$page) $offset = 0;
        else $offset = $page;
		$service_id = $this->input->post('service_id');
    	if(!empty($service_id)){
            $conditions['search']['service_id'] = $service_id;
        }
        $total_record = count($this->Dashboard->getJobList($conditions));
        //pagination configuration
        $config['target']      = '#data_list';
        $config['base_url']    = base_url().$this->controller_name.'/ajaxJobList';
        $config['total_rows']  = $total_record;
        $config['per_page']    = $this->per_page;
        $config['link_func']   = 'searchFilter';
        $this->ajax_pagination->initialize($config);
        
        //get the Qualification data
        $data['limit']	=	$this->per_page;
        $data['modal_job_application'] = $this->load->view('jobs/job_view/modal_job_application', array(), true);
        $data['job'] = $this->Dashboard->getJobList($conditions,$data);
        $data['title'] = "Jobs";
		$data['total_record'] = $total_record;
		$data['sl_no'] = $page;

		$data['jobs_html'] = $this->load->view('jobs/job_list/ajax_job_lists', $data, true);
		$data['title'] = "Dashboard";
		$data['total_active_jobs'] = $this->Dashboard->getTotalActiveJobs();
		$data['total_guardian'] = $this->Dashboard->getTotalCustomer();
		$data['total_service_provider'] = $this->Dashboard->getTotalServiceProvider();
		$data['total_active_packages'] = $this->Dashboard->getTotalActivePackages();
		$data['total_registered_devices'] = $this->Dashboard->getTotalRegisteredDevices();
 		$this->template->admin('dashboard/index', $data);
	
	}
	
	function addSCript()
	{	
		$js = '<script src="'.base_url("assets/js/graphchart.js").'"></script>';
		return $js;
	}
	
	public function ajaxJobList()
	{
        $conditions = array();
        //calc offset number
        $page = $this->input->post('page');
        if(!$page) $offset = 0;
        else $offset = $page;
        
        //set conditions for search
        $customer = $this->input->post('customer');
        $service_provider = $this->input->post('service_provider');
        $service_id = $this->input->post('service_id');
        $job_post_date_from = $this->input->post('job_post_date_from');
        $job_post_date_to = $this->input->post('job_post_date_to');
        $job_expiring_date_from = $this->input->post('job_expiring_date_from');
        $job_expiring_date_to = $this->input->post('job_expiring_date_to');
        $area_locality = $this->input->post('area_locality');
        $job_post_code = $this->input->post('job_post_code');
        if(!empty($customer)){
            $conditions['search']['customer'] = $customer;
        }
        if(!empty($service_provider)){
            $conditions['search']['service_provider'] = $service_provider;
        }
        if(!empty($service_id)){
            $conditions['search']['service_id'] = $service_id;
        }
         if(!empty($job_post_date_from)){
            $conditions['search']['job_post_date_from'] = $job_post_date_from;
        }
         if(!empty($job_post_date_to)){
            $conditions['search']['job_post_date_to'] = $job_post_date_to;
        }
         if(!empty($job_expiring_date_from)){
            $conditions['search']['job_expiring_date_from'] = $job_expiring_date_from;
        }
         if(!empty($job_expiring_date_to)){
            $conditions['search']['job_expiring_date_to'] = $job_expiring_date_to;
        }
        if(!empty($area_locality)){
            $conditions['search']['area_locality'] = $area_locality;
        }
        if(!empty($job_post_code)){
            $conditions['search']['job_post_code'] = $job_post_code;
        }
        //total rows count
        $total_record = count($this->Dashboard->getJobList($conditions));
        
        //pagination configuration
        $config['target']      = '#data_list';
        $config['base_url']    = base_url().$this->controller_name.'/ajaxJobList';
        $config['total_rows']  = $total_record;
        $config['per_page']    = $this->per_page;
        $config['link_func']   = 'searchFilter';
        $this->ajax_pagination->initialize($config);
        
        //set start and limit
        $conditions['start'] = $offset;
        $conditions['limit'] = $this->per_page;
        
        //get posts data

        $data['job'] = $this->Dashboard->getJobList($conditions);
        
        $data['title'] = "Jobs";
		$data['total_record'] = $total_record;
		$data['sl_no'] = $page;
		//load the view
		$jobs_html = $this->load->view('jobs/job_list/ajax_job_lists', $data, true);
		echo $jobs_html;exit;
    }
	
	public function graphActivity()
	{	
		$res = $this->Dashboard->getActivityGraph();
		return $res;
	}
	
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 27 2024 00:19:25
giriqfky / giriqfky
0755
Dashboard.php
5.307 KB
July 27 2024 00:19:25
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF