Viewing file: ver_controller.php (3.52 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php /** * System in Management for information system * * LICENSE * * This source file is subject to the GPL license that is bundled * with this package in the file version_license.php. * * @package System in Management for information system * @subpackage Version control * @copyright Copyright (C) 2011 by Information System Engineering Research Labolatory, Burapha University http://iserl.buu.ac.th iserl.callcenter@gmail.com * @license http://cvs.buu.ac.th/mis/version_license.php GNU GPL v1 * @author Information System Engineering Research Labolatory, Burapha University * * */ ?> <?php class Ver_controller extends CI_Controller {
protected $ver_header; protected $ver_view; public $ver_path; protected $ver_data;
public $data; function __construct() { parent::__construct(); if(!$this->session->userdata('UsID')) redirect('login'); $this->ver_path = $this->config->item('ver_folder'); $this->ver_data = ''; $this->ver_view =''; $this->ver_header =$this->load->view($this->ver_path.'v_header_js','',TRUE); // $this->load->helper('emt_helper'); }
function output ($v) { $this->ver_view = $this->load->view($this->config->item("ver_folder")."v_header_js"); $this->ver_view .= $this->load->view($this->config->item("ver_folder").$v, $this->data, true); $this->ver_out(); } function outputDetail ($v) { $lv['head'] = $this->load->view('info/v_headerPopup'); $lv['body'] = $this->load->view($this->config->item("ver_folder")."v_header_js"); $lv['body'] .= $this->load->view($this->config->item("ver_folder").$v, $this->data, true); $lv['footer'] = ""; $this->load->view('info/v_in',$lv); } /* function ver_out() { $this->body = $this->ver_header.$this->ver_view; $this->show(); } */
function ver_out() { $data = array(); $data['mmn'] = $this->get_menu(); $lv['body'] = $this->ver_header.$this->ver_view; $mn['menu'] = $this->load->view('info/v_postlogin',$data,TRUE); $lv['head'] = $this->load->view('info/v_header',$mn,TRUE); $lv['footer'] = $this->load->view('info/v_footer','',TRUE); $this->load->view('info/v_in',$lv); }
function ver_popup() { $data['head'] = $this->load->view($this->ver_path.'v_headerPopup'); $data['body'] = $this->load->view($this->ver_path.'v_header_js'); $data['body'] .= $this->ver_view; $data['footer'] = ""; $this->load->view('info/v_in',$data); }
function get_menu() { $this->load->model($this->ver_path.'m_ummenu','mmn'); $mmn = $this->mmn; $mmn->MnStID = $this->session->userdata('GpStID'); return $mmn->get_menu(); }
function link_menu() { $this->load->model($this->ver_path.'m_ummenu','mmn'); $mmn = $this->mmn; $mmn->MnStID = $this->input->post('StID'); $mmn->MnID = $this->input->post('MnID'); $qu = $mmn->get_link_menu(); if($qu->num_rows()) { $qu = $qu->row(); redirect($this->ver_path.$qu->MnURL); return; } else { redirect($this->ver_path.'ver_client'); return; } } /** * เป็น call back function ในการเช็ค valid ของ select box * @author เปรมฤดี_เอี่ยมสุภัคกุล(ปุ๊ก) * @package check_valid * @return true ถ้า select box มีค่าไม่เท่ากับ ว่าง("") หรือ ศูนย์ ไม่เช่นนั้น return false */ function checkselect($str){ if ($str == "" || $str == "0") { $this->form_validation->set_message('checkselect','กรุณาเลือก %s'); return false; }else return true; } } ?>
|