Viewing file: history.php (4.93 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once('ver_controller.php'); class History extends Ver_controller { function history_update() { $this->load->model($this->ver_path.'m_ver_txlog','mtx'); $data['rs_his_up'] = $this->mtx->get_history(0,0,1); $this->ver_view = $this->load->view($this->ver_path.'v_his_update',$data,TRUE); $this->ver_out(); }
function history_agency_update() { // $this->load->model($this->ver_path.'m_ver_txlog','mtx'); $this->load->model($this->ver_path.'m_ver_agency','mag'); $sort = array('ag_id'=>'ASC'); $data['rs_ag'] = $this->mag->count_update_ag(); $this->ver_view = $this->load->view($this->ver_path.'v_ag_update',$data,TRUE); $this->ver_out(); }
/* function history_detail() { $this->load->model($this->ver_path.'m_ver_txlog','mtx'); $this->mtx->tx_id = $this->input->post('tx_id'); $data['qu_tx'] = $this->mtx->get_by_key(); $this->ver_view = $this->load->view($this->ver_path.'v_his_detail',$data,TRUE); $this->ver_out(); } */
function detail_query($tx_id='') { $tx_id = $this->input->post('tx_id'); $this->load->model($this->ver_path.'m_ver_txlog','mtx'); $this->mtx->tx_id = $tx_id;//$this->input->post('udt_id'); $data['qu_tx'] = $this->mtx->get_by_key(); $this->ver_view = $this->load->view($this->ver_path.'v_pop_his_qry',$data,TRUE); $this->ver_popup(); }
function list_ag_update($tx_id) { $this->load->model($this->ver_path.'m_ver_txlog','mtx'); $this->mtx->tx_id = $tx_id; $data['qu_tx'] = $this->mtx->getTxSys(); $data['rs_ag'] = $this->mtx->get_list_ag_up(); $this->ver_view = $this->load->view($this->ver_path.'v_list_ag_update',$data,TRUE); $this->ver_popup(); } function update_system_callback() { $data['up_sys'] = $this->update_system(); $this->ver_view = $this->load->view($this->config->item("ver_folder").'v_his_update_system_call',$data,TRUE); $this->ver_out(); } function update_system() { $this->load->model($this->config->item("ver_folder").'m_ver_client_system','cls'); $this->load->model($this->config->item("ver_folder").'m_ver_package','pkg'); $this->load->model($this->config->item("ver_folder").'m_ver_file','file'); $cl_sys = $this->cls->get_all(); $str = ''; foreach ($cl_sys->result() as $row_sys) { $data['sys_name'] = $row_sys->csys_th_name; $arr = array(); $pkg_list = $this->pkg->get_pkgBySysId_2($row_sys->csys_id); $i=0; foreach ($pkg_list->result() as $row_pkg) { $arr[$i]['pkg_detail'] = $row_pkg->pkg_version."+".$row_pkg->pkg_detail."+".$row_pkg->UsName; $arr[$i]['pkg_download_status'] = $row_pkg->pkg_download_status; $arr[$i]['pkg_update_status'] = $row_pkg->pkg_update_status; $arr[$i++]['file_detail'] = $this->file->get_byPkgId($row_pkg->pkg_id); } $data['pkg_file'] = $arr; $str.= $this->load->view($this->config->item("ver_folder").'v_his_update_system', $data ,TRUE); } return $str; } function ag_update_system() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="error">', '</div>'); $this->form_validation->set_rules('system_select', '', 'trim|xss_clean'); $this->form_validation->set_rules('datetype', '', 'trim|xss_clean'); $this->form_validation->set_rules('fdate', '', 'trim|xss_clean'); $this->form_validation->set_rules('tdate', '', 'trim|xss_clean'); if($this->form_validation->run() == TRUE) { $this->load->model($this->config->item("ver_folder").'m_ver_package','pkg'); $this->load->model($this->config->item("ver_folder").'m_ver_client_system','sys'); $sys_id = $this->input->post('system_select'); $datetype = $this->input->post('datetype'); $fdate = splitDateForm2($this->input->post('fdate'),'-'); $tdate = splitDateForm2($this->input->post('tdate'),'-'); $flag = ''; if ($sys_id != '') { if ($datetype == 'download') { $data['qu_by_ag'] = $this->pkg->getSysUpdByAg1($sys_id, $fdate, $tdate); $flag = 1; } else { $data['qu_by_ag'] = $this->pkg->getSysUpdByAg2($sys_id, $fdate, $tdate); $flag = 2; } $this->sys->csys_id = $sys_id; $data['qu_sys2'] = $this->sys->get_by_key(); } else { if ($datetype == 'download') { $data['qu_by_ag'] = $this->pkg->getSysAgByDate1($fdate, $tdate); $flag = 1; } else { $data['qu_by_ag'] = $this->pkg->getSysAgByDate2($fdate, $tdate); $flag = 2; } } $data['flag'] = $flag; $data['qu_sys'] = $this->sys->get_options(); $this->ver_view = $this->load->view($this->config->item("ver_folder").'v_his_ag_update_system', $data, TRUE); $this->ver_out(); } else { $this->load->model($this->config->item("ver_folder").'m_ver_client_system','sys'); $data['qu_sys'] = $this->sys->get_options(); $data['flag'] = 1; $this->ver_view = $this->load->view($this->config->item("ver_folder").'v_his_ag_update_system', $data, TRUE); $this->ver_out(); } }
} ?>
|