* @license http://help.dedecms.com/usersguide/license.html * @link http://www.dedecms.com */ require_once dirname(__FILE__) . "/config.php"; CheckPurview('c_New'); $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; $action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete')) ? $action : ''; if (empty($diyid)) { showMsg("非法操作!", 'javascript:;'); exit; } require_once DEDEINC . '/diyform.cls.php'; $diy = new diyform($diyid); if ($action == 'post') { if (empty($do)) { $postform = $diy->getForm('post', '', 'admin'); include DEDEADMIN . '/templets/diy_post.htm'; } else { if ($do == 2) { $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); if (!empty($dede_fields)) { if ($dede_fieldshash != md5($dede_fields . $cfg_cookie_encode)) { showMsg("数据校验不对,程序返回", '-1'); exit; } } $diyform = $dsql->getOne("SELECT * FROM #@__diyforms WHERE diyid={$diyid}"); if (!is_array($diyform)) { showmsg("自定义表单不存在", '-1'); exit;
require_once dirname(__FILE__) . "/../include/common.inc.php"; $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; $action = isset($action) && in_array($action, array('post', 'list', 'view')) ? $action : 'post'; $id = isset($id) && is_numeric($id) ? $id : 0; if (empty($diyid)) { showMsg('非法操作!', 'javascript:;'); exit; } require_once DEDEINC . '/diyform.cls.php'; $diy = new diyform($diyid); /*---------------------------- function Post(){ } ---------------------------*/ if ($action == 'post') { if (empty($do)) { $postform = $diy->getForm(true); include DEDEROOT . "/templets/plus/{$diy->postTemplate}"; exit; } elseif ($do == 2) { $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); if (!empty($dede_fields)) { if ($dede_fieldshash != md5($dede_fields . $cfg_cookie_encode)) { showMsg('数据校验不对,程序返回', '-1'); exit; } } $diyform = $dsql->getOne("select * from #@__diyforms where diyid='{$diyid}' "); if (!is_array($diyform)) { showmsg('自定义表单不存在', '-1'); exit;