Viewing file: rpt_pi.php (20.46 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include('rg_controller.php'); class Rpt_pi extends Rg_controller { // function __construct() { // parent::__construct(); // }
public function cur_popup() { $this->load->model($this->config->item("rg_folder").'mo_rg_student','std'); $std = $this->std; $stdCondition = array('stdGenStatus' => 'Y','curStatus' => 'Y'); $stdGroup = array('stdCurId' => 'stdCurId','stdAdY' => 'stdAdY'); $this->contents['rs_std'] = $std->qryStdJoinCur($stdCondition,'',$stdGroup); $this->output_detail($this->config->item("rg_folder")."v_cur_popup"); }
public function searchRptRis128() { $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur');
$con_rs_cur = array('curStatus' => 'Y'); $ord_rs_cur = array('curId' => '');
$this->contents['rs_cur'] = $this->cur->get_options($con_rs_cur,$ord_rs_cur,'','---เลือกหลักสูตร---'); $this->output($this->config->item("rg_folder")."v_searchRptRis128"); }
public function rptRis128() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="error">','</div>'); $this->form_validation->set_rules('curId', ' ', 'callback_checkselect');
if($this->form_validation->run() == true) { $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $this->load->model($this->config->item("ppc_folder").'mo_level','lev'); $this->load->model($this->config->item("rg_folder").'mo_rg_student','std'); $this->load->model($this->config->item("rg_folder").'mo_rg_studentdetails','sdt'); $this->load->model($this->config->item("rg_folder").'mo_rg_prefix','prf'); $cur = $this->cur; $lev = $this->lev; $std = $this->std; $sdt = $this->sdt; $prf = $this->prf; $curId = $this->input->post('curId');
$cur->curId = $curId; $cur->get_by_key(TRUE); $this->contents['qu_cur'] = $cur; $lev->levelId = $cur->curElvId; $lev->get_by_key(TRUE); $this->contents['qu_lev'] = $lev; $stdCondition = array('stdCurId' =>$curId); $stdOrder = array('stdName' => 'ASC', 'stdSurname' => 'ASC');
$this->contents['curId'] = $curId; $this->contents['rs_cur'] = $std->qryStdByCurId($stdCondition,$stdOrder); //echo $this->db->last_query(); $this->output_detail($this->config->item("rg_folder")."v_rptRis128"); } else $this->searchRptRis128();
}
public function searchRptRis201() { $this->load->model($this->config->item("rg_folder").'mo_rg_termconfig','tcf'); $this->load->model($this->config->item("rg_folder").'mo_rg_studyyear','sty'); $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $this->load->model($this->config->item("rg_folder").'mo_rg_edulevel','edl'); $this->load->model($this->config->item("rg_folder").'mo_rg_student','std'); $this->load->model($this->config->item("rg_folder").'mo_rg_entrytype','ett'); $tcf = $this->tcf; $sty = $this->sty; $cur = $this->cur; $edl = $this->edl; $std = $this->std; $ett = $this->ett; $this->contents['qu_tcf'] = $tcf->getBetweenDateByNowDate(getNowDate());
$styOrder = array('syId' => ''); $this->contents['rs_sty'] = $sty->qrySy('',$styOrder,'');
// $curCon = array('curStatus' => 'Y'); // $curGroup = array('curElvId' => 'curElvId'); // $this->contents['rs_cur'] = $cur->qryCurJoinOther($curCon,'',$curGroup); $curCon = array('curStatus' => 'Y', 'stdSstId' => 1 ); $curGroup = array('curElvId' => 'curElvId'); $this->contents['rs_cur'] = $cur->qryCurJoinEdgElvStd($curCon,'',$curGroup); $this->contents['cur'] = $cur;
$styCon = array('syId' => 'syId'); $this->contents['rs_sty'] = $sty->qrySy('',$styOrder,'');
$ettOrder = array('etId' => ''); $this->contents['rs_ett'] = $ett->qryEt('',$ettOrder,''); $this->contents['std'] = $std;
$this->output_detail($this->config->item("rg_folder")."v_rptRis201"); }
public function rptRis203PDF() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="error">','</div>'); $this->form_validation->set_rules('curId', ' ', 'callback_checkselect'); $this->form_validation->set_rules('curName', ' ', ''); $this->form_validation->set_rules('adY', ' ', ''); $this->form_validation->set_rules('selectSyId', ' ', 'callback_checkselect');
if($this->form_validation->run() == true) { $this->load->model($this->config->item("rg_folder").'mo_rg_student','std'); $this->load->model($this->config->item("rg_folder").'mo_rg_termconfig','tcf'); $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $std = $this->std; $tcf = $this->tcf; $cur = $this->cur;
$curId = $this->input->post('curId'); $curName = $this->input->post('curName'); $adY = $this->input->post('adY'); $selectSyId = $this->input->post('selectSyId');
$stdCon = array('stdCurId' => $curId,'stdSyId' => $selectSyId ,'stdAdY' => $adY); $stdOr = array('stdCode' => ''); $this->contents['rs_std'] = $std->qryStdJoinPfSoPrvEt($stdCon,$stdOr,"");
$this->contents['qu_tcf'] = $tcf->getBetweenDateByNowDate(getNowDate());
$curCon = array('curId' => $curId); $this->contents['qu_cur'] = $cur->qryCurJoinOther($curCon,"",""); $this->output_detail($this->config->item("rg_folder")."v_rptRis203PDF"); } else $this->searchRptRis203(); }
public function searchRptRis203() { $this->load->model($this->config->item("rg_folder").'mo_rg_studyyear','sy'); $sy = $this->sy; $ord_rs_sy = array('syId' => ''); $this->contents['rs_sy'] = $this->sy->get_options('',$ord_rs_sy,'','y'); $this->output($this->config->item("rg_folder")."v_searchRptRis203"); }
public function curAndAdmitYAndGenStatusIsYTable() {
return; }
public function ris204() { $this->load->model($this->config->item("rg_folder").'mo_rg_termconfig','tcf'); $this->load->model($this->config->item("rg_folder").'mo_rg_entrytype','ett'); $this->load->model($this->config->item("rg_folder").'mo_rg_preadmit','pam'); $this->load->model($this->config->item("rg_folder").'mo_rg_student','std'); $tcf = $this->tcf; $ett = $this->ett; $pam = $this->pam; $std = $this->std;
$this->contents['qu_tcf'] = $tcf->getBetweenDateByNowDate(getNowDate());
$ettOrder = array('etId' => ''); $this->contents['rs_ett'] = $ett->qryEt('',$ettOrder);
$papOrder = array('paId' => ''); $this->contents['rs_pam'] = $pam->qryPa('',$papOrder,'');
$stdCon = array('stdGenStatus' => 'Y','stdPaId' => '1','stdGraduateDate' => '0000-00-00','stdGraduateY' => '0'); $stdOrder = array('stdCurId' => '','genNo' => '','stdSyId' => ''); $stdGroup = array('stdCurId' => 'stdCurId','stdGenId' => 'stdGenId','stdSyId' => 'stdSyId'); $this->contents['rs_std'] = $std->qryStdJoinGeneration($stdCon,$stdOrder,$stdGroup);
$this->contents['std'] = $std;
$this->output_detail($this->config->item("rg_folder")."v_rptRis204"); }
public function searchRptRis205() { $this->contents['acY'] = $this->session->userdata('acY'); $this->output($this->config->item("rg_folder")."v_searchRptRis205"); }
public function rptRis205() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="error">','</div>'); $this->form_validation->set_rules('acY', ' ', 'callback_checkAcY');
if($this->form_validation->run() == true) { $this->load->model($this->config->item("rg_folder").'mo_rg_studyyear','sty'); $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $this->load->model($this->config->item("rg_folder").'mo_rg_student','std'); $this->load->model($this->config->item("rg_folder").'mo_rg_studentactivity','sta'); $sty = $this->sty; $cur = $this->cur; $std = $this->std; $sta = $this->sta; $acY = $this->input->post('acY'); $dateFrom = $this->input->post('dateFrom'); $dateTo = $this->input->post('dateTo');
$this->contents['acadYear'] = $acY; $this->contents['dateFrom'] = $dateFrom; $this->contents['dateTo'] = $dateTo; $this->contents['sta'] = $sta;
$styOrder = array('syId' => ''); $this->contents['nr_sty'] = $sty->qrySy('',$styOrder,'');
$curCon = array('curStatus' => 'Y'); $curOrder = array('curId' => ''); $this->contents['nr_cur'] = $cur->qryCur($curCon,$curOrder,'');
$this->contents['num_std'] = $std->qryStdJoinStdSumByacY($acY);
$this->contents['rs_sta'] = $sta->qrystdActivityByAcYAndDateGroupActNameAndDate($acY,splitDateForm2($dateFrom, '/'), splitDateForm2($dateTo, '/'));
$this->output_detail($this->config->item("rg_folder")."v_rptRis205"); } else $this->searchRptRis205();
}
public function searchRptRis206() {
$this->contents['acY'] = $this->session->userdata('acY'); $this->output($this->config->item("rg_folder")."v_searchRptRis206"); }
public function rptRis206() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="error">','</div>'); $this->form_validation->set_rules('acY', ' ', 'callback_checkAcY');
if($this->form_validation->run() == true) { //$oSa1 = new StudentActivity(); //$oSa2 = new StudentActivity(); //$oSm1 = new StudentMaster(); //$oSm2 = new StudentMaster(); //$oPf = new Prefix();
$this->load->model($this->config->item("rg_folder").'mo_rg_student','std'); $this->load->model($this->config->item("rg_folder").'mo_rg_studentactivity','sta'); $std = $this->std; $sta = $this->sta; $acY = $this->input->post('acY'); $dateFrom = $this->input->post('dateFrom'); $dateTo = $this->input->post('dateTo');
$this->contents['acadYear'] = $acY; $this->contents['dateFrom'] = $dateFrom; $this->contents['dateTo'] = $dateTo; $this->contents['sta'] = $sta; $this->contents['std'] = $std;
$this->contents['rs_sta'] = $sta->qrystdActivityByAcYAndDateGroupActNameAndDate($acY,splitDateForm2($dateFrom, '/'), splitDateForm2($dateTo, '/')); $this->contents['rs_std'] = $std->qryByAdYAndStudying($acY,$acY); $this->output_detail($this->config->item("rg_folder")."v_rptRis206"); } else $this->searchRptRis206();
}
public function searchRptRis207() { $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur');
$con_rs_cur = array('curStatus' => 'Y'); $ord_rs_cur = array('curId' => '');
$this->contents['acY'] = $this->session->userdata('acY'); $this->contents['rs_cur'] = $this->cur->get_options($con_rs_cur,$ord_rs_cur,'',''); $this->output($this->config->item("rg_folder")."v_searchRptRis207"); }
public function rptRis207() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="error">','</div>'); $this->form_validation->set_rules('curId', ' ', 'callback_checkselect'); $this->form_validation->set_rules('acY', ' ', 'callback_checkAdY');
if($this->form_validation->run() == true) { $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $this->load->model($this->config->item("rg_folder").'mo_rg_term','ter'); $this->load->model($this->config->item("rg_folder").'mo_rg_student','std'); $this->load->model($this->config->item("rg_folder").'mo_rg_studentsummary','ss'); $this->load->model($this->config->item("rg_folder").'mo_rg_registdetails','rgd');
$cur = $this->cur; $ter = $this->ter; $std = $this->std; $ss = $this->ss; $rgd = $this->rgd;
$curId = $this->input->post('curId'); $acadYear = $this->input->post('acY');
$this->contents['acadYear'] = $acadYear; $this->contents['ss'] = $ss; $this->contents['rgd'] = $rgd;
$curCon = array('curId' => $curId); $this->contents['qu_cur'] = $cur->qryCur($curCon,'','');
$terOrder = array('tmId' => ''); $this->contents['rs_ter'] = $ter->qryTm('',$terOrder,'');
$stdCon = array('stdCurId' => $curId); $stdOrder = array('stdSyId' => 'ASC' , 'stdAdY' => 'DESC' , 'stdCode' => 'ASC'); $this->contents['rs_std'] = $std->qryStdJoinPrfJoinSchoJoinPrvHomeByCurId($stdCon,$stdOrder,'');
if($this->contents['rs_std']->num_rows()){ $this->contents['prv_name'] = ($this->contents['rs_std']->row()->provinceName == NULL) ? '-' : $this->contents['rs_std']->row()->provinceName; } else { $this->contents['prv_name'] = ""; }
$this->output_detail($this->config->item("rg_folder")."v_rptRis207"); } else $this->searchRptRis207(); }
//================================== EXAMPLE ============================================ //================================== EXAMPLE ============================================ //================================== EXAMPLE ============================================ //================================== EXAMPLE ============================================
function checkAcadYear($str){ $v1 = $this->input->post('admitAcY'); if ($str != "" && strlen($str)!=4) { $this->form_validation->set_message('checkAcadYear','กรุณาป้อน%s'); return false; }elseif($v1 > $str && $v1 != ""){ $this->form_validation->set_message('checkAcadYear','ปีการศึกษา ต้องมากกว่าหรือเท่ากับ ปีการศึกษาที่เข้า'); return false; }else return true; }
function checkAdmitAcadYear($str){ $reviseY = 2552; $syId = $this->input->post('syId'); $acY = $this->input->post('acY'); if ($str != "" && strlen($str)!=4) { $this->form_validation->set_message('checkAdmitAcadYear','กรุณาป้อน%s'); return false; }elseif ($syId != "" && $str == "") { $this->form_validation->set_message('checkAdmitAcadYear','กรุณาป้อน%s'); return false; }elseif ($acY >= $reviseY && $str == "") { $this->form_validation->set_message('checkAdmitAcadYear','กรุณาป้อน%s'); return false; }else return true; }
function checkSyId($str){ $v1 = $this->input->post('admitAcY'); if ($v1 != "" && $str == "") { $this->form_validation->set_message('checkSyId','กรุณาเลือก%s'); return false; }else return true; } //**********************************************************// public function searchRptRis101() { $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $this->load->model($this->config->item("rg_folder").'mo_rg_termconfig','tmc'); $this->load->model($this->config->item("rg_folder").'mo_rg_studyyear','sy'); $this->load->model($this->config->item("rg_folder").'mo_rg_term','tm');
$con_rs_cur = array('curStatus' => 'Y'); $ord_rs_cur = array('curId' => ''); $ord_rs_sy = array('syId' => ''); $ord_rs_tm = array('tmId' => ''); $this->contents['rs_cur'] = $this->cur->get_options($con_rs_cur,$ord_rs_cur,'','---เลือกหลักสูตร---'); $this->contents['rs_sy'] = $this->sy->get_options('',$ord_rs_sy,'','---เลือกชั้นปี---'); $this->contents['rs_tm'] = $this->tm->get_options('',$ord_rs_tm,'',FALSE); $this->output($this->config->item("rg_folder")."v_searchRptRis101"); }
public function rptRis101() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="error">','</div>'); $this->form_validation->set_rules('curId', ' ', 'callback_checkselect'); $this->form_validation->set_rules('admitAcY',' ','callback_checkAdmitAcadYear'); $this->form_validation->set_rules('syId', ' ', 'callback_checkSyId'); $this->form_validation->set_rules('acY',' ','callback_checkAcadYear'); $this->form_validation->set_rules('tmId',' ','');
if($this->form_validation->run() == true) { $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $this->load->model($this->config->item("rg_folder").'mo_rg_commonfeetp','cmft'); $this->load->model($this->config->item("rg_folder").'mo_rg_curriculumfeetp','cft');
$this->contents['acY'] = $this->input->post('acY'); $this->cur->curId = $this->input->post('curId'); $this->contents['qu_cur'] = $this->cur->get_by_key(); if($this->input->post('admitAcY') && $this->input->post('syId')){ $con_rs_cmft = array('cmftAdY' => $this->input->post('admitAcY'), 'cmftSyId' => $this->input->post('syId'), 'cmftAcY' => $this->input->post('acY'), 'cmftTmId' => $this->input->post('tmId')); $this->contents['rs_cmft'] = $this->cmft->qryCmftJoinFee($con_rs_cmft,'','');
$con_rs_cft = array('cftCurId' => $this->input->post('curId'), 'cftAdY' => $this->input->post('admitAcY'), 'cftSyId' => $this->input->post('syId'), 'cftAcY' => $this->input->post('acY'), 'cftTmId' => $this->input->post('tmId')); $this->contents['rs_cft'] = $this->cft->qryCftJoinFee($con_rs_cft,'',''); }else{ $con_rs_cmft = array('cmftAcY' => $this->input->post('acY'), 'cmftTmId' => $this->input->post('tmId')); $this->contents['rs_cmft'] = $this->cmft->qryCmftJoinFee($con_rs_cmft,'',''); $con_rs_cft = array('cftCurId' => $this->input->post('curId'), 'cftAcY' => $this->input->post('acY'), 'cftTmId' => $this->input->post('tmId')); $this->contents['rs_cft'] = $this->cft->qryCftJoinFee($cor_rs_cft,'',''); }
$this->output_detail($this->config->item("rg_folder")."v_rptRis101"); } else $this->searchRptRis101(); }
public function searchRptRis102() { $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $this->load->model($this->config->item("rg_folder").'mo_rg_student','std');
$con_rs_cur = array('curStatus' => 'Y'); $ord_rs_cur = array('curName' => ''); $ord_rs_std = array('stdAdY' => 'DESC'); $grp_rs_std = array('stdAdY' => 'stdAdY'); $this->contents['rs_cur'] = $this->cur->get_options_2($con_rs_cur,$ord_rs_cur,'','---เลือกหลักสูตร---');
$rs_std = $this->std->qryStd('',$ord_rs_std,$grp_rs_std); if($rs_std->num_rows()) { foreach($rs_std->result() as $row) { $opt[$row->stdAdY] = $row->stdAdY; } } $this->contents['stdAdY'] = $opt;
$this->output($this->config->item("rg_folder")."v_searchRptRis102"); }
public function rptRis102() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="error">','</div>'); //$this->form_validation->set_rules('curId', ' ', 'callback_checkselect'); $this->form_validation->set_rules('curId', ' ', 'trim|required|xss_clean'); $this->form_validation->set_rules('stdAdY', ' ', 'callback_checkselect'); if($this->form_validation->run() == true) { $this->load->model($this->config->item("rg_folder").'mo_rg_termconfig','tmc'); $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $this->load->model($this->config->item("rg_folder").'mo_rg_student','std');
/* getNowDate เป็นฟังก์ชั่นเรียกวันที่ปัจจุบัน อยู่ในรูปแบบ 0000-00-00 */ $this->cur->curId = $this->input->post('curId'); $con_rs_std = array('stdCurId' => $this->input->post('curId'), 'stdAdY' => $this->input->post('stdAdY')); $this->contents['qu_tmc'] = $this->tmc->getBetweenDateByNowDate(getNowDate()); $this->contents['qu_cur'] = $this->cur->get_by_key(); $this->contents['rs_std'] = $this->std->qryStdJoinPfSoPrvEt($con_rs_std,'',''); $this->contents['curId'] = $this->input->post('curId'); $this->contents['stdAdY'] = $this->input->post('stdAdY');
$this->output_detail($this->config->item("rg_folder")."v_rptRis102"); } else $this->searchRptRis102(); }
public function rptRis102Export() { $this->load->model($this->config->item("rg_folder").'mo_rg_termconfig','tmc'); $this->load->model($this->config->item("rg_folder").'mo_rg_curriculum','cur'); $this->load->model($this->config->item("rg_folder").'mo_rg_student','std');
$this->cur->curId = $this->input->post('curId'); $con_rs_std = array('stdCurId' => $this->input->post('curId'), 'stdAdY' => $this->input->post('stdAdY')); $this->contents['qu_tmc'] = $this->tmc->getBetweenDateByNowDate(getNowDate()); $this->contents['qu_cur'] = $this->cur->get_by_key(); $this->contents['rs_std'] = $this->std->qryStdJoinPfSoPrvEt($con_rs_std,'','');
if(substr_count(strtolower($this->input->post('exportB')), "excel") > 0){ $this->contents['typeShow'] = "E"; $this->output_detail($this->config->item("rg_folder")."v_rptRis102"); } else { $this->output_pdf($this->config->item("rg_folder")."v_rptRis102PDF"); } }
//================================== EXAMPLE ============================================ //================================== EXAMPLE ============================================ //================================== EXAMPLE ============================================ //================================== EXAMPLE ============================================
} ?>
|