Beispiel #1
0
	/**
	 * 查看
	 */
	public function public_view() {
		if (!$this->tablename || !isset($_GET['did']) || empty($_GET['did'])) showmessage(L('illegal_operation'), HTTP_REFERER);
		$did = intval($_GET['did']);
		$formid = intval($_GET['formid']);
		$info = $this->db->get_one(array('dataid'=>$did));
		pc_base::load_sys_class('form', '', '');
		define('CACHE_MODEL_PATH',ZLCMS_PATH.'caches'.DIRECTORY_SEPARATOR.'caches_model'.DIRECTORY_SEPARATOR.'caches_data'.DIRECTORY_SEPARATOR);
		require CACHE_MODEL_PATH.'formguide_output.class.php';
		$formguide_output = new formguide_output($formid);
		$forminfos_data = $formguide_output->get($info);
		$fields = $formguide_output->fields;
		include $this->admin_tpl('formguide_info_view');
	}
 /**
  * 查看
  */
 public function public_view()
 {
     if (!$this->tablename || !isset($_GET['did']) || empty($_GET['did'])) {
         showmessage(L('illegal_operation'), HTTP_REFERER);
     }
     $did = intval($_GET['did']);
     $formid = intval($_GET['formid']);
     $info = $this->db->getby_dataid($did);
     define('CACHE_MODEL_PATH', DATA_PATH . 'model' . DIRECTORY_SEPARATOR);
     require CACHE_MODEL_PATH . 'formguide_output.php';
     $formguide_output = new formguide_output($formid);
     $forminfos_data = $formguide_output->get($info);
     $fields = $formguide_output->fields;
     include $this->view('formguide_info_view');
 }
Beispiel #3
0
 /**
  * 导出
  */
 public function export()
 {
     if ($_POST['fields']) {
         //去除数组中的值
         $map = $this->str_where($_POST);
         $field = array();
         foreach ($_POST['fields'] as $fv) {
             $field[$fv] = $_POST['fieldName'][$fv];
         }
         //查询数据库
         $data = $this->db->select(join(' AND ', $map));
         if ($data) {
             //得到表单字段名称
             $formid = intval($_GET['formid']);
             define('CACHE_MODEL_PATH', gxw_PATH . 'caches' . DIRECTORY_SEPARATOR . 'caches_model' . DIRECTORY_SEPARATOR . 'caches_data' . DIRECTORY_SEPARATOR);
             require CACHE_MODEL_PATH . 'formguide_output.class.php';
             $formguide_output = new formguide_output($formid);
             $list = array();
             foreach ($data as $d) {
                 $list[] = $formguide_output->get($d);
             }
             $this->createXls($list, $field);
         } else {
             showmessage('当前表单中没有符合条件的数据', HTTP_REFERER);
         }
     } else {
         showmessage(L('illegal_operation'), HTTP_REFERER);
     }
 }