[ Avaa Bypassed ]




Upload:

Command:

www-data@18.216.67.249: ~ $
<?php

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

/* * *****************Generate.php**********************************
 * @product name    : University Management System Express
 * @type            : Class
 * @class name      : Generate
 * @description     : Manage all type of system student listing.  
 * @author          : Farid Ahmed, Webmaster, BDU 	
 * @url             : https://bdu.ac.bd/      
 * @support         : farid0001@bdu.ac.bd	
 * @copyright       : BDU ICT Team	 	
 * ********************************************************** */

class Certificate extends MY_Controller {

    public $data = array();
      
   public function __construct() {
        parent::__construct();
                
        $this->load->model('Type_Model', 'type', true);                
    }

  

   

    /*****************Function index**********************************
     * @type            : Function
     * @function name   : index
     * @description     : Load user filtering interface                 
     *                      
     * @param           : null
     * @return          : null 
     * ********************************************************** */
    public function index(){
        
        
        check_permission(VIEW);
        
        $this->data['students'] = '';
        
         if ($_POST) {
             
            $school_id = $this->input->post('school_id');
            $class_id = $this->input->post('class_id');
            $certificate_id = $this->input->post('certificate_id');
            
            $school = $this->type->get_school_by_id($school_id);
            if(!$school->academic_year_id){
                error($this->lang->line('set_academic_year_for_school'));
                redirect('certificate/index');
            }
            
            $this->data['students'] = $this->type->get_student_list($school_id, $class_id, $school->academic_year_id);
            $this->data['school_id'] = $school_id;
            $this->data['class_id'] = $class_id;
            $this->data['certificate_id'] = $certificate_id;
         }
         
        $condition = array();
        $condition['status'] = 1;        
        if($this->session->userdata('role_id') != SUPER_ADMIN){            
            $condition['school_id'] = $this->session->userdata('school_id');             
            $this->data['certificates'] = $this->type->get_list('certificates', $condition, '','', '', 'id', 'ASC');
            $this->data['classes'] = $this->type->get_list('classes', $condition, '','', '', 'id', 'ASC');
        }        
        
        $this->layout->title($this->lang->line('generate') .' ' . $this->lang->line('certificate') .' | ' . SMS);
        $this->layout->view('certificate/index', $this->data); 
    }
    
    
    /*****************Function generate**********************************
     * @type            : Function
     * @function name   : generate
     * @description     : Load certificate generete interface                 
     *                      
     * @param           : null
     * @return          : null 
     * ********************************************************** */
    public function generate($school_id, $student_id, $class_id, $certificate_id){
        
        
        check_permission(VIEW);
        $school = $this->type->get_school_by_id($school_id);
        
        if(!$school->academic_year_id){
            error($this->lang->line('set_academic_year_for_school'));
            redirect('certificate/index');
        }
        
        $this->data['certificate'] = $this->type->get_single('certificates', array('id' => $certificate_id));
        $this->data['school'] = $this->type->get_single('schools', array('id'=>$this->data['certificate']->school_id, 'status'=>1));
        $this->data['student'] = $this->type->get_student($student_id, $class_id, $school->academic_year_id);     
        $this->data['certificate']->main_text = get_formatted_certificate_text($this->data['certificate']->main_text, $this->data['student']->role_id, $this->data['student']->user_id);
        
        create_log('Has been generate a certificate for student : '.$this->data['student']->name); 
        
        $this->layout->title($this->lang->line('generate') .' ' . $this->lang->line('certificate') .' | ' . SMS);
        $this->load->view('certificate/generate', $this->data); 
        
    }

}

Filemanager

Name Type Size Permission Actions
Admit.php File 3.28 KB 0777
Admitsetting.php File 14.95 KB 0777
Card.php File 4.31 KB 0777
Employee.php File 2.44 KB 0777
Idsetting.php File 14.71 KB 0777
Schooladmitsetting.php File 13.66 KB 0777
Schoolidsetting.php File 13.53 KB 0777
Student.php File 2.7 KB 0777
Teacher.php File 2.39 KB 0777
index.html File 131 B 0777