include/diyform.cls.php
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php if(!defined('DEDEINC')) exit("Request Error!");
/**
* 自定义表单解析类
*
* @version $Id: diyform.cls.php 1 10:31 2010年7月6日Z tianya $
* @package DedeCMS.Libraries
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
require_once DEDEINC.'/dedetag.class.php';
require_once DEDEINC.'/customfields.func.php';
/**
* diyform
*
* @package diyform
* @subpackage DedeCMS.Libraries
* @link http://www.dedecms.com
*/
class diyform
{
var $diyid;
var $db;
var $info;
var $name;
var $table;
var $public;
var $listTemplate;
var $viewTemplate;
var $postTemplate;
function diyform($diyid){
$this->__construct($diyid);
}
/**
* 析构函数
*
* @access public
* @param string $diyid 自定义表单ID
* @return string
*/
function __construct($diyid){
$this->diyid = $diyid;
$this->db = $GLOBALS['dsql'];
$query = "SELECT * FROM #@__diyforms WHERE diyid='{$diyid}'";
$diyinfo = $this->db->GetOne($query);
if(!is_array($diyinfo))
{
showMsg('参数不正确,该自定义表单不存在','javascript:;');
exit();
}
$this->info = $diyinfo['info'];
$this->name = $diyinfo['name'];
$this->table = $diyinfo['table'];
$this->public = $diyinfo['public'];
$this->listTemplate = $diyinfo['listtemplate'] != '' && file_exists(DEDETEMPLATE.'/plus/'.$diyinfo['listtemplate']) ? $diyinfo['listtemplate'] : 'list_diyform.htm';
$this->viewTemplate = $diyinfo['viewtemplate'] != '' && file_exists(DEDETEMPLATE.'/plus/'.$diyinfo['viewtemplate']) ? $diyinfo['viewtemplate'] : 'view_diyform.htm';;
$this->postTemplate = $diyinfo['posttemplate'] != '' && file_exists(DEDETEMPLATE.'/plus/'.$diyinfo['posttemplate']) ? $diyinfo['posttemplate'] : 'post_diyform.htm';;
后面还有 67 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。