diff --git a/src/admin/action_search.php b/src/admin/action_search.php index 679518c4..157bbb10 100644 --- a/src/admin/action_search.php +++ b/src/admin/action_search.php @@ -10,11 +10,9 @@ */ require_once(dirname(__FILE__)."/config.php"); require_once(dirname(__FILE__)."/actionsearch_class.php"); - //增加权限检查 if (empty($dopost)) $dopost = ""; - $keyword = empty($keyword) ? "" : RemoveXss($keyword); $actsearch = new ActionSearch($keyword); $asresult = $actsearch->Search(); -include DedeInclude('templets/action_search.htm'); +include DedeInclude('templets/action_search.htm'); \ No newline at end of file diff --git a/src/admin/actionsearch_class.php b/src/admin/actionsearch_class.php index dafb4eb0..8c501e5e 100644 --- a/src/admin/actionsearch_class.php +++ b/src/admin/actionsearch_class.php @@ -17,25 +17,21 @@ class ActionSearch $this->asarray = $this->GetSearchstr(); $this->keyword = $keyword; } - //初始化系统 function ActionSearch($keyword) { $this->__construct($keyword); } - function GetSearchstr() { require_once(dirname(__FILE__)."/inc/inc_action_info.php"); return is_array($actionSearch) ? $actionSearch : array(); } - function search() { $this->searchkeyword(); return $this->result; } - /** * 遍历功能配置项进行关键词匹配 * @@ -65,7 +61,6 @@ class ActionSearch $i++; } } - /** * 加亮关键词 * @@ -87,10 +82,9 @@ class ActionSearch } return $text; } - function _strpos($string, $find) { if (function_exists('stripos')) return stripos($string, $find); return strpos($string, $find); } -} +} \ No newline at end of file diff --git a/src/admin/ad_add.php b/src/admin/ad_add.php index 0b21cb87..2c8e9944 100644 --- a/src/admin/ad_add.php +++ b/src/admin/ad_add.php @@ -12,7 +12,6 @@ require(dirname(__FILE__)."/config.php"); CheckPurview('plus_广告管理'); require_once DEDEINC."/typelink.class.php"; if (empty($dopost)) $dopost = ""; - if ($dopost == "save") { CheckCSRF(); //timeset tagname typeid normbody expbody @@ -72,4 +71,4 @@ $startDay = time(); $endDay = AddDay($startDay, 30); $startDay = GetDateTimeMk($startDay); $endDay = GetDateTimeMk($endDay); -include DedeInclude('templets/ad_add.htm'); +include DedeInclude('templets/ad_add.htm'); \ No newline at end of file diff --git a/src/admin/ad_edit.php b/src/admin/ad_edit.php index 070917ab..11776a29 100644 --- a/src/admin/ad_edit.php +++ b/src/admin/ad_edit.php @@ -14,7 +14,6 @@ require_once(DEDEINC.'/typelink.class.php'); if (empty($dopost)) $dopost = ''; $aid = preg_replace("#[^0-9]#", '', $aid); $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "ad_main.php" : $_COOKIE['ENV_GOBACK_URL']; - if ($dopost == 'delete') { $dsql->ExecuteNoneQuery("DELETE FROM `#@__myad` WHERE aid='$aid' "); ShowMsg("成功删除一则广告代码", $ENV_GOBACK_URL); @@ -25,7 +24,6 @@ if ($dopost == 'delete') { $showhtml = "\r\n\r\n$jscode\r\n\r\n"; $showhtml .= "预览:"; $row = $dsql->GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' "); - $showtag = '{'."dede:myad name='{$row['tagname']}'/".'}'; $info = "说明:如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告修改后需要重新生成。
如果不希望重新生成所有页面,则直接调用JS代码即可。 @@ -65,7 +63,6 @@ if ($dopost == 'delete') { ShowMsg("成功修改一则广告代码", $ENV_GOBACK_URL); exit(); } - $row = $dsql->GetOne("SELECT * FROM `#@__myad` WHERE aid='$aid'"); $dsql->Execute('dd', 'SELECT * FROM `#@__myadtype` ORDER BY id DESC'); $option = ''; @@ -76,4 +73,4 @@ while ($arr = $dsql->GetArray('dd')) { $option .= "\n\r"; } } -include DedeInclude('templets/ad_edit.htm'); +include DedeInclude('templets/ad_edit.htm'); \ No newline at end of file diff --git a/src/admin/ad_main.php b/src/admin/ad_main.php index 6eed46cc..50eed979 100644 --- a/src/admin/ad_main.php +++ b/src/admin/ad_main.php @@ -12,10 +12,8 @@ require_once(dirname(__FILE__).'/config.php'); require_once(DEDEINC.'/datalistcp.class.php'); require_once(DEDEINC.'/common.func.php'); setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); - $clsid = isset($clsid) ? intval($clsid) : 0; $keyword = isset($keyword) ? addslashes($keyword) : ''; - $dsql->Execute('dd', 'SELECT * FROM `#@__myadtype` ORDER BY id DESC'); $option = ''; while ($arr = $dsql->GetArray('dd')) { @@ -28,7 +26,6 @@ while ($arr = $dsql->GetArray('dd')) { $where_sql = ' 1=1'; if ($clsid != 0) $where_sql .= " AND clsid = $clsid"; if ($keyword != '') $where_sql .= " AND (ad.adname like '%$keyword%') "; - $sql = "SELECT ad.aid,ad.clsid,ad.tagname,tp.typename as typename,ad.adname,ad.timeset,ad.endtime,ap.typename as clsname FROM `#@__myad` ad LEFT JOIN `#@__arctype` tp on tp.id=ad.typeid @@ -39,7 +36,6 @@ $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN."/templets/ad_main.htm"); $dlist->SetSource($sql); $dlist->display(); - function TestType($tname, $type = "") { if ($tname == "") { @@ -48,7 +44,6 @@ function TestType($tname, $type = "") return $tname; } } - function TimeSetValue($ts) { if ($ts == 0) { @@ -56,4 +51,4 @@ function TimeSetValue($ts) } else { return "限时标记"; } -} +} \ No newline at end of file diff --git a/src/admin/adtype_main.php b/src/admin/adtype_main.php index 83c797a0..9c782ee2 100644 --- a/src/admin/adtype_main.php +++ b/src/admin/adtype_main.php @@ -10,7 +10,6 @@ */ require_once(dirname(__FILE__)."/config.php"); if (empty($dopost)) $dopost = ''; - //保存修改 if ($dopost == "save") { $startID = 1; @@ -38,5 +37,4 @@ if ($dopost == "save") { ShowMsg("成功更新广告分类列表", 'adtype_main.php'); exit; } - -include DedeInclude('templets/adtype_main.htm'); +include DedeInclude('templets/adtype_main.htm'); \ No newline at end of file diff --git a/src/admin/album_add.php b/src/admin/album_add.php index 66574744..eb1b5f4b 100644 --- a/src/admin/album_add.php +++ b/src/admin/album_add.php @@ -19,7 +19,6 @@ if ($dopost != 'save') { ClearMyAddon(); $channelid = empty($channelid) ? 0 : intval($channelid); $cid = empty($cid) ? 0 : intval($cid); - //获得频道模型ID if ($cid > 0 && $channelid == 0) { $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); diff --git a/src/admin/album_testhtml.php b/src/admin/album_testhtml.php index b279910a..c7501efd 100644 --- a/src/admin/album_testhtml.php +++ b/src/admin/album_testhtml.php @@ -17,4 +17,4 @@ $img_array = array_unique($img_array[2]); echo "
"; echo "捕获的图片:\r\n"; print_r($img_array); -echo "
\r\n"; +echo "\r\n"; \ No newline at end of file diff --git a/src/admin/article_allowurl_edit.php b/src/admin/article_allowurl_edit.php index 46648fcc..a4365a8a 100644 --- a/src/admin/article_allowurl_edit.php +++ b/src/admin/article_allowurl_edit.php @@ -14,9 +14,7 @@ CheckPurview('sys_Source'); if (empty($dopost)) $dopost = ''; if (empty($allurls)) $allsource = ''; else $allurls = stripslashes($allurls); - $m_file = DEDEDATA."/admin/allowurl.txt"; - //保存 if ($dopost == 'save') { $fp = fopen($m_file, 'w'); @@ -39,4 +37,4 @@ $win->AddHidden('dopost', 'save'); $win->AddTitle("每行保存一个超链接:"); $win->AddMsgItem(""); $winform = $win->GetWindow('ok'); -$win->Display(); +$win->Display(); \ No newline at end of file diff --git a/src/admin/article_coonepage_rule.php b/src/admin/article_coonepage_rule.php index f525d3e7..aded16df 100644 --- a/src/admin/article_coonepage_rule.php +++ b/src/admin/article_coonepage_rule.php @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (empty($action)) $action = ''; - /*------ function _AddNote(){ } -------*/ @@ -28,7 +27,8 @@ if ($action == 'add') { } /*------ function _DelNote(){ } --------*/ else if ($action == 'del') { +-------*/ +else if ($action == 'del') { if (!preg_match("#,#", $ids)) { $query = "DELETE FROM `#@__co_onepage` WHERE id='$ids' "; } else { @@ -36,17 +36,18 @@ function _DelNote(){ } } $dsql->ExecuteNonequery($query); } - /*------ function _EditNote(){ } --------*/ else if ($action == 'editsave') { +-------*/ +else if ($action == 'editsave') { $query = "UPDATE `#@__co_onepage` SET `url`='$url',`title`='$title',`issource`='$issource',`lang`='$lang',`rule`='$rule' WHERE id='$id' "; $dsql->ExecuteNonequery($query); echo $dsql->GetError(); } /*------ function _EditNoteLoad(){ } --------*/ else if ($action == 'editload') { +-------*/ +else if ($action == 'editload') { $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE id='$id' "); AjaxHead(); ?> @@ -116,4 +117,4 @@ $sql = "SELECT id,url,title,lang,issource FROM `#@__co_onepage` ORDER BY id DESC $dlist = new DataListCP(); $dlist->SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm"); $dlist->SetSource($sql); -$dlist->Display(); +$dlist->Display(); \ No newline at end of file diff --git a/src/admin/article_description_main.php b/src/admin/article_description_main.php index 003bdc3b..da9bddf0 100644 --- a/src/admin/article_description_main.php +++ b/src/admin/article_description_main.php @@ -23,13 +23,11 @@ if ($dojob == '') { if (empty($sid)) $sid = 0; if (empty($eid)) $eid = 0; if (empty($dojob)) $dojob = 'des'; - $table = preg_replace("#[^0-9a-zA-Z_\#@]#", "", $table); $field = preg_replace("#[^0-9a-zA-Z_\[\]]#", "", $field); $channel = intval($channel); if ($dsize > 250) $dsize = 250; $tjnum = 0; - //获取自动摘要 if ($dojob == 'des') { if (empty($totalnum)) { @@ -73,7 +71,6 @@ if ($dojob == '') { } $dsql->ExecuteNoneQuery("UPDATE #@__archives SET description='{$des}' WHERE id='{$row['id']}';"); } - //返回进度信息 $startdd = $startdd + $pagesize; if ($totalnum > $startdd) { @@ -94,7 +91,6 @@ if ($dojob == '') { exit(); } } //获取自动摘要代码结束 - //更新自动分页 if ($dojob == 'page') { require_once(DEDEADMIN."/inc/inc_archives_functions.php"); @@ -106,14 +102,12 @@ if ($dojob == '') { if ($eid != 0) { $addquery .= " and aid<='$eid' "; } - //统计记录总数 if ($totalnum == 0) { $sql = "SELECT COUNT(*) AS dd FROM $table WHERE 1 $addquery"; $row = $dsql->GetOne($sql); $totalnum = $row['dd']; } - //获取记录,并分析 if ($totalnum > $startdd + $pagesize) { $limitSql = " LIMIT $startdd,$pagesize"; @@ -141,16 +135,13 @@ if ($dojob == '') { } } } //end if limit - //返回进度提示 if ($totalnum > 0) { $tjlen = ceil(($tjnum / $totalnum) * 100); } else { $tjlen = 100; } - $dvlen = $tjlen * 2; - $tjsta = "
"; $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务..."; @@ -163,4 +154,4 @@ if ($dojob == '') { exit(); } } //更新自动分页处理代码结束 -} +} \ No newline at end of file diff --git a/src/admin/article_keywords_main.php b/src/admin/article_keywords_main.php index ce2a5044..cb7c58c9 100644 --- a/src/admin/article_keywords_main.php +++ b/src/admin/article_keywords_main.php @@ -13,13 +13,11 @@ CheckPurview('sys_Keyword'); require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (empty($dopost)) $dopost = ''; - - //保存批量修改 if ($dopost == 'saveall') { $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "article_keywords_main.php" : $_COOKIE['ENV_GOBACK_URL']; if (!isset($aids)) { - ShowMsg("您没有选择要修改的内容!", $ENV_GOBACK_URL); + ShowMsg("您没有选择要修改的内容", $ENV_GOBACK_URL); exit(); } foreach ($aids as $aid) { @@ -48,7 +46,7 @@ if ($dopost == 'saveall') { $dsql->ExecuteNoneQuery($query1); } } - ShowMsg("完成指定的修改!", $ENV_GOBACK_URL); + ShowMsg("完成指定的修改", $ENV_GOBACK_URL); exit(); } //增加关键字 @@ -57,17 +55,17 @@ else if ($dopost == 'add') { $keyword = trim($keyword); $rank = preg_replace("#[^0-9]#", '', $rank); if ($keyword == '') { - ShowMsg("关键字不能为空!", -1); + ShowMsg("关键字不能为空", -1); exit(); } $row = $dsql->GetOne("SELECT * FROM `#@__keywords` WHERE keyword LIKE '$keyword'"); if (is_array($row)) { - ShowMsg("关键字已存在库中!", "-1"); + ShowMsg("关键字已存在库中", "-1"); exit(); } $inquery = "INSERT INTO `#@__keywords`(keyword,`rank`,sta,rpurl) VALUES ('$keyword','$rank','1','$rpurl');"; $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功增加一个关键字!", $ENV_GOBACK_URL); + ShowMsg("成功增加一个关键字", $ENV_GOBACK_URL); exit(); } if (empty($keyword)) { diff --git a/src/admin/article_keywords_make.php b/src/admin/article_keywords_make.php index 357fd539..9c7fa359 100644 --- a/src/admin/article_keywords_make.php +++ b/src/admin/article_keywords_make.php @@ -13,7 +13,6 @@ require_once(dirname(__FILE__).'/config.php'); CheckPurview('sys_Keyword'); if (empty($dopost)) $dopost = ''; - //分析已存在的关键字(适用于默认的文章模型) if ($dopost == 'analyse') { echo "正在读取关键字数据库...
\r\n"; @@ -25,7 +24,7 @@ if ($dopost == 'analyse') { if ($row->sta == 1) $ws[$row->keyword] = 1; else $wserr[$row->keyword] = 1; } - echo "完成关键字数据库的载入!
\r\n"; + echo "完成关键字数据库的载入
\r\n"; flush(); echo "读取档案数据库,并对禁用的关键字和生字进行处理...
\r\n"; flush(); @@ -55,7 +54,7 @@ if ($dopost == 'analyse') { } } } - echo "完成档案数据库的处理!
\r\n"; + echo "完成档案数据库的处理
\r\n"; flush(); if (is_array($wsnew)) { echo "对关键字进行排序...
\r\n"; @@ -70,15 +69,15 @@ if ($dopost == 'analyse') { $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,`rank`,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); $dsql->Execute(); } - echo "完成关键字的导入!
\r\n"; + echo "完成关键字的导入
\r\n"; flush(); sleep(1); } else { - echo "没发现任何新的关键字!
\r\n"; + echo "没发现任何新的关键字
\r\n"; flush(); sleep(1); } - ShowMsg('完成所有操作,现在转到关键字列表页!', 'article_keywords_main.php'); + ShowMsg('完成所有操作,现在转到关键字列表页', 'article_keywords_main.php'); exit(); } //自动获取关键字(适用于默认的文章模型) @@ -196,7 +195,7 @@ else if ($dopost == 'fetch') { $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; ShowMsg($tjsta, $nurl, 0, 500); } else { - ShowMsg("完成所有任务!", "javascript:;"); + ShowMsg("完成所有任务", "javascript:;"); } exit(); } diff --git a/src/admin/catalog_do.php b/src/admin/catalog_do.php index ec0e20fc..52e43fc5 100644 --- a/src/admin/catalog_do.php +++ b/src/admin/catalog_do.php @@ -47,7 +47,8 @@ if ($dopost == "addArchives") { /*-------------------------- //管理文档 function listArchives(); ----------------------------*/ else if ($dopost == "listArchives") { +---------------------------*/ +else if ($dopost == "listArchives") { if (!empty($gurl)) { if (empty($arcrank)) { $arcrank = ''; @@ -81,14 +82,16 @@ function listArchives(); /*-------------------------- //浏览通用模板目录 function viewTempletDir(); ----------------------------*/ else if ($dopost == "viewTemplet") { +---------------------------*/ +else if ($dopost == "viewTemplet") { header("location:tpl.php?path=/".$cfg_df_style); exit(); } /*------------------------ 浏览单个页面的栏目 function ViewSgPage() -------------------------*/ else if ($dopost == "viewSgPage") { +------------------------*/ +else if ($dopost == "viewSgPage") { require_once(DEDEINC."/arc.listview.class.php"); $lv = new ListView($cid); $pageurl = $lv->MakeHtml(); @@ -98,7 +101,8 @@ function ViewSgPage() /*------------------------ 修改栏目排列顺序 function upRank() -------------------------*/ else if ($dopost == "upRank") { +------------------------*/ +else if ($dopost == "upRank") { //检查权限许可 CheckPurview('t_Edit,t_AccEdit'); @@ -134,7 +138,8 @@ function upRank() /*-------------------------- //更新栏目缓存 function UpCatlogCache(); ----------------------------*/ else if ($dopost == "upcatcache") { +---------------------------*/ +else if ($dopost == "upcatcache") { UpDateCatCache(); $sql = " TRUNCATE TABLE `#@__arctiny`"; $dsql->ExecuteNoneQuery($sql); @@ -165,14 +170,16 @@ function UpCatlogCache(); /*--------------------- 获取JS文件 function GetJs -----------------------*/ else if ($dopost == "GetJs") { +----------------------*/ +else if ($dopost == "GetJs") { header("location:makehtml_js.php"); exit(); } /*----------- 获得子类的内容 function GetSunListsMenu(); ------------*/ else if ($dopost == "GetSunListsMenu") { +-----------*/ +else if ($dopost == "GetSunListsMenu") { $userChannel = $cuserLogin->getUserChannel(); require_once(DEDEINC."/typeunit.class.menu.php"); AjaxHead(); @@ -183,7 +190,8 @@ function GetSunListsMenu(); /*----------- 获得子类的内容 function GetSunLists(); ------------*/ else if ($dopost == "GetSunLists") { +-----------*/ +else if ($dopost == "GetSunLists") { require_once(DEDEINC."/typeunit.class.admin.php"); AjaxHead(); PutCookie('lastCid', $cid, 3600 * 24, "/"); @@ -197,7 +205,8 @@ function GetSunLists(); /*---------------- 合并栏目 function unitCatalog() { } ------------------*/ else if ($dopost == 'unitCatalog') { +-----------------*/ +else if ($dopost == 'unitCatalog') { CheckPurview('t_Move'); require_once(DEDEINC.'/oxwindow.class.php'); require_once(DEDEINC.'/typelink.class.php'); @@ -255,7 +264,8 @@ function unitCatalog() { } /*---------------- 移动栏目 function moveCatalog() { } ------------------*/ else if ($dopost == 'moveCatalog') { +-----------------*/ +else if ($dopost == 'moveCatalog') { CheckPurview('t_Move'); require_once(DEDEINC.'/oxwindow.class.php'); require_once(DEDEINC.'/typelink.class.php'); diff --git a/src/admin/catalog_main.php b/src/admin/catalog_main.php index b57a4c51..07851a99 100644 --- a/src/admin/catalog_main.php +++ b/src/admin/catalog_main.php @@ -11,4 +11,4 @@ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/typeunit.class.admin.php"); $userChannel = $cuserLogin->getUserChannel(); -include DedeInclude('templets/catalog_main.htm'); +include DedeInclude('templets/catalog_main.htm'); \ No newline at end of file diff --git a/src/admin/content_att.php b/src/admin/content_att.php index 78174646..c660ad9c 100644 --- a/src/admin/content_att.php +++ b/src/admin/content_att.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Att'); if (empty($dopost)) $dopost = ''; - //保存修改 if ($dopost == "save") { $startID = 1; @@ -25,5 +24,4 @@ if ($dopost == "save") { } echo ""; } - -include DedeInclude('templets/content_att.htm'); +include DedeInclude('templets/content_att.htm'); \ No newline at end of file diff --git a/src/admin/content_batch_up.php b/src/admin/content_batch_up.php index 3b30af26..d496741c 100644 --- a/src/admin/content_batch_up.php +++ b/src/admin/content_batch_up.php @@ -10,4 +10,4 @@ */ require_once(dirname(__FILE__).'/config.php'); require_once(DEDEINC.'/typelink.class.php'); -include DedeInclude('templets/content_batch_up.htm'); +include DedeInclude('templets/content_batch_up.htm'); \ No newline at end of file diff --git a/src/admin/content_batchup_action.php b/src/admin/content_batchup_action.php index cc3f1004..0dd55504 100644 --- a/src/admin/content_batchup_action.php +++ b/src/admin/content_batchup_action.php @@ -13,7 +13,6 @@ CheckPurview('sys_ArcBatch'); require_once(DEDEINC."/typelink.class.php"); require_once(DEDEADMIN."/inc/inc_batchup.php"); @set_time_limit(0); - //typeid,startid,endid,seltime,starttime,endtime,action,newtypeid //批量操作 //check del move makehtml @@ -23,7 +22,6 @@ if (empty($endid)) $endid = 0; if (empty($seltime)) $seltime = 0; if (empty($typeid)) $typeid = 0; if (empty($userid)) $userid = ''; - //生成HTML操作由其它页面处理 if ($action == "makehtml") { $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; @@ -37,7 +35,6 @@ $gwhere = " WHERE 1 "; if ($startid > 0) $gwhere .= " AND id>= $startid "; if ($endid > $startid) $gwhere .= " AND id<= $endid "; $idsql = ''; - if ($typeid != 0) { $ids = GetSonIds($typeid); $gwhere .= " AND typeid IN($ids) "; @@ -55,7 +52,6 @@ if (!empty($userid)) { } //特殊操作 if (!empty($heightdone)) $action = $heightdone; - //指量审核 if ($action == 'check') { if (empty($startid) || empty($endid) || $endid < $startid) { @@ -156,7 +152,6 @@ else if ($action == 'move') { if ($rs) $tdd++; //DelArc($row->id,true); } - if ($tdd > 0) { $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; $jumpurl .= "&typeid=$newtypeid&pagesize=20&seltime=$seltime"; @@ -182,4 +177,4 @@ else if ($action == 'modddpic') { $dsql->ExecuteNoneQuery("UPDATE #@__archives SET litpic='' WHERE trim(litpic)='litpic' "); ShowMsg("成功修正缩略图错误", "javascript:;"); exit(); -} +} \ No newline at end of file diff --git a/src/admin/content_i_list.php b/src/admin/content_i_list.php index c5af00c7..909436b8 100644 --- a/src/admin/content_i_list.php +++ b/src/admin/content_i_list.php @@ -9,4 +9,4 @@ * @link https://www.dedebiz.com */ $s_tmplets = "templets/content_i_list.htm"; -include(dirname(__FILE__)."/content_list.php"); +include(dirname(__FILE__)."/content_list.php"); \ No newline at end of file diff --git a/src/admin/content_s_list.php b/src/admin/content_s_list.php index 0ba6c169..048d28c7 100644 --- a/src/admin/content_s_list.php +++ b/src/admin/content_s_list.php @@ -12,4 +12,4 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('spec_List'); $s_tmplets = "templets/content_s_list.htm"; $channelid = -1; -include(dirname(__FILE__)."/content_list.php"); +include(dirname(__FILE__)."/content_list.php"); \ No newline at end of file diff --git a/src/admin/content_select_list.php b/src/admin/content_select_list.php index ccd0d6d8..096ea787 100644 --- a/src/admin/content_select_list.php +++ b/src/admin/content_select_list.php @@ -9,4 +9,4 @@ * @link https://www.dedebiz.com */ $s_tmplets = "templets/content_select_list.htm"; -include(dirname(__FILE__)."/content_list.php"); +include(dirname(__FILE__)."/content_list.php"); \ No newline at end of file diff --git a/src/admin/content_sg_list.php b/src/admin/content_sg_list.php index 246ab047..4c11427b 100644 --- a/src/admin/content_sg_list.php +++ b/src/admin/content_sg_list.php @@ -14,15 +14,12 @@ $channelid = isset($channelid) ? intval($channelid) : 0; $mid = isset($mid) ? intval($mid) : 0; if (!isset($keyword)) $keyword = ''; if (!isset($arcrank)) $arcrank = ''; - if (empty($cid) && empty($channelid)) { ShowMsg("该页面必须指定栏目ID或内容模型ID才能浏览", "javascript:;"); exit(); } - //检查权限许可,总权限 CheckPurview('a_List,a_AccList,a_MyList'); - //栏目浏览许可 if (TestPurview('a_List')) { } else if (TestPurview('a_AccList')) { @@ -32,7 +29,6 @@ if (TestPurview('a_List')) { CheckCatalog($cid, "您无权浏览非指定栏目的内容"); } } - $adminid = $cuserLogin->getUserID(); $maintable = '#@__archives'; require_once(DEDEINC."/typelink.class.php"); @@ -45,7 +41,6 @@ if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $cha ShowMsg('您没权限访问此页', 'javascript:;'); exit(); } - if ($cid == 0) { $row = $tl->dsql->GetOne("SELECT typename,addtable FROM `#@__channeltype` WHERE id='$channelid'"); $positionname = $row['typename']." > "; @@ -53,21 +48,17 @@ if ($cid == 0) { } else { $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; } - $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); $whereSql = $channelid == 0 ? " WHERE arc.channel < -1 " : " WHERE arc.channel = '$channelid' "; - if (!empty($mid)) $whereSql .= " AND arc.mid = '$mid' "; if ($keyword != '') $whereSql .= " AND (arc.title like '%$keyword%') "; if ($cid != 0) $whereSql .= " AND arc.typeid in (".GetSonIds($cid).")"; - if ($arcrank != '') { $whereSql .= " AND arc.arcrank = '$arcrank' "; $CheckUserSend = ""; } else { $CheckUserSend = ""; } - $query = "SELECT arc.aid,arc.aid as id,arc.typeid,arc.arcrank,arc.flag,arc.senddate,arc.channel,arc.title,arc.mid,arc.click,tp.typename,ch.typename as channelname FROM `$listtable` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid @@ -83,4 +74,4 @@ $dlist->SetParameter("channelid", $channelid); $dlist->SetTemplate(DEDEADMIN."/templets/content_sg_list.htm"); $dlist->SetSource($query); $dlist->Display(); -$dlist->Close(); +$dlist->Close(); \ No newline at end of file diff --git a/src/admin/content_tj.php b/src/admin/content_tj.php index 50735b5c..3226f71c 100644 --- a/src/admin/content_tj.php +++ b/src/admin/content_tj.php @@ -13,7 +13,6 @@ CheckPurview('sys_ArcTj'); $row1 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); $row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` "); $row3 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__member` "); - /** * 获取文档 * @@ -47,4 +46,4 @@ function GetArchives($dsql, $ordertype) echo cn_substr($row->title, 30)."{$moreinfo}
\r\n"; } } -include DedeInclude('templets/content_tj.htm'); +include DedeInclude('templets/content_tj.htm'); \ No newline at end of file diff --git a/src/admin/diy_edit.php b/src/admin/diy_edit.php index 7aa4be3d..d6a4c120 100644 --- a/src/admin/diy_edit.php +++ b/src/admin/diy_edit.php @@ -12,10 +12,8 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_Edit'); require_once(DEDEINC."/dedetag.class.php"); require_once(DEDEINC."/oxwindow.class.php"); - if (empty($dopost)) $dopost = ""; $diyid = (empty($diyid) ? 0 : intval($diyid)); - /*---------------- function __SaveEdit() -----------------*/ @@ -29,12 +27,12 @@ if ($dopost == "save") { } /*---------------- function __Delete() ------------------*/ else if ($dopost == "delete") { +-----------------*/ +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 = "自定义表单管理-删除自定义表单"; @@ -49,7 +47,6 @@ function __Delete() $win->Display(); exit(); } - //操作 else if ($job == "yes") { $row = $dsql->GetOne("SELECT `table` FROM `#@__diyforms` WHERE diyid='$diyid'", MYSQL_ASSOC); @@ -57,19 +54,16 @@ function __Delete() ShowMsg("您所指定的自定义表单信息不存在!", "-1"); exit(); } - //删除表 $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$row['table']}`;"); - //删除频道配置信息 $dsql->ExecuteNoneQuery("DELETE FROM `#@__diyforms` WHERE diyid='$diyid'"); ShowMsg("成功删除一个自定义表单", "diy_main.php"); exit(); } } - /*---------------- function edit() -----------------*/ $row = $dsql->GetOne("Select * From #@__diyforms where diyid='$diyid'"); -include DEDEADMIN."/templets/diy_edit.htm"; +include DEDEADMIN."/templets/diy_edit.htm"; \ No newline at end of file diff --git a/src/admin/diy_field_add.php b/src/admin/diy_field_add.php index 07f322f2..c3121946 100644 --- a/src/admin/diy_field_add.php +++ b/src/admin/diy_field_add.php @@ -9,11 +9,9 @@ * @link https://www.dedebiz.com */ require_once(dirname(__FILE__)."/config.php"); - //增加权限检查 require_once(DEDEADMIN.'/inc/inc_admin_channel.php'); if (empty($action)) $action = ''; - $mysql_version = $dsql->GetVersion(); $mysql_versions = explode(".", trim($mysql_version)); $mysql_version = $mysql_versions[0].".".$mysql_versions[1]; @@ -30,26 +28,21 @@ if ($action == 'save') { $dtp->SetNameSpace("field", "<", ">"); $dtp->LoadSource($fieldset); $trueTable = $row['table']; - //修改字段配置信息 $dfvalue = trim($vdefault); $isnull = ($isnull == 1 ? "true" : "false"); $mxlen = $maxlength; - //检测被修改的字段类型 $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); $ntabsql = $fieldinfos[0]; $buideType = $fieldinfos[1]; - $rs = $dsql->ExecuteNoneQuery(" ALTER TABLE `$trueTable` ADD $ntabsql "); - if (!$rs) { $gerr = $dsql->GetError(); ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); exit(); } $ok = FALSE; - //检测旧配置信息,并替换为新配置 if (is_array($dtp->CTags)) { //遍历旧配置 @@ -76,7 +69,6 @@ if ($action == 'save') { ShowMsg("成功增加一个字段", "diy_edit.php?diyid=$diyid"); exit(); } - //检测模型相关信息,并初始化相关数据 /*---------------------- function ShowPage() @@ -93,7 +85,6 @@ if ($mysql_version < 4.1) { $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } $dsql->ExecuteNoneQuery($tabsql); - //检测附加表里含有的字段 $fields = array(); $rs = $dsql->SetQuery("show fields from `$trueTable`"); @@ -105,4 +96,4 @@ $f = ''; foreach ($fields as $k => $v) { $f .= ($f == '' ? $k : ' '.$k); } -require_once(DEDEADMIN."/templets/diy_field_add.htm"); +require_once(DEDEADMIN."/templets/diy_field_add.htm"); \ No newline at end of file diff --git a/src/admin/diy_field_edit.php b/src/admin/diy_field_edit.php index ce424869..4e957e49 100644 --- a/src/admin/diy_field_edit.php +++ b/src/admin/diy_field_edit.php @@ -9,13 +9,10 @@ * @link https://www.dedebiz.com */ require_once(dirname(__FILE__)."/config.php"); - //增加权限检查 - require_once(DEDEINC."/dedetag.class.php"); require_once(DEDEADMIN."/inc/inc_admin_channel.php"); if (empty($action)) $action = ''; - //获取模型信息 $mysql_version = $dsql->GetVersion(); $mysql_versions = explode(".", trim($mysql_version)); @@ -29,14 +26,12 @@ $dtp->LoadSource($fieldset); foreach ($dtp->CTags as $ctag) { if (strtolower($ctag->GetName()) == strtolower($fname)) break; } - //字段类型信息 $ds = file(DEDEADMIN."/inc/fieldtype.txt"); foreach ($ds as $d) { $dds = explode(',', trim($d)); $fieldtypes[$dds[0]] = $dds[1]; } - //保存修改 /*-------------------- function _SAVE() @@ -47,7 +42,6 @@ if ($action == 'save') { ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); exit(); } - //检测数据库是否存在附加表,不存在则新建一个 $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( `id` int(10) unsigned NOT NULL auto_increment, @@ -59,7 +53,6 @@ if ($action == 'save') { $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } $dsql->ExecuteNoneQuery($tabsql); - //检测表里含有的字段 $fields = array(); $rs = $dsql->SetQuery("show fields from `$trueTable`"); @@ -67,23 +60,19 @@ if ($action == 'save') { while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { $fields[strtolower($nrow['Field'])] = $nrow['Type']; } - //修改字段配置信息 $dfvalue = $vdefault; $isnull = ($isnull == 1 ? "true" : "false"); $mxlen = $maxlength; $fieldname = strtolower($fname); - //检测被修改的字段类型,并更新数据表 $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); $ntabsql = $fieldinfos[0]; $buideType = $fieldinfos[1]; $tabsql = ''; - //检测旧数据类型,并替换为新配置 foreach ($dtp->CTags as $tagid => $ctag) { if (trim($fieldname) == trim(strtolower($ctag->GetName()))) { - if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; $dsql->ExecuteNoneQuery($tabsql); @@ -106,7 +95,8 @@ if ($action == 'save') { /*------------------ 删除字段 function _DELETE() --------------------*/ else if ($action == "delete") { +-------------------*/ +else if ($action == "delete") { //检测旧数据类型,并替换为新配置 foreach ($dtp->CTags as $tagid => $ctag) { if (strtolower($ctag->GetName()) == strtolower($fname)) { @@ -119,4 +109,4 @@ function _DELETE() ShowMsg("成功删除一个字段", "diy_edit.php?diyid=$diyid"); exit(); } -require_once(DEDEADMIN."/templets/diy_field_edit.htm"); +require_once(DEDEADMIN."/templets/diy_field_edit.htm"); \ No newline at end of file diff --git a/src/admin/diy_main.php b/src/admin/diy_main.php index b8f47051..1db994ce 100644 --- a/src/admin/diy_main.php +++ b/src/admin/diy_main.php @@ -18,4 +18,4 @@ $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN."/templets/diy_main.htm"); $dlist->SetSource($sql); $dlist->display(); -$dlist->Close(); +$dlist->Close(); \ No newline at end of file diff --git a/src/admin/erraddsave.php b/src/admin/erraddsave.php index 4b38a31d..712ccbca 100644 --- a/src/admin/erraddsave.php +++ b/src/admin/erraddsave.php @@ -11,10 +11,8 @@ require_once(dirname(__FILE__).'/config.php'); require_once(DEDEINC.'/datalistcp.class.php'); require_once(DEDEINC.'/common.func.php'); - if (empty($dopost)) $dopost = ''; if (empty($fmdo)) $fmdo = ''; - function username($mid) { global $dsql; @@ -29,7 +27,6 @@ function username($mid) } exit(); } - function typename($me) { switch ($me) { @@ -59,14 +56,11 @@ function typename($me) break; } } - if ($dopost == "delete") { if ($id == '') { ShowMsg("参数无效", "-1"); exit(); } - - if ($fmdo == 'yes') { $id = explode("`", $id); foreach ($id as $var) { @@ -91,9 +85,8 @@ if ($dopost == "delete") { } exit(); } - $sql = "SELECT * FROM `#@__erradd` ORDER BY id desc"; $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN."/templets/erradd.htm"); $dlist->SetSource($sql); -$dlist->display(); +$dlist->display(); \ No newline at end of file diff --git a/src/admin/exit.php b/src/admin/exit.php index 3c573954..ed124bb7 100644 --- a/src/admin/exit.php +++ b/src/admin/exit.php @@ -20,4 +20,4 @@ if (empty($needclose)) { window.close(); "; echo $msg; -} +} \ No newline at end of file diff --git a/src/admin/feedback_edit.php b/src/admin/feedback_edit.php index e398ea20..fb40634f 100644 --- a/src/admin/feedback_edit.php +++ b/src/admin/feedback_edit.php @@ -13,7 +13,6 @@ CheckPurview('sys_Feedback'); $id = isset($id) && is_numeric($id) ? $id : 0; $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "feedback_main.php" : $_COOKIE['ENV_GOBACK_URL']; if (empty($dopost)) $dopost = ""; - if ($dopost == 'edit') { $msg = cn_substrR($msg, 3500); $adminmsg = trim($adminmsg); @@ -39,4 +38,4 @@ if ($dopost == 'edit') { } $query = "SELECT * FROM `#@__feedback` WHERE id=$id"; $row = $dsql->GetOne($query); -include DedeInclude('templets/feedback_edit.htm'); +include DedeInclude('templets/feedback_edit.htm'); \ No newline at end of file diff --git a/src/admin/feedback_main.php b/src/admin/feedback_main.php index 5e68c848..d5f8f6f0 100644 --- a/src/admin/feedback_main.php +++ b/src/admin/feedback_main.php @@ -9,18 +9,15 @@ * @link https://www.dedebiz.com */ require_once(dirname(__FILE__)."/config.php"); - //权限检查 CheckPurview('sys_Feedback'); require_once(DEDEINC."/datalistcp.class.php"); require_once(DEDEINC."/typelink.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); - function IsCheck($st) { return $st == 1 ? "[已审核]" : "[未审核]"; } - function jsTrimjajx($str, $len) { $str = preg_replace("/{quote}(.*){\/quote}/is", '', $str); @@ -31,7 +28,6 @@ function jsTrimjajx($str, $len) $str = str_replace('>', '>', $str); return $str; } - if (!empty($job)) { $ids = preg_replace("#[^0-9,]#", '', $fid); if (empty($ids)) { @@ -41,7 +37,6 @@ if (!empty($job)) { } else { $job = ''; } - //更新回复统计 function UpdateReplycount($id) { @@ -49,7 +44,6 @@ function UpdateReplycount($id) $row = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__feedback` WHERE fid = $id AND ischeck=1"); $dsql->ExecNoneQuery("UPDATE `#@__feedback` SET `replycount`='{$row['dd']}' WHERE `id`=$id;"); } - //删除评论 if ($job == 'del') { $query = "DELETE FROM `#@__feedback` WHERE id IN($ids) "; @@ -84,7 +78,6 @@ else if ($job == 'check') { while ($row = $dsql->GetArray()) { UpdateReplycount($row['fid']); } - ShowMsg("成功审核指定评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); exit(); } @@ -96,18 +89,14 @@ else { $fid = isset($fid) && is_numeric($fid) ? $fid : 0; $keyword = !isset($keyword) ? '' : $keyword; $ip = !isset($ip) ? '' : $ip; - $tl = new TypeLink($typeid); $openarray = $tl->GetOptionArray($typeid, $admin_catalogs, 0); - $addsql = ($typeid != 0 ? " And typeid IN (".GetSonIds($typeid).")" : ''); $addsql .= ($aid != 0 ? " And aid=$aid " : ''); $addsql .= ($ip != '' ? " And ip LIKE '$ip' " : ''); - if ($fid > 0) { $addsql .= " AND fid={$fid} "; } - $querystring = "SELECT * FROM `#@__feedback` WHERE msg LIKE '%$keyword%' $addsql ORDER BY dtime DESC"; $dlist = new DataListCP(); @@ -119,4 +108,4 @@ else { $dlist->SetTemplate(DEDEADMIN.'/templets/feedback_main.htm'); $dlist->SetSource($querystring); $dlist->Display(); -} +} \ No newline at end of file diff --git a/src/admin/file_class.php b/src/admin/file_class.php index d5b6668c..be96f2b5 100644 --- a/src/admin/file_class.php +++ b/src/admin/file_class.php @@ -13,11 +13,9 @@ class FileManagement { var $baseDir = ""; var $activeDir = ""; - //是否允许文件管理器删除目录; //默认为不允许 0 ,如果希望可能管理整个目录,请把值设为 1 ; var $allowDeleteDir = 0; - //初始化系统 function Init() { @@ -25,7 +23,6 @@ class FileManagement $this->baseDir = $cfg_basedir; $this->activeDir = $activepath; } - //修改文件名 function RenameFile($oldname, $newname) { @@ -37,7 +34,6 @@ class FileManagement ShowMsg("成功修改一个文件名", "file_manage_main.php?activepath=".$this->activeDir); return 0; } - //创建新目录 function NewDir($dirname) { @@ -53,7 +49,6 @@ class FileManagement return 0; } } - /** * 移动文件 * @@ -92,7 +87,6 @@ class FileManagement return 0; } } - /** * 删除目录 * @@ -116,7 +110,6 @@ class FileManagement $dh->close(); @rmdir($indir); } - /** * 获得某目录合符规则的文件 * @@ -139,7 +132,6 @@ class FileManagement } $dh->close(); } - /** * 删除文件 * @@ -166,12 +158,10 @@ class FileManagement return 0; } } - //目录文件大小检测类 class SpaceUse { var $totalsize = 0; - function checksize($indir) { $dh = dir($indir); @@ -185,18 +175,15 @@ class SpaceUse } } } - function setkb($size) { $size = $size / 1024; - if ($size > 0) { list($t1, $t2) = explode(".", $size); $size = $t1.".".substr($t2, 0, 1); } return $size; } - function setmb($size) { $size = $size / 1024 / 1024; @@ -206,4 +193,4 @@ class SpaceUse } return $size; } -} +} \ No newline at end of file diff --git a/src/admin/file_manage_control.php b/src/admin/file_manage_control.php index 50896bb0..f625ad84 100644 --- a/src/admin/file_manage_control.php +++ b/src/admin/file_manage_control.php @@ -17,48 +17,42 @@ $activepath = preg_replace("#^\/{1,}#", "/", $activepath); if ($activepath == "/") $activepath = ""; if ($activepath == "") $inpath = $cfg_basedir; else $inpath = $cfg_basedir.$activepath; - //文件管理器交互与逻辑控制文件 $fmm = new FileManagement(); $fmm->Init(); - /*--------------- function __rename(); ----------------*/ if ($fmdo == "rename") { $fmm->RenameFile($oldfilename, $newfilename); } - //新建目录 - /*--------------- function __newdir(); -----------------*/ else if ($fmdo == "newdir") { +----------------*/ +else if ($fmdo == "newdir") { CheckCSRF(); $fmm->NewDir($newpath); } - //移动文件 - /*--------------- function __move(); -----------------*/ else if ($fmdo == "move") { +----------------*/ +else if ($fmdo == "move") { $fmm->MoveFile($filename, $newpath); } - //删除文件 - /*--------------- function __delfile(); -----------------*/ else if ($fmdo == "del") { +----------------*/ +else if ($fmdo == "del") { $fmm->DeleteFile($filename); } - //文件编辑 - /*--------------- function __saveEdit(); -----------------*/ else if ($fmdo == "edit") { +----------------*/ +else if ($fmdo == "edit") { CheckCSRF(); $filename = str_replace("..", "", $filename); $file = "$cfg_basedir$activepath/$filename"; @@ -96,7 +90,8 @@ else if($fmdo=="editview") //文件上传 /*--------------- function __upload(); -----------------*/ else if ($fmdo == "upload") { +----------------*/ +else if ($fmdo == "upload") { $j = 0; for ($i = 1; $i <= 50; $i++) { $upfile = "upfile".$i; @@ -117,7 +112,6 @@ function __upload(); ShowMsg("成功上传 $j 个文件到: $activepath", "file_manage_main.php?activepath=$activepath"); exit(); } - //空间检查 else if ($fmdo == "space") { if ($activepath == "") { @@ -140,4 +134,4 @@ else if ($fmdo == "space") { $win->AddMsgItem("  $totalmb M
  $totalkb KB
  $total 字节"); $winform = $win->GetWindow(""); $win->Display(); -} +} \ No newline at end of file diff --git a/src/admin/file_manage_main.php b/src/admin/file_manage_main.php index 23ff4c75..409485bf 100644 --- a/src/admin/file_manage_main.php +++ b/src/admin/file_manage_main.php @@ -11,19 +11,16 @@ require(dirname(__FILE__)."/config.php"); CheckPurview('plus_文件管理器'); if (!isset($activepath)) $activepath = $cfg_cmspath; - $inpath = ""; $activepath = str_replace("..", "", $activepath); $activepath = preg_replace("#^\/{1,}#", "/", $activepath); if ($activepath == "/") $activepath = ""; - if ($activepath == "") $inpath = $cfg_basedir; else $inpath = $cfg_basedir.$activepath; - $activeurl = $activepath; if (preg_match("#".$cfg_templets_dir."#i", $activepath)) { $istemplets = TRUE; } else { $istemplets = FALSE; } -include DedeInclude('templets/file_manage_main.htm'); +include DedeInclude('templets/file_manage_main.htm'); \ No newline at end of file diff --git a/src/admin/file_manage_view.php b/src/admin/file_manage_view.php index 252ee2b9..6cc7d405 100644 --- a/src/admin/file_manage_view.php +++ b/src/admin/file_manage_view.php @@ -16,7 +16,6 @@ $activepath = preg_replace("#^\/{1,}#", "/", $activepath); if ($activepath == "/") $activepath = ""; if ($activepath == "") $inpath = $cfg_basedir; else $inpath = $cfg_basedir.$activepath; - //显示控制层 //修改文件名 if ($fmdo == "rename") { @@ -39,7 +38,6 @@ if ($fmdo == "rename") { else if ($fmdo == "newdir") { if ($activepath == "") $activepathname = "根目录"; else $activepathname = $activepath; - $wintitle = " 文件管理"; $wecome_info = " 文件管理::新建目录 [文件浏览器]"; $win = new OxWindow(); @@ -52,7 +50,6 @@ else if ($fmdo == "newdir") { $winform = $win->GetWindow("ok"); $win->Display(); } - //移动文件 else if ($fmdo == "move") { $wintitle = " 文件管理"; @@ -69,7 +66,6 @@ else if ($fmdo == "move") { $winform = $win->GetWindow("ok"); $win->Display(); } - //删除文件 else if ($fmdo == "del") { $wintitle = " 文件管理"; @@ -89,13 +85,11 @@ else if ($fmdo == "del") { $winform = $win->GetWindow("ok"); $win->Display(); } - //编辑文件 else if ($fmdo == "edit") { if (!isset($backurl)) { $backurl = ""; } - $activepath = str_replace("..", "", $activepath); $filename = str_replace("..", "", $filename); $file = "$cfg_basedir$activepath/$filename"; @@ -164,10 +158,9 @@ else if ($fmdo == "newfile") { $ctp->LoadTemplate(DEDEADMIN."/templets/file_edit.htm"); $ctp->display(); } - //上传文件 else if ($fmdo == "upload") { $ctp = new DedeTagParse(); $ctp->LoadTemplate(DEDEADMIN."/templets/file_upload.htm"); $ctp->display(); -} +} \ No newline at end of file diff --git a/src/admin/freelist_add.php b/src/admin/freelist_add.php index 02a4219f..8ace3802 100644 --- a/src/admin/freelist_add.php +++ b/src/admin/freelist_add.php @@ -27,24 +27,21 @@ if (empty($dopost)) { if (is_array($types)) { foreach ($types as $v) $ntype .= $v.' '; } - if ($ntype != '') $atts .= " type='".trim($ntype)."' "; if (!empty($typeid)) $atts .= " typeid='$typeid' "; if (!empty($channel)) $atts .= " channel='$channel' "; if (!empty($subday)) $atts .= " subday='$subday' "; if (!empty($keywordarc)) $atts .= " keyword='$keywordarc' "; if (!empty($att)) $atts .= " att='$att' "; - $innertext = trim($innertext); if (!empty($innertext)) $innertext = stripslashes($innertext); - $listTag = "{dede:list $atts}$innertext{/dede:list}"; $listTag = addslashes($listTag); $inquery = " - INSERT INTO `#@__freelist`(`title` , `namerule` , `listdir` , `defaultpage` , `nodefault` , `templet` , `edtime`, `maxpage` , `click` , `listtag` , `keywords` , `description`) - VALUES ('$title','$namerule','$listdir','$defaultpage','$nodefault','$templet','$edtime', '$maxpage','0','$listTag','$keywords','$description'); - "; + INSERT INTO `#@__freelist`(`title` , `namerule` , `listdir` , `defaultpage` , `nodefault` , `templet` , `edtime`, `maxpage` , `click` , `listtag` , `keywords` , `description`) + VALUES ('$title','$namerule','$listdir','$defaultpage','$nodefault','$templet','$edtime', '$maxpage','0','$listTag','$keywords','$description'); + "; $dsql->ExecuteNoneQuery($inquery); ShowMsg("成功增加一个自由列表!", "freelist_main.php"); exit(); -} +} \ No newline at end of file diff --git a/src/admin/freelist_edit.php b/src/admin/freelist_edit.php index 7e818c88..83554087 100644 --- a/src/admin/freelist_edit.php +++ b/src/admin/freelist_edit.php @@ -29,28 +29,25 @@ if (empty($dopost)) { if (is_array($types)) { foreach ($types as $v) $ntype .= $v.' '; } - if ($ntype != '') $atts .= " type='".trim($ntype)."' "; if (!empty($typeid)) $atts .= " typeid='$typeid' "; if (!empty($channel)) $atts .= " channel='$channel' "; if (!empty($subday)) $atts .= " subday='$subday' "; if (!empty($keywordarc)) $atts .= " keyword='$keywordarc' "; if (!empty($att)) $atts .= " att='$att' "; - $innertext = trim($innertext); if (!empty($innertext)) $innertext = stripslashes($innertext); - $listTag = "{dede:list $atts}$innertext{/dede:list}"; $listTag = addslashes($listTag); $inquery = " - UPDATE `#@__freelist` set - title='$title', namerule='$namerule', - listdir='$listdir', defaultpage='$defaultpage', - nodefault='$nodefault', templet='$templet', - edtime='$edtime', `maxpage`='$maxpage', listtag='$listTag', keywords='$keywords', - description='$description' WHERE aid='$aid'; - "; + UPDATE `#@__freelist` set + title='$title', namerule='$namerule', + listdir='$listdir', defaultpage='$defaultpage', + nodefault='$nodefault', templet='$templet', + edtime='$edtime', `maxpage`='$maxpage', listtag='$listTag', keywords='$keywords', + description='$description' WHERE aid='$aid'; + "; $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功修改一个自由列表!", "freelist_main.php"); + ShowMsg("成功修改一个自由列表", "freelist_main.php"); exit(); -} +} \ No newline at end of file diff --git a/src/admin/freelist_main.php b/src/admin/freelist_main.php index 01151261..0b0bb3b9 100644 --- a/src/admin/freelist_main.php +++ b/src/admin/freelist_main.php @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_FreeList'); require_once DEDEINC.'/channelunit.func.php'; setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/"); - if(empty($pagesize)) $pagesize = 18; if(empty($pageno)) $pageno = 1; if(empty($dopost)) $dopost = ''; @@ -22,12 +21,10 @@ if(empty($keyword)) $keyword = ''; $addget = ''; $addsql = ''; -} else -{ +} else { $addget = '&keyword='.urlencode($keyword); $addsql = " where title like '%$keyword%' "; } - //重载列表 if($dopost=='getlist') { @@ -35,7 +32,6 @@ if($dopost=='getlist') GetTagList($dsql,$pageno,$pagesize,$orderby); exit(); } - //删除字段 else if($dopost=='del') { @@ -45,7 +41,6 @@ else if($dopost=='del') GetTagList($dsql,$pageno,$pagesize,$orderby); exit(); } - //第一次进入这个页面 if($dopost=='') { @@ -53,7 +48,6 @@ if($dopost=='') $totalRow = $row['dd']; include(DEDEADMIN."/templets/freelist_main.htm"); } - /** * 获得特定的Tag列表 * @@ -81,8 +75,7 @@ function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') while($row = $dsql->GetArray()) { $listurl = GetFreeListUrl($row['aid'],$row['namerule'],$row['listdir'],$row['defaultpage'],$row['nodefault']); - $line = " - + $line = " {$row['aid']} {$row['title']} {$row['templet']} @@ -96,4 +89,4 @@ function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') echo $line; } echo "\r\n"; -} +} \ No newline at end of file diff --git a/src/admin/friendlink_add.php b/src/admin/friendlink_add.php index dfdb8910..2a60c689 100644 --- a/src/admin/friendlink_add.php +++ b/src/admin/friendlink_add.php @@ -32,15 +32,13 @@ if ($dopost == "add") { } else { $imgurl = $logo; } - //强制检测用户友情链接分类是否数据结构不符 if (empty($typeid) || preg_match("#[^0-9]#", $typeid)) { $typeid = 0; $dsql->ExecuteNoneQuery("ALTER TABLE `#@__flinktype` CHANGE `ID` `id` MEDIUMINT( 8 ) UNSIGNED DEFAULT NULL AUTO_INCREMENT; "); } - $query = "INSERT INTO `#@__flink`(sortrank,url,webname,logo,msg,email,typeid,dtime,ischeck) - VALUES('$sortrank','$url','$webname','$imgurl','$msg','$email','$typeid','$dtime','$ischeck'); "; + VALUES('$sortrank','$url','$webname','$imgurl','$msg','$email','$typeid','$dtime','$ischeck'); "; $rs = $dsql->ExecuteNoneQuery($query); $burl = empty($_COOKIE['ENV_GOBACK_URL']) ? "friendlink_main.php" : $_COOKIE['ENV_GOBACK_URL']; if ($rs) { @@ -51,4 +49,4 @@ if ($dopost == "add") { exit(); } } -include DedeInclude('templets/friendlink_add.htm'); +include DedeInclude('templets/friendlink_add.htm'); \ No newline at end of file diff --git a/src/admin/friendlink_edit.php b/src/admin/friendlink_edit.php index d256fc00..40cd74b1 100644 --- a/src/admin/friendlink_edit.php +++ b/src/admin/friendlink_edit.php @@ -56,12 +56,10 @@ if ($dopost == "delete") { $email = $request->Item('email', ''); $typeid = $request->Item('typeid', 0); $ischeck = $request->Item('ischeck', 0); - - $query = "UPDATE `#@__flink` SET sortrank='$sortrank',url='$url',webname='$webname',logo='$logo',msg='$msg', - email='$email',typeid='$typeid',ischeck='$ischeck' WHERE id='$id' "; + $query = "UPDATE `#@__flink` SET sortrank='$sortrank',url='$url',webname='$webname',logo='$logo',msg='$msg', email='$email',typeid='$typeid',ischeck='$ischeck' WHERE id='$id' "; $dsql->ExecuteNoneQuery($query); ShowMsg("成功修改一个链接", $ENV_GOBACK_URL); exit(); } $myLink = $dsql->GetOne("SELECT #@__flink.*,#@__flinktype.typename FROM #@__flink LEFT JOIN #@__flinktype ON #@__flink.typeid=#@__flinktype.id WHERE #@__flink.id=$id"); -include DedeInclude('templets/friendlink_edit.htm'); +include DedeInclude('templets/friendlink_edit.htm'); \ No newline at end of file diff --git a/src/admin/friendlink_main.php b/src/admin/friendlink_main.php index 76b6ebaa..acd9ff6e 100644 --- a/src/admin/friendlink_main.php +++ b/src/admin/friendlink_main.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__).'/config.php'); require_once(DEDEINC.'/datalistcp.class.php'); setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); - if (empty($keyword)) $keyword = ''; if (empty($ischeck)) { $ischeck = 0; @@ -20,27 +19,22 @@ if (empty($ischeck)) { if ($ischeck == -1) $ischeckSql = " And ischeck < 1 "; else $ischeckSql = " And ischeck='$ischeck' "; } - $selCheckArr = array(0 => '不限类型', -1 => '未审核', 1 => '内页', 2 => '首页'); - $sql = "SELECT * FROM `#@__flink` WHERE CONCAT(`url`,`webname`,`email`) LIKE '%$keyword%' $ischeckSql ORDER BY dtime desc"; - $dlist = new DataListCP(); $dlist->SetParameter('keyword', $keyword); $dlist->SetParameter('ischeck', $ischeck); $dlist->SetTemplet(DEDEADMIN.'/templets/friendlink_main.htm'); $dlist->SetSource($sql); $dlist->display(); - function GetPic($pic) { if ($pic == '') return '无图标'; else return ""; } - function GetSta($sta) { if ($sta == 1) return '内页'; if ($sta == 2) return '首页'; else return '未审核'; -} +} \ No newline at end of file diff --git a/src/admin/friendlink_type.php b/src/admin/friendlink_type.php index 721f834b..02bbd9a5 100644 --- a/src/admin/friendlink_type.php +++ b/src/admin/friendlink_type.php @@ -10,7 +10,6 @@ */ require_once(dirname(__FILE__)."/config.php"); if (empty($dopost)) $dopost = ''; - //保存修改 if ($dopost == "save") { $startID = 1; @@ -37,5 +36,4 @@ if ($dopost == "save") { header("Content-Type: text/html; charset={$cfg_soft_lang}"); echo ""; } - -include DedeInclude('templets/friendlink_type.htm'); +include DedeInclude('templets/friendlink_type.htm'); \ No newline at end of file diff --git a/src/admin/inc/inc_batchup.php b/src/admin/inc/inc_batchup.php index 78b65ad7..5c4a7333 100644 --- a/src/admin/inc/inc_batchup.php +++ b/src/admin/inc/inc_batchup.php @@ -22,33 +22,28 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) global $dsql, $cfg_cookie_encode, $cfg_multi_site, $cfg_medias_dir; global $cuserLogin, $cfg_upload_switch, $cfg_delete, $cfg_basedir; global $admin_catalogs, $cfg_admin_channel; - if ($cfg_delete == 'N') $type = 'OK'; if (empty($aid)) return; $aid = preg_replace("#[^0-9]#i", '', $aid); $arctitle = $arcurl = ''; if ($recycle == 1) $whererecycle = "AND arcrank = '-2'"; else $whererecycle = ""; - //查询表信息 $query = "SELECT ch.maintable,ch.addtable,ch.nid,ch.issystem FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel WHERE arc.id='$aid' "; + LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel WHERE arc.id='$aid' "; $row = $dsql->GetOne($query); $nid = $row['nid']; $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); $addtable = trim($row['addtable']); $issystem = $row['issystem']; - //查询档案信息 if ($issystem == -1) { $arcQuery = "SELECT arc.*,tp.* from `$addtable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.aid='$aid' "; } else { $arcQuery = "SELECT arc.*,tp.*,arc.id AS aid FROM `$maintable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.id='$aid' "; } - $arcRow = $dsql->GetOne($arcQuery); - //检测权限 if (!TestPurview('a_Del,sys_ArcBatch')) { if (TestPurview('a_AccDel')) { @@ -63,11 +58,9 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) return FALSE; } } - //$issystem==-1 是单表模型,不使用回收站 if ($issystem == -1) $type = 'OK'; if (!is_array($arcRow)) return FALSE; - /** 删除到回收站 **/ if ($cfg_delete == 'Y' && $type == 'ON') { $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='-2' WHERE id='$aid' "); @@ -104,17 +97,14 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) $filenameh = DEDEDATA."/textdata/".(ceil($aid / 5000))."/{$aid}-".substr(md5($cfg_cookie_encode), 0, 16).".txt"; if (@is_file($filenameh)) @unlink($filenameh); } - if (empty($arcRow['money'])) $arcRow['money'] = 0; if (empty($arcRow['ismake'])) $arcRow['ismake'] = 1; if (empty($arcRow['arcrank'])) $arcRow['arcrank'] = 0; if (empty($arcRow['filename'])) $arcRow['filename'] = ''; - //删除HTML if ($arcRow['ismake'] == -1 || $arcRow['arcrank'] != 0 || $arcRow['typeid'] == 0 || $arcRow['money'] > 0) { return TRUE; } - //强制转换非多站点模式,以便统一方式获得实际HTML文件 $GLOBALS['cfg_multi_site'] = 'N'; $arcurl = GetFileUrl( @@ -143,13 +133,11 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) } } } - return true; } - //获取真实路径 function GetTruePath($siterefer = '', $sitepath = '') { $truepath = $GLOBALS['cfg_basedir']; return $truepath; -} +} \ No newline at end of file diff --git a/src/admin/inc/inc_coonepage.php b/src/admin/inc/inc_coonepage.php index a57e068a..d3949630 100644 --- a/src/admin/inc/inc_coonepage.php +++ b/src/admin/inc/inc_coonepage.php @@ -9,7 +9,6 @@ * @link https://www.dedebiz.com */ require_once(DEDEINC.'/charset.func.php'); - /** * 获取一个页面 * @@ -47,28 +46,24 @@ function CoOnePage($gurl) $body = utf82gb($body); } } - //获取标题 $inarr = array(); preg_match("/(.*)<\/title>/isU", $body, $inarr); if (isset($inarr[1])) { $redatas['title'] = $inarr[1]; } - //获取关键词 $inarr = array(); preg_match("/<meta[\s]+name=['\"]keywords['\"] content=['\"](.*)['\"]/isU", $body, $inarr); if (isset($inarr[1])) { $redatas['keywords'] = cn_substr(html2text($inarr[1]), 30); } - //获取摘要 $inarr = array(); preg_match("/<meta[\s]+name=['\"]description['\"] content=['\"](.*)['\"]/isU", $body, $inarr); if (isset($inarr[1])) { $redatas['description'] = cn_substr(html2text($inarr[1]), $cfg_auot_description); } - //获取内容 if ($s != '' && $e != '') { $redatas['body'] = GetHtmlAreaA($s, $e, $body); @@ -79,7 +74,6 @@ function CoOnePage($gurl) } return $redatas; } - /** * 获取特定区域的HTML * @@ -104,4 +98,4 @@ function GetHtmlAreaA($s, $e, &$html) } else { return ''; } -} +} \ No newline at end of file diff --git a/src/admin/inc/inc_menu_func.php b/src/admin/inc/inc_menu_func.php index aaaf052d..3bd76340 100644 --- a/src/admin/inc/inc_menu_func.php +++ b/src/admin/inc/inc_menu_func.php @@ -10,15 +10,11 @@ */ require_once(dirname(__FILE__)."/../config.php"); require_once(DEDEINC."/dedetag.class.php"); - $headTemplet = "<dl class='bitem' id='sunitems~cc~'><dt onClick='showHide(\"items~cc~\")'><b>~channelname~</b></dt> <dd style='display:~display~' class='sitem' id='items~cc~'> <ul class='sitemu'>\r\n"; - $footTemplet = "</ul>\r\n</dd>\r\n</dl>\r\n"; - $itemTemplet = "<li>~link~</li>\r\n"; - function GetMenus($userrank, $topos = 'main') { global $openitem, $headTemplet, $footTemplet, $itemTemplet; @@ -69,7 +65,6 @@ function GetMenus($userrank, $topos = 'main') } else { $addico = 'images/gtk-sadd.png'; } - //an add icos , small items use att ischannel='1' addico='ico' addalt='msg' linkadd='' $link = " <div class='items'> <div class='fllct'>$link</div>\r\n @@ -88,5 +83,4 @@ function GetMenus($userrank, $topos = 'main') echo "<!-- Item ".($m + 1)." End -->\r\n"; } } -} -//End Function \ No newline at end of file +}//End Function \ No newline at end of file diff --git a/src/admin/index_menu.php b/src/admin/index_menu.php index 6cf3d008..79e16b9c 100644 --- a/src/admin/index_menu.php +++ b/src/admin/index_menu.php @@ -12,4 +12,4 @@ require(dirname(__FILE__).'/config.php'); require(DEDEADMIN.'/inc/inc_menu.php'); require(DEDEADMIN.'/inc/inc_menu_func.php'); $openitem = (empty($openitem) ? 1 : $openitem); -include DedeInclude('templets/index_menu2.htm'); +include DedeInclude('templets/index_menu2.htm'); \ No newline at end of file diff --git a/src/admin/index_menu_load.php b/src/admin/index_menu_load.php index ee98a49b..7da60368 100644 --- a/src/admin/index_menu_load.php +++ b/src/admin/index_menu_load.php @@ -21,4 +21,4 @@ if ($openitem != 100) { require(DEDEADMIN.'/inc/inc_menu_func.php'); GetMenus($cuserLogin->getUserRank(), 'module'); exit(); -} +} \ No newline at end of file diff --git a/src/admin/index_menu_module.php b/src/admin/index_menu_module.php index 7c04d31f..7bf7d354 100644 --- a/src/admin/index_menu_module.php +++ b/src/admin/index_menu_module.php @@ -13,7 +13,6 @@ if ($cuserLogin->adminStyle != 'dedecms') { header("location:index_menu.php?openitem=100"); exit(); } - require(DEDEADMIN.'/inc/inc_menu_module.php'); require(DEDEADMIN.'/inc/inc_menu_func.php'); ?> @@ -33,7 +32,6 @@ require(DEDEADMIN.'/inc/inc_menu_func.php'); } </script> <base target="main"> - <body leftmargin="0" topmargin="0" target="main"> <table width='100%' height="100%" border='0' cellspacing='0' cellpadding='0'> <tr> @@ -50,5 +48,4 @@ require(DEDEADMIN.'/inc/inc_menu_func.php'); </tr> </table> </body> - </html> \ No newline at end of file diff --git a/src/admin/index_top.php b/src/admin/index_top.php index e51bedd1..b3c937ad 100644 --- a/src/admin/index_top.php +++ b/src/admin/index_top.php @@ -13,4 +13,4 @@ if ($cuserLogin->adminStyle == 'dedecms') { include DedeInclude('templets/index_top1.htm'); } else { include DedeInclude('templets/index_top2.htm'); -} +} \ No newline at end of file diff --git a/src/admin/log_edit.php b/src/admin/log_edit.php index 63cfbe6f..5075b8de 100644 --- a/src/admin/log_edit.php +++ b/src/admin/log_edit.php @@ -14,7 +14,6 @@ if (empty($dopost)) { ShowMsg("您没指定任何参数", "javascript:;"); exit(); } - //清空所有日志 if ($dopost == "clear") { $dsql->ExecuteNoneQuery("DELETE FROM #@__log"); @@ -38,4 +37,4 @@ if ($dopost == "clear") { } else { ShowMsg("无法识别您的请求", "javascript:;"); exit(); -} +} \ No newline at end of file diff --git a/src/admin/log_list.php b/src/admin/log_list.php index 2a15e2d9..0868204a 100644 --- a/src/admin/log_list.php +++ b/src/admin/log_list.php @@ -14,13 +14,11 @@ require_once(DEDEINC."/datalistcp.class.php"); require_once(DEDEINC."/common.func.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $sql = $where = ""; - if (empty($adminid)) $adminid = 0; if (empty($cip)) $cip = ""; if (empty($dtime)) $dtime = 0; if ($adminid > 0) $where .= " AND #@__log.adminid='$adminid' "; if ($cip != "") $where .= " AND #@__log.cip LIKE '%$cip%' "; - if ($dtime > 0) { $nowtime = time(); $starttime = $nowtime - ($dtime * 24 * 3600); @@ -42,4 +40,4 @@ $dlist->SetParameter("cip", $cip); $dlist->SetParameter("dtime", $dtime); $dlist->SetTemplate(DEDEADMIN."/templets/log_list.htm"); $dlist->SetSource($sql); -$dlist->Display(); +$dlist->Display(); \ No newline at end of file diff --git a/src/admin/makehtml_all.php b/src/admin/makehtml_all.php index 2525ea33..9191d9b4 100644 --- a/src/admin/makehtml_all.php +++ b/src/admin/makehtml_all.php @@ -33,7 +33,8 @@ if ($action == '') { //更新文档 /*------------------- function _2_MakeArchives() - ---------------------*/ else if ($step == 2) { + ---------------------*/ +else if ($step == 2) { include_once(DEDEADMIN."/makehtml_archives_action.php"); exit(); } @@ -62,7 +63,8 @@ if ($action == '') { //更新栏目 /*------------------- function _4_MakeCatalog() - --------------------*/ else if ($step == 4) { + --------------------*/ +else if ($step == 4) { $mkvalue = intval($mkvalue); $typeidsok = $typeids = array(); $adminID = $cuserLogin->getUserID(); @@ -118,7 +120,8 @@ if ($action == '') { //成功状态 /*------------------- function _10_MakeAllOK() - --------------------*/ else if ($step == 10) { + --------------------*/ +else if ($step == 10) { $adminID = $cuserLogin->getUserID(); $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; @unlink($mkcachefile); diff --git a/src/admin/makehtml_archives_action.php b/src/admin/makehtml_archives_action.php index 0fff0c3b..21962657 100644 --- a/src/admin/makehtml_archives_action.php +++ b/src/admin/makehtml_archives_action.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); require_once(DEDEINC."/arc.archives.class.php"); - $est1 = ExecTime(); $startid = (empty($startid) ? -1 : $startid); $endid = (empty($endid) ? 0 : $endid); diff --git a/src/admin/mda_main.php b/src/admin/mda_main.php index 19f104e5..f3cfc7aa 100644 --- a/src/admin/mda_main.php +++ b/src/admin/mda_main.php @@ -139,7 +139,8 @@ EOT; } /*-------------------------------- function __clearcache(){ } --------------------------------*/ else if ($dopost == 'clearcache') { +-------------------------------*/ +else if ($dopost == 'clearcache') { if (!is_dir(DEDEDATA."/cache/mda/") or RmRecurse(DEDEDATA."/cache/mda/")) { ShowMsg("成功清除缓存信息", -1); exit(); @@ -150,7 +151,8 @@ function __clearcache(){ } } /*-------------------------------- function __bind_user(){ } --------------------------------*/ else if ($dopost == 'bind_user') { +-------------------------------*/ +else if ($dopost == 'bind_user') { $email = isset($email) ? $email : ''; $pwd = isset($pwd) ? $pwd : ''; $domain = isset($domain) ? $domain : ''; @@ -190,7 +192,8 @@ EOT; } /*-------------------------------- function __login(){ } --------------------------------*/ else if ($dopost == 'login') { +-------------------------------*/ +else if ($dopost == 'login') { $email = mda_get_setting('email'); $channel_uuid = mda_get_setting('channel_uuid'); $channel_secret = mda_get_setting('channel_secret'); @@ -238,7 +241,8 @@ EOT; } /*-------------------------------- function __main(){ } --------------------------------*/ else if ($dopost == 'main') { +-------------------------------*/ +else if ($dopost == 'main') { $mda_version = MDA_VER; $channel_uuid = mda_get_setting('channel_uuid'); $channel_secret = mda_get_setting('channel_secret'); @@ -338,7 +342,8 @@ EOT; //------------------------------------------------------------------------ /*-------------------------------- function __index(){ } --------------------------------*/ else { +-------------------------------*/ +else { if (mda_get_setting('email') and mda_get_setting('channel_uuid') and mda_get_setting('channel_secret') and empty($logout)) { header('Location:?dopost=login'); exit; diff --git a/src/admin/media_edit.php b/src/admin/media_edit.php index 2975e0c0..4a3c2899 100644 --- a/src/admin/media_edit.php +++ b/src/admin/media_edit.php @@ -69,7 +69,8 @@ if ($dopost == 'del') { } /*-------------------------------- function __save_edit() //保存修改 ------------------------------------*/ else if ($dopost == 'save') { +-----------------------------------*/ +else if ($dopost == 'save') { if ($aid == "") exit(); CheckCSRF(); //检查是否有修改权限 diff --git a/src/admin/member_do.php b/src/admin/member_do.php index 222c3cda..02af5d15 100644 --- a/src/admin/member_do.php +++ b/src/admin/member_do.php @@ -128,7 +128,8 @@ if ($dopost == "delmember") { /*---------------- function __Recommend() 推荐会员 -----------------*/ else if ($dopost == "recommend") { +----------------*/ +else if ($dopost == "recommend") { CheckPurview('member_Edit'); $id = preg_replace("#[^0-9]#", "", $id); if ($matt == 0) { @@ -144,7 +145,8 @@ function __Recommend() /*---------------- function __EditUser() 修改会员 -----------------*/ else if ($dopost == 'edituser') { +----------------*/ +else if ($dopost == 'edituser') { CheckPurview('member_Edit'); if (!isset($_POST['id'])) exit('dedebiz'); $pwdsql = empty($pwd) ? '' : ",pwd='".md5($pwd)."'"; @@ -191,7 +193,8 @@ function __EditUser() /*-------------- function __LoginCP() 登录会员的控制面板 -----------*/ else if ($dopost == "memberlogin") { +----------*/ +else if ($dopost == "memberlogin") { CheckPurview('member_Edit'); PutCookie('DedeUserID', $id, 1800); PutCookie('DedeLoginTime', time(), 1800); diff --git a/src/admin/member_type.php b/src/admin/member_type.php index 5a9fa6ad..c445820e 100644 --- a/src/admin/member_type.php +++ b/src/admin/member_type.php @@ -41,7 +41,7 @@ if ($dopost == "save") { $dsql->ExecuteNoneQuery($query); } header("Content-Type: text/html; charset={$cfg_soft_lang}"); - echo "<script> alert('成功更新会员产品分类表!'); </script>"; + echo "<script> alert('成功更新会员产品分类表'); </script>"; } $arcranks = array(); $dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>10 "); diff --git a/src/admin/module_make.php b/src/admin/module_make.php index 045d30fc..39b52142 100644 --- a/src/admin/module_make.php +++ b/src/admin/module_make.php @@ -22,7 +22,8 @@ if ($action == '') { /*------------- //生成项目 function Makemodule() ---------------*/ else if ($action == 'make') { +--------------*/ +else if ($action == 'make') { require_once(DEDEINC.'/dedehttpdown.class.php'); //校验私钥,确定开发者身份 @@ -187,7 +188,8 @@ $filelist /*------------- //修改项目 function editModule() ---------------*/ else if ($action == 'edit') { +--------------*/ +else if ($action == 'edit') { $filelist = str_replace("\r", "\n", trim($filelist)); $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); if ($filelist == "") { diff --git a/src/admin/mychannel_edit.php b/src/admin/mychannel_edit.php index ebbab012..bd8511ec 100644 --- a/src/admin/mychannel_edit.php +++ b/src/admin/mychannel_edit.php @@ -30,7 +30,8 @@ if ($dopost == "show") { } /*---------------- function __CopyStart() ------------------*/ else if ($dopost == "copystart") { +-----------------*/ +else if ($dopost == "copystart") { if ($id == -1) { ShowMsg("专题模型不支持复制", "-1"); exit(); @@ -95,7 +96,8 @@ function __CopyStart() } /*---------------- function __Export() ------------------*/ else if ($dopost == "export") { +-----------------*/ +else if ($dopost == "export") { if ($id == -1) { ShowMsg("专题模型不支持导出", "-1"); exit(); @@ -119,7 +121,8 @@ function __Export() } /*---------------- function __ExportIn() ------------------*/ else if ($dopost == "exportin") { +-----------------*/ +else if ($dopost == "exportin") { $wintitle = "导入内容模型规则"; $wecome_info = "<a href='mychannel_main.php'>内容模型管理</a>::导入内容模型规则"; $win = new OxWindow(); @@ -133,7 +136,8 @@ function __ExportIn() } /*---------------- function __ExportInOk() ------------------*/ else if ($dopost == "exportinok") { +-----------------*/ +else if ($dopost == "exportinok") { require_once(DEDEADMIN."/inc/inc_admin_channel.php"); function GotoStaMsg($msg) { @@ -260,7 +264,8 @@ function __ExportInOk() } /*---------------- function __SaveCopy() ------------------*/ else if ($dopost == "copysave") { +-----------------*/ +else if ($dopost == "copysave") { $cid = intval($cid); $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$cid' ", MYSQL_ASSOC); foreach ($row as $k => $v) { @@ -300,7 +305,8 @@ function __SaveCopy() } /*------------ function __SaveEdit() -------------*/ else if ($dopost == "save") { +------------*/ +else if ($dopost == "save") { $fieldset = preg_replace("#[\r\n]{1,}#", "\r\n", $fieldset); $usertype = empty($usertype) ? '' : $usertype; @@ -345,7 +351,8 @@ function __SaveEdit() } /*-------------------- function __GetTemplate() ---------------------*/ else if ($dopost == "gettemplets") { +--------------------*/ +else if ($dopost == "gettemplets") { require_once(DEDEINC."/oxwindow.class.php"); $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); $wintitle = " 频道管理-查看模板"; @@ -370,7 +377,8 @@ function __GetTemplate() } /*-------------------- function __Delete() ---------------------*/ else if ($dopost == "delete") { +--------------------*/ +else if ($dopost == "delete") { CheckPurview('c_Del'); $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); if ($row['issystem'] == 1) { @@ -443,7 +451,8 @@ function __Delete() } //del /*---------------- function __modifysearch() ------------------*/ else if ($dopost == 'modifysearch') { +-----------------*/ +else if ($dopost == 'modifysearch') { if (!isset($step)) $step = 0; if (empty($step)) { $step = 1; diff --git a/src/admin/mychannel_field_edit.php b/src/admin/mychannel_field_edit.php index d36c549e..2228f690 100644 --- a/src/admin/mychannel_field_edit.php +++ b/src/admin/mychannel_field_edit.php @@ -126,7 +126,8 @@ if ($action == 'save') { /*------------------ 删除字段 function _DELETE() --------------------*/ else if ($action == "delete") { +-------------------*/ +else if ($action == "delete") { if ($row['issystem'] == 1) { ShowMsg("对不起,系统模型的字段不允许删除", "-1"); exit(); diff --git a/src/admin/plus_main.php b/src/admin/plus_main.php index a3e08d24..b1dbcde9 100644 --- a/src/admin/plus_main.php +++ b/src/admin/plus_main.php @@ -12,13 +12,11 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_plus'); require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); - $sql = "SELECT aid,plusname,writer,isshow FROM `#@__plus` ORDER BY aid ASC"; $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN."/templets/plus_main.htm"); $dlist->SetSource($sql); $dlist->display(); - function GetSta($sta, $id, $title) { if ($sta == 1) { @@ -26,4 +24,4 @@ function GetSta($sta, $id, $title) } else { return "   <a href='plus_edit.php?aid=$id'>修改</a>   禁用 > <a href='plus_edit.php?dopost=show&aid=$id'>启用</a>   <a href='plus_edit.php?dopost=delete&aid=$id&title=".urlencode($title)."'>册除</a>"; } -} +} \ No newline at end of file diff --git a/src/admin/shops_operations_userinfo.php b/src/admin/shops_operations_userinfo.php index 59af65c8..3747191c 100644 --- a/src/admin/shops_operations_userinfo.php +++ b/src/admin/shops_operations_userinfo.php @@ -11,15 +11,13 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('shops_Operations'); if (!isset($oid)) exit("<a href='javascript:window.close()'>无效操作!</a>"); -$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); +$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); if (empty($oid)) exit("<a href='javascript:window.close()'>无效订单号!</a>"); - $rows = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid' LIMIT 0,1"); if (!is_array($rows)) { $dsql->Close(); exit("<a href='javascript:window.close()'>该订单下没相关用户信息!</a>"); } - $row = $dsql->GetOne("SELECT pid,dprice FROM `#@__shops_orders` WHERE oid='$oid'"); if (is_array($row)) { $rs = $dsql->GetOne("SELECT dname FROM `#@__shops_delivery` WHERE pid='$row[pid]'"); @@ -28,4 +26,4 @@ if (is_array($row)) { } $rows['des'] = stripslashes($rows['des']); include DEDEADMIN."/templets/shops_operations_userinfo.htm"; -unset($rows); +unset($rows); \ No newline at end of file diff --git a/src/admin/stepselect_main.php b/src/admin/stepselect_main.php index c04c5c4e..146f55be 100644 --- a/src/admin/stepselect_main.php +++ b/src/admin/stepselect_main.php @@ -62,7 +62,8 @@ if (empty($action)) { /*----------------- 删除类型或枚举值 function __del() { } -------------------*/ else if ($action == 'del') { +------------------*/ +else if ($action == 'del') { $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE id='$id' "); if (!is_array($arr)) { ShowMsg("无法获取分类信息,不允许后续操作", "stepselect_main.php?".ExecTime()); @@ -108,7 +109,8 @@ function __del() { } /*----------------- 保存类型修改 function __edit_save() { } -------------------*/ else if ($action == 'edit_save') { +------------------*/ +else if ($action == 'edit_save') { if (preg_match("#[^0-9a-z_-]#i", $egroup)) { ShowMsg("组名称不能有全角字符或特殊符号", "-1"); exit(); @@ -120,7 +122,8 @@ function __edit_save() { } /*----------------- 保存新类型 function __addnew_save() { } -------------------*/ else if ($action == 'addnew_save') { +------------------*/ +else if ($action == 'addnew_save') { if (preg_match("#[^0-9a-z_-]#i", $egroup)) { ShowMsg("组名称不能有全角字符或特殊符号", "-1"); exit(); @@ -138,7 +141,8 @@ function __addnew_save() { } /*--------- 把旧版全国省市表替换当前地区数据 function __exarea() { } -----------*/ else if ($action == 'exarea') { +----------*/ +else if ($action == 'exarea') { $bigtypes = array(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='nativeplace'; "); $query = "SELECT * FROM `#@__area` WHERE reid =0 order by id asc"; @@ -177,7 +181,8 @@ function __addenum_save() { } 新增二级枚举下添加"-N"自己类别选择,例如: 1001二级枚举下面的3级类目,则为1001-1,1001-2... 这时候需要issign=2 ----------------------*/ else if ($action == 'addenum_save') { +---------------------*/ +else if ($action == 'addenum_save') { if (empty($ename) || empty($egroup)) { Showmsg("类别名称或组名称不能为空", "-1"); exit(); @@ -243,7 +248,8 @@ function __addenum_save() { } /*----------------- 修改枚举名称和排序 function __upenum() { } -------------------*/ else if ($action == 'upenum') { +------------------*/ +else if ($action == 'upenum') { $ename = trim(preg_replace("# └─(─){1,}#", '', $ename)); $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$aid' "); WriteEnumsCache($row['egroup']); @@ -254,7 +260,8 @@ function __upenum() { } /*----------------- 更新枚举缓存 function __upallcache() { } -------------------*/ else if ($action == 'upallcache') { +------------------*/ +else if ($action == 'upallcache') { if (!isset($egroup)) $egroup = ''; WriteEnumsCache($egroup); ShowMsg("成更新枚举缓存", $ENV_GOBACK_URL); diff --git a/src/admin/sys_data_replace.php b/src/admin/sys_data_replace.php index 09432b7c..ba18c84f 100644 --- a/src/admin/sys_data_replace.php +++ b/src/admin/sys_data_replace.php @@ -19,7 +19,8 @@ if (empty($action)) { /*------------------------------- //列出数据库表里的字段 function __getfields() ---------------------------------*/ else if ($action == 'getfields') { +--------------------------------*/ +else if ($action == 'getfields') { AjaxHead(); $dsql->GetTableFields($exptable); echo "<div style='border:1px solid #ababab;background-color:#FEFFF0;margin-top:6px;padding:3px;line-height:160%'>"; @@ -33,7 +34,8 @@ function __getfields() /*------------------------------- //保存用户设置,清空会员数据 function __Apply() ---------------------------------*/ else if ($action == 'apply') { +--------------------------------*/ +else if ($action == 'apply') { $validate = empty($validate) ? '' : strtolower($validate); $svali = GetCkVdValue(); if ($validate == "" || $validate != $svali) { diff --git a/src/admin/sys_group_edit.php b/src/admin/sys_group_edit.php index 09f99515..1fa8f760 100644 --- a/src/admin/sys_group_edit.php +++ b/src/admin/sys_group_edit.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Group'); if (empty($dopost)) $dopost = ""; - if ($dopost == 'save') { if ($rank == 10) { ShowMsg('超级管理员的权限不允许修改!', 'sys_group.php'); @@ -36,10 +35,9 @@ $groupRanks = array(); $groupSet = $dsql->GetOne("SELECT * FROM `#@__admintype` WHERE CONCAT(`rank`)='{$rank}' "); $groupRanks = explode(' ', $groupSet['purviews']); include DedeInclude('templets/sys_group_edit.htm'); - //检查是否已经有此权限 function CRank($n) { global $groupRanks; return in_array($n, $groupRanks) ? ' checked' : ''; -} +} \ No newline at end of file diff --git a/src/admin/sys_payment.php b/src/admin/sys_payment.php index 539fe125..a78a0476 100644 --- a/src/admin/sys_payment.php +++ b/src/admin/sys_payment.php @@ -180,7 +180,7 @@ if ($dopost == 'install') { //配置支付接口 else if ($dopost == 'config') { if ($pay_name == "" || $pay_desc == "" || $pay_fee == "") { - ShowMsg("您有未填写的项目!", "-1"); + ShowMsg("您有未填写的项目", "-1"); exit(); } $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); @@ -199,7 +199,7 @@ else if ($dopost == 'config') { $configstr = "<"."?php\r\n".$payment."\r\n?".">\r\n"; if (!empty($payment)) { $m_file = DEDEDATA."/payment/".$row['code'].".php"; - $fp = fopen($m_file, "w") or die("写入文件 $safeconfigfile 失败,请检查权限!"); + $fp = fopen($m_file, "w") or die("写入文件 $safeconfigfile 失败,请检查权限"); fwrite($fp, $configstr); fclose($fp); } @@ -214,7 +214,7 @@ else if ($dopost == 'config') { $query = "UPDATE `#@__payment` SET name = '$pay_name',fee='$pay_fee',description='$pay_desc',config='$config',enabled='1' WHERE id='$pid'"; $dsql->ExecuteNoneQuery($query); if ($pm == 'edit') $msg = "保存修改成功"; - else $msg = "安装成功!"; + else $msg = "安装成功"; ShowMsg($msg, "sys_payment.php"); exit(); } @@ -240,7 +240,7 @@ else if ($dopost == 'uninstall') { //同时需要删除对应的缓存 $m_file = DEDEDATA."/payment/".$row['code'].".php"; @unlink($m_file); - ShowMsg("删除成功!", "sys_payment.php"); + ShowMsg("删除成功", "sys_payment.php"); exit(); } $sql = "SELECT * FROM `#@__payment` ORDER BY `rank` ASC"; diff --git a/src/admin/sys_repair.php b/src/admin/sys_repair.php index 966d38bf..de7e9046 100644 --- a/src/admin/sys_repair.php +++ b/src/admin/sys_repair.php @@ -46,7 +46,8 @@ if (empty($dopost)) { /*------------------- 数据结构常规检测 function 1_test_db() { } ---------------------*/ else if ($dopost == 1) { +--------------------*/ +else if ($dopost == 1) { $win = new OxWindow(); $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); $win->mainTitle = "系统修复工具"; @@ -78,7 +79,8 @@ function 1_test_db() { } /*------------------- 检测微表正确性并尝试修复 function 2_test_arctiny() { } ---------------------*/ else if ($dopost == 2) { +--------------------*/ +else if ($dopost == 2) { $msg = ''; $allarcnum = 0; @@ -156,7 +158,8 @@ function 2_test_arctiny() { } /*------------------- 高级方式修复微表(会删除不合法主键的内容) function 3_re_arctiny() { } ---------------------*/ else if ($dopost == 3) { +--------------------*/ +else if ($dopost == 3) { $errnum = 0; $sql = " TRUNCATE TABLE `#@__arctiny`"; $dsql->ExecuteNoneQuery($sql); diff --git a/src/admin/tags_main.php b/src/admin/tags_main.php index 74287b2c..e8338d8f 100644 --- a/src/admin/tags_main.php +++ b/src/admin/tags_main.php @@ -13,7 +13,6 @@ CheckPurview('sys_Keyword'); require_once(DEDEINC.'/datalistcp.class.php'); $timestamp = time(); if (empty($tag)) $tag = ''; - if (empty($action)) { $orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z]#i", '', $orderby); $orderway = isset($orderway) && $orderway == 'asc' ? 'asc' : 'desc'; @@ -35,7 +34,8 @@ if (empty($action)) { } /* function update() -*/ else if ($action == 'update') { +*/ +else if ($action == 'update') { $tid = (empty($tid) ? 0 : intval($tid)); $count = (empty($count) ? 0 : intval($count)); if (empty($tid)) { @@ -49,7 +49,8 @@ function update() } /* function delete() -*/ else if ($action == 'delete') { +*/ +else if ($action == 'delete') { if (@is_array($ids)) { $stringids = implode(',', $ids); } else if (!empty($ids)) { @@ -82,7 +83,8 @@ function delete() } /* function fetch() -*/ else if ($action == 'fetch') { +*/ +else if ($action == 'fetch') { $wheresql = ''; $start = isset($start) && is_numeric($start) ? $start : 0; $where = array(); diff --git a/src/admin/templets_main.php b/src/admin/templets_main.php index cdf3e257..695f9c70 100644 --- a/src/admin/templets_main.php +++ b/src/admin/templets_main.php @@ -10,17 +10,14 @@ */ require_once(dirname(__FILE__).'/config.php'); CheckPurview('plus_文件管理器'); - if (empty($acdir)) $acdir = $cfg_df_style; $templetdir = $cfg_basedir.$cfg_templets_dir; $templetdird = $templetdir.'/'.$acdir; $templeturld = $cfg_templeturl.'/'.$acdir; - if (preg_match("#\.#", $acdir)) { ShowMsg('Not Allow dir '.$acdir.'!', '-1'); exit(); } - //获取默认文件说明信息 function GetInfoArray($filename) { @@ -35,10 +32,8 @@ function GetInfoArray($filename) } return $arrs; } - $dirlists = GetInfoArray($templetdir.'/templet-dirlist.inc'); $filelists = GetInfoArray($templetdir.'/templet-filelist.inc'); $pluslists = GetInfoArray($templetdir.'/templet-pluslist.inc'); $fileinfos = ($acdir == 'plus' ? $pluslists : $filelists); - -include DedeInclude('templets/templets_default.htm'); +include DedeInclude('templets/templets_default.htm'); \ No newline at end of file diff --git a/src/admin/templets_one.php b/src/admin/templets_one.php index 0f250f8b..a2abe89f 100644 --- a/src/admin/templets_one.php +++ b/src/admin/templets_one.php @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('temp_One'); require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); - $addquery = ''; $keyword = (!isset($keyword) ? '' : $keyword); $likeid = (!isset($likeid) ? '' : $likeid); @@ -22,8 +21,7 @@ $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN."/templets/templets_one.htm"); $dlist->SetSource($sql); $dlist->display(); - function GetIsMake($im) { return $im == 1 ? '需编译' : '不编译'; -} +} \ No newline at end of file diff --git a/src/admin/templets_one_add.php b/src/admin/templets_one_add.php index c9ba2c16..59c08bf8 100644 --- a/src/admin/templets_one_add.php +++ b/src/admin/templets_one_add.php @@ -11,7 +11,6 @@ require(dirname(__FILE__)."/config.php"); CheckPurview('temp_One'); if (empty($dopost)) $dopost = ""; - if ($dopost == "save") { require_once(DEDEINC."/arc.partview.class.php"); $uptime = time(); @@ -40,4 +39,4 @@ if ($dopost == "save") { } $row = $dsql->GetOne("SELECT MAX(aid) AS aid FROM `#@__sgpage` "); $nowid = is_array($row) ? $row['aid'] + 1 : ''; -include_once(DEDEADMIN."/templets/templets_one_add.htm"); +include_once(DEDEADMIN."/templets/templets_one_add.htm"); \ No newline at end of file diff --git a/src/admin/templets_one_edit.php b/src/admin/templets_one_edit.php index 96024587..9a8099ac 100644 --- a/src/admin/templets_one_edit.php +++ b/src/admin/templets_one_edit.php @@ -11,14 +11,12 @@ require(dirname(__FILE__)."/config.php"); CheckPurview('temp_One'); if (empty($dopost)) $dopost = ""; - $aid = isset($aid) && is_numeric($aid) ? $aid : 0; if ($dopost == "saveedit") { include_once(DEDEINC."/arc.sgpage.class.php"); $uptime = time(); $body = str_replace('"', '\\"', $body); $filename = preg_replace("#^\/#", "", $nfilename); - //如果修改了文件名,删除旧文件 if ($oldfilename != $filename) { $oldfilename = $cfg_basedir.$cfg_cmspath."/".$oldfilename; @@ -106,4 +104,4 @@ if ($dopost == "saveedit") { exit(); } $row = $dsql->GetOne("SELECT * FROM `#@__sgpage` WHERE aid='$aid' "); -include(DEDEADMIN."/templets/templets_one_edit.htm"); +include(DEDEADMIN."/templets/templets_one_edit.htm"); \ No newline at end of file diff --git a/src/admin/templets_tagsource.php b/src/admin/templets_tagsource.php index 16927a89..5675b660 100644 --- a/src/admin/templets_tagsource.php +++ b/src/admin/templets_tagsource.php @@ -10,10 +10,8 @@ */ require_once(dirname(__FILE__).'/config.php'); CheckPurview('plus_文件管理器'); - $libdir = DEDEINC.'/taglib'; $helpdir = DEDEINC.'/taglib/help'; - //获取默认文件说明信息 function GetHelpInfo($tagname) { @@ -27,5 +25,4 @@ function GetHelpInfo($tagname) fclose($fp); return $helpinfo; } - -include DedeInclude('templets/templets_tagsource.htm'); +include DedeInclude('templets/templets_tagsource.htm'); \ No newline at end of file diff --git a/src/admin/testenv.php b/src/admin/testenv.php index 47580283..2418a4ef 100644 --- a/src/admin/testenv.php +++ b/src/admin/testenv.php @@ -42,7 +42,6 @@ $action = isset($action) ? $action : ''; } } } - if (!function_exists('TestExecuteable')) { //检查是否具目录可执行 function TestExecuteable($d = '.', $siteuRL = '', $rootDir = '') @@ -66,8 +65,6 @@ $action = isset($action) ? $action : ''; } } } - - if (!function_exists('PostHost')) { function PostHost($host, $data = '', $method = 'GET', $showagent = null, $port = null, $timeout = 30) { @@ -103,7 +100,6 @@ $action = isset($action) ? $action : ''; return $responseText; } } - $allPath = array(); $needDir = "$cfg_medias_dir| $cfg_image_dir| @@ -132,8 +128,6 @@ $action = isset($action) ? $action : ''; 'execute' => false //执行 ); } - - //所有栏目目录 $sql = "SELECT typedir FROM #@__arctype ORDER BY id DESC"; $dsql->SetQuery($sql); @@ -148,7 +142,6 @@ $action = isset($action) ? $action : ''; 'execute' => false //执行 ); } - //只允许读取,不允许写入的目录 $needDir = array( 'include', @@ -174,7 +167,6 @@ $action = isset($action) ? $action : ''; $dh->close(); return $dirname; } - //获取所有文件列表 function preg_ls($path = ".", $rec = FALSE, $pat = "/.*/", $ignoredir = '') { @@ -204,7 +196,6 @@ $action = isset($action) ? $action : ''; } return (empty($ret) && preg_match($pat, basename($path))) ? array($path."/") : $ret; } - foreach ($needDir as $key => $val) { $allPath[trim('/'.$val)] = array( 'read' => true, //读取 @@ -221,7 +212,6 @@ $action = isset($action) ? $action : ''; ); } } - //不需要执行的 $needDir = array( '/images', @@ -243,7 +233,6 @@ $action = isset($action) ? $action : ''; ); } } - //所有js建议只读 $jsDir = array( '/images', diff --git a/src/admin/tpl.php b/src/admin/tpl.php index 12ca4be1..094c7fa6 100644 --- a/src/admin/tpl.php +++ b/src/admin/tpl.php @@ -76,7 +76,8 @@ if ($action == 'edit' || $action == 'newfile') { /*--------------------------- function save_tpl() { } 保存编辑模板 ---------------------------*/ else if ($action == 'saveedit') { +--------------------------*/ +else if ($action == 'saveedit') { CheckCSRF(); if ($filename == '') { ShowMsg('未指定要编辑的文件或文件名不合法', '-1'); @@ -101,7 +102,8 @@ function save_tpl() { } /*--------------------------- function del_tpl() { } 删除模板 ---------------------------*/ else if ($action == 'del') { +--------------------------*/ +else if ($action == 'del') { $truefile = $templetdird.'/'.$filename; if (unlink($truefile)) { ShowMsg('删除文件成功', 'templets_main.php?acdir='.$acdir); @@ -114,7 +116,8 @@ function del_tpl() { } /*---------------------- function _upload() {} 上传新模板 ------------------------*/ else if ($action == 'upload') { +-----------------------*/ +else if ($action == 'upload') { require_once(dirname(__FILE__).'/../include/oxwindow.class.php'); $acdir = str_replace('.', '', $acdir); $win = new OxWindow(); @@ -144,7 +147,8 @@ function _upload() {} /*---------------------- function _upload() {} 上传新模板 ------------------------*/ else if ($action == 'uploadok') { +-----------------------*/ +else if ($action == 'uploadok') { CheckCSRF(); if (!is_uploaded_file($upfile)) { ShowMsg("貌似您什么都没有上传哦", "javascript:;"); @@ -168,7 +172,8 @@ function _upload() {} /*--------------------------- function edittag() { } 修改标签碎片 ---------------------------*/ else if ($action == 'edittag' || $action == 'addnewtag') { +--------------------------*/ +else if ($action == 'edittag' || $action == 'addnewtag') { if ($action == 'addnewtag') { $democode = '<'."?php if(!defined('DEDEINC')) @@ -213,7 +218,8 @@ function lib_demotag(&\$ctag,&\$refObj) /*--------------------------- function savetagfile() { } 保存标签碎片修改 ---------------------------*/ else if ($action == 'savetagfile') { +--------------------------*/ +else if ($action == 'savetagfile') { CheckCSRF(); if (!preg_match("#^[a-z0-9_-]{1,}\.lib\.php$#i", $filename)) { ShowMsg('文件名不合法,不允许进行操作', '-1'); diff --git a/src/admin/vote_add.php b/src/admin/vote_add.php index 05a3f5a8..29520729 100644 --- a/src/admin/vote_add.php +++ b/src/admin/vote_add.php @@ -19,7 +19,6 @@ if ($dopost == "save" && $isarc == 0) { $starttime = GetMkTime($starttime); $endtime = GetMkTime($endtime); $voteitems = ""; - $j = 0; for ($i = 1; $i <= 15; $i++) { if (!empty(${"voteitem".$i})) { @@ -38,7 +37,6 @@ if ($dopost == "save" && $isarc == 0) { $vote_content = $vt->GetVoteForm(); $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 $vote_content = 'document.write("'.$vote_content.'");'; - $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; file_put_contents($vote_file, $vote_content); ShowMsg("成功增加一组投票", "vote_main.php"); @@ -47,7 +45,6 @@ if ($dopost == "save" && $isarc == 0) { $starttime = GetMkTime($starttime); $endtime = GetMkTime($endtime); $voteitems = ""; - $j = 0; for ($i = 1; $i <= 15; $i++) { if (!empty(${"voteitem".$i})) { @@ -76,4 +73,4 @@ $startDay = time(); $endDay = AddDay($startDay, 30); $startDay = GetDateTimeMk($startDay); $endDay = GetDateTimeMk($endDay); -include DedeInclude('templets/vote_add.htm'); +include DedeInclude('templets/vote_add.htm'); \ No newline at end of file diff --git a/src/admin/vote_edit.php b/src/admin/vote_edit.php index 8192c761..3b9e7813 100644 --- a/src/admin/vote_edit.php +++ b/src/admin/vote_edit.php @@ -12,10 +12,8 @@ require(dirname(__FILE__)."/config.php"); CheckPurview('plus_投票模块'); require_once(DEDEINC."/dedetag.class.php"); if (empty($dopost)) $dopost = ""; - $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "vote_main.php" : $_COOKIE['ENV_GOBACK_URL']; - if ($dopost == "delete") { if ($dsql->ExecuteNoneQuery("DELETE FROM `#@__vote` WHERE aid='$aid'")) { if ($dsql->ExecuteNoneQuery("DELETE FROM `#@__vote_member` WHERE voteid='$aid'")) { @@ -40,8 +38,7 @@ if ($dopost == "delete") { view='$view', spec='$spec', isenable='$isenable' - WHERE aid='$aid' - "; + WHERE aid='$aid'"; if ($dsql->ExecuteNoneQuery($query)) { $vt = new DedeVote($aid); $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; @@ -60,4 +57,4 @@ if ($dopost == "delete") { exit(); } include DedeInclude('templets/vote_edit.htm'); -} +} \ No newline at end of file diff --git a/src/admin/vote_getcode.php b/src/admin/vote_getcode.php index 30fc7ecd..b7c9d076 100644 --- a/src/admin/vote_getcode.php +++ b/src/admin/vote_getcode.php @@ -11,4 +11,4 @@ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/dedevote.class.php"); $aid = isset($aid) && is_numeric($aid) ? $aid : 0; -include DedeInclude('templets/vote_getcode.htm'); +include DedeInclude('templets/vote_getcode.htm'); \ No newline at end of file diff --git a/src/member/album_add.php b/src/member/album_add.php index 988f58d6..7034ed85 100755 --- a/src/member/album_add.php +++ b/src/member/album_add.php @@ -57,7 +57,8 @@ if (empty($dopost)) { /*------------------------------ function _SaveArticle(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { include(DEDEMEMBER.'/inc/archives_check.php'); $svali = GetCkVdValue(); diff --git a/src/member/album_edit.php b/src/member/album_edit.php index 8cbe6a82..08fbbe76 100755 --- a/src/member/album_edit.php +++ b/src/member/album_edit.php @@ -58,7 +58,8 @@ if (empty($dopost)) { } /*------------------------------ function _Save(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { $svali = GetCkVdValue(); if (preg_match("/1/", $safe_gdopen)) { if (strtolower($vdcode) != $svali || $svali == '') { diff --git a/src/member/archives_add.php b/src/member/archives_add.php index 881e652c..dd201c0c 100755 --- a/src/member/archives_add.php +++ b/src/member/archives_add.php @@ -49,7 +49,8 @@ if (empty($dopost)) { } /*------------------------------ function _SaveArticle(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { include(dirname(__FILE__).'/inc/archives_check.php'); //分析处理附加表数据 $inadd_f = $inadd_v = ''; diff --git a/src/member/archives_do.php b/src/member/archives_do.php index b2dc584f..ccac703a 100755 --- a/src/member/archives_do.php +++ b/src/member/archives_do.php @@ -34,7 +34,8 @@ if ($dopost == "delStow") { /*----------------- function addArchives() 添加投稿 -------------------*/ else if ($dopost == "addArc") { +------------------*/ +else if ($dopost == "addArc") { if ($channelid == 1) { $addcon = 'article_add.php?channelid='.$channelid; } else if ($channelid == 2) { @@ -60,7 +61,8 @@ function addArchives() /*----------------- function editArchives() 修改投稿 -------------------*/ else if ($dopost == "edit") { +------------------*/ +else if ($dopost == "edit") { CheckRank(0, 0); if ($channelid == 1) { $edit = 'article_edit.php?channelid='.$channelid; @@ -87,7 +89,8 @@ function editArchives() /*-------------------- function delArchives() 删除文章 ---------------------*/ else if ($dopost == "delArc") { +--------------------*/ +else if ($dopost == "delArc") { CheckRank(0, 0); include_once(DEDEMEMBER."/inc/inc_batchup.php"); $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'content_list.php?channelid=' : $_COOKIE['ENV_GOBACK_URL']; @@ -155,7 +158,8 @@ function delArchives() /*----------------- function viewArchives() 查看文章 -------------------*/ else if ($dopost == "viewArchives") { +------------------*/ +else if ($dopost == "viewArchives") { CheckRank(0, 0); if ($type == "") { header("location:".$cfg_phpurl."/view.php?aid=".$aid); diff --git a/src/member/archives_edit.php b/src/member/archives_edit.php index 7124b6e5..b0de4653 100755 --- a/src/member/archives_edit.php +++ b/src/member/archives_edit.php @@ -47,7 +47,8 @@ if (empty($dopost)) { /*------------------------------ function _SaveArticle(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { include(DEDEMEMBER.'/inc/archives_check_edit.php'); //分析处理附加表数据 diff --git a/src/member/archives_sg_add.php b/src/member/archives_sg_add.php index c1c7cc24..e4e3a5b3 100755 --- a/src/member/archives_sg_add.php +++ b/src/member/archives_sg_add.php @@ -49,7 +49,8 @@ if (empty($dopost)) { } /*------------------------------ function _SaveArticle(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { include_once(DEDEINC."/image.func.php"); include_once(DEDEINC."/oxwindow.class.php"); $svali = GetCkVdValue(); diff --git a/src/member/archives_sg_edit.php b/src/member/archives_sg_edit.php index a777bfe2..bb1e11cf 100755 --- a/src/member/archives_sg_edit.php +++ b/src/member/archives_sg_edit.php @@ -43,7 +43,8 @@ if (empty($dopost)) { /*------------------------------ function _SaveArticle(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { require_once(DEDEINC."/image.func.php"); require_once(DEDEINC."/oxwindow.class.php"); $flag = ''; diff --git a/src/member/article_add.php b/src/member/article_add.php index dadb8873..1e8d3611 100755 --- a/src/member/article_add.php +++ b/src/member/article_add.php @@ -45,7 +45,8 @@ if (empty($dopost)) { } /*------------------------------ function _SaveArticle(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { include(DEDEMEMBER.'/inc/archives_check.php'); //分析处理附加表数据 diff --git a/src/member/article_edit.php b/src/member/article_edit.php index 2cda9948..64656eef 100755 --- a/src/member/article_edit.php +++ b/src/member/article_edit.php @@ -46,7 +46,8 @@ if (empty($dopost)) { /*------------------------------ function _SaveArticle(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { include(DEDEMEMBER.'/inc/archives_check_edit.php'); //分析处理附加表数据 diff --git a/src/member/inc/config_pay_alipay.php b/src/member/inc/config_pay_alipay.php index f8530998..754e4f4e 100755 --- a/src/member/inc/config_pay_alipay.php +++ b/src/member/inc/config_pay_alipay.php @@ -1,5 +1,5 @@ <?php -if (!defined('DEDEMEMBER')) exit("Request Error!"); +if (!defined('DEDEMEMBER')) exit('dedebiz'); /** * 支付页面 * @@ -25,7 +25,6 @@ $parameter = array( "logistics_fee" => '0.00', //物流配送费用 "logistics_payment" => 'BUYER_PAY', //物流配送费用付款方式:SELLER_PAY(卖家支付)、BUYER_PAY(买家支付)、BUYER_PAY_AFTER_RECEIVE(货到付款) "logistics_type" => 'EXPRESS', //物流配送方式:POST(平邮)、EMS(EMS)、EXPRESS(其他快递) - "price" => sprintf("%01.2f", $price), //商品单价,必填 "payment_type" => "1", //默认为1,不需要修改 "quantity" => "1", //商品数量,必填 @@ -34,7 +33,6 @@ $parameter = array( ); $alipay = new alipay_service($parameter, $security_code, $sign_type); $link = $alipay->create_url(); - echo '<html> <head> <title>转到支付宝支付页面 @@ -44,4 +42,4 @@ echo ' '; -exit; +exit; \ No newline at end of file diff --git a/src/member/inc/config_pay_cbpayment.php b/src/member/inc/config_pay_cbpayment.php index b149ee50..414e614d 100755 --- a/src/member/inc/config_pay_cbpayment.php +++ b/src/member/inc/config_pay_cbpayment.php @@ -1,32 +1,26 @@ 0) $price = $price+$piice_ex; $v_amount = sprintf("%01.2f", $price); //支付金额 - $text = $v_amount.$v_moneytype.$v_oid.$v_mid.$v_url.$key; //md5加密拼凑串,注意顺序不能变 $v_md5info = strtoupper(md5($text)); //md5函数加密并转化成大写字母 - $remark1 = trim($ptype);//备注字段1 $remark2 = trim($pname);//备注字段2 - $v_rcvname = '站长'; //收货人 $v_rcvaddr = '深圳'; //收货地址 $v_rcvtel = '0755-83791960'; //收货人电话 $v_rcvpost = '100080'; //收货人邮编 $v_rcvmobile = '13838384381'; //收货人手机号 - $v_ordername = $cfg_ml->M_UserName; //订货人姓名 $v_orderaddr = '深圳'; //订货人地址 $v_ordertel = '0755-83791960'; //订货人电话 $v_orderpost = 518000; //订货人邮编 $v_orderemail = 'service@nps.cn'; //订货人邮件 $v_ordermobile = 13838384581; //订货人手机号 - $strRequestUrl = $v_post_url.'?v_mid='.$v_mid.'&v_oid='.$v_oid.'&v_amount='.$v_amount.'&v_moneytype='.$v_moneytype .'&v_url='.$v_url.'&v_md5info='.$v_md5info.'&remark1='.$remark1.'&remark2='.$remark2; diff --git a/src/member/inc/config_pay_nps.php b/src/member/inc/config_pay_nps.php index befc2c74..1496e7f7 100755 --- a/src/member/inc/config_pay_nps.php +++ b/src/member/inc/config_pay_nps.php @@ -1,5 +1,5 @@ M_ID; $modate = GetDateTimeMk($mtime); - - //组织订单信息 $m_info = $m_id."|".$m_orderid."|".$m_oamount."|".$m_ocurrency."|".$m_url."|".$m_language; $s_info = $s_name."|".$s_addr."|".$s_postcode."|".$s_tel."|".$s_eml; $r_info = $r_name."|".$r_addr."|".$r_postcode."|".$r_tel."|".$r_eml."|".$m_ocomment."|".$m_status."|".$modate; - $OrderInfo = $m_info."|".$s_info."|".$r_info; - //订单信息先转换成HEX,然后再加密 $OrderInfo = StrToHex($OrderInfo); $digest = strtoupper(md5($OrderInfo.$cfg_merpassword)); - $strRequestUrl = $payment_url.'?OrderMessage='.$OrderInfo.'&digest='.$digest.'&M_ID='.$cfg_merchant; - - echo ' 转到NPS支付页面 diff --git a/src/member/inc/config_pay_tenpay.php b/src/member/inc/config_pay_tenpay.php index 80e863c7..6c46484c 100755 --- a/src/member/inc/config_pay_tenpay.php +++ b/src/member/inc/config_pay_tenpay.php @@ -1,5 +1,5 @@ 0) $price = $price+$piice_ex; - # 商家设置用户购买商品的支付信息. ##易宝支付平台统一使用GBK/GB2312编码方式,参数如用到中文,请注意转码 - # 商户订单号,选填. ##若不为"",提交的订单号必须在自身账户交易中唯一;为""时,易宝支付会自动生成随机的商户订单号. $p2_Order = trim($buyid); - # 支付金额,必填. ##单位:元,精确到分. $p3_Amt = $price; - # 交易币种,固定值"CNY". $p4_Cur = "CNY"; - # 商品名称 ##用于支付时显示在易宝支付网关左侧的订单产品信息. $p5_Pid = trim($pname); - # 商品种类 $p6_Pcat = trim($ptype); - # 商品描述 $p7_Pdesc = ''; - # 商户接收支付成功数据的地址,支付成功后易宝支付会向该地址发送两次成功通知. $p8_Url = $cfg_basehost.'/member/paycenter/yeepay/callback.php'; - # 商户扩展信息 ##商户可以任意填写1K 的字符串,支付成功时将原样返回. $pa_MP = 'member'; - # 应答机制 ##为"1": 需要应答机制;为"0": 不需要应答机制. $pr_NeedResponse = 1; - # 银行编码 -##默认为"",到易宝支付网关.若不需显示易宝支付的页面,直接跳转到各银行、神州行支付、骏网一卡通等支付页面,该字段可依照附录:银行列表设置参数值. +##默认为"",到易宝支付网关.若不需显示易宝支付的页面,直接跳转到各银行、神州行支付、骏网一卡通等支付页面,该字段可依照附录:银行列表设置参数值. $pd_FrpId = ''; #调用签名函数生成签名串 $hmac = getReqHmacString($p2_Order,$p3_Amt,$p4_Cur,$p5_Pid,$p6_Pcat,$p7_Pdesc,$p8_Url,$pa_MP,$pd_FrpId,$pr_NeedResponse); diff --git a/src/member/soft_add.php b/src/member/soft_add.php index 31447e9a..f7a6c85e 100755 --- a/src/member/soft_add.php +++ b/src/member/soft_add.php @@ -55,7 +55,8 @@ if (empty($dopost)) { /*------------------------------ function _SaveArticle(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { $description = ''; include(DEDEMEMBER.'/inc/archives_check.php'); diff --git a/src/member/soft_edit.php b/src/member/soft_edit.php index 773e9a5f..6ebbe9ce 100755 --- a/src/member/soft_edit.php +++ b/src/member/soft_edit.php @@ -80,7 +80,8 @@ if (empty($dopost)) { } /*------------------------------ function _SaveArticle(){ } -------------------------------*/ else if ($dopost == 'save') { +------------------------------*/ +else if ($dopost == 'save') { $description = ''; include(DEDEMEMBER.'/inc/archives_check_edit.php'); diff --git a/src/plus/ad_js.php b/src/plus/ad_js.php index ed62ace0..4ee17b90 100755 --- a/src/plus/ad_js.php +++ b/src/plus/ad_js.php @@ -13,7 +13,7 @@ require_once(dirname(__FILE__)."/../include/common.inc.php"); if (isset($arcID)) $aid = $arcID; $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; -if ($aid == 0) die(' Request Error! '); +if ($aid == 0) die('dedebiz'); $cacheFile = DEDEDATA.'/cache/myad-'.$aid.'.htm'; if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $cfg_puccache_time) { diff --git a/src/plus/arcmulti.php b/src/plus/arcmulti.php index 8d8e141e..4b873b66 100755 --- a/src/plus/arcmulti.php +++ b/src/plus/arcmulti.php @@ -7,7 +7,7 @@ $mtype = empty($mtype)? 0 : intval(preg_replace("/[^\d]/",'', $mtype)); $pnum = empty($pnum)? 0 : intval(preg_replace("/[^\d]/",'', $pnum)); $tagid = empty($tagid)? '' : (preg_replace("/[^a-z0-9]/",'', $tagid)); -if($tagid=='' || $pnum==0) die(" Request Error! "); +if($tagid=='' || $pnum==0) die("dedebiz"); if($tagid !='') { diff --git a/src/plus/download.php b/src/plus/download.php index 387ca8e2..1654c5fc 100755 --- a/src/plus/download.php +++ b/src/plus/download.php @@ -16,7 +16,7 @@ if (!isset($open)) $open = 0; //读取链接列表 if ($open == 0) { $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; - if ($aid == 0) exit(' Request Error! '); + if ($aid == 0) exit('dedebiz'); $arcRow = GetOneArchive($aid); if ($arcRow['aid'] == '') { @@ -50,7 +50,8 @@ if ($open == 0) { /*------------------------ //提供软件给用户下载(旧模式) function getSoft_old() -------------------------*/ else if ($open == 1) { +------------------------*/ +else if ($open == 1) { //更新下载次数 $id = isset($id) && is_numeric($id) ? $id : 0; $link = base64_decode(urldecode($link)); @@ -88,7 +89,8 @@ function getSoft_old() /*------------------------ //提供软件给用户下载(新模式) function getSoft_new() -------------------------*/ else if ($open == 2) { +------------------------*/ +else if ($open == 2) { $id = intval($id); //获得附加表信息 $row = $dsql->GetOne("SELECT ch.addtable,arc.mid FROM `#@__arctiny` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel WHERE arc.id='$id' "); diff --git a/src/plus/feedback.php b/src/plus/feedback.php index e0df7fa8..16d339a7 100755 --- a/src/plus/feedback.php +++ b/src/plus/feedback.php @@ -101,7 +101,8 @@ if ($action == '' || $action == 'show') { //------------------------------------ /* function __SendFeedback(){ } -*/ else if ($action == 'send') { +*/ +else if ($action == 'send') { //读取文档信息 $arcRow = GetOneArchive($aid); if ((empty($arcRow['aid']) || $arcRow['notpost'] == '1') && empty($fid)) { diff --git a/src/plus/freelist.php b/src/plus/freelist.php index d24eb3c5..36e6cd52 100755 --- a/src/plus/freelist.php +++ b/src/plus/freelist.php @@ -12,9 +12,7 @@ require_once(dirname(__FILE__)."/../include/common.inc.php"); require_once(DEDEINC."/arc.freelist.class.php"); if (!empty($lid)) $tid = $lid; - $tid = (isset($tid) && is_numeric($tid) ? $tid : 0); -if ($tid == 0) die(" Request Error! "); - +if ($tid == 0) die("dedebiz"); $fl = new FreeList($tid); -$fl->Display(); +$fl->Display(); \ No newline at end of file diff --git a/src/plus/list.php b/src/plus/list.php index fa425d70..69b962e7 100755 --- a/src/plus/list.php +++ b/src/plus/list.php @@ -10,27 +10,19 @@ * @link https://www.dedebiz.com */ require_once(dirname(__FILE__)."/../include/common.inc.php"); - $t1 = ExecTime(); - $tid = (isset($tid) && is_numeric($tid) ? $tid : 0); - $channelid = (isset($channelid) && is_numeric($channelid) ? $channelid : 0); - -if ($tid == 0 && $channelid == 0) die(" Request Error! "); +if ($tid == 0 && $channelid == 0) die("dedebiz"); if (isset($TotalResult)) $TotalResult = intval(preg_replace("/[^\d]/", '', $TotalResult)); - - //如果指定了内容模型ID但没有指定栏目ID,那么自动获得为这个内容模型的第一个顶级栏目作为频道默认栏目 if (!empty($channelid) && empty($tid)) { - $tinfos = $dsql->GetOne("SELECT tp.id,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.channeltype='$channelid' And tp.reid=0 order by sortrank asc"); if (!is_array($tinfos)) die(" No catalogs in the channel! "); $tid = $tinfos['id']; } else { $tinfos = $dsql->GetOne("SELECT ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$tid' "); } - if ($tinfos['issystem'] == -1) { $nativeplace = ((empty($nativeplace) || !is_numeric($nativeplace)) ? 0 : $nativeplace); $infotype = ((empty($infotype) || !is_numeric($infotype)) ? 0 : $infotype); @@ -61,11 +53,9 @@ if ($tinfos['issystem'] == -1) { } } } - if ($lv->IsError) ParamError(); - $lv->Display(); if (DEBUG_LEVEL === TRUE) { $queryTime = ExecTime() - $t1; echo "
