Viewing file: popup.php (9.12 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include('ea_controller.php'); class Popup extends Ea_controller {
// function __construct() { // parent::Controller(); // }
// คำนำหน้าชื่อ function prefix($check=1) { $this->load->model($this->config->item("ppc_folder").'mo_prefix','pf');
if($check) { $this->contents['rs_pf'] = $this->pf->qryPf(); }
$this->output_detail($this->config->item("ea_folder")."v_prefixTable"); } function prefix_search() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="error">','</div>'); $this->form_validation->set_rules('pfName',' ','trim|required|xss_clean');
if($this->form_validation->run() == true) { $this->load->model($this->config->item("ppc_folder").'mo_prefix','pf');
$pfName = $this->input->post('pfName');
$con_rs_pf = array('prefixName' => '%'.$pfName.'%'); $this->contents['rs_pf'] = $this->pf->qryPf($con_rs_pf);
$this->output_detail($this->config->item("ea_folder")."v_prefixTable"); } else { $this->prefix(0); } } // จบคำนำหน้าชื่อ
// ที่อยู่ตามภูมิลำเนา : Home address function homeAddr() { $this->load->model($this->config->item("ppc_folder").'mo_district','dt');
$ord_rs_dt = array('prv.provinceName' => '', 'ap.amphurName' => '', 'dt.districtName' => ''); $this->contents['rs_dt'] = $this->dt->qryDtJoinApPrv('',$ord_rs_dt); $this->output_detail($this->config->item("ea_folder")."v_homeDistrictTable"); }
function homeAddr_search() { $this->load->model($this->config->item("ppc_folder").'mo_district','dt');
$this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<font color="red">','</font>'); $this->form_validation->set_rules('prvName',' ','trim|xss_clean'); $this->form_validation->set_rules('apName',' ','trim|xss_clean'); $this->form_validation->set_rules('dtName',' ','trim|xss_clean');
if($this->form_validation->run() == true) { $prvName = $this->input->post('prvName'); $apName = $this->input->post('apName'); $dtName = $this->input->post('dtName');
if($prvName!='' || $apName!='' || $dtName!='') { $con_rs_dt = array('prv.provinceName' => '%'.$prvName.'%', 'ap.amphurName' => '%'.$apName.'%', 'dt.districtName' => '%'.$dtName.'%'); $ord_rs_dt = array('prv.provinceName' => '', 'ap.amphurName' => '', 'dt.districtName' => ''); $this->contents['rs_dt'] = $this->dt->qryDtJoinApPrv($con_rs_dt,$ord_rs_dt); } else { $this->contents['str_fault'] = $this->config->item('str_fault'); } $this->output_detail($this->config->item("ea_folder")."v_homeDistrictTable"); } else { $this->homeAddr(); } } // ที่อยู่ตามภูมิลำเนา : Home address
// ที่อยู่ปัจจุบัน : Current address function curAddr() { $this->load->model($this->config->item("ppc_folder").'mo_district','dt');
$ord_rs_dt = array('prv.provinceName' => '', 'ap.amphurName' => '', 'dt.districtName' => ''); $this->contents['rs_dt'] = $this->dt->qryDtJoinApPrv('',$ord_rs_dt); $this->output_detail($this->config->item("ea_folder")."v_currentDistrictTable"); }
function curAddr_search() { $this->load->model($this->config->item("ppc_folder").'mo_district','dt');
$this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<font color="red">','</font>'); $this->form_validation->set_rules('prvName',' ','trim|xss_clean'); $this->form_validation->set_rules('apName',' ','trim|xss_clean'); $this->form_validation->set_rules('dtName',' ','trim|xss_clean');
if($this->form_validation->run() == true) { $prvName = $this->input->post('prvName'); $apName = $this->input->post('apName'); $dtName = $this->input->post('dtName');
if($prvName!='' || $apName!='' || $dtName!='') { $con_rs_dt = array('prv.provinceName' => '%'.$prvName.'%', 'ap.amphurName' => '%'.$apName.'%', 'dt.districtName' => '%'.$dtName.'%'); $ord_rs_dt = array('prv.provinceName' => '', 'ap.amphurName' => '', 'dt.districtName' => ''); $this->contents['rs_dt'] = $this->dt->qryDtJoinApPrv($con_rs_dt,$ord_rs_dt); } else { $this->contents['str_fault'] = $this->config->item('str_fault'); } $this->output_detail($this->config->item("ea_folder")."v_currentDistrictTable"); } else { $this->curAddr(); } } // ที่อยู่ปัจจุบัน : Current address
// ที่อยู่ที่ทำงาน : Work address function workAddr() { $this->load->model($this->config->item("ppc_folder").'mo_district','dt');
$ord_rs_dt = array('prv.provinceName' => '', 'ap.amphurName' => '', 'dt.districtName' => ''); $this->contents['rs_dt'] = $this->dt->qryDtJoinApPrv('',$ord_rs_dt); $this->output_detail($this->config->item("ea_folder")."v_workDistrictTable"); }
function workAddr_search() { $this->load->model($this->config->item("ppc_folder").'mo_district','dt');
$this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<font color="red">','</font>'); $this->form_validation->set_rules('prvName',' ','trim|xss_clean'); $this->form_validation->set_rules('apName',' ','trim|xss_clean'); $this->form_validation->set_rules('dtName',' ','trim|xss_clean');
if($this->form_validation->run() == true) { $prvName = $this->input->post('prvName'); $apName = $this->input->post('apName'); $dtName = $this->input->post('dtName');
if($prvName!='' || $apName!='' || $dtName!='') { $con_rs_dt = array('prv.provinceName' => '%'.$prvName.'%', 'ap.amphurName' => '%'.$apName.'%', 'dt.districtName' => '%'.$dtName.'%'); $ord_rs_dt = array('prv.provinceName' => '', 'ap.amphurName' => '', 'dt.districtName' => ''); $this->contents['rs_dt'] = $this->dt->qryDtJoinApPrv($con_rs_dt,$ord_rs_dt); } else { $this->contents['str_fault'] = $this->config->item('str_fault'); } $this->output_detail($this->config->item("ea_folder")."v_workDistrictTable"); } else { $this->curAddr(); } } // ที่อยู่ที่ทำงาน : Work address
// สถาบันการศึกษา : Education function edu_popup($flg=0) { $this->load->model($this->config->item("ea_folder").'m_education','edu');
if($flg==1) { $this->contents['rs_edu'] = NULL; } else { $ord_rs_edu = array('educationName ' => ''); $this->contents['rs_edu'] = $this->edu->qryEdu('',$ord_rs_edu); } $this->output_detail($this->config->item("ea_folder")."v_educationTable");
} function edu_popup_search() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<font color="red">','</font>'); $this->form_validation->set_rules('educationName',' ','trim|required|xss_clean');
if($this->form_validation->run() == true) { $this->load->model($this->config->item("ea_folder").'m_education','edu');
$educationName = $this->input->post('educationName');
$con_rs_edu = array('educationName' => '%'.$educationName.'%'); $ord_rs_edu = array('educationName' => ''); $this->contents['rs_edu'] = $this->edu->qryEdu($con_rs_edu, $ord_rs_edu);
$this->output_detail($this->config->item("ea_folder")."v_educationTable"); } else { $this->edu_popup(1); } } // สถาบันการศึกษา : Education
function lvEdu_popup($id=0) { $this->load->model($this->config->item("ea_folder").'mo_levelEdu','ledu'); $ord_rs_lv = array('leduName'); $this->contents['rs_lv'] = $this->ledu->qryLedu('','',$ord_rs_lv); $this->output_detail($this->config->item("ea_folder")."v_levelEduTable"); }
function lvEdu_popup_search() { $this->load->model($this->config->item("ea_folder").'mo_levelEdu','ledu'); $this->contents['rs_lv'] = $this->ledu->qrySearchledu($this->input->post('levelName'));
$this->output_detail($this->config->item("ea_folder")."v_levelEduTable"); } function edu_popup_11($id=0) { $this->load->model($this->config->item("ea_folder").'mo_education','edu'); $ord_rs_edu = array('eduName'); $this->contents['rs_edu'] = $this->edu->qryEdu('','',$ord_rs_edu); $this->output_detail($this->config->item("ea_folder")."v_educationTable"); }
function edu_popup_search_11() { $this->load->model($this->config->item("ea_folder").'mo_education','edu'); $this->contents['rs_edu'] = $this->edu->qrySearchedu($this->input->post('eduName'));
$this->output_detail($this->config->item("ea_folder")."v_educationTable"); }
function medu_popup($id=0) { $this->load->model($this->config->item("ea_folder").'mo_majoredu','medu'); $ord_rs_medu = array('meduName'); $this->contents['rs_medu'] = $this->medu->qryMedu('','',$ord_rs_medu); $this->output_detail($this->config->item("ea_folder")."v_majoreduTable"); }
function medu_popup_search() { $this->load->model($this->config->item("ea_folder").'mo_majoredu','medu'); $this->contents['rs_medu'] = $this->medu->qrySearchmedu($this->input->post('meduName'));
$this->output_detail($this->config->item("ea_folder")."v_majoreduTable"); } } ?>
|