From a5e73a5a385491d8798a892cef28095acc84067f Mon Sep 17 00:00:00 2001 From: xushubieli Date: Sun, 24 Apr 2022 15:37:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=86=E9=A1=B5=E6=9D=A1?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E4=BC=98=E5=8C=96=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/actionsearch_class.php | 1 - src/admin/ad_add.php | 1 - src/admin/article_description_main.php | 2 +- src/admin/article_keywords_main.php | 9 +- src/admin/article_keywords_make.php | 10 +- src/admin/article_keywords_select.php | 9 +- src/admin/article_select_sw.php | 3 +- src/admin/article_source_edit.php | 4 +- src/admin/article_string_mix.php | 6 +- src/admin/article_test_same.php | 10 +- src/admin/article_writer_edit.php | 6 +- src/admin/baidunews.php | 5 +- src/admin/cards_make.php | 5 +- src/admin/cards_manage.php | 9 +- src/admin/catalog_menu.php | 2 +- src/admin/content_sg_list.php | 2 +- src/admin/diy_add.php | 4 +- src/admin/diy_field_edit.php | 1 - src/admin/diy_list.php | 4 +- src/admin/feedback_main.php | 2 +- src/admin/freelist_main.php | 2 +- src/admin/friendlink_add.php | 1 - src/admin/friendlink_edit.php | 1 - src/admin/log_list.php | 2 +- src/admin/makehtml_all.php | 10 +- src/admin/makehtml_archives.php | 2 +- src/admin/makehtml_archives_action.php | 2 +- src/admin/makehtml_freelist.php | 2 +- src/admin/makehtml_freelist_action.php | 5 +- src/admin/makehtml_js.php | 2 +- src/admin/makehtml_js_action.php | 4 +- src/admin/makehtml_list.php | 2 +- src/admin/makehtml_list_action.php | 2 +- src/admin/makehtml_map.php | 6 +- src/admin/makehtml_rss.php | 2 +- src/admin/makehtml_rss_action.php | 4 +- src/admin/makehtml_spec.php | 3 +- src/admin/makehtml_taglist.php | 4 +- src/admin/makehtml_taglist_action.php | 3 +- src/admin/media_add.php | 13 +- src/admin/media_edit.php | 10 +- src/admin/media_main.php | 2 +- src/admin/member_do.php | 2 - src/admin/member_main.php | 16 +- src/admin/member_operations.php | 14 +- src/admin/member_pm.php | 10 +- src/admin/member_pmall.php | 4 +- src/admin/member_pmone.php | 9 +- src/admin/member_rank.php | 4 +- src/admin/member_scores.php | 4 +- src/admin/member_toadmin.php | 9 +- src/admin/member_type.php | 6 +- src/admin/member_view.php | 5 +- src/admin/module_make.php | 36 +--- src/admin/mychannel_add.php | 11 +- src/admin/mychannel_field_add.php | 25 +-- src/admin/mychannel_field_edit.php | 20 +-- src/admin/mychannel_main.php | 5 +- src/admin/mytag_add.php | 3 +- src/admin/mytag_edit.php | 4 +- src/admin/mytag_main.php | 6 +- src/admin/mytag_tag_guide.php | 2 +- src/admin/mytag_tag_guide_ok.php | 4 +- src/admin/recycling.php | 2 +- src/admin/search_keywords_main.php | 2 +- src/admin/shops_delivery.php | 18 +- src/admin/shops_operations.php | 9 +- src/admin/shops_operations_cart.php | 8 +- src/admin/soft_config.php | 1 - src/admin/spec_add.php | 1 - src/admin/stepselect_main.php | 18 +- src/admin/swfupload.php | 12 +- src/admin/sys_admin_user.php | 5 +- src/admin/sys_admin_user_add.php | 27 +-- src/admin/sys_admin_user_tj.php | 1 - src/admin/sys_data.php | 6 +- src/admin/sys_data_replace.php | 3 +- src/admin/sys_data_revert.php | 2 +- src/admin/sys_group.php | 2 +- src/admin/sys_group_add.php | 2 +- src/admin/sys_info.php | 2 +- src/admin/sys_info_mark.php | 3 +- src/admin/sys_payment.php | 23 +-- src/admin/sys_sql_query.php | 9 +- src/admin/tag_test.php | 2 +- src/admin/tags_main.php | 11 +- src/admin/templets/album_add.htm | 6 +- src/admin/templets/album_edit.htm | 6 +- src/admin/templets/archives_add.htm | 4 +- src/admin/templets/archives_edit.htm | 4 +- src/admin/templets/archives_sg_add.htm | 2 +- src/admin/templets/archives_sg_edit.htm | 2 +- src/admin/templets/article_add.htm | 6 +- src/admin/templets/article_edit.htm | 4 +- src/admin/templets/friendlink_main.htm | 2 +- src/admin/templets/mytag_main.htm | 2 +- src/admin/templets/plus_main.htm | 2 +- src/admin/templets/soft_add.htm | 4 +- src/admin/templets/soft_edit.htm | 4 +- src/admin/templets/spec_add.htm | 4 +- src/admin/templets/spec_edit.htm | 4 +- src/admin/templets/sys_admin_user.htm | 2 +- src/admin/templets/templets_one.htm | 2 +- src/admin/vote_main.php | 2 +- src/static/ckeditor/contents.css | 209 +----------------------- 105 files changed, 162 insertions(+), 656 deletions(-) diff --git a/src/admin/actionsearch_class.php b/src/admin/actionsearch_class.php index 8c2d8f1b..24c42a60 100644 --- a/src/admin/actionsearch_class.php +++ b/src/admin/actionsearch_class.php @@ -11,7 +11,6 @@ class ActionSearch var $keyword; var $asarray = array(); var $result = array(); - function __construct($keyword) { $this->asarray = $this->GetSearchstr(); diff --git a/src/admin/ad_add.php b/src/admin/ad_add.php index 6caddad1..a1bda257 100644 --- a/src/admin/ad_add.php +++ b/src/admin/ad_add.php @@ -27,7 +27,6 @@ if ($dopost == "save") { if ($normbody['style'] == 'code') { $normbody = addslashes($normbody['htmlcode']); } else if ($normbody['style'] == 'txt') { - $normbody = "{$normbody['title']}"; } else if ($normbody['style'] == 'img') { if (empty($normbody['width'])) { diff --git a/src/admin/article_description_main.php b/src/admin/article_description_main.php index 09321ba8..8528464a 100644 --- a/src/admin/article_description_main.php +++ b/src/admin/article_description_main.php @@ -18,7 +18,7 @@ if ($dojob == '') { exit(); } else { if (empty($startdd)) $startdd = 0; - if (empty($pagesize)) $pagesize = 100; + if (empty($pagesize)) $pageSize = 30; if (empty($totalnum)) $totalnum = 0; if (empty($sid)) $sid = 0; if (empty($eid)) $eid = 0; diff --git a/src/admin/article_keywords_main.php b/src/admin/article_keywords_main.php index 334ad6a8..63f7a404 100644 --- a/src/admin/article_keywords_main.php +++ b/src/admin/article_keywords_main.php @@ -24,13 +24,11 @@ if ($dopost == 'saveall') { $rpurl = ${'rpurl_'.$aid}; $rpurlold = ${'rpurlold_'.$aid}; $keyword = ${'keyword_'.$aid}; - //删除项目 if (!empty(${'isdel_'.$aid})) { $dsql->ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); continue; } - //禁用项目 $staold = ${'staold_'.$aid}; $sta = empty(${'isnouse_'.$aid}) ? 1 : 0; @@ -39,7 +37,6 @@ if ($dopost == 'saveall') { $dsql->ExecuteNoneQuery($query1); continue; } - //更新链接网址 if ($rpurl != $rpurlold) { $query1 = "UPDATE `#@__keywords` SET rpurl='$rpurl' WHERE aid='$aid' "; @@ -74,17 +71,15 @@ if (empty($keyword)) { } else { $addquery = " WHERE keyword LIKE '%$keyword%' "; } - $sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY `rank` DESC"; $dlist = new DataListCP(); -$dlist->pageSize = 20; +$dlist->pageSize = 30; $dlist->SetParameter("keyword", $keyword); $dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); $dlist->SetSource($sql); $dlist->Display(); - function GetSta($sta) { if ($sta == 1) return ''; else return ' checked="1" '; -} +} \ No newline at end of file diff --git a/src/admin/article_keywords_make.php b/src/admin/article_keywords_make.php index 34e51d00..a0a5ddef 100644 --- a/src/admin/article_keywords_make.php +++ b/src/admin/article_keywords_make.php @@ -15,7 +15,7 @@ CheckPurview('sys_Keyword'); if (empty($dopost)) $dopost = ''; //分析已存在的关键词(适用于默认的文章模型) if ($dopost == 'analyse') { - echo "正在读取关键词数据库...
\r\n"; + echo "正在读取关键词数据库
\r\n"; flush(); $ws = $wserr = $wsnew = ""; $dsql->SetQuery("SELECT * FROM `#@__keywords`"); @@ -26,7 +26,7 @@ if ($dopost == 'analyse') { } echo "完成关键词数据库的载入
\r\n"; flush(); - echo "读取档案数据库,并对禁用的关键词和生字进行处理...
\r\n"; + echo "读取档案数据库,并对禁用的关键词和生字进行处理
\r\n"; flush(); $dsql->SetQuery("SELECT id,keywords FROM `#@__archives`"); $dsql->Execute(); @@ -57,10 +57,10 @@ if ($dopost == 'analyse') { echo "完成档案数据库的处理
\r\n"; flush(); if (is_array($wsnew)) { - echo "对关键词进行排序...
\r\n"; + echo "对关键词进行排序
\r\n"; flush(); arsort($wsnew); - echo "把关键词保存到数据库...
\r\n"; + echo "把关键词保存到数据库
\r\n"; flush(); foreach ($wsnew as $k => $v) { if (strlen($k) > 20) { @@ -87,7 +87,7 @@ else if ($dopost == 'fetch') { $startdd = 0; } if (empty($pagesize)) { - $pagesize = 20; + $pageSize = 30; } if (empty($totalnum)) { $totalnum = 0; diff --git a/src/admin/article_keywords_select.php b/src/admin/article_keywords_select.php index 6cea1c91..2b343284 100644 --- a/src/admin/article_keywords_select.php +++ b/src/admin/article_keywords_select.php @@ -11,27 +11,22 @@ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); - $f = RemoveXSS($f); - if (empty($keywords)) $keywords = ""; - $sql = "SELECT * FROM `#@__keywords` ORDER BY `rank` DESC"; $dlist = new DataListCP(); $dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); -$dlist->pageSize = 300; +$dlist->pageSize = 30; $dlist->SetParameter("f", $f); $dlist->SetSource($sql); $dlist->Display(); - function GetSta($sta) { if ($sta == 1) return "正常"; else return "禁用"; } - function GetMan($sta) { if ($sta == 1) return "禁用"; else return "启用"; -} +} \ No newline at end of file diff --git a/src/admin/article_select_sw.php b/src/admin/article_select_sw.php index c6ad780e..cb71198a 100644 --- a/src/admin/article_select_sw.php +++ b/src/admin/article_select_sw.php @@ -10,7 +10,6 @@ require(dirname(__FILE__)."/config.php"); header("Pragma:no-cache"); header("Cache-Control:no-cache"); header("Expires:0"); - //来源列表 if ($t == 'source') { $m_file = DEDEDATA."/admin/source.txt"; @@ -42,4 +41,4 @@ if ($t == 'source') { } } echo "
 
\r\n"; -} +} \ No newline at end of file diff --git a/src/admin/article_source_edit.php b/src/admin/article_source_edit.php index 940c3b61..e3a3378b 100644 --- a/src/admin/article_source_edit.php +++ b/src/admin/article_source_edit.php @@ -14,9 +14,7 @@ CheckPurview('sys_Source'); if (empty($dopost)) $dopost = ''; if (empty($allsource)) $allsource = ''; else $allsource = stripslashes($allsource); - $m_file = DEDEDATA."/admin/source.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_string_mix.php b/src/admin/article_string_mix.php index a3800529..5d3cd685 100644 --- a/src/admin/article_string_mix.php +++ b/src/admin/article_string_mix.php @@ -12,12 +12,9 @@ require_once(dirname(__FILE__).'/config.php'); require_once(DEDEINC.'/libraries/oxwindow.class.php'); CheckPurview('sys_StringMix'); if (empty($dopost)) $dopost = ''; - if (empty($allsource)) $allsource = ''; else $allsource = stripslashes($allsource); - $m_file = DEDEDATA."/downmix.data.inc"; - //保存 if ($dopost == "save") { CheckCSRF(); @@ -27,7 +24,6 @@ if ($dopost == "save") { fclose($fp); echo ""; } - //读出 if (empty($allsource) && filesize($m_file) > 0) { $fp = fopen($m_file, 'r'); @@ -44,4 +40,4 @@ $win->AddHidden('token', $_SESSION['token']); $win->AddTitle("如果您要启用字符串混淆来防采集,请在文档模板需要的字段加上 function='RndString(@me)' 属性,如:{dede:field name='body' function='RndString(@me)'/}"); $win->AddMsgItem(""); $winform = $win->GetWindow('ok'); -$win->Display(); +$win->Display(); \ No newline at end of file diff --git a/src/admin/article_test_same.php b/src/admin/article_test_same.php index 075651ec..ba00884c 100644 --- a/src/admin/article_test_same.php +++ b/src/admin/article_test_same.php @@ -30,24 +30,19 @@ if ($dopost == 'analyse') { else if ($dopost == 'delsel') { require_once(DEDEINC."/typelink/typelink.class.php"); require_once(dirname(__FILE__)."/inc/inc_batchup.php"); - if (empty($titles)) { header("Content-Type: text/html; charset={$cfg_ver_lang}"); echo "\r\n"; echo "没有指定删除的文档"; exit(); } - $titless = split('`', $titles); - if ($channelid < -1) { $orderby = ($deltype == 'delnew' ? " ORDER BY aid DESC " : " ORDER BY aid ASC "); } else { $orderby = ($deltype == 'delnew' ? " ORDER BY id DESC " : " ORDER BY id ASC "); } - $totalarc = 0; - foreach ($titless as $title) { $title = trim($title); $title = addslashes($title == '' ? '' : urldecode($title)); @@ -71,13 +66,12 @@ else if ($dopost == 'delsel') { } } $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); - ShowMsg("一共删除了[{$totalarc}]篇重复的文档", "javascript:;"); + ShowMsg("一共删除了 [{$totalarc}] 篇重复的文档", "javascript:;"); exit(); } - //向导页 $channelinfos = array(); $dsql->setquery("SELECT id,typename,maintable,addtable FROM `#@__channeltype` "); $dsql->execute(); while ($row = $dsql->getarray()) $channelinfos[] = $row; -include DedeInclude('templets/article_test_same.htm'); +include DedeInclude('templets/article_test_same.htm'); \ No newline at end of file diff --git a/src/admin/article_writer_edit.php b/src/admin/article_writer_edit.php index 21afbdf6..80d11b24 100644 --- a/src/admin/article_writer_edit.php +++ b/src/admin/article_writer_edit.php @@ -12,12 +12,9 @@ require_once(dirname(__FILE__).'/config.php'); require_once(DEDEINC.'/libraries/oxwindow.class.php'); CheckPurview('sys_Writer'); if (empty($dopost)) $dopost = ''; - if (empty($allwriter)) $allwriter = ''; else $allwriter = stripslashes($allwriter); - $m_file = DEDEDATA."/admin/writer.txt"; - //保存 if ($dopost == "save") { $fp = fopen($m_file, 'w'); @@ -26,7 +23,6 @@ if ($dopost == "save") { fclose($fp); echo ""; } - //读出 if (empty($allwriter) && filesize($m_file) > 0) { $fp = fopen($m_file, 'r'); @@ -41,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/baidunews.php b/src/admin/baidunews.php index cd17ec77..c2bf19de 100644 --- a/src/admin/baidunews.php +++ b/src/admin/baidunews.php @@ -19,12 +19,10 @@ if (empty($do)) { $baidunews .= "$cfg_webname \n"; $baidunews .= "$cfg_adminemail \n"; $baidunews .= "$cfg_updateperi \n"; - $limit = $cfg_baidunews_limit; if ($limit > 100 || $limit < 1) { $limit = 100; } - $query = "SELECT maintable.*, addtable.body, arctype.typename FROM `#@__archives` maintable LEFT JOIN `#@__addonarticle` addtable ON addtable.aid=maintable.id @@ -55,7 +53,6 @@ if (empty($do)) { $author = dede_htmlspecialchars($row['writer']); $source = dede_htmlspecialchars($row['source']); $pubdate = dede_htmlspecialchars(gmdate('Y-m-d H:i', $row['pubdate'] + $cfg_cli_time * 3600)); - $baidunews .= "\n"; $baidunews .= "$title \n"; $baidunews .= "$link \n"; @@ -76,4 +73,4 @@ if (empty($do)) { fwrite($fp, $baidunews); fclose($fp); showmsg("{$filename}生成成功", 'javascript:;'); -} +} \ No newline at end of file diff --git a/src/admin/cards_make.php b/src/admin/cards_make.php index 7b16cad1..abe6180d 100644 --- a/src/admin/cards_make.php +++ b/src/admin/cards_make.php @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Card'); if (empty($dopost)) $dopost = ''; if ($dopost == '') include(DEDEADMIN."/templets/cards_make.htm"); - //生成点卡 elseif ($dopost == 'make') { $row = $dsql->GetOne("SELECT * FROM #@__moneycard_record ORDER BY aid DESC"); @@ -25,9 +24,7 @@ elseif ($dopost == 'make') { $ctid = $cardtype; $startid++; $endid = $startid + $mnum; - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - for (; $startid < $endid; $startid++) { $cardid = $snprefix.$startid.'-'; for ($p = 0; $p < $pwdgr; $p++) { @@ -55,4 +52,4 @@ elseif ($dopost == 'make') { echo "成功生成点卡:{$cardid}
"; } echo "成功生成 {$mnum} 个点卡"; -} +} \ No newline at end of file diff --git a/src/admin/cards_manage.php b/src/admin/cards_manage.php index f5a65a05..ffd31382 100644 --- a/src/admin/cards_manage.php +++ b/src/admin/cards_manage.php @@ -25,25 +25,21 @@ if ($dopost == "delete") { } else { $addsql = ''; if (isset($isexp)) $addsql = " WHERE isexp='$isexp' "; - $sql = "SELECT * FROM #@__moneycard_record $addsql ORDER BY aid DESC"; $dlist = new DataListCP(); - $dlist->pageSize = 25; //设定每页显示记录数(默认25条) + $dlist->pageSize = 30;//设定每页显示记录数 if (isset($isexp)) $dlist->SetParameter("isexp", $isexp); - $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); $dlist->dsql->Execute('ts'); while ($rw = $dlist->dsql->GetArray('ts')) { $TypeNames[$rw['tid']] = $rw['pname']; } $tplfile = DEDEADMIN."/templets/cards_manmage.htm"; - //这两句的顺序不能更换 $dlist->SetTemplate($tplfile); //载入模板 $dlist->SetSource($sql); //设定查询SQL $dlist->Display(); //显示 } - function GetMemberID($mid) { global $dsql; @@ -52,7 +48,6 @@ function GetMemberID($mid) if (is_array($row)) return "".$row['userid'].""; else return '0'; } - function GetUseDate($time = 0) { if (!empty($time)) return GetDateMk($time); @@ -63,4 +58,4 @@ function GetSta($sta) if ($sta == 1) return '已售出'; else if ($sta == -1) return '已使用'; else return '未使用'; -} +} \ No newline at end of file diff --git a/src/admin/catalog_menu.php b/src/admin/catalog_menu.php index c1cf9797..71c37f35 100644 --- a/src/admin/catalog_menu.php +++ b/src/admin/catalog_menu.php @@ -20,4 +20,4 @@ if ($cuserLogin->adminStyle == 'dedecms') { } else { include DedeInclude('templets/catalog_menu2.htm'); exit(); -} +} \ No newline at end of file diff --git a/src/admin/content_sg_list.php b/src/admin/content_sg_list.php index a993930b..4e343eb1 100644 --- a/src/admin/content_sg_list.php +++ b/src/admin/content_sg_list.php @@ -66,7 +66,7 @@ LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel $whereSql ORDER BY arc.aid DESC"; $dlist = new DataListCP(); -$dlist->pageSize = 20; +$dlist->pageSize = 30; $dlist->SetParameter("dopost", "listArchives"); $dlist->SetParameter("keyword", $keyword); $dlist->SetParameter("cid", $cid); diff --git a/src/admin/diy_add.php b/src/admin/diy_add.php index 1293fb4d..9d0cea61 100644 --- a/src/admin/diy_add.php +++ b/src/admin/diy_add.php @@ -39,10 +39,8 @@ if (empty($action)) { } else { $query = "SHOW TABLES"; } - $dsql->SetQuery($query); $dsql->Execute("biz"); - while ($row = $dsql->GetArray("biz")) { if (empty($row[0])) $row[0] = ''; if ($table == $row[0]) { @@ -66,4 +64,4 @@ if (empty($action)) { } else { showmsg('自定义表单创建失败', '-1'); } -} +} \ No newline at end of file diff --git a/src/admin/diy_field_edit.php b/src/admin/diy_field_edit.php index 35d0acc6..2da4d5b6 100644 --- a/src/admin/diy_field_edit.php +++ b/src/admin/diy_field_edit.php @@ -37,7 +37,6 @@ foreach ($ds as $d) { function _SAVE() ----------------------*/ if ($action == 'save') { - if (!isset($fieldtypes[$dtype])) { ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); exit(); diff --git a/src/admin/diy_list.php b/src/admin/diy_list.php index 37ddf820..03cee817 100644 --- a/src/admin/diy_list.php +++ b/src/admin/diy_list.php @@ -13,7 +13,7 @@ CheckPurview('c_New'); $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; $action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete','excel')) ? $action : ''; if (empty($diyid)) { - showMsg("非法操作!", 'javascript:;'); + showMsg("非法操作", 'javascript:;'); exit(); } require_once DEDEINC.'/diyform.class.php'; @@ -69,7 +69,7 @@ if ($action == 'post') { include_once DEDEINC.'/datalistcp.class.php'; $query = "SELECT * FROM {$diy->table} ORDER BY id DESC"; $datalist = new DataListCP(); - $datalist->pageSize = 10; + $datalist->pageSize = 30; $datalist->SetParameter('action', 'list'); $datalist->SetParameter('diyid', $diyid); $datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); diff --git a/src/admin/feedback_main.php b/src/admin/feedback_main.php index 6a2e310f..eaffe9f5 100644 --- a/src/admin/feedback_main.php +++ b/src/admin/feedback_main.php @@ -100,7 +100,7 @@ else { $querystring = "SELECT * FROM `#@__feedback` WHERE msg LIKE '%$keyword%' $addsql ORDER BY dtime DESC"; $dlist = new DataListCP(); - $dlist->pageSize = 15; + $dlist->pageSize = 30; $dlist->SetParameter('aid', $aid); $dlist->SetParameter('ip', $ip); $dlist->SetParameter('typeid', $typeid); diff --git a/src/admin/freelist_main.php b/src/admin/freelist_main.php index 46e54f3a..6ffeb421 100644 --- a/src/admin/freelist_main.php +++ b/src/admin/freelist_main.php @@ -12,7 +12,7 @@ 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($pagesize)) $pageSize = 30; if(empty($pageno)) $pageno = 1; if(empty($dopost)) $dopost = ''; if(empty($orderby)) $orderby = 'aid'; diff --git a/src/admin/friendlink_add.php b/src/admin/friendlink_add.php index fa94d235..4c250585 100644 --- a/src/admin/friendlink_add.php +++ b/src/admin/friendlink_add.php @@ -11,7 +11,6 @@ require(dirname(__FILE__)."/config.php"); CheckPurview('plus_友情链接模块'); if (empty($dopost)) $dopost = ""; - if ($dopost == "add") { $dtime = time(); if (is_uploaded_file($logoimg)) { diff --git a/src/admin/friendlink_edit.php b/src/admin/friendlink_edit.php index 97b223b7..20a66a16 100644 --- a/src/admin/friendlink_edit.php +++ b/src/admin/friendlink_edit.php @@ -13,7 +13,6 @@ CheckPurview('plus_友情链接模块'); $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'friendlink_main.php' : $_COOKIE['ENV_GOBACK_URL']; if (empty($dopost)) $dopost = ""; $id = isset($id)? intval($id) : 0; - if (isset($allid)) { $aids = explode(',', $allid); if (count($aids) == 1) { diff --git a/src/admin/log_list.php b/src/admin/log_list.php index 0868204a..f19a9241 100644 --- a/src/admin/log_list.php +++ b/src/admin/log_list.php @@ -34,7 +34,7 @@ while ($myrow = $dsql->GetObject('admin')) { $adminlist .= "\r\n"; } $dlist = new DataListCP(); -$dlist->pageSize = 20; +$dlist->pageSize = 30; $dlist->SetParameter("adminid", $adminid); $dlist->SetParameter("cip", $cip); $dlist->SetParameter("dtime", $dtime); diff --git a/src/admin/makehtml_all.php b/src/admin/makehtml_all.php index b9682a32..543a18e0 100644 --- a/src/admin/makehtml_all.php +++ b/src/admin/makehtml_all.php @@ -11,14 +11,12 @@ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/channelunit.func.php"); $action = (empty($action) ? '' : $action); - if ($action == '') { require_once(DEDEADMIN."/templets/makehtml_all.htm"); exit(); } else if ($action == 'make') { //step = 1 更新主页、step = 2 更新内容、step = 3 更新栏目 if (empty($step)) $step = 1; - //更新文档前优化数据 /*------------------- function _1_OptimizeData1() @@ -83,7 +81,6 @@ else if ($step == 4) { while ($row = $dsql->GetArray()) { $typeids[$row['typeid']] = 1; } - foreach ($typeids as $k => $v) { $vs = array(); $vs = GetParentIds($k); @@ -128,10 +125,9 @@ else if ($step == 10) { OptimizeData($dsql); ShowMsg("完成所有文件的更新", "javascript:;"); exit(); - } //make step - -} //action=='make' + }//make step +}//action=='make' /** * 优化数据 * @@ -152,4 +148,4 @@ function OptimizeData($dsql) $tptable = ''; foreach ($tptables as $t) $tptable .= ($tptable == '' ? "`{$t}`" : ",`{$t}`"); $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable; "); -} +} \ No newline at end of file diff --git a/src/admin/makehtml_archives.php b/src/admin/makehtml_archives.php index c84a3b37..3ecf0dc4 100644 --- a/src/admin/makehtml_archives.php +++ b/src/admin/makehtml_archives.php @@ -10,4 +10,4 @@ */ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/typelink/typelink.class.php"); -include DedeInclude('templets/makehtml_archives.htm'); +include DedeInclude('templets/makehtml_archives.htm'); \ No newline at end of file diff --git a/src/admin/makehtml_archives_action.php b/src/admin/makehtml_archives_action.php index 2045e9c8..a91dc258 100644 --- a/src/admin/makehtml_archives_action.php +++ b/src/admin/makehtml_archives_action.php @@ -16,7 +16,7 @@ $est1 = ExecTime(); $startid = (empty($startid) ? -1 : $startid); $endid = (empty($endid) ? 0 : $endid); $startdd = (empty($startdd) ? 0 : $startdd); -$pagesize = (empty($pagesize) ? 20 : $pagesize); +$pagesize = (empty($pagesize) ? 30 : $pagesize); $totalnum = (empty($totalnum) ? 0 : $totalnum); $typeid = (empty($typeid) ? 0 : $typeid); $seltime = (empty($seltime) ? 0 : $seltime); diff --git a/src/admin/makehtml_freelist.php b/src/admin/makehtml_freelist.php index 049b125f..6ecef5ef 100644 --- a/src/admin/makehtml_freelist.php +++ b/src/admin/makehtml_freelist.php @@ -9,4 +9,4 @@ * @link https://www.dedebiz.com */ require_once(dirname(__FILE__)."/config.php"); -require_once(DEDEADMIN."/templets/makehtml_freelist.htm"); +require_once(DEDEADMIN."/templets/makehtml_freelist.htm"); \ No newline at end of file diff --git a/src/admin/makehtml_freelist_action.php b/src/admin/makehtml_freelist_action.php index 39c02877..4a104f9c 100644 --- a/src/admin/makehtml_freelist_action.php +++ b/src/admin/makehtml_freelist_action.php @@ -34,8 +34,7 @@ if (isset($idArray[$pageno])) { $lv = new FreeList($lid); $ntotalpage = $lv->TotalPage; if (empty($mkpage)) $mkpage = 1; -if (empty($maxpagesize)) $maxpagesize = 50; - +if (empty($maxpagesize)) $maxpageSize = 30; //如果栏目的文档太多,分多批次更新 if ($ntotalpage <= $maxpagesize) { $lv->MakeHtml(); @@ -61,4 +60,4 @@ if ($nextpage == $totalpage) { ShowMsg("列表:".$tid.",继续进行操作", $gourl, 0, 100); } } -$dsql->ExecuteNoneQuery("Update `#@__freelist` set nodefault='1' where aid='$startid';"); +$dsql->ExecuteNoneQuery("Update `#@__freelist` set nodefault='1' where aid='$startid';"); \ No newline at end of file diff --git a/src/admin/makehtml_js.php b/src/admin/makehtml_js.php index 1fcba0de..d29b804b 100644 --- a/src/admin/makehtml_js.php +++ b/src/admin/makehtml_js.php @@ -10,4 +10,4 @@ */ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/typelink/typelink.class.php"); -include DedeInclude('templets/makehtml_js.htm'); +include DedeInclude('templets/makehtml_js.htm'); \ No newline at end of file diff --git a/src/admin/makehtml_js_action.php b/src/admin/makehtml_js_action.php index f611bcfb..0065b142 100644 --- a/src/admin/makehtml_js_action.php +++ b/src/admin/makehtml_js_action.php @@ -12,10 +12,8 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); require_once(DEDEINC."/archive/partview.class.php"); if (empty($typeid)) $typeid = 0; - if (empty($templet)) $templet = "plus/js.htm"; if (empty($uptype)) $uptype = "all"; - if ($uptype == "all") { $row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE id>'$typeid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); if (!is_array($row)) { @@ -40,4 +38,4 @@ if ($uptype == "all") { echo "
"; echo ""; exit(); -} +} \ No newline at end of file diff --git a/src/admin/makehtml_list.php b/src/admin/makehtml_list.php index 910536ad..1c46c222 100644 --- a/src/admin/makehtml_list.php +++ b/src/admin/makehtml_list.php @@ -10,4 +10,4 @@ */ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/typelink/typelink.class.php"); -include DedeInclude('templets/makehtml_list.htm'); +include DedeInclude('templets/makehtml_list.htm'); \ No newline at end of file diff --git a/src/admin/makehtml_list_action.php b/src/admin/makehtml_list_action.php index 142eec8e..9f4f064a 100644 --- a/src/admin/makehtml_list_action.php +++ b/src/admin/makehtml_list_action.php @@ -18,7 +18,7 @@ if (empty($pageno)) $pageno = 0; if (empty($mkpage)) $mkpage = 1; if (empty($typeid)) $typeid = 0; if (!isset($uppage)) $uppage = 0; -if (empty($maxpagesize)) $maxpagesize = 50; +if (empty($maxpagesize)) $maxpageSize = 30; $adminID = $cuserLogin->getUserID(); //检测获取所有栏目ID //普通生成或一键更新时更新所有栏目 diff --git a/src/admin/makehtml_map.php b/src/admin/makehtml_map.php index 2071b0f3..bdf1c3f5 100644 --- a/src/admin/makehtml_map.php +++ b/src/admin/makehtml_map.php @@ -11,12 +11,10 @@ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/sitemap.class.php"); require_once(DEDEINC."/dedetag.class.php"); - if (empty($dopost)) { - ShowMsg("参数错误!", "-1"); + ShowMsg("参数错误", "-1"); exit(); } - $serviterm = empty($serviterm) ? "" : $serviterm; $sm = new SiteMap(); $maplist = $sm->GetSiteMap($dopost); @@ -33,4 +31,4 @@ $dtp->SaveTo($cfg_basedir.$murl); $dtp->Clear(); echo ""; echo "
成功更新文件: $murl 浏览
"; -exit(); +exit(); \ No newline at end of file diff --git a/src/admin/makehtml_rss.php b/src/admin/makehtml_rss.php index d2b943e0..ee54a1e3 100644 --- a/src/admin/makehtml_rss.php +++ b/src/admin/makehtml_rss.php @@ -9,4 +9,4 @@ * @link https://www.dedebiz.com */ require_once(dirname(__FILE__)."/config.php"); -include DedeInclude('templets/makehtml_rss.htm'); +include DedeInclude('templets/makehtml_rss.htm'); \ No newline at end of file diff --git a/src/admin/makehtml_rss_action.php b/src/admin/makehtml_rss_action.php index e6d1f85f..1abd8ca6 100644 --- a/src/admin/makehtml_rss_action.php +++ b/src/admin/makehtml_rss_action.php @@ -11,10 +11,8 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); require_once(DEDEINC."/archive/rssview.class.php"); - if (empty($tid)) $tid = 0; if (empty($maxrecord)) $maxrecord = 50; - $row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE id>'$tid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); if (!is_array($row)) { echo ""; @@ -24,4 +22,4 @@ if (!is_array($row)) { $rssurl = $rv->MakeRss(0); $tid = $row['id']; ShowMsg("成功更新".$rssurl.",继续进行操作", "makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord", 0, 100); -} +} \ No newline at end of file diff --git a/src/admin/makehtml_spec.php b/src/admin/makehtml_spec.php index c437f003..0b0bec1a 100644 --- a/src/admin/makehtml_spec.php +++ b/src/admin/makehtml_spec.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); if (empty($dopost)) $dopost = ""; - if ($dopost == "ok") { require_once(DEDEINC."/archive/specview.class.php"); $sp = new SpecView(); @@ -20,4 +19,4 @@ if ($dopost == "ok") { echo "
成功生成所有专题列表 预览
"; exit(); } -include DedeInclude('templets/makehtml_spec.htm'); +include DedeInclude('templets/makehtml_spec.htm'); \ No newline at end of file diff --git a/src/admin/makehtml_taglist.php b/src/admin/makehtml_taglist.php index 01836f2a..0d1e58e6 100644 --- a/src/admin/makehtml_taglist.php +++ b/src/admin/makehtml_taglist.php @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); $tagid = isset($tagid)? (int)$tagid : 0; $action = isset($action)? $action : ''; $search = isset($search)? HtmlReplace($search, 0) : ''; - if ($action == "search") { if (!empty($search)) { $sql="select * from #@__tagindex where tag like '%$search%' order by id desc"; @@ -36,5 +35,4 @@ if ($action == "search") { echo json_encode($result); exit; } - -include DedeInclude('templets/makehtml_taglist.htm'); +include DedeInclude('templets/makehtml_taglist.htm'); \ No newline at end of file diff --git a/src/admin/makehtml_taglist_action.php b/src/admin/makehtml_taglist_action.php index 685ad74a..ba824b86 100644 --- a/src/admin/makehtml_taglist_action.php +++ b/src/admin/makehtml_taglist_action.php @@ -16,7 +16,7 @@ if (empty($mktime)) $mktime = time(); if (empty($mkpage)) $mkpage = 1; if (empty($upall)) $upall = 0; //是否更新全部 0为更新单个 1为更新全部 if (empty($ctagid)) $ctagid = 0; //当前处理的tagid -if (empty($maxpagesize)) $maxpagesize = 50; +if (empty($maxpagesize)) $maxpageSize = 30; $startid = isset($startid) ? intval($startid) : 0; $endid = isset($endid) ? intval($endid) : 0; $tagid = isset($tagid) ? intval($tagid) : 0; @@ -66,7 +66,6 @@ if (is_array($tag) && count($tag) > 0) { $mkpage = $mkpage + $maxpagesize; if ($mkpage >= ($ntotalpage + 1)) $finishType = TRUE; } - $nextpage = $pageno + 1; $onefinish = $nextpage >= $ntotalpage && $finishType; if (($upall == 0 && $onefinish) || ($upall == 1 && $allfinish && $onefinish)) { diff --git a/src/admin/media_add.php b/src/admin/media_add.php index 66cb921c..d94b85c9 100644 --- a/src/admin/media_add.php +++ b/src/admin/media_add.php @@ -9,10 +9,8 @@ * @link https://www.dedebiz.com */ require_once(dirname(__FILE__)."/config.php"); - //增加权限检查 if (empty($dopost)) $dopost = ""; - //上传 if ($dopost == "upload") { CheckCSRF(); @@ -23,14 +21,12 @@ if ($dopost == "upload") { $uptime = time(); $adminid = $cuserLogin->getUserID(); $width = $height = ''; - for ($i = 0; $i <= 40; $i++) { if (isset(${"upfile".$i}) && is_uploaded_file(${"upfile".$i})) { $filesize = ${"upfile".$i."_size"}; $upfile_type = ${"upfile".$i."_type"}; $upfile_name = ${"upfile".$i."_name"}; $dpath = MyDate("ymd", $uptime); - if (in_array($upfile_type, $sparr_image)) { $mediatype = 1; $savePath = $cfg_image_dir."/".$dpath; @@ -57,8 +53,8 @@ if ($dopost == "upload") { CloseFtp(); } /* - dedecms后台文件任意上传漏洞 - 漏洞描述:dedecms早期版本后台存在大量的富文本编辑器,该控件提供了一些文件上传接口,同时dedecms对上传文件的后缀类型未进行严格的限制,这导致了黑客可以上传WEBSHELL,获取网站后台权限 + 后台文件任意上传漏洞 + 漏洞描述:早期版本后台存在大量的富文本编辑器,该控件提供了一些文件上传接口,同时对上传文件的后缀类型未进行严格的限制,这导致了黑客可以上传WEBSHELL,获取网站后台权限 */ if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)$#i', trim($filename))) { ShowMsg("您指定的文件名被系统禁止", "javascript:;"); @@ -74,7 +70,6 @@ if ($dopost == "upload") { ShowMsg("仅支持媒体文件及应用程序上传", -1); exit; } - if ($mediatype == 1) { @move_uploaded_file(${"upfile".$i}, $fullfilename); $info = ''; @@ -91,7 +86,7 @@ if ($dopost == "upload") { $ntitle = $title; } $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$ntitle','$filename','$mediatype','$width','$height','$playtime','$filesize','$uptime','$adminid'); "; + VALUES ('$ntitle','$filename','$mediatype','$width','$height','$playtime','$filesize','$uptime','$adminid'); "; $okdd++; $dsql->ExecuteNoneQuery($inquery); } @@ -99,4 +94,4 @@ if ($dopost == "upload") { ShowMsg("成功上传 {$okdd} 个文件", "media_main.php"); exit(); } -include DedeInclude('templets/media_add.htm'); +include DedeInclude('templets/media_add.htm'); \ No newline at end of file diff --git a/src/admin/media_edit.php b/src/admin/media_edit.php index ca45ba3e..0d2ce552 100644 --- a/src/admin/media_edit.php +++ b/src/admin/media_edit.php @@ -9,12 +9,10 @@ * @link https://www.dedebiz.com */ require_once(dirname(__FILE__)."/config.php"); - //权限检查 CheckPurview('sys_Upload,sys_MyUpload'); if (empty($dopost)) $dopost = ""; $backurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "javascript:history.go(-1);"; - /*--------------------------- function __del_file() //删除附件 -----------------------------*/ @@ -50,7 +48,6 @@ if ($dopost == 'del') { } $dsql->SetQuery("SELECT aid,url FROM `#@__uploads` $idquery "); $dsql->Execute(); - while ($myrow = $dsql->GetArray()) { $truefile = $cfg_basedir.$myrow['url']; $rs = 0; @@ -78,7 +75,6 @@ else if ($dopost == 'save') { if ($myrow['mid'] != $cuserLogin->getUserID()) { CheckPurview('sys_Upload'); } - //检测文件类型 $addquery = ""; if (is_uploaded_file($upfile)) { @@ -109,7 +105,6 @@ else if ($dopost == 'save') { exit(); } } - //保存文件 $nowtime = time(); $oldfile = $myrow['url']; @@ -129,7 +124,6 @@ else if ($dopost == 'save') { ShowMsg("仅支持媒体文件及应用程序上传", -1); exit; } - @move_uploaded_file($upfile, $fullfilename); if ($mediatype == 1) { require_once(DEDEINC."/image.func.php"); @@ -156,7 +150,6 @@ else if ($dopost == 'save') { } else { $fileurl = $filename; } - //写入数据库 $query = " UPDATE #@__uploads SET title='$title',mediatype='$mediatype',playtime='$playtime'"; $query .= "$addquery WHERE aid='$aid' "; @@ -164,11 +157,10 @@ else if ($dopost == 'save') { ShowMsg('成功修改一则附件数据', 'media_edit.php?aid='.$aid); exit(); } - //读取档案信息 $myrow = $dsql->GetOne("SELECT * FROM #@__uploads WHERE aid='".$aid."'"); if (!is_array($myrow)) { ShowMsg('错误,找不到此编号的档案', 'javascript:;'); exit(); } -include DedeInclude('templets/media_edit.htm'); +include DedeInclude('templets/media_edit.htm'); \ No newline at end of file diff --git a/src/admin/media_main.php b/src/admin/media_main.php index e9a0d5b5..52dbf003 100644 --- a/src/admin/media_main.php +++ b/src/admin/media_main.php @@ -46,7 +46,7 @@ LEFT JOIN `#@__admin` a ON a.id = u.mid LEFT JOIN `#@__member` m ON m.mid = u.mid $addsql ORDER BY u.aid DESC"; $dlist = new DataListCP(); -$dlist->pageSize = 20; +$dlist->pageSize = 30; $dlist->SetParameter("mediatype", $mediatype); $dlist->SetParameter("keyword", $keyword); $dlist->SetParameter("membertype", $membertype); diff --git a/src/admin/member_do.php b/src/admin/member_do.php index 748404aa..7b4f1f8d 100644 --- a/src/admin/member_do.php +++ b/src/admin/member_do.php @@ -42,7 +42,6 @@ if ($dopost == "delmember") { $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid='$id' LIMIT 1"); $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid='$id' LIMIT 1"); $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid='$id' LIMIT 1"); - //删除用户相关数据 $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid='$id' "); $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='$id' "); @@ -182,7 +181,6 @@ else if ($dopost == 'edituser') { WHERE mid='$id' "; $rs = $dsql->ExecuteNoneQuery2($query); } - ShowMsg('成功修改会员资料', 'member_view.php?id='.$id); exit(); } diff --git a/src/admin/member_main.php b/src/admin/member_main.php index b4cec48c..23ff9fdf 100644 --- a/src/admin/member_main.php +++ b/src/admin/member_main.php @@ -12,19 +12,15 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_List'); require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); - if (!isset($sex)) $sex = ''; if (!isset($mtype)) $mtype = ''; if (!isset($spacesta)) $spacesta = -10; if (!isset($matt)) $matt = 10; - if (!isset($keyword)) $keyword = ''; else $keyword = trim(FilterSearch($keyword)); - $mtypeform = empty($mtype) ? "\r\n" : "\r\n"; $sexform = empty($sex) ? "\r\n" : "\r\n"; $sortkey = empty($sortkey) ? 'mid' : preg_replace("#[^a-z]#i", '', $sortkey); - $staArr = array(-2 => '限制用户(禁言)', -1 => '未通过审核', 0 => '审核通过,提示填写完整信息', 1 => '没填写详细资料', 2 => '正常使用状态'); $staArrmatt = array(1 => '被推荐', 0 => '非普通 '); $MemberTypes = array(); @@ -33,7 +29,6 @@ $dsql->Execute(); while ($row = $dsql->GetObject()) { $MemberTypes[$row->rank] = $row->membername; } - if ($sortkey == 'mid') { $sortform = "\r\n"; } else if ($sortkey == 'rank') { @@ -45,30 +40,23 @@ if ($sortkey == 'mid') { } else { $sortform = "\r\n"; } - $wheres[] = " (userid LIKE '%$keyword%' OR uname LIKE '%$keyword%' OR email LIKE '%$keyword%') "; - if ($sex != '') { $wheres[] = " sex LIKE '$sex' "; } - if ($mtype != '') { $wheres[] = " mtype LIKE '$mtype' "; } - if ($spacesta != -10) { $wheres[] = " spacesta = '$spacesta' "; } - if ($matt != 10) { $wheres[] = " matt= '$matt' "; } - $whereSql = join(' AND ', $wheres); if ($whereSql != '') { $whereSql = ' WHERE '.$whereSql; } - $sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC "; $dlist = new DataListCP(); $dlist->SetParameter('sex', $sex); @@ -80,7 +68,6 @@ $dlist->SetParameter('keyword', $keyword); $dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm"); $dlist->SetSource($sql); $dlist->display(); - function GetMemberName($rank, $mt) { global $MemberTypes; @@ -92,10 +79,9 @@ function GetMemberName($rank, $mt) else return $mt; } } - function GetMAtt($m) { if ($m < 1) return ''; else if ($m == 10) return " [管理员]"; else return "  [荐]"; -} +} \ No newline at end of file diff --git a/src/admin/member_operations.php b/src/admin/member_operations.php index 15773853..13656b42 100644 --- a/src/admin/member_operations.php +++ b/src/admin/member_operations.php @@ -12,31 +12,25 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Operations'); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); require_once(DEDEINC.'/datalistcp.class.php'); - if (empty($buyid)) $buyid = ''; $addsql = " WHERE buyid LIKE '%$buyid%' "; if (isset($sta)) $addsql .= " AND sta='$sta' "; - $sql = "SELECT * FROM `#@__member_operation` $addsql ORDER BY aid DESC"; $dlist = new DataListCP(); - -//设定每页显示记录数(默认25条) -$dlist->pageSize = 25; +//设定每页显示记录数 +$dlist->pageSize = 30; $dlist->SetParameter("buyid", $buyid); if (isset($sta)) $dlist->SetParameter("sta", $sta); - $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); $dlist->dsql->Execute('ts'); while ($rw = $dlist->dsql->GetArray('ts')) { $TypeNames[$rw['tid']] = $rw['pname']; } $tplfile = DEDEADMIN."/templets/member_operations.htm"; - //这两句的顺序不能更换 $dlist->SetTemplate($tplfile); //载入模板 $dlist->SetSource($sql); //设定查询SQL $dlist->Display(); //显示 - function GetMemberID($mid) { global $dsql; @@ -50,7 +44,6 @@ function GetMemberID($mid) return '0'; } } - function GetPType($tname) { if ($tname == 'card') return '点数卡'; @@ -58,7 +51,6 @@ function GetPType($tname) else if ($tname == 'stc') return '兑换金币'; else return '会员升级'; } - function GetSta($sta) { if ($sta == 0) { @@ -68,4 +60,4 @@ function GetSta($sta) } else { return '已完成'; } -} +} \ No newline at end of file diff --git a/src/admin/member_pm.php b/src/admin/member_pm.php index b0059bf3..a383e84b 100644 --- a/src/admin/member_pm.php +++ b/src/admin/member_pm.php @@ -12,23 +12,19 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Pm'); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); require_once(DEDEINC.'/datalistcp.class.php'); - if (!isset($folder)) $folder = ''; if (!isset($username)) $username = ''; if (!isset($keyword)) $keyword = ''; - if (isset($dopost)) { $ID = preg_replace("#[^0-9]#", "", $ID); if ($dopost == "del" && !empty($ID)) { $dsql->ExecuteNoneQuery("DELETE FROM #@__member_pms WHERE id='$ID'"); } } - $whereSql = ''; if (!empty($folder)) $whereSql = "WHERE folder='$folder'"; $postuser = "收件人"; if ($folder == "inbox" || $folder == '') $postuser = "发件人"; - if (!empty($keyword)) { $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$keyword."%')"; } @@ -37,7 +33,7 @@ if (!empty($username)) { } $sql = "SELECT * FROM #@__member_pms $whereSql ORDER BY sendtime desc"; $dlist = new DataListCP(); -$dlist->pagesize = 25; +$dlist->pageSize = 30; $dlist->SetParameter("folder", $folder); $dlist->SetParameter("username", $username); $dlist->SetParameter("keyword", $keyword); @@ -45,16 +41,14 @@ $dlist->SetTemplate(DEDEADMIN."/templets/member_pm.htm"); $dlist->SetSource($sql); $dlist->Display(); $dlist->Close(); - function GetFolders($me) { if ($me == "outbox") return '发件箱'; else if ($me == "inbox") return '收件箱'; } - function IsReader($me) { $me = preg_replace("#[^0-1]#", "", $me); if ($me) return ""; else return "×"; -} +} \ No newline at end of file diff --git a/src/admin/member_pmall.php b/src/admin/member_pmall.php index 058a22a4..5dd7f158 100644 --- a/src/admin/member_pmall.php +++ b/src/admin/member_pmall.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Pm'); if (!isset($action)) $action = ''; - if ($action == "post") { $floginid = 'admin'; $fromid = 0; @@ -28,9 +27,8 @@ if ($action == "post") { ShowMsg('请填写短信内容!', '-1'); exit(); } - $rs = $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_pms`(floginid,fromid,toid,tologinid,folder,hasview,subject,sendtime,writetime,message,isadmin) VALUES('$floginid','$fromid','$toid','$tologinid','outbox','0','$subject','$sendtime','$writetime','$message','1');"); ShowMsg('短信已成功发送', '-1'); exit(); } -require_once(DEDEADMIN."/templets/member_pmall.htm"); +require_once(DEDEADMIN."/templets/member_pmall.htm"); \ No newline at end of file diff --git a/src/admin/member_pmone.php b/src/admin/member_pmone.php index f0ba11de..648645ae 100644 --- a/src/admin/member_pmone.php +++ b/src/admin/member_pmone.php @@ -23,10 +23,8 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = true) if ($cfg_md_idurl == 'Y' && preg_match("#[^a-z0-9]#i", $uid)) { return $msgtitle.'必须由英文字母或数字组成'; } - if ($cfg_soft_lang == 'utf-8') $ck_uid = utf82gb($uid); else $ck_uid = $uid; - for ($i = 0; isset($ck_uid[$i]); $i++) { if (ord($ck_uid[$i]) > 0x80) { if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { @@ -46,7 +44,6 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = true) } return 'ok'; } - if (!isset($action)) $action = ''; if ($action == "post") { $floginid = $cuserLogin->getUserName(); @@ -68,13 +65,11 @@ if ($action == "post") { $subject = cn_substrR(HtmlReplace($subject, 1), 60); $message = cn_substrR(HtmlReplace($message, 0), 1024); $sendtime = $writetime = time(); - //发给收件人(收件人可管理) $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) - VALUES ('$floginid','$fromid','{$row['mid']}','{$row['userid']}','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; - + VALUES ('$floginid','$fromid','{$row['mid']}','{$row['userid']}','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; $dsql->ExecuteNoneQuery($inquery); ShowMsg('短信已成功发送', 'member_pmone.php'); exit(); } -require_once(DEDEADMIN."/templets/member_pmone.htm"); +require_once(DEDEADMIN."/templets/member_pmone.htm"); \ No newline at end of file diff --git a/src/admin/member_rank.php b/src/admin/member_rank.php index c5445265..c8f92563 100644 --- a/src/admin/member_rank.php +++ b/src/admin/member_rank.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Type'); if (empty($dopost)) $dopost = ''; - //保存修改 if ($dopost == 'save') { $startID = 1; @@ -45,7 +44,6 @@ if ($dopost == 'del') { ShowMsg("删除成功", "member_rank.php"); exit(); } - $dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>0 ORDER BY `rank`"); $dsql->Execute(); -include DedeInclude('templets/member_rank.htm'); +include DedeInclude('templets/member_rank.htm'); \ No newline at end of file diff --git a/src/admin/member_scores.php b/src/admin/member_scores.php index 9a74e793..4493ec75 100644 --- a/src/admin/member_scores.php +++ b/src/admin/member_scores.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Scores'); if (!isset($action)) $action = ''; - if ($action == 'save') { if (!empty($add_integral) && !empty($add_icon) && !empty($add_titles)) { $integral = preg_replace("#[^0-9]#", "", $add_integral); @@ -35,11 +34,10 @@ if ($action == 'save') { } } } - $Scores = array(); $dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC"); $dsql->Execute(); while ($rs = $dsql->GetArray()) { array_push($Scores, $rs); } -include DedeInclude('templets/member_scores.htm'); +include DedeInclude('templets/member_scores.htm'); \ No newline at end of file diff --git a/src/admin/member_toadmin.php b/src/admin/member_toadmin.php index 8be4132d..40fbe3dc 100644 --- a/src/admin/member_toadmin.php +++ b/src/admin/member_toadmin.php @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Edit'); if (empty($dopost)) $dopost = ''; if (empty($fmdo)) $fmdo = ''; - $ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? 'member_main.php' : ''; $row = array(); /*---------------- @@ -52,10 +51,10 @@ if ($dopost == "toadmin") { if ($typeid == '0') $typeid = ''; if ($id != 1) { $query = "INSERT INTO `#@__admin`(id,usertype,userid$inputpwd,uname,typeid,tname,email) - VALUES('$id','$usertype','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; + VALUES('$id','$usertype','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; } else { $query = "INSERT INTO `#@__admin`(id,userid$inputpwd,uname,typeid,tname,email) - VALUES('$id','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; + VALUES('$id','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; } $dsql->ExecuteNoneQuery($query); $query = "UPDATE `#@__member` SET `rank`='100',uname='$uname',matt='10',email='$email'$pwdm WHERE mid='$id'"; @@ -64,7 +63,7 @@ if ($dopost == "toadmin") { $floginid = $cuserLogin->getUserName(); $fromid = $cuserLogin->getUserID(); $subject = "恭喜您已经成功提升为管理员"; - $message = "亲爱的会员{$userid},您已经成功提升为{$row['typename']},具体操作权限请同网站超级管理员联系"; + $message = "亲爱的会员{$userid},您已经成功提升为{$row['typename']},具体操作权限请同网站超级管理员联系"; $sendtime = $writetime = time(); $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) VALUES ('$floginid','$fromid','$id','$userid','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; @@ -91,4 +90,4 @@ while ($nrow = $dsql->GetObject('op')) { } } $row = $dsql->GetOne("SELECT * FROM #@__member WHERE mid='$id'"); -include DedeInclude('templets/member_toadmin.htm'); +include DedeInclude('templets/member_toadmin.htm'); \ No newline at end of file diff --git a/src/admin/member_type.php b/src/admin/member_type.php index c445820e..ba4c9c2d 100644 --- a/src/admin/member_type.php +++ b/src/admin/member_type.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Type'); if (empty($dopost)) $dopost = ""; - //保存修改 if ($dopost == "save") { $startID = 1; @@ -34,7 +33,6 @@ if ($dopost == "save") { $dsql->ExecuteNoneQuery($query); } } - //增加新记录 if (isset($check_new) && $pname_new != '') { $query = "INSERT INTO `#@__member_type`(`rank`,pname,money,exptime) VALUES('{$rank_new}','{$pname_new}','{$money_new}','{$exptime_new}');"; @@ -49,7 +47,6 @@ $dsql->Execute(); while ($row = $dsql->GetArray()) { $arcranks[$row['rank']] = $row['membername']; } - $times = array(); $times[7] = '一周'; $times[30] = '一个月'; @@ -57,5 +54,4 @@ $times[90] = '三个月'; $times[183] = '半年'; $times[366] = '一年'; $times[32767] = '终身'; - -require_once(DEDEADMIN."/templets/member_type.htm"); +require_once(DEDEADMIN."/templets/member_type.htm"); \ No newline at end of file diff --git a/src/admin/member_view.php b/src/admin/member_view.php index 1917ea0c..a9d1f739 100644 --- a/src/admin/member_view.php +++ b/src/admin/member_view.php @@ -13,7 +13,6 @@ CheckPurview('member_Edit'); $ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? "member_main.php" : ''; $id = preg_replace("#[^0-9]#", "", $id); $row = $dsql->GetOne("select * from #@__member where mid='$id'"); - $staArr = array( -10 => '等待验证邮件', -2 => '限制用户(禁言)', @@ -22,13 +21,11 @@ $staArr = array( 1 => '没填写详细资料', 2 => '正常使用状态' ); - //如果这个用户是管理员帐号,必须有足够权限的用户才能操作 if ($row['matt'] == 10) CheckPurview('sys_User'); - if ($row['uptime'] > 0 && $row['exptime'] > 0) { $mhasDay = $row['exptime'] - ceil((time() - $row['uptime']) / 3600 / 24) + 1; } else { $mhasDay = 0; } -include DedeInclude('templets/member_view.htm'); +include DedeInclude('templets/member_view.htm'); \ No newline at end of file diff --git a/src/admin/module_make.php b/src/admin/module_make.php index 5e5e288a..7cefac8e 100644 --- a/src/admin/module_make.php +++ b/src/admin/module_make.php @@ -13,7 +13,6 @@ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/dedemodule.class.php"); CheckPurview('sys_module'); if (empty($action)) $action = ''; - if ($action == '') { $modules = array(); require_once(dirname(__FILE__)."/templets/module_make.htm"); @@ -25,7 +24,6 @@ function Makemodule() --------------*/ else if ($action == 'make') { require_once(DEDEINC.'/libraries/dedehttpdown.class.php'); - //校验私钥,确定开发者身份 $devURL = DEDECDNURL."/developers/$dev_id.json"; $dhd = new DedeHttpDown(); @@ -36,7 +34,6 @@ else if ($action == 'make') { ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); exit(); } - $filelist = str_replace("\r", "\n", trim($filelist)); $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); if ($filelist == '') { @@ -55,7 +52,6 @@ else if ($action == 'make') { ShowMsg("模块名称过长", "-1"); exit(); } - //校验私钥合法性 $enstr = json_encode(array( "module_name" => $modulname, @@ -63,21 +59,15 @@ else if ($action == 'make') { )); //私钥加密模块信息 openssl_private_encrypt($enstr, $encotent, $priv); - $moduleInfo = base64url_encode($encotent); - openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); - $minfo = (array)json_decode($decontent); - if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); exit(); } - //去除转义 foreach ($_POST as $k => $v) $$k = stripslashes($v); - if (!isset($autosetup)) $autosetup = 0; if (!isset($autodel)) $autodel = 0; $mdir = DEDEDATA.'/module'; @@ -86,15 +76,12 @@ else if ($action == 'make') { $menustring = base64_encode($menustring); $indexurl = str_replace('=', '**', $indexurl); $dm = new DedeModule($mdir); - if ($dm->HasModule($hashcode)) { $dm->Clear(); ShowMsg("对不起,您指定同名模块已经存在,因此不能创建项目
如果您要更新这个模块,请先删除:module/{$hashcode}.xml", "-1"); exit(); } - $readmef = $setupf = $uninstallf = ''; - if (empty($readmetxt)) { move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("您没填写说明或上传说明文件"); $readmef = $dm->GetEncodeFile($mdir."/{$hashcode}-r.html", TRUE); @@ -104,27 +91,21 @@ else if ($action == 'make') { $readmetxt .= "

"; $readmef = base64_encode(trim($readmetxt)); } - if ($autosetup == 0) { move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); } - if ($autodel == 0) { move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", TRUE); } - if (trim($setupsql40) == '') $setupsql40 = ''; else $setupsql40 = base64_encode(trim($setupsql40)); - //if(trim($setupsql41)=='') $setupsql41 = ''; //else $setupsql41 = base64_encode(trim($setupsql41)); - if (trim($delsql) == '') $delsql = ''; else $delsql = base64_encode(trim($delsql)); $pub_key = base64url_encode($devInfo['pub_key']); - $modulinfo = " name={$modulname} @@ -165,7 +146,6 @@ $filelist "; - $filelists = explode("\n", $filelist); foreach ($filelists as $v) { $v = trim($v); @@ -204,7 +184,6 @@ else if ($action == 'edit') { ShowMsg("请填写开发者私钥信息", "-1"); exit(); } - //校验私钥,确定开发者身份 $devURL = DEDECDNURL."/developers/$dev_id.json"; $dhd = new DedeHttpDown(); @@ -219,7 +198,6 @@ else if ($action == 'edit') { ShowMsg("模块名称过长", "-1"); exit(); } - //校验私钥合法性 $enstr = json_encode(array( "module_name" => $modulname, @@ -227,18 +205,13 @@ else if ($action == 'edit') { )); //私钥加密模块信息 openssl_private_encrypt($enstr, $encotent, $priv); - $moduleInfo = base64url_encode($encotent); - openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); - $minfo = (array)json_decode($decontent); - if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); exit(); } - //已经去除转义 foreach ($_POST as $k => $v) $$k = stripslashes($v); if (!isset($autosetup)) $autosetup = 0; @@ -252,7 +225,6 @@ else if ($action == 'edit') { $dm = new DedeModule($mdir); $readmef = base64_encode($readmetxt); $setupf = $uninstallf = ''; - //编译setup文件 if (is_uploaded_file($setup)) { move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); @@ -260,7 +232,6 @@ else if ($action == 'edit') { } else { if ($autosetup == 0) $setupf = base64_encode($dm->GetSystemFile($hashcode, 'setup')); } - //编译uninstall文件 if (is_uploaded_file($uninstall)) { move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); @@ -268,15 +239,12 @@ else if ($action == 'edit') { } else { if ($autodel == 0) $uninstallf = base64_encode($dm->GetSystemFile($hashcode, 'uninstall')); } - if (trim($setupsql40) == '') $setupsql40 = ''; else $setupsql40 = base64_encode(htmlspecialchars_decode(trim($setupsql40))); //if(trim($setupsql41)=='') $setupsql41 = ''; //else $setupsql41 = base64_encode(trim($setupsql41)); - if (trim($delsql) == '') $delsql = ''; else $delsql = base64_encode(strip_tags(trim($delsql))); - $modulinfo = " name={$modulname} @@ -317,7 +285,6 @@ $filelist "; - if ($rebuild == 'yes') { $filelists = explode("\n", $filelist); foreach ($filelists as $v) { @@ -344,5 +311,4 @@ $filelist } ShowMsg("成功对模块重新编译", "module_main.php"); exit(); -} -//ClearAllLink(); +}//ClearAllLink(); \ No newline at end of file diff --git a/src/admin/mychannel_add.php b/src/admin/mychannel_add.php index 07a1bd70..1acaad29 100644 --- a/src/admin/mychannel_add.php +++ b/src/admin/mychannel_add.php @@ -14,7 +14,6 @@ require_once(DEDEINC."/dedetag.class.php"); if (empty($ismake)) $ismake = 0; if (empty($isdel)) $isdel = 0; if (empty($action)) $action = ''; - if ($action == 'add') { //检查输入 if (empty($id) || preg_match("#[^0-9-]#", $id)) { @@ -30,9 +29,7 @@ if ($action == 'add') { exit(); } $trueTable2 = str_replace("#@__", $cfg_dbprefix, $addtable); - if ($issystem == -1 && $id > 0) $id = $id * -1; - //检查id是否重复 $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' OR nid LIKE '$nid' OR addtable LIKE '$addtable'"); if (is_array($row)) { @@ -40,7 +37,6 @@ if ($action == 'add') { exit(); } $mysql_version = $dsql->GetVersion(); - //创建附加表 if ($trueTable2 != '') { $istb = $dsql->IsTable($trueTable2); @@ -49,7 +45,7 @@ if ($action == 'add') { $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$trueTable2}`;"); if ($issystem != -1) { $tabsql = "CREATE TABLE `$trueTable2`( - `aid` int(11) NOT NULL default '0', + `aid` int(11) NOT NULL default '0', `typeid` int(11) NOT NULL default '0', `redirecturl` varchar(255) NOT NULL default '', `templet` varchar(30) NOT NULL default '', @@ -86,7 +82,6 @@ if ($action == 'add') { } } } - $listfields = $fieldset = ''; if ($issystem == -1) { $fieldset = " @@ -104,7 +99,6 @@ if ($action == 'add') { \r\n"; $listfields = 'channel,arcrank,mid,click,title,senddate,flag,listpic,lastpost,scores,goodpost,badpost'; } - $inQuery = "INSERT INTO `#@__channeltype`(id,nid,typename,addtable,addcon,mancon,editcon,useraddcon,usermancon,usereditcon,fieldset,listfields,issystem,issend,arcsta,usertype,sendrank,needdes,needpic,titlename,onlyone,dfcid) VALUES ('$id','$nid','$typename','$addtable','$addcon','$mancon','$editcon','$useraddcon','$usermancon','$usereditcon','$fieldset','$listfields','$issystem','$issend','$arcsta','$usertype','$sendrank','$needdes','$needpic','$titlename','$onlyone','$dfcid');"; $dsql->ExecuteNoneQuery($inQuery); @@ -114,5 +108,4 @@ if ($action == 'add') { $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC LIMIT 0,1 "); $newid = $row['id'] + 1; if ($newid < 10) $newid = $newid + 10; - -require_once(DEDEADMIN."/templets/mychannel_add.htm"); +require_once(DEDEADMIN."/templets/mychannel_add.htm"); \ No newline at end of file diff --git a/src/admin/mychannel_field_add.php b/src/admin/mychannel_field_add.php index beecd55e..27c4b2df 100644 --- a/src/admin/mychannel_field_add.php +++ b/src/admin/mychannel_field_add.php @@ -12,10 +12,8 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_New'); require_once(DEDEADMIN."/inc/inc_admin_channel.php"); require_once(DEDEINC."/dedetag.class.php"); - if (empty($action)) $action = ''; $mysql_version = $dsql->GetVersion(); - /*---------------------- function Save() ---------------------*/ @@ -24,23 +22,19 @@ if ($action == 'save') { $dfvalue = trim($vdefault); $isnull = ($isnull == 1 ? "true" : "false"); $mxlen = $maxlength; - - if (preg_match("#^(select|radio|checkbox)$#i", $dtype)) { if (!preg_match("#,#", $dfvalue)) { ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); exit(); } } - if ($dtype == 'stepselect') { $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fieldname' "); if (!is_array($arr)) { - ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); + ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名", "-1"); exit(); } } - //模型信息 $row = $dsql->GetOne("SELECT fieldset,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); $fieldset = stripslashes($row['fieldset']); @@ -48,10 +42,8 @@ if ($action == 'save') { $dtp->SetNameSpace("field", "<", ">"); $dtp->LoadSource($fieldset); $trueTable = $row['addtable']; - //检测被修改的字段类型 $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - $ntabsql = $fieldinfos[0]; $buideType = $fieldinfos[1]; $rs = $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` ADD $ntabsql "); @@ -60,7 +52,6 @@ if ($action == 'save') { ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); exit(); } - //检测旧配置信息,并替换为新配置 $ok = FALSE; $fieldname = strtolower($fieldname); @@ -76,7 +67,6 @@ if ($action == 'save') { } else { $oksetting = $fieldset."\r\n".stripslashes($fieldstring); } - $addlist = GetAddFieldList($dtp, $oksetting); $oksetting = addslashes($oksetting); $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); @@ -85,17 +75,14 @@ if ($action == 'save') { ShowMsg("保存节点配置出错".$grr, "javascript:;"); exit(); } - ShowMsg("成功增加一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); exit(); } - /*---------------------- function ShowPage() ---------------------*/ //检测模型相关信息,并初始化相关数据 $row = $dsql->GetOne("SELECT '#@__archives' AS maintable,addtable FROM `#@__channeltype` WHERE id='$id'"); - $trueTable = $row['addtable']; $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; @@ -104,14 +91,10 @@ if ($mysql_version < 4.1) { } else { $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } - $dsql->ExecuteNoneQuery($tabsql); - //检测附加表里含有的字段 $fields = array(); - if (empty($row['maintable'])) $row['maintable'] = '#@__archives'; - $rs = $dsql->SetQuery("SHOW fields FROM `{$row['maintable']}`"); $dsql->Execute('a'); while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { @@ -120,7 +103,6 @@ while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { } $fields[strtolower($nrow['Field'])] = 1; } - $dsql->Execute("a", "SHOW fields FROM `{$row['addtable']}`"); while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { if ($cfg_dbtype == 'sqlite') { @@ -130,12 +112,10 @@ while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { $fields[strtolower($nrow['Field'])] = 1; } } - $f = ''; foreach ($fields as $k => $v) { $f .= ($f == '' ? $k : ' '.$k); } - //获取频道模型 $dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); $dsql->Execute(); @@ -143,5 +123,4 @@ while ($row = $dsql->GetObject()) { $channelArray[$row->id]['typename'] = $row->typename; $channelArray[$row->id]['nid'] = $row->nid; } - -require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); +require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); \ No newline at end of file diff --git a/src/admin/mychannel_field_edit.php b/src/admin/mychannel_field_edit.php index 7fa2dd12..e5845f9b 100644 --- a/src/admin/mychannel_field_edit.php +++ b/src/admin/mychannel_field_edit.php @@ -12,30 +12,25 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_New'); require_once(DEDEINC."/dedetag.class.php"); require_once(dirname(__FILE__)."/inc/inc_admin_channel.php"); - if (empty($action)) $action = ''; $id = isset($id) && is_numeric($id) ? $id : 0; $mysql_version = $dsql->GetVersion(); - //获取模型信息 $row = $dsql->GetOne("SELECT fieldset,'' as maintable,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); $fieldset = stripslashes($row['fieldset']); $trueTable = $row['addtable']; - $dtp = new DedeTagParse(); $dtp->SetNameSpace("field", "<", ">"); $dtp->LoadSource($fieldset); foreach ($dtp->CTags as $ctag) { if (strtolower($ctag->GetName()) == strtolower($fname)) break; } - //字段类型信息 $ds = file(dirname(__FILE__)."/inc/fieldtype.txt"); foreach ($ds as $d) { $dds = explode(',', trim($d)); $fieldtypes[$dds[0]] = $dds[1]; } - //获取频道模型 $dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); $dsql->Execute(); @@ -43,7 +38,6 @@ while ($crow = $dsql->GetObject()) { $channelArray[$crow->id]['typename'] = $crow->typename; $channelArray[$crow->id]['nid'] = $crow->nid; } - //保存修改 /*-------------------- function _SAVE() @@ -53,7 +47,6 @@ if ($action == 'save') { ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); exit(); } - $dfvalue = $vdefault; if (preg_match("#^(select|radio|checkbox)#", $dtype)) { if (!preg_match("#,#", $dfvalue)) { @@ -61,7 +54,6 @@ if ($action == 'save') { exit(); } } - if ($dtype == 'stepselect') { $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fname' "); if (!is_array($arr)) { @@ -69,7 +61,6 @@ if ($action == 'save') { exit(); } } - //检测数据库是否存在附加表,不存在则新建一个 $tabsql = "CREATE TABLE IF NOT EXISTS `{$row['addtable']}`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; if ($mysql_version < 4.1) { @@ -78,7 +69,6 @@ if ($action == 'save') { $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } $dsql->ExecuteNoneQuery($tabsql); - //检测附加表里含有的字段 $fields = array(); $rs = $dsql->SetQuery("SHOW fields FROM `{$row['addtable']}`"); @@ -86,18 +76,15 @@ if ($action == 'save') { while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { $fields[strtolower($nrow['Field'])] = $nrow['Type']; } - //修改字段配置信息 $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 ($fieldname == strtolower($ctag->GetName())) { @@ -115,11 +102,9 @@ if ($action == 'save') { } } $oksetting = $dtp->GetResultNP(); - $addlist = GetAddFieldList($dtp, $oksetting); $oksetting = addslashes($oksetting); $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); - ShowMsg("成功修改一个字段的配置", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); exit(); } @@ -132,19 +117,16 @@ else if ($action == "delete") { ShowMsg("对不起,系统模型的字段不允许删除", "-1"); exit(); } - //检测旧数据类型,并替换为新配置 foreach ($dtp->CTags as $tagid => $ctag) { if (strtolower($ctag->GetName()) == strtolower($fname)) { $dtp->Assign($tagid, "#@Delete@#"); } } - $oksetting = addslashes($dtp->GetResultNP()); $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting' WHERE id='$id' "); $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); ShowMsg("成功删除一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); exit(); } - -require_once(DEDEADMIN."/templets/mychannel_field_edit.htm"); +require_once(DEDEADMIN."/templets/mychannel_field_edit.htm"); \ No newline at end of file diff --git a/src/admin/mychannel_main.php b/src/admin/mychannel_main.php index fa2fa40e..2b497692 100644 --- a/src/admin/mychannel_main.php +++ b/src/admin/mychannel_main.php @@ -12,13 +12,11 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_List'); require_once(DEDEINC.'/datalistcp.class.php'); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); - $sql = "SELECT id,nid,typename,addtable,isshow,issystem FROM `#@__channeltype` ORDER BY id DESC"; $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN."/templets/mychannel_main.htm"); $dlist->SetSource($sql); $dlist->display(); - function GetSta($sta, $id) { if ($sta == 1) { @@ -27,8 +25,7 @@ function GetSta($sta, $id) return "禁用 > 启用"; } } - function IsSystem($s) { return $s == 1 ? "系统" : "自动"; -} +} \ No newline at end of file diff --git a/src/admin/mytag_add.php b/src/admin/mytag_add.php index 1668fe87..93f2df35 100644 --- a/src/admin/mytag_add.php +++ b/src/admin/mytag_add.php @@ -12,7 +12,6 @@ require(dirname(__FILE__)."/config.php"); CheckPurview('temp_Other'); require_once(DEDEINC."/typelink/typelink.class.php"); if (empty($dopost)) $dopost = ""; - if ($dopost == "save") { CheckCSRF(); $tagname = trim($tagname); @@ -33,4 +32,4 @@ $startDay = time(); $endDay = AddDay($startDay, 30); $startDay = GetDateTimeMk($startDay); $endDay = GetDateTimeMk($endDay); -include DedeInclude('templets/mytag_add.htm'); +include DedeInclude('templets/mytag_add.htm'); \ No newline at end of file diff --git a/src/admin/mytag_edit.php b/src/admin/mytag_edit.php index 7c098fa2..f0ce9b8a 100644 --- a/src/admin/mytag_edit.php +++ b/src/admin/mytag_edit.php @@ -11,11 +11,9 @@ require(dirname(__FILE__)."/config.php"); CheckPurview('temp_Other'); require_once(DEDEINC."/typelink/typelink.class.php"); - if (empty($dopost)) $dopost = ''; $aid = intval($aid); $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'mytag_main.php' : $_COOKIE['ENV_GOBACK_URL']; - if ($dopost == 'delete') { $dsql->ExecuteNoneQuery("DELETE FROM `#@__mytag` WHERE aid='$aid'"); ShowMsg("成功删除一个自定义标记", $ENV_GOBACK_URL); @@ -55,4 +53,4 @@ if ($dopost == 'delete') { exit(); } $row = $dsql->GetOne("SELECT * FROM `#@__mytag` WHERE aid='$aid'"); -include DedeInclude('templets/mytag_edit.htm'); +include DedeInclude('templets/mytag_edit.htm'); \ No newline at end of file diff --git a/src/admin/mytag_main.php b/src/admin/mytag_main.php index 78075366..8eacaa3c 100644 --- a/src/admin/mytag_main.php +++ b/src/admin/mytag_main.php @@ -14,18 +14,16 @@ require_once(DEDEINC.'/datalistcp.class.php'); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, '/'); make_hash(); $sql = "SELECT myt.aid,myt.tagname,tp.typename,myt.timeset,myt.endtime - FROM `#@__mytag` myt LEFT JOIN `#@__arctype` tp ON tp.id=myt.typeid ORDER BY myt.aid DESC "; + FROM `#@__mytag` myt LEFT JOIN `#@__arctype` tp ON tp.id=myt.typeid ORDER BY myt.aid DESC "; $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN.'/templets/mytag_main.htm'); $dlist->SetSource($sql); $dlist->display(); - function TestType($tname) { return $tname == '' ? '所有栏目' : $tname; } - function TimeSetValue($ts) { return $ts == 0 ? '不限时间' : '限时标记'; -} +} \ No newline at end of file diff --git a/src/admin/mytag_tag_guide.php b/src/admin/mytag_tag_guide.php index 6be53982..39f439f6 100644 --- a/src/admin/mytag_tag_guide.php +++ b/src/admin/mytag_tag_guide.php @@ -10,4 +10,4 @@ */ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/typelink/typelink.class.php"); -include DedeInclude('templets/mytag_tag_guide.htm'); +include DedeInclude('templets/mytag_tag_guide.htm'); \ No newline at end of file diff --git a/src/admin/mytag_tag_guide_ok.php b/src/admin/mytag_tag_guide_ok.php index 178dcdfe..b0c3c65f 100644 --- a/src/admin/mytag_tag_guide_ok.php +++ b/src/admin/mytag_tag_guide_ok.php @@ -10,7 +10,6 @@ */ require_once(dirname(__FILE__)."/config.php"); CheckPurview('temp_Other'); - //根据条件生成标记 $attlist = ""; $attlist .= " row='".$row."'"; @@ -23,7 +22,6 @@ if ($channel > 0) $attlist .= " channelid='".$channel."'"; if ($att > 0) $attlist .= " att='".$att."'"; if ($col > 1) $attlist .= " col='".$col."'"; if ($subday > 0) $attlist .= " subday='".$subday."'"; - if (!empty($types)) { $attlist .= " type='"; foreach ($types as $v) { @@ -49,4 +47,4 @@ if ($dopost == 'savetag') { $dsql->ExecuteNoneQuery("UPDATE `#@__mytag` SET tagname='{$tagname}_{$id}' WHERE aid='$id'"); $fulltag = "{dede:mytag name='{$tagname}_{$id}' ismake='yes'/}"; } -include DedeInclude('templets/mytag_tag_guide_ok.htm'); +include DedeInclude('templets/mytag_tag_guide_ok.htm'); \ No newline at end of file diff --git a/src/admin/recycling.php b/src/admin/recycling.php index 8119e8a5..e3c4c0f9 100644 --- a/src/admin/recycling.php +++ b/src/admin/recycling.php @@ -25,4 +25,4 @@ WHERE arc.arcrank = '-2' $whereSql order by arc.id desc"; $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN."/templets/recycling.htm"); $dlist->SetSource($query); -$dlist->display(); +$dlist->display(); \ No newline at end of file diff --git a/src/admin/search_keywords_main.php b/src/admin/search_keywords_main.php index 0bc21993..5cd9510d 100644 --- a/src/admin/search_keywords_main.php +++ b/src/admin/search_keywords_main.php @@ -10,7 +10,7 @@ */ require_once(dirname(__FILE__)."/config.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); -if (empty($pagesize)) $pagesize = 30; +if (empty($pagesize)) $pageSize = 30; if (empty($pageno)) $pageno = 1; if (empty($dopost)) $dopost = ''; if (empty($orderby)) $orderby = 'aid'; diff --git a/src/admin/shops_delivery.php b/src/admin/shops_delivery.php index 7d7ccd42..e92d2cca 100644 --- a/src/admin/shops_delivery.php +++ b/src/admin/shops_delivery.php @@ -11,11 +11,10 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('shops_Delivery'); require_once DEDEINC.'/datalistcp.class.php'; - if (!isset($do)) $do = ''; if ($do == 'add') { if (empty($dname) || (strlen($dname) > 100)) { - ShowMsg("请填写配送方式名称!", "-1"); + ShowMsg("请填写配送方式名称", "-1"); exit(); } $price = preg_replace("#[^.0-9]#", "", $price); @@ -28,13 +27,13 @@ if ($do == 'add') { if ($result) { ShowMsg("成功添加一个配送方式!", "shops_delivery.php"); } else { - ShowMsg("添加配送方式时发生SQL错误!", "-1"); + ShowMsg("添加配送方式时发生SQL错误", "-1"); } exit(); } else if ($do == 'del') { $id = intval($id); $dsql->ExecuteNoneQuery("DELETE FROM `#@__shops_delivery` WHERE pid='$id'"); - ShowMsg("已删除当前配送方式!", "shops_delivery.php"); + ShowMsg("已删除当前配送方式", "shops_delivery.php"); exit(); } else if ($do == 'edit') { foreach ($pid as $id) { @@ -60,7 +59,7 @@ if ($do == 'add') { } $dsql->ExecuteNoneQuery("UPDATE `#@__shops_delivery` SET dname='$dname',price='$price',des='$des' WHERE pid='$id'"); } - ShowMsg("成功修改配送方式!", "shops_delivery.php"); + ShowMsg("成功修改配送方式", "shops_delivery.php"); exit(); } $deliveryarr = array(); @@ -70,9 +69,8 @@ while ($row = $dsql->GetArray()) { $deliveryarr[] = $row; } $dlist = new DataListCP(); -$dlist->pageSize = 25; //设定每页显示记录数(默认25条) - +$dlist->pageSize = 30;//设定每页显示记录数 //这两句的顺序不能更换 -$dlist->SetTemplate(DEDEADMIN."/templets/shops_delivery.htm"); //载入模板 -$dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM `#@__shops_delivery` ORDER BY `orders` ASC"); //设定查询SQL -$dlist->Display(); //显示 \ No newline at end of file +$dlist->SetTemplate(DEDEADMIN."/templets/shops_delivery.htm");//载入模板 +$dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM `#@__shops_delivery` ORDER BY `orders` ASC");//设定查询SQL +$dlist->Display();//显示 \ No newline at end of file diff --git a/src/admin/shops_operations.php b/src/admin/shops_operations.php index 0ee06275..2af4ffc6 100644 --- a/src/admin/shops_operations.php +++ b/src/admin/shops_operations.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('shops_Operations'); require_once(DEDEINC.'/datalistcp.class.php'); - if (isset($dopost)) { CheckPurview('shops_Operations_cpanel'); if ($dopost == 'up') { @@ -60,7 +59,6 @@ if (isset($dopost)) { ShowMsg("成功修改指定的订单记录", $ENV_GOBACK_URL); exit(); } - $addsql = ''; if (empty($oid)) $oid = 0; setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); @@ -72,17 +70,14 @@ if (isset($sta)) { $addsql = "WHERE s.`state`='$sta'"; } $sql = "SELECT s.`oid`,s.`cartcount`,s.`price`,s.`state`,s.`stime`,s.priceCount,s.dprice,s.paytype,u.`consignee`,u.`tel`,s.`userid` FROM `#@__shops_orders` AS s LEFT JOIN `#@__shops_userinfo` AS u ON s.oid=u.oid $addsql ORDER BY `stime` DESC"; - $dlist = new DataListCP(); $dlist->SetParameter("oid", $oid); if (isset($sta)) $dlist->SetParameter("sta", $sta); $tplfile = DEDEADMIN."/templets/shops_operations.htm"; - //这两句的顺序不能更换 $dlist->SetTemplate($tplfile); //载入模板 $dlist->SetSource($sql); //设定查询SQLexit('dd'); $dlist->Display(); - function GetSta($sta) { if ($sta == 0) { @@ -97,7 +92,6 @@ function GetSta($sta) return '已完成'; } } - function GetsType($pid) { global $dsql; @@ -109,7 +103,6 @@ function GetsType($pid) return '-'; } } - function GetMemberID($mid) { global $dsql; @@ -120,4 +113,4 @@ function GetMemberID($mid) } else { return '0'; } -} +} \ No newline at end of file diff --git a/src/admin/shops_operations_cart.php b/src/admin/shops_operations_cart.php index 6fe0c9d8..b2797f4c 100644 --- a/src/admin/shops_operations_cart.php +++ b/src/admin/shops_operations_cart.php @@ -11,22 +11,18 @@ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/datalistcp.class.php"); CheckPurview('shops_Operations'); - if (!isset($oid)) exit("无效操作!"); $oid = preg_replace("#[^-0-9A-Z]#", "", $oid); if (empty($oid)) exit("无效订单号!"); - $row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid'"); $sql = "SELECT o.*,p.title,p.price as uprice,d.dname FROM `#@__shops_orders` as o left join `#@__shops_products` as p on o.oid=p.oid left join `#@__shops_delivery` as d on d.pid=o.pid WHERE o.oid='$oid'"; - $dlist = new DataListCP(); -$dlist->pageSize = 20; +$dlist->pageSize = 30; $dlist->SetParameter("oid", $oid); $dlist->SetTemplate(DEDEADMIN."/templets/shops_operations_cart.htm"); $dlist->SetSource($sql); $dlist->Display(); $dlist->Close(); - function GetSta($sta, $oid) { global $dsql; @@ -41,4 +37,4 @@ function GetSta($sta, $oid) } else { return '已完成'; } -} +} \ No newline at end of file diff --git a/src/admin/soft_config.php b/src/admin/soft_config.php index 53a47080..8af91aba 100644 --- a/src/admin/soft_config.php +++ b/src/admin/soft_config.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_SoftConfig'); if (empty($dopost)) $dopost = ''; - //保存 if ($dopost == "save") { if ($dfrank > 0 || $dfywboy > 0) $gotojump = 1; diff --git a/src/admin/spec_add.php b/src/admin/spec_add.php index dee7aa68..b7cbbd16 100644 --- a/src/admin/spec_add.php +++ b/src/admin/spec_add.php @@ -19,7 +19,6 @@ if ($dopost != 'save') { ClearMyAddon(); $channelid = -1; $cid = isset($cid) && is_numeric($cid) ? $cid : 0; - //获得频道模型信息 $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); include DedeInclude("templets/spec_add.htm"); diff --git a/src/admin/stepselect_main.php b/src/admin/stepselect_main.php index d3b99784..1e0cbb0a 100644 --- a/src/admin/stepselect_main.php +++ b/src/admin/stepselect_main.php @@ -28,7 +28,6 @@ if (empty($action)) { $etypes[] = $arr; $egroups[$arr['egroup']] = $arr['itemname']; } - if ($egroup != '') { $orderby = 'ORDER BY disorder ASC, evalue ASC'; if (!empty($topvalue)) { @@ -80,20 +79,16 @@ else if ($action == 'del') { } else if ($action == 'delenumAllSel') { if (isset($ids) && is_array($ids)) { $id = join(',', $ids); - $groups = array(); $dsql->Execute('me', "SELECT egroup FROM `#@__sys_enum` WHERE id IN($id) GROUP BY egroup"); while ($row = $dsql->GetArray('me')) { $groups[] = $row['egroup']; } - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id IN($id); "); - //更新缓存 foreach ($groups as $egropu) { WriteEnumsCache($egroup); } - ShowMsg("成功删除选中的枚举分类", $ENV_GOBACK_URL); } else { ShowMsg("您没选择任何分类", "-1"); @@ -151,7 +146,7 @@ else if ($action == 'exarea') { while ($row = $dsql->GetArray()) { $bigtypes[$row['id']] = $evalue = $disorder = $n * 500; $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); + VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); $n++; } $stypes = array(); @@ -162,7 +157,7 @@ else if ($action == 'exarea') { while ($row = $dsql->GetArray()) { $stypes[$row['id']] = $evalue = $disorder = $v + $n; $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); + VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); $n++; } } @@ -193,9 +188,8 @@ else if ($action == 'addenum_save') { $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND (evalue MOD 500)=0 ORDER BY disorder DESC "); if (!is_array($arr)) $disorder = $evalue = ($issign == 1 ? 1 : 500); else $disorder = $evalue = $arr['disorder'] + ($issign == 1 ? 1 : 500); - $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); + VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); } WriteEnumsCache($egroup); ShowMsg("成功添加枚举分类".$dsql->GetError(), $ENV_GOBACK_URL); @@ -217,7 +211,7 @@ else if ($action == 'addenum_save') { $evalue = $matchs[1].'.'.$addvalue; } $sql = "INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "; + VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "; //echo $sql;exit; $dsql->ExecuteNoneQuery($sql); } @@ -238,7 +232,7 @@ else if ($action == 'addenum_save') { $evalue = $arr['evalue'] + 1; } $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); + VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); } WriteEnumsCache($egroup); ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); @@ -266,4 +260,4 @@ else if ($action == 'upallcache') { WriteEnumsCache($egroup); ShowMsg("成更新枚举缓存", $ENV_GOBACK_URL); exit(); -} +} \ No newline at end of file diff --git a/src/admin/swfupload.php b/src/admin/swfupload.php index 431f9e08..f3f20105 100644 --- a/src/admin/swfupload.php +++ b/src/admin/swfupload.php @@ -20,7 +20,6 @@ if (empty($dopost)) { echo 'ERROR: Upload Error! '; exit(0); } - //把文件移动到临时目录 $tmpdir = DEDEDATA.'/uploadtmp'; if (!is_dir($tmpdir)) { @@ -31,10 +30,8 @@ if (empty($dopost)) { exit(0); } } - $FiledataNew = str_replace("\\", '/', $Filedata); $FiledataNew = $tmpdir.'/'.preg_replace("/(.*)[\/]/isU", "", $FiledataNew); - $mime = get_mime_type($Filedata); if (preg_match("#^unknow#", $mime)) { echo "ERROR: Create {$tmpdir} dir Error! "; @@ -45,7 +42,6 @@ if (empty($dopost)) { exit; } move_uploaded_file($Filedata, $FiledataNew); - $info = $ftype = $sname = ''; $srcInfo = GetImageSize($FiledataNew, $info); //检测文件类型 @@ -78,7 +74,6 @@ if (empty($dopost)) { echo "ERROR: Image type Error! "; exit(0); } - //保存原图 $filedir = $cfg_image_dir.'/'.MyDate($cfg_addon_savetype, time()); if (!is_dir(DEDEROOT.$filedir)) { @@ -103,30 +98,25 @@ if (empty($dopost)) { } //WaterImg($cfg_basedir.$fileurl, 'up'); $title = $filename.$sname; - $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) VALUES ('$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; if (!empty($arcid)) { $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) VALUES ('$arcid','$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; } - $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); AddMyAddon($fid, $fileurl); - //生成缩略图 ob_start(); ImageResizeNew($cfg_basedir.$fileurl, $cfg_ddimg_width, $cfg_ddimg_height, '', false); $imagevariable = ob_get_contents(); ob_end_clean(); - //保存信息到 session if (!isset($_SESSION['file_info'])) $_SESSION['file_info'] = array(); if (!isset($_SESSION['bigfile_info'])) $_SESSION['bigfile_info'] = array(); if (!isset($_SESSION['fileid'])) $_SESSION['fileid'] = 1; else $_SESSION['fileid']++; - $_SESSION['bigfile_info'][$_SESSION['fileid']] = $fileurl; $_SESSION['file_info'][$_SESSION['fileid']] = $imagevariable; echo "FILEID:".$_SESSION['fileid']; @@ -204,4 +194,4 @@ else if ($dopost == 'delold') { $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}'; "); echo "已删除"; exit(); -} +} \ No newline at end of file diff --git a/src/admin/sys_admin_user.php b/src/admin/sys_admin_user.php index e8d9c8f1..d1201fc1 100644 --- a/src/admin/sys_admin_user.php +++ b/src/admin/sys_admin_user.php @@ -14,7 +14,6 @@ require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (empty($rank)) $rank = ''; else $rank = " WHERE CONCAT(#@__admin.usertype)='$rank' "; - $dsql->SetQuery("SELECT `rank`,typename FROM `#@__admintype` "); $dsql->Execute(); while ($row = $dsql->GetObject()) { @@ -25,16 +24,14 @@ $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN."/templets/sys_admin_user.htm"); $dlist->SetSource($query); $dlist->Display(); - function GetUserType($trank) { global $adminRanks; if (isset($adminRanks[$trank])) return $adminRanks[$trank]; else return "错误类型"; } - function GetChannel($c) { if ($c == "" || $c == 0) return "所有频道"; else return $c; -} +} \ No newline at end of file diff --git a/src/admin/sys_admin_user_add.php b/src/admin/sys_admin_user_add.php index e911d4db..0eae58f6 100644 --- a/src/admin/sys_admin_user_add.php +++ b/src/admin/sys_admin_user_add.php @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_User'); require_once(DEDEINC."/typelink/typelink.class.php"); if (empty($dopost)) $dopost = ''; - if ($dopost == 'add') { CheckCSRF(); if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd) || preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { @@ -31,39 +30,29 @@ if ($dopost == 'add') { } $mpwd = md5($pwd); $pwd = substr(md5($pwd), 5, 20); - $typeid = join(',', $typeids); if ($typeid == '0') $typeid = ''; - //关连前台会员帐号 - $adminquery = "INSERT INTO `#@__member` (`mtype`,`userid`,`pwd`,`uname`,`sex`,`rank`,`money`,`email`, - `scores` ,`matt` ,`face`,`safequestion`,`safeanswer` ,`jointime` ,`joinip` ,`logintime` ,`loginip` ) - VALUES ('个人','$userid','$mpwd','$uname','男','100','0','$email','1000','10','','0','','0','','0',''); "; + $adminquery = "INSERT INTO `#@__member` (`mtype`,`userid`,`pwd`,`uname`,`sex`,`rank`,`money`,`email`, `scores` ,`matt` ,`face`,`safequestion`,`safeanswer` ,`jointime` ,`joinip` ,`logintime` ,`loginip` ) + VALUES ('个人','$userid','$mpwd','$uname','男','100','0','$email','1000','10','','0','','0','','0',''); "; $dsql->ExecuteNoneQuery($adminquery); - $mid = $dsql->GetLastID(); if ($mid <= 0) { die($dsql->GetError().' 数据库出错'); } - //后台管理员 $inquery = "INSERT INTO `#@__admin`(id,usertype,userid,pwd,uname,typeid,tname,email) - VALUES('$mid','$usertype','$userid','$pwd','$uname','$typeid','$tname','$email'); "; + VALUES('$mid','$usertype','$userid','$pwd','$uname','$typeid','$tname','$email'); "; $rs = $dsql->ExecuteNoneQuery($inquery); - - $adminquery = "INSERT INTO `#@__member_person` (`mid`,`onlynet`,`sex`,`uname`,`qq`,`msn`,`tel`,`mobile`,`place`,`oldplace`,`birthday`,`star`, - `income` , `education` , `height` , `bodytype` , `blood` , `vocation` , `smoke` , `marital` , `house` ,`drink` , `datingtype` , `language` , `nature` , `lovemsg` , `address`,`uptime`) - VALUES ('$mid', '1', '男', '{$userid}', '', '', '', '', '0', '0','1980-01-01', '1', '0', '0', '160', '0', '0', '0', '0', '0', '0','0', '0', '', '', '', '','0'); "; + $adminquery = "INSERT INTO `#@__member_person` (`mid`,`onlynet`,`sex`,`uname`,`qq`,`msn`,`tel`,`mobile`,`place`,`oldplace`,`birthday`,`star`, `income` , `education` , `height` , `bodytype` , `blood` , `vocation` , `smoke` , `marital` , `house` ,`drink` , `datingtype` , `language` , `nature` , `lovemsg` , `address`,`uptime`) + VALUES ('$mid', '1', '男', '{$userid}', '', '', '', '', '0', '0','1980-01-01', '1', '0', '0', '160', '0', '0', '0', '0', '0', '0','0', '0', '', '', '', '','0'); "; $dsql->ExecuteNoneQuery($adminquery); - $adminquery = "INSERT INTO `#@__member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`) - VALUES ('$mid','0','0','0','0','0','0','0','0'); "; + VALUES ('$mid','0','0','0','0','0','0','0','0'); "; $dsql->ExecuteNoneQuery($adminquery); - $adminquery = "Insert Into `#@__member_space`(`mid` ,`pagesize` ,`matt` ,`spacename` ,`spacelogo` ,`spacestyle`, `sign` ,`spacenews`) - Values('$mid','10','0','{$uname}的空间','','person','',''); "; + Values('$mid','10','0','{$uname}的空间','','person','',''); "; $dsql->ExecuteNoneQuery($adminquery); - ShowMsg('成功增加一个用户', 'sys_admin_user.php'); exit(); } @@ -82,4 +71,4 @@ while ($row = $dsql->GetObject('op')) { } } make_hash(); -include DedeInclude('templets/sys_admin_user_add.htm'); +include DedeInclude('templets/sys_admin_user_add.htm'); \ No newline at end of file diff --git a/src/admin/sys_admin_user_tj.php b/src/admin/sys_admin_user_tj.php index 0299f9a8..9026c907 100644 --- a/src/admin/sys_admin_user_tj.php +++ b/src/admin/sys_admin_user_tj.php @@ -10,7 +10,6 @@ */ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_User'); - if (isset($dopost) && $dopost == 'getone') { $row = $dsql->GetOne("SELECT userid FROM `#@__admin` WHERE id='$uid'; "); $userid = $row['userid']; diff --git a/src/admin/sys_data.php b/src/admin/sys_data.php index 94236f0f..d9b9af25 100644 --- a/src/admin/sys_data.php +++ b/src/admin/sys_data.php @@ -11,12 +11,10 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Data'); if (empty($dopost)) $dopost = ''; - if ($cfg_dbtype == 'sqlite') { showMsg('备份系统根目录下/data/'.$cfg_dbname.'.db文件即可', 'javascript:;'); exit(); } - if ($dopost == "viewinfo") //查看表结构 { echo ""; @@ -62,7 +60,6 @@ if ($dopost == "viewinfo") //查看表结构 echo ''; exit(); } - //获取系统存在的表信息 $otherTables = array(); $dedeSysTables = array(); @@ -83,9 +80,8 @@ while ($row = $dsql->GetArray('t', MYSQL_BOTH)) { } $mysql_version = $dsql->GetVersion(); include DedeInclude('templets/sys_data.htm'); - function TjCount($tbname, &$dsql) { $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM $tbname"); return $row['dd']; -} +} \ No newline at end of file diff --git a/src/admin/sys_data_replace.php b/src/admin/sys_data_replace.php index 194bf0f4..8827bcae 100644 --- a/src/admin/sys_data_replace.php +++ b/src/admin/sys_data_replace.php @@ -15,7 +15,6 @@ if (empty($action)) { require_once(DEDEADMIN."/templets/sys_data_replace.htm"); exit(); } - /*------------------------------- //列出数据库表里的字段 function __getfields() @@ -86,4 +85,4 @@ else if ($action == 'apply') { ShowMsg("共找到 $tt 条记录,成功替换了 $oo 条", "javascript:;"); exit(); } -} +} \ No newline at end of file diff --git a/src/admin/sys_data_revert.php b/src/admin/sys_data_revert.php index 5021e3b0..df426f24 100644 --- a/src/admin/sys_data_revert.php +++ b/src/admin/sys_data_revert.php @@ -23,4 +23,4 @@ while (($filename = $dh->read()) !== false) { } } $dh->close(); -include DedeInclude('templets/sys_data_revert.htm'); +include DedeInclude('templets/sys_data_revert.htm'); \ No newline at end of file diff --git a/src/admin/sys_group.php b/src/admin/sys_group.php index cc08d9f2..0c2317da 100644 --- a/src/admin/sys_group.php +++ b/src/admin/sys_group.php @@ -11,4 +11,4 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Group'); if (empty($dopost)) $dopost = ""; -include DedeInclude('templets/sys_group.htm'); +include DedeInclude('templets/sys_group.htm'); \ No newline at end of file diff --git a/src/admin/sys_group_add.php b/src/admin/sys_group_add.php index e39278c7..fb5a32b6 100644 --- a/src/admin/sys_group_add.php +++ b/src/admin/sys_group_add.php @@ -31,4 +31,4 @@ if (!empty($dopost)) { ShowMsg("成功创建一个新的用户组!", "sys_group.php"); exit(); } -include DedeInclude('templets/sys_group_add.htm'); +include DedeInclude('templets/sys_group_add.htm'); \ No newline at end of file diff --git a/src/admin/sys_info.php b/src/admin/sys_info.php index 4a89e9b2..95ede404 100644 --- a/src/admin/sys_info.php +++ b/src/admin/sys_info.php @@ -143,7 +143,7 @@ EOT; exit; } if ($i == 1) { - echo ' + echo ' 没有找到搜索的内容 '; } diff --git a/src/admin/sys_info_mark.php b/src/admin/sys_info_mark.php index a9096964..6ea17489 100644 --- a/src/admin/sys_info_mark.php +++ b/src/admin/sys_info_mark.php @@ -32,7 +32,6 @@ if ($action == "save") { } if (is_uploaded_file($newimg)) { $imgfile_type = strtolower(trim($newimg_type)); - if (!in_array($imgfile_type, $allow_mark_types)) { ShowMsg("上传的图片格式错误,请使用 gif、png格式的其中一种", "-1"); exit(); @@ -65,4 +64,4 @@ if ($action == "save") { echo "\r\n"; } require_once($ImageWaterConfigFile); -include DedeInclude('templets/sys_info_mark.htm'); +include DedeInclude('templets/sys_info_mark.htm'); \ No newline at end of file diff --git a/src/admin/sys_payment.php b/src/admin/sys_payment.php index 30519e09..1e562590 100644 --- a/src/admin/sys_payment.php +++ b/src/admin/sys_payment.php @@ -11,7 +11,6 @@ require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC.'/datalistcp.class.php'); CheckPurview('sys_Data'); - $dopost = (empty($dopost)) ? '' : $dopost; $pid = (empty($pid)) ? 0 : intval($pid); /* @@ -33,18 +32,14 @@ $pid = (empty($pid)) ? 0 : intval($pid); 将上述的格式传入到数组中去,然后进行解析: 1.声明类,并创建数组 $af = new Array2form($config); - 2.设置一个表单模板(可选,如果不设置载入默认) $af->SetDefaultTpl($templets); $templets:为一个底册模板文件 表单模板格式为:

~title~:~form~~description~

- 3.获取特定项目表单 $af->GetIterm('alipay', 1) //1.表示获取一个默认模板下的完整表单,2.仅获取一个表单项 - 4.获取所有表单内容 $af->GetAll() //获取表单所有解析后的内容 - */ class Array2form { @@ -59,15 +54,6 @@ class Array2form $this->SetDefaultTpl(); } } - - //析构函数,兼容PHP4 - /* - function Array2form($formarray = array()) - { - $this->__construct($formarray); - } - */ - //获取一个特定项目的表单 function GetIterm($itermid = '', $itermtype = 1) { @@ -93,7 +79,6 @@ class Array2form } return empty($reval) ? '' : $reval; } - function GetForm($key, $formarry = array(), $formtype = 'text') { switch ($formtype) { @@ -126,8 +111,6 @@ class Array2form } return $reval_form; } - - //获取所有的表单内容 function GetAll() { @@ -141,7 +124,6 @@ class Array2form return FALSE; } } - //获取一个特定项目的表单 function SetDefaultTpl($tplname = '') { @@ -159,7 +141,6 @@ $tplstring = " ~form~ ~description~ "; - //安装支付接口 if ($dopost == 'install') { $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); @@ -210,7 +191,6 @@ else if ($dopost == 'config') { } else { $config = serialize($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 = "保存修改成功"; @@ -218,7 +198,6 @@ else if ($dopost == 'config') { ShowMsg($msg, "sys_payment.php"); exit(); } - //删除支付接口 else if ($dopost == 'uninstall') { $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); @@ -247,4 +226,4 @@ $sql = "SELECT * FROM `#@__payment` ORDER BY `rank` ASC"; $dlist = new DataListCP(); $dlist->SetTemplet(DEDEADMIN."/templets/sys_payment.htm"); $dlist->SetSource($sql); -$dlist->display(); +$dlist->display(); \ No newline at end of file diff --git a/src/admin/sys_sql_query.php b/src/admin/sys_sql_query.php index 4e256194..e5c4fa0d 100644 --- a/src/admin/sys_sql_query.php +++ b/src/admin/sys_sql_query.php @@ -11,7 +11,6 @@ require(dirname(__FILE__)."/config.php"); CheckPurview('sys_Data'); if (empty($dopost)) $dopost = ""; - //查看表结构 if ($dopost == "viewinfo") { CheckCSRF(); @@ -61,7 +60,7 @@ else if ($dopost == "repair") { } else { $rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `$tablename` "); if ($rs) echo "修复表:$tablename OK"; - else echo "修复表:$tablename 失败,原因是:".$dsql->GetError(); + else echo "修复表:$tablename 失败,原因是:".$dsql->GetError(); } exit(); } @@ -75,7 +74,7 @@ else if ($dopost == "repairAll") { if ($rs) { echo "修复表: {$row[0]} ok!
\r\n"; } else { - echo "修复表: {$row[0]} 失败! 原因是: ".$dsql->GetError()."
\r\n"; + echo "修复表: {$row[0]} 失败,原因是: ".$dsql->GetError()."
\r\n"; } } exit(); @@ -85,7 +84,7 @@ else if ($dopost == "query") { CheckCSRF(); $sqlquery = trim(stripslashes($sqlquery)); if (preg_match("#drop(.*)table#i", $sqlquery) || preg_match("#drop(.*)database#", $sqlquery)) { - echo "删除'数据表'或'数据库'的语句不允许在这里执行"; + echo "删除数据表或数据库的语句不允许在这里执行"; exit(); } //运行查询语句 @@ -142,4 +141,4 @@ else if ($dopost == "query") { exit(); } make_hash(); -include DedeInclude('templets/sys_sql_query.htm'); +include DedeInclude('templets/sys_sql_query.htm'); \ No newline at end of file diff --git a/src/admin/tag_test.php b/src/admin/tag_test.php index ed1ae62f..fdcd7ae3 100644 --- a/src/admin/tag_test.php +++ b/src/admin/tag_test.php @@ -11,4 +11,4 @@ require_once(dirname(__FILE__)."/config.php"); CheckPurview('temp_Other'); require_once(DEDEINC."/typelink/typelink.class.php"); -include DedeInclude('templets/tag_test.htm'); +include DedeInclude('templets/tag_test.htm'); \ No newline at end of file diff --git a/src/admin/tags_main.php b/src/admin/tags_main.php index a27df66b..f63eef90 100644 --- a/src/admin/tags_main.php +++ b/src/admin/tags_main.php @@ -18,7 +18,6 @@ if (empty($action)) { $orderway = isset($orderway) && $orderway == 'asc' ? 'asc' : 'desc'; if (!empty($tag)) $where = " where tag like '%$tag%'"; else $where = ''; - $neworderway = ($orderway == 'desc' ? 'asc' : 'desc'); $query = "SELECT * FROM `#@__tagindex` $where ORDER BY $orderby $orderway"; $dlist = new DataListCP(); @@ -26,7 +25,7 @@ if (empty($action)) { $dlist->SetParameter("tag", $tag); $dlist->SetParameter("orderway", $orderway); $dlist->SetParameter("orderby", $orderby); - $dlist->pageSize = 20; + $dlist->pageSize = 30; $dlist->SetTemplet(DEDEADMIN."/templets/tags_main.htm"); $dlist->SetSource($query); $dlist->Display(); @@ -39,7 +38,7 @@ else if ($action == 'update') { $tid = (empty($tid) ? 0 : intval($tid)); $count = (empty($count) ? 0 : intval($count)); if (empty($tid)) { - ShowMsg('没有选择要删除的tag!', '-1'); + ShowMsg('没有选择要删除的tag', '-1'); exit(); } $query = "UPDATE `#@__tagindex` SET `count`='$count' WHERE id='$tid' "; @@ -63,9 +62,9 @@ else if ($action == 'delete') { if ($dsql->ExecuteNoneQuery($query)) { $query = "DELETE FROM `#@__taglist` WHERE tid IN ($stringids)"; $dsql->ExecuteNoneQuery($query); - ShowMsg("删除tags[ $stringids ]成功", 'tags_main.php'); + ShowMsg("删除tags [$stringids] 成功", 'tags_main.php'); } else { - ShowMsg("删除tags[ $stringids ]失败", 'tags_main.php'); + ShowMsg("删除tags [$stringids] 失败", 'tags_main.php'); } exit(); } else if ($action == 'get_one') { @@ -149,4 +148,4 @@ else if ($action == 'fetch') { $goto = "tags_main.php?action=fetch&startaid=$startaid&endaid=$endaid&start=$start"; ShowMsg('继续获取tags ', $goto, 0, 500); exit(); -} +} \ No newline at end of file diff --git a/src/admin/templets/album_add.htm b/src/admin/templets/album_add.htm index d1e64941..04fb4db8 100644 --- a/src/admin/templets/album_add.htm +++ b/src/admin/templets/album_add.htm @@ -91,7 +91,7 @@ table{border-collapse:separate} - +
@@ -197,7 +197,7 @@ table{border-collapse:separate} echo ""; echo $typeOptions; echo ""; - ?> + ?>
- +