Ejemplo n.º 1
0
}
$diyid = empty($diyid) ? 0 : intval($diyid);
/*----------------
function __SaveEdit()
-----------------*/
if ($dopost == "save") {
    $public = isset($public) && is_numeric($public) ? $public : 0;
    $name = htmlspecialchars($name, ENT_COMPAT, "GB2312");
    $query = "UPDATE `#@__diyforms` SET name = '{$name}', listtemplate='{$listtemplate}', viewtemplate='{$viewtemplate}', posttemplate='{$posttemplate}', public='{$public}' WHERE diyid='{$diyid}' ";
    $dsql->ExecuteNoneQuery($query);
    ShowMsg("成功更改一个自定义表单!", "diy_main.php");
    exit;
} else {
    if ($dopost == "delete") {
        @set_time_limit(0);
        CheckPurview('c_Del');
        $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='{$diyid}'");
        if (empty($job)) {
            $job = "";
        }
        //确认提示
        if ($job == "") {
            $wintitle = "自定义表单管理-删除自定义表单";
            $wecome_info = "<a href='diy_main.php'>自定义表单管理</a>::删除自定义表单";
            $win = new OxWindow();
            $win->Init("diy_edit.php", "js/blank.js", "POST");
            $win->AddHidden("job", "yes");
            $win->AddHidden("dopost", $dopost);
            $win->AddHidden("diyid", $diyid);
            $win->AddTitle("!将删除所有与该自定义表单相关的文件和数据<br />你确实要删除 \"" . $row['name'] . "\" 这个自定义表单?");
            $winform = $win->GetWindow("ok");
Ejemplo n.º 2
0
<?php

/**
 * 系统权限组编辑
 *
 * @version        $Id: sys_group_edit.php 1 22:28 2010年7月20日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('sys_Group');
if (empty($dopost)) {
    $dopost = "";
}
if ($dopost == 'save') {
    if ($rank == 10) {
        ShowMsg('超级管理员的权限不允许更改!', 'sys_group.php');
        exit;
    }
    $purview = "";
    if (is_array($purviews)) {
        foreach ($purviews as $p) {
            $purview .= "{$p} ";
        }
        $purview = trim($purview);
    }
    $dsql->ExecuteNoneQuery("UPDATE `#@__admintype` SET typename='{$typename}',purviews='{$purview}' WHERE CONCAT(`rank`)='{$rank}'");
    ShowMsg('成功更改用户组的权限!', 'sys_group.php');
    exit;
Ejemplo n.º 3
0
<?php

/**
 * 配送方式设置
 *
 * @version        $Id: shops_delivery.php 1 15:46 2010年7月20日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('shops_Delivery');
require_once DEDEINC . '/datalistcp.class.php';
if (!isset($do)) {
    $do = '';
}
if ($do == 'add') {
    if (empty($dname) || strlen($dname) > 100) {
        ShowMsg("请填写配送方式名称!", "-1");
        exit;
    }
    $price = preg_replace("#[^.0-9]#", "", $price);
    if ($price < 0.01) {
        $price = '0.00';
    }
    $des = cn_substrR($des, 255);
    $InQuery = "INSERT INTO #@__shops_delivery(`dname`,`price`,`des`) VALUES ('{$dname}','{$price}','{$des}');";
    $result = $dsql->ExecuteNoneQuery($InQuery);
    if ($result) {
        ShowMsg("成功添加一个配送方式!", "shops_delivery.php");
Ejemplo n.º 4
0
<?php

/**
 * 自定义表单列表
 *
 * @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)) {
Ejemplo n.º 5
0
<?php

require_once dirname(__FILE__) . "/config.php";
CheckPurview('sys_Data');
if (empty($dopost)) {
    $dopost = '';
}
if ($dopost == "viewinfo") {
    echo "[<a href='#' onclick='javascript:HideObj(\"_mydatainfo\")'><u>关闭</u></a>]\r\n<xmp>";
    if (empty($tablename)) {
        echo "没有指定表名!";
    } else {
        $dsql->SetQuery("SHOW CREATE TABLE " . $dsql->dbName . "." . $tablename);
        $dsql->Execute('me');
        $row2 = $dsql->GetArray('me', MYSQL_BOTH);
        $ctinfo = $row2[1];
        echo trim($ctinfo);
    }
    echo '</xmp>';
    exit;
} else {
    if ($dopost == "opimize") {
        echo "[<a href='#' onclick='javascript:HideObj(\"_mydatainfo\")'><u>关闭</u></a>]\r\n<xmp>";
        if (empty($tablename)) {
            echo "没有指定表名!";
        } else {
            $rs = $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `{$tablename}` ");
            if ($rs) {
                echo "执行优化表: {$tablename}  OK!";
            } else {
                echo "执行优化表: {$tablename}  失败,原因是:" . $dsql->GetError();
Ejemplo n.º 6
0
<?php

/**
 * 系统密码提示问
 *
 * @version        $Id: sys_safe.php 1 22:28 2010年7月20日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('sys_Safe');
$safeconfigfile = DEDEDATA . "/safe/inc_safe_config.php";
if (empty($dopost)) {
    $dopost = "";
}
if ($dopost == "save") {
    $configstr = $shortname = "";
    $gdopen = empty($gdopen) ? "" : $gdopen;
    $codetype = empty($codetype) ? 1 : $codetype;
    $gdtype = empty($gdtype) ? 1 : $gdtype;
    $gdstyle = empty($gdstyle) ? "" : $gdstyle;
    $gd_wwidth = empty($gd_wwidth) ? 0 : $gd_wwidth;
    $gd_wheight = empty($gd_wheight) ? 0 : $gd_wheight;
    $codelen = empty($codelen) ? 4 : $codelen;
    $gdfaq_reg = empty($gdfaq_reg) ? 0 : $gdfaq_reg;
    $gdfaq_send = empty($gdfaq_send) ? 0 : $gdfaq_send;
    $gdfaq_msg = empty($gdfaq_msg) ? 0 : $gdfaq_msg;
    if (is_array($gdopen)) {
        $configstr = "\$safe_gdopen = '" . implode(",", $gdopen) . "';\r\n";
Ejemplo n.º 7
0
<?php

/**
 * 导出采集规则
 *
 * @version        $Id: co_edit_text.php 1 14: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('co_Export');
if (empty($dopost)) {
    $dopost = '';
}
if ($dopost != 'done') {
    require_once DEDEADMIN . "/inc/inc_catalog_options.php";
    $totalcc = $channelid = $usemore = 0;
    if (!empty($nid)) {
        $mrow = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` WHERE nid='{$nid}' AND isdown='1' ");
        $totalcc = $mrow['dd'];
        $rrow = $dsql->GetOne("SELECT channelid,usemore FROM `#@__co_note` WHERE nid='{$nid}' ");
        $channelid = $rrow['channelid'];
        $usemore = $rrow['usemore'];
    } else {
        $mrow = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` WHERE isdown='1' ");
        $totalcc = $mrow['dd'];
    }
    include DedeInclude("templets/co_export.htm");
    exit;
Ejemplo n.º 8
0
<?php

/**
 * 会员信息管理
 *
 * @version        $Id: member_info_main.php 1 14:08 2010年7月19日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('sys_Log');
require_once DEDEINC . "/datalistcp.class.php";
require_once DEDEINC . "/common.func.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$sql = $where = "";
$dtime = empty($dtime) ? 0 : $dtime;
$ischeck = empty($ischeck) ? "" : $ischeck;
$dopost = empty($dopost) ? "" : $dopost;
if ($type == "feed") {
    $table = "#@__member_feed";
    $id = "aid";
    $tpl = DEDEADMIN . "/templets/member_feed_main.htm";
} else {
    $table = "#@__member_msg";
    $id = "id";
    $tpl = DEDEADMIN . "/templets/member_mood_main.htm";
}
if (in_array($ischeck, array('-1', '1'))) {
    $type = array('-1' => '0', '1' => '1');
Ejemplo n.º 9
0
            if ($rs == 1) {
                $dsql->ExecuteNoneQuery("DELETE FROM #@__uploads WHERE aid='" . $myrow['aid'] . "'");
            }
        }
        ShowMsg('成功删除选定的文件!', $backurl);
        exit;
    }
} else {
    if ($dopost == 'save') {
        if ($aid == "") {
            exit;
        }
        //检查是否有修改权限
        $myrow = $dsql->GetOne("SELECT * FROM #@__uploads WHERE aid='" . $aid . "'");
        if ($myrow['mid'] != $cuserLogin->getUserID()) {
            CheckPurview('sys_Upload');
        }
        //检测文件类型
        $addquery = "";
        if (is_uploaded_file($upfile)) {
            if ($mediatype == 1) {
                $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp");
                if (!in_array($upfile_type, $sparr)) {
                    ShowMsg("你上传的不是图片类型的文件!", "javascript:history.go(-1);");
                    exit;
                }
            } else {
                if ($mediatype == 2) {
                    $sparr = array("application/x-shockwave-flash");
                    if (!in_array($upfile_type, $sparr)) {
                        ShowMsg("你上传的不是Flash类型的文件!", "javascript:history.go(-1);");
Ejemplo n.º 10
0
<?php

/**
 * 模块管理
 *
 * @version        $Id: module_main.php 1 14:17 2010年7月20日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('sys_module');
require_once dirname(__FILE__) . "/../include/dedemodule.class.php";
require_once dirname(__FILE__) . "/../include/oxwindow.class.php";
if (empty($action)) {
    $action = '';
}
require_once DEDEDATA . "/admin/config_update.php";
$mdir = DEDEDATA . '/module';
$mdurl = $updateHost . 'dedecms/module_' . $cfg_soft_lang . '/modulelist.txt';
function TestWriteAble($d)
{
    $tfile = '_dedet.txt';
    $d = preg_replace("#\\/\$#", '', $d);
    $fp = @fopen($d . '/' . $tfile, 'w');
    if (!$fp) {
        return FALSE;
    } else {
        fclose($fp);
        $rs = @unlink($d . '/' . $tfile);
Ejemplo n.º 11
0
<?php 
require_once(dirname(__FILE__)."/config.php");
CheckPurview('plus_站内新闻发布');
if(empty($dopost)) $dopost = "";
$aid = ereg_replace("[^0-9]","",$aid);
$dsql = new DedeSql(false);
if($dopost=="del")
{
	 $dsql->SetQuery("Delete From #@__mynews where aid='$aid';");
	 $dsql->ExecuteNoneQuery();
	 $dsql->Close();
	 ShowMsg("成功删除一条站内新闻!","mynews_main.php");
	 exit();
}
else if($dopost=="editsave")
{
	$dsql->SetQuery("Update #@__mynews set title='$title',typeid='$typeid',writer='$writer',senddate='".GetMKTime($sdate)."',body='$body' where aid='$aid';");
	$dsql->ExecuteNoneQuery();
	$dsql->Close();
	ShowMsg("成功更改一条站内新闻!","mynews_main.php");
	exit();
}
$myNews = $dsql->GetOne("Select #@__mynews.*,#@__arctype.typename From #@__mynews left join #@__arctype on #@__arctype.ID=#@__mynews.typeid where #@__mynews.aid='$aid';");

require_once(dirname(__FILE__)."/templets/mynews_edit.htm");

ClearAllLink();
?>
Ejemplo n.º 12
0
<?php

/**
 * 圈子公告管理
 *
 * @version        $Id: group_notice.php 1 15:34 2011-1-21 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";
require_once DEDEINC . '/datalistcp.class.php';
CheckPurview('group_Edit');
$id = isset($id) && is_numeric($id) ? $id : 0;
$gid = isset($gid) && is_numeric($gid) ? $gid : 0;
$action = isset($action) ? trim($action) : '';
$keyword = isset($keyword) ? trim($keyword) : '';
$keyword = stripslashes($keyword);
$keyword = preg_replace("#[\"\r\n\t\\*\\?\\(\\)\$%']#", " ", trim($keyword));
$keyword = addslashes($keyword);
$username = isset($username) ? trim($username) : '';
$username = stripslashes($username);
$username = preg_replace("#[\"\r\n\t\\*\\?\\(\\)\$%']#", " ", trim($username));
$username = addslashes($username);
if ($gid < 1) {
    ShowMsg("含有非法操作!.", "-1");
    exit;
}
if ($action == "del") {
    if ($id > 0) {
Ejemplo n.º 13
0
<?php

/**
 * 自定义表单列表管理
 *
 * @version        $Id: diy_main.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_List');
require_once DEDEINC . "/datalistcp.class.php";
require_once DEDEINC . "/common.func.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$sql = "Select `diyid`,`name`,`table` From #@__diyforms order by diyid asc";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/diy_main.htm");
$dlist->SetSource($sql);
$dlist->display();
$dlist->Close();
<?php 
require_once(dirname(__FILE__)."/config.php");
$t1 = ExecTime();
CheckPurview('sys_MakeHtml');
require_once(dirname(__FILE__)."/../include/inc_arcpart_view.php");
if($dopost=="view")
{
	$pv = new PartView();
	$templet = str_replace("{style}",$cfg_df_style,$templet);
	$pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet);
	$pv->Display();
	$pv->Close();
}
else if($dopost=="make")
{
	header("Content-Type: text/html; charset={$cfg_ver_lang}");
	$homeFile = dirname(__FILE__)."/".$position;
	$homeFile = str_replace("\\","/",$homeFile);
	$homeFile = str_replace("//","/",$homeFile);
	$fp = fopen($homeFile,"w") or die("你指定的文件名有问题,无法创建文件");
	fclose($fp);
	if($saveset==1)
	{
		$dsql = new DedeSql(false);
		$dsql->SetQuery("update #@__homepageset set templet='$templet',position='$position' ");
		$dsql->ExecuteNoneQuery();
		$dsql->Close();
	}
	$templet = str_replace("{style}",$cfg_df_style,$templet);
	$pv = new PartView();
	$pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet);
Ejemplo n.º 15
0
<?php 
require(dirname(__FILE__)."/config.php");
CheckPurview('plus_投票模块');
if(empty($dopost)) $dopost = "";
//////////////////////////////////////////
if($dopost=="save")
{
	//$ismore,$votename
	$starttime = GetMkTime($starttime);
	$endtime = GetMkTime($endtime);
	$voteitems = "";
	$j=0;
	for($i=1;$i<=15;$i++)
	{
		if(!empty(${"voteitem".$i})){
			$j++;
			$voteitems .= "<v:note id=\\'$j\\' count=\\'0\\'>".${"voteitem".$i}."</v:note>\r\n";
		}
	}
	$dsql = new DedeSql(false);
	$inQuery = "
	insert into #@__vote(votename,starttime,endtime,totalcount,ismore,votenote) 
	Values('$votename','$starttime','$endtime','0','$ismore','$voteitems');
	";
	$dsql->SetQuery($inQuery);
	if(!$dsql->ExecuteNoneQuery())
	{
		$dsql->Close();
		ShowMsg("增加投票失败,请检查数据是否非法!","-1");
		exit();
	}
<?php
require_once(dirname(__FILE__)."/../config.php");
CheckPurview('story_New');
require_once(dirname(__FILE__)."/../../include/inc_photograph.php");
require_once(dirname(__FILE__)."/../../include/pub_oxwindow.php");
require_once(dirname(__FILE__)."/../inc/inc_archives_functions.php");

if( empty($chapterid)
|| (!empty($addchapter) && !empty($chapternew)) )
{
	if(empty($chapternew))
	{
		 ShowMsg("由于你发布的内容没选择章节,系统拒绝发布!","-1");
		 exit();
	}
	$dsql = new DedeSql();
	$row = $dsql->GetOne("Select * From #@__story_chapter where bookid='$bookid' order by chapnum desc");
	if(is_array($row)) $nchapnum = $row['chapnum']+1;
	else $nchapnum = 1;
	$query = "INSERT INTO `#@__story_chapter`(`bookid`,`catid`,`chapnum`,`memberid`,`chaptername`,`bookname`)
            VALUES ('$bookid', '$catid', '$nchapnum', '0', '$chapternew','$bookname');";
	$rs = $dsql->ExecuteNoneQuery($query);
	if($rs){
		$chapterid = $dsql->GetLastID();
	}
	else
  {
  	ShowMsg("增加章节失败,请检查原因!","-1");
		exit();
  }
}else
             $maintable = trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable']);
             $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='{$aid}' ");
             $flag = $arr['flag'] == '' ? $flagname : $arr['flag'] . ',' . $flagname;
             $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='{$flag}' WHERE id='{$aid}' ");
         } else {
             $maintable = trim($row['addtable']);
             $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='{$aid}' ");
             $flag = $arr['flag'] == '' ? $flagname : $arr['flag'] . ',' . $flagname;
             $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='{$flag}' WHERE aid='{$aid}' ");
         }
     }
     ShowMsg("成功对选中文档增加指定的属性!", $ENV_GOBACK_URL);
     exit;
 } else {
     if ($dopost == 'attsDel') {
         CheckPurview('a_Commend,sys_ArcBatch');
         if (!empty($aid) && empty($qstr)) {
             $qstr = $aid;
         }
         if ($qstr == '') {
             ShowMsg("参数无效!", $ENV_GOBACK_URL);
             exit;
         }
         if (empty($flagname)) {
             ShowMsg("必须指定要删除的属性!", $ENV_GOBACK_URL);
             exit;
         }
         $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr));
         $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc\n           LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid\n           LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype\n          WHERE arc.id in({$arcids}) ";
         $dsql->SetQuery($query);
         $dsql->Execute();
Ejemplo n.º 18
0
<?php

/**
 * 获取用户的统计信息
 *
 * @version        $Id: sys_admin_user_edit.php 1 16:22 2010年7月20日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('sys_User');
if (isset($dopost) && $dopost == 'getone') {
    $row = $dsql->GetOne("SELECT userid FROM `#@__admin` WHERE id='{$uid}'; ");
    $userid = $row['userid'];
    $y = intval(MyDate('Y', time()));
    $m = intval(MyDate('m', time()));
    $d = intval(MyDate('d', time()));
    //全部
    $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'";
    $dsql->Execute('me', $sql);
    while ($frow = $dsql->GetArray('me')) {
        $dd = empty($dd) ? "0" : $dd;
        $cc = empty($cc) ? "0" : $cc;
        $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE mid='{$uid}'; ");
        $dd += $row['dd'];
        $cc += $row['cc'];
    }
    $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE mid='{$uid}'; ");
    $dd = $row['dd'] + $dd;
Ejemplo n.º 19
0
<?php

require_once dirname(__FILE__) . "/config.php";
require_once DEDEINC . "/datalistcp.class.php";
CheckPurview('plus_Mail');
if (!isset($dopost)) {
    $dopost = '';
}
$id = empty($id) ? 0 : intval($id);
if ($dopost == "add") {
    require_once DEDEADMIN . "/templets/mail_type_add.htm";
} elseif ($dopost == "edit") {
    $row = $dsql->GetOne("SELECT * FROM `#@__mail_title` WHERE id={$id}");
    require_once DEDEADMIN . "/templets/mail_title_edit.htm";
} elseif ($dopost == "addsave") {
    if ($typename == "") {
        ShowMsg("分类名不能为空", "-1");
        exit;
    }
    $typename = Html2Text($typename, 1);
    $description = Html2Text($description, 1);
    $query = "INSERT INTO #@__mail_type (typename,description) VALUES ('{$typename}','{$description}')";
    if (!$dsql->ExecuteNoneQuery($query)) {
        ShowMsg("更新数据库#@__mail_type表时出错,请检查!", "javascript:;");
        exit;
    } else {
        ShowMsg("添加分类成功!", "mail_type.php");
        exit;
    }
} elseif ($dopost == "editsave") {
    if ($typename == "") {
Ejemplo n.º 20
0
<?php

require_once dirname(__FILE__) . "/config.php";
CheckPurview('co_AddNote');
if (empty($step)) {
    $step = "";
}
if (empty($exrule)) {
    $exrule = "";
}
//选择操作频道类型,载入表单
/*----------------------
function Init(){ }
----------------------*/
if (empty($step)) {
    require_once DEDEADMIN . "/templets/co_add_step0.htm";
    exit;
} else {
    if ($step == 1) {
        require_once DEDEADMIN . "/templets/co_add_step1.htm";
        exit;
    } else {
        if ($step == 2) {
            //对完整规则进行测试
            if ($dopost == 'test') {
                include DEDEINC . "/dedecollection.class.php";
                $usemore = !isset($usemore) ? 0 : 1;
                $listconfig = "{dede:noteinfo notename=\\\"{$notename}\\\" channelid=\\\"{$channelid}\\\" macthtype=\\\"{$macthtype}\\\"\r\nrefurl=\\\"{$refurl}\\\" sourcelang=\\\"{$sourcelang}\\\" cosort=\\\"{$cosort}\\\" isref=\\\"{$isref}\\\" exptime=\\\"{$exptime}\\\" usemore=\\\"{$usemore}\\\" /}\r\n\r\n{dede:listrule sourcetype=\\\"{$sourcetype}\\\" rssurl=\\\"{$rssurl}\\\" regxurl=\\\"{$regxurl}\\\"\r\nstartid=\\\"{$startid}\\\" endid=\\\"{$endid}\\\" addv=\\\"{$addv}\\\" urlrule=\\\"{$urlrule}\\\"\r\n musthas=\\\"{$musthas}\\\" nothas=\\\"{$nothas}\\\" listpic=\\\"{$listpic}\\\" usemore=\\\"{$usemore}\\\"}\r\n\t{dede:addurls}{$addurls}{/dede:addurls}\r\n\t{dede:batchrule}{$batchrule}{/dede:batchrule}\r\n\t{dede:regxrule}{$regxrule}{/dede:regxrule}\r\n\t{dede:areastart}{$areastart}{/dede:areastart}\r\n\t{dede:areaend}{$areaend}{/dede:areaend}\r\n{/dede:listrule}\r\n";
                $tmplistconfig = stripslashes($listconfig);
                $notename = stripslashes($notename);
                if ($sourcetype == 'rss' && ($refurl = '')) {
<?php
@ob_start();
@set_time_limit(3600);
require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_description');
$tjnum = 0;
if($action=='getfields')
{
	AjaxHead();
	$dsql = new DedeSql(false);
	if(!$dsql->linkID){
		echo "<font color='red'>连接数据源的数据库失败!</font><br>";
		echo $qbutton;
		exit();
	}
	$channel = $dsql->getone("select addtable from #@__channeltype where ID=$channel");
	$channel = str_replace('#@__',$cfg_dbprefix,$channel['addtable']);
	$dsql->GetTableFields($channel);
	echo "<div style='border:1px solid #ababab;background-color:#FEFFF0;margin-top:6px;padding:3px;line-height:160%'>";
	echo "表(".$channel.")含有的字段:<br>";
	while($row = $dsql->GetFieldObject()){
		echo "<a href=\"javascript:pf('{$row->name}')\"><u>".$row->name."</u></a>\r\n";
	}
	echo "<input type='hidden' name='addtable' value='$channel' />";
	echo "</div>";
	$dsql->Close();
	exit();
}elseif($action == 'fetch')
{
	
	header("Content-Type: text/html; charset={$cfg_ver_lang}");
Ejemplo n.º 22
0
<?php

/**
 * @version        $Id: story_edit_photo_action.php 1 9:02 2010年9月25日Z 蓝色随想 $
 * @package        DedeCMS.Module.Book
 * @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('story_Edit');
include_once DEDEINC . "/image.func.php";
include_once DEDEINC . "/oxwindow.class.php";
require_once DEDEADMIN . "/inc/inc_archives_functions.php";
if (empty($chapterid) || !empty($addchapter) && !empty($chapternew)) {
    if (empty($chapternew)) {
        ShowMsg("由于你发布的内容没选择章节,系统拒绝发布!", "-1");
        exit;
    }
    $dsql = new DedeSql();
    $row = $dsql->GetOne("SELECT * FROM #@__story_chapter WHERE bookid='{$bookid}' ORDER BY chapnum DESC");
    if (is_array($row)) {
        $nchapnum = $row['chapnum'] + 1;
    } else {
        $nchapnum = 1;
    }
    $query = "INSERT INTO `#@__story_chapter`(`bookid`,`catid`,`chapnum`,`mid`,`chaptername`,`bookname`)\n            VALUES ('{$bookid}', '{$catid}', '{$nchapnum}', '0', '{$chapternew}','{$bookname}');";
    $rs = $dsql->ExecuteNoneQuery($query);
    if ($rs) {
        $chapterid = $dsql->GetLastID();
    } else {
Ejemplo n.º 23
0
<?php

/**
 * 插件编辑
 *
 * @version        $Id: plus_edit.php 1 15:46 2010年7月20日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('sys_plus');
$aid = preg_replace("#[^0-9]#", "", $aid);
if ($dopost == "show") {
    $dsql->ExecuteNoneQuery("UPDATE #@__plus SET isshow=1 WHERE aid='{$aid}';");
    ShowMsg("成功启用一个插件,请刷新导航菜单!", "plus_main.php");
    exit;
} else {
    if ($dopost == "hide") {
        $dsql->ExecuteNoneQuery("UPDATE #@__plus SET isshow=0 WHERE aid='{$aid}';");
        ShowMsg("成功禁用一个插件,请刷新导航菜单!", "plus_main.php");
        exit;
    } else {
        if ($dopost == "delete") {
            if (empty($job)) {
                $job = "";
            }
            if ($job == "") {
                require_once DEDEINC . "/oxwindow.class.php";
                $wintitle = "删除插件";
Ejemplo n.º 24
0
<?php 
require_once(dirname(__FILE__)."/config.php");
CheckPurview('co_NewRule');
require_once(dirname(__FILE__)."/../include/pub_datalist.php");
require_once(dirname(__FILE__)."/../include/inc_functions.php");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");

$sql  = "
Select
aid,rulename,etype,dtime
From #@__co_exrule
order by aid desc
";

$dlist = new DataList();
$dlist->Init();
$dlist->SetSource($sql);
$dlist->SetTemplet(dirname(__FILE__)."/templets/co_export_rule.htm");
$dlist->display();
$dlist->Close();

ClearAllLink();
?>
Ejemplo n.º 25
0
<?php

/**
 * 文档编辑
 *
 * @version        $Id: article_edit.php 1 14:12 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('a_Edit,a_AccEdit,a_MyEdit');
require_once DEDEINC . "/customfields.func.php";
require_once DEDEADMIN . "/inc/inc_archives_functions.php";
if (file_exists(DEDEDATA . '/template.rand.php')) {
    require_once DEDEDATA . '/template.rand.php';
}
if (empty($dopost)) {
    $dopost = '';
}
$aid = isset($aid) && is_numeric($aid) ? $aid : 0;
if ($dopost != 'save') {
    require_once DEDEADMIN . "/inc/inc_catalog_options.php";
    require_once DEDEINC . "/dedetag.class.php";
    ClearMyAddon();
    //读取归档信息
    $query = "SELECT ch.typename AS channelname,ar.membername AS rankname,arc.*\r\n    FROM `#@__archives` arc\r\n    LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel\r\n    LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='{$aid}' ";
    $arcRow = $dsql->GetOne($query);
    if (!is_array($arcRow)) {
        ShowMsg("读取档案基本信息出错!", "-1");
<?php 
require_once(dirname(__FILE__)."/config.php");
empty($_COOKIE['ENV_GOBACK_URL']) ? $ENV_GOBACK_URL = "-1" : $ENV_GOBACK_URL=$_COOKIE['ENV_GOBACK_URL'];
CheckPurview('sys_Keyword');
$keyword = trim($keyword);
$rank = ereg_replace("[^0-9]","",$rank);
if(ereg(" ",$keyword)||$keyword=="")
{
	ShowMsg("关键字不能带有空格或为空!",-1);
	exit();
}
$dsql = new DedeSql(false);
$row = $dsql->GetOne("Select * From #@__keywords where keyword like '$keyword'");
if(is_array($row))
{
	$dsql->Close();
	ShowMsg("关键字已存在库中!","-1");
	exit();
}
$inquery = "
INSERT INTO #@__keywords(keyword,rank,sta,rpurl) VALUES ('$keyword','$rank','1','$rpurl');
";
$dsql->SetQuery($inquery);
$dsql->ExecuteNoneQuery();
ClearAllLink();
ShowMsg("成功增加一个关键字!",$ENV_GOBACK_URL);
?>
Ejemplo n.º 27
0
<?php

require_once dirname(__FILE__) . "/config.php";
@set_time_limit(0);
CheckPurview('sys_ArcBatch');
if (empty($dopost)) {
    $dopost = '';
}
if ($dopost == 'analyse') {
    $arr = $dsql->getone("select maintable from `#@__channeltype` where id='{$channelid}' ");
    if (is_array($arr)) {
        $maintable = $arr['maintable'];
    } else {
        showmsg('频道id不正确,无法处理!', 'javascript:;');
        exit;
    }
    $dsql->SetQuery("Select count(title) as dd,title From `{$maintable}` where channel='{$channelid}' group by title order by dd desc limit 0, {$pagesize}");
    $dsql->Execute();
    $allarc = 0;
    include DedeInclude('templets/article_result_same.htm');
    exit;
} else {
    if ($dopost == 'delsel') {
        require_once dirname(__FILE__) . "/../include/typelink.class.php";
        require_once dirname(__FILE__) . "/inc/inc_batchup.php";
        if (empty($titles)) {
            header("Content-Type: text/html; charset={$cfg_ver_lang}");
            echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_ver_lang}\">\r\n";
            echo "没有指定删除的文档!";
            exit;
        }
Ejemplo n.º 28
0
<?php

/**
 * 自定义标记修改
 *
 * @version        $Id: mytag_edit.php 1 15:37 2010年7月20日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 dirname(__FILE__) . "/config.php";
CheckPurview('temp_Other');
require_once DEDEINC . "/typelink.class.php";
if (empty($dopost)) {
    $dopost = '';
}
$aid = intval($aid);
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'mytag_main.php' : $_COOKIE['ENV_GOBACK_URL'];
if ($dopost == 'delete') {
    $dsql->ExecuteNoneQuery("DELETE FROM #@__mytag WHERE aid='{$aid}'");
    ShowMsg("成功删除一个自定义标记!", $ENV_GOBACK_URL);
    exit;
} else {
    if ($dopost == "saveedit") {
        $starttime = GetMkTime($starttime);
        $endtime = GetMkTime($endtime);
        $query = "UPDATE `#@__mytag`\r\n     SET\r\n     typeid='{$typeid}',\r\n     timeset='{$timeset}',\r\n     starttime='{$starttime}',\r\n     endtime='{$endtime}',\r\n     normbody='{$normbody}',\r\n     expbody='{$expbody}'\r\n     WHERE aid='{$aid}' ";
        $dsql->ExecuteNoneQuery($query);
        ShowMsg("成功更改一个自定义标记!", $ENV_GOBACK_URL);
        exit;
Ejemplo n.º 29
0
<?php

/**
 * 会员管理
 *
 * @version        $Id: member_main.php 1 10:49 2010年7月20日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('member_List');
require_once DEDEINC . "/datalistcp.class.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
if (!isset($sex)) {
    $sex = '';
}
if (!isset($mtype)) {
    $mtype = '';
}
if (!isset($spacesta)) {
    $spacesta = -10;
}
if (!isset($matt)) {
    $matt = 10;
}
if (!isset($keyword)) {
    $keyword = '';
} else {
    $keyword = trim(FilterSearch($keyword));
Ejemplo n.º 30
0
<?php

/**
 * 多站点设置
 *
 * @version        $Id: sys_multiserv.php 1 22:28 2010年7月20日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('sys_SoftConfig');
if (empty($dopost)) {
    $dopost = '';
}
//保存
if ($dopost == "save") {
    $configfile = DEDEDATA . "/cache/inc_remote_config.php";
    $rminfo = serialize(array('rmhost' => $c_rmhost, 'rmport' => $c_rmport, 'rmname' => $c_rmname, 'rmpwd' => $c_rmpwd));
    $query = "UPDATE `#@__multiserv_config` SET\n           `remoteuploads` = '{$c_remoteuploads}' ,\n           `remoteupUrl` ='{$c_remoteupUrl}' ,\n           `rminfo` = '{$rminfo}',\n           `servinfo` = '{$c_servinfo}'";
    $dsql->ExecuteNoneQuery($query);
    //更新配置缓存文件
    $configstr = "\$remoteuploads = '" . $c_remoteuploads . "';\r\n";
    $configstr .= "\$remoteupUrl = '" . $c_remoteupUrl . "';\r\n";
    $configstr .= "\$rmhost = '" . $c_rmhost . "';\r\n";
    $configstr .= "\$rmport = '" . $c_rmport . "';\r\n";
    $configstr .= "\$rmname = '" . $c_rmname . "';\r\n";
    $configstr .= "\$rmpwd = '" . $c_rmpwd . "';\r\n";
    $configstr = "<" . "?php\r\n" . $configstr . "?" . ">\r\n";
    $fp = fopen($configfile, "w") or die("写入文件 {$safeconfigfile} 失败,请检查权限!");