页面加载总消耗时间:{$queryTime}
\r\n"; -} +} \ No newline at end of file diff --git a/src/plus/rss.php b/src/plus/rss.php index 4762b725..a223e053 100755 --- a/src/plus/rss.php +++ b/src/plus/rss.php @@ -11,9 +11,7 @@ */ require_once(dirname(__FILE__).'/../include/common.inc.php'); require_once(DEDEINC."/arc.rssview.class.php"); - $tid = isset($tid) && is_numeric($tid) ? $tid : 0; -if ($tid == 0) die(" Request Error! "); - +if ($tid == 0) die("dedebiz"); $rv = new RssView($tid); -$rv->Display(); +$rv->Display(); \ No newline at end of file diff --git a/src/plus/showphoto.php b/src/plus/showphoto.php index 99bbdcd8..5de1d741 100755 --- a/src/plus/showphoto.php +++ b/src/plus/showphoto.php @@ -14,7 +14,7 @@ require_once(DEDEINC."/channelunit.class.php"); if (isset($arcID)) $aid = $arcID; $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; -if ($aid == 0) die(" Request Error! "); +if ($aid == 0) die("dedebiz"); //读取文档信息 $arctitle = ''; diff --git a/src/plus/view.php b/src/plus/view.php index 9b0bff1b..f5f5fe10 100755 --- a/src/plus/view.php +++ b/src/plus/view.php @@ -15,46 +15,31 @@ */ require_once(dirname(__FILE__)."/../include/common.inc.php"); require_once(DEDEINC.'/arc.archives.class.php'); - $t1 = ExecTime(); - if (empty($okview)) $okview = ''; if (isset($arcID)) $aid = $arcID; if (!isset($dopost)) $dopost = ''; - $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; -if ($aid == 0) die(" Request Error! "); - +if ($aid == 0) die("dedebiz"); $arc = new Archives($aid); if ($arc->IsError) ParamError(); - - //检查阅读权限 $needMoney = $arc->Fields['money']; $needRank = $arc->Fields['arcrank']; - require_once(DEDEINC.'/memberlogin.class.php'); $cfg_ml = new MemberLogin(); - if ($needRank < 0 && $arc->Fields['mid'] != $cfg_ml->M_ID) { ShowMsg('文章尚未审核,非作者本人无权查看!', 'javascript:;'); exit(); } - //设置了权限限制的文章 //arctitle msgtitle moremsg if ($needMoney > 0 || $needRank > 1) { $arctitle = $arc->Fields['title']; - /* - $arclink = GetFileUrl($arc->ArcID,$arc->Fields["typeid"],$arc->Fields["senddate"], - $arc->Fields["title"],$arc->Fields["ismake"],$arc->Fields["arcrank"]); - */ $arclink = $cfg_phpurl.'/view.php?aid='.$arc->ArcID; $arcLinktitle = "".$arctitle.""; - $description = $arc->Fields["description"]; $pubdate = GetDateTimeMk($arc->Fields["pubdate"]); - //会员级别不足 if (($needRank > 1 && $cfg_ml->M_Rank < $needRank && $arc->Fields['mid'] != $cfg_ml->M_ID)) { $dsql->Execute('me', "SELECT * FROM `#@__arcrank` "); @@ -67,7 +52,6 @@ if ($needMoney > 0 || $needRank > 1) { include_once(DEDETEMPLATE.'/plus/view_msg.htm'); exit(); } - //需要金币的情况 if ($needMoney > 0 && $arc->Fields['mid'] != $cfg_ml->M_ID) { $sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE".$aid."' AND mid='".$cfg_ml->M_ID."'"; @@ -90,7 +74,6 @@ if ($needMoney > 0 || $needRank > 1) { showmsg('购买失败, 请返回', -1); exit; } - showmsg('购买成功,购买扣点不会重扣金币,谢谢', '/plus/view.php?aid='.$aid); exit; } else { @@ -98,7 +81,6 @@ if ($needMoney > 0 || $needRank > 1) { exit; } } - $msgtitle = "扣金币购买阅读"; $moremsg = "阅读该文档内容需要付费
这篇文档需要 ".$needMoney." 金币 才能访问,您目前拥有金币 ".$cfg_ml->M_Money."
确认阅读请点 [确认付点阅读]"; include_once($cfg_basedir.$cfg_templets_dir."/plus/view_msg.htm"); @@ -108,9 +90,8 @@ if ($needMoney > 0 || $needRank > 1) { } } //金币处理付处理 } - $arc->Display(); if (DEBUG_LEVEL === TRUE) { $queryTime = ExecTime() - $t1; echo "
页面加载总消耗时间:{$queryTime}
\r\n"; -} +} \ No newline at end of file diff --git a/src/plus/vote.php b/src/plus/vote.php index 3f132e19..9d45edc3 100755 --- a/src/plus/vote.php +++ b/src/plus/vote.php @@ -13,20 +13,16 @@ require(dirname(__FILE__)."/../include/common.inc.php"); require(DEDEINC."/dedevote.class.php"); require(DEDEINC."/memberlogin.class.php"); require(DEDEINC."/userlogin.class.php"); - $member = new MemberLogin; $memberID = $member->M_LoginID; $time = time(); $content = $memberID.'|'.$time; $file = DEDEDATA.'/cache/vote_'.$aid.'_'.$member->M_ID.'.inc'; //存放会员投票记录的缓存文件 - $loginurl = $cfg_basehost."/member"; $ENV_GOBACK_URL = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER']; - if (empty($dopost)) $dopost = ''; - $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; -if ($aid == 0) die(" Request Error! "); +if ($aid == 0) die("dedebiz"); if ($aid == 0) { ShowMsg("没指定投票项目的ID", "-1"); @@ -34,8 +30,6 @@ if ($aid == 0) { } $vo = new DedeVote($aid); $rsmsg = ''; - - $row = $dsql->GetOne("SELECT * FROM `#@__vote` WHERE aid='$aid'"); //判断是否允许游客进行投票 if ($row['isallow'] == 1) { @@ -44,7 +38,6 @@ if ($row['isallow'] == 1) { exit(); } } - if ($dopost == 'send') { if (!empty($voteitem)) { @@ -52,20 +45,16 @@ if ($dopost == 'send') { } else { $rsmsg = "
 您刚才没选择任何投票项目
"; } - if ($row['isenable'] == 1) { ShowMsg('此投票项未启用,暂时不能进行投票', $ENV_GOBACK_URL); exit(); } } - $voname = $vo->VoteInfos['votename']; $totalcount = $vo->VoteInfos['totalcount']; $starttime = GetDateMk($vo->VoteInfos['starttime']); $endtime = GetDateMk($vo->VoteInfos['endtime']); $votelist = $vo->GetVoteResult("98%", 30, "30%"); - - //判断是否允许被查看 $admin = new userLogin; if ($dopost == 'view') { @@ -75,4 +64,4 @@ if ($dopost == 'view') { } } //显示模板(简单PHP文件) -include(DEDETEMPLATE.'/plus/vote.htm'); +include(DEDETEMPLATE.'/plus/vote.htm'); \ No newline at end of file