Viewing file: search.php (6.58 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include('ea_controller.php');
class Search extends Ea_controller {
// function __construct() {
// parent::Controller();
// }
function am_input() {
$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,'','y');
$this->output($this->config->item("ea_folder")."v_repNameSplitProgram");
}
function am_search() {
$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($this->config->item("ea_folder")."v_printRepNameSplitProgram");
}
else
$this->am_input();
}
function adr_input() {
$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,'','y');
$this->output($this->config->item("ea_folder")."v_repAddressSplitProgram");
}
function adr_search() {
$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);
//echo $this->db->last_query();
$this->output_detail($this->config->item("ea_folder")."v_printRepAddressSplitProgram");
}
else
$this->adr_input();
}
function ha_input() {
$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,'y');
//echo $this->db->last_query();
$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,'y');
$this->output($this->config->item("ea_folder")."v_repAlumniGiveAward");
}
function ha_search() {
$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($this->config->item("ea_folder")."v_printRepAlumniGiveAward");
}
else
$this->ha_input();
}
function hw_input() {
$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_repSummaryAlumniQn");
}
function hw_search() {
$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_hiswork','hw');
$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();
echo $this->db->last_query();
$this->contents['graduateYear'] = $this->input->post('graduateYear');
//$con_rs_hw = array('programId' => $this->input->post('curId'),
// 'graduateYear' => $this->input->post('graduateYear'));
//$ord_rs_hw = array('hw.alumniId');
//$this->contents['rs_hw'] = $this->hw->qry();
$this->output($this->config->item("ea_folder")."v_printRepSummaryAlumniQn");
}
else
$this->hw_input();
}
}
?>
|