[ Avaa Bypassed ]




Upload:

Command:

www-data@18.221.85.236: ~ $
<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Publication_Model extends MY_Model {
    
    function __construct() {
        parent::__construct();
    }
    
     public function get_publication_list(){
         
        $this->db->select('C.*, T.type, S.school_name, AY.session_year,RA.title as researcharea');
        $this->db->from('publications AS C');
        $this->db->join('publication_types AS T', 'T.id = C.type_id', 'left'); 
        $this->db->join('research_areas AS RA', 'RA.id = C.research_area_id', 'left'); 
        $this->db->join('schools AS S', 'S.id = C.school_id', 'left'); 
        $this->db->join('academic_years AS AY', 'AY.id = C.academic_year_id', 'left');
              
        if($this->session->userdata('role_id') != SUPER_ADMIN){
            $this->db->where('C.school_id', $this->session->userdata('school_id'));
        }
        $this->db->where('C.user_id', logged_in_user_id());
        $this->db->order_by('C.id', 'DESC');
        return $this->db->get()->result();
        
    }
    
    public function get_single_publication($id){
        
        $this->db->select('C.*, T.type, S.school_name, AY.session_year,RA.title as researcharea');
        $this->db->from('publications AS C');
        $this->db->join('publication_types AS T', 'T.id = C.type_id', 'left'); 
        $this->db->join('research_areas AS RA', 'RA.id = C.research_area_id', 'left'); 
        $this->db->join('schools AS S', 'S.id = C.school_id', 'left'); 
        $this->db->join('academic_years AS AY', 'AY.id = C.academic_year_id', 'left');
        $this->db->where('C.id', $id);
       
        
        return $this->db->get()->row();        
    } 
}

Filemanager

Name Type Size Permission Actions
Ajax_Model.php File 3.75 KB 0777
Auth_Model.php File 1.05 KB 0777
Award_Model.php File 1.43 KB 0777
Complain_Model.php File 1.47 KB 0777
Dashboard_Model.php File 10.61 KB 0777
Education_Model.php File 1.43 KB 0777
Experience_Model.php File 1.44 KB 0777
Membership_Model.php File 1.44 KB 0777
Profile_Model.php File 3.15 KB 0777
Publication_Model.php File 1.71 KB 0777
Theme_Model.php File 198 B 0777
Training_Model.php File 1.43 KB 0777
Userleave_Model.php File 2.48 KB 0777
Verify_Model.php File 1.82 KB 0777
index.html File 131 B 0777