Beispiel #1
0
 * @version        $Id: diy_list.php 1 18:31 2010年7月12日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @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}");
Beispiel #2
0
 * @version        $Id: diy.php 1 15:38 2010年7月8日Z tianya $
 * @package        DedeCMS.Site
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
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;