| @@ -11,7 +11,6 @@ class ActionSearch | |||||
| var $keyword; | var $keyword; | ||||
| var $asarray = array(); | var $asarray = array(); | ||||
| var $result = array(); | var $result = array(); | ||||
| function __construct($keyword) | function __construct($keyword) | ||||
| { | { | ||||
| $this->asarray = $this->GetSearchstr(); | $this->asarray = $this->GetSearchstr(); | ||||
| @@ -27,7 +27,6 @@ if ($dopost == "save") { | |||||
| if ($normbody['style'] == 'code') { | if ($normbody['style'] == 'code') { | ||||
| $normbody = addslashes($normbody['htmlcode']); | $normbody = addslashes($normbody['htmlcode']); | ||||
| } else if ($normbody['style'] == 'txt') { | } else if ($normbody['style'] == 'txt') { | ||||
| $normbody = "<a href=\"{$link}\" font-size=\"{$normbody['size']}\" color=\"{$normbody['color']}\">{$normbody['title']}</a>"; | $normbody = "<a href=\"{$link}\" font-size=\"{$normbody['size']}\" color=\"{$normbody['color']}\">{$normbody['title']}</a>"; | ||||
| } else if ($normbody['style'] == 'img') { | } else if ($normbody['style'] == 'img') { | ||||
| if (empty($normbody['width'])) { | if (empty($normbody['width'])) { | ||||
| @@ -18,7 +18,7 @@ if ($dojob == '') { | |||||
| exit(); | exit(); | ||||
| } else { | } else { | ||||
| if (empty($startdd)) $startdd = 0; | if (empty($startdd)) $startdd = 0; | ||||
| if (empty($pagesize)) $pagesize = 100; | |||||
| if (empty($pagesize)) $pageSize = 30; | |||||
| if (empty($totalnum)) $totalnum = 0; | if (empty($totalnum)) $totalnum = 0; | ||||
| if (empty($sid)) $sid = 0; | if (empty($sid)) $sid = 0; | ||||
| if (empty($eid)) $eid = 0; | if (empty($eid)) $eid = 0; | ||||
| @@ -24,13 +24,11 @@ if ($dopost == 'saveall') { | |||||
| $rpurl = ${'rpurl_'.$aid}; | $rpurl = ${'rpurl_'.$aid}; | ||||
| $rpurlold = ${'rpurlold_'.$aid}; | $rpurlold = ${'rpurlold_'.$aid}; | ||||
| $keyword = ${'keyword_'.$aid}; | $keyword = ${'keyword_'.$aid}; | ||||
| //删除项目 | //删除项目 | ||||
| if (!empty(${'isdel_'.$aid})) { | if (!empty(${'isdel_'.$aid})) { | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); | ||||
| continue; | continue; | ||||
| } | } | ||||
| //禁用项目 | //禁用项目 | ||||
| $staold = ${'staold_'.$aid}; | $staold = ${'staold_'.$aid}; | ||||
| $sta = empty(${'isnouse_'.$aid}) ? 1 : 0; | $sta = empty(${'isnouse_'.$aid}) ? 1 : 0; | ||||
| @@ -39,7 +37,6 @@ if ($dopost == 'saveall') { | |||||
| $dsql->ExecuteNoneQuery($query1); | $dsql->ExecuteNoneQuery($query1); | ||||
| continue; | continue; | ||||
| } | } | ||||
| //更新链接网址 | //更新链接网址 | ||||
| if ($rpurl != $rpurlold) { | if ($rpurl != $rpurlold) { | ||||
| $query1 = "UPDATE `#@__keywords` SET rpurl='$rpurl' WHERE aid='$aid' "; | $query1 = "UPDATE `#@__keywords` SET rpurl='$rpurl' WHERE aid='$aid' "; | ||||
| @@ -74,17 +71,15 @@ if (empty($keyword)) { | |||||
| } else { | } else { | ||||
| $addquery = " WHERE keyword LIKE '%$keyword%' "; | $addquery = " WHERE keyword LIKE '%$keyword%' "; | ||||
| } | } | ||||
| $sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY `rank` DESC"; | $sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY `rank` DESC"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->pageSize = 20; | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetParameter("keyword", $keyword); | $dlist->SetParameter("keyword", $keyword); | ||||
| $dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); | $dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); | ||||
| $dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
| $dlist->Display(); | $dlist->Display(); | ||||
| function GetSta($sta) | function GetSta($sta) | ||||
| { | { | ||||
| if ($sta == 1) return ''; | if ($sta == 1) return ''; | ||||
| else return ' checked="1" '; | else return ' checked="1" '; | ||||
| } | |||||
| } | |||||
| @@ -15,7 +15,7 @@ CheckPurview('sys_Keyword'); | |||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| //分析已存在的关键词(适用于默认的文章模型) | //分析已存在的关键词(适用于默认的文章模型) | ||||
| if ($dopost == 'analyse') { | if ($dopost == 'analyse') { | ||||
| echo "正在读取关键词数据库...<br>\r\n"; | |||||
| echo "正在读取关键词数据库<br>\r\n"; | |||||
| flush(); | flush(); | ||||
| $ws = $wserr = $wsnew = ""; | $ws = $wserr = $wsnew = ""; | ||||
| $dsql->SetQuery("SELECT * FROM `#@__keywords`"); | $dsql->SetQuery("SELECT * FROM `#@__keywords`"); | ||||
| @@ -26,7 +26,7 @@ if ($dopost == 'analyse') { | |||||
| } | } | ||||
| echo "完成关键词数据库的载入<br>\r\n"; | echo "完成关键词数据库的载入<br>\r\n"; | ||||
| flush(); | flush(); | ||||
| echo "读取档案数据库,并对禁用的关键词和生字进行处理...<br>\r\n"; | |||||
| echo "读取档案数据库,并对禁用的关键词和生字进行处理<br>\r\n"; | |||||
| flush(); | flush(); | ||||
| $dsql->SetQuery("SELECT id,keywords FROM `#@__archives`"); | $dsql->SetQuery("SELECT id,keywords FROM `#@__archives`"); | ||||
| $dsql->Execute(); | $dsql->Execute(); | ||||
| @@ -57,10 +57,10 @@ if ($dopost == 'analyse') { | |||||
| echo "完成档案数据库的处理<br>\r\n"; | echo "完成档案数据库的处理<br>\r\n"; | ||||
| flush(); | flush(); | ||||
| if (is_array($wsnew)) { | if (is_array($wsnew)) { | ||||
| echo "对关键词进行排序...<br>\r\n"; | |||||
| echo "对关键词进行排序<br>\r\n"; | |||||
| flush(); | flush(); | ||||
| arsort($wsnew); | arsort($wsnew); | ||||
| echo "把关键词保存到数据库...<br>\r\n"; | |||||
| echo "把关键词保存到数据库<br>\r\n"; | |||||
| flush(); | flush(); | ||||
| foreach ($wsnew as $k => $v) { | foreach ($wsnew as $k => $v) { | ||||
| if (strlen($k) > 20) { | if (strlen($k) > 20) { | ||||
| @@ -87,7 +87,7 @@ else if ($dopost == 'fetch') { | |||||
| $startdd = 0; | $startdd = 0; | ||||
| } | } | ||||
| if (empty($pagesize)) { | if (empty($pagesize)) { | ||||
| $pagesize = 20; | |||||
| $pageSize = 30; | |||||
| } | } | ||||
| if (empty($totalnum)) { | if (empty($totalnum)) { | ||||
| $totalnum = 0; | $totalnum = 0; | ||||
| @@ -11,27 +11,22 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEINC."/datalistcp.class.php"); | require_once(DEDEINC."/datalistcp.class.php"); | ||||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
| $f = RemoveXSS($f); | $f = RemoveXSS($f); | ||||
| if (empty($keywords)) $keywords = ""; | if (empty($keywords)) $keywords = ""; | ||||
| $sql = "SELECT * FROM `#@__keywords` ORDER BY `rank` DESC"; | $sql = "SELECT * FROM `#@__keywords` ORDER BY `rank` DESC"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); | $dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); | ||||
| $dlist->pageSize = 300; | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetParameter("f", $f); | $dlist->SetParameter("f", $f); | ||||
| $dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
| $dlist->Display(); | $dlist->Display(); | ||||
| function GetSta($sta) | function GetSta($sta) | ||||
| { | { | ||||
| if ($sta == 1) return "正常"; | if ($sta == 1) return "正常"; | ||||
| else return "<span class='text-danger'>禁用</span>"; | else return "<span class='text-danger'>禁用</span>"; | ||||
| } | } | ||||
| function GetMan($sta) | function GetMan($sta) | ||||
| { | { | ||||
| if ($sta == 1) return "禁用"; | if ($sta == 1) return "禁用"; | ||||
| else return "启用"; | else return "启用"; | ||||
| } | |||||
| } | |||||
| @@ -10,7 +10,6 @@ require(dirname(__FILE__)."/config.php"); | |||||
| header("Pragma:no-cache"); | header("Pragma:no-cache"); | ||||
| header("Cache-Control:no-cache"); | header("Cache-Control:no-cache"); | ||||
| header("Expires:0"); | header("Expires:0"); | ||||
| //来源列表 | //来源列表 | ||||
| if ($t == 'source') { | if ($t == 'source') { | ||||
| $m_file = DEDEDATA."/admin/source.txt"; | $m_file = DEDEDATA."/admin/source.txt"; | ||||
| @@ -42,4 +41,4 @@ if ($t == 'source') { | |||||
| } | } | ||||
| } | } | ||||
| echo "</div><div class='coolbg5'> </div>\r\n"; | echo "</div><div class='coolbg5'> </div>\r\n"; | ||||
| } | |||||
| } | |||||
| @@ -14,9 +14,7 @@ CheckPurview('sys_Source'); | |||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| if (empty($allsource)) $allsource = ''; | if (empty($allsource)) $allsource = ''; | ||||
| else $allsource = stripslashes($allsource); | else $allsource = stripslashes($allsource); | ||||
| $m_file = DEDEDATA."/admin/source.txt"; | $m_file = DEDEDATA."/admin/source.txt"; | ||||
| //保存 | //保存 | ||||
| if ($dopost == 'save') { | if ($dopost == 'save') { | ||||
| $fp = fopen($m_file, 'w'); | $fp = fopen($m_file, 'w'); | ||||
| @@ -39,4 +37,4 @@ $win->AddHidden('dopost', 'save'); | |||||
| $win->AddTitle("每行保存一个来源:"); | $win->AddTitle("每行保存一个来源:"); | ||||
| $win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>"); | $win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>"); | ||||
| $winform = $win->GetWindow('ok'); | $winform = $win->GetWindow('ok'); | ||||
| $win->Display(); | |||||
| $win->Display(); | |||||
| @@ -12,12 +12,9 @@ require_once(dirname(__FILE__).'/config.php'); | |||||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | require_once(DEDEINC.'/libraries/oxwindow.class.php'); | ||||
| CheckPurview('sys_StringMix'); | CheckPurview('sys_StringMix'); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| if (empty($allsource)) $allsource = ''; | if (empty($allsource)) $allsource = ''; | ||||
| else $allsource = stripslashes($allsource); | else $allsource = stripslashes($allsource); | ||||
| $m_file = DEDEDATA."/downmix.data.inc"; | $m_file = DEDEDATA."/downmix.data.inc"; | ||||
| //保存 | //保存 | ||||
| if ($dopost == "save") { | if ($dopost == "save") { | ||||
| CheckCSRF(); | CheckCSRF(); | ||||
| @@ -27,7 +24,6 @@ if ($dopost == "save") { | |||||
| fclose($fp); | fclose($fp); | ||||
| echo "<script>alert('Save OK!');</script>"; | echo "<script>alert('Save OK!');</script>"; | ||||
| } | } | ||||
| //读出 | //读出 | ||||
| if (empty($allsource) && filesize($m_file) > 0) { | if (empty($allsource) && filesize($m_file) > 0) { | ||||
| $fp = fopen($m_file, 'r'); | $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->AddTitle("如果您要启用字符串混淆来防采集,请在文档模板需要的字段加上 function='RndString(@me)' 属性,如:{dede:field name='body' function='RndString(@me)'/}"); | ||||
| $win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>"); | $win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>"); | ||||
| $winform = $win->GetWindow('ok'); | $winform = $win->GetWindow('ok'); | ||||
| $win->Display(); | |||||
| $win->Display(); | |||||
| @@ -30,24 +30,19 @@ if ($dopost == 'analyse') { | |||||
| else if ($dopost == 'delsel') { | else if ($dopost == 'delsel') { | ||||
| require_once(DEDEINC."/typelink/typelink.class.php"); | require_once(DEDEINC."/typelink/typelink.class.php"); | ||||
| require_once(dirname(__FILE__)."/inc/inc_batchup.php"); | require_once(dirname(__FILE__)."/inc/inc_batchup.php"); | ||||
| if (empty($titles)) { | if (empty($titles)) { | ||||
| header("Content-Type: text/html; charset={$cfg_ver_lang}"); | header("Content-Type: text/html; charset={$cfg_ver_lang}"); | ||||
| echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_ver_lang}\">\r\n"; | echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_ver_lang}\">\r\n"; | ||||
| echo "没有指定删除的文档"; | echo "没有指定删除的文档"; | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| $titless = split('`', $titles); | $titless = split('`', $titles); | ||||
| if ($channelid < -1) { | if ($channelid < -1) { | ||||
| $orderby = ($deltype == 'delnew' ? " ORDER BY aid DESC " : " ORDER BY aid ASC "); | $orderby = ($deltype == 'delnew' ? " ORDER BY aid DESC " : " ORDER BY aid ASC "); | ||||
| } else { | } else { | ||||
| $orderby = ($deltype == 'delnew' ? " ORDER BY id DESC " : " ORDER BY id ASC "); | $orderby = ($deltype == 'delnew' ? " ORDER BY id DESC " : " ORDER BY id ASC "); | ||||
| } | } | ||||
| $totalarc = 0; | $totalarc = 0; | ||||
| foreach ($titless as $title) { | foreach ($titless as $title) { | ||||
| $title = trim($title); | $title = trim($title); | ||||
| $title = addslashes($title == '' ? '' : urldecode($title)); | $title = addslashes($title == '' ? '' : urldecode($title)); | ||||
| @@ -71,13 +66,12 @@ else if ($dopost == 'delsel') { | |||||
| } | } | ||||
| } | } | ||||
| $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); | $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); | ||||
| ShowMsg("一共删除了[{$totalarc}]篇重复的文档", "javascript:;"); | |||||
| ShowMsg("一共删除了 [{$totalarc}] 篇重复的文档", "javascript:;"); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| //向导页 | //向导页 | ||||
| $channelinfos = array(); | $channelinfos = array(); | ||||
| $dsql->setquery("SELECT id,typename,maintable,addtable FROM `#@__channeltype` "); | $dsql->setquery("SELECT id,typename,maintable,addtable FROM `#@__channeltype` "); | ||||
| $dsql->execute(); | $dsql->execute(); | ||||
| while ($row = $dsql->getarray()) $channelinfos[] = $row; | while ($row = $dsql->getarray()) $channelinfos[] = $row; | ||||
| include DedeInclude('templets/article_test_same.htm'); | |||||
| include DedeInclude('templets/article_test_same.htm'); | |||||
| @@ -12,12 +12,9 @@ require_once(dirname(__FILE__).'/config.php'); | |||||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | require_once(DEDEINC.'/libraries/oxwindow.class.php'); | ||||
| CheckPurview('sys_Writer'); | CheckPurview('sys_Writer'); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| if (empty($allwriter)) $allwriter = ''; | if (empty($allwriter)) $allwriter = ''; | ||||
| else $allwriter = stripslashes($allwriter); | else $allwriter = stripslashes($allwriter); | ||||
| $m_file = DEDEDATA."/admin/writer.txt"; | $m_file = DEDEDATA."/admin/writer.txt"; | ||||
| //保存 | //保存 | ||||
| if ($dopost == "save") { | if ($dopost == "save") { | ||||
| $fp = fopen($m_file, 'w'); | $fp = fopen($m_file, 'w'); | ||||
| @@ -26,7 +23,6 @@ if ($dopost == "save") { | |||||
| fclose($fp); | fclose($fp); | ||||
| echo "<script>alert('Save OK!');</script>"; | echo "<script>alert('Save OK!');</script>"; | ||||
| } | } | ||||
| //读出 | //读出 | ||||
| if (empty($allwriter) && filesize($m_file) > 0) { | if (empty($allwriter) && filesize($m_file) > 0) { | ||||
| $fp = fopen($m_file, 'r'); | $fp = fopen($m_file, 'r'); | ||||
| @@ -41,4 +37,4 @@ $win->AddHidden('dopost', 'save'); | |||||
| $win->AddTitle("把作者姓名用半角逗号“,”分开:"); | $win->AddTitle("把作者姓名用半角逗号“,”分开:"); | ||||
| $win->AddMsgItem("<textarea name='allwriter' id='allwriter' style='width:100%;height:300px'>$allwriter</textarea>"); | $win->AddMsgItem("<textarea name='allwriter' id='allwriter' style='width:100%;height:300px'>$allwriter</textarea>"); | ||||
| $winform = $win->GetWindow('ok'); | $winform = $win->GetWindow('ok'); | ||||
| $win->Display(); | |||||
| $win->Display(); | |||||
| @@ -19,12 +19,10 @@ if (empty($do)) { | |||||
| $baidunews .= "<webSite>$cfg_webname </webSite>\n"; | $baidunews .= "<webSite>$cfg_webname </webSite>\n"; | ||||
| $baidunews .= "<webMaster>$cfg_adminemail </webMaster>\n"; | $baidunews .= "<webMaster>$cfg_adminemail </webMaster>\n"; | ||||
| $baidunews .= "<updatePeri>$cfg_updateperi </updatePeri>\n"; | $baidunews .= "<updatePeri>$cfg_updateperi </updatePeri>\n"; | ||||
| $limit = $cfg_baidunews_limit; | $limit = $cfg_baidunews_limit; | ||||
| if ($limit > 100 || $limit < 1) { | if ($limit > 100 || $limit < 1) { | ||||
| $limit = 100; | $limit = 100; | ||||
| } | } | ||||
| $query = "SELECT maintable.*, addtable.body, arctype.typename | $query = "SELECT maintable.*, addtable.body, arctype.typename | ||||
| FROM `#@__archives` maintable | FROM `#@__archives` maintable | ||||
| LEFT JOIN `#@__addonarticle` addtable ON addtable.aid=maintable.id | LEFT JOIN `#@__addonarticle` addtable ON addtable.aid=maintable.id | ||||
| @@ -55,7 +53,6 @@ if (empty($do)) { | |||||
| $author = dede_htmlspecialchars($row['writer']); | $author = dede_htmlspecialchars($row['writer']); | ||||
| $source = dede_htmlspecialchars($row['source']); | $source = dede_htmlspecialchars($row['source']); | ||||
| $pubdate = dede_htmlspecialchars(gmdate('Y-m-d H:i', $row['pubdate'] + $cfg_cli_time * 3600)); | $pubdate = dede_htmlspecialchars(gmdate('Y-m-d H:i', $row['pubdate'] + $cfg_cli_time * 3600)); | ||||
| $baidunews .= "<item>\n"; | $baidunews .= "<item>\n"; | ||||
| $baidunews .= "<title>$title </title>\n"; | $baidunews .= "<title>$title </title>\n"; | ||||
| $baidunews .= "<link>$link </link>\n"; | $baidunews .= "<link>$link </link>\n"; | ||||
| @@ -76,4 +73,4 @@ if (empty($do)) { | |||||
| fwrite($fp, $baidunews); | fwrite($fp, $baidunews); | ||||
| fclose($fp); | fclose($fp); | ||||
| showmsg("<a href='{$filename}' target=\"_blank\">{$filename}生成成功</a>", 'javascript:;'); | showmsg("<a href='{$filename}' target=\"_blank\">{$filename}生成成功</a>", 'javascript:;'); | ||||
| } | |||||
| } | |||||
| @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('member_Card'); | CheckPurview('member_Card'); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| if ($dopost == '') include(DEDEADMIN."/templets/cards_make.htm"); | if ($dopost == '') include(DEDEADMIN."/templets/cards_make.htm"); | ||||
| //生成点卡 | //生成点卡 | ||||
| elseif ($dopost == 'make') { | elseif ($dopost == 'make') { | ||||
| $row = $dsql->GetOne("SELECT * FROM #@__moneycard_record ORDER BY aid DESC"); | $row = $dsql->GetOne("SELECT * FROM #@__moneycard_record ORDER BY aid DESC"); | ||||
| @@ -25,9 +24,7 @@ elseif ($dopost == 'make') { | |||||
| $ctid = $cardtype; | $ctid = $cardtype; | ||||
| $startid++; | $startid++; | ||||
| $endid = $startid + $mnum; | $endid = $startid + $mnum; | ||||
| header("Content-Type: text/html; charset={$cfg_soft_lang}"); | header("Content-Type: text/html; charset={$cfg_soft_lang}"); | ||||
| for (; $startid < $endid; $startid++) { | for (; $startid < $endid; $startid++) { | ||||
| $cardid = $snprefix.$startid.'-'; | $cardid = $snprefix.$startid.'-'; | ||||
| for ($p = 0; $p < $pwdgr; $p++) { | for ($p = 0; $p < $pwdgr; $p++) { | ||||
| @@ -55,4 +52,4 @@ elseif ($dopost == 'make') { | |||||
| echo "成功生成点卡:{$cardid}<br>"; | echo "成功生成点卡:{$cardid}<br>"; | ||||
| } | } | ||||
| echo "成功生成 {$mnum} 个点卡"; | echo "成功生成 {$mnum} 个点卡"; | ||||
| } | |||||
| } | |||||
| @@ -25,25 +25,21 @@ if ($dopost == "delete") { | |||||
| } else { | } else { | ||||
| $addsql = ''; | $addsql = ''; | ||||
| if (isset($isexp)) $addsql = " WHERE isexp='$isexp' "; | if (isset($isexp)) $addsql = " WHERE isexp='$isexp' "; | ||||
| $sql = "SELECT * FROM #@__moneycard_record $addsql ORDER BY aid DESC"; | $sql = "SELECT * FROM #@__moneycard_record $addsql ORDER BY aid DESC"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->pageSize = 25; //设定每页显示记录数(默认25条) | |||||
| $dlist->pageSize = 30;//设定每页显示记录数 | |||||
| if (isset($isexp)) $dlist->SetParameter("isexp", $isexp); | if (isset($isexp)) $dlist->SetParameter("isexp", $isexp); | ||||
| $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); | $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); | ||||
| $dlist->dsql->Execute('ts'); | $dlist->dsql->Execute('ts'); | ||||
| while ($rw = $dlist->dsql->GetArray('ts')) { | while ($rw = $dlist->dsql->GetArray('ts')) { | ||||
| $TypeNames[$rw['tid']] = $rw['pname']; | $TypeNames[$rw['tid']] = $rw['pname']; | ||||
| } | } | ||||
| $tplfile = DEDEADMIN."/templets/cards_manmage.htm"; | $tplfile = DEDEADMIN."/templets/cards_manmage.htm"; | ||||
| //这两句的顺序不能更换 | //这两句的顺序不能更换 | ||||
| $dlist->SetTemplate($tplfile); //载入模板 | $dlist->SetTemplate($tplfile); //载入模板 | ||||
| $dlist->SetSource($sql); //设定查询SQL | $dlist->SetSource($sql); //设定查询SQL | ||||
| $dlist->Display(); //显示 | $dlist->Display(); //显示 | ||||
| } | } | ||||
| function GetMemberID($mid) | function GetMemberID($mid) | ||||
| { | { | ||||
| global $dsql; | global $dsql; | ||||
| @@ -52,7 +48,6 @@ function GetMemberID($mid) | |||||
| if (is_array($row)) return "<a href='member_view.php?mid={$mid}'>".$row['userid']."</a>"; | if (is_array($row)) return "<a href='member_view.php?mid={$mid}'>".$row['userid']."</a>"; | ||||
| else return '0'; | else return '0'; | ||||
| } | } | ||||
| function GetUseDate($time = 0) | function GetUseDate($time = 0) | ||||
| { | { | ||||
| if (!empty($time)) return GetDateMk($time); | if (!empty($time)) return GetDateMk($time); | ||||
| @@ -63,4 +58,4 @@ function GetSta($sta) | |||||
| if ($sta == 1) return '已售出'; | if ($sta == 1) return '已售出'; | ||||
| else if ($sta == -1) return '已使用'; | else if ($sta == -1) return '已使用'; | ||||
| else return '未使用'; | else return '未使用'; | ||||
| } | |||||
| } | |||||
| @@ -20,4 +20,4 @@ if ($cuserLogin->adminStyle == 'dedecms') { | |||||
| } else { | } else { | ||||
| include DedeInclude('templets/catalog_menu2.htm'); | include DedeInclude('templets/catalog_menu2.htm'); | ||||
| exit(); | exit(); | ||||
| } | |||||
| } | |||||
| @@ -66,7 +66,7 @@ LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel | |||||
| $whereSql | $whereSql | ||||
| ORDER BY arc.aid DESC"; | ORDER BY arc.aid DESC"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->pageSize = 20; | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetParameter("dopost", "listArchives"); | $dlist->SetParameter("dopost", "listArchives"); | ||||
| $dlist->SetParameter("keyword", $keyword); | $dlist->SetParameter("keyword", $keyword); | ||||
| $dlist->SetParameter("cid", $cid); | $dlist->SetParameter("cid", $cid); | ||||
| @@ -39,10 +39,8 @@ if (empty($action)) { | |||||
| } else { | } else { | ||||
| $query = "SHOW TABLES"; | $query = "SHOW TABLES"; | ||||
| } | } | ||||
| $dsql->SetQuery($query); | $dsql->SetQuery($query); | ||||
| $dsql->Execute("biz"); | $dsql->Execute("biz"); | ||||
| while ($row = $dsql->GetArray("biz")) { | while ($row = $dsql->GetArray("biz")) { | ||||
| if (empty($row[0])) $row[0] = ''; | if (empty($row[0])) $row[0] = ''; | ||||
| if ($table == $row[0]) { | if ($table == $row[0]) { | ||||
| @@ -66,4 +64,4 @@ if (empty($action)) { | |||||
| } else { | } else { | ||||
| showmsg('自定义表单创建失败', '-1'); | showmsg('自定义表单创建失败', '-1'); | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -37,7 +37,6 @@ foreach ($ds as $d) { | |||||
| function _SAVE() | function _SAVE() | ||||
| ----------------------*/ | ----------------------*/ | ||||
| if ($action == 'save') { | if ($action == 'save') { | ||||
| if (!isset($fieldtypes[$dtype])) { | if (!isset($fieldtypes[$dtype])) { | ||||
| ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); | ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); | ||||
| exit(); | exit(); | ||||
| @@ -13,7 +13,7 @@ CheckPurview('c_New'); | |||||
| $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; | $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; | ||||
| $action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete','excel')) ? $action : ''; | $action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete','excel')) ? $action : ''; | ||||
| if (empty($diyid)) { | if (empty($diyid)) { | ||||
| showMsg("非法操作!", 'javascript:;'); | |||||
| showMsg("非法操作", 'javascript:;'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| require_once DEDEINC.'/diyform.class.php'; | require_once DEDEINC.'/diyform.class.php'; | ||||
| @@ -69,7 +69,7 @@ if ($action == 'post') { | |||||
| include_once DEDEINC.'/datalistcp.class.php'; | include_once DEDEINC.'/datalistcp.class.php'; | ||||
| $query = "SELECT * FROM {$diy->table} ORDER BY id DESC"; | $query = "SELECT * FROM {$diy->table} ORDER BY id DESC"; | ||||
| $datalist = new DataListCP(); | $datalist = new DataListCP(); | ||||
| $datalist->pageSize = 10; | |||||
| $datalist->pageSize = 30; | |||||
| $datalist->SetParameter('action', 'list'); | $datalist->SetParameter('action', 'list'); | ||||
| $datalist->SetParameter('diyid', $diyid); | $datalist->SetParameter('diyid', $diyid); | ||||
| $datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); | $datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); | ||||
| @@ -100,7 +100,7 @@ else { | |||||
| $querystring = "SELECT * FROM `#@__feedback` WHERE msg LIKE '%$keyword%' $addsql ORDER BY dtime DESC"; | $querystring = "SELECT * FROM `#@__feedback` WHERE msg LIKE '%$keyword%' $addsql ORDER BY dtime DESC"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->pageSize = 15; | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetParameter('aid', $aid); | $dlist->SetParameter('aid', $aid); | ||||
| $dlist->SetParameter('ip', $ip); | $dlist->SetParameter('ip', $ip); | ||||
| $dlist->SetParameter('typeid', $typeid); | $dlist->SetParameter('typeid', $typeid); | ||||
| @@ -12,7 +12,7 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('c_FreeList'); | CheckPurview('c_FreeList'); | ||||
| require_once DEDEINC.'/channelunit.func.php'; | require_once DEDEINC.'/channelunit.func.php'; | ||||
| setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/"); | setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/"); | ||||
| if(empty($pagesize)) $pagesize = 18; | |||||
| if(empty($pagesize)) $pageSize = 30; | |||||
| if(empty($pageno)) $pageno = 1; | if(empty($pageno)) $pageno = 1; | ||||
| if(empty($dopost)) $dopost = ''; | if(empty($dopost)) $dopost = ''; | ||||
| if(empty($orderby)) $orderby = 'aid'; | if(empty($orderby)) $orderby = 'aid'; | ||||
| @@ -11,7 +11,6 @@ | |||||
| require(dirname(__FILE__)."/config.php"); | require(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('plus_友情链接模块'); | CheckPurview('plus_友情链接模块'); | ||||
| if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
| if ($dopost == "add") { | if ($dopost == "add") { | ||||
| $dtime = time(); | $dtime = time(); | ||||
| if (is_uploaded_file($logoimg)) { | if (is_uploaded_file($logoimg)) { | ||||
| @@ -13,7 +13,6 @@ CheckPurview('plus_友情链接模块'); | |||||
| $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'friendlink_main.php' : $_COOKIE['ENV_GOBACK_URL']; | $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'friendlink_main.php' : $_COOKIE['ENV_GOBACK_URL']; | ||||
| if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
| $id = isset($id)? intval($id) : 0; | $id = isset($id)? intval($id) : 0; | ||||
| if (isset($allid)) { | if (isset($allid)) { | ||||
| $aids = explode(',', $allid); | $aids = explode(',', $allid); | ||||
| if (count($aids) == 1) { | if (count($aids) == 1) { | ||||
| @@ -34,7 +34,7 @@ while ($myrow = $dsql->GetObject('admin')) { | |||||
| $adminlist .= "<option value='{$myrow->id}'>{$myrow->uname}</option>\r\n"; | $adminlist .= "<option value='{$myrow->id}'>{$myrow->uname}</option>\r\n"; | ||||
| } | } | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->pageSize = 20; | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetParameter("adminid", $adminid); | $dlist->SetParameter("adminid", $adminid); | ||||
| $dlist->SetParameter("cip", $cip); | $dlist->SetParameter("cip", $cip); | ||||
| $dlist->SetParameter("dtime", $dtime); | $dlist->SetParameter("dtime", $dtime); | ||||
| @@ -11,14 +11,12 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEINC."/channelunit.func.php"); | require_once(DEDEINC."/channelunit.func.php"); | ||||
| $action = (empty($action) ? '' : $action); | $action = (empty($action) ? '' : $action); | ||||
| if ($action == '') { | if ($action == '') { | ||||
| require_once(DEDEADMIN."/templets/makehtml_all.htm"); | require_once(DEDEADMIN."/templets/makehtml_all.htm"); | ||||
| exit(); | exit(); | ||||
| } else if ($action == 'make') { | } else if ($action == 'make') { | ||||
| //step = 1 更新主页、step = 2 更新内容、step = 3 更新栏目 | //step = 1 更新主页、step = 2 更新内容、step = 3 更新栏目 | ||||
| if (empty($step)) $step = 1; | if (empty($step)) $step = 1; | ||||
| //更新文档前优化数据 | //更新文档前优化数据 | ||||
| /*------------------- | /*------------------- | ||||
| function _1_OptimizeData1() | function _1_OptimizeData1() | ||||
| @@ -83,7 +81,6 @@ else if ($step == 4) { | |||||
| while ($row = $dsql->GetArray()) { | while ($row = $dsql->GetArray()) { | ||||
| $typeids[$row['typeid']] = 1; | $typeids[$row['typeid']] = 1; | ||||
| } | } | ||||
| foreach ($typeids as $k => $v) { | foreach ($typeids as $k => $v) { | ||||
| $vs = array(); | $vs = array(); | ||||
| $vs = GetParentIds($k); | $vs = GetParentIds($k); | ||||
| @@ -128,10 +125,9 @@ else if ($step == 10) { | |||||
| OptimizeData($dsql); | OptimizeData($dsql); | ||||
| ShowMsg("完成所有文件的更新", "javascript:;"); | ShowMsg("完成所有文件的更新", "javascript:;"); | ||||
| exit(); | exit(); | ||||
| } //make step | |||||
| } //action=='make' | |||||
| }//make step | |||||
| }//action=='make' | |||||
| /** | /** | ||||
| * 优化数据 | * 优化数据 | ||||
| * | * | ||||
| @@ -152,4 +148,4 @@ function OptimizeData($dsql) | |||||
| $tptable = ''; | $tptable = ''; | ||||
| foreach ($tptables as $t) $tptable .= ($tptable == '' ? "`{$t}`" : ",`{$t}`"); | foreach ($tptables as $t) $tptable .= ($tptable == '' ? "`{$t}`" : ",`{$t}`"); | ||||
| $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable; "); | $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable; "); | ||||
| } | |||||
| } | |||||
| @@ -10,4 +10,4 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEINC."/typelink/typelink.class.php"); | require_once(DEDEINC."/typelink/typelink.class.php"); | ||||
| include DedeInclude('templets/makehtml_archives.htm'); | |||||
| include DedeInclude('templets/makehtml_archives.htm'); | |||||
| @@ -16,7 +16,7 @@ $est1 = ExecTime(); | |||||
| $startid = (empty($startid) ? -1 : $startid); | $startid = (empty($startid) ? -1 : $startid); | ||||
| $endid = (empty($endid) ? 0 : $endid); | $endid = (empty($endid) ? 0 : $endid); | ||||
| $startdd = (empty($startdd) ? 0 : $startdd); | $startdd = (empty($startdd) ? 0 : $startdd); | ||||
| $pagesize = (empty($pagesize) ? 20 : $pagesize); | |||||
| $pagesize = (empty($pagesize) ? 30 : $pagesize); | |||||
| $totalnum = (empty($totalnum) ? 0 : $totalnum); | $totalnum = (empty($totalnum) ? 0 : $totalnum); | ||||
| $typeid = (empty($typeid) ? 0 : $typeid); | $typeid = (empty($typeid) ? 0 : $typeid); | ||||
| $seltime = (empty($seltime) ? 0 : $seltime); | $seltime = (empty($seltime) ? 0 : $seltime); | ||||
| @@ -9,4 +9,4 @@ | |||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEADMIN."/templets/makehtml_freelist.htm"); | |||||
| require_once(DEDEADMIN."/templets/makehtml_freelist.htm"); | |||||
| @@ -34,8 +34,7 @@ if (isset($idArray[$pageno])) { | |||||
| $lv = new FreeList($lid); | $lv = new FreeList($lid); | ||||
| $ntotalpage = $lv->TotalPage; | $ntotalpage = $lv->TotalPage; | ||||
| if (empty($mkpage)) $mkpage = 1; | if (empty($mkpage)) $mkpage = 1; | ||||
| if (empty($maxpagesize)) $maxpagesize = 50; | |||||
| if (empty($maxpagesize)) $maxpageSize = 30; | |||||
| //如果栏目的文档太多,分多批次更新 | //如果栏目的文档太多,分多批次更新 | ||||
| if ($ntotalpage <= $maxpagesize) { | if ($ntotalpage <= $maxpagesize) { | ||||
| $lv->MakeHtml(); | $lv->MakeHtml(); | ||||
| @@ -61,4 +60,4 @@ if ($nextpage == $totalpage) { | |||||
| ShowMsg("列表:".$tid.",继续进行操作", $gourl, 0, 100); | 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';"); | |||||
| @@ -10,4 +10,4 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEINC."/typelink/typelink.class.php"); | require_once(DEDEINC."/typelink/typelink.class.php"); | ||||
| include DedeInclude('templets/makehtml_js.htm'); | |||||
| include DedeInclude('templets/makehtml_js.htm'); | |||||
| @@ -12,10 +12,8 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('sys_MakeHtml'); | CheckPurview('sys_MakeHtml'); | ||||
| require_once(DEDEINC."/archive/partview.class.php"); | require_once(DEDEINC."/archive/partview.class.php"); | ||||
| if (empty($typeid)) $typeid = 0; | if (empty($typeid)) $typeid = 0; | ||||
| if (empty($templet)) $templet = "plus/js.htm"; | if (empty($templet)) $templet = "plus/js.htm"; | ||||
| if (empty($uptype)) $uptype = "all"; | if (empty($uptype)) $uptype = "all"; | ||||
| if ($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;"); | $row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE id>'$typeid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); | ||||
| if (!is_array($row)) { | if (!is_array($row)) { | ||||
| @@ -40,4 +38,4 @@ if ($uptype == "all") { | |||||
| echo "<hr>"; | echo "<hr>"; | ||||
| echo "<script src='".$cfg_cmspath."/static/js/".$typeid.".js'></script>"; | echo "<script src='".$cfg_cmspath."/static/js/".$typeid.".js'></script>"; | ||||
| exit(); | exit(); | ||||
| } | |||||
| } | |||||
| @@ -10,4 +10,4 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEINC."/typelink/typelink.class.php"); | require_once(DEDEINC."/typelink/typelink.class.php"); | ||||
| include DedeInclude('templets/makehtml_list.htm'); | |||||
| include DedeInclude('templets/makehtml_list.htm'); | |||||
| @@ -18,7 +18,7 @@ if (empty($pageno)) $pageno = 0; | |||||
| if (empty($mkpage)) $mkpage = 1; | if (empty($mkpage)) $mkpage = 1; | ||||
| if (empty($typeid)) $typeid = 0; | if (empty($typeid)) $typeid = 0; | ||||
| if (!isset($uppage)) $uppage = 0; | if (!isset($uppage)) $uppage = 0; | ||||
| if (empty($maxpagesize)) $maxpagesize = 50; | |||||
| if (empty($maxpagesize)) $maxpageSize = 30; | |||||
| $adminID = $cuserLogin->getUserID(); | $adminID = $cuserLogin->getUserID(); | ||||
| //检测获取所有栏目ID | //检测获取所有栏目ID | ||||
| //普通生成或一键更新时更新所有栏目 | //普通生成或一键更新时更新所有栏目 | ||||
| @@ -11,12 +11,10 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEINC."/sitemap.class.php"); | require_once(DEDEINC."/sitemap.class.php"); | ||||
| require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
| if (empty($dopost)) { | if (empty($dopost)) { | ||||
| ShowMsg("参数错误!", "-1"); | |||||
| ShowMsg("参数错误", "-1"); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $serviterm = empty($serviterm) ? "" : $serviterm; | $serviterm = empty($serviterm) ? "" : $serviterm; | ||||
| $sm = new SiteMap(); | $sm = new SiteMap(); | ||||
| $maplist = $sm->GetSiteMap($dopost); | $maplist = $sm->GetSiteMap($dopost); | ||||
| @@ -33,4 +31,4 @@ $dtp->SaveTo($cfg_basedir.$murl); | |||||
| $dtp->Clear(); | $dtp->Clear(); | ||||
| echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>"; | echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>"; | ||||
| echo "<div class=\"alert alert-success\" role=\"alert\">成功更新文件: $murl <a href='$murl' target='_blank' class='btn btn-success btn-sm'>浏览</a></div>"; | echo "<div class=\"alert alert-success\" role=\"alert\">成功更新文件: $murl <a href='$murl' target='_blank' class='btn btn-success btn-sm'>浏览</a></div>"; | ||||
| exit(); | |||||
| exit(); | |||||
| @@ -9,4 +9,4 @@ | |||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| include DedeInclude('templets/makehtml_rss.htm'); | |||||
| include DedeInclude('templets/makehtml_rss.htm'); | |||||
| @@ -11,10 +11,8 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('sys_MakeHtml'); | CheckPurview('sys_MakeHtml'); | ||||
| require_once(DEDEINC."/archive/rssview.class.php"); | require_once(DEDEINC."/archive/rssview.class.php"); | ||||
| if (empty($tid)) $tid = 0; | if (empty($tid)) $tid = 0; | ||||
| if (empty($maxrecord)) $maxrecord = 50; | 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;"); | $row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE id>'$tid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); | ||||
| if (!is_array($row)) { | if (!is_array($row)) { | ||||
| echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>"; | echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>"; | ||||
| @@ -24,4 +22,4 @@ if (!is_array($row)) { | |||||
| $rssurl = $rv->MakeRss(0); | $rssurl = $rv->MakeRss(0); | ||||
| $tid = $row['id']; | $tid = $row['id']; | ||||
| ShowMsg("成功更新".$rssurl.",继续进行操作", "makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord", 0, 100); | ShowMsg("成功更新".$rssurl.",继续进行操作", "makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord", 0, 100); | ||||
| } | |||||
| } | |||||
| @@ -11,7 +11,6 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('sys_MakeHtml'); | CheckPurview('sys_MakeHtml'); | ||||
| if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
| if ($dopost == "ok") { | if ($dopost == "ok") { | ||||
| require_once(DEDEINC."/archive/specview.class.php"); | require_once(DEDEINC."/archive/specview.class.php"); | ||||
| $sp = new SpecView(); | $sp = new SpecView(); | ||||
| @@ -20,4 +19,4 @@ if ($dopost == "ok") { | |||||
| echo "<div class=\"alert alert-success\" role=\"alert\">成功生成所有专题列表 <a href='$rurl' target='_blank' class='btn btn-success btn-sm'>预览</a></div>"; | echo "<div class=\"alert alert-success\" role=\"alert\">成功生成所有专题列表 <a href='$rurl' target='_blank' class='btn btn-success btn-sm'>预览</a></div>"; | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| include DedeInclude('templets/makehtml_spec.htm'); | |||||
| include DedeInclude('templets/makehtml_spec.htm'); | |||||
| @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| $tagid = isset($tagid)? (int)$tagid : 0; | $tagid = isset($tagid)? (int)$tagid : 0; | ||||
| $action = isset($action)? $action : ''; | $action = isset($action)? $action : ''; | ||||
| $search = isset($search)? HtmlReplace($search, 0) : ''; | $search = isset($search)? HtmlReplace($search, 0) : ''; | ||||
| if ($action == "search") { | if ($action == "search") { | ||||
| if (!empty($search)) { | if (!empty($search)) { | ||||
| $sql="select * from #@__tagindex where tag like '%$search%' order by id desc"; | $sql="select * from #@__tagindex where tag like '%$search%' order by id desc"; | ||||
| @@ -36,5 +35,4 @@ if ($action == "search") { | |||||
| echo json_encode($result); | echo json_encode($result); | ||||
| exit; | exit; | ||||
| } | } | ||||
| include DedeInclude('templets/makehtml_taglist.htm'); | |||||
| include DedeInclude('templets/makehtml_taglist.htm'); | |||||
| @@ -16,7 +16,7 @@ if (empty($mktime)) $mktime = time(); | |||||
| if (empty($mkpage)) $mkpage = 1; | if (empty($mkpage)) $mkpage = 1; | ||||
| if (empty($upall)) $upall = 0; //是否更新全部 0为更新单个 1为更新全部 | if (empty($upall)) $upall = 0; //是否更新全部 0为更新单个 1为更新全部 | ||||
| if (empty($ctagid)) $ctagid = 0; //当前处理的tagid | if (empty($ctagid)) $ctagid = 0; //当前处理的tagid | ||||
| if (empty($maxpagesize)) $maxpagesize = 50; | |||||
| if (empty($maxpagesize)) $maxpageSize = 30; | |||||
| $startid = isset($startid) ? intval($startid) : 0; | $startid = isset($startid) ? intval($startid) : 0; | ||||
| $endid = isset($endid) ? intval($endid) : 0; | $endid = isset($endid) ? intval($endid) : 0; | ||||
| $tagid = isset($tagid) ? intval($tagid) : 0; | $tagid = isset($tagid) ? intval($tagid) : 0; | ||||
| @@ -66,7 +66,6 @@ if (is_array($tag) && count($tag) > 0) { | |||||
| $mkpage = $mkpage + $maxpagesize; | $mkpage = $mkpage + $maxpagesize; | ||||
| if ($mkpage >= ($ntotalpage + 1)) $finishType = TRUE; | if ($mkpage >= ($ntotalpage + 1)) $finishType = TRUE; | ||||
| } | } | ||||
| $nextpage = $pageno + 1; | $nextpage = $pageno + 1; | ||||
| $onefinish = $nextpage >= $ntotalpage && $finishType; | $onefinish = $nextpage >= $ntotalpage && $finishType; | ||||
| if (($upall == 0 && $onefinish) || ($upall == 1 && $allfinish && $onefinish)) { | if (($upall == 0 && $onefinish) || ($upall == 1 && $allfinish && $onefinish)) { | ||||
| @@ -9,10 +9,8 @@ | |||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| //增加权限检查 | //增加权限检查 | ||||
| if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
| //上传 | //上传 | ||||
| if ($dopost == "upload") { | if ($dopost == "upload") { | ||||
| CheckCSRF(); | CheckCSRF(); | ||||
| @@ -23,14 +21,12 @@ if ($dopost == "upload") { | |||||
| $uptime = time(); | $uptime = time(); | ||||
| $adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
| $width = $height = ''; | $width = $height = ''; | ||||
| for ($i = 0; $i <= 40; $i++) { | for ($i = 0; $i <= 40; $i++) { | ||||
| if (isset(${"upfile".$i}) && is_uploaded_file(${"upfile".$i})) { | if (isset(${"upfile".$i}) && is_uploaded_file(${"upfile".$i})) { | ||||
| $filesize = ${"upfile".$i."_size"}; | $filesize = ${"upfile".$i."_size"}; | ||||
| $upfile_type = ${"upfile".$i."_type"}; | $upfile_type = ${"upfile".$i."_type"}; | ||||
| $upfile_name = ${"upfile".$i."_name"}; | $upfile_name = ${"upfile".$i."_name"}; | ||||
| $dpath = MyDate("ymd", $uptime); | $dpath = MyDate("ymd", $uptime); | ||||
| if (in_array($upfile_type, $sparr_image)) { | if (in_array($upfile_type, $sparr_image)) { | ||||
| $mediatype = 1; | $mediatype = 1; | ||||
| $savePath = $cfg_image_dir."/".$dpath; | $savePath = $cfg_image_dir."/".$dpath; | ||||
| @@ -57,8 +53,8 @@ if ($dopost == "upload") { | |||||
| CloseFtp(); | CloseFtp(); | ||||
| } | } | ||||
| /* | /* | ||||
| dedecms后台文件任意上传漏洞 | |||||
| 漏洞描述:dedecms早期版本后台存在大量的富文本编辑器,该控件提供了一些文件上传接口,同时dedecms对上传文件的后缀类型未进行严格的限制,这导致了黑客可以上传WEBSHELL,获取网站后台权限 | |||||
| 后台文件任意上传漏洞 | |||||
| 漏洞描述:早期版本后台存在大量的富文本编辑器,该控件提供了一些文件上传接口,同时对上传文件的后缀类型未进行严格的限制,这导致了黑客可以上传WEBSHELL,获取网站后台权限 | |||||
| */ | */ | ||||
| if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)$#i', trim($filename))) { | if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)$#i', trim($filename))) { | ||||
| ShowMsg("您指定的文件名被系统禁止", "javascript:;"); | ShowMsg("您指定的文件名被系统禁止", "javascript:;"); | ||||
| @@ -74,7 +70,6 @@ if ($dopost == "upload") { | |||||
| ShowMsg("仅支持媒体文件及应用程序上传", -1); | ShowMsg("仅支持媒体文件及应用程序上传", -1); | ||||
| exit; | exit; | ||||
| } | } | ||||
| if ($mediatype == 1) { | if ($mediatype == 1) { | ||||
| @move_uploaded_file(${"upfile".$i}, $fullfilename); | @move_uploaded_file(${"upfile".$i}, $fullfilename); | ||||
| $info = ''; | $info = ''; | ||||
| @@ -91,7 +86,7 @@ if ($dopost == "upload") { | |||||
| $ntitle = $title; | $ntitle = $title; | ||||
| } | } | ||||
| $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | $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++; | $okdd++; | ||||
| $dsql->ExecuteNoneQuery($inquery); | $dsql->ExecuteNoneQuery($inquery); | ||||
| } | } | ||||
| @@ -99,4 +94,4 @@ if ($dopost == "upload") { | |||||
| ShowMsg("成功上传 {$okdd} 个文件", "media_main.php"); | ShowMsg("成功上传 {$okdd} 个文件", "media_main.php"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| include DedeInclude('templets/media_add.htm'); | |||||
| include DedeInclude('templets/media_add.htm'); | |||||
| @@ -9,12 +9,10 @@ | |||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| //权限检查 | //权限检查 | ||||
| CheckPurview('sys_Upload,sys_MyUpload'); | CheckPurview('sys_Upload,sys_MyUpload'); | ||||
| if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
| $backurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "javascript:history.go(-1);"; | $backurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "javascript:history.go(-1);"; | ||||
| /*--------------------------- | /*--------------------------- | ||||
| function __del_file() //删除附件 | function __del_file() //删除附件 | ||||
| -----------------------------*/ | -----------------------------*/ | ||||
| @@ -50,7 +48,6 @@ if ($dopost == 'del') { | |||||
| } | } | ||||
| $dsql->SetQuery("SELECT aid,url FROM `#@__uploads` $idquery "); | $dsql->SetQuery("SELECT aid,url FROM `#@__uploads` $idquery "); | ||||
| $dsql->Execute(); | $dsql->Execute(); | ||||
| while ($myrow = $dsql->GetArray()) { | while ($myrow = $dsql->GetArray()) { | ||||
| $truefile = $cfg_basedir.$myrow['url']; | $truefile = $cfg_basedir.$myrow['url']; | ||||
| $rs = 0; | $rs = 0; | ||||
| @@ -78,7 +75,6 @@ else if ($dopost == 'save') { | |||||
| if ($myrow['mid'] != $cuserLogin->getUserID()) { | if ($myrow['mid'] != $cuserLogin->getUserID()) { | ||||
| CheckPurview('sys_Upload'); | CheckPurview('sys_Upload'); | ||||
| } | } | ||||
| //检测文件类型 | //检测文件类型 | ||||
| $addquery = ""; | $addquery = ""; | ||||
| if (is_uploaded_file($upfile)) { | if (is_uploaded_file($upfile)) { | ||||
| @@ -109,7 +105,6 @@ else if ($dopost == 'save') { | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| } | } | ||||
| //保存文件 | //保存文件 | ||||
| $nowtime = time(); | $nowtime = time(); | ||||
| $oldfile = $myrow['url']; | $oldfile = $myrow['url']; | ||||
| @@ -129,7 +124,6 @@ else if ($dopost == 'save') { | |||||
| ShowMsg("仅支持媒体文件及应用程序上传", -1); | ShowMsg("仅支持媒体文件及应用程序上传", -1); | ||||
| exit; | exit; | ||||
| } | } | ||||
| @move_uploaded_file($upfile, $fullfilename); | @move_uploaded_file($upfile, $fullfilename); | ||||
| if ($mediatype == 1) { | if ($mediatype == 1) { | ||||
| require_once(DEDEINC."/image.func.php"); | require_once(DEDEINC."/image.func.php"); | ||||
| @@ -156,7 +150,6 @@ else if ($dopost == 'save') { | |||||
| } else { | } else { | ||||
| $fileurl = $filename; | $fileurl = $filename; | ||||
| } | } | ||||
| //写入数据库 | //写入数据库 | ||||
| $query = " UPDATE #@__uploads SET title='$title',mediatype='$mediatype',playtime='$playtime'"; | $query = " UPDATE #@__uploads SET title='$title',mediatype='$mediatype',playtime='$playtime'"; | ||||
| $query .= "$addquery WHERE aid='$aid' "; | $query .= "$addquery WHERE aid='$aid' "; | ||||
| @@ -164,11 +157,10 @@ else if ($dopost == 'save') { | |||||
| ShowMsg('成功修改一则附件数据', 'media_edit.php?aid='.$aid); | ShowMsg('成功修改一则附件数据', 'media_edit.php?aid='.$aid); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //读取档案信息 | //读取档案信息 | ||||
| $myrow = $dsql->GetOne("SELECT * FROM #@__uploads WHERE aid='".$aid."'"); | $myrow = $dsql->GetOne("SELECT * FROM #@__uploads WHERE aid='".$aid."'"); | ||||
| if (!is_array($myrow)) { | if (!is_array($myrow)) { | ||||
| ShowMsg('错误,找不到此编号的档案', 'javascript:;'); | ShowMsg('错误,找不到此编号的档案', 'javascript:;'); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| include DedeInclude('templets/media_edit.htm'); | |||||
| include DedeInclude('templets/media_edit.htm'); | |||||
| @@ -46,7 +46,7 @@ LEFT JOIN `#@__admin` a ON a.id = u.mid | |||||
| LEFT JOIN `#@__member` m ON m.mid = u.mid | LEFT JOIN `#@__member` m ON m.mid = u.mid | ||||
| $addsql ORDER BY u.aid DESC"; | $addsql ORDER BY u.aid DESC"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->pageSize = 20; | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetParameter("mediatype", $mediatype); | $dlist->SetParameter("mediatype", $mediatype); | ||||
| $dlist->SetParameter("keyword", $keyword); | $dlist->SetParameter("keyword", $keyword); | ||||
| $dlist->SetParameter("membertype", $membertype); | $dlist->SetParameter("membertype", $membertype); | ||||
| @@ -42,7 +42,6 @@ if ($dopost == "delmember") { | |||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid='$id' LIMIT 1"); | $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_company` WHERE mid='$id' LIMIT 1"); | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` 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_stow` WHERE mid='$id' "); | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='$id' "); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='$id' "); | ||||
| @@ -182,7 +181,6 @@ else if ($dopost == 'edituser') { | |||||
| WHERE mid='$id' "; | WHERE mid='$id' "; | ||||
| $rs = $dsql->ExecuteNoneQuery2($query); | $rs = $dsql->ExecuteNoneQuery2($query); | ||||
| } | } | ||||
| ShowMsg('成功修改会员资料', 'member_view.php?id='.$id); | ShowMsg('成功修改会员资料', 'member_view.php?id='.$id); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| @@ -12,19 +12,15 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('member_List'); | CheckPurview('member_List'); | ||||
| require_once(DEDEINC."/datalistcp.class.php"); | require_once(DEDEINC."/datalistcp.class.php"); | ||||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
| if (!isset($sex)) $sex = ''; | if (!isset($sex)) $sex = ''; | ||||
| if (!isset($mtype)) $mtype = ''; | if (!isset($mtype)) $mtype = ''; | ||||
| if (!isset($spacesta)) $spacesta = -10; | if (!isset($spacesta)) $spacesta = -10; | ||||
| if (!isset($matt)) $matt = 10; | if (!isset($matt)) $matt = 10; | ||||
| if (!isset($keyword)) $keyword = ''; | if (!isset($keyword)) $keyword = ''; | ||||
| else $keyword = trim(FilterSearch($keyword)); | else $keyword = trim(FilterSearch($keyword)); | ||||
| $mtypeform = empty($mtype) ? "<option value=''>类型</option>\r\n" : "<option value='$mtype'>$mtype</option>\r\n"; | $mtypeform = empty($mtype) ? "<option value=''>类型</option>\r\n" : "<option value='$mtype'>$mtype</option>\r\n"; | ||||
| $sexform = empty($sex) ? "<option value=''>性别</option>\r\n" : "<option value='$sex'>$sex</option>\r\n"; | $sexform = empty($sex) ? "<option value=''>性别</option>\r\n" : "<option value='$sex'>$sex</option>\r\n"; | ||||
| $sortkey = empty($sortkey) ? 'mid' : preg_replace("#[^a-z]#i", '', $sortkey); | $sortkey = empty($sortkey) ? 'mid' : preg_replace("#[^a-z]#i", '', $sortkey); | ||||
| $staArr = array(-2 => '限制用户(禁言)', -1 => '未通过审核', 0 => '审核通过,提示填写完整信息', 1 => '没填写详细资料', 2 => '正常使用状态'); | $staArr = array(-2 => '限制用户(禁言)', -1 => '未通过审核', 0 => '审核通过,提示填写完整信息', 1 => '没填写详细资料', 2 => '正常使用状态'); | ||||
| $staArrmatt = array(1 => '被推荐', 0 => '非普通 '); | $staArrmatt = array(1 => '被推荐', 0 => '非普通 '); | ||||
| $MemberTypes = array(); | $MemberTypes = array(); | ||||
| @@ -33,7 +29,6 @@ $dsql->Execute(); | |||||
| while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
| $MemberTypes[$row->rank] = $row->membername; | $MemberTypes[$row->rank] = $row->membername; | ||||
| } | } | ||||
| if ($sortkey == 'mid') { | if ($sortkey == 'mid') { | ||||
| $sortform = "<option value='mid'>mid/注册时间</option>\r\n"; | $sortform = "<option value='mid'>mid/注册时间</option>\r\n"; | ||||
| } else if ($sortkey == 'rank') { | } else if ($sortkey == 'rank') { | ||||
| @@ -45,30 +40,23 @@ if ($sortkey == 'mid') { | |||||
| } else { | } else { | ||||
| $sortform = "<option value='logintime'>登录时间</option>\r\n"; | $sortform = "<option value='logintime'>登录时间</option>\r\n"; | ||||
| } | } | ||||
| $wheres[] = " (userid LIKE '%$keyword%' OR uname LIKE '%$keyword%' OR email LIKE '%$keyword%') "; | $wheres[] = " (userid LIKE '%$keyword%' OR uname LIKE '%$keyword%' OR email LIKE '%$keyword%') "; | ||||
| if ($sex != '') { | if ($sex != '') { | ||||
| $wheres[] = " sex LIKE '$sex' "; | $wheres[] = " sex LIKE '$sex' "; | ||||
| } | } | ||||
| if ($mtype != '') { | if ($mtype != '') { | ||||
| $wheres[] = " mtype LIKE '$mtype' "; | $wheres[] = " mtype LIKE '$mtype' "; | ||||
| } | } | ||||
| if ($spacesta != -10) { | if ($spacesta != -10) { | ||||
| $wheres[] = " spacesta = '$spacesta' "; | $wheres[] = " spacesta = '$spacesta' "; | ||||
| } | } | ||||
| if ($matt != 10) { | if ($matt != 10) { | ||||
| $wheres[] = " matt= '$matt' "; | $wheres[] = " matt= '$matt' "; | ||||
| } | } | ||||
| $whereSql = join(' AND ', $wheres); | $whereSql = join(' AND ', $wheres); | ||||
| if ($whereSql != '') { | if ($whereSql != '') { | ||||
| $whereSql = ' WHERE '.$whereSql; | $whereSql = ' WHERE '.$whereSql; | ||||
| } | } | ||||
| $sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC "; | $sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC "; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->SetParameter('sex', $sex); | $dlist->SetParameter('sex', $sex); | ||||
| @@ -80,7 +68,6 @@ $dlist->SetParameter('keyword', $keyword); | |||||
| $dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm"); | $dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm"); | ||||
| $dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
| $dlist->display(); | $dlist->display(); | ||||
| function GetMemberName($rank, $mt) | function GetMemberName($rank, $mt) | ||||
| { | { | ||||
| global $MemberTypes; | global $MemberTypes; | ||||
| @@ -92,10 +79,9 @@ function GetMemberName($rank, $mt) | |||||
| else return $mt; | else return $mt; | ||||
| } | } | ||||
| } | } | ||||
| function GetMAtt($m) | function GetMAtt($m) | ||||
| { | { | ||||
| if ($m < 1) return ''; | if ($m < 1) return ''; | ||||
| else if ($m == 10) return " <span class='text-danger'>[管理员]</span>"; | else if ($m == 10) return " <span class='text-danger'>[管理员]</span>"; | ||||
| else return " <i class=\"fa fa-user-o\" aria-hidden=\"true\"></i> <span class='text-danger'>[荐]</span>"; | else return " <i class=\"fa fa-user-o\" aria-hidden=\"true\"></i> <span class='text-danger'>[荐]</span>"; | ||||
| } | |||||
| } | |||||
| @@ -12,31 +12,25 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('member_Operations'); | CheckPurview('member_Operations'); | ||||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
| require_once(DEDEINC.'/datalistcp.class.php'); | require_once(DEDEINC.'/datalistcp.class.php'); | ||||
| if (empty($buyid)) $buyid = ''; | if (empty($buyid)) $buyid = ''; | ||||
| $addsql = " WHERE buyid LIKE '%$buyid%' "; | $addsql = " WHERE buyid LIKE '%$buyid%' "; | ||||
| if (isset($sta)) $addsql .= " AND sta='$sta' "; | if (isset($sta)) $addsql .= " AND sta='$sta' "; | ||||
| $sql = "SELECT * FROM `#@__member_operation` $addsql ORDER BY aid DESC"; | $sql = "SELECT * FROM `#@__member_operation` $addsql ORDER BY aid DESC"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| //设定每页显示记录数(默认25条) | |||||
| $dlist->pageSize = 25; | |||||
| //设定每页显示记录数 | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetParameter("buyid", $buyid); | $dlist->SetParameter("buyid", $buyid); | ||||
| if (isset($sta)) $dlist->SetParameter("sta", $sta); | if (isset($sta)) $dlist->SetParameter("sta", $sta); | ||||
| $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); | $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); | ||||
| $dlist->dsql->Execute('ts'); | $dlist->dsql->Execute('ts'); | ||||
| while ($rw = $dlist->dsql->GetArray('ts')) { | while ($rw = $dlist->dsql->GetArray('ts')) { | ||||
| $TypeNames[$rw['tid']] = $rw['pname']; | $TypeNames[$rw['tid']] = $rw['pname']; | ||||
| } | } | ||||
| $tplfile = DEDEADMIN."/templets/member_operations.htm"; | $tplfile = DEDEADMIN."/templets/member_operations.htm"; | ||||
| //这两句的顺序不能更换 | //这两句的顺序不能更换 | ||||
| $dlist->SetTemplate($tplfile); //载入模板 | $dlist->SetTemplate($tplfile); //载入模板 | ||||
| $dlist->SetSource($sql); //设定查询SQL | $dlist->SetSource($sql); //设定查询SQL | ||||
| $dlist->Display(); //显示 | $dlist->Display(); //显示 | ||||
| function GetMemberID($mid) | function GetMemberID($mid) | ||||
| { | { | ||||
| global $dsql; | global $dsql; | ||||
| @@ -50,7 +44,6 @@ function GetMemberID($mid) | |||||
| return '0'; | return '0'; | ||||
| } | } | ||||
| } | } | ||||
| function GetPType($tname) | function GetPType($tname) | ||||
| { | { | ||||
| if ($tname == 'card') return '点数卡'; | if ($tname == 'card') return '点数卡'; | ||||
| @@ -58,7 +51,6 @@ function GetPType($tname) | |||||
| else if ($tname == 'stc') return '兑换金币'; | else if ($tname == 'stc') return '兑换金币'; | ||||
| else return '会员升级'; | else return '会员升级'; | ||||
| } | } | ||||
| function GetSta($sta) | function GetSta($sta) | ||||
| { | { | ||||
| if ($sta == 0) { | if ($sta == 0) { | ||||
| @@ -68,4 +60,4 @@ function GetSta($sta) | |||||
| } else { | } else { | ||||
| return '已完成'; | return '已完成'; | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -12,23 +12,19 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('member_Pm'); | CheckPurview('member_Pm'); | ||||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
| require_once(DEDEINC.'/datalistcp.class.php'); | require_once(DEDEINC.'/datalistcp.class.php'); | ||||
| if (!isset($folder)) $folder = ''; | if (!isset($folder)) $folder = ''; | ||||
| if (!isset($username)) $username = ''; | if (!isset($username)) $username = ''; | ||||
| if (!isset($keyword)) $keyword = ''; | if (!isset($keyword)) $keyword = ''; | ||||
| if (isset($dopost)) { | if (isset($dopost)) { | ||||
| $ID = preg_replace("#[^0-9]#", "", $ID); | $ID = preg_replace("#[^0-9]#", "", $ID); | ||||
| if ($dopost == "del" && !empty($ID)) { | if ($dopost == "del" && !empty($ID)) { | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM #@__member_pms WHERE id='$ID'"); | $dsql->ExecuteNoneQuery("DELETE FROM #@__member_pms WHERE id='$ID'"); | ||||
| } | } | ||||
| } | } | ||||
| $whereSql = ''; | $whereSql = ''; | ||||
| if (!empty($folder)) $whereSql = "WHERE folder='$folder'"; | if (!empty($folder)) $whereSql = "WHERE folder='$folder'"; | ||||
| $postuser = "收件人"; | $postuser = "收件人"; | ||||
| if ($folder == "inbox" || $folder == '') $postuser = "发件人"; | if ($folder == "inbox" || $folder == '') $postuser = "发件人"; | ||||
| if (!empty($keyword)) { | if (!empty($keyword)) { | ||||
| $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$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"; | $sql = "SELECT * FROM #@__member_pms $whereSql ORDER BY sendtime desc"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->pagesize = 25; | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetParameter("folder", $folder); | $dlist->SetParameter("folder", $folder); | ||||
| $dlist->SetParameter("username", $username); | $dlist->SetParameter("username", $username); | ||||
| $dlist->SetParameter("keyword", $keyword); | $dlist->SetParameter("keyword", $keyword); | ||||
| @@ -45,16 +41,14 @@ $dlist->SetTemplate(DEDEADMIN."/templets/member_pm.htm"); | |||||
| $dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
| $dlist->Display(); | $dlist->Display(); | ||||
| $dlist->Close(); | $dlist->Close(); | ||||
| function GetFolders($me) | function GetFolders($me) | ||||
| { | { | ||||
| if ($me == "outbox") return '发件箱'; | if ($me == "outbox") return '发件箱'; | ||||
| else if ($me == "inbox") return '收件箱'; | else if ($me == "inbox") return '收件箱'; | ||||
| } | } | ||||
| function IsReader($me) | function IsReader($me) | ||||
| { | { | ||||
| $me = preg_replace("#[^0-1]#", "", $me); | $me = preg_replace("#[^0-1]#", "", $me); | ||||
| if ($me) return "<span class='text-dark'>√</span>"; | if ($me) return "<span class='text-dark'>√</span>"; | ||||
| else return "<span class='text-danger'>×</span>"; | else return "<span class='text-danger'>×</span>"; | ||||
| } | |||||
| } | |||||
| @@ -11,7 +11,6 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('member_Pm'); | CheckPurview('member_Pm'); | ||||
| if (!isset($action)) $action = ''; | if (!isset($action)) $action = ''; | ||||
| if ($action == "post") { | if ($action == "post") { | ||||
| $floginid = 'admin'; | $floginid = 'admin'; | ||||
| $fromid = 0; | $fromid = 0; | ||||
| @@ -28,9 +27,8 @@ if ($action == "post") { | |||||
| ShowMsg('请填写短信内容!', '-1'); | ShowMsg('请填写短信内容!', '-1'); | ||||
| exit(); | 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');"); | $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'); | ShowMsg('短信已成功发送', '-1'); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| require_once(DEDEADMIN."/templets/member_pmall.htm"); | |||||
| require_once(DEDEADMIN."/templets/member_pmall.htm"); | |||||
| @@ -23,10 +23,8 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = true) | |||||
| if ($cfg_md_idurl == 'Y' && preg_match("#[^a-z0-9]#i", $uid)) { | if ($cfg_md_idurl == 'Y' && preg_match("#[^a-z0-9]#i", $uid)) { | ||||
| return $msgtitle.'必须由英文字母或数字组成'; | return $msgtitle.'必须由英文字母或数字组成'; | ||||
| } | } | ||||
| if ($cfg_soft_lang == 'utf-8') $ck_uid = utf82gb($uid); | if ($cfg_soft_lang == 'utf-8') $ck_uid = utf82gb($uid); | ||||
| else $ck_uid = $uid; | else $ck_uid = $uid; | ||||
| for ($i = 0; isset($ck_uid[$i]); $i++) { | for ($i = 0; isset($ck_uid[$i]); $i++) { | ||||
| if (ord($ck_uid[$i]) > 0x80) { | if (ord($ck_uid[$i]) > 0x80) { | ||||
| if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { | if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { | ||||
| @@ -46,7 +44,6 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = true) | |||||
| } | } | ||||
| return 'ok'; | return 'ok'; | ||||
| } | } | ||||
| if (!isset($action)) $action = ''; | if (!isset($action)) $action = ''; | ||||
| if ($action == "post") { | if ($action == "post") { | ||||
| $floginid = $cuserLogin->getUserName(); | $floginid = $cuserLogin->getUserName(); | ||||
| @@ -68,13 +65,11 @@ if ($action == "post") { | |||||
| $subject = cn_substrR(HtmlReplace($subject, 1), 60); | $subject = cn_substrR(HtmlReplace($subject, 1), 60); | ||||
| $message = cn_substrR(HtmlReplace($message, 0), 1024); | $message = cn_substrR(HtmlReplace($message, 0), 1024); | ||||
| $sendtime = $writetime = time(); | $sendtime = $writetime = time(); | ||||
| //发给收件人(收件人可管理) | //发给收件人(收件人可管理) | ||||
| $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) | $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); | $dsql->ExecuteNoneQuery($inquery); | ||||
| ShowMsg('短信已成功发送', 'member_pmone.php'); | ShowMsg('短信已成功发送', 'member_pmone.php'); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| require_once(DEDEADMIN."/templets/member_pmone.htm"); | |||||
| require_once(DEDEADMIN."/templets/member_pmone.htm"); | |||||
| @@ -11,7 +11,6 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('member_Type'); | CheckPurview('member_Type'); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| //保存修改 | //保存修改 | ||||
| if ($dopost == 'save') { | if ($dopost == 'save') { | ||||
| $startID = 1; | $startID = 1; | ||||
| @@ -45,7 +44,6 @@ if ($dopost == 'del') { | |||||
| ShowMsg("删除成功", "member_rank.php"); | ShowMsg("删除成功", "member_rank.php"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| $dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>0 ORDER BY `rank`"); | $dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>0 ORDER BY `rank`"); | ||||
| $dsql->Execute(); | $dsql->Execute(); | ||||
| include DedeInclude('templets/member_rank.htm'); | |||||
| include DedeInclude('templets/member_rank.htm'); | |||||
| @@ -11,7 +11,6 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('member_Scores'); | CheckPurview('member_Scores'); | ||||
| if (!isset($action)) $action = ''; | if (!isset($action)) $action = ''; | ||||
| if ($action == 'save') { | if ($action == 'save') { | ||||
| if (!empty($add_integral) && !empty($add_icon) && !empty($add_titles)) { | if (!empty($add_integral) && !empty($add_icon) && !empty($add_titles)) { | ||||
| $integral = preg_replace("#[^0-9]#", "", $add_integral); | $integral = preg_replace("#[^0-9]#", "", $add_integral); | ||||
| @@ -35,11 +34,10 @@ if ($action == 'save') { | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| $Scores = array(); | $Scores = array(); | ||||
| $dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC"); | $dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC"); | ||||
| $dsql->Execute(); | $dsql->Execute(); | ||||
| while ($rs = $dsql->GetArray()) { | while ($rs = $dsql->GetArray()) { | ||||
| array_push($Scores, $rs); | array_push($Scores, $rs); | ||||
| } | } | ||||
| include DedeInclude('templets/member_scores.htm'); | |||||
| include DedeInclude('templets/member_scores.htm'); | |||||
| @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('member_Edit'); | CheckPurview('member_Edit'); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| if (empty($fmdo)) $fmdo = ''; | if (empty($fmdo)) $fmdo = ''; | ||||
| $ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? 'member_main.php' : ''; | $ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? 'member_main.php' : ''; | ||||
| $row = array(); | $row = array(); | ||||
| /*---------------- | /*---------------- | ||||
| @@ -52,10 +51,10 @@ if ($dopost == "toadmin") { | |||||
| if ($typeid == '0') $typeid = ''; | if ($typeid == '0') $typeid = ''; | ||||
| if ($id != 1) { | if ($id != 1) { | ||||
| $query = "INSERT INTO `#@__admin`(id,usertype,userid$inputpwd,uname,typeid,tname,email) | $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 { | } else { | ||||
| $query = "INSERT INTO `#@__admin`(id,userid$inputpwd,uname,typeid,tname,email) | $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); | $dsql->ExecuteNoneQuery($query); | ||||
| $query = "UPDATE `#@__member` SET `rank`='100',uname='$uname',matt='10',email='$email'$pwdm WHERE mid='$id'"; | $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(); | $floginid = $cuserLogin->getUserName(); | ||||
| $fromid = $cuserLogin->getUserID(); | $fromid = $cuserLogin->getUserID(); | ||||
| $subject = "恭喜您已经成功提升为管理员"; | $subject = "恭喜您已经成功提升为管理员"; | ||||
| $message = "亲爱的会员{$userid},您已经成功提升为{$row['typename']},具体操作权限请同网站超级管理员联系"; | |||||
| $message = "亲爱的会员{$userid},您已经成功提升为{$row['typename']},具体操作权限请同网站超级管理员联系"; | |||||
| $sendtime = $writetime = time(); | $sendtime = $writetime = time(); | ||||
| $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) | $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'); "; | 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'"); | $row = $dsql->GetOne("SELECT * FROM #@__member WHERE mid='$id'"); | ||||
| include DedeInclude('templets/member_toadmin.htm'); | |||||
| include DedeInclude('templets/member_toadmin.htm'); | |||||
| @@ -11,7 +11,6 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('member_Type'); | CheckPurview('member_Type'); | ||||
| if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
| //保存修改 | //保存修改 | ||||
| if ($dopost == "save") { | if ($dopost == "save") { | ||||
| $startID = 1; | $startID = 1; | ||||
| @@ -34,7 +33,6 @@ if ($dopost == "save") { | |||||
| $dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
| } | } | ||||
| } | } | ||||
| //增加新记录 | //增加新记录 | ||||
| if (isset($check_new) && $pname_new != '') { | if (isset($check_new) && $pname_new != '') { | ||||
| $query = "INSERT INTO `#@__member_type`(`rank`,pname,money,exptime) VALUES('{$rank_new}','{$pname_new}','{$money_new}','{$exptime_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()) { | while ($row = $dsql->GetArray()) { | ||||
| $arcranks[$row['rank']] = $row['membername']; | $arcranks[$row['rank']] = $row['membername']; | ||||
| } | } | ||||
| $times = array(); | $times = array(); | ||||
| $times[7] = '一周'; | $times[7] = '一周'; | ||||
| $times[30] = '一个月'; | $times[30] = '一个月'; | ||||
| @@ -57,5 +54,4 @@ $times[90] = '三个月'; | |||||
| $times[183] = '半年'; | $times[183] = '半年'; | ||||
| $times[366] = '一年'; | $times[366] = '一年'; | ||||
| $times[32767] = '终身'; | $times[32767] = '终身'; | ||||
| require_once(DEDEADMIN."/templets/member_type.htm"); | |||||
| require_once(DEDEADMIN."/templets/member_type.htm"); | |||||
| @@ -13,7 +13,6 @@ CheckPurview('member_Edit'); | |||||
| $ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? "member_main.php" : ''; | $ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? "member_main.php" : ''; | ||||
| $id = preg_replace("#[^0-9]#", "", $id); | $id = preg_replace("#[^0-9]#", "", $id); | ||||
| $row = $dsql->GetOne("select * from #@__member where mid='$id'"); | $row = $dsql->GetOne("select * from #@__member where mid='$id'"); | ||||
| $staArr = array( | $staArr = array( | ||||
| -10 => '等待验证邮件', | -10 => '等待验证邮件', | ||||
| -2 => '限制用户(禁言)', | -2 => '限制用户(禁言)', | ||||
| @@ -22,13 +21,11 @@ $staArr = array( | |||||
| 1 => '没填写详细资料', | 1 => '没填写详细资料', | ||||
| 2 => '正常使用状态' | 2 => '正常使用状态' | ||||
| ); | ); | ||||
| //如果这个用户是管理员帐号,必须有足够权限的用户才能操作 | //如果这个用户是管理员帐号,必须有足够权限的用户才能操作 | ||||
| if ($row['matt'] == 10) CheckPurview('sys_User'); | if ($row['matt'] == 10) CheckPurview('sys_User'); | ||||
| if ($row['uptime'] > 0 && $row['exptime'] > 0) { | if ($row['uptime'] > 0 && $row['exptime'] > 0) { | ||||
| $mhasDay = $row['exptime'] - ceil((time() - $row['uptime']) / 3600 / 24) + 1; | $mhasDay = $row['exptime'] - ceil((time() - $row['uptime']) / 3600 / 24) + 1; | ||||
| } else { | } else { | ||||
| $mhasDay = 0; | $mhasDay = 0; | ||||
| } | } | ||||
| include DedeInclude('templets/member_view.htm'); | |||||
| include DedeInclude('templets/member_view.htm'); | |||||
| @@ -13,7 +13,6 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| require_once(DEDEINC."/dedemodule.class.php"); | require_once(DEDEINC."/dedemodule.class.php"); | ||||
| CheckPurview('sys_module'); | CheckPurview('sys_module'); | ||||
| if (empty($action)) $action = ''; | if (empty($action)) $action = ''; | ||||
| if ($action == '') { | if ($action == '') { | ||||
| $modules = array(); | $modules = array(); | ||||
| require_once(dirname(__FILE__)."/templets/module_make.htm"); | require_once(dirname(__FILE__)."/templets/module_make.htm"); | ||||
| @@ -25,7 +24,6 @@ function Makemodule() | |||||
| --------------*/ | --------------*/ | ||||
| else if ($action == 'make') { | else if ($action == 'make') { | ||||
| require_once(DEDEINC.'/libraries/dedehttpdown.class.php'); | require_once(DEDEINC.'/libraries/dedehttpdown.class.php'); | ||||
| //校验私钥,确定开发者身份 | //校验私钥,确定开发者身份 | ||||
| $devURL = DEDECDNURL."/developers/$dev_id.json"; | $devURL = DEDECDNURL."/developers/$dev_id.json"; | ||||
| $dhd = new DedeHttpDown(); | $dhd = new DedeHttpDown(); | ||||
| @@ -36,7 +34,6 @@ else if ($action == 'make') { | |||||
| ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); | ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| $filelist = str_replace("\r", "\n", trim($filelist)); | $filelist = str_replace("\r", "\n", trim($filelist)); | ||||
| $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); | $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); | ||||
| if ($filelist == '') { | if ($filelist == '') { | ||||
| @@ -55,7 +52,6 @@ else if ($action == 'make') { | |||||
| ShowMsg("模块名称过长", "-1"); | ShowMsg("模块名称过长", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //校验私钥合法性 | //校验私钥合法性 | ||||
| $enstr = json_encode(array( | $enstr = json_encode(array( | ||||
| "module_name" => $modulname, | "module_name" => $modulname, | ||||
| @@ -63,21 +59,15 @@ else if ($action == 'make') { | |||||
| )); | )); | ||||
| //私钥加密模块信息 | //私钥加密模块信息 | ||||
| openssl_private_encrypt($enstr, $encotent, $priv); | openssl_private_encrypt($enstr, $encotent, $priv); | ||||
| $moduleInfo = base64url_encode($encotent); | $moduleInfo = base64url_encode($encotent); | ||||
| openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); | openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); | ||||
| $minfo = (array)json_decode($decontent); | $minfo = (array)json_decode($decontent); | ||||
| if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { | if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { | ||||
| ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); | ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //去除转义 | //去除转义 | ||||
| foreach ($_POST as $k => $v) $$k = stripslashes($v); | foreach ($_POST as $k => $v) $$k = stripslashes($v); | ||||
| if (!isset($autosetup)) $autosetup = 0; | if (!isset($autosetup)) $autosetup = 0; | ||||
| if (!isset($autodel)) $autodel = 0; | if (!isset($autodel)) $autodel = 0; | ||||
| $mdir = DEDEDATA.'/module'; | $mdir = DEDEDATA.'/module'; | ||||
| @@ -86,15 +76,12 @@ else if ($action == 'make') { | |||||
| $menustring = base64_encode($menustring); | $menustring = base64_encode($menustring); | ||||
| $indexurl = str_replace('=', '**', $indexurl); | $indexurl = str_replace('=', '**', $indexurl); | ||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| if ($dm->HasModule($hashcode)) { | if ($dm->HasModule($hashcode)) { | ||||
| $dm->Clear(); | $dm->Clear(); | ||||
| ShowMsg("对不起,您指定同名模块已经存在,因此不能创建项目<br>如果您要更新这个模块,请先删除:module/{$hashcode}.xml", "-1"); | ShowMsg("对不起,您指定同名模块已经存在,因此不能创建项目<br>如果您要更新这个模块,请先删除:module/{$hashcode}.xml", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| $readmef = $setupf = $uninstallf = ''; | $readmef = $setupf = $uninstallf = ''; | ||||
| if (empty($readmetxt)) { | if (empty($readmetxt)) { | ||||
| move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("您没填写说明或上传说明文件"); | move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("您没填写说明或上传说明文件"); | ||||
| $readmef = $dm->GetEncodeFile($mdir."/{$hashcode}-r.html", TRUE); | $readmef = $dm->GetEncodeFile($mdir."/{$hashcode}-r.html", TRUE); | ||||
| @@ -104,27 +91,21 @@ else if ($action == 'make') { | |||||
| $readmetxt .= "</p>"; | $readmetxt .= "</p>"; | ||||
| $readmef = base64_encode(trim($readmetxt)); | $readmef = base64_encode(trim($readmetxt)); | ||||
| } | } | ||||
| if ($autosetup == 0) { | if ($autosetup == 0) { | ||||
| move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); | move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); | ||||
| $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); | $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); | ||||
| } | } | ||||
| if ($autodel == 0) { | if ($autodel == 0) { | ||||
| move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); | move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); | ||||
| $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", TRUE); | $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", TRUE); | ||||
| } | } | ||||
| if (trim($setupsql40) == '') $setupsql40 = ''; | if (trim($setupsql40) == '') $setupsql40 = ''; | ||||
| else $setupsql40 = base64_encode(trim($setupsql40)); | else $setupsql40 = base64_encode(trim($setupsql40)); | ||||
| //if(trim($setupsql41)=='') $setupsql41 = ''; | //if(trim($setupsql41)=='') $setupsql41 = ''; | ||||
| //else $setupsql41 = base64_encode(trim($setupsql41)); | //else $setupsql41 = base64_encode(trim($setupsql41)); | ||||
| if (trim($delsql) == '') $delsql = ''; | if (trim($delsql) == '') $delsql = ''; | ||||
| else $delsql = base64_encode(trim($delsql)); | else $delsql = base64_encode(trim($delsql)); | ||||
| $pub_key = base64url_encode($devInfo['pub_key']); | $pub_key = base64url_encode($devInfo['pub_key']); | ||||
| $modulinfo = "<module> | $modulinfo = "<module> | ||||
| <baseinfo> | <baseinfo> | ||||
| name={$modulname} | name={$modulname} | ||||
| @@ -165,7 +146,6 @@ $filelist | |||||
| </oldfilelist> | </oldfilelist> | ||||
| </systemfile> | </systemfile> | ||||
| "; | "; | ||||
| $filelists = explode("\n", $filelist); | $filelists = explode("\n", $filelist); | ||||
| foreach ($filelists as $v) { | foreach ($filelists as $v) { | ||||
| $v = trim($v); | $v = trim($v); | ||||
| @@ -204,7 +184,6 @@ else if ($action == 'edit') { | |||||
| ShowMsg("请填写开发者私钥信息", "-1"); | ShowMsg("请填写开发者私钥信息", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //校验私钥,确定开发者身份 | //校验私钥,确定开发者身份 | ||||
| $devURL = DEDECDNURL."/developers/$dev_id.json"; | $devURL = DEDECDNURL."/developers/$dev_id.json"; | ||||
| $dhd = new DedeHttpDown(); | $dhd = new DedeHttpDown(); | ||||
| @@ -219,7 +198,6 @@ else if ($action == 'edit') { | |||||
| ShowMsg("模块名称过长", "-1"); | ShowMsg("模块名称过长", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //校验私钥合法性 | //校验私钥合法性 | ||||
| $enstr = json_encode(array( | $enstr = json_encode(array( | ||||
| "module_name" => $modulname, | "module_name" => $modulname, | ||||
| @@ -227,18 +205,13 @@ else if ($action == 'edit') { | |||||
| )); | )); | ||||
| //私钥加密模块信息 | //私钥加密模块信息 | ||||
| openssl_private_encrypt($enstr, $encotent, $priv); | openssl_private_encrypt($enstr, $encotent, $priv); | ||||
| $moduleInfo = base64url_encode($encotent); | $moduleInfo = base64url_encode($encotent); | ||||
| openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); | openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); | ||||
| $minfo = (array)json_decode($decontent); | $minfo = (array)json_decode($decontent); | ||||
| if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { | if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { | ||||
| ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); | ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //已经去除转义 | //已经去除转义 | ||||
| foreach ($_POST as $k => $v) $$k = stripslashes($v); | foreach ($_POST as $k => $v) $$k = stripslashes($v); | ||||
| if (!isset($autosetup)) $autosetup = 0; | if (!isset($autosetup)) $autosetup = 0; | ||||
| @@ -252,7 +225,6 @@ else if ($action == 'edit') { | |||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| $readmef = base64_encode($readmetxt); | $readmef = base64_encode($readmetxt); | ||||
| $setupf = $uninstallf = ''; | $setupf = $uninstallf = ''; | ||||
| //编译setup文件 | //编译setup文件 | ||||
| if (is_uploaded_file($setup)) { | if (is_uploaded_file($setup)) { | ||||
| move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); | move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); | ||||
| @@ -260,7 +232,6 @@ else if ($action == 'edit') { | |||||
| } else { | } else { | ||||
| if ($autosetup == 0) $setupf = base64_encode($dm->GetSystemFile($hashcode, 'setup')); | if ($autosetup == 0) $setupf = base64_encode($dm->GetSystemFile($hashcode, 'setup')); | ||||
| } | } | ||||
| //编译uninstall文件 | //编译uninstall文件 | ||||
| if (is_uploaded_file($uninstall)) { | if (is_uploaded_file($uninstall)) { | ||||
| move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); | move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); | ||||
| @@ -268,15 +239,12 @@ else if ($action == 'edit') { | |||||
| } else { | } else { | ||||
| if ($autodel == 0) $uninstallf = base64_encode($dm->GetSystemFile($hashcode, 'uninstall')); | if ($autodel == 0) $uninstallf = base64_encode($dm->GetSystemFile($hashcode, 'uninstall')); | ||||
| } | } | ||||
| if (trim($setupsql40) == '') $setupsql40 = ''; | if (trim($setupsql40) == '') $setupsql40 = ''; | ||||
| else $setupsql40 = base64_encode(htmlspecialchars_decode(trim($setupsql40))); | else $setupsql40 = base64_encode(htmlspecialchars_decode(trim($setupsql40))); | ||||
| //if(trim($setupsql41)=='') $setupsql41 = ''; | //if(trim($setupsql41)=='') $setupsql41 = ''; | ||||
| //else $setupsql41 = base64_encode(trim($setupsql41)); | //else $setupsql41 = base64_encode(trim($setupsql41)); | ||||
| if (trim($delsql) == '') $delsql = ''; | if (trim($delsql) == '') $delsql = ''; | ||||
| else $delsql = base64_encode(strip_tags(trim($delsql))); | else $delsql = base64_encode(strip_tags(trim($delsql))); | ||||
| $modulinfo = "<module> | $modulinfo = "<module> | ||||
| <baseinfo> | <baseinfo> | ||||
| name={$modulname} | name={$modulname} | ||||
| @@ -317,7 +285,6 @@ $filelist | |||||
| </oldfilelist> | </oldfilelist> | ||||
| </systemfile> | </systemfile> | ||||
| "; | "; | ||||
| if ($rebuild == 'yes') { | if ($rebuild == 'yes') { | ||||
| $filelists = explode("\n", $filelist); | $filelists = explode("\n", $filelist); | ||||
| foreach ($filelists as $v) { | foreach ($filelists as $v) { | ||||
| @@ -344,5 +311,4 @@ $filelist | |||||
| } | } | ||||
| ShowMsg("成功对模块重新编译", "module_main.php"); | ShowMsg("成功对模块重新编译", "module_main.php"); | ||||
| exit(); | exit(); | ||||
| } | |||||
| //ClearAllLink(); | |||||
| }//ClearAllLink(); | |||||
| @@ -14,7 +14,6 @@ require_once(DEDEINC."/dedetag.class.php"); | |||||
| if (empty($ismake)) $ismake = 0; | if (empty($ismake)) $ismake = 0; | ||||
| if (empty($isdel)) $isdel = 0; | if (empty($isdel)) $isdel = 0; | ||||
| if (empty($action)) $action = ''; | if (empty($action)) $action = ''; | ||||
| if ($action == 'add') { | if ($action == 'add') { | ||||
| //检查输入 | //检查输入 | ||||
| if (empty($id) || preg_match("#[^0-9-]#", $id)) { | if (empty($id) || preg_match("#[^0-9-]#", $id)) { | ||||
| @@ -30,9 +29,7 @@ if ($action == 'add') { | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $trueTable2 = str_replace("#@__", $cfg_dbprefix, $addtable); | $trueTable2 = str_replace("#@__", $cfg_dbprefix, $addtable); | ||||
| if ($issystem == -1 && $id > 0) $id = $id * -1; | if ($issystem == -1 && $id > 0) $id = $id * -1; | ||||
| //检查id是否重复 | //检查id是否重复 | ||||
| $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' OR nid LIKE '$nid' OR addtable LIKE '$addtable'"); | $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' OR nid LIKE '$nid' OR addtable LIKE '$addtable'"); | ||||
| if (is_array($row)) { | if (is_array($row)) { | ||||
| @@ -40,7 +37,6 @@ if ($action == 'add') { | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $mysql_version = $dsql->GetVersion(); | $mysql_version = $dsql->GetVersion(); | ||||
| //创建附加表 | //创建附加表 | ||||
| if ($trueTable2 != '') { | if ($trueTable2 != '') { | ||||
| $istb = $dsql->IsTable($trueTable2); | $istb = $dsql->IsTable($trueTable2); | ||||
| @@ -49,7 +45,7 @@ if ($action == 'add') { | |||||
| $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$trueTable2}`;"); | $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$trueTable2}`;"); | ||||
| if ($issystem != -1) { | if ($issystem != -1) { | ||||
| $tabsql = "CREATE TABLE `$trueTable2`( | $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', | `typeid` int(11) NOT NULL default '0', | ||||
| `redirecturl` varchar(255) NOT NULL default '', | `redirecturl` varchar(255) NOT NULL default '', | ||||
| `templet` varchar(30) NOT NULL default '', | `templet` varchar(30) NOT NULL default '', | ||||
| @@ -86,7 +82,6 @@ if ($action == 'add') { | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| $listfields = $fieldset = ''; | $listfields = $fieldset = ''; | ||||
| if ($issystem == -1) { | if ($issystem == -1) { | ||||
| $fieldset = "<field:channel itemname=\"频道id\" autofield=\"0\" notsend=\"0\" type=\"int\" isnull=\"true\" islist=\"1\" default=\"0\" maxlength=\"10\" page=\"\"></field:channel> | $fieldset = "<field:channel itemname=\"频道id\" autofield=\"0\" notsend=\"0\" type=\"int\" isnull=\"true\" islist=\"1\" default=\"0\" maxlength=\"10\" page=\"\"></field:channel> | ||||
| @@ -104,7 +99,6 @@ if ($action == 'add') { | |||||
| <field:badpost itemname=\"差评数\" autofield=\"0\" notsend=\"0\" type=\"int\" isnull=\"true\" islist=\"1\" default=\"0\" maxlength=\"8\" page=\"\"></field:badpost>\r\n"; | <field:badpost itemname=\"差评数\" autofield=\"0\" notsend=\"0\" type=\"int\" isnull=\"true\" islist=\"1\" default=\"0\" maxlength=\"8\" page=\"\"></field:badpost>\r\n"; | ||||
| $listfields = 'channel,arcrank,mid,click,title,senddate,flag,listpic,lastpost,scores,goodpost,badpost'; | $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) | $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');"; | 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); | $dsql->ExecuteNoneQuery($inQuery); | ||||
| @@ -114,5 +108,4 @@ if ($action == 'add') { | |||||
| $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC LIMIT 0,1 "); | $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC LIMIT 0,1 "); | ||||
| $newid = $row['id'] + 1; | $newid = $row['id'] + 1; | ||||
| if ($newid < 10) $newid = $newid + 10; | if ($newid < 10) $newid = $newid + 10; | ||||
| require_once(DEDEADMIN."/templets/mychannel_add.htm"); | |||||
| require_once(DEDEADMIN."/templets/mychannel_add.htm"); | |||||
| @@ -12,10 +12,8 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('c_New'); | CheckPurview('c_New'); | ||||
| require_once(DEDEADMIN."/inc/inc_admin_channel.php"); | require_once(DEDEADMIN."/inc/inc_admin_channel.php"); | ||||
| require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
| if (empty($action)) $action = ''; | if (empty($action)) $action = ''; | ||||
| $mysql_version = $dsql->GetVersion(); | $mysql_version = $dsql->GetVersion(); | ||||
| /*---------------------- | /*---------------------- | ||||
| function Save() | function Save() | ||||
| ---------------------*/ | ---------------------*/ | ||||
| @@ -24,23 +22,19 @@ if ($action == 'save') { | |||||
| $dfvalue = trim($vdefault); | $dfvalue = trim($vdefault); | ||||
| $isnull = ($isnull == 1 ? "true" : "false"); | $isnull = ($isnull == 1 ? "true" : "false"); | ||||
| $mxlen = $maxlength; | $mxlen = $maxlength; | ||||
| if (preg_match("#^(select|radio|checkbox)$#i", $dtype)) { | if (preg_match("#^(select|radio|checkbox)$#i", $dtype)) { | ||||
| if (!preg_match("#,#", $dfvalue)) { | if (!preg_match("#,#", $dfvalue)) { | ||||
| ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); | ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| } | } | ||||
| if ($dtype == 'stepselect') { | if ($dtype == 'stepselect') { | ||||
| $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fieldname' "); | $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fieldname' "); | ||||
| if (!is_array($arr)) { | if (!is_array($arr)) { | ||||
| ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); | |||||
| ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名", "-1"); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| } | } | ||||
| //模型信息 | //模型信息 | ||||
| $row = $dsql->GetOne("SELECT fieldset,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); | $row = $dsql->GetOne("SELECT fieldset,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); | ||||
| $fieldset = stripslashes($row['fieldset']); | $fieldset = stripslashes($row['fieldset']); | ||||
| @@ -48,10 +42,8 @@ if ($action == 'save') { | |||||
| $dtp->SetNameSpace("field", "<", ">"); | $dtp->SetNameSpace("field", "<", ">"); | ||||
| $dtp->LoadSource($fieldset); | $dtp->LoadSource($fieldset); | ||||
| $trueTable = $row['addtable']; | $trueTable = $row['addtable']; | ||||
| //检测被修改的字段类型 | //检测被修改的字段类型 | ||||
| $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); | $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); | ||||
| $ntabsql = $fieldinfos[0]; | $ntabsql = $fieldinfos[0]; | ||||
| $buideType = $fieldinfos[1]; | $buideType = $fieldinfos[1]; | ||||
| $rs = $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` ADD $ntabsql "); | $rs = $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` ADD $ntabsql "); | ||||
| @@ -60,7 +52,6 @@ if ($action == 'save') { | |||||
| ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); | ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //检测旧配置信息,并替换为新配置 | //检测旧配置信息,并替换为新配置 | ||||
| $ok = FALSE; | $ok = FALSE; | ||||
| $fieldname = strtolower($fieldname); | $fieldname = strtolower($fieldname); | ||||
| @@ -76,7 +67,6 @@ if ($action == 'save') { | |||||
| } else { | } else { | ||||
| $oksetting = $fieldset."\r\n".stripslashes($fieldstring); | $oksetting = $fieldset."\r\n".stripslashes($fieldstring); | ||||
| } | } | ||||
| $addlist = GetAddFieldList($dtp, $oksetting); | $addlist = GetAddFieldList($dtp, $oksetting); | ||||
| $oksetting = addslashes($oksetting); | $oksetting = addslashes($oksetting); | ||||
| $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); | $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); | ||||
| @@ -85,17 +75,14 @@ if ($action == 'save') { | |||||
| ShowMsg("保存节点配置出错".$grr, "javascript:;"); | ShowMsg("保存节点配置出错".$grr, "javascript:;"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| ShowMsg("成功增加一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); | ShowMsg("成功增加一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| /*---------------------- | /*---------------------- | ||||
| function ShowPage() | function ShowPage() | ||||
| ---------------------*/ | ---------------------*/ | ||||
| //检测模型相关信息,并初始化相关数据 | //检测模型相关信息,并初始化相关数据 | ||||
| $row = $dsql->GetOne("SELECT '#@__archives' AS maintable,addtable FROM `#@__channeltype` WHERE id='$id'"); | $row = $dsql->GetOne("SELECT '#@__archives' AS maintable,addtable FROM `#@__channeltype` WHERE id='$id'"); | ||||
| $trueTable = $row['addtable']; | $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 "; | $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 { | } else { | ||||
| $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; | $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; | ||||
| } | } | ||||
| $dsql->ExecuteNoneQuery($tabsql); | $dsql->ExecuteNoneQuery($tabsql); | ||||
| //检测附加表里含有的字段 | //检测附加表里含有的字段 | ||||
| $fields = array(); | $fields = array(); | ||||
| if (empty($row['maintable'])) $row['maintable'] = '#@__archives'; | if (empty($row['maintable'])) $row['maintable'] = '#@__archives'; | ||||
| $rs = $dsql->SetQuery("SHOW fields FROM `{$row['maintable']}`"); | $rs = $dsql->SetQuery("SHOW fields FROM `{$row['maintable']}`"); | ||||
| $dsql->Execute('a'); | $dsql->Execute('a'); | ||||
| while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | ||||
| @@ -120,7 +103,6 @@ while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | |||||
| } | } | ||||
| $fields[strtolower($nrow['Field'])] = 1; | $fields[strtolower($nrow['Field'])] = 1; | ||||
| } | } | ||||
| $dsql->Execute("a", "SHOW fields FROM `{$row['addtable']}`"); | $dsql->Execute("a", "SHOW fields FROM `{$row['addtable']}`"); | ||||
| while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | ||||
| if ($cfg_dbtype == 'sqlite') { | if ($cfg_dbtype == 'sqlite') { | ||||
| @@ -130,12 +112,10 @@ while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | |||||
| $fields[strtolower($nrow['Field'])] = 1; | $fields[strtolower($nrow['Field'])] = 1; | ||||
| } | } | ||||
| } | } | ||||
| $f = ''; | $f = ''; | ||||
| foreach ($fields as $k => $v) { | foreach ($fields as $k => $v) { | ||||
| $f .= ($f == '' ? $k : ' '.$k); | $f .= ($f == '' ? $k : ' '.$k); | ||||
| } | } | ||||
| //获取频道模型 | //获取频道模型 | ||||
| $dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); | $dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); | ||||
| $dsql->Execute(); | $dsql->Execute(); | ||||
| @@ -143,5 +123,4 @@ while ($row = $dsql->GetObject()) { | |||||
| $channelArray[$row->id]['typename'] = $row->typename; | $channelArray[$row->id]['typename'] = $row->typename; | ||||
| $channelArray[$row->id]['nid'] = $row->nid; | $channelArray[$row->id]['nid'] = $row->nid; | ||||
| } | } | ||||
| require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); | |||||
| require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); | |||||
| @@ -12,30 +12,25 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('c_New'); | CheckPurview('c_New'); | ||||
| require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
| require_once(dirname(__FILE__)."/inc/inc_admin_channel.php"); | require_once(dirname(__FILE__)."/inc/inc_admin_channel.php"); | ||||
| if (empty($action)) $action = ''; | if (empty($action)) $action = ''; | ||||
| $id = isset($id) && is_numeric($id) ? $id : 0; | $id = isset($id) && is_numeric($id) ? $id : 0; | ||||
| $mysql_version = $dsql->GetVersion(); | $mysql_version = $dsql->GetVersion(); | ||||
| //获取模型信息 | //获取模型信息 | ||||
| $row = $dsql->GetOne("SELECT fieldset,'' as maintable,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); | $row = $dsql->GetOne("SELECT fieldset,'' as maintable,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); | ||||
| $fieldset = stripslashes($row['fieldset']); | $fieldset = stripslashes($row['fieldset']); | ||||
| $trueTable = $row['addtable']; | $trueTable = $row['addtable']; | ||||
| $dtp = new DedeTagParse(); | $dtp = new DedeTagParse(); | ||||
| $dtp->SetNameSpace("field", "<", ">"); | $dtp->SetNameSpace("field", "<", ">"); | ||||
| $dtp->LoadSource($fieldset); | $dtp->LoadSource($fieldset); | ||||
| foreach ($dtp->CTags as $ctag) { | foreach ($dtp->CTags as $ctag) { | ||||
| if (strtolower($ctag->GetName()) == strtolower($fname)) break; | if (strtolower($ctag->GetName()) == strtolower($fname)) break; | ||||
| } | } | ||||
| //字段类型信息 | //字段类型信息 | ||||
| $ds = file(dirname(__FILE__)."/inc/fieldtype.txt"); | $ds = file(dirname(__FILE__)."/inc/fieldtype.txt"); | ||||
| foreach ($ds as $d) { | foreach ($ds as $d) { | ||||
| $dds = explode(',', trim($d)); | $dds = explode(',', trim($d)); | ||||
| $fieldtypes[$dds[0]] = $dds[1]; | $fieldtypes[$dds[0]] = $dds[1]; | ||||
| } | } | ||||
| //获取频道模型 | //获取频道模型 | ||||
| $dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); | $dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); | ||||
| $dsql->Execute(); | $dsql->Execute(); | ||||
| @@ -43,7 +38,6 @@ while ($crow = $dsql->GetObject()) { | |||||
| $channelArray[$crow->id]['typename'] = $crow->typename; | $channelArray[$crow->id]['typename'] = $crow->typename; | ||||
| $channelArray[$crow->id]['nid'] = $crow->nid; | $channelArray[$crow->id]['nid'] = $crow->nid; | ||||
| } | } | ||||
| //保存修改 | //保存修改 | ||||
| /*-------------------- | /*-------------------- | ||||
| function _SAVE() | function _SAVE() | ||||
| @@ -53,7 +47,6 @@ if ($action == 'save') { | |||||
| ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); | ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| $dfvalue = $vdefault; | $dfvalue = $vdefault; | ||||
| if (preg_match("#^(select|radio|checkbox)#", $dtype)) { | if (preg_match("#^(select|radio|checkbox)#", $dtype)) { | ||||
| if (!preg_match("#,#", $dfvalue)) { | if (!preg_match("#,#", $dfvalue)) { | ||||
| @@ -61,7 +54,6 @@ if ($action == 'save') { | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| } | } | ||||
| if ($dtype == 'stepselect') { | if ($dtype == 'stepselect') { | ||||
| $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fname' "); | $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fname' "); | ||||
| if (!is_array($arr)) { | if (!is_array($arr)) { | ||||
| @@ -69,7 +61,6 @@ if ($action == 'save') { | |||||
| exit(); | 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 "; | $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) { | 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."; "; | $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; | ||||
| } | } | ||||
| $dsql->ExecuteNoneQuery($tabsql); | $dsql->ExecuteNoneQuery($tabsql); | ||||
| //检测附加表里含有的字段 | //检测附加表里含有的字段 | ||||
| $fields = array(); | $fields = array(); | ||||
| $rs = $dsql->SetQuery("SHOW fields FROM `{$row['addtable']}`"); | $rs = $dsql->SetQuery("SHOW fields FROM `{$row['addtable']}`"); | ||||
| @@ -86,18 +76,15 @@ if ($action == 'save') { | |||||
| while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | ||||
| $fields[strtolower($nrow['Field'])] = $nrow['Type']; | $fields[strtolower($nrow['Field'])] = $nrow['Type']; | ||||
| } | } | ||||
| //修改字段配置信息 | //修改字段配置信息 | ||||
| $isnull = ($isnull == 1 ? "true" : "false"); | $isnull = ($isnull == 1 ? "true" : "false"); | ||||
| $mxlen = $maxlength; | $mxlen = $maxlength; | ||||
| $fieldname = strtolower($fname); | $fieldname = strtolower($fname); | ||||
| //检测被修改的字段类型,并更新数据表 | //检测被修改的字段类型,并更新数据表 | ||||
| $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); | $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); | ||||
| $ntabsql = $fieldinfos[0]; | $ntabsql = $fieldinfos[0]; | ||||
| $buideType = $fieldinfos[1]; | $buideType = $fieldinfos[1]; | ||||
| $tabsql = ''; | $tabsql = ''; | ||||
| //检测旧数据类型,并替换为新配置 | //检测旧数据类型,并替换为新配置 | ||||
| foreach ($dtp->CTags as $tagid => $ctag) { | foreach ($dtp->CTags as $tagid => $ctag) { | ||||
| if ($fieldname == strtolower($ctag->GetName())) { | if ($fieldname == strtolower($ctag->GetName())) { | ||||
| @@ -115,11 +102,9 @@ if ($action == 'save') { | |||||
| } | } | ||||
| } | } | ||||
| $oksetting = $dtp->GetResultNP(); | $oksetting = $dtp->GetResultNP(); | ||||
| $addlist = GetAddFieldList($dtp, $oksetting); | $addlist = GetAddFieldList($dtp, $oksetting); | ||||
| $oksetting = addslashes($oksetting); | $oksetting = addslashes($oksetting); | ||||
| $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); | $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); | ||||
| ShowMsg("成功修改一个字段的配置", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); | ShowMsg("成功修改一个字段的配置", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| @@ -132,19 +117,16 @@ else if ($action == "delete") { | |||||
| ShowMsg("对不起,系统模型的字段不允许删除", "-1"); | ShowMsg("对不起,系统模型的字段不允许删除", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //检测旧数据类型,并替换为新配置 | //检测旧数据类型,并替换为新配置 | ||||
| foreach ($dtp->CTags as $tagid => $ctag) { | foreach ($dtp->CTags as $tagid => $ctag) { | ||||
| if (strtolower($ctag->GetName()) == strtolower($fname)) { | if (strtolower($ctag->GetName()) == strtolower($fname)) { | ||||
| $dtp->Assign($tagid, "#@Delete@#"); | $dtp->Assign($tagid, "#@Delete@#"); | ||||
| } | } | ||||
| } | } | ||||
| $oksetting = addslashes($dtp->GetResultNP()); | $oksetting = addslashes($dtp->GetResultNP()); | ||||
| $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting' WHERE id='$id' "); | $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting' WHERE id='$id' "); | ||||
| $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); | $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); | ||||
| ShowMsg("成功删除一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); | ShowMsg("成功删除一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| require_once(DEDEADMIN."/templets/mychannel_field_edit.htm"); | |||||
| require_once(DEDEADMIN."/templets/mychannel_field_edit.htm"); | |||||
| @@ -12,13 +12,11 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('c_List'); | CheckPurview('c_List'); | ||||
| require_once(DEDEINC.'/datalistcp.class.php'); | require_once(DEDEINC.'/datalistcp.class.php'); | ||||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
| $sql = "SELECT id,nid,typename,addtable,isshow,issystem FROM `#@__channeltype` ORDER BY id DESC"; | $sql = "SELECT id,nid,typename,addtable,isshow,issystem FROM `#@__channeltype` ORDER BY id DESC"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->SetTemplet(DEDEADMIN."/templets/mychannel_main.htm"); | $dlist->SetTemplet(DEDEADMIN."/templets/mychannel_main.htm"); | ||||
| $dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
| $dlist->display(); | $dlist->display(); | ||||
| function GetSta($sta, $id) | function GetSta($sta, $id) | ||||
| { | { | ||||
| if ($sta == 1) { | if ($sta == 1) { | ||||
| @@ -27,8 +25,7 @@ function GetSta($sta, $id) | |||||
| return "禁用 > <a href='mychannel_edit.php?dopost=show&id=$id'>启用</a>"; | return "禁用 > <a href='mychannel_edit.php?dopost=show&id=$id'>启用</a>"; | ||||
| } | } | ||||
| } | } | ||||
| function IsSystem($s) | function IsSystem($s) | ||||
| { | { | ||||
| return $s == 1 ? "系统" : "自动"; | return $s == 1 ? "系统" : "自动"; | ||||
| } | |||||
| } | |||||
| @@ -12,7 +12,6 @@ require(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('temp_Other'); | CheckPurview('temp_Other'); | ||||
| require_once(DEDEINC."/typelink/typelink.class.php"); | require_once(DEDEINC."/typelink/typelink.class.php"); | ||||
| if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
| if ($dopost == "save") { | if ($dopost == "save") { | ||||
| CheckCSRF(); | CheckCSRF(); | ||||
| $tagname = trim($tagname); | $tagname = trim($tagname); | ||||
| @@ -33,4 +32,4 @@ $startDay = time(); | |||||
| $endDay = AddDay($startDay, 30); | $endDay = AddDay($startDay, 30); | ||||
| $startDay = GetDateTimeMk($startDay); | $startDay = GetDateTimeMk($startDay); | ||||
| $endDay = GetDateTimeMk($endDay); | $endDay = GetDateTimeMk($endDay); | ||||
| include DedeInclude('templets/mytag_add.htm'); | |||||
| include DedeInclude('templets/mytag_add.htm'); | |||||
| @@ -11,11 +11,9 @@ | |||||
| require(dirname(__FILE__)."/config.php"); | require(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('temp_Other'); | CheckPurview('temp_Other'); | ||||
| require_once(DEDEINC."/typelink/typelink.class.php"); | require_once(DEDEINC."/typelink/typelink.class.php"); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| $aid = intval($aid); | $aid = intval($aid); | ||||
| $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'mytag_main.php' : $_COOKIE['ENV_GOBACK_URL']; | $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'mytag_main.php' : $_COOKIE['ENV_GOBACK_URL']; | ||||
| if ($dopost == 'delete') { | if ($dopost == 'delete') { | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__mytag` WHERE aid='$aid'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__mytag` WHERE aid='$aid'"); | ||||
| ShowMsg("成功删除一个自定义标记", $ENV_GOBACK_URL); | ShowMsg("成功删除一个自定义标记", $ENV_GOBACK_URL); | ||||
| @@ -55,4 +53,4 @@ if ($dopost == 'delete') { | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $row = $dsql->GetOne("SELECT * FROM `#@__mytag` WHERE aid='$aid'"); | $row = $dsql->GetOne("SELECT * FROM `#@__mytag` WHERE aid='$aid'"); | ||||
| include DedeInclude('templets/mytag_edit.htm'); | |||||
| include DedeInclude('templets/mytag_edit.htm'); | |||||
| @@ -14,18 +14,16 @@ require_once(DEDEINC.'/datalistcp.class.php'); | |||||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, '/'); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, '/'); | ||||
| make_hash(); | make_hash(); | ||||
| $sql = "SELECT myt.aid,myt.tagname,tp.typename,myt.timeset,myt.endtime | $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 = new DataListCP(); | ||||
| $dlist->SetTemplet(DEDEADMIN.'/templets/mytag_main.htm'); | $dlist->SetTemplet(DEDEADMIN.'/templets/mytag_main.htm'); | ||||
| $dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
| $dlist->display(); | $dlist->display(); | ||||
| function TestType($tname) | function TestType($tname) | ||||
| { | { | ||||
| return $tname == '' ? '所有栏目' : $tname; | return $tname == '' ? '所有栏目' : $tname; | ||||
| } | } | ||||
| function TimeSetValue($ts) | function TimeSetValue($ts) | ||||
| { | { | ||||
| return $ts == 0 ? '不限时间' : '限时标记'; | return $ts == 0 ? '不限时间' : '限时标记'; | ||||
| } | |||||
| } | |||||
| @@ -10,4 +10,4 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEINC."/typelink/typelink.class.php"); | require_once(DEDEINC."/typelink/typelink.class.php"); | ||||
| include DedeInclude('templets/mytag_tag_guide.htm'); | |||||
| include DedeInclude('templets/mytag_tag_guide.htm'); | |||||
| @@ -10,7 +10,6 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('temp_Other'); | CheckPurview('temp_Other'); | ||||
| //根据条件生成标记 | //根据条件生成标记 | ||||
| $attlist = ""; | $attlist = ""; | ||||
| $attlist .= " row='".$row."'"; | $attlist .= " row='".$row."'"; | ||||
| @@ -23,7 +22,6 @@ if ($channel > 0) $attlist .= " channelid='".$channel."'"; | |||||
| if ($att > 0) $attlist .= " att='".$att."'"; | if ($att > 0) $attlist .= " att='".$att."'"; | ||||
| if ($col > 1) $attlist .= " col='".$col."'"; | if ($col > 1) $attlist .= " col='".$col."'"; | ||||
| if ($subday > 0) $attlist .= " subday='".$subday."'"; | if ($subday > 0) $attlist .= " subday='".$subday."'"; | ||||
| if (!empty($types)) { | if (!empty($types)) { | ||||
| $attlist .= " type='"; | $attlist .= " type='"; | ||||
| foreach ($types as $v) { | foreach ($types as $v) { | ||||
| @@ -49,4 +47,4 @@ if ($dopost == 'savetag') { | |||||
| $dsql->ExecuteNoneQuery("UPDATE `#@__mytag` SET tagname='{$tagname}_{$id}' WHERE aid='$id'"); | $dsql->ExecuteNoneQuery("UPDATE `#@__mytag` SET tagname='{$tagname}_{$id}' WHERE aid='$id'"); | ||||
| $fulltag = "{dede:mytag name='{$tagname}_{$id}' ismake='yes'/}"; | $fulltag = "{dede:mytag name='{$tagname}_{$id}' ismake='yes'/}"; | ||||
| } | } | ||||
| include DedeInclude('templets/mytag_tag_guide_ok.htm'); | |||||
| include DedeInclude('templets/mytag_tag_guide_ok.htm'); | |||||
| @@ -25,4 +25,4 @@ WHERE arc.arcrank = '-2' $whereSql order by arc.id desc"; | |||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->SetTemplet(DEDEADMIN."/templets/recycling.htm"); | $dlist->SetTemplet(DEDEADMIN."/templets/recycling.htm"); | ||||
| $dlist->SetSource($query); | $dlist->SetSource($query); | ||||
| $dlist->display(); | |||||
| $dlist->display(); | |||||
| @@ -10,7 +10,7 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
| if (empty($pagesize)) $pagesize = 30; | |||||
| if (empty($pagesize)) $pageSize = 30; | |||||
| if (empty($pageno)) $pageno = 1; | if (empty($pageno)) $pageno = 1; | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| if (empty($orderby)) $orderby = 'aid'; | if (empty($orderby)) $orderby = 'aid'; | ||||
| @@ -11,11 +11,10 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('shops_Delivery'); | CheckPurview('shops_Delivery'); | ||||
| require_once DEDEINC.'/datalistcp.class.php'; | require_once DEDEINC.'/datalistcp.class.php'; | ||||
| if (!isset($do)) $do = ''; | if (!isset($do)) $do = ''; | ||||
| if ($do == 'add') { | if ($do == 'add') { | ||||
| if (empty($dname) || (strlen($dname) > 100)) { | if (empty($dname) || (strlen($dname) > 100)) { | ||||
| ShowMsg("请填写配送方式名称!", "-1"); | |||||
| ShowMsg("请填写配送方式名称", "-1"); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $price = preg_replace("#[^.0-9]#", "", $price); | $price = preg_replace("#[^.0-9]#", "", $price); | ||||
| @@ -28,13 +27,13 @@ if ($do == 'add') { | |||||
| if ($result) { | if ($result) { | ||||
| ShowMsg("成功添加一个配送方式!", "shops_delivery.php"); | ShowMsg("成功添加一个配送方式!", "shops_delivery.php"); | ||||
| } else { | } else { | ||||
| ShowMsg("添加配送方式时发生SQL错误!", "-1"); | |||||
| ShowMsg("添加配送方式时发生SQL错误", "-1"); | |||||
| } | } | ||||
| exit(); | exit(); | ||||
| } else if ($do == 'del') { | } else if ($do == 'del') { | ||||
| $id = intval($id); | $id = intval($id); | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__shops_delivery` WHERE pid='$id'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__shops_delivery` WHERE pid='$id'"); | ||||
| ShowMsg("已删除当前配送方式!", "shops_delivery.php"); | |||||
| ShowMsg("已删除当前配送方式", "shops_delivery.php"); | |||||
| exit(); | exit(); | ||||
| } else if ($do == 'edit') { | } else if ($do == 'edit') { | ||||
| foreach ($pid as $id) { | 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'"); | $dsql->ExecuteNoneQuery("UPDATE `#@__shops_delivery` SET dname='$dname',price='$price',des='$des' WHERE pid='$id'"); | ||||
| } | } | ||||
| ShowMsg("成功修改配送方式!", "shops_delivery.php"); | |||||
| ShowMsg("成功修改配送方式", "shops_delivery.php"); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $deliveryarr = array(); | $deliveryarr = array(); | ||||
| @@ -70,9 +69,8 @@ while ($row = $dsql->GetArray()) { | |||||
| $deliveryarr[] = $row; | $deliveryarr[] = $row; | ||||
| } | } | ||||
| $dlist = new DataListCP(); | $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(); //显示 | |||||
| $dlist->SetTemplate(DEDEADMIN."/templets/shops_delivery.htm");//载入模板 | |||||
| $dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM `#@__shops_delivery` ORDER BY `orders` ASC");//设定查询SQL | |||||
| $dlist->Display();//显示 | |||||
| @@ -11,7 +11,6 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('shops_Operations'); | CheckPurview('shops_Operations'); | ||||
| require_once(DEDEINC.'/datalistcp.class.php'); | require_once(DEDEINC.'/datalistcp.class.php'); | ||||
| if (isset($dopost)) { | if (isset($dopost)) { | ||||
| CheckPurview('shops_Operations_cpanel'); | CheckPurview('shops_Operations_cpanel'); | ||||
| if ($dopost == 'up') { | if ($dopost == 'up') { | ||||
| @@ -60,7 +59,6 @@ if (isset($dopost)) { | |||||
| ShowMsg("成功修改指定的订单记录", $ENV_GOBACK_URL); | ShowMsg("成功修改指定的订单记录", $ENV_GOBACK_URL); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| $addsql = ''; | $addsql = ''; | ||||
| if (empty($oid)) $oid = 0; | if (empty($oid)) $oid = 0; | ||||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
| @@ -72,17 +70,14 @@ if (isset($sta)) { | |||||
| $addsql = "WHERE s.`state`='$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"; | $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 = new DataListCP(); | ||||
| $dlist->SetParameter("oid", $oid); | $dlist->SetParameter("oid", $oid); | ||||
| if (isset($sta)) $dlist->SetParameter("sta", $sta); | if (isset($sta)) $dlist->SetParameter("sta", $sta); | ||||
| $tplfile = DEDEADMIN."/templets/shops_operations.htm"; | $tplfile = DEDEADMIN."/templets/shops_operations.htm"; | ||||
| //这两句的顺序不能更换 | //这两句的顺序不能更换 | ||||
| $dlist->SetTemplate($tplfile); //载入模板 | $dlist->SetTemplate($tplfile); //载入模板 | ||||
| $dlist->SetSource($sql); //设定查询SQLexit('dd'); | $dlist->SetSource($sql); //设定查询SQLexit('dd'); | ||||
| $dlist->Display(); | $dlist->Display(); | ||||
| function GetSta($sta) | function GetSta($sta) | ||||
| { | { | ||||
| if ($sta == 0) { | if ($sta == 0) { | ||||
| @@ -97,7 +92,6 @@ function GetSta($sta) | |||||
| return '已完成'; | return '已完成'; | ||||
| } | } | ||||
| } | } | ||||
| function GetsType($pid) | function GetsType($pid) | ||||
| { | { | ||||
| global $dsql; | global $dsql; | ||||
| @@ -109,7 +103,6 @@ function GetsType($pid) | |||||
| return '-'; | return '-'; | ||||
| } | } | ||||
| } | } | ||||
| function GetMemberID($mid) | function GetMemberID($mid) | ||||
| { | { | ||||
| global $dsql; | global $dsql; | ||||
| @@ -120,4 +113,4 @@ function GetMemberID($mid) | |||||
| } else { | } else { | ||||
| return '0'; | return '0'; | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -11,22 +11,18 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEINC."/datalistcp.class.php"); | require_once(DEDEINC."/datalistcp.class.php"); | ||||
| CheckPurview('shops_Operations'); | CheckPurview('shops_Operations'); | ||||
| if (!isset($oid)) exit("<a href='javascript:window.close()'>无效操作!</a>"); | if (!isset($oid)) exit("<a href='javascript:window.close()'>无效操作!</a>"); | ||||
| $oid = preg_replace("#[^-0-9A-Z]#", "", $oid); | $oid = preg_replace("#[^-0-9A-Z]#", "", $oid); | ||||
| if (empty($oid)) exit("<a href='javascript:window.close()'>无效订单号!</a>"); | if (empty($oid)) exit("<a href='javascript:window.close()'>无效订单号!</a>"); | ||||
| $row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid'"); | $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'"; | $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 = new DataListCP(); | ||||
| $dlist->pageSize = 20; | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetParameter("oid", $oid); | $dlist->SetParameter("oid", $oid); | ||||
| $dlist->SetTemplate(DEDEADMIN."/templets/shops_operations_cart.htm"); | $dlist->SetTemplate(DEDEADMIN."/templets/shops_operations_cart.htm"); | ||||
| $dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
| $dlist->Display(); | $dlist->Display(); | ||||
| $dlist->Close(); | $dlist->Close(); | ||||
| function GetSta($sta, $oid) | function GetSta($sta, $oid) | ||||
| { | { | ||||
| global $dsql; | global $dsql; | ||||
| @@ -41,4 +37,4 @@ function GetSta($sta, $oid) | |||||
| } else { | } else { | ||||
| return '<span class="text-danger">已完成</span>'; | return '<span class="text-danger">已完成</span>'; | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -11,7 +11,6 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('sys_SoftConfig'); | CheckPurview('sys_SoftConfig'); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| //保存 | //保存 | ||||
| if ($dopost == "save") { | if ($dopost == "save") { | ||||
| if ($dfrank > 0 || $dfywboy > 0) $gotojump = 1; | if ($dfrank > 0 || $dfywboy > 0) $gotojump = 1; | ||||
| @@ -19,7 +19,6 @@ if ($dopost != 'save') { | |||||
| ClearMyAddon(); | ClearMyAddon(); | ||||
| $channelid = -1; | $channelid = -1; | ||||
| $cid = isset($cid) && is_numeric($cid) ? $cid : 0; | $cid = isset($cid) && is_numeric($cid) ? $cid : 0; | ||||
| //获得频道模型信息 | //获得频道模型信息 | ||||
| $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
| include DedeInclude("templets/spec_add.htm"); | include DedeInclude("templets/spec_add.htm"); | ||||
| @@ -28,7 +28,6 @@ if (empty($action)) { | |||||
| $etypes[] = $arr; | $etypes[] = $arr; | ||||
| $egroups[$arr['egroup']] = $arr['itemname']; | $egroups[$arr['egroup']] = $arr['itemname']; | ||||
| } | } | ||||
| if ($egroup != '') { | if ($egroup != '') { | ||||
| $orderby = 'ORDER BY disorder ASC, evalue ASC'; | $orderby = 'ORDER BY disorder ASC, evalue ASC'; | ||||
| if (!empty($topvalue)) { | if (!empty($topvalue)) { | ||||
| @@ -80,20 +79,16 @@ else if ($action == 'del') { | |||||
| } else if ($action == 'delenumAllSel') { | } else if ($action == 'delenumAllSel') { | ||||
| if (isset($ids) && is_array($ids)) { | if (isset($ids) && is_array($ids)) { | ||||
| $id = join(',', $ids); | $id = join(',', $ids); | ||||
| $groups = array(); | $groups = array(); | ||||
| $dsql->Execute('me', "SELECT egroup FROM `#@__sys_enum` WHERE id IN($id) GROUP BY egroup"); | $dsql->Execute('me', "SELECT egroup FROM `#@__sys_enum` WHERE id IN($id) GROUP BY egroup"); | ||||
| while ($row = $dsql->GetArray('me')) { | while ($row = $dsql->GetArray('me')) { | ||||
| $groups[] = $row['egroup']; | $groups[] = $row['egroup']; | ||||
| } | } | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id IN($id); "); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id IN($id); "); | ||||
| //更新缓存 | //更新缓存 | ||||
| foreach ($groups as $egropu) { | foreach ($groups as $egropu) { | ||||
| WriteEnumsCache($egroup); | WriteEnumsCache($egroup); | ||||
| } | } | ||||
| ShowMsg("成功删除选中的枚举分类", $ENV_GOBACK_URL); | ShowMsg("成功删除选中的枚举分类", $ENV_GOBACK_URL); | ||||
| } else { | } else { | ||||
| ShowMsg("您没选择任何分类", "-1"); | ShowMsg("您没选择任何分类", "-1"); | ||||
| @@ -151,7 +146,7 @@ else if ($action == 'exarea') { | |||||
| while ($row = $dsql->GetArray()) { | while ($row = $dsql->GetArray()) { | ||||
| $bigtypes[$row['id']] = $evalue = $disorder = $n * 500; | $bigtypes[$row['id']] = $evalue = $disorder = $n * 500; | ||||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) | $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++; | $n++; | ||||
| } | } | ||||
| $stypes = array(); | $stypes = array(); | ||||
| @@ -162,7 +157,7 @@ else if ($action == 'exarea') { | |||||
| while ($row = $dsql->GetArray()) { | while ($row = $dsql->GetArray()) { | ||||
| $stypes[$row['id']] = $evalue = $disorder = $v + $n; | $stypes[$row['id']] = $evalue = $disorder = $v + $n; | ||||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) | $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++; | $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 "); | $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); | if (!is_array($arr)) $disorder = $evalue = ($issign == 1 ? 1 : 500); | ||||
| else $disorder = $evalue = $arr['disorder'] + ($issign == 1 ? 1 : 500); | else $disorder = $evalue = $arr['disorder'] + ($issign == 1 ? 1 : 500); | ||||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) | $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); | WriteEnumsCache($egroup); | ||||
| ShowMsg("成功添加枚举分类".$dsql->GetError(), $ENV_GOBACK_URL); | ShowMsg("成功添加枚举分类".$dsql->GetError(), $ENV_GOBACK_URL); | ||||
| @@ -217,7 +211,7 @@ else if ($action == 'addenum_save') { | |||||
| $evalue = $matchs[1].'.'.$addvalue; | $evalue = $matchs[1].'.'.$addvalue; | ||||
| } | } | ||||
| $sql = "INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) | $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; | //echo $sql;exit; | ||||
| $dsql->ExecuteNoneQuery($sql); | $dsql->ExecuteNoneQuery($sql); | ||||
| } | } | ||||
| @@ -238,7 +232,7 @@ else if ($action == 'addenum_save') { | |||||
| $evalue = $arr['evalue'] + 1; | $evalue = $arr['evalue'] + 1; | ||||
| } | } | ||||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) | $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); | WriteEnumsCache($egroup); | ||||
| ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); | ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); | ||||
| @@ -266,4 +260,4 @@ else if ($action == 'upallcache') { | |||||
| WriteEnumsCache($egroup); | WriteEnumsCache($egroup); | ||||
| ShowMsg("成更新枚举缓存", $ENV_GOBACK_URL); | ShowMsg("成更新枚举缓存", $ENV_GOBACK_URL); | ||||
| exit(); | exit(); | ||||
| } | |||||
| } | |||||
| @@ -20,7 +20,6 @@ if (empty($dopost)) { | |||||
| echo 'ERROR: Upload Error! '; | echo 'ERROR: Upload Error! '; | ||||
| exit(0); | exit(0); | ||||
| } | } | ||||
| //把文件移动到临时目录 | //把文件移动到临时目录 | ||||
| $tmpdir = DEDEDATA.'/uploadtmp'; | $tmpdir = DEDEDATA.'/uploadtmp'; | ||||
| if (!is_dir($tmpdir)) { | if (!is_dir($tmpdir)) { | ||||
| @@ -31,10 +30,8 @@ if (empty($dopost)) { | |||||
| exit(0); | exit(0); | ||||
| } | } | ||||
| } | } | ||||
| $FiledataNew = str_replace("\\", '/', $Filedata); | $FiledataNew = str_replace("\\", '/', $Filedata); | ||||
| $FiledataNew = $tmpdir.'/'.preg_replace("/(.*)[\/]/isU", "", $FiledataNew); | $FiledataNew = $tmpdir.'/'.preg_replace("/(.*)[\/]/isU", "", $FiledataNew); | ||||
| $mime = get_mime_type($Filedata); | $mime = get_mime_type($Filedata); | ||||
| if (preg_match("#^unknow#", $mime)) { | if (preg_match("#^unknow#", $mime)) { | ||||
| echo "ERROR: Create {$tmpdir} dir Error! "; | echo "ERROR: Create {$tmpdir} dir Error! "; | ||||
| @@ -45,7 +42,6 @@ if (empty($dopost)) { | |||||
| exit; | exit; | ||||
| } | } | ||||
| move_uploaded_file($Filedata, $FiledataNew); | move_uploaded_file($Filedata, $FiledataNew); | ||||
| $info = $ftype = $sname = ''; | $info = $ftype = $sname = ''; | ||||
| $srcInfo = GetImageSize($FiledataNew, $info); | $srcInfo = GetImageSize($FiledataNew, $info); | ||||
| //检测文件类型 | //检测文件类型 | ||||
| @@ -78,7 +74,6 @@ if (empty($dopost)) { | |||||
| echo "ERROR: Image type Error! "; | echo "ERROR: Image type Error! "; | ||||
| exit(0); | exit(0); | ||||
| } | } | ||||
| //保存原图 | //保存原图 | ||||
| $filedir = $cfg_image_dir.'/'.MyDate($cfg_addon_savetype, time()); | $filedir = $cfg_image_dir.'/'.MyDate($cfg_addon_savetype, time()); | ||||
| if (!is_dir(DEDEROOT.$filedir)) { | if (!is_dir(DEDEROOT.$filedir)) { | ||||
| @@ -103,30 +98,25 @@ if (empty($dopost)) { | |||||
| } | } | ||||
| //WaterImg($cfg_basedir.$fileurl, 'up'); | //WaterImg($cfg_basedir.$fileurl, 'up'); | ||||
| $title = $filename.$sname; | $title = $filename.$sname; | ||||
| $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | $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()."'); "; | VALUES ('$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; | ||||
| if (!empty($arcid)) { | if (!empty($arcid)) { | ||||
| $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | $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()."'); "; | VALUES ('$arcid','$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; | ||||
| } | } | ||||
| $dsql->ExecuteNoneQuery($inquery); | $dsql->ExecuteNoneQuery($inquery); | ||||
| $fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
| AddMyAddon($fid, $fileurl); | AddMyAddon($fid, $fileurl); | ||||
| //生成缩略图 | //生成缩略图 | ||||
| ob_start(); | ob_start(); | ||||
| ImageResizeNew($cfg_basedir.$fileurl, $cfg_ddimg_width, $cfg_ddimg_height, '', false); | ImageResizeNew($cfg_basedir.$fileurl, $cfg_ddimg_width, $cfg_ddimg_height, '', false); | ||||
| $imagevariable = ob_get_contents(); | $imagevariable = ob_get_contents(); | ||||
| ob_end_clean(); | ob_end_clean(); | ||||
| //保存信息到 session | //保存信息到 session | ||||
| if (!isset($_SESSION['file_info'])) $_SESSION['file_info'] = array(); | if (!isset($_SESSION['file_info'])) $_SESSION['file_info'] = array(); | ||||
| if (!isset($_SESSION['bigfile_info'])) $_SESSION['bigfile_info'] = array(); | if (!isset($_SESSION['bigfile_info'])) $_SESSION['bigfile_info'] = array(); | ||||
| if (!isset($_SESSION['fileid'])) $_SESSION['fileid'] = 1; | if (!isset($_SESSION['fileid'])) $_SESSION['fileid'] = 1; | ||||
| else $_SESSION['fileid']++; | else $_SESSION['fileid']++; | ||||
| $_SESSION['bigfile_info'][$_SESSION['fileid']] = $fileurl; | $_SESSION['bigfile_info'][$_SESSION['fileid']] = $fileurl; | ||||
| $_SESSION['file_info'][$_SESSION['fileid']] = $imagevariable; | $_SESSION['file_info'][$_SESSION['fileid']] = $imagevariable; | ||||
| echo "FILEID:".$_SESSION['fileid']; | echo "FILEID:".$_SESSION['fileid']; | ||||
| @@ -204,4 +194,4 @@ else if ($dopost == 'delold') { | |||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}'; "); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}'; "); | ||||
| echo "已删除"; | echo "已删除"; | ||||
| exit(); | exit(); | ||||
| } | |||||
| } | |||||
| @@ -14,7 +14,6 @@ require_once(DEDEINC."/datalistcp.class.php"); | |||||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
| if (empty($rank)) $rank = ''; | if (empty($rank)) $rank = ''; | ||||
| else $rank = " WHERE CONCAT(#@__admin.usertype)='$rank' "; | else $rank = " WHERE CONCAT(#@__admin.usertype)='$rank' "; | ||||
| $dsql->SetQuery("SELECT `rank`,typename FROM `#@__admintype` "); | $dsql->SetQuery("SELECT `rank`,typename FROM `#@__admintype` "); | ||||
| $dsql->Execute(); | $dsql->Execute(); | ||||
| while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
| @@ -25,16 +24,14 @@ $dlist = new DataListCP(); | |||||
| $dlist->SetTemplet(DEDEADMIN."/templets/sys_admin_user.htm"); | $dlist->SetTemplet(DEDEADMIN."/templets/sys_admin_user.htm"); | ||||
| $dlist->SetSource($query); | $dlist->SetSource($query); | ||||
| $dlist->Display(); | $dlist->Display(); | ||||
| function GetUserType($trank) | function GetUserType($trank) | ||||
| { | { | ||||
| global $adminRanks; | global $adminRanks; | ||||
| if (isset($adminRanks[$trank])) return $adminRanks[$trank]; | if (isset($adminRanks[$trank])) return $adminRanks[$trank]; | ||||
| else return "错误类型"; | else return "错误类型"; | ||||
| } | } | ||||
| function GetChannel($c) | function GetChannel($c) | ||||
| { | { | ||||
| if ($c == "" || $c == 0) return "所有频道"; | if ($c == "" || $c == 0) return "所有频道"; | ||||
| else return $c; | else return $c; | ||||
| } | |||||
| } | |||||
| @@ -12,7 +12,6 @@ require_once(dirname(__FILE__)."/config.php"); | |||||
| CheckPurview('sys_User'); | CheckPurview('sys_User'); | ||||
| require_once(DEDEINC."/typelink/typelink.class.php"); | require_once(DEDEINC."/typelink/typelink.class.php"); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| if ($dopost == 'add') { | if ($dopost == 'add') { | ||||
| CheckCSRF(); | CheckCSRF(); | ||||
| if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd) || preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | 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); | $mpwd = md5($pwd); | ||||
| $pwd = substr(md5($pwd), 5, 20); | $pwd = substr(md5($pwd), 5, 20); | ||||
| $typeid = join(',', $typeids); | $typeid = join(',', $typeids); | ||||
| if ($typeid == '0') $typeid = ''; | 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); | $dsql->ExecuteNoneQuery($adminquery); | ||||
| $mid = $dsql->GetLastID(); | $mid = $dsql->GetLastID(); | ||||
| if ($mid <= 0) { | if ($mid <= 0) { | ||||
| die($dsql->GetError().' 数据库出错'); | die($dsql->GetError().' 数据库出错'); | ||||
| } | } | ||||
| //后台管理员 | //后台管理员 | ||||
| $inquery = "INSERT INTO `#@__admin`(id,usertype,userid,pwd,uname,typeid,tname,email) | $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); | $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); | $dsql->ExecuteNoneQuery($adminquery); | ||||
| $adminquery = "INSERT INTO `#@__member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`) | $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); | $dsql->ExecuteNoneQuery($adminquery); | ||||
| $adminquery = "Insert Into `#@__member_space`(`mid` ,`pagesize` ,`matt` ,`spacename` ,`spacelogo` ,`spacestyle`, `sign` ,`spacenews`) | $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); | $dsql->ExecuteNoneQuery($adminquery); | ||||
| ShowMsg('成功增加一个用户', 'sys_admin_user.php'); | ShowMsg('成功增加一个用户', 'sys_admin_user.php'); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| @@ -82,4 +71,4 @@ while ($row = $dsql->GetObject('op')) { | |||||
| } | } | ||||
| } | } | ||||
| make_hash(); | make_hash(); | ||||
| include DedeInclude('templets/sys_admin_user_add.htm'); | |||||
| include DedeInclude('templets/sys_admin_user_add.htm'); | |||||
| @@ -10,7 +10,6 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('sys_User'); | CheckPurview('sys_User'); | ||||
| if (isset($dopost) && $dopost == 'getone') { | if (isset($dopost) && $dopost == 'getone') { | ||||
| $row = $dsql->GetOne("SELECT userid FROM `#@__admin` WHERE id='$uid'; "); | $row = $dsql->GetOne("SELECT userid FROM `#@__admin` WHERE id='$uid'; "); | ||||
| $userid = $row['userid']; | $userid = $row['userid']; | ||||
| @@ -11,12 +11,10 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('sys_Data'); | CheckPurview('sys_Data'); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| if ($cfg_dbtype == 'sqlite') { | if ($cfg_dbtype == 'sqlite') { | ||||
| showMsg('备份系统根目录下/data/'.$cfg_dbname.'.db文件即可', 'javascript:;'); | showMsg('备份系统根目录下/data/'.$cfg_dbname.'.db文件即可', 'javascript:;'); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| if ($dopost == "viewinfo") //查看表结构 | if ($dopost == "viewinfo") //查看表结构 | ||||
| { | { | ||||
| echo "<xmp>"; | echo "<xmp>"; | ||||
| @@ -62,7 +60,6 @@ if ($dopost == "viewinfo") //查看表结构 | |||||
| echo '</xmp>'; | echo '</xmp>'; | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //获取系统存在的表信息 | //获取系统存在的表信息 | ||||
| $otherTables = array(); | $otherTables = array(); | ||||
| $dedeSysTables = array(); | $dedeSysTables = array(); | ||||
| @@ -83,9 +80,8 @@ while ($row = $dsql->GetArray('t', MYSQL_BOTH)) { | |||||
| } | } | ||||
| $mysql_version = $dsql->GetVersion(); | $mysql_version = $dsql->GetVersion(); | ||||
| include DedeInclude('templets/sys_data.htm'); | include DedeInclude('templets/sys_data.htm'); | ||||
| function TjCount($tbname, &$dsql) | function TjCount($tbname, &$dsql) | ||||
| { | { | ||||
| $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM $tbname"); | $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM $tbname"); | ||||
| return $row['dd']; | return $row['dd']; | ||||
| } | |||||
| } | |||||
| @@ -15,7 +15,6 @@ if (empty($action)) { | |||||
| require_once(DEDEADMIN."/templets/sys_data_replace.htm"); | require_once(DEDEADMIN."/templets/sys_data_replace.htm"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| /*------------------------------- | /*------------------------------- | ||||
| //列出数据库表里的字段 | //列出数据库表里的字段 | ||||
| function __getfields() | function __getfields() | ||||
| @@ -86,4 +85,4 @@ else if ($action == 'apply') { | |||||
| ShowMsg("共找到 $tt 条记录,成功替换了 $oo 条", "javascript:;"); | ShowMsg("共找到 $tt 条记录,成功替换了 $oo 条", "javascript:;"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -23,4 +23,4 @@ while (($filename = $dh->read()) !== false) { | |||||
| } | } | ||||
| } | } | ||||
| $dh->close(); | $dh->close(); | ||||
| include DedeInclude('templets/sys_data_revert.htm'); | |||||
| include DedeInclude('templets/sys_data_revert.htm'); | |||||
| @@ -11,4 +11,4 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('sys_Group'); | CheckPurview('sys_Group'); | ||||
| if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
| include DedeInclude('templets/sys_group.htm'); | |||||
| include DedeInclude('templets/sys_group.htm'); | |||||
| @@ -31,4 +31,4 @@ if (!empty($dopost)) { | |||||
| ShowMsg("成功创建一个新的用户组!", "sys_group.php"); | ShowMsg("成功创建一个新的用户组!", "sys_group.php"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| include DedeInclude('templets/sys_group_add.htm'); | |||||
| include DedeInclude('templets/sys_group_add.htm'); | |||||
| @@ -143,7 +143,7 @@ EOT; | |||||
| exit; | exit; | ||||
| } | } | ||||
| if ($i == 1) { | if ($i == 1) { | ||||
| echo ' <tr align="center" bgcolor="#f8f8f8" height="26"> | |||||
| echo '<tr height="26" bgcolor="#f8f8f8" align="center"> | |||||
| <td colspan="3">没有找到搜索的内容</td> | <td colspan="3">没有找到搜索的内容</td> | ||||
| </tr></table>'; | </tr></table>'; | ||||
| } | } | ||||
| @@ -32,7 +32,6 @@ if ($action == "save") { | |||||
| } | } | ||||
| if (is_uploaded_file($newimg)) { | if (is_uploaded_file($newimg)) { | ||||
| $imgfile_type = strtolower(trim($newimg_type)); | $imgfile_type = strtolower(trim($newimg_type)); | ||||
| if (!in_array($imgfile_type, $allow_mark_types)) { | if (!in_array($imgfile_type, $allow_mark_types)) { | ||||
| ShowMsg("上传的图片格式错误,请使用 gif、png格式的其中一种", "-1"); | ShowMsg("上传的图片格式错误,请使用 gif、png格式的其中一种", "-1"); | ||||
| exit(); | exit(); | ||||
| @@ -65,4 +64,4 @@ if ($action == "save") { | |||||
| echo "<script>alert('修改配置成功');</script>\r\n"; | echo "<script>alert('修改配置成功');</script>\r\n"; | ||||
| } | } | ||||
| require_once($ImageWaterConfigFile); | require_once($ImageWaterConfigFile); | ||||
| include DedeInclude('templets/sys_info_mark.htm'); | |||||
| include DedeInclude('templets/sys_info_mark.htm'); | |||||
| @@ -11,7 +11,6 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| require_once(DEDEINC.'/datalistcp.class.php'); | require_once(DEDEINC.'/datalistcp.class.php'); | ||||
| CheckPurview('sys_Data'); | CheckPurview('sys_Data'); | ||||
| $dopost = (empty($dopost)) ? '' : $dopost; | $dopost = (empty($dopost)) ? '' : $dopost; | ||||
| $pid = (empty($pid)) ? 0 : intval($pid); | $pid = (empty($pid)) ? 0 : intval($pid); | ||||
| /* | /* | ||||
| @@ -33,18 +32,14 @@ $pid = (empty($pid)) ? 0 : intval($pid); | |||||
| 将上述的格式传入到数组中去,然后进行解析: | 将上述的格式传入到数组中去,然后进行解析: | ||||
| 1.声明类,并创建数组 | 1.声明类,并创建数组 | ||||
| $af = new Array2form($config); | $af = new Array2form($config); | ||||
| 2.设置一个表单模板(可选,如果不设置载入默认) | 2.设置一个表单模板(可选,如果不设置载入默认) | ||||
| $af->SetDefaultTpl($templets); $templets:为一个底册模板文件 | $af->SetDefaultTpl($templets); $templets:为一个底册模板文件 | ||||
| 表单模板格式为: | 表单模板格式为: | ||||
| <p>~title~:~form~<small>~description~</small></p> | <p>~title~:~form~<small>~description~</small></p> | ||||
| 3.获取特定项目表单 | 3.获取特定项目表单 | ||||
| $af->GetIterm('alipay', 1) //1.表示获取一个默认模板下的完整表单,2.仅获取一个表单项 | $af->GetIterm('alipay', 1) //1.表示获取一个默认模板下的完整表单,2.仅获取一个表单项 | ||||
| 4.获取所有表单内容 | 4.获取所有表单内容 | ||||
| $af->GetAll() //获取表单所有解析后的内容 | $af->GetAll() //获取表单所有解析后的内容 | ||||
| */ | */ | ||||
| class Array2form | class Array2form | ||||
| { | { | ||||
| @@ -59,15 +54,6 @@ class Array2form | |||||
| $this->SetDefaultTpl(); | $this->SetDefaultTpl(); | ||||
| } | } | ||||
| } | } | ||||
| //析构函数,兼容PHP4 | |||||
| /* | |||||
| function Array2form($formarray = array()) | |||||
| { | |||||
| $this->__construct($formarray); | |||||
| } | |||||
| */ | |||||
| //获取一个特定项目的表单 | //获取一个特定项目的表单 | ||||
| function GetIterm($itermid = '', $itermtype = 1) | function GetIterm($itermid = '', $itermtype = 1) | ||||
| { | { | ||||
| @@ -93,7 +79,6 @@ class Array2form | |||||
| } | } | ||||
| return empty($reval) ? '' : $reval; | return empty($reval) ? '' : $reval; | ||||
| } | } | ||||
| function GetForm($key, $formarry = array(), $formtype = 'text') | function GetForm($key, $formarry = array(), $formtype = 'text') | ||||
| { | { | ||||
| switch ($formtype) { | switch ($formtype) { | ||||
| @@ -126,8 +111,6 @@ class Array2form | |||||
| } | } | ||||
| return $reval_form; | return $reval_form; | ||||
| } | } | ||||
| //获取所有的表单内容 | //获取所有的表单内容 | ||||
| function GetAll() | function GetAll() | ||||
| { | { | ||||
| @@ -141,7 +124,6 @@ class Array2form | |||||
| return FALSE; | return FALSE; | ||||
| } | } | ||||
| } | } | ||||
| //获取一个特定项目的表单 | //获取一个特定项目的表单 | ||||
| function SetDefaultTpl($tplname = '') | function SetDefaultTpl($tplname = '') | ||||
| { | { | ||||
| @@ -159,7 +141,6 @@ $tplstring = " | |||||
| <td>~form~ <small>~description~</small></td> | <td>~form~ <small>~description~</small></td> | ||||
| </tr> | </tr> | ||||
| "; | "; | ||||
| //安装支付接口 | //安装支付接口 | ||||
| if ($dopost == 'install') { | if ($dopost == 'install') { | ||||
| $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); | $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); | ||||
| @@ -210,7 +191,6 @@ else if ($dopost == 'config') { | |||||
| } else { | } else { | ||||
| $config = serialize($config); | $config = serialize($config); | ||||
| } | } | ||||
| $query = "UPDATE `#@__payment` SET name = '$pay_name',fee='$pay_fee',description='$pay_desc',config='$config',enabled='1' WHERE id='$pid'"; | $query = "UPDATE `#@__payment` SET name = '$pay_name',fee='$pay_fee',description='$pay_desc',config='$config',enabled='1' WHERE id='$pid'"; | ||||
| $dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
| if ($pm == 'edit') $msg = "保存修改成功"; | if ($pm == 'edit') $msg = "保存修改成功"; | ||||
| @@ -218,7 +198,6 @@ else if ($dopost == 'config') { | |||||
| ShowMsg($msg, "sys_payment.php"); | ShowMsg($msg, "sys_payment.php"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //删除支付接口 | //删除支付接口 | ||||
| else if ($dopost == 'uninstall') { | else if ($dopost == 'uninstall') { | ||||
| $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); | $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 = new DataListCP(); | ||||
| $dlist->SetTemplet(DEDEADMIN."/templets/sys_payment.htm"); | $dlist->SetTemplet(DEDEADMIN."/templets/sys_payment.htm"); | ||||
| $dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
| $dlist->display(); | |||||
| $dlist->display(); | |||||
| @@ -11,7 +11,6 @@ | |||||
| require(dirname(__FILE__)."/config.php"); | require(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('sys_Data'); | CheckPurview('sys_Data'); | ||||
| if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
| //查看表结构 | //查看表结构 | ||||
| if ($dopost == "viewinfo") { | if ($dopost == "viewinfo") { | ||||
| CheckCSRF(); | CheckCSRF(); | ||||
| @@ -61,7 +60,7 @@ else if ($dopost == "repair") { | |||||
| } else { | } else { | ||||
| $rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `$tablename` "); | $rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `$tablename` "); | ||||
| if ($rs) echo "修复表:$tablename OK"; | if ($rs) echo "修复表:$tablename OK"; | ||||
| else echo "修复表:$tablename 失败,原因是:".$dsql->GetError(); | |||||
| else echo "修复表:$tablename 失败,原因是:".$dsql->GetError(); | |||||
| } | } | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| @@ -75,7 +74,7 @@ else if ($dopost == "repairAll") { | |||||
| if ($rs) { | if ($rs) { | ||||
| echo "修复表: {$row[0]} ok!<br>\r\n"; | echo "修复表: {$row[0]} ok!<br>\r\n"; | ||||
| } else { | } else { | ||||
| echo "修复表: {$row[0]} 失败! 原因是: ".$dsql->GetError()."<br>\r\n"; | |||||
| echo "修复表: {$row[0]} 失败,原因是: ".$dsql->GetError()."<br>\r\n"; | |||||
| } | } | ||||
| } | } | ||||
| exit(); | exit(); | ||||
| @@ -85,7 +84,7 @@ else if ($dopost == "query") { | |||||
| CheckCSRF(); | CheckCSRF(); | ||||
| $sqlquery = trim(stripslashes($sqlquery)); | $sqlquery = trim(stripslashes($sqlquery)); | ||||
| if (preg_match("#drop(.*)table#i", $sqlquery) || preg_match("#drop(.*)database#", $sqlquery)) { | if (preg_match("#drop(.*)table#i", $sqlquery) || preg_match("#drop(.*)database#", $sqlquery)) { | ||||
| echo "<span style='font-size:10pt'>删除'数据表'或'数据库'的语句不允许在这里执行</span>"; | |||||
| echo "<span>删除数据表或数据库的语句不允许在这里执行</span>"; | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| //运行查询语句 | //运行查询语句 | ||||
| @@ -142,4 +141,4 @@ else if ($dopost == "query") { | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| make_hash(); | make_hash(); | ||||
| include DedeInclude('templets/sys_sql_query.htm'); | |||||
| include DedeInclude('templets/sys_sql_query.htm'); | |||||
| @@ -11,4 +11,4 @@ | |||||
| require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
| CheckPurview('temp_Other'); | CheckPurview('temp_Other'); | ||||
| require_once(DEDEINC."/typelink/typelink.class.php"); | require_once(DEDEINC."/typelink/typelink.class.php"); | ||||
| include DedeInclude('templets/tag_test.htm'); | |||||
| include DedeInclude('templets/tag_test.htm'); | |||||
| @@ -18,7 +18,6 @@ if (empty($action)) { | |||||
| $orderway = isset($orderway) && $orderway == 'asc' ? 'asc' : 'desc'; | $orderway = isset($orderway) && $orderway == 'asc' ? 'asc' : 'desc'; | ||||
| if (!empty($tag)) $where = " where tag like '%$tag%'"; | if (!empty($tag)) $where = " where tag like '%$tag%'"; | ||||
| else $where = ''; | else $where = ''; | ||||
| $neworderway = ($orderway == 'desc' ? 'asc' : 'desc'); | $neworderway = ($orderway == 'desc' ? 'asc' : 'desc'); | ||||
| $query = "SELECT * FROM `#@__tagindex` $where ORDER BY $orderby $orderway"; | $query = "SELECT * FROM `#@__tagindex` $where ORDER BY $orderby $orderway"; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| @@ -26,7 +25,7 @@ if (empty($action)) { | |||||
| $dlist->SetParameter("tag", $tag); | $dlist->SetParameter("tag", $tag); | ||||
| $dlist->SetParameter("orderway", $orderway); | $dlist->SetParameter("orderway", $orderway); | ||||
| $dlist->SetParameter("orderby", $orderby); | $dlist->SetParameter("orderby", $orderby); | ||||
| $dlist->pageSize = 20; | |||||
| $dlist->pageSize = 30; | |||||
| $dlist->SetTemplet(DEDEADMIN."/templets/tags_main.htm"); | $dlist->SetTemplet(DEDEADMIN."/templets/tags_main.htm"); | ||||
| $dlist->SetSource($query); | $dlist->SetSource($query); | ||||
| $dlist->Display(); | $dlist->Display(); | ||||
| @@ -39,7 +38,7 @@ else if ($action == 'update') { | |||||
| $tid = (empty($tid) ? 0 : intval($tid)); | $tid = (empty($tid) ? 0 : intval($tid)); | ||||
| $count = (empty($count) ? 0 : intval($count)); | $count = (empty($count) ? 0 : intval($count)); | ||||
| if (empty($tid)) { | if (empty($tid)) { | ||||
| ShowMsg('没有选择要删除的tag!', '-1'); | |||||
| ShowMsg('没有选择要删除的tag', '-1'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $query = "UPDATE `#@__tagindex` SET `count`='$count' WHERE id='$tid' "; | $query = "UPDATE `#@__tagindex` SET `count`='$count' WHERE id='$tid' "; | ||||
| @@ -63,9 +62,9 @@ else if ($action == 'delete') { | |||||
| if ($dsql->ExecuteNoneQuery($query)) { | if ($dsql->ExecuteNoneQuery($query)) { | ||||
| $query = "DELETE FROM `#@__taglist` WHERE tid IN ($stringids)"; | $query = "DELETE FROM `#@__taglist` WHERE tid IN ($stringids)"; | ||||
| $dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
| ShowMsg("删除tags[ $stringids ]成功", 'tags_main.php'); | |||||
| ShowMsg("删除tags [$stringids] 成功", 'tags_main.php'); | |||||
| } else { | } else { | ||||
| ShowMsg("删除tags[ $stringids ]失败", 'tags_main.php'); | |||||
| ShowMsg("删除tags [$stringids] 失败", 'tags_main.php'); | |||||
| } | } | ||||
| exit(); | exit(); | ||||
| } else if ($action == 'get_one') { | } 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"; | $goto = "tags_main.php?action=fetch&startaid=$startaid&endaid=$endaid&start=$start"; | ||||
| ShowMsg('继续获取tags ', $goto, 0, 500); | ShowMsg('继续获取tags ', $goto, 0, 500); | ||||
| exit(); | exit(); | ||||
| } | |||||
| } | |||||
| @@ -91,7 +91,7 @@ table{border-collapse:separate} | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -197,7 +197,7 @@ table{border-collapse:separate} | |||||
| echo "<option value='0'>请选择栏目</option>"; | echo "<option value='0'>请选择栏目</option>"; | ||||
| echo $typeOptions; | echo $typeOptions; | ||||
| echo "</select>"; | echo "</select>"; | ||||
| ?> | |||||
| ?> | |||||
| </span> | </span> | ||||
| <i class='btn btn-sm fa fa-search' onClick="ShowCatMap(event,this,<?php echo $channelid; ?>,'typeid')" title='快捷选择' style='cursor:pointer'></i> | <i class='btn btn-sm fa fa-search' onClick="ShowCatMap(event,this,<?php echo $channelid; ?>,'typeid')" title='快捷选择' style='cursor:pointer'></i> | ||||
| <?php | <?php | ||||
| @@ -381,7 +381,7 @@ table{border-collapse:separate} | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <!--高级参数--> | <!--高级参数--> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;background:#ffffff;display:none"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;display:none"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -91,7 +91,7 @@ table{border-collapse:separate} | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"><table width="900" cellspacing="0" cellpadding="0"> | <td height="26" colspan="4" class="bline"><table width="900" cellspacing="0" cellpadding="0"> | ||||
| <tr> | <tr> | ||||
| @@ -193,7 +193,7 @@ table{border-collapse:separate} | |||||
| if($arcRow['typeid']=='0') echo "<option value='0' selected>请选择主分类</option>"; | if($arcRow['typeid']=='0') echo "<option value='0' selected>请选择主分类</option>"; | ||||
| echo $typeOptions; | echo $typeOptions; | ||||
| echo '</select>'; | echo '</select>'; | ||||
| ?> | |||||
| ?> | |||||
| <i class='btn btn-sm fa fa-search' style='cursor:pointer' onClick="ShowCatMap(event,this,<?php echo $channelid; ?>,'typeid','<?php echo $arcRow['typeid']; ?>')" title='快捷选择'></i> | <i class='btn btn-sm fa fa-search' style='cursor:pointer' onClick="ShowCatMap(event,this,<?php echo $channelid; ?>,'typeid','<?php echo $arcRow['typeid']; ?>')" title='快捷选择'></i> | ||||
| </td> | </td> | ||||
| <td width="90">消费金币:</td> | <td width="90">消费金币:</td> | ||||
| @@ -350,7 +350,7 @@ table{border-collapse:separate} | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <!--高级参数--> | <!--高级参数--> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;background:#ffffff;display:none"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;display:none"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -72,7 +72,7 @@ table{border-collapse:separate} | |||||
| <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | ||||
| <input type="hidden" name="cid" value="<?php echo $cid?>"> | <input type="hidden" name="cid" value="<?php echo $cid?>"> | ||||
| <input type="hidden" name="dopost" value="save"> | <input type="hidden" name="dopost" value="save"> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -271,7 +271,7 @@ table{border-collapse:separate} | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <!--高级参数--> | <!--高级参数--> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;background:#ffffff;display:none"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;display:none"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -68,7 +68,7 @@ table{border-collapse:separate} | |||||
| <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | ||||
| <input type="hidden" name="id" value="<?php echo $aid?>"> | <input type="hidden" name="id" value="<?php echo $aid?>"> | ||||
| <input type="hidden" name="dopost" value="save"> | <input type="hidden" name="dopost" value="save"> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" class="bline"> | <td height="26" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -258,7 +258,7 @@ table{border-collapse:separate} | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <!--高级参数--> | <!--高级参数--> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;background:#ffffff;display:none"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6display:none"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -60,7 +60,7 @@ table{border-collapse:separate} | |||||
| <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | ||||
| <input type="hidden" name="cid" value="<?php echo $cid?>"> | <input type="hidden" name="cid" value="<?php echo $cid?>"> | ||||
| <input type="hidden" name="dopost" value="save"> | <input type="hidden" name="dopost" value="save"> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -58,7 +58,7 @@ table{border-collapse:separate} | |||||
| <input type="hidden" name="id" value="<?php echo $aid; ?>"> | <input type="hidden" name="id" value="<?php echo $aid; ?>"> | ||||
| <input type="hidden" name="sortrank" value="<?php echo $addRow['senddate']; ?>"> | <input type="hidden" name="sortrank" value="<?php echo $addRow['senddate']; ?>"> | ||||
| <input type="hidden" name="dopost" value="save"> | <input type="hidden" name="dopost" value="save"> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" class="bline"> | <td height="26" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -82,7 +82,7 @@ table{border-collapse:separate} | |||||
| <form name="form1" action="article_add.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit()"> | <form name="form1" action="article_add.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit()"> | ||||
| <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | ||||
| <input type="hidden" name="dopost" value="save"> | <input type="hidden" name="dopost" value="save"> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="5" class="bline"> | <td height="26" colspan="5" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -193,7 +193,7 @@ table{border-collapse:separate} | |||||
| <?php | <?php | ||||
| if($cfg_need_typeid2=='Y') | if($cfg_need_typeid2=='Y') | ||||
| { | { | ||||
| echo "<a href='javascript:AddTypeid2();' class='btn btn-success btn-sm'>选择副栏目</a>"; | |||||
| echo "<a href='javascript:AddTypeid2();' class='btn btn-success btn-sm'>选择副栏目</a>"; | |||||
| } | } | ||||
| ?> | ?> | ||||
| </td> | </td> | ||||
| @@ -297,7 +297,7 @@ table{border-collapse:separate} | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;background:#ffffff"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -73,7 +73,7 @@ table{border-collapse:separate} | |||||
| <input type="hidden" name="dopost" value="save"> | <input type="hidden" name="dopost" value="save"> | ||||
| <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | <input type="hidden" name="channelid" value="<?php echo $channelid?>"> | ||||
| <input type="hidden" name="id" value="<?php echo $aid?>"> | <input type="hidden" name="id" value="<?php echo $aid?>"> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="2" class="bline"> | <td height="26" colspan="2" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -262,7 +262,7 @@ table{border-collapse:separate} | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <!--高级参数--> | <!--高级参数--> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6;background:#ffffff;display:none"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #dee2e6display:none"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -1,4 +1,4 @@ | |||||
| {dede:config.pagesize value="20"/} | |||||
| {dede:config.pagesize value='30'/} | |||||
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||||
| <html xmlns="http://www.w3.org/1999/xhtml"> | <html xmlns="http://www.w3.org/1999/xhtml"> | ||||
| <head> | <head> | ||||
| @@ -1,4 +1,4 @@ | |||||
| {dede:config.pagesize value="20"/} | |||||
| {dede:config.pagesize value='30'/} | |||||
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||||
| <html xmlns="http://www.w3.org/1999/xhtml"> | <html xmlns="http://www.w3.org/1999/xhtml"> | ||||
| <head> | <head> | ||||
| @@ -1,4 +1,4 @@ | |||||
| {dede:config.pagesize value="50"/} | |||||
| {dede:config.pagesize value='30'/} | |||||
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||||
| <html xmlns="http://www.w3.org/1999/xhtml"> | <html xmlns="http://www.w3.org/1999/xhtml"> | ||||
| <head> | <head> | ||||
| @@ -86,7 +86,7 @@ table{border-collapse:separate} | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" class="bline"> | <td height="26" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -457,7 +457,7 @@ table{border-collapse:separate} | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <!--高级参数--> | <!--高级参数--> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="display:none;border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="display:none;border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -80,7 +80,7 @@ table{border-collapse:separate} | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -409,7 +409,7 @@ table{border-collapse:separate} | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <!--高级参数--> | <!--高级参数--> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="display:none;border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="adset" style="display:none;border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -96,7 +96,7 @@ table{border-collapse:separate} | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6;background:#ffffff;"> | |||||
| <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #dee2e6"> | |||||
| <tr> | <tr> | ||||
| <td height="26" colspan="4" class="bline"> | <td height="26" colspan="4" class="bline"> | ||||
| <table width="900" cellspacing="0" cellpadding="0"> | <table width="900" cellspacing="0" cellpadding="0"> | ||||
| @@ -279,7 +279,7 @@ table{border-collapse:separate} | |||||
| <td><?php PrintAutoFieldsAdd(stripslashes($cInfos['fieldset']),'autofield'); ?></td> | <td><?php PrintAutoFieldsAdd(stripslashes($cInfos['fieldset']),'autofield'); ?></td> | ||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <table width="98%" align="center" cellpadding="2" style="border:1px solid #dee2e6;background:#ffffff;display:none;" cellspacing="2" id="adset"> | |||||
| <table width="98%" align="center" cellpadding="2" style="border:1px solid #dee2e6display:none;" cellspacing="2" id="adset"> | |||||
| <tr> | <tr> | ||||
| <td height="26" class="bline2">专题节点列表: <br> | <td height="26" class="bline2">专题节点列表: <br> | ||||
| 1、文章列表用ID1,ID2,ID3这样形式分开,系统会自动排除不同节点的相同文章;<br> | 1、文章列表用ID1,ID2,ID3这样形式分开,系统会自动排除不同节点的相同文章;<br> | ||||