diff --git a/README.md b/README.md index e1e18e2e..f2c16c02 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Sockets:支持接入DedeBIZ商业组件模块 2.上传程序目录中的`/src`到网站根目录; -3.运行`http://www.yourname.com/install/index.php`(yourname表示你的域名),按照安装提速说明进行程序安装; +3.运行`http://www.yourname.com/install/index.php`(yourname表示您的域名),按照安装提速说明进行程序安装; 详细安装步骤可以查看[帮助文档](https://www.dedebiz.com/help) diff --git a/dedebiz b/dedebiz index a614add2..1c3d9ff7 100755 --- a/dedebiz +++ b/dedebiz @@ -5,11 +5,11 @@ * * @version 2020年12月11日 tianya $ * @package DedeBIZ.Command - * @copyright Copyright (c) 2021, DedeBIZ.COM + * @copyright Copyright (c) 2022, DedeBIZ.COM * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -// 切换工作目录到./src +//切换工作目录到./src $workDir = dirname(__FILE__) . "/src"; chdir($workDir); @@ -32,7 +32,7 @@ WEBSITE: https://www.dedebiz.com/help/ "; -// 将选项转化为SQL IN参数 +//将选项转化为SQL IN参数 function Option2SQLin($str = "") { $str = preg_replace("#[^0-9-,]#", "", $str); @@ -72,8 +72,8 @@ function RandEncode($length=26) } if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { - // PHP5.4以下不支持内建服务器 - // 用于开发调试 + //PHP5.4以下不支持内建服务器 + //用于开发调试 if (phpversion() < "5.4") { die("DedeBIZ:command web server not support\n\n"); } @@ -89,10 +89,10 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { require_once($workDir . "/include/common.inc.php"); require_once(DEDEINC . "/cli.class.php"); - // 一个命令行的生成工具 + //一个命令行的生成工具 if (count($argv) > 2 && ($argv[2] == "arc" || $argv[2] == "a")) { - // 生成文档 - // make arc typeid=1 + //生成文档 + //make arc typeid=1 $t1 = ExecTime(); $addsql = "1=1"; $typeid = Option2SQLin(DedeCli::getOption("typeid")); @@ -120,7 +120,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { DedeCli::write($queryTime); exit; } else if (count($argv) > 2 && ($argv[2] == "list" || $argv[2] == "l")) { - // 生成栏目 + //生成栏目 $addsql = "1=1"; $typeid = Option2SQLin(DedeCli::getOption("typeid")); if (!empty($typeid)) { @@ -140,7 +140,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { } exit; } else if (count($argv) > 2 && ($argv[2] == "index" || $argv[2] == "i")) { - // 生成首页 + //生成首页 $position = DedeCli::getOption("position"); if (empty($position)) { $position = "../index.html"; @@ -162,7 +162,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { $pv->SaveToHtml($homeFile); DedeCli::write("Make index html successfull"); } else if (count($argv) > 2 && ($argv[2] == "auto" || $argv[2] == "o")) { - // 自动生成 + //自动生成 function OptimizeData($dsql) { global $cfg_dbprefix; @@ -184,7 +184,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { exit; } - // 1.生成首页 + //1.生成首页 $pv = new PartView(); $row = $pv->dsql->GetOne("SELECT * FROM `#@__homepageset` "); $templet = str_replace("{style}", $cfg_df_style, $row['templet']); @@ -199,7 +199,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { if (file_exists($homeFile)) @unlink($homeFile); } DedeCli::write("Make index html successfull"); - // 2.生成栏目 + //2.生成栏目 $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE senddate >=" . $start . " AND arcrank>-1"; $dsql->SetQuery($query); $dsql->Execute(); @@ -234,7 +234,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { DedeCli::write("Make list html successfull"); } - // 生成文档 + //生成文档 $tt = $dsql->GetOne("SELECT COUNT(id) as dd FROM `#@__arctiny` WHERE senddate >=" . $start . " AND arcrank>-1"); $total = intval($tt['dd']); $dsql->Execute('out', "SELECT id FROM `#@__arctiny` WHERE senddate >=" . $start . " AND arcrank>-1 ORDER BY typeid ASC"); @@ -248,7 +248,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { } DedeCli::write("Make archives html successfull"); - // 优化数据 + //优化数据 OptimizeData($dsql); DedeCli::write("Optimize data successfull"); } else { @@ -274,7 +274,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { define("DEDEINC", $workDir."/include"); require_once(DEDEINC."/dedehttpdown.class.php"); require_once(DEDEINC . "/cli.class.php"); - // 更新系统 + //更新系统 $latestURL = "https://cdn.dedebiz.com/release/latest.txt"; $del = new DedeHttpDown(); $del->OpenUrl($latestURL); @@ -292,11 +292,11 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { $del->OpenUrl($fileHashURL); $filelist = $del->GetJSON(); $offFiles = array(); - // TODO 命令行自动更新 + //TODO 命令行自动更新 } else if (count($argv) > 1 && ($argv[1] == "quick" || $argv[1] == "q")){ define("DEDEINC", $workDir."/include"); require_once(DEDEINC . "/cli.class.php"); - // 快速开始一个用于开发的DedeBIZ环境,基于SQLite无其他依赖 + //快速开始一个用于开发的DedeBIZ环境,基于SQLite无其他依赖 if (file_exists($workDir."/data/DedeBIZ.db")) { DedeCli::write("development environment has inited"); echo "Start Dev Server For DedeBIZ\n\r"; @@ -304,7 +304,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); exit; } - // 初始化安装一个开发环境 + //初始化安装一个开发环境 $db = new SQLite3($workDir.'/data/DedeBIZ.db'); $fp = fopen($workDir."/install/common.inc.php","r"); $configStr1 = fread($fp,filesize($workDir."/install/common.inc.php")); diff --git a/src/dede/action_search.php b/src/admin/action_search.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/action_search.php rename to src/admin/action_search.php index f575fff5..679518c4 --- a/src/dede/action_search.php +++ b/src/admin/action_search.php @@ -1,21 +1,20 @@ -Search(); -include DedeInclude('templets/action_search.htm'); +Search(); +include DedeInclude('templets/action_search.htm'); diff --git a/src/dede/actionsearch_class.php b/src/admin/actionsearch_class.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/actionsearch_class.php rename to src/admin/actionsearch_class.php index c7d6e9d2..e55bea1c --- a/src/dede/actionsearch_class.php +++ b/src/admin/actionsearch_class.php @@ -1,97 +1,96 @@ -asarray = $this->GetSearchstr(); - $this->keyword = $keyword; - } - - //初始化系统 - function ActionSearch($keyword) - { - $this->__construct($keyword); - } - - function GetSearchstr() - { - require_once(dirname(__FILE__)."/inc/inc_action_info.php"); - return is_array($actionSearch) ? $actionSearch : array(); - } - - function search() - { - $this->searchkeyword(); - return $this->result; - } - - /** - * 遍历功能配置项进行关键词匹配 - * - * @return void - */ - function searchkeyword() - { - $i = 0; //数组序列索引 - foreach ($this->asarray as $key => $value) { - //对二级项目进行匹配 - if (is_array($this->asarray[$key]['soniterm'])) { - foreach ($this->asarray[$key]['soniterm'] as $k => $val) { - //进行权限判断 - if (TestPurview($val['purview'])) { - //如果有操作权限 - if ($this->_strpos($val['title'], $this->keyword) !== false || $this->_strpos($val['description'], $this->keyword) !== false) { - //一级项目匹配 - $this->result[$i]['toptitle'] = $this->redColorKeyword($this->asarray[$key]['toptitle']); - $this->result[$i]['title'] = $this->redColorKeyword($this->asarray[$key]['title']); - $this->result[$i]['description'] = $this->redColorKeyword($this->asarray[$key]['description']); - //二级项目匹配 - $this->result[$i]['soniterm'][] = $this->redColorKeyword($val); - } - } - } - } - $i++; - } - } - - /** - * 加亮关键词 - * - * @access public - * @param string $text 关键词 - * @return string - */ - function redColorKeyword($text) - { - if (is_array($text)) { - foreach ($text as $key => $value) { - if ($key == 'title' || $key == 'description') { - //仅对title,description进行数组替换 - $text[$key] = str_replace($this->keyword, ''.$this->keyword.'', $text[$key]); - } - } - } else { - $text = str_replace($this->keyword, ''.$this->keyword.'', $text); - } - return $text; - } - - function _strpos($string, $find) - { - if (function_exists('stripos')) return stripos($string, $find); - return strpos($string, $find); - } -} +asarray = $this->GetSearchstr(); + $this->keyword = $keyword; + } + + //初始化系统 + function ActionSearch($keyword) + { + $this->__construct($keyword); + } + + function GetSearchstr() + { + require_once(dirname(__FILE__)."/inc/inc_action_info.php"); + return is_array($actionSearch) ? $actionSearch : array(); + } + + function search() + { + $this->searchkeyword(); + return $this->result; + } + + /** + * 遍历功能配置项进行关键词匹配 + * + * @return void + */ + function searchkeyword() + { + $i = 0; //数组序列索引 + foreach ($this->asarray as $key => $value) { + //对二级项目进行匹配 + if (is_array($this->asarray[$key]['soniterm'])) { + foreach ($this->asarray[$key]['soniterm'] as $k => $val) { + //进行权限判断 + if (TestPurview($val['purview'])) { + //如果有操作权限 + if ($this->_strpos($val['title'], $this->keyword) !== false || $this->_strpos($val['description'], $this->keyword) !== false) { + //一级项目匹配 + $this->result[$i]['toptitle'] = $this->redColorKeyword($this->asarray[$key]['toptitle']); + $this->result[$i]['title'] = $this->redColorKeyword($this->asarray[$key]['title']); + $this->result[$i]['description'] = $this->redColorKeyword($this->asarray[$key]['description']); + //二级项目匹配 + $this->result[$i]['soniterm'][] = $this->redColorKeyword($val); + } + } + } + } + $i++; + } + } + + /** + * 加亮关键词 + * + * @access public + * @param string $text 关键词 + * @return string + */ + function redColorKeyword($text) + { + if (is_array($text)) { + foreach ($text as $key => $value) { + if ($key == 'title' || $key == 'description') { + //仅对title,description进行数组替换 + $text[$key] = str_replace($this->keyword, ''.$this->keyword.'', $text[$key]); + } + } + } else { + $text = str_replace($this->keyword, ''.$this->keyword.'', $text); + } + return $text; + } + + function _strpos($string, $find) + { + if (function_exists('stripos')) return stripos($string, $find); + return strpos($string, $find); + } +} diff --git a/src/dede/ad_add.php b/src/admin/ad_add.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/ad_add.php rename to src/admin/ad_add.php index 5be9c744..0b21cb87 --- a/src/dede/ad_add.php +++ b/src/admin/ad_add.php @@ -1,5 +1,4 @@ GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' "); $showtag = '{'."dede:myad name='{$row['tagname']}'/".'}'; - $info = "说明:如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告更改后需要重新生成。
+ $info = "说明:如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告修改后需要重新生成。
如果不希望重新生成所有页面,则直接调用JS代码即可。 "; $wintitle = "广告管理-获取广告标签"; @@ -63,7 +62,7 @@ if ($dopost == 'delete') { WHERE aid='$aid' "; $dsql->ExecuteNoneQuery($query); - ShowMsg("成功更改一则广告代码", $ENV_GOBACK_URL); + ShowMsg("成功修改一则广告代码", $ENV_GOBACK_URL); exit(); } diff --git a/src/dede/ad_main.php b/src/admin/ad_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/ad_main.php rename to src/admin/ad_main.php index 7034fdb0..6eed46cc --- a/src/dede/ad_main.php +++ b/src/admin/ad_main.php @@ -1,60 +1,59 @@ -Execute('dd', 'SELECT * FROM `#@__myadtype` ORDER BY id DESC'); -$option = ''; -while ($arr = $dsql->GetArray('dd')) { - if ($arr['id'] == $clsid) { - $option .= "\n\r"; - } else { - $option .= "\n\r"; - } -} -$where_sql = ' 1=1'; -if ($clsid != 0) $where_sql .= " AND clsid = $clsid"; -if ($keyword != '') $where_sql .= " AND (ad.adname like '%$keyword%') "; - -$sql = "SELECT ad.aid,ad.clsid,ad.tagname,tp.typename as typename,ad.adname,ad.timeset,ad.endtime,ap.typename as clsname -FROM `#@__myad` ad -LEFT JOIN `#@__arctype` tp on tp.id=ad.typeid -LEFT JOIN `#@__myadtype` ap on ap.id=ad.clsid -WHERE $where_sql -ORDER BY ad.aid desc"; -$dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN."/templets/ad_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); - -function TestType($tname, $type = "") -{ - if ($tname == "") { - return ($type == 1) ? "默认分类" : "所有栏目"; - } else { - return $tname; - } -} - -function TimeSetValue($ts) -{ - if ($ts == 0) { - return "不限时间"; - } else { - return "限时标记"; - } -} +Execute('dd', 'SELECT * FROM `#@__myadtype` ORDER BY id DESC'); +$option = ''; +while ($arr = $dsql->GetArray('dd')) { + if ($arr['id'] == $clsid) { + $option .= "\n\r"; + } else { + $option .= "\n\r"; + } +} +$where_sql = ' 1=1'; +if ($clsid != 0) $where_sql .= " AND clsid = $clsid"; +if ($keyword != '') $where_sql .= " AND (ad.adname like '%$keyword%') "; + +$sql = "SELECT ad.aid,ad.clsid,ad.tagname,tp.typename as typename,ad.adname,ad.timeset,ad.endtime,ap.typename as clsname +FROM `#@__myad` ad +LEFT JOIN `#@__arctype` tp on tp.id=ad.typeid +LEFT JOIN `#@__myadtype` ap on ap.id=ad.clsid +WHERE $where_sql +ORDER BY ad.aid desc"; +$dlist = new DataListCP(); +$dlist->SetTemplet(DEDEADMIN."/templets/ad_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); + +function TestType($tname, $type = "") +{ + if ($tname == "") { + return ($type == 1) ? "默认分类" : "所有栏目"; + } else { + return $tname; + } +} + +function TimeSetValue($ts) +{ + if ($ts == 0) { + return "不限时间"; + } else { + return "限时标记"; + } +} diff --git a/src/dede/adtype_main.php b/src/admin/adtype_main.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/adtype_main.php rename to src/admin/adtype_main.php index 42fc9db8..83c797a0 --- a/src/dede/adtype_main.php +++ b/src/admin/adtype_main.php @@ -1,43 +1,42 @@ -ExecuteNoneQuery($query); - } - } else { - $query = "DELETE FROM `#@__myadtype` WHERE id='$tid' "; - $dsql->ExecuteNoneQuery($query); - } - } - //增加新记录 - if (isset($check_new) && $pname_new != '') { - $query = "INSERT INTO `#@__myadtype`(typename) VALUES('{$pname_new}');"; - $dsql->ExecuteNoneQuery($query); - } - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - ShowMsg("成功更新广告分类列表", 'adtype_main.php'); - exit; -} - -include DedeInclude('templets/adtype_main.htm'); +ExecuteNoneQuery($query); + } + } else { + $query = "DELETE FROM `#@__myadtype` WHERE id='$tid' "; + $dsql->ExecuteNoneQuery($query); + } + } + //增加新记录 + if (isset($check_new) && $pname_new != '') { + $query = "INSERT INTO `#@__myadtype`(typename) VALUES('{$pname_new}');"; + $dsql->ExecuteNoneQuery($query); + } + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + ShowMsg("成功更新广告分类列表", 'adtype_main.php'); + exit; +} + +include DedeInclude('templets/adtype_main.htm'); diff --git a/src/dede/album_add.php b/src/admin/album_add.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/album_add.php rename to src/admin/album_add.php index de89b2cc..66574744 --- a/src/dede/album_add.php +++ b/src/admin/album_add.php @@ -1,314 +1,314 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) $channelid = 2; - } - //获得频道模型信息 - $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - $channelid = $cInfos['id']; - //获取文章最大id以确定当前权重 - $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); - include DedeInclude("templets/album_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if (!isset($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (!isset($formhtml)) $formhtml = 0; - if (!isset($formzip)) $formzip = 0; - if (!isset($ddisfirst)) $ddisfirst = 0; - if (!isset($albums)) $albums = ""; - if (!isset($delzip)) $delzip = 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = preg_replace("#\"#", '"', $title); - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $userip = GetIP(); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) $ddisremote = 0; - $litpic = GetDDImage('none', $picname, $ddisremote); - // 处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; - $hasone = FALSE; - //处理并保存从网上复制的图片 - /*--------------------- - function _getformhtml() - ------------------*/ - if ($formhtml == 1) { - $imagebody = stripslashes($imagebody); - $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); - if ($ddisfirst == 1 && $litpic == '' && !empty($litpicname)) { - $litpic = $litpicname; - $hasone = TRUE; - } - } - /*--------------------- - function _getformzip() - 处理从ZIP中解压的图片 - ---------------------*/ - if ($formzip == 1) { - include_once(DEDEINC."/zip.class.php"); - include_once(DEDEADMIN."/file_class.php"); - $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); - $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); - $ntime = time(); - if (file_exists($zipfile)) { - @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); - @chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); - $z = new zip(); - $z->ExtractAll($zipfile, $tmpzipdir); - $fm = new FileManagement(); - $imgs = array(); - $fm->GetMatchFiles($tmpzipdir, "jpg|png|gif", $imgs); - $i = 0; - foreach ($imgs as $imgold) { - $i++; - $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); - CreateDir($savepath); - $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); - $iurl = $iurl.substr($imgold, -4, 4); - $imgfile = $cfg_basedir.$iurl; - copy($imgold, $imgfile); - unlink($imgold); - if (is_file($imgfile)) { - $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; - //指定了提取第一张为缩略图的情况强制使用第一张缩略图 - if ($i == '1') { - if (!$hasone && $ddisfirst == 1 && $litpic == '' && empty($litpicname)) { - $litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); - } - } - $info = ''; - $imginfos = GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - //把图片信息保存到媒体文档管理档案中 - $inquery = " - INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; - $dsql->ExecuteNoneQuery($inquery); - $fid = $dsql->GetLastID(); - AddMyAddon($fid, $iurl); - WaterImg($imgfile, 'up'); - if (!$hasone && $ddisfirst == 1 && $litpic == '') { - if (empty($litpicname)) { - $litpicname = $iurl; - $litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); - } - $litpic = $litpicname; - $hasone = TRUE; - } - } - } - if ($delzip == 1) unlink($zipfile); - $fm->RmDirFiles($tmpzipdir); - } - } - if ($albums !== "") { - $albumsArr = json_decode(stripslashes($albums), true); - for ($i = 0; $i <= count($albumsArr) - 1; $i++) { - $album = $albumsArr[$i]; - $data = explode(',', $album['img']); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - $info = ''; - $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); - $v = $fullUrl; - $imginfo = !empty($album['txt']) ? $album['txt'] : ''; - $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; - if ($ddisfirst == 1 && $litpic == '' && !empty($fullUrl)) { - $litpic = $fullUrl; - } - } - } - $imgurls = addslashes($imgurls); - //处理body字段自动摘要、自动提取缩略图等 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } else if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //加入主档案表 - $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, - color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) - VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', - '$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight'); "; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //加入附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (empty($addtable)) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); - exit(); - } - $useip = GetIP(); - $query = "INSERT INTO `$addtable`(aid,typeid,redirecturl,userip,pagestyle,maxwidth,imgurls,`row`,col,isrm,ddmaxwidth,pagepicnum,body{$inadd_f}) - Values('$arcID','$typeid','$redirecturl','$useip','$pagestyle','$maxwidth','$imgurls','$row','$col','$isrm','$ddmaxwidth','$pagepicnum','$body'{$inadd_v}); "; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //生成HTML - InsertTags($tags, $arcID); - $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布图片  更改图集  预览文档  已发布图片管理  $backurl"; - $msg = "
{$msg}
".GetUpdateTest(); - - $wintitle = "成功发布一个图集"; - $wecome_info = "文章管理::发布图集"; - $win = new OxWindow(); - $win->AddTitle("成功发布一个图集:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) $channelid = 2; + } + //获得频道模型信息 + $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + $channelid = $cInfos['id']; + //获取文章最大id以确定当前权重 + $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); + include DedeInclude("templets/album_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if (!isset($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (!isset($formhtml)) $formhtml = 0; + if (!isset($formzip)) $formzip = 0; + if (!isset($ddisfirst)) $ddisfirst = 0; + if (!isset($albums)) $albums = ""; + if (!isset($delzip)) $delzip = 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = preg_replace("#\"#", '"', $title); + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $userip = GetIP(); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) $ddisremote = 0; + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; + $hasone = FALSE; + //处理并保存从网上复制的图片 + /*--------------------- + function _getformhtml() + ------------------*/ + if ($formhtml == 1) { + $imagebody = stripslashes($imagebody); + $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); + if ($ddisfirst == 1 && $litpic == '' && !empty($litpicname)) { + $litpic = $litpicname; + $hasone = TRUE; + } + } + /*--------------------- + function _getformzip() + 处理从ZIP中解压的图片 + ---------------------*/ + if ($formzip == 1) { + include_once(DEDEINC."/zip.class.php"); + include_once(DEDEADMIN."/file_class.php"); + $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); + $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); + $ntime = time(); + if (file_exists($zipfile)) { + @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); + @chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); + $z = new zip(); + $z->ExtractAll($zipfile, $tmpzipdir); + $fm = new FileManagement(); + $imgs = array(); + $fm->GetMatchFiles($tmpzipdir, "jpg|png|gif", $imgs); + $i = 0; + foreach ($imgs as $imgold) { + $i++; + $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); + CreateDir($savepath); + $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); + $iurl = $iurl.substr($imgold, -4, 4); + $imgfile = $cfg_basedir.$iurl; + copy($imgold, $imgfile); + unlink($imgold); + if (is_file($imgfile)) { + $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; + //指定了提取第一张为缩略图的情况强制使用第一张缩略图 + if ($i == '1') { + if (!$hasone && $ddisfirst == 1 && $litpic == '' && empty($litpicname)) { + $litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); + } + } + $info = ''; + $imginfos = GetImageSize($imgfile, $info); + $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + //把图片信息保存到媒体文档管理档案中 + $inquery = " + INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; + $dsql->ExecuteNoneQuery($inquery); + $fid = $dsql->GetLastID(); + AddMyAddon($fid, $iurl); + WaterImg($imgfile, 'up'); + if (!$hasone && $ddisfirst == 1 && $litpic == '') { + if (empty($litpicname)) { + $litpicname = $iurl; + $litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); + } + $litpic = $litpicname; + $hasone = TRUE; + } + } + } + if ($delzip == 1) unlink($zipfile); + $fm->RmDirFiles($tmpzipdir); + } + } + if ($albums !== "") { + $albumsArr = json_decode(stripslashes($albums), true); + for ($i = 0; $i <= count($albumsArr) - 1; $i++) { + $album = $albumsArr[$i]; + $data = explode(',', $album['img']); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + $info = ''; + $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); + $v = $fullUrl; + $imginfo = !empty($album['txt']) ? $album['txt'] : ''; + $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; + if ($ddisfirst == 1 && $litpic == '' && !empty($fullUrl)) { + $litpic = $fullUrl; + } + } + } + $imgurls = addslashes($imgurls); + //处理body字段自动摘要、自动提取缩略图等 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } else if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //加入主档案表 + $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, + color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) + VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', + '$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight'); "; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //加入附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (empty($addtable)) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); + exit(); + } + $useip = GetIP(); + $query = "INSERT INTO `$addtable`(aid,typeid,redirecturl,userip,pagestyle,maxwidth,imgurls,`row`,col,isrm,ddmaxwidth,pagepicnum,body{$inadd_f}) + Values('$arcID','$typeid','$redirecturl','$useip','$pagestyle','$maxwidth','$imgurls','$row','$col','$isrm','$ddmaxwidth','$pagepicnum','$body'{$inadd_v}); "; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //生成HTML + InsertTags($tags, $arcID); + $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布图片  修改图集  预览文档  已发布图片管理  $backurl"; + $msg = "
{$msg}
".GetUpdateTest(); + + $wintitle = "成功发布一个图集"; + $wecome_info = "文章管理::发布图集"; + $win = new OxWindow(); + $win->AddTitle("成功发布一个图集:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/album_edit.php b/src/admin/album_edit.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/album_edit.php rename to src/admin/album_edit.php index c9230b4b..c7caaf97 --- a/src/dede/album_edit.php +++ b/src/admin/album_edit.php @@ -1,378 +1,378 @@ -GetOne($arcQuery); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错!", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错!", "javascript:;"); - exit(); - } - $addtable = $cInfos['addtable']; - $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); - $channelid = $arcRow['channel']; - $imgurls = $addRow["imgurls"]; - $maxwidth = $addRow["maxwidth"]; - $pagestyle = $addRow["pagestyle"]; - $irow = $addRow["row"]; - $icol = $addRow["col"]; - $isrm = $addRow["isrm"]; - $body = $addRow["body"]; - $ddmaxwidth = $addRow["ddmaxwidth"]; - $pagepicnum = $addRow["pagepicnum"]; - $tags = GetTags($aid); - $arcRow = XSSClean($arcRow); - $addRow = XSSClean($addRow); - include DedeInclude("templets/album_edit.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (!isset($formhtml)) $formhtml = 0; - if (!isset($albums)) $albums = ""; - if (!isset($formzip)) $formzip = 0; - if (!isset($ddisfirst)) $ddisfirst = 0; - if (!isset($delzip)) $delzip = 0; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, 250); - $keywords = trim(cn_substrR($keywords, 60)); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - // 处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析body里的内容 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //更新数据库的SQL语句 - $query = " - UPDATE `#@__archives` SET - typeid='$typeid', - typeid2='$typeid2', - sortrank='$sortrank', - flag='$flag', - click='$click', - ismake='$ismake', - arcrank='$arcrank', - money='$money', - title='$title', - color='$color', - source='$source', - writer='$writer', - litpic='$litpic', - pubdate='$pubdate', - notpost='$notpost', - description='$description', - keywords='$keywords', - shorttitle='$shorttitle', - filename='$filename', - dutyadmin='$adminid' - WHERE id='$id'; "; - if (!$dsql->ExecuteNoneQuery($query)) { - ShowMsg("更新数据库archives表时出错,请检查".$dsql->GetError(), "javascript:;"); - exit(); - } - $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; - $hasone = false; - //---------------------------------------- - //检查旧的图片是否有更新,并保存 - //----------------------------------------- - for ($i = 1; $i <= 120; $i++) { - if (!isset(${'imgurl'.$i})) continue; - $info = ''; - $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); - $iurl = stripslashes(${'imgurl'.$i}); - $ddurl = stripslashes(${'imgddurl'.$i}); - if (preg_match("#swfupload#i", $ddurl)) $ddurl = ''; - $imgfile = $cfg_basedir.$iurl; - $litimgfile = $cfg_basedir.$ddurl; - //有上传文件的情况 - if (isset(${'imgfile'.$i}) && is_uploaded_file(${'imgfile'.$i})) { - $tmpFile = ${'imgfile'.$i}; - //检测上传的图片, 如果类型不对,保留原来图片 - $imginfos = @GetImageSize($tmpFile, $info); - if (!is_array($imginfos)) { - $imginfos = @GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - continue; - } - move_uploaded_file($tmpFile, $imgfile); - $imginfos = @GetImageSize($imgfile, $info); - if ($ddurl == $iurl) { - $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; - $litimgfile = $cfg_basedir.$litpicname; - } else { - if ($cfg_ddimg_full == 'Y') ImageResizeNew($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); - else ImageResize($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); - $litpicname = $ddurl; - } - $imgurls .= "{dede:img ddimg='$litpicname' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - } - //没上传图片(只修改msg信息) - else { - $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); - $iurl = stripslashes(${'imgurl'.$i}); - $ddurl = stripslashes(${'imgddurl'.$i}); - if (preg_match("#swfupload#i", $ddurl)) { - $ddurl = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; - } - $imginfos = @GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - } - } - //---------------------------- - //从HTML中获取新图片 - //---------------------------- - if ($formhtml == 1 && !empty($imagebody)) { - $imagebody = stripslashes($imagebody); - $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); - if ($ddisfirst == 1 && $litpic == "" && !empty($litpicname)) { - $litpic = $litpicname; - $hasone = true; - } - } - /*--------------------- - function _getformzip() - 从ZIP文件中获取新图片 - ---------------------*/ - if ($formzip == 1) { - include_once(DEDEINC."/zip.class.php"); - include_once(DEDEADMIN."/file_class.php"); - $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); - $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); - $ntime = time(); - if (file_exists($zipfile)) { - @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); - @chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); - $z = new zip(); - $z->ExtractAll($zipfile, $tmpzipdir); - $fm = new FileManagement(); - $imgs = array(); - $fm->GetMatchFiles($tmpzipdir, "jpg|png|gif", $imgs); - $i = 0; - foreach ($imgs as $imgold) { - $i++; - $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); - CreateDir($savepath); - $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); - $iurl = $iurl.substr($imgold, -4, 4); - $imgfile = $cfg_basedir.$iurl; - copy($imgold, $imgfile); - unlink($imgold); - if (is_file($imgfile)) { - $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; - $info = ''; - $imginfos = GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - //把图片信息保存到媒体文档管理档案中 - $inquery = " - INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; - $dsql->ExecuteNoneQuery($inquery); - if ( - !$hasone && $ddisfirst == 1 - && $litpic == "" && !empty($litpicname) - ) { - if (file_exists($cfg_basedir.$litpicname)) { - $litpic = $litpicname; - $hasone = true; - } - } - } - } - if ($delzip == 1) { - unlink($zipfile); - } - $fm->RmDirFiles($tmpzipdir); - } - } - if ($albums !== "") { - $albumsArr = json_decode(stripslashes($albums), true); - // var_dump($albumsArr);exit; - for ($i = 0; $i <= count($albumsArr) - 1; $i++) { - $album = $albumsArr[$i]; - $data = explode(',', $album['img']); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - $info = ''; - $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); - $v = $fullUrl; - $imginfo = !empty($album['txt']) ? $album['txt'] : ''; - $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; - } - } - $imgurls = addslashes($imgurls); - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //更新附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $useip = GetIP(); - $query = "Update `$addtable` - set typeid='$typeid', - pagestyle='$pagestyle', - body='$body', - maxwidth = '$maxwidth', - ddmaxwidth = '$ddmaxwidth', - pagepicnum = '$pagepicnum', - imgurls='$imgurls', - `row`='$row', - col='$col', - isrm='$isrm'{$inadd_f}, - redirecturl='$redirecturl', - userip = '$useip' - WHERE aid='$id'; "; - if (!$dsql->ExecuteNoneQuery($query)) { - ShowMsg("更新附加表 `$addtable` 时出错,请检查原因".$dsql->GetError(), "javascript:;"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $arcUrl = MakeArt($id, true, true, $isremote); - if ($arcUrl == '') { - $arcUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布图片  查看更改  预览文档  管理已发布图片  $backurl"; - $wintitle = "成功更改图集"; - $wecome_info = "文章管理::更改图集"; - $win = new OxWindow(); - $win->AddTitle("成功更改一个图集:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); +GetOne($arcQuery); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错!", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错!", "javascript:;"); + exit(); + } + $addtable = $cInfos['addtable']; + $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); + $channelid = $arcRow['channel']; + $imgurls = $addRow["imgurls"]; + $maxwidth = $addRow["maxwidth"]; + $pagestyle = $addRow["pagestyle"]; + $irow = $addRow["row"]; + $icol = $addRow["col"]; + $isrm = $addRow["isrm"]; + $body = $addRow["body"]; + $ddmaxwidth = $addRow["ddmaxwidth"]; + $pagepicnum = $addRow["pagepicnum"]; + $tags = GetTags($aid); + $arcRow = XSSClean($arcRow); + $addRow = XSSClean($addRow); + include DedeInclude("templets/album_edit.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (!isset($formhtml)) $formhtml = 0; + if (!isset($albums)) $albums = ""; + if (!isset($formzip)) $formzip = 0; + if (!isset($ddisfirst)) $ddisfirst = 0; + if (!isset($delzip)) $delzip = 0; + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, 250); + $keywords = trim(cn_substrR($keywords, 60)); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析body里的内容 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //更新数据库的SQL语句 + $query = " + UPDATE `#@__archives` SET + typeid='$typeid', + typeid2='$typeid2', + sortrank='$sortrank', + flag='$flag', + click='$click', + ismake='$ismake', + arcrank='$arcrank', + money='$money', + title='$title', + color='$color', + source='$source', + writer='$writer', + litpic='$litpic', + pubdate='$pubdate', + notpost='$notpost', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename', + dutyadmin='$adminid' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($query)) { + ShowMsg("更新数据库archives表时出错,请检查".$dsql->GetError(), "javascript:;"); + exit(); + } + $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; + $hasone = false; + //---------------------------------------- + //检查旧的图片是否有更新,并保存 + //----------------------------------------- + for ($i = 1; $i <= 120; $i++) { + if (!isset(${'imgurl'.$i})) continue; + $info = ''; + $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); + $iurl = stripslashes(${'imgurl'.$i}); + $ddurl = stripslashes(${'imgddurl'.$i}); + if (preg_match("#swfupload#i", $ddurl)) $ddurl = ''; + $imgfile = $cfg_basedir.$iurl; + $litimgfile = $cfg_basedir.$ddurl; + //有上传文件的情况 + if (isset(${'imgfile'.$i}) && is_uploaded_file(${'imgfile'.$i})) { + $tmpFile = ${'imgfile'.$i}; + //检测上传的图片, 如果类型不对,保留原来图片 + $imginfos = @GetImageSize($tmpFile, $info); + if (!is_array($imginfos)) { + $imginfos = @GetImageSize($imgfile, $info); + $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + continue; + } + move_uploaded_file($tmpFile, $imgfile); + $imginfos = @GetImageSize($imgfile, $info); + if ($ddurl == $iurl) { + $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; + $litimgfile = $cfg_basedir.$litpicname; + } else { + if ($cfg_ddimg_full == 'Y') ImageResizeNew($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); + else ImageResize($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); + $litpicname = $ddurl; + } + $imgurls .= "{dede:img ddimg='$litpicname' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + } + //没上传图片(只修改msg信息) + else { + $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); + $iurl = stripslashes(${'imgurl'.$i}); + $ddurl = stripslashes(${'imgddurl'.$i}); + if (preg_match("#swfupload#i", $ddurl)) { + $ddurl = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; + } + $imginfos = @GetImageSize($imgfile, $info); + $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + } + } + //---------------------------- + //从HTML中获取新图片 + //---------------------------- + if ($formhtml == 1 && !empty($imagebody)) { + $imagebody = stripslashes($imagebody); + $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); + if ($ddisfirst == 1 && $litpic == "" && !empty($litpicname)) { + $litpic = $litpicname; + $hasone = true; + } + } + /*--------------------- + function _getformzip() + 从ZIP文件中获取新图片 + ---------------------*/ + if ($formzip == 1) { + include_once(DEDEINC."/zip.class.php"); + include_once(DEDEADMIN."/file_class.php"); + $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); + $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); + $ntime = time(); + if (file_exists($zipfile)) { + @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); + @chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); + $z = new zip(); + $z->ExtractAll($zipfile, $tmpzipdir); + $fm = new FileManagement(); + $imgs = array(); + $fm->GetMatchFiles($tmpzipdir, "jpg|png|gif", $imgs); + $i = 0; + foreach ($imgs as $imgold) { + $i++; + $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); + CreateDir($savepath); + $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); + $iurl = $iurl.substr($imgold, -4, 4); + $imgfile = $cfg_basedir.$iurl; + copy($imgold, $imgfile); + unlink($imgold); + if (is_file($imgfile)) { + $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; + $info = ''; + $imginfos = GetImageSize($imgfile, $info); + $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + //把图片信息保存到媒体文档管理档案中 + $inquery = " + INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; + $dsql->ExecuteNoneQuery($inquery); + if ( + !$hasone && $ddisfirst == 1 + && $litpic == "" && !empty($litpicname) + ) { + if (file_exists($cfg_basedir.$litpicname)) { + $litpic = $litpicname; + $hasone = true; + } + } + } + } + if ($delzip == 1) { + unlink($zipfile); + } + $fm->RmDirFiles($tmpzipdir); + } + } + if ($albums !== "") { + $albumsArr = json_decode(stripslashes($albums), true); + //var_dump($albumsArr);exit; + for ($i = 0; $i <= count($albumsArr) - 1; $i++) { + $album = $albumsArr[$i]; + $data = explode(',', $album['img']); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + $info = ''; + $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); + $v = $fullUrl; + $imginfo = !empty($album['txt']) ? $album['txt'] : ''; + $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; + } + } + $imgurls = addslashes($imgurls); + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //更新附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $useip = GetIP(); + $query = "Update `$addtable` + set typeid='$typeid', + pagestyle='$pagestyle', + body='$body', + maxwidth = '$maxwidth', + ddmaxwidth = '$ddmaxwidth', + pagepicnum = '$pagepicnum', + imgurls='$imgurls', + `row`='$row', + col='$col', + isrm='$isrm'{$inadd_f}, + redirecturl='$redirecturl', + userip = '$useip' + WHERE aid='$id'; "; + if (!$dsql->ExecuteNoneQuery($query)) { + ShowMsg("更新附加表 `$addtable` 时出错,请检查原因".$dsql->GetError(), "javascript:;"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $arcUrl = MakeArt($id, true, true, $isremote); + if ($arcUrl == '') { + $arcUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布图片  查看修改  预览文档  管理已发布图片  $backurl"; + $wintitle = "成功修改图集"; + $wecome_info = "文章管理::修改图集"; + $win = new OxWindow(); + $win->AddTitle("成功修改一个图集:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/album_testhtml.php b/src/admin/album_testhtml.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/album_testhtml.php rename to src/admin/album_testhtml.php index fb86c8a2..b279910a --- a/src/dede/album_testhtml.php +++ b/src/admin/album_testhtml.php @@ -1,22 +1,20 @@ -[关闭]\r\n"; -preg_match_all("/(src|SRC)=[\"|'| ]{0,}(http:\/\/(.*)\.(gif|jpg|jpeg|png))/isU", $myhtml, $img_array); -$img_array = array_unique($img_array[2]); -echo "
"; -echo "捕获的图片:\r\n"; -print_r($img_array); -echo "
\r\n"; +[关闭]\r\n"; +preg_match_all("/(src|SRC)=[\"|'| ]{0,}(http:\/\/(.*)\.(gif|jpg|jpeg|png))/isU", $myhtml, $img_array); +$img_array = array_unique($img_array[2]); +echo "
"; +echo "捕获的图片:\r\n"; +print_r($img_array); +echo "
\r\n"; diff --git a/src/dede/archives_add.php b/src/admin/archives_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/archives_add.php rename to src/admin/archives_add.php index 5defee9d..72b522c6 --- a/src/dede/archives_add.php +++ b/src/admin/archives_add.php @@ -1,199 +1,199 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) { - ShowMsg('无法识别模型信息,因此无法操作', '-1'); - exit(); - } - } - //获得频道模型信息 - $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - $channelid = $cInfos['id']; - //获取文章最大id以确定当前权重 - $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); - include DedeInclude('templets/archives_add.htm'); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if (empty($litpic_b64)) $litpic_b64 = ''; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if ($typeid == 0) { - ShowMsg('请指定文档的栏目', '-1'); - exit(); - } - if (empty($channelid)) { - ShowMsg('文档为非指定的类型,请检查您发布内容的表单是否合法', '-1'); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg('您所选择的栏目与当前模型不相符,请选择白色的选项', '-1'); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = preg_replace("#\"#", '"', $title); - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $userip = GetIP(); - $isremote = 0; - $voteid = (empty($voteid) ? 0 : $voteid); - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - // 处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - //分析处理附加表数据 - $inadd_f = $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') continue; - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) ${$vs[0]} = ''; - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //保存到主表 - $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) - VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', - '$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$voteid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //保存到附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (!empty($addtable)) { - $useip = GetIP(); - $query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,userip{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$useip'{$inadd_v})"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - } - //生成HTML - InsertTags($tags, $arcID); - $artUrl = MakeArt($arcID, true, true, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布文档  查看文档  更改文档  已发布文档管理  $backurl"; - $msg = "
{$msg}
".GetUpdateTest(); - $wintitle = '成功发布文档'; - $wecome_info = '文档管理::发布文档'; - $win = new OxWindow(); - $win->AddTitle('成功发布文档:'); - $win->AddMsgItem($msg); - $winform = $win->GetWindow('hand', ' ', false); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) { + ShowMsg('无法识别模型信息,因此无法操作', '-1'); + exit(); + } + } + //获得频道模型信息 + $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + $channelid = $cInfos['id']; + //获取文章最大id以确定当前权重 + $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); + include DedeInclude('templets/archives_add.htm'); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if (empty($litpic_b64)) $litpic_b64 = ''; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if ($typeid == 0) { + ShowMsg('请指定文档的栏目', '-1'); + exit(); + } + if (empty($channelid)) { + ShowMsg('文档为非指定的类型,请检查您发布内容的表单是否合法', '-1'); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg('您所选择的栏目与当前模型不相符,请选择白色的选项', '-1'); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = preg_replace("#\"#", '"', $title); + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $userip = GetIP(); + $isremote = 0; + $voteid = (empty($voteid) ? 0 : $voteid); + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + //分析处理附加表数据 + $inadd_f = $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') continue; + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) ${$vs[0]} = ''; + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //保存到主表 + $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) + VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', + '$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$voteid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //保存到附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (!empty($addtable)) { + $useip = GetIP(); + $query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,userip{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$useip'{$inadd_v})"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + } + //生成HTML + InsertTags($tags, $arcID); + $artUrl = MakeArt($arcID, true, true, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布文档  查看文档  修改文档  已发布文档管理  $backurl"; + $msg = "
{$msg}
".GetUpdateTest(); + $wintitle = '成功发布文档'; + $wecome_info = '文档管理::发布文档'; + $win = new OxWindow(); + $win->AddTitle('成功发布文档:'); + $win->AddMsgItem($msg); + $winform = $win->GetWindow('hand', ' ', false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/archives_do.php b/src/admin/archives_do.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/archives_do.php rename to src/admin/archives_do.php index 8fecc253..a11540fd --- a/src/dede/archives_do.php +++ b/src/admin/archives_do.php @@ -1,894 +1,894 @@ -GetOne($query); - $gurl = $row['editcon']; - if ($gurl == '') $gurl = 'article_edit.php'; - header("location:{$gurl}?aid=$aid"); - exit(); -} -/*-------------------------- -//浏览文档 -function viewArchives(){ } ----------------------------*/ -else if ($dopost == "viewArchives") { - $aid = preg_replace("#[^0-9]#", '', $aid); - //获取主表信息 - $query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon, - tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl - FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype - WHERE arc.id='$aid' "; - $trow = $dsql->GetOne($query); - $trow['maintable'] = (trim($trow['maintable']) == '' ? '#@__archives' : trim($trow['maintable'])); - if ($trow['issystem'] != -1) { - $arcQuery = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl - FROM `{$trow['maintable']}` arc LEFT JOIN `#@__arctype` tp on arc.typeid=tp.id - LEFT JOIN `#@__channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' "; - $arcRow = $dsql->GetOne($arcQuery); - PutCookie('DedeUserID', $arcRow['mid'], 1800); - PutCookie('DedeLoginTime', time(), 1800); - if ($arcRow['ismake'] == -1 || $arcRow['corank'] != 0 || $arcRow['arcrank'] != 0 || ($arcRow['typeid'] == 0 && $arcRow['channel'] != -1) || $arcRow['money'] > 0) { - echo ""; - exit(); - } - } else { - $arcRow['id'] = $aid; - $arcRow['typeid'] = $trow['typeid']; - $arcRow['senddate'] = $trow['senddate']; - $arcRow['title'] = ''; - $arcRow['ismake'] = 1; - $arcRow['arcrank'] = $trow['corank']; - $arcRow['namerule'] = $trow['namerule']; - $arcRow['typedir'] = $trow['typedir']; - $arcRow['money'] = 0; - $arcRow['filename'] = ''; - $arcRow['moresite'] = $trow['moresite']; - $arcRow['siteurl'] = $trow['siteurl']; - $arcRow['sitepath'] = $trow['sitepath']; - } - $arcurl = GetFileUrl( - $arcRow['id'], - $arcRow['typeid'], - $arcRow['senddate'], - $arcRow['title'], - $arcRow['ismake'], - $arcRow['arcrank'], - $arcRow['namerule'], - $arcRow['typedir'], - $arcRow['money'], - $arcRow['filename'], - $arcRow['moresite'], - $arcRow['siteurl'], - $arcRow['sitepath'] - ); - $arcfile = GetFileUrl( - $arcRow['id'], - $arcRow['typeid'], - $arcRow['senddate'], - $arcRow['title'], - $arcRow['ismake'], - $arcRow['arcrank'], - $arcRow['namerule'], - $arcRow['typedir'], - $arcRow['money'], - $arcRow['filename'] - ); - if (preg_match("#^http:#", $arcfile)) { - $arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); - } - $truefile = GetTruePath().$arcfile; - if (!file_exists($truefile)) { - MakeArt($aid, TRUE); - } - echo ""; - exit(); -} -/*-------------------------- -//异步上传缩略图 -function uploadLitpic(){ } ----------------------------*/ -else if ($dopost == "uploadLitpic") { - $upfile = AdminUpload('litpic', 'imagelit', 0, false); - if ($upfile == '-1') { - $msg = ""; - } else if ($upfile == '-2') { - $msg = ""; - } else if ($upfile == '0') { - $msg = ""; - } else { - if (!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut == 'N') { - $msg = ""; - } else { - $msg = ""; - } - } - echo $msg; - exit(); -} -/*-------------------------- -//推荐文档 -function commendArchives(){ } ----------------------------*/ -else if ($dopost == "commendArchives") { - CheckPurview('a_Commend,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) { - $qstr = $aid; - } - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp on tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype - WHERE arc.id in($arcids) "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $aid = $row['id']; - if ($row['issystem'] != -1) { - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); - $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); - } else { - $maintable = trim($row['addtable']); - $arr = $dsql->GetOne("SELECT flag From `{$maintable}` where aid='$aid' "); - $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); - } - } - ShowMsg("成功把所选的文档设为推荐", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//生成HTML -function makeArchives(); ----------------------------*/ -else if ($dopost == "makeArchives") { - CheckPurview('sys_MakeHtml,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg('参数无效', $ENV_GOBACK_URL); - exit(); - } - require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); - $qstrs = explode('`', $qstr); - $i = 0; - foreach ($qstrs as $aid) { - $i++; - $pageurl = MakeArt($aid, false); - } - ShowMsg("成功更新指定 $i 个文件", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//审核文档 -function checkArchives() { } ----------------------------*/ -else if ($dopost == "checkArchives") { - CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); - require_once(DEDEADMIN."/inc/inc_archives_functions.php"); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype - WHERE arc.id in($arcids) "; - $dsql->SetQuery($query); - $dsql->Execute('ckall'); - while ($row = $dsql->GetArray('ckall')) { - $aid = $row['id']; - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' "); - if ($row['issystem'] == -1) { - $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET arcrank='0' WHERE aid='$aid' "); - } else { - $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' "); - } - $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); - $pageurl = MakeArt($aid, false); - } - ShowMsg("成功审核指定的文档", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//删除文档 -function delArchives(){ } ----------------------------*/ -else if ($dopost == "delArchives") { - CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC."/oxwindow.class.php"); - if (empty($fmdo)) $fmdo = ''; - - if ($fmdo == 'yes') { - if (!empty($aid) && empty($qstr)) { - $qstr = $aid; - } - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - $qstrs = explode("`", $qstr); - $okaids = array(); - foreach ($qstrs as $aid) { - if (!isset($okaids[$aid])) { - DelArc($aid); - } else { - $okaids[$aid] = 1; - } - } - ShowMsg("成功删除指定的文档", $ENV_GOBACK_URL); - exit(); - } else { - $wintitle = "文档管理-删除文档"; - $wecome_info = "文档管理::删除文档"; - $win = new OxWindow(); - $win->Init("archives_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("qstr", $qstr); - $win->AddHidden("aid", $aid); - $win->AddTitle("您确实要删除 $qstr 和 $aid 这些文档?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - } -} -/*----------------------------- -function moveArchives(){ } -------------------------------*/ -else if ($dopost == 'moveArchives') { - CheckPurview('sys_ArcBatch'); - if (empty($totype)) { - require_once(DEDEINC.'/typelink.class.php'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - AjaxHead(); - $channelid = empty($channelid) ? 0 : $channelid; - $tl = new TypeLink($aid); - $typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid); - $typeOptions = ""; - //输出AJAX可移动窗体 - $divname = 'moveArchives'; - echo "
"; - echo "
移动文档
"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - ?> - - - - - - - - - - - -
 目标栏目:
 文档ID: - -
移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。 -
- - -
-
- GetOne("SELECT tp.channeltype,tp.ispart,tp.channeltype,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype WHERE tp.id='$totype' "); - $idtype = "id"; - if (!is_array($typeInfos)) { - ShowMsg('参数错误', '-1'); - exit(); - } - if ($typeInfos['ispart'] != 0) { - ShowMsg('文档保存的栏目必须为最终列表栏目', '-1'); - exit(); - } - if (empty($typeInfos['addtable'])) { - $typeInfos['maintable'] = '#@__archives'; - } - //增加单表模型判断 - if ($typeInfos['issystem'] == -1) { - $typeInfos['maintable'] = $typeInfos['addtable']; - $idtype = "aid"; - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $arc = ''; - $j = 0; - $okids = array(); - $dsql->SetQuery("SELECT {$idtype},typeid FROM `{$typeInfos['maintable']}` WHERE {$idtype} in($arcids) AND channel='{$typeInfos['channeltype']}' "); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - if ($row['typeid'] != $totype) { - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); - $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['maintable']}` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); - $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['addtable']}` SET typeid='$totype' WHERE aid='{$row[$idtype]}' "); - $okids[] = $row[$idtype]; - $j++; - } - } - //更新HTML - foreach ($okids as $aid) { - $arc = new Archives($aid); - $arc->MakeHtml(); - } - ShowMsg("成功移动 $j 个文档", $ENV_GOBACK_URL); - exit(); - } -} -/*----------------------------- -//还原文档 -function RbReturnArchives(){ } -------------------------------*/ -else if ($dopost == 'return') { - CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC."/oxwindow.class.php"); - - if (!empty($aid) && empty($qstr)) $qstr = $aid; - - if ($qstr == '') { - ShowMsg("参数无效", "recycling.php"); - exit(); - } - $qstrs = explode("`", $qstr); - foreach ($qstrs as $aid) { - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); - } - ShowMsg("成功还原指定的文档", "recycling.php"); - exit(); -} -/*----------------------------- -//清空文档 -function RbClearArchives(){ } -------------------------------*/ -else if ($dopost == 'clear') { - CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC."/oxwindow.class.php"); - if (empty($fmdo)) $fmdo = ''; - $recycle = empty($recycle) ? "" : $recycle; - - if ($fmdo == 'yes') { - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", "recycling.php"); - exit(); - } - $qstrs = explode(",", $qstr); - $okaids = array(); - foreach ($qstrs as $qstr) { - if (!isset($okaids[$qstr])) { - DelArc($qstr, "OK", FALSE, $recycle); - $okaids[$qstr] = $qstr; - } else { - $okaids[$qstr] = 1; - } - } - ShowMsg("成功删除指定的文档", "recycling.php"); - exit(); - } else { - $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE `arcrank` = '-2'"); - $dsql->Execute(); - $qstr = ''; - while ($row = $dsql->GetArray()) { - $qstr .= $row['id'].","; - $aid = $row['id']; - } - $num = $dsql->GetTotalRow(); - if (empty($num)) { - ShowMsg("对不起,未发现相关文档", "recycling.php"); - exit(); - } - $wintitle = "文档管理-清空所有文档"; - $wecome_info = "文档回收站::清空所有文档"; - $win = new OxWindow(); - $win->Init("archives_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("qstr", $qstr); - $win->AddHidden("aid", $aid); - $win->AddHidden("recycle", $recycle); - $win->AddTitle("本次操作将清空回收站所有共 $num 篇文档
您确实要永久删除 $qstr 这些文档?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - } -} -/*----------------------------- -//清除文档 -function RbDelArchives(){ } -------------------------------*/ -else if ($dopost == 'del') { - CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC."/oxwindow.class.php"); - if (empty($fmdo)) $fmdo = ''; - $recycle = empty($recycle) ? "" : $recycle; - if ($fmdo == 'yes') { - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", "recycling.php"); - exit(); - } - $qstrs = explode("`", $qstr); - $okaids = array(); - foreach ($qstrs as $aid) { - if (!isset($okaids[$aid])) { - DelArc($aid, "OK", "", $recycle); - } else { - $okaids[$aid] = 1; - } - } - ShowMsg("成功删除指定的文档", "recycling.php"); - exit(); - } else { - $wintitle = "文档管理-删除文档"; - $wecome_info = "文档管理::删除文档"; - $win = new OxWindow(); - $win->Init("archives_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("qstr", $qstr); - $win->AddHidden("aid", $aid); - $win->AddHidden("recycle", $recycle); - $win->AddTitle("您确实要永久删除 $qstr 和 $aid 这些文档?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - } -} -/*----------------------------- -//快速编辑 -function quickEdit(){ } -------------------------------*/ -else if ($dopost == 'quickEdit') { - require_once(DEDEADMIN."/inc/inc_catalog_options.php"); - AjaxHead(); - $query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* - FROM `#@__archives` arc - LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel - LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; - $arcRow = $dsql->GetOne($query); - $divname = 'quickEdit'; - echo "
"; - echo "
快速属性编辑
"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 所属栏目: - getUserChannel(), $arcRow['channel']); - echo ""; - ?> -
 属性: - '> - SetQuery("SELECT * FROM `#@__arcatt` ORDER BY `sortid` ASC"); - $dsql->Execute(); - while ($trow = $dsql->GetObject()) { - if ($trow->att == 'j' || $trow->att == 'p') continue; - if (preg_match("#".$trow->att."#", $arcRow['flag'])) - echo " "; - else - echo " "; - } - ?> -
 标题:
 简略标题:
 阅读权限: - - 需要金币:" style="width:100px"> -
 关键字:
- - -
-
-getUserID()); - } - } - $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); - $shorttitle = cn_substrR($shorttitle, 36); - $keywords = trim(cn_substrR($keywords, 60)); - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - //属性处理 - $flag = isset($flags) ? join(',', $flags) : ''; - if (!empty($flag)) { - if (preg_match("#p#", $oldflag)) $flag .= ',p'; - if (preg_match("#j#", $oldflag)) $flag .= ',j'; - } - $query = "UPDATE `#@__archives` SET - typeid = '$typeid', - flag = '$flag', - arcrank = '$arcrank', - money = '$money', - title = '$title', - shorttitle = '$shorttitle', - keywords = '$keywords', - dutyadmin = '$adminid' - WHERE id = '$aid'; "; - //更新主表 - $dsql->ExecuteNoneQuery($query); - //更新微表 - $dsql->ExecuteNoneQuery(" UPDATE `#@__arctiny` SET typeid='$typeid',arcrank='$arcrank' WHERE id='$aid' "); - //更新附加表 - if ($typeid != $oldtypeid) { - $addtable = trim($addtable); - if (empty($addtable)) $addtable = '#@__addonarticle'; - else $addtable = preg_replace("#[^a-z0-9__#@-]#i", "", $addtable); - $dsql->ExecuteNoneQuery(" UPDATE `$addtable` SET typeid='$typeid' WHERE aid='$aid' "); - } - //更新HTML - $artUrl = MakeArt($aid, TRUE, TRUE); - $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '-1'; - ShowMsg('成功更新一篇文档的基本信息', $backurl); - exit(); -} -/*-------------------------- -分析并自动获取文档关键词 -function makekw(){ } ---------------------------*/ -else if ($dopost == "makekw") { - CheckPurview('a_Commend,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.*, addt.* From `#@__archives` arc LEFT JOIN `#@__addonarticle` addt ON addt.aid=arc.id WHERE arc.id in($arcids) AND arc.channel=1 "; - $dsql->SetQuery($query); - $dsql->Execute(); - if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { - $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); - $client->appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - while ($row = $dsql->GetArray()) { - //跳过已经有关键字的内容 - if (trim($row['keywords']) != '') continue; - $aid = $row['id']; - $keywords = ''; - $title = $row['title']; - $description = $row['description']; - $body = cn_substr($row['body'], 5000); - $data = $client->Spliteword($title.Html2Text($body)); - $keywords = $data->data; - $description = str_replace(' ', ' ', trim($description)); - $description = str_replace('[', ' ', $description); - $description = str_replace(']', ' ', $description); - $description = preg_replace("#[ \t]{1,}#is", ' ', $description); - $description = str_replace('关键字', '', $description); - $description = str_replace('关键词', '', $description); - $description = addslashes($description); - $dsql->ExecuteNoneQuery(" UPDATE `#@__archives` SET `keywords`='$keywords',`description`='$description' WHERE id='{$aid}' "); - } - $client->Close(); - } else { - include_once(DEDEINC.'/splitword.class.php'); - $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); - while ($row = $dsql->GetArray()) { - //跳过已经有关键字的内容 - if (trim($row['keywords']) != '') continue; - $aid = $row['id']; - $keywords = ''; - $title = $row['title']; - $description = $row['description']; - $body = cn_substr($row['body'], 5000); - $sp->SetSource($title, $cfg_soft_lang, $cfg_soft_lang); - $sp->StartAnalysis(); - $titleindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); - $sp->SetSource(Html2Text($body), $cfg_soft_lang, $cfg_soft_lang); - $sp->StartAnalysis(); - $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); - if (is_array($allindexs) && is_array($titleindexs)) { - foreach ($titleindexs as $k => $v) { - if (strlen($keywords.$k) >= 60) { - break; - } else { - if (strlen($k) <= 2) continue; - $keywords .= $k.','; - } - } - foreach ($allindexs as $k => $v) { - if (strlen($keywords.$k) >= 60) { - break; - } else if (!in_array($k, $titleindexs)) { - if (strlen($k) <= 2) continue; - $keywords .= $k.','; - } - } - } - $description = str_replace(' ', ' ', trim($description)); - $description = str_replace('[', ' ', $description); - $description = str_replace(']', ' ', $description); - $description = preg_replace("#[ \t]{1,}#is", ' ', $description); - $description = str_replace('关键字', '', $description); - $description = str_replace('关键词', '', $description); - $description = addslashes($description); - $dsql->ExecuteNoneQuery(" UPDATE `#@__archives` SET `keywords`='$keywords',`description`='$description' WHERE id='{$aid}' "); - } - $sp = null; - } - ShowMsg("成功分析指定文档的关键词", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//批量增加属性 -function attsAdd(){ } ----------------------------*/ -else if ($dopost == 'attsAdd') { - CheckPurview('a_Commend,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - if (empty($flagname)) { - ShowMsg("必须指定要添加的属性", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype - WHERE arc.id in($arcids) "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $aid = $row['id']; - if ($row['issystem'] != -1) { - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); - $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); - } else { - $maintable = trim($row['addtable']); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); - $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); - } - } - ShowMsg("成功对选中文档增加指定的属性", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//批量删除属性 -function attsDel(){ } ----------------------------*/ -else if ($dopost == 'attsDel') { - CheckPurview('a_Commend,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - if (empty($flagname)) { - ShowMsg("必须指定要删除的属性", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype - WHERE arc.id in($arcids) "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $aid = $row['id']; - if ($row['issystem'] != -1) { - $idname = 'id'; - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); - } else { - $idname = 'aid'; - $maintable = trim($row['addtable']); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); - } - $flag = $arr['flag']; - if (trim($flag) == '' || !preg_match("#".$flagname."#", $flag)) { - continue; - } else { - $flags = explode(',', $flag); - $okflags = array(); - foreach ($flags as $f) { - if ($f != $flagname) $okflags[] = $f; - } - } - $flag = trim(join(',', $okflags)); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE {$idname}='{$aid}' "); - } - ShowMsg("成功对选中文档删除指定的属性", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//获得批量属性处理的AJAX窗体 -function attsDlg(){ } ----------------------------*/ -else if ($dopost == 'attsDlg') { - if (!empty($aid) && empty($qstr)) $qstr = $aid; - $dojobname = ($dojob == 'attsDel' ? '批量删除属性' : '批量增加属性'); - AjaxHead(); - //输出AJAX可移动窗体 - $divname = 'attsDlg'; - echo "
"; - echo "
{$dojobname}
"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; -?> - - - - - - - - - - - -
 属性: - '> - SetQuery("SELECT * FROM `#@__arcatt` ORDER BY `sortid` ASC"); - $dsql->Execute(); - while ($trow = $dsql->GetObject()) { - if ($trow->att == 'j' || $trow->att == 'p') continue; - echo " "; - } - ?> -
 文档ID:
- - -
-
-"; - echo "
栏目快速选择器
"; - echo "
"; - echo ""; - $tus = new TypeUnitSelector(); - ?> -
-
ListAllType($channelid); ?>
-
- - -
-
-GetOne($query); + $gurl = $row['editcon']; + if ($gurl == '') $gurl = 'article_edit.php'; + header("location:{$gurl}?aid=$aid"); + exit(); +} +/*-------------------------- +//浏览文档 +function viewArchives(){ } +---------------------------*/ +else if ($dopost == "viewArchives") { + $aid = preg_replace("#[^0-9]#", '', $aid); + //获取主表信息 + $query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon, + tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl + FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype + WHERE arc.id='$aid' "; + $trow = $dsql->GetOne($query); + $trow['maintable'] = (trim($trow['maintable']) == '' ? '#@__archives' : trim($trow['maintable'])); + if ($trow['issystem'] != -1) { + $arcQuery = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl + FROM `{$trow['maintable']}` arc LEFT JOIN `#@__arctype` tp on arc.typeid=tp.id + LEFT JOIN `#@__channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' "; + $arcRow = $dsql->GetOne($arcQuery); + PutCookie('DedeUserID', $arcRow['mid'], 1800); + PutCookie('DedeLoginTime', time(), 1800); + if ($arcRow['ismake'] == -1 || $arcRow['corank'] != 0 || $arcRow['arcrank'] != 0 || ($arcRow['typeid'] == 0 && $arcRow['channel'] != -1) || $arcRow['money'] > 0) { + echo ""; + exit(); + } + } else { + $arcRow['id'] = $aid; + $arcRow['typeid'] = $trow['typeid']; + $arcRow['senddate'] = $trow['senddate']; + $arcRow['title'] = ''; + $arcRow['ismake'] = 1; + $arcRow['arcrank'] = $trow['corank']; + $arcRow['namerule'] = $trow['namerule']; + $arcRow['typedir'] = $trow['typedir']; + $arcRow['money'] = 0; + $arcRow['filename'] = ''; + $arcRow['moresite'] = $trow['moresite']; + $arcRow['siteurl'] = $trow['siteurl']; + $arcRow['sitepath'] = $trow['sitepath']; + } + $arcurl = GetFileUrl( + $arcRow['id'], + $arcRow['typeid'], + $arcRow['senddate'], + $arcRow['title'], + $arcRow['ismake'], + $arcRow['arcrank'], + $arcRow['namerule'], + $arcRow['typedir'], + $arcRow['money'], + $arcRow['filename'], + $arcRow['moresite'], + $arcRow['siteurl'], + $arcRow['sitepath'] + ); + $arcfile = GetFileUrl( + $arcRow['id'], + $arcRow['typeid'], + $arcRow['senddate'], + $arcRow['title'], + $arcRow['ismake'], + $arcRow['arcrank'], + $arcRow['namerule'], + $arcRow['typedir'], + $arcRow['money'], + $arcRow['filename'] + ); + if (preg_match("#^http:#", $arcfile)) { + $arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); + } + $truefile = GetTruePath().$arcfile; + if (!file_exists($truefile)) { + MakeArt($aid, TRUE); + } + echo ""; + exit(); +} +/*-------------------------- +//异步上传缩略图 +function uploadLitpic(){ } +---------------------------*/ +else if ($dopost == "uploadLitpic") { + $upfile = AdminUpload('litpic', 'imagelit', 0, false); + if ($upfile == '-1') { + $msg = ""; + } else if ($upfile == '-2') { + $msg = ""; + } else if ($upfile == '0') { + $msg = ""; + } else { + if (!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut == 'N') { + $msg = ""; + } else { + $msg = ""; + } + } + echo $msg; + exit(); +} +/*-------------------------- +//推荐文档 +function commendArchives(){ } +---------------------------*/ +else if ($dopost == "commendArchives") { + CheckPurview('a_Commend,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) { + $qstr = $aid; + } + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp on tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype + WHERE arc.id in($arcids) "; + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $aid = $row['id']; + if ($row['issystem'] != -1) { + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); + $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); + } else { + $maintable = trim($row['addtable']); + $arr = $dsql->GetOne("SELECT flag From `{$maintable}` where aid='$aid' "); + $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); + } + } + ShowMsg("成功把所选的文档设为推荐", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//生成HTML +function makeArchives(); +---------------------------*/ +else if ($dopost == "makeArchives") { + CheckPurview('sys_MakeHtml,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg('参数无效', $ENV_GOBACK_URL); + exit(); + } + require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); + $qstrs = explode('`', $qstr); + $i = 0; + foreach ($qstrs as $aid) { + $i++; + $pageurl = MakeArt($aid, false); + } + ShowMsg("成功更新指定 $i 个文件", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//审核文档 +function checkArchives() { } +---------------------------*/ +else if ($dopost == "checkArchives") { + CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); + require_once(DEDEADMIN."/inc/inc_archives_functions.php"); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype + WHERE arc.id in($arcids) "; + $dsql->SetQuery($query); + $dsql->Execute('ckall'); + while ($row = $dsql->GetArray('ckall')) { + $aid = $row['id']; + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' "); + if ($row['issystem'] == -1) { + $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET arcrank='0' WHERE aid='$aid' "); + } else { + $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' "); + } + $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); + $pageurl = MakeArt($aid, false); + } + ShowMsg("成功审核指定的文档", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//删除文档 +function delArchives(){ } +---------------------------*/ +else if ($dopost == "delArchives") { + CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); + require_once(DEDEINC."/oxwindow.class.php"); + if (empty($fmdo)) $fmdo = ''; + + if ($fmdo == 'yes') { + if (!empty($aid) && empty($qstr)) { + $qstr = $aid; + } + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + $qstrs = explode("`", $qstr); + $okaids = array(); + foreach ($qstrs as $aid) { + if (!isset($okaids[$aid])) { + DelArc($aid); + } else { + $okaids[$aid] = 1; + } + } + ShowMsg("成功删除指定的文档", $ENV_GOBACK_URL); + exit(); + } else { + $wintitle = "文档管理-删除文档"; + $wecome_info = "文档管理::删除文档"; + $win = new OxWindow(); + $win->Init("archives_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("qstr", $qstr); + $win->AddHidden("aid", $aid); + $win->AddTitle("您确实要删除 $qstr 和 $aid 这些文档?"); + $winform = $win->GetWindow("ok"); + $win->Display(); + } +} +/*----------------------------- +function moveArchives(){ } +------------------------------*/ +else if ($dopost == 'moveArchives') { + CheckPurview('sys_ArcBatch'); + if (empty($totype)) { + require_once(DEDEINC.'/typelink.class.php'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + AjaxHead(); + $channelid = empty($channelid) ? 0 : $channelid; + $tl = new TypeLink($aid); + $typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid); + $typeOptions = ""; + //输出AJAX可移动窗体 + $divname = 'moveArchives'; + echo "
"; + echo "
移动文档
"; + echo "
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo ""; + ?> + + + + + + + + + + + +
 目标栏目:
 文档ID: + +
移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。 +
+ + +
+
+ GetOne("SELECT tp.channeltype,tp.ispart,tp.channeltype,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype WHERE tp.id='$totype' "); + $idtype = "id"; + if (!is_array($typeInfos)) { + ShowMsg('参数错误', '-1'); + exit(); + } + if ($typeInfos['ispart'] != 0) { + ShowMsg('文档保存的栏目必须为最终列表栏目', '-1'); + exit(); + } + if (empty($typeInfos['addtable'])) { + $typeInfos['maintable'] = '#@__archives'; + } + //增加单表模型判断 + if ($typeInfos['issystem'] == -1) { + $typeInfos['maintable'] = $typeInfos['addtable']; + $idtype = "aid"; + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $arc = ''; + $j = 0; + $okids = array(); + $dsql->SetQuery("SELECT {$idtype},typeid FROM `{$typeInfos['maintable']}` WHERE {$idtype} in($arcids) AND channel='{$typeInfos['channeltype']}' "); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + if ($row['typeid'] != $totype) { + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); + $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['maintable']}` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); + $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['addtable']}` SET typeid='$totype' WHERE aid='{$row[$idtype]}' "); + $okids[] = $row[$idtype]; + $j++; + } + } + //更新HTML + foreach ($okids as $aid) { + $arc = new Archives($aid); + $arc->MakeHtml(); + } + ShowMsg("成功移动 $j 个文档", $ENV_GOBACK_URL); + exit(); + } +} +/*----------------------------- +//还原文档 +function RbReturnArchives(){ } +------------------------------*/ +else if ($dopost == 'return') { + CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); + require_once(DEDEINC."/oxwindow.class.php"); + + if (!empty($aid) && empty($qstr)) $qstr = $aid; + + if ($qstr == '') { + ShowMsg("参数无效", "recycling.php"); + exit(); + } + $qstrs = explode("`", $qstr); + foreach ($qstrs as $aid) { + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); + } + ShowMsg("成功还原指定的文档", "recycling.php"); + exit(); +} +/*----------------------------- +//清空文档 +function RbClearArchives(){ } +------------------------------*/ +else if ($dopost == 'clear') { + CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); + require_once(DEDEINC."/oxwindow.class.php"); + if (empty($fmdo)) $fmdo = ''; + $recycle = empty($recycle) ? "" : $recycle; + + if ($fmdo == 'yes') { + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", "recycling.php"); + exit(); + } + $qstrs = explode(",", $qstr); + $okaids = array(); + foreach ($qstrs as $qstr) { + if (!isset($okaids[$qstr])) { + DelArc($qstr, "OK", FALSE, $recycle); + $okaids[$qstr] = $qstr; + } else { + $okaids[$qstr] = 1; + } + } + ShowMsg("成功删除指定的文档", "recycling.php"); + exit(); + } else { + $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE `arcrank` = '-2'"); + $dsql->Execute(); + $qstr = ''; + while ($row = $dsql->GetArray()) { + $qstr .= $row['id'].","; + $aid = $row['id']; + } + $num = $dsql->GetTotalRow(); + if (empty($num)) { + ShowMsg("对不起,未发现相关文档", "recycling.php"); + exit(); + } + $wintitle = "文档管理-清空所有文档"; + $wecome_info = "文档回收站::清空所有文档"; + $win = new OxWindow(); + $win->Init("archives_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("qstr", $qstr); + $win->AddHidden("aid", $aid); + $win->AddHidden("recycle", $recycle); + $win->AddTitle("本次操作将清空回收站所有共 $num 篇文档
您确实要永久删除 $qstr 这些文档?"); + $winform = $win->GetWindow("ok"); + $win->Display(); + } +} +/*----------------------------- +//清除文档 +function RbDelArchives(){ } +------------------------------*/ +else if ($dopost == 'del') { + CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); + require_once(DEDEINC."/oxwindow.class.php"); + if (empty($fmdo)) $fmdo = ''; + $recycle = empty($recycle) ? "" : $recycle; + if ($fmdo == 'yes') { + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", "recycling.php"); + exit(); + } + $qstrs = explode("`", $qstr); + $okaids = array(); + foreach ($qstrs as $aid) { + if (!isset($okaids[$aid])) { + DelArc($aid, "OK", "", $recycle); + } else { + $okaids[$aid] = 1; + } + } + ShowMsg("成功删除指定的文档", "recycling.php"); + exit(); + } else { + $wintitle = "文档管理-删除文档"; + $wecome_info = "文档管理::删除文档"; + $win = new OxWindow(); + $win->Init("archives_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("qstr", $qstr); + $win->AddHidden("aid", $aid); + $win->AddHidden("recycle", $recycle); + $win->AddTitle("您确实要永久删除 $qstr 和 $aid 这些文档?"); + $winform = $win->GetWindow("ok"); + $win->Display(); + } +} +/*----------------------------- +//快速编辑 +function quickEdit(){ } +------------------------------*/ +else if ($dopost == 'quickEdit') { + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); + AjaxHead(); + $query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* + FROM `#@__archives` arc + LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel + LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; + $arcRow = $dsql->GetOne($query); + $divname = 'quickEdit'; + echo "
"; + echo "
快速属性编辑
"; + echo "
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo ""; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 所属栏目: + getUserChannel(), $arcRow['channel']); + echo ""; + ?> +
 属性: + '> + SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); + $dsql->Execute(); + while ($trow = $dsql->GetObject()) { + if ($trow->att == 'j' || $trow->att == 'p') continue; + if (preg_match("#".$trow->att."#", $arcRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
 标题:
 简略标题:
 阅读权限: + + 需要金币:" style="width:100px"> +
 关键字:
+ + +
+
+getUserID()); + } + } + $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); + $shorttitle = cn_substrR($shorttitle, 36); + $keywords = trim(cn_substrR($keywords, 60)); + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + //属性处理 + $flag = isset($flags) ? join(',', $flags) : ''; + if (!empty($flag)) { + if (preg_match("#p#", $oldflag)) $flag .= ',p'; + if (preg_match("#j#", $oldflag)) $flag .= ',j'; + } + $query = "UPDATE `#@__archives` SET + typeid = '$typeid', + flag = '$flag', + arcrank = '$arcrank', + money = '$money', + title = '$title', + shorttitle = '$shorttitle', + keywords = '$keywords', + dutyadmin = '$adminid' + WHERE id = '$aid'; "; + //更新主表 + $dsql->ExecuteNoneQuery($query); + //更新微表 + $dsql->ExecuteNoneQuery(" UPDATE `#@__arctiny` SET typeid='$typeid',arcrank='$arcrank' WHERE id='$aid' "); + //更新附加表 + if ($typeid != $oldtypeid) { + $addtable = trim($addtable); + if (empty($addtable)) $addtable = '#@__addonarticle'; + else $addtable = preg_replace("#[^a-z0-9__#@-]#i", "", $addtable); + $dsql->ExecuteNoneQuery(" UPDATE `$addtable` SET typeid='$typeid' WHERE aid='$aid' "); + } + //更新HTML + $artUrl = MakeArt($aid, TRUE, TRUE); + $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '-1'; + ShowMsg('成功更新一篇文档的基本信息', $backurl); + exit(); +} +/*-------------------------- +分析并自动获取文档关键词 +function makekw(){ } +--------------------------*/ +else if ($dopost == "makekw") { + CheckPurview('a_Commend,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.*, addt.* From `#@__archives` arc LEFT JOIN `#@__addonarticle` addt ON addt.aid=arc.id WHERE arc.id in($arcids) AND arc.channel=1 "; + $dsql->SetQuery($query); + $dsql->Execute(); + if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { + $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); + $client->appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + while ($row = $dsql->GetArray()) { + //跳过已经有关键字的内容 + if (trim($row['keywords']) != '') continue; + $aid = $row['id']; + $keywords = ''; + $title = $row['title']; + $description = $row['description']; + $body = cn_substr($row['body'], 5000); + $data = $client->Spliteword($title.Html2Text($body)); + $keywords = $data->data; + $description = str_replace(' ', ' ', trim($description)); + $description = str_replace('[', ' ', $description); + $description = str_replace(']', ' ', $description); + $description = preg_replace("#[ \t]{1,}#is", ' ', $description); + $description = str_replace('关键字', '', $description); + $description = str_replace('关键词', '', $description); + $description = addslashes($description); + $dsql->ExecuteNoneQuery(" UPDATE `#@__archives` SET `keywords`='$keywords',`description`='$description' WHERE id='{$aid}' "); + } + $client->Close(); + } else { + include_once(DEDEINC.'/splitword.class.php'); + $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); + while ($row = $dsql->GetArray()) { + //跳过已经有关键字的内容 + if (trim($row['keywords']) != '') continue; + $aid = $row['id']; + $keywords = ''; + $title = $row['title']; + $description = $row['description']; + $body = cn_substr($row['body'], 5000); + $sp->SetSource($title, $cfg_soft_lang, $cfg_soft_lang); + $sp->StartAnalysis(); + $titleindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); + $sp->SetSource(Html2Text($body), $cfg_soft_lang, $cfg_soft_lang); + $sp->StartAnalysis(); + $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); + if (is_array($allindexs) && is_array($titleindexs)) { + foreach ($titleindexs as $k => $v) { + if (strlen($keywords.$k) >= 60) { + break; + } else { + if (strlen($k) <= 2) continue; + $keywords .= $k.','; + } + } + foreach ($allindexs as $k => $v) { + if (strlen($keywords.$k) >= 60) { + break; + } else if (!in_array($k, $titleindexs)) { + if (strlen($k) <= 2) continue; + $keywords .= $k.','; + } + } + } + $description = str_replace(' ', ' ', trim($description)); + $description = str_replace('[', ' ', $description); + $description = str_replace(']', ' ', $description); + $description = preg_replace("#[ \t]{1,}#is", ' ', $description); + $description = str_replace('关键字', '', $description); + $description = str_replace('关键词', '', $description); + $description = addslashes($description); + $dsql->ExecuteNoneQuery(" UPDATE `#@__archives` SET `keywords`='$keywords',`description`='$description' WHERE id='{$aid}' "); + } + $sp = null; + } + ShowMsg("成功分析指定文档的关键词", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//批量增加属性 +function attsAdd(){ } +---------------------------*/ +else if ($dopost == 'attsAdd') { + CheckPurview('a_Commend,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + if (empty($flagname)) { + ShowMsg("必须指定要添加的属性", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype + WHERE arc.id in($arcids) "; + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $aid = $row['id']; + if ($row['issystem'] != -1) { + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); + $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); + } else { + $maintable = trim($row['addtable']); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); + $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); + } + } + ShowMsg("成功对选中文档增加指定的属性", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//批量删除属性 +function attsDel(){ } +---------------------------*/ +else if ($dopost == 'attsDel') { + CheckPurview('a_Commend,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + if (empty($flagname)) { + ShowMsg("必须指定要删除的属性", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype + WHERE arc.id in($arcids) "; + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $aid = $row['id']; + if ($row['issystem'] != -1) { + $idname = 'id'; + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); + } else { + $idname = 'aid'; + $maintable = trim($row['addtable']); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); + } + $flag = $arr['flag']; + if (trim($flag) == '' || !preg_match("#".$flagname."#", $flag)) { + continue; + } else { + $flags = explode(',', $flag); + $okflags = array(); + foreach ($flags as $f) { + if ($f != $flagname) $okflags[] = $f; + } + } + $flag = trim(join(',', $okflags)); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE {$idname}='{$aid}' "); + } + ShowMsg("成功对选中文档删除指定的属性", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//获得批量属性处理的AJAX窗体 +function attsDlg(){ } +---------------------------*/ +else if ($dopost == 'attsDlg') { + if (!empty($aid) && empty($qstr)) $qstr = $aid; + $dojobname = ($dojob == 'attsDel' ? '批量删除属性' : '批量增加属性'); + AjaxHead(); + //输出AJAX可移动窗体 + $divname = 'attsDlg'; + echo "
"; + echo "
{$dojobname}
"; + echo "
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo ""; +?> + + + + + + + + + + + +
 属性: + '> + SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); + $dsql->Execute(); + while ($trow = $dsql->GetObject()) { + if ($trow->att == 'j' || $trow->att == 'p') continue; + echo " "; + } + ?> +
 文档ID:
+ + +
+
+"; + echo "
栏目快速选择器
"; + echo "
"; + echo ""; + $tus = new TypeUnitSelector(); + ?> +
+
ListAllType($channelid); ?>
+
+ + +
+
+ \ No newline at end of file diff --git a/src/dede/archives_edit.php b/src/admin/archives_edit.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/archives_edit.php rename to src/admin/archives_edit.php index ce31c9b8..bde543e7 --- a/src/dede/archives_edit.php +++ b/src/admin/archives_edit.php @@ -1,210 +1,210 @@ -GetOne($arcQuery); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错!", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错!", "javascript:;"); - exit(); - } - $addtable = $cInfos['addtable']; - $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); - $channelid = $arcRow['channel']; - $tags = GetTags($aid); - include DedeInclude("templets/archives_edit.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($litpic_b64)) $litpic_b64 = ''; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (!isset($writer)) $writer = ''; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = trim(cn_substrR($keywords, 60)); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) $ddisremote = 0; - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //更新数据库的SQL语句 - $inQuery = "UPDATE `#@__archives` SET - typeid='$typeid', - typeid2='$typeid2', - sortrank='$sortrank', - flag='$flag', - notpost='$notpost', - click='$click', - ismake='$ismake', - arcrank='$arcrank', - money='$money', - title='$title', - color='$color', - writer='$writer', - source='$source', - litpic='$litpic', - pubdate='$pubdate', - description='$description', - keywords='$keywords', - shorttitle='$shorttitle', - filename='$filename', - dutyadmin='$adminid', - weight='$weight' - WHERE id='$id'; "; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库archives表时出错,请检查", "-1"); - exit(); - } - $cts = $dsql->GetOne("SELECT addtable From `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $useip = GetIP(); - $iquery = "UPDATE `$addtable` SET typeid='$typeid'{$inadd_f},redirecturl='$redirecturl',userip='$useip' WHERE aid='$id' "; - if (!$dsql->ExecuteNoneQuery($iquery)) { - ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $artUrl = MakeArt($id, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:发布新文档  查看更改  查看文档  管理文档  $backurl"; - $wintitle = "成功更改文档"; - $wecome_info = "文档管理::更改文档"; - $win = new OxWindow(); - $win->AddTitle("成功更改文档:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); +GetOne($arcQuery); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错!", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错!", "javascript:;"); + exit(); + } + $addtable = $cInfos['addtable']; + $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); + $channelid = $arcRow['channel']; + $tags = GetTags($aid); + include DedeInclude("templets/archives_edit.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($litpic_b64)) $litpic_b64 = ''; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (!isset($writer)) $writer = ''; + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = trim(cn_substrR($keywords, 60)); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) $ddisremote = 0; + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //更新数据库的SQL语句 + $inQuery = "UPDATE `#@__archives` SET + typeid='$typeid', + typeid2='$typeid2', + sortrank='$sortrank', + flag='$flag', + notpost='$notpost', + click='$click', + ismake='$ismake', + arcrank='$arcrank', + money='$money', + title='$title', + color='$color', + writer='$writer', + source='$source', + litpic='$litpic', + pubdate='$pubdate', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename', + dutyadmin='$adminid', + weight='$weight' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库archives表时出错,请检查", "-1"); + exit(); + } + $cts = $dsql->GetOne("SELECT addtable From `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $useip = GetIP(); + $iquery = "UPDATE `$addtable` SET typeid='$typeid'{$inadd_f},redirecturl='$redirecturl',userip='$useip' WHERE aid='$id' "; + if (!$dsql->ExecuteNoneQuery($iquery)) { + ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $artUrl = MakeArt($id, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:发布新文档  查看修改  查看文档  管理文档  $backurl"; + $wintitle = "成功修改文档"; + $wecome_info = "文档管理::修改文档"; + $win = new OxWindow(); + $win->AddTitle("成功修改文档:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/archives_sg_add.php b/src/admin/archives_sg_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/archives_sg_add.php rename to src/admin/archives_sg_add.php index 36a150f0..faaf7e1b --- a/src/dede/archives_sg_add.php +++ b/src/admin/archives_sg_add.php @@ -1,152 +1,152 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) { - ShowMsg("无法识别模型信息,因此无法操作", "-1"); - exit(); - } - } - //获得频道模型信息 - $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - $channelid = $cInfos['id']; - include DedeInclude("templets/archives_sg_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - if (empty($flags)) $flag = ''; - else $flag = join(',', $flags); - $senddate = time(); - if (empty($litpic_b64)) $litpic_b64 = ''; - $title = cn_substrR($title, $cfg_title_maxlen); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - $userip = GetIP(); - if (empty($ddisremote)) $ddisremote = 0; - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - // 加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $senddate, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - //保存到附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (!empty($addtable)) { - $query = "INSERT INTO `{$addtable}`(aid,typeid,channel,arcrank,mid,click,title,senddate,flag,litpic,userip{$inadd_f}) - VALUES('$arcID','$typeid','$channelid','$arcrank','$adminid','0','$title','$senddate','$flag','$litpic','$userip'{$inadd_v})"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - } - //生成HTML - $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //返回成功信息 - $msg = "请选择您的后续操作:继续发布文档  查看文档  更改文档  已发布文档管理  网站栏目管理"; - $wintitle = "成功发布文档"; - $wecome_info = "文档管理::发布文档"; - $win = new OxWindow(); - $win->AddTitle("成功发布文档:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) { + ShowMsg("无法识别模型信息,因此无法操作", "-1"); + exit(); + } + } + //获得频道模型信息 + $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + $channelid = $cInfos['id']; + include DedeInclude("templets/archives_sg_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + if (empty($flags)) $flag = ''; + else $flag = join(',', $flags); + $senddate = time(); + if (empty($litpic_b64)) $litpic_b64 = ''; + $title = cn_substrR($title, $cfg_title_maxlen); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + $userip = GetIP(); + if (empty($ddisremote)) $ddisremote = 0; + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $senddate, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + //保存到附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (!empty($addtable)) { + $query = "INSERT INTO `{$addtable}`(aid,typeid,channel,arcrank,mid,click,title,senddate,flag,litpic,userip{$inadd_f}) + VALUES('$arcID','$typeid','$channelid','$arcrank','$adminid','0','$title','$senddate','$flag','$litpic','$userip'{$inadd_v})"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + } + //生成HTML + $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //返回成功信息 + $msg = "请选择您的后续操作:继续发布文档  查看文档  修改文档  已发布文档管理  网站栏目管理"; + $wintitle = "成功发布文档"; + $wecome_info = "文档管理::发布文档"; + $win = new OxWindow(); + $win->AddTitle("成功发布文档:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/archives_sg_edit.php b/src/admin/archives_sg_edit.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/archives_sg_edit.php rename to src/admin/archives_sg_edit.php index 6631aa89..423599bd --- a/src/dede/archives_sg_edit.php +++ b/src/admin/archives_sg_edit.php @@ -1,139 +1,139 @@ -GetOne($arcQuery); - if (!is_array($cInfos)) { - ShowMsg("读频道模型信息出错", "-1"); - exit(); - } - $addtable = $cInfos['addtable']; - $addRow = $dsql->GetOne("SELECT arc.*,ar.membername as rankname FROM `$addtable` arc LEFT JOIN `#@__arcrank` ar on ar.rank=arc.arcrank WHERE arc.aid='$aid'"); - $channelid = $cInfos['channel']; - $tags = GetTags($aid); - include DedeInclude('templets/archives_sg_edit.htm'); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - if (empty($flags)) $flag = ''; - else $flag = join(',', $flags); - $title = cn_substrR($title, $cfg_title_maxlen); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (empty($litpic_b64)) $litpic_b64 = ''; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) $ddisremote = 0; - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - // 加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $iquery = "UPDATE `$addtable` SET typeid='$typeid',arcrank='$arcrank',title='$title',flag='$flag',litpic='$litpic'{$inadd_f} WHERE aid='$id' "; - if (!$dsql->ExecuteNoneQuery($iquery)) { - ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); - $artUrl = MakeArt($id, TRUE, TRUE, $isremote); - if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$id"; - ClearMyAddon($id, $title); - //返回成功信息 - $msg = "请选择您的后续操作:发布新文档  查看更改  查看文档  管理文档  网站栏目管理"; - $wintitle = "成功更改文档"; - $wecome_info = "文档管理::更改文档"; - $win = new OxWindow(); - $win->AddTitle("成功更改文档:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); -} +GetOne($arcQuery); + if (!is_array($cInfos)) { + ShowMsg("读频道模型信息出错", "-1"); + exit(); + } + $addtable = $cInfos['addtable']; + $addRow = $dsql->GetOne("SELECT arc.*,ar.membername as rankname FROM `$addtable` arc LEFT JOIN `#@__arcrank` ar on ar.rank=arc.arcrank WHERE arc.aid='$aid'"); + $channelid = $cInfos['channel']; + $tags = GetTags($aid); + include DedeInclude('templets/archives_sg_edit.htm'); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + if (empty($flags)) $flag = ''; + else $flag = join(',', $flags); + $title = cn_substrR($title, $cfg_title_maxlen); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (empty($litpic_b64)) $litpic_b64 = ''; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) $ddisremote = 0; + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $iquery = "UPDATE `$addtable` SET typeid='$typeid',arcrank='$arcrank',title='$title',flag='$flag',litpic='$litpic'{$inadd_f} WHERE aid='$id' "; + if (!$dsql->ExecuteNoneQuery($iquery)) { + ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); + $artUrl = MakeArt($id, TRUE, TRUE, $isremote); + if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$id"; + ClearMyAddon($id, $title); + //返回成功信息 + $msg = "请选择您的后续操作:发布新文档  查看修改  查看文档  管理文档  网站栏目管理"; + $wintitle = "成功修改文档"; + $wecome_info = "文档管理::修改文档"; + $win = new OxWindow(); + $win->AddTitle("成功修改文档:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); +} diff --git a/src/dede/article_add.php b/src/admin/article_add.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/article_add.php rename to src/admin/article_add.php index 9025ad26..4cc8de7a --- a/src/dede/article_add.php +++ b/src/admin/article_add.php @@ -1,235 +1,235 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) { - $channelid = 1; - } - } - //获得频道模型信息 - $cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' "); - //获取文章最大id以确定当前权重 - $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM `#@__archives`"); - - include DedeInclude("templets/article_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($typeid2)) $typeid2 = ''; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if (empty($typeid)) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = preg_replace("#\"#", '"', $title); - $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $userip = GetIP(); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - if (trim($title) == '') { - ShowMsg('标题不能为空', '-1'); - exit(); - } - //处理body字段自动摘要、自动提取缩略图等 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //自动分页 - if ($sptype == 'auto') { - $body = SpLongBody($body, $spsize * 1024, "#p#分页标题#e#"); - } - //分析处理附加表数据 - $inadd_f = $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') continue; - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) ${$vs[0]} = ''; - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //保存到主表 - $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) - VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename','$adminid','$weight');"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //保存到附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (empty($addtable)) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); - exit(); - } - $useip = GetIP(); - $templet = empty($templet) ? '' : $templet; - $query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,templet,userip,body{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$templet','$useip','$body'{$inadd_v})"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); - $dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //生成HTML - InsertTags($tags, $arcID); - $picTitle = false; - if (count($_SESSION['bigfile_info']) > 0) { - foreach ($_SESSION['bigfile_info'] as $k => $v) { - if (!empty($v)) { - $pictitle = ${'picinfook'.$k}; - $titleSet = ''; - if (!empty($pictitle)) { - $picTitle = TRUE; - $titleSet = ",title='{$pictitle}'"; - } - $dsql->ExecuteNoneQuery("UPDATE `#@__uploads` SET arcid='{$arcID}'{$titleSet} WHERE url LIKE '{$v}'; "); - } - } - } - $artUrl = MakeArt($arcID, true, true, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布文章  查看文章  更改文章  已发布文章管理  $backurl"; - $msg = "
{$msg}
".GetUpdateTest(); - $wintitle = "成功发布文章"; - $wecome_info = "文章管理::发布文章"; - $win = new OxWindow(); - $win->AddTitle("成功发布文章:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) { + $channelid = 1; + } + } + //获得频道模型信息 + $cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' "); + //获取文章最大id以确定当前权重 + $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM `#@__archives`"); + + include DedeInclude("templets/article_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($typeid2)) $typeid2 = ''; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if (empty($typeid)) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = preg_replace("#\"#", '"', $title); + $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $userip = GetIP(); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + if (trim($title) == '') { + ShowMsg('标题不能为空', '-1'); + exit(); + } + //处理body字段自动摘要、自动提取缩略图等 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //自动分页 + if ($sptype == 'auto') { + $body = SpLongBody($body, $spsize * 1024, "#p#分页标题#e#"); + } + //分析处理附加表数据 + $inadd_f = $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') continue; + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) ${$vs[0]} = ''; + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //保存到主表 + $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) + VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename','$adminid','$weight');"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //保存到附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (empty($addtable)) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); + exit(); + } + $useip = GetIP(); + $templet = empty($templet) ? '' : $templet; + $query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,templet,userip,body{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$templet','$useip','$body'{$inadd_v})"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); + $dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //生成HTML + InsertTags($tags, $arcID); + $picTitle = false; + if (count($_SESSION['bigfile_info']) > 0) { + foreach ($_SESSION['bigfile_info'] as $k => $v) { + if (!empty($v)) { + $pictitle = ${'picinfook'.$k}; + $titleSet = ''; + if (!empty($pictitle)) { + $picTitle = TRUE; + $titleSet = ",title='{$pictitle}'"; + } + $dsql->ExecuteNoneQuery("UPDATE `#@__uploads` SET arcid='{$arcID}'{$titleSet} WHERE url LIKE '{$v}'; "); + } + } + } + $artUrl = MakeArt($arcID, true, true, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布文章  查看文章  修改文章  已发布文章管理  $backurl"; + $msg = "
{$msg}
".GetUpdateTest(); + $wintitle = "成功发布文章"; + $wecome_info = "文章管理::发布文章"; + $win = new OxWindow(); + $win->AddTitle("成功发布文章:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/article_allowurl_edit.php b/src/admin/article_allowurl_edit.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/article_allowurl_edit.php rename to src/admin/article_allowurl_edit.php index 04aa146e..46648fcc --- a/src/dede/article_allowurl_edit.php +++ b/src/admin/article_allowurl_edit.php @@ -1,43 +1,42 @@ -alert('Save OK!');"; -} -//读出 -if (empty($allurls) && filesize($m_file) > 0) { - $fp = fopen($m_file, 'r'); - $allurls = fread($fp, filesize($m_file)); - fclose($fp); -} -$wintitle = ""; -$wecome_info = "允许的超链接"; -$win = new OxWindow(); -$win->Init('article_allowurl_edit.php', 'js/blank.js', 'POST'); -$win->AddHidden('dopost', 'save'); -$win->AddTitle("每行保存一个超链接:"); -$win->AddMsgItem(""); -$winform = $win->GetWindow('ok'); -$win->Display(); +alert('Save OK!');"; +} +//读出 +if (empty($allurls) && filesize($m_file) > 0) { + $fp = fopen($m_file, 'r'); + $allurls = fread($fp, filesize($m_file)); + fclose($fp); +} +$wintitle = ""; +$wecome_info = "允许的超链接"; +$win = new OxWindow(); +$win->Init('article_allowurl_edit.php', 'js/blank.js', 'POST'); +$win->AddHidden('dopost', 'save'); +$win->AddTitle("每行保存一个超链接:"); +$win->AddMsgItem(""); +$winform = $win->GetWindow('ok'); +$win->Display(); diff --git a/src/dede/article_coonepage_rule.php b/src/admin/article_coonepage_rule.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/article_coonepage_rule.php rename to src/admin/article_coonepage_rule.php index 05bb6caa..f525d3e7 --- a/src/dede/article_coonepage_rule.php +++ b/src/admin/article_coonepage_rule.php @@ -1,120 +1,119 @@ -GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '$url' "); - if (is_array($row)) { - echo "系统已经存在这个网址的条目"; - } else { - $query = " INSERT INTO `#@__co_onepage`(`url`,`title`,`issource`,`lang`,`rule`) Values('$url','$title','$issource','$lang','$rule'); "; - $dsql->ExecuteNonequery($query); - echo $dsql->GetError(); - } -} -/*------ -function _DelNote(){ } --------*/ else if ($action == 'del') { - if (!preg_match("#,#", $ids)) { - $query = "DELETE FROM `#@__co_onepage` WHERE id='$ids' "; - } else { - $query = "DELETE FROM `#@__co_onepage` WHERE id IN($ids) "; - } - $dsql->ExecuteNonequery($query); -} - -/*------ -function _EditNote(){ } --------*/ else if ($action == 'editsave') { - $query = "UPDATE `#@__co_onepage` SET `url`='$url',`title`='$title',`issource`='$issource',`lang`='$lang',`rule`='$rule' WHERE id='$id' "; - $dsql->ExecuteNonequery($query); - echo $dsql->GetError(); -} -/*------ -function _EditNoteLoad(){ } --------*/ else if ($action == 'editload') { - $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE id='$id' "); - AjaxHead(); -?> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
网站名称:
原内容编码: - - -
用作文章来源: - - -
网站网址: - -
  - 使用不带http及任何附加目录的网址
- 如:news.dedebiz.com -
采集规则:仅针对文章内容,格式:前面HTML{@body}后面HMTL
 
  -
-
-SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm"); -$dlist->SetSource($sql); -$dlist->Display(); +GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '$url' "); + if (is_array($row)) { + echo "系统已经存在这个网址的条目"; + } else { + $query = " INSERT INTO `#@__co_onepage`(`url`,`title`,`issource`,`lang`,`rule`) Values('$url','$title','$issource','$lang','$rule'); "; + $dsql->ExecuteNonequery($query); + echo $dsql->GetError(); + } +} +/*------ +function _DelNote(){ } +-------*/ else if ($action == 'del') { + if (!preg_match("#,#", $ids)) { + $query = "DELETE FROM `#@__co_onepage` WHERE id='$ids' "; + } else { + $query = "DELETE FROM `#@__co_onepage` WHERE id IN($ids) "; + } + $dsql->ExecuteNonequery($query); +} + +/*------ +function _EditNote(){ } +-------*/ else if ($action == 'editsave') { + $query = "UPDATE `#@__co_onepage` SET `url`='$url',`title`='$title',`issource`='$issource',`lang`='$lang',`rule`='$rule' WHERE id='$id' "; + $dsql->ExecuteNonequery($query); + echo $dsql->GetError(); +} +/*------ +function _EditNoteLoad(){ } +-------*/ else if ($action == 'editload') { + $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE id='$id' "); + AjaxHead(); +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
网站名称:
原内容编码: + + +
用作文章来源: + + +
网站网址: + +
  + 使用不带http及任何附加目录的网址
+ 如:news.dedebiz.com +
采集规则:仅针对文章内容,格式:前面HTML{@body}后面HMTL
 
  +
+
+SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm"); +$dlist->SetSource($sql); +$dlist->Display(); diff --git a/src/dede/article_description_main.php b/src/admin/article_description_main.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/article_description_main.php rename to src/admin/article_description_main.php index 256944cf..003bdc3b --- a/src/dede/article_description_main.php +++ b/src/admin/article_description_main.php @@ -1,167 +1,166 @@ - 250) $dsize = 250; - $tjnum = 0; - - //获取自动摘要 - if ($dojob == 'des') { - if (empty($totalnum)) { - $addquery = ""; - if ($sid != 0) { - $addquery .= " AND id>='$sid' "; - } - if ($eid != 0) { - $addquery .= " AND id<='$eid' "; - } - $tjQuery = "SELECT COUNT(*) AS dd FROM #@__archives WHERE channel='{$channel}' $addquery"; - $row = $dsql->GetOne($tjQuery); - $totalnum = $row['dd']; - } - if ($totalnum > 0) { - $addquery = ""; - if ($sid != 0) { - $addquery .= " AND #@__archives.id>='$sid' "; - } - if ($eid != 0) { - $addquery .= " AND #@__archives.id<='$eid' "; - } - $fquery = "SELECT #@__archives.id,#@__archives.title,#@__archives.description,{$table}.{$field} - FROM #@__archives LEFT JOIN {$table} ON {$table}.aid=#@__archives.id - WHERE #@__archives.channel='{$channel}' $addquery LIMIT $startdd,$pagesize ; "; - $dsql->SetQuery($fquery); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $body = $row[$field]; - $description = $row['description']; - if (strlen($description) > 10 || $description == '-') { - continue; - } - $bodytext = preg_replace("/#p#|#e#|副标题|分页标题/isU", "", Html2Text($body)); - if (strlen($bodytext) < $msize) { - continue; - } - $des = trim(addslashes(cn_substr($bodytext, $dsize))); - if (strlen($des) < 3) { - $des = "-"; - } - $dsql->ExecuteNoneQuery("UPDATE #@__archives SET description='{$des}' WHERE id='{$row['id']}';"); - } - - //返回进度信息 - $startdd = $startdd + $pagesize; - if ($totalnum > $startdd) { - $tjlen = ceil(($startdd / $totalnum) * 100); - } else { - $tjlen = 100; - ShowMsg('完成所有任务', 'javascript:;'); - exit(); - } - $dvlen = $tjlen * 2; - $tjsta = "
"; - $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务..."; - $nurl = "article_description_main.php?totalnum=$totalnum&startdd={$startdd}&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; - ShowMsg($tjsta, $nurl, 0, 500); - exit(); - } else { - ShowMsg('完成所有任务', 'javascript:;'); - exit(); - } - } //获取自动摘要代码结束 - - //更新自动分页 - if ($dojob == 'page') { - require_once(DEDEADMIN."/inc/inc_archives_functions.php"); - - $addquery = ""; - if ($sid != 0) { - $addquery .= " and aid>='$sid' "; - } - if ($eid != 0) { - $addquery .= " and aid<='$eid' "; - } - - //统计记录总数 - if ($totalnum == 0) { - $sql = "SELECT COUNT(*) AS dd FROM $table WHERE 1 $addquery"; - $row = $dsql->GetOne($sql); - $totalnum = $row['dd']; - } - - //获取记录,并分析 - if ($totalnum > $startdd + $pagesize) { - $limitSql = " LIMIT $startdd,$pagesize"; - } else if (($totalnum - $startdd) > 0) { - $limitSql = " LIMIT $startdd,".($totalnum - $startdd); - } else { - $limitSql = ""; - } - $tjnum = $startdd; - if ($limitSql != "") { - $fquery = "SELECT aid,$field FROM $table WHERE 1 $addquery $limitSql ;"; - $dsql->SetQuery($fquery); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $tjnum++; - $body = $row[$field]; - $aid = $row['aid']; - if (strlen($body) < $msize) { - continue; - } - if (!preg_match("/#p#/iU", $body)) { - $body = SpLongBody($body, $cfg_arcautosp_size * 1024, "#p#分页标题#e#"); - $body = addslashes($body); - $dsql->ExecuteNoneQuery("UPDATE $table SET $field='$body' WHERE aid='$aid' ; "); - } - } - } //end if limit - - //返回进度提示 - if ($totalnum > 0) { - $tjlen = ceil(($tjnum / $totalnum) * 100); - } else { - $tjlen = 100; - } - - $dvlen = $tjlen * 2; - - $tjsta = "
"; - $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务..."; - - if ($tjnum < $totalnum) { - $nurl = "article_description_main.php?totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; - ShowMsg($tjsta, $nurl, 0, 500); - exit(); - } else { - ShowMsg('完成所有任务', 'javascript:;'); - exit(); - } - } //更新自动分页处理代码结束 -} + 250) $dsize = 250; + $tjnum = 0; + + //获取自动摘要 + if ($dojob == 'des') { + if (empty($totalnum)) { + $addquery = ""; + if ($sid != 0) { + $addquery .= " AND id>='$sid' "; + } + if ($eid != 0) { + $addquery .= " AND id<='$eid' "; + } + $tjQuery = "SELECT COUNT(*) AS dd FROM #@__archives WHERE channel='{$channel}' $addquery"; + $row = $dsql->GetOne($tjQuery); + $totalnum = $row['dd']; + } + if ($totalnum > 0) { + $addquery = ""; + if ($sid != 0) { + $addquery .= " AND #@__archives.id>='$sid' "; + } + if ($eid != 0) { + $addquery .= " AND #@__archives.id<='$eid' "; + } + $fquery = "SELECT #@__archives.id,#@__archives.title,#@__archives.description,{$table}.{$field} + FROM #@__archives LEFT JOIN {$table} ON {$table}.aid=#@__archives.id + WHERE #@__archives.channel='{$channel}' $addquery LIMIT $startdd,$pagesize ; "; + $dsql->SetQuery($fquery); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $body = $row[$field]; + $description = $row['description']; + if (strlen($description) > 10 || $description == '-') { + continue; + } + $bodytext = preg_replace("/#p#|#e#|副标题|分页标题/isU", "", Html2Text($body)); + if (strlen($bodytext) < $msize) { + continue; + } + $des = trim(addslashes(cn_substr($bodytext, $dsize))); + if (strlen($des) < 3) { + $des = "-"; + } + $dsql->ExecuteNoneQuery("UPDATE #@__archives SET description='{$des}' WHERE id='{$row['id']}';"); + } + + //返回进度信息 + $startdd = $startdd + $pagesize; + if ($totalnum > $startdd) { + $tjlen = ceil(($startdd / $totalnum) * 100); + } else { + $tjlen = 100; + ShowMsg('完成所有任务', 'javascript:;'); + exit(); + } + $dvlen = $tjlen * 2; + $tjsta = "
"; + $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务..."; + $nurl = "article_description_main.php?totalnum=$totalnum&startdd={$startdd}&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; + ShowMsg($tjsta, $nurl, 0, 500); + exit(); + } else { + ShowMsg('完成所有任务', 'javascript:;'); + exit(); + } + } //获取自动摘要代码结束 + + //更新自动分页 + if ($dojob == 'page') { + require_once(DEDEADMIN."/inc/inc_archives_functions.php"); + + $addquery = ""; + if ($sid != 0) { + $addquery .= " and aid>='$sid' "; + } + if ($eid != 0) { + $addquery .= " and aid<='$eid' "; + } + + //统计记录总数 + if ($totalnum == 0) { + $sql = "SELECT COUNT(*) AS dd FROM $table WHERE 1 $addquery"; + $row = $dsql->GetOne($sql); + $totalnum = $row['dd']; + } + + //获取记录,并分析 + if ($totalnum > $startdd + $pagesize) { + $limitSql = " LIMIT $startdd,$pagesize"; + } else if (($totalnum - $startdd) > 0) { + $limitSql = " LIMIT $startdd,".($totalnum - $startdd); + } else { + $limitSql = ""; + } + $tjnum = $startdd; + if ($limitSql != "") { + $fquery = "SELECT aid,$field FROM $table WHERE 1 $addquery $limitSql ;"; + $dsql->SetQuery($fquery); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $tjnum++; + $body = $row[$field]; + $aid = $row['aid']; + if (strlen($body) < $msize) { + continue; + } + if (!preg_match("/#p#/iU", $body)) { + $body = SpLongBody($body, $cfg_arcautosp_size * 1024, "#p#分页标题#e#"); + $body = addslashes($body); + $dsql->ExecuteNoneQuery("UPDATE $table SET $field='$body' WHERE aid='$aid' ; "); + } + } + } //end if limit + + //返回进度提示 + if ($totalnum > 0) { + $tjlen = ceil(($tjnum / $totalnum) * 100); + } else { + $tjlen = 100; + } + + $dvlen = $tjlen * 2; + + $tjsta = "
"; + $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务..."; + + if ($tjnum < $totalnum) { + $nurl = "article_description_main.php?totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; + ShowMsg($tjsta, $nurl, 0, 500); + exit(); + } else { + ShowMsg('完成所有任务', 'javascript:;'); + exit(); + } + } //更新自动分页处理代码结束 +} diff --git a/src/dede/article_edit.php b/src/admin/article_edit.php old mode 100755 new mode 100644 similarity index 88% rename from src/dede/article_edit.php rename to src/admin/article_edit.php index 110c68f6..58dd4b90 --- a/src/dede/article_edit.php +++ b/src/admin/article_edit.php @@ -1,225 +1,225 @@ -GetOne($query); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错", "javascript:;"); - exit(); - } - $addtable = $cInfos['addtable']; - $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); - if (!is_array($addRow)) { - ShowMsg("读取附加信息出错", "javascript:;"); - exit(); - } - $channelid = $arcRow['channel']; - $tags = GetTags($aid); - include DedeInclude("templets/article_edit.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (empty($litpic_b64)) $litpic_b64 = ''; - if (empty($typeid)) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $autokey = 1; - $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, 250); - $keywords = trim(cn_substrR($keywords, 60)); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - //分析body里的内容 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //更新数据库的SQL语句 - $query = "UPDATE `#@__archives` SET - `typeid`='$typeid', - `typeid2`='$typeid2', - `sortrank`='$sortrank', - `flag`='$flag', - `click`='$click', - `ismake`='$ismake', - `arcrank`='$arcrank', - `money`='$money', - `title`='$title', - `color`='$color', - `writer`='$writer', - `source`='$source', - `litpic`='$litpic', - `pubdate`='$pubdate', - `notpost`='$notpost', - `description`='$description', - `keywords`='$keywords', - `shorttitle`='$shorttitle', - `filename`='$filename', - `dutyadmin`='$adminid', - `weight`='$weight' - WHERE `id`='$id'; "; - if (!$dsql->ExecuteNoneQuery($query)) { - ShowMsg('更新数据库archives表时出错,请检查', -1); - exit(); - } - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $useip = GetIP(); - $templet = empty($templet) ? '' : $templet; - $iquery = "UPDATE `$addtable` SET typeid='$typeid',body='$body'{$inadd_f},redirecturl='$redirecturl',templet='$templet',userip='$useip' WHERE aid='$id'"; - if (!$dsql->ExecuteNoneQuery($iquery)) { - ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $artUrl = MakeArt($id, true, true, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - - //返回成功信息 - $msg = "请选择您的后续操作:发布新文章  查看更改  查看文章  管理文章  $backurl"; - $wintitle = "成功更改文章"; - $wecome_info = "文章管理::更改文章"; - $win = new OxWindow(); - $win->AddTitle("成功更改文章:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); +GetOne($query); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错", "javascript:;"); + exit(); + } + $addtable = $cInfos['addtable']; + $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); + if (!is_array($addRow)) { + ShowMsg("读取附加信息出错", "javascript:;"); + exit(); + } + $channelid = $arcRow['channel']; + $tags = GetTags($aid); + include DedeInclude("templets/article_edit.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (empty($litpic_b64)) $litpic_b64 = ''; + if (empty($typeid)) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $autokey = 1; + $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, 250); + $keywords = trim(cn_substrR($keywords, 60)); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //分析body里的内容 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //更新数据库的SQL语句 + $query = "UPDATE #@__archives SET + typeid='$typeid', + typeid2='$typeid2', + sortrank='$sortrank', + flag='$flag', + click='$click', + ismake='$ismake', + arcrank='$arcrank', + money='$money', + title='$title', + color='$color', + writer='$writer', + source='$source', + litpic='$litpic', + pubdate='$pubdate', + notpost='$notpost', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename', + dutyadmin='$adminid', + weight='$weight' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($query)) { + ShowMsg('更新数据库archives表时出错,请检查', -1); + exit(); + } + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $useip = GetIP(); + $templet = empty($templet) ? '' : $templet; + $iquery = "UPDATE `$addtable` SET typeid='$typeid',body='$body'{$inadd_f},redirecturl='$redirecturl',templet='$templet',userip='$useip' WHERE aid='$id'"; + if (!$dsql->ExecuteNoneQuery($iquery)) { + ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $artUrl = MakeArt($id, true, true, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + + //返回成功信息 + $msg = "请选择您的后续操作:发布新文章  查看修改  查看文章  管理文章  $backurl"; + $wintitle = "成功修改文章"; + $wecome_info = "文章管理::修改文章"; + $win = new OxWindow(); + $win->AddTitle("成功修改文章:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/article_keywords_main.php b/src/admin/article_keywords_main.php old mode 100755 new mode 100644 similarity index 86% rename from src/dede/article_keywords_main.php rename to src/admin/article_keywords_main.php index 1f38fbd0..211860bb --- a/src/dede/article_keywords_main.php +++ b/src/admin/article_keywords_main.php @@ -1,93 +1,92 @@ -ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); - continue; - } - - //禁用项目 - $staold = ${'staold_'.$aid}; - $sta = empty(${'isnouse_'.$aid}) ? 1 : 0; - if ($staold != $sta) { - $query1 = "UPDATE `#@__keywords` SET sta='$sta',rpurl='$rpurl' WHERE aid='$aid' "; - $dsql->ExecuteNoneQuery($query1); - continue; - } - - //更新链接网址 - if ($rpurl != $rpurlold) { - $query1 = "UPDATE `#@__keywords` SET rpurl='$rpurl' WHERE aid='$aid' "; - $dsql->ExecuteNoneQuery($query1); - } - } - ShowMsg("完成指定的更改!", $ENV_GOBACK_URL); - exit(); -} -//增加关键字 -else if ($dopost == 'add') { - $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "-1" : $_COOKIE['ENV_GOBACK_URL']; - $keyword = trim($keyword); - $rank = preg_replace("#[^0-9]#", '', $rank); - if ($keyword == '') { - ShowMsg("关键字不能为空!", -1); - exit(); - } - $row = $dsql->GetOne("SELECT * FROM `#@__keywords` WHERE keyword LIKE '$keyword'"); - if (is_array($row)) { - ShowMsg("关键字已存在库中!", "-1"); - exit(); - } - $inquery = "INSERT INTO `#@__keywords`(`keyword`,`rank`,`sta`,`rpurl`) VALUES ('$keyword','$rank','1','$rpurl');"; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功增加一个关键字!", $ENV_GOBACK_URL); - exit(); -} -if (empty($keyword)) { - $keyword = ''; - $addquery = ''; -} else { - $addquery = " WHERE keyword LIKE '%$keyword%' "; -} - -$sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY `rank` DESC"; -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("keyword", $keyword); -$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); -$dlist->SetSource($sql); -$dlist->Display(); - -function GetSta($sta) -{ - if ($sta == 1) return ''; - else return ' checked="1" '; -} +ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); + continue; + } + + //禁用项目 + $staold = ${'staold_'.$aid}; + $sta = empty(${'isnouse_'.$aid}) ? 1 : 0; + if ($staold != $sta) { + $query1 = "UPDATE `#@__keywords` SET sta='$sta',rpurl='$rpurl' WHERE aid='$aid' "; + $dsql->ExecuteNoneQuery($query1); + continue; + } + + //更新链接网址 + if ($rpurl != $rpurlold) { + $query1 = "UPDATE `#@__keywords` SET rpurl='$rpurl' WHERE aid='$aid' "; + $dsql->ExecuteNoneQuery($query1); + } + } + ShowMsg("完成指定的修改!", $ENV_GOBACK_URL); + exit(); +} +//增加关键字 +else if ($dopost == 'add') { + $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "-1" : $_COOKIE['ENV_GOBACK_URL']; + $keyword = trim($keyword); + $rank = preg_replace("#[^0-9]#", '', $rank); + if ($keyword == '') { + ShowMsg("关键字不能为空!", -1); + exit(); + } + $row = $dsql->GetOne("SELECT * FROM `#@__keywords` WHERE keyword LIKE '$keyword'"); + if (is_array($row)) { + ShowMsg("关键字已存在库中!", "-1"); + exit(); + } + $inquery = "INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES ('$keyword','$rank','1','$rpurl');"; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功增加一个关键字!", $ENV_GOBACK_URL); + exit(); +} +if (empty($keyword)) { + $keyword = ''; + $addquery = ''; +} else { + $addquery = " WHERE keyword LIKE '%$keyword%' "; +} + +$sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY rank DESC"; +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("keyword", $keyword); +$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); +$dlist->SetSource($sql); +$dlist->Display(); + +function GetSta($sta) +{ + if ($sta == 1) return ''; + else return ' checked="1" '; +} diff --git a/src/dede/article_keywords_make.php b/src/admin/article_keywords_make.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/article_keywords_make.php rename to src/admin/article_keywords_make.php index ec145525..d264f9f2 --- a/src/dede/article_keywords_make.php +++ b/src/admin/article_keywords_make.php @@ -1,204 +1,203 @@ -\r\n"; - flush(); - $ws = $wserr = $wsnew = ""; - $dsql->SetQuery("SELECT * FROM `#@__keywords`"); - $dsql->Execute(); - while ($row = $dsql->GetObject()) { - if ($row->sta == 1) $ws[$row->keyword] = 1; - else $wserr[$row->keyword] = 1; - } - echo "完成关键字数据库的载入!
\r\n"; - flush(); - echo "读取档案数据库,并对禁用的关键字和生字进行处理...
\r\n"; - flush(); - $dsql->SetQuery("SELECT id,keywords FROM `#@__archives`"); - $dsql->Execute(); - while ($row = $dsql->GetObject()) { - $keywords = explode(',', trim($row->keywords)); - $nerr = false; - $mykey = ''; - if (is_array($keywords)) { - foreach ($keywords as $v) { - $v = trim($v); - if ($v == '') { - continue; - } - if (isset($ws[$v])) { - $mykey .= $v." "; - } else if (isset($wsnew[$v])) { - $mykey .= $v.' '; - $wsnew[$v]++; - } else if (isset($wserr[$v])) { - $nerr = true; - } else { - $mykey .= $v." "; - $wsnew[$v] = 1; - } - } - } - } - echo "完成档案数据库的处理!
\r\n"; - flush(); - if (is_array($wsnew)) { - echo "对关键字进行排序...
\r\n"; - flush(); - arsort($wsnew); - echo "把关键字保存到数据库...
\r\n"; - flush(); - foreach ($wsnew as $k => $v) { - if (strlen($k) > 20) { - continue; - } - $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,`rank`,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); - $dsql->Execute(); - } - echo "完成关键字的导入!
\r\n"; - flush(); - sleep(1); - } else { - echo "没发现任何新的关键字!
\r\n"; - flush(); - sleep(1); - } - ShowMsg('完成所有操作,现在转到关键字列表页!', 'article_keywords_main.php'); - exit(); -} -//自动获取关键字(适用于默认的文章模型) -else if ($dopost == 'fetch') { - require_once(DEDEINC."/splitword.class.php"); - if (empty($startdd)) { - $startdd = 0; - } - if (empty($pagesize)) { - $pagesize = 20; - } - if (empty($totalnum)) { - $totalnum = 0; - } - - //统计记录总数 - if ($totalnum == 0) { - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__archives` WHERE channel='1' "); - $totalnum = $row['dd']; - } - - //获取记录,并分析关键字 - if ($totalnum > $startdd + $pagesize) { - $limitSql = " LIMIT $startdd,$pagesize"; - } else if (($totalnum - $startdd) > 0) { - $limitSql = " LIMIT $startdd,".($totalnum - $startdd); - } else { - $limitSql = ''; - } - $tjnum = $startdd; - if ($limitSql != '') { - $fquery = "SELECT arc.id,arc.title,arc.keywords,addon.body FROM `#@__archives` arc - LEFT JOIN `#@__addonarticle` addon ON addon.aid=arc.id WHERE arc.channel='1' $limitSql "; - $dsql->SetQuery($fquery); - $dsql->Execute(); - - if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { - $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); - $client->appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - while ($row = $dsql->GetObject()) { - if ($row->keywords != '') { - continue; - } - $tjnum++; - $id = $row->id; - $keywords = ""; - $data = $client->Spliteword($row->title.Html2Text($row->body)); - $keywords = $data->data; - $keywords = addslashes($keywords); - if ($keywords == '') { - $keywords = ','; - } - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET keywords='$keywords' WHERE id='$id'"); - } - $client->Close(); - } else { - $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); - while ($row = $dsql->GetObject()) { - if ($row->keywords != '') { - continue; - } - $tjnum++; - $id = $row->id; - $keywords = ""; - - $sp->SetSource($row->title, $cfg_soft_lang, $cfg_soft_lang); - $sp->SetResultType(2); - $sp->StartAnalysis(TRUE); - - $titleindexs = $sp->GetFinallyIndex(); - - $sp->SetSource(Html2Text($row->body), $cfg_soft_lang, $cfg_soft_lang); - $sp->SetResultType(2); - $sp->StartAnalysis(TRUE); - $allindexs = $sp->GetFinallyIndex(); - if (is_array($allindexs) && is_array($titleindexs)) { - foreach ($titleindexs as $k => $v) { - if (strlen($keywords) >= 30) { - break; - } else { - if (strlen($k) <= 2) continue; - $keywords .= $k.","; - } - } - foreach ($allindexs as $k => $v) { - if (strlen($keywords) >= 30) { - break; - } else if (!in_array($k, $titleindexs)) { - if (strlen($k) <= 2) continue; - $keywords .= $k.","; - } - } - } - $keywords = addslashes($keywords); - if ($keywords == '') { - $keywords = ','; - } - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET keywords='$keywords' WHERE id='$id'"); - } - unset($sp); - } - } //end if limit - - - //返回提示信息 - if ($totalnum > 0) $tjlen = ceil(($tjnum / $totalnum) * 100); - else $tjlen = 100; - - $dvlen = $tjlen * 2; - $tjsta = "
"; - $tjsta .= "
完成处理文档总数的:$tjlen %,位置:{$startdd},继续执行任务..."; - - if ($tjnum < $totalnum) { - $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; - ShowMsg($tjsta, $nurl, 0, 500); - } else { - ShowMsg("完成所有任务!", "javascript:;"); - } - exit(); -} -include DedeInclude('templets/article_keywords_make.htm'); +\r\n"; + flush(); + $ws = $wserr = $wsnew = ""; + $dsql->SetQuery("SELECT * FROM `#@__keywords`"); + $dsql->Execute(); + while ($row = $dsql->GetObject()) { + if ($row->sta == 1) $ws[$row->keyword] = 1; + else $wserr[$row->keyword] = 1; + } + echo "完成关键字数据库的载入!
\r\n"; + flush(); + echo "读取档案数据库,并对禁用的关键字和生字进行处理...
\r\n"; + flush(); + $dsql->SetQuery("SELECT id,keywords FROM `#@__archives`"); + $dsql->Execute(); + while ($row = $dsql->GetObject()) { + $keywords = explode(',', trim($row->keywords)); + $nerr = false; + $mykey = ''; + if (is_array($keywords)) { + foreach ($keywords as $v) { + $v = trim($v); + if ($v == '') { + continue; + } + if (isset($ws[$v])) { + $mykey .= $v." "; + } else if (isset($wsnew[$v])) { + $mykey .= $v.' '; + $wsnew[$v]++; + } else if (isset($wserr[$v])) { + $nerr = true; + } else { + $mykey .= $v." "; + $wsnew[$v] = 1; + } + } + } + } + echo "完成档案数据库的处理!
\r\n"; + flush(); + if (is_array($wsnew)) { + echo "对关键字进行排序...
\r\n"; + flush(); + arsort($wsnew); + echo "把关键字保存到数据库...
\r\n"; + flush(); + foreach ($wsnew as $k => $v) { + if (strlen($k) > 20) { + continue; + } + $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); + $dsql->Execute(); + } + echo "完成关键字的导入!
\r\n"; + flush(); + sleep(1); + } else { + echo "没发现任何新的关键字!
\r\n"; + flush(); + sleep(1); + } + ShowMsg('完成所有操作,现在转到关键字列表页!', 'article_keywords_main.php'); + exit(); +} +//自动获取关键字(适用于默认的文章模型) +else if ($dopost == 'fetch') { + require_once(DEDEINC."/splitword.class.php"); + if (empty($startdd)) { + $startdd = 0; + } + if (empty($pagesize)) { + $pagesize = 20; + } + if (empty($totalnum)) { + $totalnum = 0; + } + + //统计记录总数 + if ($totalnum == 0) { + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__archives` WHERE channel='1' "); + $totalnum = $row['dd']; + } + + //获取记录,并分析关键字 + if ($totalnum > $startdd + $pagesize) { + $limitSql = " LIMIT $startdd,$pagesize"; + } else if (($totalnum - $startdd) > 0) { + $limitSql = " LIMIT $startdd,".($totalnum - $startdd); + } else { + $limitSql = ''; + } + $tjnum = $startdd; + if ($limitSql != '') { + $fquery = "SELECT arc.id,arc.title,arc.keywords,addon.body FROM `#@__archives` arc + LEFT JOIN `#@__addonarticle` addon ON addon.aid=arc.id WHERE arc.channel='1' $limitSql "; + $dsql->SetQuery($fquery); + $dsql->Execute(); + + if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { + $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); + $client->appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + while ($row = $dsql->GetObject()) { + if ($row->keywords != '') { + continue; + } + $tjnum++; + $id = $row->id; + $keywords = ""; + $data = $client->Spliteword($row->title.Html2Text($row->body)); + $keywords = $data->data; + $keywords = addslashes($keywords); + if ($keywords == '') { + $keywords = ','; + } + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET keywords='$keywords' WHERE id='$id'"); + } + $client->Close(); + } else { + $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); + while ($row = $dsql->GetObject()) { + if ($row->keywords != '') { + continue; + } + $tjnum++; + $id = $row->id; + $keywords = ""; + + $sp->SetSource($row->title, $cfg_soft_lang, $cfg_soft_lang); + $sp->SetResultType(2); + $sp->StartAnalysis(TRUE); + + $titleindexs = $sp->GetFinallyIndex(); + + $sp->SetSource(Html2Text($row->body), $cfg_soft_lang, $cfg_soft_lang); + $sp->SetResultType(2); + $sp->StartAnalysis(TRUE); + $allindexs = $sp->GetFinallyIndex(); + if (is_array($allindexs) && is_array($titleindexs)) { + foreach ($titleindexs as $k => $v) { + if (strlen($keywords) >= 30) { + break; + } else { + if (strlen($k) <= 2) continue; + $keywords .= $k.","; + } + } + foreach ($allindexs as $k => $v) { + if (strlen($keywords) >= 30) { + break; + } else if (!in_array($k, $titleindexs)) { + if (strlen($k) <= 2) continue; + $keywords .= $k.","; + } + } + } + $keywords = addslashes($keywords); + if ($keywords == '') { + $keywords = ','; + } + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET keywords='$keywords' WHERE id='$id'"); + } + unset($sp); + } + } //end if limit + + + //返回提示信息 + if ($totalnum > 0) $tjlen = ceil(($tjnum / $totalnum) * 100); + else $tjlen = 100; + + $dvlen = $tjlen * 2; + $tjsta = "
"; + $tjsta .= "
完成处理文档总数的:$tjlen %,位置:{$startdd},继续执行任务..."; + + if ($tjnum < $totalnum) { + $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; + ShowMsg($tjsta, $nurl, 0, 500); + } else { + ShowMsg("完成所有任务!", "javascript:;"); + } + exit(); +} +include DedeInclude('templets/article_keywords_make.htm'); diff --git a/src/dede/article_keywords_select.php b/src/admin/article_keywords_select.php old mode 100755 new mode 100644 similarity index 84% rename from src/dede/article_keywords_select.php rename to src/admin/article_keywords_select.php index 044e610e..86ceb14b --- a/src/dede/article_keywords_select.php +++ b/src/admin/article_keywords_select.php @@ -1,38 +1,37 @@ -SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); -$dlist->pageSize = 300; -$dlist->SetParameter("f", $f); -$dlist->SetSource($sql); -$dlist->Display(); - -function GetSta($sta) -{ - if ($sta == 1) return "正常"; - else return "禁用"; -} - -function GetMan($sta) -{ - if ($sta == 1) return "禁用"; - else return "启用"; -} +SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); +$dlist->pageSize = 300; +$dlist->SetParameter("f", $f); +$dlist->SetSource($sql); +$dlist->Display(); + +function GetSta($sta) +{ + if ($sta == 1) return "正常"; + else return "禁用"; +} + +function GetMan($sta) +{ + if ($sta == 1) return "禁用"; + else return "启用"; +} diff --git a/src/dede/article_select_sw.php b/src/admin/article_select_sw.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/article_select_sw.php rename to src/admin/article_select_sw.php index c62ae27c..5bad944f --- a/src/dede/article_select_sw.php +++ b/src/admin/article_select_sw.php @@ -1,46 +1,45 @@ -[设置] "; - echo "[关闭]\r\n
\r\n"; - foreach ($allsources as $v) { - $v = trim($v); - if ($v != "") { - echo "$v | \r\n"; - } - } - echo "
 
"; -} else { - //作者列表 - $m_file = DEDEDATA."/admin/writer.txt"; - echo "
[设置] "; - echo "[关闭]
\r\n
\r\n"; - if (filesize($m_file) > 0) { - $fp = fopen($m_file, 'r'); - $str = fread($fp, filesize($m_file)); - fclose($fp); - $strs = explode(',', $str); - foreach ($strs as $str) { - $str = trim($str); - if ($str != "") { - echo "$str | "; - } - } - } - echo "
 
\r\n"; -} +[设置] "; + echo "[关闭]\r\n
\r\n"; + foreach ($allsources as $v) { + $v = trim($v); + if ($v != "") { + echo "$v | \r\n"; + } + } + echo "
 
"; +} else { + //作者列表 + $m_file = DEDEDATA."/admin/writer.txt"; + echo "
[设置] "; + echo "[关闭]
\r\n
\r\n"; + if (filesize($m_file) > 0) { + $fp = fopen($m_file, 'r'); + $str = fread($fp, filesize($m_file)); + fclose($fp); + $strs = explode(',', $str); + foreach ($strs as $str) { + $str = trim($str); + if ($str != "") { + echo "$str | "; + } + } + } + echo "
 
\r\n"; +} diff --git a/src/dede/article_source_edit.php b/src/admin/article_source_edit.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/article_source_edit.php rename to src/admin/article_source_edit.php index fd6a9aff..13c8fe3a --- a/src/dede/article_source_edit.php +++ b/src/admin/article_source_edit.php @@ -1,43 +1,42 @@ -alert('Save OK!');"; -} -//读出 -if (empty($allsource) && filesize($m_file) > 0) { - $fp = fopen($m_file, 'r'); - $allsource = fread($fp, filesize($m_file)); - fclose($fp); -} -$wintitle = "文章来源管理"; -$wecome_info = "文章来源管理"; -$win = new OxWindow(); -$win->Init('article_source_edit.php', 'js/blank.js', 'POST'); -$win->AddHidden('dopost', 'save'); -$win->AddTitle("每行保存一个来源:"); -$win->AddMsgItem(""); -$winform = $win->GetWindow('ok'); -$win->Display(); +alert('Save OK!');"; +} +//读出 +if (empty($allsource) && filesize($m_file) > 0) { + $fp = fopen($m_file, 'r'); + $allsource = fread($fp, filesize($m_file)); + fclose($fp); +} +$wintitle = "文章来源管理"; +$wecome_info = "文章来源管理"; +$win = new OxWindow(); +$win->Init('article_source_edit.php', 'js/blank.js', 'POST'); +$win->AddHidden('dopost', 'save'); +$win->AddTitle("每行保存一个来源:"); +$win->AddMsgItem(""); +$winform = $win->GetWindow('ok'); +$win->Display(); diff --git a/src/dede/article_string_mix.php b/src/admin/article_string_mix.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/article_string_mix.php rename to src/admin/article_string_mix.php index 5bc16bd1..fc837518 --- a/src/dede/article_string_mix.php +++ b/src/admin/article_string_mix.php @@ -1,5 +1,4 @@ getone("SELECT maintable FROM `#@__channeltype` WHERE id='$channelid' "); - if (is_array($arr)) { - $maintable = $arr['maintable']; - } else { - showmsg('频道id不正确,无法处理', 'javascript:;'); - exit(); - } - $dsql->SetQuery("SELECT COUNT(title) AS dd,title FROM `$maintable` WHERE channel='$channelid' GROUP BY title ORDER BY dd DESC LIMIT 0, $pagesize"); - $dsql->Execute(); - $allarc = 0; - include DedeInclude('templets/article_result_same.htm'); - exit(); -} -//删除选中的内容(只保留一条) -else if ($dopost == 'delsel') { - require_once(dirname(__FILE__)."/../include/typelink.class.php"); - require_once(dirname(__FILE__)."/inc/inc_batchup.php"); - - if (empty($titles)) { - header("Content-Type: text/html; charset={$cfg_ver_lang}"); - echo "\r\n"; - echo "没有指定删除的文档"; - exit(); - } - - $titless = split('`', $titles); - - if ($channelid < -1) { - $orderby = ($deltype == 'delnew' ? " ORDER BY aid DESC " : " ORDER BY aid ASC "); - } else { - $orderby = ($deltype == 'delnew' ? " ORDER BY id DESC " : " ORDER BY id ASC "); - } - - $totalarc = 0; - - foreach ($titless as $title) { - $title = trim($title); - $title = addslashes($title == '' ? '' : urldecode($title)); - if ($channelid < -1) { - $q1 = "SELECT aid as id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; - } else { - $q1 = "SELECT id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; - } - $dsql->SetQuery($q1); - $dsql->Execute(); - $rownum = $dsql->GetTotalRow(); - if ($rownum < 2) continue; - $i = 1; - while ($row = $dsql->GetObject()) { - $i++; - $naid = $row->id; - $ntitle = $row->title; - if ($i > $rownum) continue; - $totalarc++; - DelArc($naid, 'OFF'); - } - } - $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); - ShowMsg("一共删除了[{$totalarc}]篇重复的文档", "javascript:;"); - exit(); -} - -//向导页 -$channelinfos = array(); -$dsql->setquery("SELECT id,typename,maintable,addtable FROM `#@__channeltype` "); -$dsql->execute(); -while ($row = $dsql->getarray()) $channelinfos[] = $row; -include DedeInclude('templets/article_test_same.htm'); +getone("SELECT maintable FROM `#@__channeltype` WHERE id='$channelid' "); + if (is_array($arr)) { + $maintable = $arr['maintable']; + } else { + showmsg('频道id不正确,无法处理', 'javascript:;'); + exit(); + } + $dsql->SetQuery("SELECT COUNT(title) AS dd,title FROM `$maintable` WHERE channel='$channelid' GROUP BY title ORDER BY dd DESC LIMIT 0, $pagesize"); + $dsql->Execute(); + $allarc = 0; + include DedeInclude('templets/article_result_same.htm'); + exit(); +} +//删除选中的内容(只保留一条) +else if ($dopost == 'delsel') { + require_once(dirname(__FILE__)."/../include/typelink.class.php"); + require_once(dirname(__FILE__)."/inc/inc_batchup.php"); + + if (empty($titles)) { + header("Content-Type: text/html; charset={$cfg_ver_lang}"); + echo "\r\n"; + echo "没有指定删除的文档"; + exit(); + } + + $titless = split('`', $titles); + + if ($channelid < -1) { + $orderby = ($deltype == 'delnew' ? " ORDER BY aid DESC " : " ORDER BY aid ASC "); + } else { + $orderby = ($deltype == 'delnew' ? " ORDER BY id DESC " : " ORDER BY id ASC "); + } + + $totalarc = 0; + + foreach ($titless as $title) { + $title = trim($title); + $title = addslashes($title == '' ? '' : urldecode($title)); + if ($channelid < -1) { + $q1 = "SELECT aid as id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; + } else { + $q1 = "SELECT id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; + } + $dsql->SetQuery($q1); + $dsql->Execute(); + $rownum = $dsql->GetTotalRow(); + if ($rownum < 2) continue; + $i = 1; + while ($row = $dsql->GetObject()) { + $i++; + $naid = $row->id; + $ntitle = $row->title; + if ($i > $rownum) continue; + $totalarc++; + DelArc($naid, 'OFF'); + } + } + $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); + ShowMsg("一共删除了[{$totalarc}]篇重复的文档", "javascript:;"); + exit(); +} + +//向导页 +$channelinfos = array(); +$dsql->setquery("SELECT id,typename,maintable,addtable FROM `#@__channeltype` "); +$dsql->execute(); +while ($row = $dsql->getarray()) $channelinfos[] = $row; +include DedeInclude('templets/article_test_same.htm'); diff --git a/src/dede/article_test_title.php b/src/admin/article_test_title.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/article_test_title.php rename to src/admin/article_test_title.php index aecf7318..c3c98200 --- a/src/dede/article_test_title.php +++ b/src/admin/article_test_title.php @@ -1,19 +1,18 @@ -GetOne("SELECT id FROM `#@__archives` WHERE title LIKE '$t' "); -if (is_array($row)) { - echo "提示:系统已经存在标题为 '$t' 的文档。[关闭]"; -} +GetOne("SELECT id FROM `#@__archives` WHERE title LIKE '$t' "); +if (is_array($row)) { + echo "提示:系统已经存在标题为 '$t' 的文档。[关闭]"; +} diff --git a/src/dede/article_writer_edit.php b/src/admin/article_writer_edit.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/article_writer_edit.php rename to src/admin/article_writer_edit.php index daa5fabc..1478277d --- a/src/dede/article_writer_edit.php +++ b/src/admin/article_writer_edit.php @@ -1,45 +1,44 @@ -alert('Save OK!');"; -} - -//读出 -if (empty($allwriter) && filesize($m_file) > 0) { - $fp = fopen($m_file, 'r'); - $allwriter = fread($fp, filesize($m_file)); - fclose($fp); -} -$wintitle = "文章作者管理"; -$wecome_info = "文章作者管理"; -$win = new OxWindow(); -$win->Init('article_writer_edit.php', 'js/blank.js', 'POST'); -$win->AddHidden('dopost', 'save'); -$win->AddTitle("把作者姓名用半角逗号“,”分开:"); -$win->AddMsgItem(""); -$winform = $win->GetWindow('ok'); -$win->Display(); +alert('Save OK!');"; +} + +//读出 +if (empty($allwriter) && filesize($m_file) > 0) { + $fp = fopen($m_file, 'r'); + $allwriter = fread($fp, filesize($m_file)); + fclose($fp); +} +$wintitle = "文章作者管理"; +$wecome_info = "文章作者管理"; +$win = new OxWindow(); +$win->Init('article_writer_edit.php', 'js/blank.js', 'POST'); +$win->AddHidden('dopost', 'save'); +$win->AddTitle("把作者姓名用半角逗号“,”分开:"); +$win->AddMsgItem(""); +$winform = $win->GetWindow('ok'); +$win->Display(); diff --git a/src/dede/baidunews.php b/src/admin/baidunews.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/baidunews.php rename to src/admin/baidunews.php index a4621feb..d63787df --- a/src/dede/baidunews.php +++ b/src/admin/baidunews.php @@ -1,78 +1,77 @@ -\n"; - $baidunews .= "\n"; - $baidunews .= "$cfg_webname \n"; - $baidunews .= "$cfg_adminemail \n"; - $baidunews .= "$cfg_updateperi \n"; - - $limit = $cfg_baidunews_limit; - if ($limit > 100 || $limit < 1) { - $limit = 100; - } - - $query = "SELECT maintable.*, addtable.body, arctype.typename - FROM #@__archives maintable - LEFT JOIN #@__addonarticle addtable ON addtable.aid=maintable.id - LEFT JOIN #@__arctype arctype ON arctype.ID=maintable.typeid - WHERE maintable.channel=1 and maintable.arcrank!=-1 ORDER BY maintable.pubdate DESC LIMIT $limit - "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $title = dede_htmlspecialchars($row['title']); - $row1 = GetOneArchive($row['id']); - if (strpos($row1['arcurl'], 'http://') === false) { - $link = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$row1['arcurl']; - } else { - $link = $row1['arcurl']; - } - $link = dede_htmlspecialchars($link); - $description = dede_htmlspecialchars(strip_tags($row['description'])); - $text = dede_htmlspecialchars(strip_tags($row['body'])); - $image = $row['litpic'] == '' ? '' : $row['litpic']; - if ($image != '' && strpos($image, 'http://') === false) { - $image = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$image; - } - //$headlineimg = ''; - $keywords = dede_htmlspecialchars($row['keywords']); - $category = dede_htmlspecialchars($row['typename']); - $author = dede_htmlspecialchars($row['writer']); - $source = dede_htmlspecialchars($row['source']); - $pubdate = dede_htmlspecialchars(gmdate('Y-m-d H:i', $row['pubdate'] + $cfg_cli_time * 3600)); - - $baidunews .= "\n"; - $baidunews .= "$title \n"; - $baidunews .= "$link \n"; - $baidunews .= "$description \n"; - $baidunews .= "$text \n"; - $baidunews .= "$image \n"; - //$baidunews .= "\n"; - $baidunews .= "$keywords \n"; - $baidunews .= "$category \n"; - $baidunews .= "$author \n"; - $baidunews .= "$source \n"; - $baidunews .= "$pubdate \n"; - $baidunews .= "\n"; - } - $baidunews .= "\n"; - - $fp = fopen(dirname(__FILE__).'/'.$filename, 'w'); - fwrite($fp, $baidunews); - fclose($fp); - showmsg("{$filename} make success", 'javascript:;'); -} +\n"; + $baidunews .= "\n"; + $baidunews .= "$cfg_webname \n"; + $baidunews .= "$cfg_adminemail \n"; + $baidunews .= "$cfg_updateperi \n"; + + $limit = $cfg_baidunews_limit; + if ($limit > 100 || $limit < 1) { + $limit = 100; + } + + $query = "SELECT maintable.*, addtable.body, arctype.typename + FROM #@__archives maintable + LEFT JOIN #@__addonarticle addtable ON addtable.aid=maintable.id + LEFT JOIN #@__arctype arctype ON arctype.ID=maintable.typeid + WHERE maintable.channel=1 and maintable.arcrank!=-1 ORDER BY maintable.pubdate DESC LIMIT $limit + "; + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $title = dede_htmlspecialchars($row['title']); + $row1 = GetOneArchive($row['id']); + if (strpos($row1['arcurl'], 'http://') === false) { + $link = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$row1['arcurl']; + } else { + $link = $row1['arcurl']; + } + $link = dede_htmlspecialchars($link); + $description = dede_htmlspecialchars(strip_tags($row['description'])); + $text = dede_htmlspecialchars(strip_tags($row['body'])); + $image = $row['litpic'] == '' ? '' : $row['litpic']; + if ($image != '' && strpos($image, 'http://') === false) { + $image = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$image; + } + //$headlineimg = ''; + $keywords = dede_htmlspecialchars($row['keywords']); + $category = dede_htmlspecialchars($row['typename']); + $author = dede_htmlspecialchars($row['writer']); + $source = dede_htmlspecialchars($row['source']); + $pubdate = dede_htmlspecialchars(gmdate('Y-m-d H:i', $row['pubdate'] + $cfg_cli_time * 3600)); + + $baidunews .= "\n"; + $baidunews .= "$title \n"; + $baidunews .= "$link \n"; + $baidunews .= "$description \n"; + $baidunews .= "$text \n"; + $baidunews .= "$image \n"; + //$baidunews .= "\n"; + $baidunews .= "$keywords \n"; + $baidunews .= "$category \n"; + $baidunews .= "$author \n"; + $baidunews .= "$source \n"; + $baidunews .= "$pubdate \n"; + $baidunews .= "\n"; + } + $baidunews .= "\n"; + + $fp = fopen(dirname(__FILE__).'/'.$filename, 'w'); + fwrite($fp, $baidunews); + fclose($fp); + showmsg("{$filename} make success", 'javascript:;'); +} diff --git a/src/dede/cards_make.php b/src/admin/cards_make.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/cards_make.php rename to src/admin/cards_make.php index 61355a57..480934d2 --- a/src/dede/cards_make.php +++ b/src/admin/cards_make.php @@ -1,59 +1,58 @@ -GetOne("SELECT * FROM #@__moneycard_record ORDER BY aid DESC"); - !is_array($row) ? $startid = 100000 : $startid = $row['aid'] + 100000; - $row = $dsql->GetOne("SELECT * FROM #@__moneycard_type WHERE tid='$cardtype'"); - $money = $row['money']; - $num = $row['num']; - $mtime = time(); - $utime = 0; - $ctid = $cardtype; - $startid++; - $endid = $startid + $mnum; - - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - - for (; $startid < $endid; $startid++) { - $cardid = $snprefix.$startid.'-'; - for ($p = 0; $p < $pwdgr; $p++) { - for ($i = 0; $i < $pwdlen; $i++) { - if ($ctype == 1) { - $c = mt_rand(49, 57); - $c = chr($c); - } else { - $c = mt_rand(65, 90); - if ($c == 79) { - $c = 'M'; - } else { - $c = chr($c); - } - } - $cardid .= $c; - } - if ($p < $pwdgr - 1) { - $cardid .= '-'; - } - } - $inquery = "INSERT INTO #@__moneycard_record(ctid,cardid,uid,isexp,mtime,utime,money,num) - VALUES('$ctid','$cardid','0','0','$mtime','$utime','$money','$num'); "; - $dsql->ExecuteNoneQuery($inquery); - echo "成功生成点卡:{$cardid}
"; - } - echo "成功生成 {$mnum} 个点卡"; -} +GetOne("SELECT * FROM #@__moneycard_record ORDER BY aid DESC"); + !is_array($row) ? $startid = 100000 : $startid = $row['aid'] + 100000; + $row = $dsql->GetOne("SELECT * FROM #@__moneycard_type WHERE tid='$cardtype'"); + $money = $row['money']; + $num = $row['num']; + $mtime = time(); + $utime = 0; + $ctid = $cardtype; + $startid++; + $endid = $startid + $mnum; + + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + + for (; $startid < $endid; $startid++) { + $cardid = $snprefix.$startid.'-'; + for ($p = 0; $p < $pwdgr; $p++) { + for ($i = 0; $i < $pwdlen; $i++) { + if ($ctype == 1) { + $c = mt_rand(49, 57); + $c = chr($c); + } else { + $c = mt_rand(65, 90); + if ($c == 79) { + $c = 'M'; + } else { + $c = chr($c); + } + } + $cardid .= $c; + } + if ($p < $pwdgr - 1) { + $cardid .= '-'; + } + } + $inquery = "INSERT INTO #@__moneycard_record(ctid,cardid,uid,isexp,mtime,utime,money,num) + VALUES('$ctid','$cardid','0','0','$mtime','$utime','$money','$num'); "; + $dsql->ExecuteNoneQuery($inquery); + echo "成功生成点卡:{$cardid}
"; + } + echo "成功生成 {$mnum} 个点卡"; +} diff --git a/src/dede/cards_manage.php b/src/admin/cards_manage.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/cards_manage.php rename to src/admin/cards_manage.php index d90f0d25..f5a65a05 --- a/src/dede/cards_manage.php +++ b/src/admin/cards_manage.php @@ -1,67 +1,66 @@ -ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); - ShowMsg("成功删除指定的记录", "cards_manage.php"); - exit(); -} else { - $addsql = ''; - if (isset($isexp)) $addsql = " WHERE isexp='$isexp' "; - - $sql = "SELECT * FROM #@__moneycard_record $addsql ORDER BY aid DESC"; - $dlist = new DataListCP(); - $dlist->pageSize = 25; //设定每页显示记录数(默认25条) - if (isset($isexp)) $dlist->SetParameter("isexp", $isexp); - - $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); - $dlist->dsql->Execute('ts'); - while ($rw = $dlist->dsql->GetArray('ts')) { - $TypeNames[$rw['tid']] = $rw['pname']; - } - $tplfile = DEDEADMIN."/templets/cards_manmage.htm"; - - //这两句的顺序不能更换 - $dlist->SetTemplate($tplfile); //载入模板 - $dlist->SetSource($sql); //设定查询SQL - $dlist->Display(); //显示 -} - -function GetMemberID($mid) -{ - global $dsql; - if ($mid == 0) return '0'; - $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); - if (is_array($row)) return "".$row['userid'].""; - else return '0'; -} - -function GetUseDate($time = 0) -{ - if (!empty($time)) return GetDateMk($time); - else return '未使用'; -} -function GetSta($sta) -{ - if ($sta == 1) return '已售出'; - else if ($sta == -1) return '已使用'; - else return '未使用'; -} +ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); + ShowMsg("成功删除指定的记录", "cards_manage.php"); + exit(); +} else { + $addsql = ''; + if (isset($isexp)) $addsql = " WHERE isexp='$isexp' "; + + $sql = "SELECT * FROM #@__moneycard_record $addsql ORDER BY aid DESC"; + $dlist = new DataListCP(); + $dlist->pageSize = 25; //设定每页显示记录数(默认25条) + if (isset($isexp)) $dlist->SetParameter("isexp", $isexp); + + $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); + $dlist->dsql->Execute('ts'); + while ($rw = $dlist->dsql->GetArray('ts')) { + $TypeNames[$rw['tid']] = $rw['pname']; + } + $tplfile = DEDEADMIN."/templets/cards_manmage.htm"; + + //这两句的顺序不能更换 + $dlist->SetTemplate($tplfile); //载入模板 + $dlist->SetSource($sql); //设定查询SQL + $dlist->Display(); //显示 +} + +function GetMemberID($mid) +{ + global $dsql; + if ($mid == 0) return '0'; + $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); + if (is_array($row)) return "".$row['userid'].""; + else return '0'; +} + +function GetUseDate($time = 0) +{ + if (!empty($time)) return GetDateMk($time); + else return '未使用'; +} +function GetSta($sta) +{ + if ($sta == 1) return '已售出'; + else if ($sta == -1) return '已使用'; + else return '未使用'; +} diff --git a/src/dede/cards_type.php b/src/admin/cards_type.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/cards_type.php rename to src/admin/cards_type.php index 92dbd7ba..5a90a5e6 --- a/src/dede/cards_type.php +++ b/src/admin/cards_type.php @@ -1,49 +1,48 @@ -ExecuteNoneQuery($query); - $query = "UPDATE #@__moneycard_record SET money='$money',num='$num' WHERE ctid='$tid' ; "; - $dsql->ExecuteNoneQuery($query); - } - } else { - $query = "DELETE FROM #@__moneycard_type WHERE tid='$tid' "; - $dsql->ExecuteNoneQuery($query); - $query = "DELETE FROM #@__moneycard_record WHERE ctid='$tid' AND isexp<>-1 ; "; - $dsql->ExecuteNoneQuery($query); - } - } - - //增加新记录 - if (isset($check_new) && $pname_new != '') { - $query = "INSERT INTO #@__moneycard_type(num,pname,money) VALUES('{$num_new}','{$pname_new}','{$money_new}');"; - $dsql->ExecuteNoneQuery($query); - } - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - echo ""; -} -require_once(DEDEADMIN."/templets/cards_type.htm"); +ExecuteNoneQuery($query); + $query = "UPDATE #@__moneycard_record SET money='$money',num='$num' WHERE ctid='$tid' ; "; + $dsql->ExecuteNoneQuery($query); + } + } else { + $query = "DELETE FROM #@__moneycard_type WHERE tid='$tid' "; + $dsql->ExecuteNoneQuery($query); + $query = "DELETE FROM #@__moneycard_record WHERE ctid='$tid' AND isexp<>-1 ; "; + $dsql->ExecuteNoneQuery($query); + } + } + + //增加新记录 + if (isset($check_new) && $pname_new != '') { + $query = "INSERT INTO #@__moneycard_type(num,pname,money) VALUES('{$num_new}','{$pname_new}','{$money_new}');"; + $dsql->ExecuteNoneQuery($query); + } + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + echo ""; +} +require_once(DEDEADMIN."/templets/cards_type.htm"); diff --git a/src/dede/catalog_add.php b/src/admin/catalog_add.php old mode 100755 new mode 100644 similarity index 83% rename from src/dede/catalog_add.php rename to src/admin/catalog_add.php index 5506db2e..6872c3fc --- a/src/dede/catalog_add.php +++ b/src/admin/catalog_add.php @@ -1,237 +1,212 @@ -SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $channelArray[$row->id]['typename'] = $row->typename; - $channelArray[$row->id]['nid'] = $row->nid; - if ($row->id == $channelid) { - $nid = $row->nid; - } -} -if ($dopost == 'quick') { - $tl = new TypeLink(0); - $typeOptions = $tl->GetOptionArray(0, 0, $channelid); - include DedeInclude('templets/catalog_add_quick.htm'); - exit(); -} -/*--------------------- -function action_savequick(){ } ----------------------*/ else if ($dopost == 'savequick') { - if (!isset($savetype)) $savetype = ''; - $isdefault = isset($isdefault) ? $isdefault : 0; - $tempindex = "{style}/index_{$nid}.htm"; - $templist = "{style}/list_{$nid}.htm"; - $temparticle = "{style}/article_{$nid}.htm"; - $queryTemplate = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,typedir,isdefault,defaultname,issend,channeltype, - tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) - VALUES('~reid~','~topid~','~rank~','~typename~','~typedir~','$isdefault','$defaultname','$issend','$channeltype', - '$tempindex','$templist','$temparticle','default','$namerule','$namerule2','0','0','','','~typename~','0','','','0','0','0','','')"; - - if (empty($savetype)) { - foreach ($_POST as $k => $v) { - if (preg_match("#^posttype#", $k)) { - $k = str_replace('posttype', '', $k); - } else { - continue; - } - $rank = ${'rank'.$k}; - $toptypename = trim(${'toptype'.$k}); - $sontype = trim(${'sontype'.$k}); - $toptypedir = GetPinyin(stripslashes($toptypename)); - $toptypedir = $referpath == 'parent' ? $nextdir.'/'.$toptypedir : '/'.$toptypedir; - if (empty($toptypename)) { - continue; - } - $sql = str_replace('~reid~', '0', $queryTemplate); - $sql = str_replace('~topid~', '0', $sql); - $sql = str_replace('~rank~', $rank, $sql); - $sql = str_replace('~typename~', $toptypename, $sql); - $sql = str_replace('~typedir~', $toptypedir, $sql); - $dsql->ExecuteNoneQuery($sql); - $tid = $dsql->GetLastID(); - if ($tid > 0 && $sontype != '') { - $sontypes = explode(',', $sontype); - foreach ($sontypes as $k => $v) { - $v = trim($v); - if ($v == '') { - continue; - } - $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v)); - $sql = str_replace('~reid~', $tid, $queryTemplate); - $sql = str_replace('~topid~', $tid, $sql); - $sql = str_replace('~rank~', $k, $sql); - $sql = str_replace('~typename~', $v, $sql); - $sql = str_replace('~typedir~', $typedir, $sql); - $dsql->ExecuteNoneQuery($sql); - } - } - } - } else { - - - $row = $dsql->GetOne("SELECT `typedir` FROM `#@__arctype` WHERE `id`={$reid}"); - foreach ($_POST as $k => $v) { - if (preg_match("#^posttype#", $k)) { - $k = str_replace('posttype', '', $k); - } else { - continue; - } - $rank = ${'rank'.$k}; - $toptypename = trim(${'reltype'.$k}); - $toptypedir = GetPinyin(stripslashes($toptypename)); - switch ($referpath) { - case 'parent': - $toptypedir = $nextdir.'/'.$toptypedir; - break; - case 'typepath': - $toptypedir = isset($row['typedir']) ? $row['typedir'].'/'.$toptypedir : '/'.$toptypedir; - break; - default: - $toptypedir = '/'.$toptypedir; - break; - } - - if (empty($toptypename)) { - continue; - } - $sql = str_replace('~reid~', $reid, $queryTemplate); - $sql = str_replace('~topid~', $reid, $sql); - $sql = str_replace('~rank~', $rank, $sql); - $sql = str_replace('~typename~', $toptypename, $sql); - $sql = str_replace('~typedir~', $toptypedir, $sql); - $dsql->ExecuteNoneQuery($sql); - } - } - UpDateCatCache(); - ShowMsg('成功增加指定栏目', 'catalog_main.php'); - exit(); -} -/*--------------------- -function action_save(){ } ----------------------*/ else if ($dopost == 'save') { - $smalltypes = ''; - if (empty($smalltype)) $smalltype = ''; - if (is_array($smalltype)) $smalltypes = join(',', $smalltype); - - if (!isset($sitepath)) $sitepath = ''; - if ($topid == 0 && $reid > 0) $topid = $reid; - if ($ispart != 0) $cross = 0; - - $description = Html2Text($description, 1); - $keywords = Html2Text($keywords, 1); - - if ($ispart != 2) { - //栏目的参照目录 - if ($referpath == 'cmspath') $nextdir = '{cmspath}'; - if ($referpath == 'basepath') $nextdir = ''; - //用拼音命名 - if ($upinyin == 1 || $typedir == '') { - $typedir = GetPinyin(stripslashes($typename)); - } - $typedir = $nextdir.'/'.$typedir; - $typedir = preg_replace("#\/{1,}#", "/", $typedir); - } - - //开启多站点时的设置(仅针对顶级栏目) - if ($reid == 0 && $moresite == 1) { - $sitepath = $typedir; - - //检测二级网址 - if ($siteurl != '') { - $siteurl = preg_replace("#\/$#", "", $siteurl); - if (!preg_match("#http:\/\/#i", $siteurl)) { - ShowMsg("您绑定的二级域名无效,请用(http://host)的形式", "-1"); - exit(); - } - if (preg_match("#".$cfg_basehost."#i", $siteurl)) { - ShowMsg("您绑定的二级域名与当前站点是同一个域,不需要绑定", "-1"); - exit(); - } - } - } - - //创建目录 - if ($ispart != 2) { - $true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir); - $true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); - if (!CreateDir($true_typedir)) { - ShowMsg("创建目录 {$true_typedir} 失败,请检查您的路径是否存在问题", "-1"); - exit(); - } - } - - $in_query = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,typedir,isdefault,defaultname,issend,channeltype, - tempindex,templist,temparticle,modname,namerule,namerule2, - ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) - VALUES('$reid','$topid','$sortrank','$typename','$typedir','$isdefault','$defaultname','$issend','$channeltype', - '$tempindex','$templist','$temparticle','default','$namerule','$namerule2', - '$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes')"; - - if (!$dsql->ExecuteNoneQuery($in_query)) { - ShowMsg("保存目录数据时失败,请检查您的输入资料是否存在问题", "-1"); - exit(); - } - UpDateCatCache(); - if ($reid > 0) { - PutCookie('lastCid', GetTopid($reid), 3600 * 24, '/'); - } - ShowMsg("成功创建一个分类", "catalog_main.php"); - exit(); -} //End dopost==save - -//获取从父目录继承的默认参数 -if ($dopost == '') { - $channelid = 1; - $issend = 1; - $corank = 0; - $reid = 0; - $topid = 0; - $typedir = ''; - $moresite = 0; - if ($id > 0) { - $myrow = $dsql->GetOne(" SELECT tp.*,ch.typename AS ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id "); - $channelid = $myrow['channeltype']; - $issennd = $myrow['issend']; - $corank = $myrow['corank']; - $topid = $myrow['topid']; - $typedir = $myrow['typedir']; - } - - //父栏目是否为二级站点 - $moresite = empty($myrow['moresite']) ? 0 : $myrow['moresite']; -} - -include DedeInclude('templets/catalog_add.htm'); +SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $channelArray[$row->id]['typename'] = $row->typename; + $channelArray[$row->id]['nid'] = $row->nid; + if ($row->id == $channelid) { + $nid = $row->nid; + } +} +if ($dopost == 'quick') { + $tl = new TypeLink(0); + $typeOptions = $tl->GetOptionArray(0, 0, $channelid); + include DedeInclude('templets/catalog_add_quick.htm'); + exit(); +} +/*--------------------- +function action_savequick(){ } +---------------------*/ +else if ($dopost == 'savequick') { + if (!isset($savetype)) $savetype = ''; + $isdefault = isset($isdefault) ? $isdefault : 0; + $tempindex = "{style}/index_{$nid}.htm"; + $templist = "{style}/list_{$nid}.htm"; + $temparticle = "{style}/article_{$nid}.htm"; + $queryTemplate = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,namegk,enname,ennamegk,litpic,litimg,typedir,isdefault,defaultname,issend,channeltype,tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) + VALUES('~reid~','~topid~','~rank~','~typename~','~namegk~','~enname~','~ennamegk~','~litpic~','~litimg~','~typedir~','$isdefault','$defaultname','$issend','$channeltype','$tempindex','$templist','$temparticle','default','$namerule','$namerule2','0','0','','','~typename~','0','','','0','0','0','','')"; + if (empty($savetype)) { + foreach ($_POST as $k => $v) { + if (preg_match("#^posttype#", $k)) { + $k = str_replace('posttype', '', $k); + } else { + continue; + } + $rank = ${'rank'.$k}; + $toptypename = trim(${'toptype'.$k}); + $sontype = trim(${'sontype'.$k}); + $toptypedir = GetPinyin(stripslashes($toptypename)); + $toptypedir = $referpath == 'parent' ? $nextdir.'/'.$toptypedir : '/'.$toptypedir; + if (empty($toptypename)) { + continue; + } + $sql = str_replace('~reid~', '0', $queryTemplate); + $sql = str_replace('~topid~', '0', $sql); + $sql = str_replace('~rank~', $rank, $sql); + $sql = str_replace('~typename~', $toptypename, $sql); + $sql = str_replace('~typedir~', $toptypedir, $sql); + $dsql->ExecuteNoneQuery($sql); + $tid = $dsql->GetLastID(); + if ($tid > 0 && $sontype != '') { + $sontypes = explode(',', $sontype); + foreach ($sontypes as $k => $v) { + $v = trim($v); + if ($v == '') { + continue; + } + $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v)); + $sql = str_replace('~reid~', $tid, $queryTemplate); + $sql = str_replace('~topid~', $tid, $sql); + $sql = str_replace('~rank~', $k, $sql); + $sql = str_replace('~typename~', $v, $sql); + $sql = str_replace('~typedir~', $typedir, $sql); + $dsql->ExecuteNoneQuery($sql); + } + } + } + } else { + $row = $dsql->GetOne("SELECT `typedir` FROM `#@__arctype` WHERE `id`={$reid}"); + foreach ($_POST as $k => $v) { + if (preg_match("#^posttype#", $k)) { + $k = str_replace('posttype', '', $k); + } else { + continue; + } + $rank = ${'rank'.$k}; + $toptypename = trim(${'reltype'.$k}); + $toptypedir = GetPinyin(stripslashes($toptypename)); + switch ($referpath) { + case 'parent': + $toptypedir = $nextdir.'/'.$toptypedir; + break; + case 'typepath': + $toptypedir = isset($row['typedir']) ? $row['typedir'].'/'.$toptypedir : '/'.$toptypedir; + break; + default: + $toptypedir = '/'.$toptypedir; + break; + } + if (empty($toptypename)) { + continue; + } + $sql = str_replace('~reid~', $reid, $queryTemplate); + $sql = str_replace('~topid~', $reid, $sql); + $sql = str_replace('~rank~', $rank, $sql); + $sql = str_replace('~typename~', $toptypename, $sql); + $sql = str_replace('~typedir~', $toptypedir, $sql); + $dsql->ExecuteNoneQuery($sql); + } + } + UpDateCatCache(); + ShowMsg('成功增加指定栏目', 'catalog_main.php'); + exit(); +} +/*--------------------- +function action_save(){ } +---------------------*/ +else if ($dopost == 'save') { + $smalltypes = ''; + if (empty($smalltype)) $smalltype = ''; + if (is_array($smalltype)) $smalltypes = join(',', $smalltype); + if (!isset($sitepath)) $sitepath = ''; + if ($topid == 0 && $reid > 0) $topid = $reid; + if ($ispart != 0) $cross = 0; + $description = Html2Text($description, 1); + $keywords = Html2Text($keywords, 1); + if ($ispart != 2) { + //栏目的参照目录 + if ($referpath == 'cmspath') $nextdir = '{cmspath}'; + if ($referpath == 'basepath') $nextdir = ''; + //用拼音命名 + if ($upinyin == 1 || $typedir == '') { + $typedir = GetPinyin(stripslashes($typename)); + } + $typedir = $nextdir.'/'.$typedir; + $typedir = preg_replace("#\/{1,}#", "/", $typedir); + } + //开启多站点时的设置(仅针对顶级栏目) + if ($reid == 0 && $moresite == 1) { + $sitepath = $typedir; + //检测二级网址 + if ($siteurl != '') { + $siteurl = preg_replace("#\/$#", "", $siteurl); + if (!preg_match("#http:\/\/#i", $siteurl)) { + ShowMsg("您绑定的二级域名无效,请用(http://host)的形式", "-1"); + exit(); + } + if (preg_match("#".$cfg_basehost."#i", $siteurl)) { + ShowMsg("您绑定的二级域名与当前站点是同一个域,不需要绑定", "-1"); + exit(); + } + } + } + //创建目录 + if ($ispart != 2) { + $true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir); + $true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); + if (!CreateDir($true_typedir)) { + ShowMsg("创建目录 {$true_typedir} 失败,请检查您的路径是否存在问题", "-1"); + exit(); + } + } + $in_query = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,namegk,enname,ennamegk,litpic,litimg,typedir,isdefault,defaultname,issend,channeltype,tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) + VALUES('$reid','$topid','$sortrank','$typename','$namegk','$enname','$ennamegk','$litpic','$litimg','$typedir','$isdefault','$defaultname','$issend','$channeltype','$tempindex','$templist','$temparticle','default','$namerule','$namerule2','$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes')"; + if (!$dsql->ExecuteNoneQuery($in_query)) { + ShowMsg("保存目录数据时失败,请检查您的输入资料是否存在问题", "-1"); + exit(); + } + UpDateCatCache(); + if ($reid > 0) { + PutCookie('lastCid', GetTopid($reid), 3600 * 24, '/'); + } + ShowMsg("成功创建一个分类", "catalog_main.php"); + exit(); +}//End dopost==save +//获取从父目录继承的默认参数 +if ($dopost == '') { + $channelid = 1; + $issend = 1; + $corank = 0; + $reid = 0; + $topid = 0; + $typedir = ''; + $moresite = 0; + if ($id > 0) { + $myrow = $dsql->GetOne(" SELECT tp.*,ch.typename AS ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id "); + $channelid = $myrow['channeltype']; + $issennd = $myrow['issend']; + $corank = $myrow['corank']; + $topid = $myrow['topid']; + $typedir = $myrow['typedir']; + } + //父栏目是否为二级站点 + $moresite = empty($myrow['moresite']) ? 0 : $myrow['moresite']; +} +include DedeInclude('templets/catalog_add.htm'); \ No newline at end of file diff --git a/src/dede/catalog_del.php b/src/admin/catalog_del.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/catalog_del.php rename to src/admin/catalog_del.php index 17cc6479..0ac08eed --- a/src/dede/catalog_del.php +++ b/src/admin/catalog_del.php @@ -1,42 +1,41 @@ -DelType($id, $delfile); - UpDateCatCache(); - ShowMsg("成功删除一个栏目", "catalog_main.php"); - exit(); -} -$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); -$row = $dsql->GetOne(); -$wintitle = "删除栏目确认"; -$wecome_info = "栏目管理 >> 删除栏目确认"; -$win = new OxWindow(); -$win->Init('catalog_del.php', 'js/blank.js', 'POST'); -$win->AddHidden('id', $id); -$win->AddHidden('dopost', 'ok'); -$win->AddTitle("您要确实要删除栏目: [{$row['typename']}] 吗?"); -$win->AddItem('栏目的文件保存目录:', $row['typedir']); -$win->AddItem('是否删除文件:', " "); -$winform = $win->GetWindow('ok'); -$win->Display(); +DelType($id, $delfile); + UpDateCatCache(); + ShowMsg("成功删除一个栏目", "catalog_main.php"); + exit(); +} +$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); +$row = $dsql->GetOne(); +$wintitle = "删除栏目确认"; +$wecome_info = "栏目管理 >> 删除栏目确认"; +$win = new OxWindow(); +$win->Init('catalog_del.php', 'js/blank.js', 'POST'); +$win->AddHidden('id', $id); +$win->AddHidden('dopost', 'ok'); +$win->AddTitle("您要确实要删除栏目: [{$row['typename']}] 吗?"); +$win->AddItem('栏目的文件保存目录:', $row['typedir']); +$win->AddItem('是否删除文件:', " "); +$winform = $win->GetWindow('ok'); +$win->Display(); diff --git a/src/dede/catalog_do.php b/src/admin/catalog_do.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/catalog_do.php rename to src/admin/catalog_do.php index ff7773b8..95c7ec6e --- a/src/dede/catalog_do.php +++ b/src/admin/catalog_do.php @@ -1,299 +1,298 @@ -GetOne("SELECT addcon FROM #@__channeltype WHERE id='$channelid'"); - } else { - //根据栏目调用发布表单 - $row = $dsql->GetOne("SELECT ch.addcon FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$cid' "); - } - $gurl = $row["addcon"]; - if ($gurl == "") { - ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); - exit(); - } - - //跳转并传递参数 - header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); - exit(); -} -/*-------------------------- -//管理文档 -function listArchives(); ----------------------------*/ else if ($dopost == "listArchives") { - if (!empty($gurl)) { - if (empty($arcrank)) { - $arcrank = ''; - } - $gurl = str_replace('..', '', $gurl); - header("location:{$gurl}?arcrank={$arcrank}&cid={$cid}"); - exit(); - } - if ($cid > 0) { - $row = $dsql->GetOne("SELECT #@__arctype.typename,#@__channeltype.typename AS channelname,#@__channeltype.id,#@__channeltype.mancon FROM #@__arctype LEFT JOIN #@__channeltype on #@__channeltype.id=#@__arctype.channeltype WHERE #@__arctype.id='$cid'"); - $gurl = $row["mancon"]; - $channelid = $row["id"]; - $typename = $row["typename"]; - $channelname = $row["channelname"]; - if ($gurl == "") { - ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); - exit(); - } - } else if ($channelid > 0) { - $row = $dsql->GetOne("SELECT typename,id,mancon FROM #@__channeltype WHERE id='$channelid'"); - $gurl = $row["mancon"]; - $channelid = $row["id"]; - $typename = ""; - $channelname = $row["typename"]; - } - - if (empty($gurl)) $gurl = 'content_list.php'; - header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); - exit(); -} -/*-------------------------- -//浏览通用模板目录 -function viewTempletDir(); ----------------------------*/ else if ($dopost == "viewTemplet") { - header("location:tpl.php?path=/".$cfg_df_style); - exit(); -} -/*------------------------ -浏览单个页面的栏目 -function ViewSgPage() -------------------------*/ else if ($dopost == "viewSgPage") { - require_once(DEDEINC."/arc.listview.class.php"); - $lv = new ListView($cid); - $pageurl = $lv->MakeHtml(); - ShowMsg("更新缓冲,请稍后...", $pageurl); - exit(); -} -/*------------------------ -更改栏目排列顺序 -function upRank() -------------------------*/ else if ($dopost == "upRank") { - //检查权限许可 - CheckPurview('t_Edit,t_AccEdit'); - - //检查栏目操作许可 - CheckCatalog($cid, "您无权更改本栏目"); - $row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='$cid'"); - $reid = $row['reid']; - $sortrank = $row['sortrank']; - $row = $dsql->GetOne("SELECT sortrank FROM #@__arctype WHERE sortrank<=$sortrank AND reid=$reid ORDER BY sortrank DESC "); - if (is_array($row)) { - $sortrank = $row['sortrank'] - 1; - $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='$sortrank' WHERE id='$cid'"); - } - UpDateCatCache(); - ShowMsg("操作成功,返回目录...", "catalog_main.php"); - exit(); -} else if ($dopost == "upRankAll") { - //检查权限许可 - CheckPurview('t_Edit'); - $row = $dsql->GetOne("SELECT id FROM #@__arctype ORDER BY id DESC"); - if (is_array($row)) { - $maxID = $row['id']; - for ($i = 1; $i <= $maxID; $i++) { - if (isset(${'sortrank'.$i})) { - $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='".(${'sortrank'.$i})."' WHERE id='{$i}';"); - } - } - } - UpDateCatCache(); - ShowMsg("操作成功,正在返回...", "catalog_main.php"); - exit(); -} -/*-------------------------- -//更新栏目缓存 -function UpCatlogCache(); ----------------------------*/ else if ($dopost == "upcatcache") { - UpDateCatCache(); - $sql = " TRUNCATE TABLE `#@__arctiny`"; - $dsql->ExecuteNoneQuery($sql); - - //导入普通模型微数据 - $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) - SELECT id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid FROM `#@__archives` "; - $dsql->ExecuteNoneQuery($sql); - - //导入单表模型微数据 - $dsql->SetQuery("SELECT id,addtable FROM `#@__channeltype` WHERE id < -1 "); - $dsql->Execute(); - $doarray = array(); - while ($row = $dsql->GetArray()) { - $tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']); - if (empty($tb) || isset($doarray[$tb])) { - continue; - } else { - $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) - SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` "; - $rs = $dsql->executenonequery($sql); - $doarray[$tb] = 1; - } - } - ShowMsg("操作成功,正在返回...", "catalog_main.php"); - exit(); -} -/*--------------------- -获取JS文件 -function GetJs -----------------------*/ else if ($dopost == "GetJs") { - header("location:makehtml_js.php"); - exit(); -} -/*----------- -获得子类的内容 -function GetSunListsMenu(); ------------*/ else if ($dopost == "GetSunListsMenu") { - $userChannel = $cuserLogin->getUserChannel(); - require_once(DEDEINC."/typeunit.class.menu.php"); - AjaxHead(); - PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); - $tu = new TypeUnit($userChannel); - $tu->LogicListAllSunType($cid, " "); -} -/*----------- -获得子类的内容 -function GetSunLists(); ------------*/ else if ($dopost == "GetSunLists") { - require_once(DEDEINC."/typeunit.class.admin.php"); - AjaxHead(); - PutCookie('lastCid', $cid, 3600 * 24, "/"); - $tu = new TypeUnit(); - $tu->dsql = $dsql; - echo " \r\n"; - $tu->LogicListAllSunType($cid, " "); - echo "
\r\n"; - $tu->Close(); -} -/*---------------- -合并栏目 -function unitCatalog() { } ------------------*/ else if ($dopost == 'unitCatalog') { - CheckPurview('t_Move'); - require_once(DEDEINC.'/oxwindow.class.php'); - require_once(DEDEINC.'/typelink.class.php'); - require_once(DEDEINC.'/channelunit.func.php'); - if (empty($nextjob)) { - $typeid = isset($typeid) ? intval($typeid) : 0; - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE reid='$typeid' "); - $tl = new TypeLink($typeid); - $typename = $tl->TypeInfos['typename']; - $reid = $tl->TypeInfos['reid']; - $channelid = $tl->TypeInfos['channeltype']; - if (!empty($row['dd'])) { - ShowMsg("栏目: $typename($typeid) 有子栏目,不能进行合并操作", '-1'); - exit(); - } - $typeOptions = $tl->GetOptionArray(0, 0, $channelid); - $wintitle = '合并栏目'; - $wecome_info = "栏目管理 >> 合并栏目"; - $win = new OxWindow(); - $win->Init('catalog_do.php', 'js/blank.js', 'POST'); - $win->AddHidden('dopost', 'unitCatalog'); - $win->AddHidden('typeid', $typeid); - $win->AddHidden('channelid', $channelid); - $win->AddHidden('nextjob', 'unitok'); - $win->AddTitle("合并目录时不会删除原来的栏目目录,合并后需手动更新目标栏目的文档HTML和列表HTML。"); - $win->AddItem('您选择的栏目是:', "$typename($typeid)"); - $win->AddItem('您希望合并到那个栏目?', ""); - $win->AddItem('注意事项:', '栏目不能有下级子栏目,只允许子级到更高级或同级或不同父级的情况。'); - $winform = $win->GetWindow('ok'); - $win->Display(); - exit(); - } else { - if ($typeid == $unittype) { - ShowMsg("同一栏目无法合并,请后退重试", '-1'); - exit(); - } - if (IsParent($unittype, $typeid)) { - ShowMsg('不能从父类合并到子类', 'catalog_main.php'); - exit(); - } - $row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = (empty($row['addtable']) ? '#@__addonarticle' : $row['addtable']); - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid2='$unittype' WHERE typeid2='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__addonspec` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id='$typeid' "); - UpDateCatCache(); - ShowMsg('成功合并指定栏目', 'catalog_main.php'); - exit(); - } -} -/*---------------- -移动栏目 -function moveCatalog() { } ------------------*/ else if ($dopost == 'moveCatalog') { - CheckPurview('t_Move'); - require_once(DEDEINC.'/oxwindow.class.php'); - require_once(DEDEINC.'/typelink.class.php'); - require_once(DEDEINC.'/channelunit.func.php'); - if (empty($nextjob)) { - $tl = new TypeLink($typeid); - $typename = $tl->TypeInfos['typename']; - $reid = $tl->TypeInfos['reid']; - $channelid = $tl->TypeInfos['channeltype']; - $typeOptions = $tl->GetOptionArray(0, 0, $channelid); - $wintitle = "移动栏目"; - $wecome_info = "栏目管理 >> 移动栏目"; - $win = new OxWindow(); - $win->Init('catalog_do.php', 'js/blank.js', 'POST'); - $win->AddHidden('dopost', 'moveCatalog'); - $win->AddHidden('typeid', $typeid); - $win->AddHidden('channelid', $channelid); - $win->AddHidden('nextjob', 'unitok'); - $win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。"); - $win->AddItem('您选择的栏目是:', "$typename($typeid)"); - $win->AddItem('您希望移动到那个栏目?', ""); - $win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。'); - $winform = $win->GetWindow('ok'); - $win->Display(); - exit(); - } else { - if ($typeid == $movetype) { - ShowMsg('移对对象和目标位置相同', 'catalog_main.php'); - exit(); - } - if (IsParent($movetype, $typeid)) { - ShowMsg('不能从父类移动到子类', 'catalog_main.php'); - exit(); - } - $dsql->ExecuteNoneQuery(" UPDATE `#@__arctype` SET reid='$movetype' WHERE id='$typeid' "); - UpDateCatCache(); - ShowMsg('成功移动目录', 'catalog_main.php'); - exit(); - } -} +GetOne("SELECT addcon FROM #@__channeltype WHERE id='$channelid'"); + } else { + //根据栏目调用发布表单 + $row = $dsql->GetOne("SELECT ch.addcon FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$cid' "); + } + $gurl = $row["addcon"]; + if ($gurl == "") { + ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); + exit(); + } + + //跳转并传递参数 + header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); + exit(); +} +/*-------------------------- +//管理文档 +function listArchives(); +---------------------------*/ else if ($dopost == "listArchives") { + if (!empty($gurl)) { + if (empty($arcrank)) { + $arcrank = ''; + } + $gurl = str_replace('..', '', $gurl); + header("location:{$gurl}?arcrank={$arcrank}&cid={$cid}"); + exit(); + } + if ($cid > 0) { + $row = $dsql->GetOne("SELECT #@__arctype.typename,#@__channeltype.typename AS channelname,#@__channeltype.id,#@__channeltype.mancon FROM #@__arctype LEFT JOIN #@__channeltype on #@__channeltype.id=#@__arctype.channeltype WHERE #@__arctype.id='$cid'"); + $gurl = $row["mancon"]; + $channelid = $row["id"]; + $typename = $row["typename"]; + $channelname = $row["channelname"]; + if ($gurl == "") { + ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); + exit(); + } + } else if ($channelid > 0) { + $row = $dsql->GetOne("SELECT typename,id,mancon FROM #@__channeltype WHERE id='$channelid'"); + $gurl = $row["mancon"]; + $channelid = $row["id"]; + $typename = ""; + $channelname = $row["typename"]; + } + + if (empty($gurl)) $gurl = 'content_list.php'; + header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); + exit(); +} +/*-------------------------- +//浏览通用模板目录 +function viewTempletDir(); +---------------------------*/ else if ($dopost == "viewTemplet") { + header("location:tpl.php?path=/".$cfg_df_style); + exit(); +} +/*------------------------ +浏览单个页面的栏目 +function ViewSgPage() +------------------------*/ else if ($dopost == "viewSgPage") { + require_once(DEDEINC."/arc.listview.class.php"); + $lv = new ListView($cid); + $pageurl = $lv->MakeHtml(); + ShowMsg("更新缓冲,请稍后...", $pageurl); + exit(); +} +/*------------------------ +修改栏目排列顺序 +function upRank() +------------------------*/ else if ($dopost == "upRank") { + //检查权限许可 + CheckPurview('t_Edit,t_AccEdit'); + + //检查栏目操作许可 + CheckCatalog($cid, "您无权修改本栏目"); + $row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='$cid'"); + $reid = $row['reid']; + $sortrank = $row['sortrank']; + $row = $dsql->GetOne("SELECT sortrank FROM #@__arctype WHERE sortrank<=$sortrank AND reid=$reid ORDER BY sortrank DESC "); + if (is_array($row)) { + $sortrank = $row['sortrank'] - 1; + $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='$sortrank' WHERE id='$cid'"); + } + UpDateCatCache(); + ShowMsg("操作成功,返回目录...", "catalog_main.php"); + exit(); +} else if ($dopost == "upRankAll") { + //检查权限许可 + CheckPurview('t_Edit'); + $row = $dsql->GetOne("SELECT id FROM #@__arctype ORDER BY id DESC"); + if (is_array($row)) { + $maxID = $row['id']; + for ($i = 1; $i <= $maxID; $i++) { + if (isset(${'sortrank'.$i})) { + $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='".(${'sortrank'.$i})."' WHERE id='{$i}';"); + } + } + } + UpDateCatCache(); + ShowMsg("操作成功,正在返回...", "catalog_main.php"); + exit(); +} +/*-------------------------- +//更新栏目缓存 +function UpCatlogCache(); +---------------------------*/ else if ($dopost == "upcatcache") { + UpDateCatCache(); + $sql = " TRUNCATE TABLE `#@__arctiny`"; + $dsql->ExecuteNoneQuery($sql); + + //导入普通模型微数据 + $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) + SELECT id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid FROM `#@__archives` "; + $dsql->ExecuteNoneQuery($sql); + + //导入单表模型微数据 + $dsql->SetQuery("SELECT id,addtable FROM `#@__channeltype` WHERE id < -1 "); + $dsql->Execute(); + $doarray = array(); + while ($row = $dsql->GetArray()) { + $tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']); + if (empty($tb) || isset($doarray[$tb])) { + continue; + } else { + $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) + SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` "; + $rs = $dsql->executenonequery($sql); + $doarray[$tb] = 1; + } + } + ShowMsg("操作成功,正在返回...", "catalog_main.php"); + exit(); +} +/*--------------------- +获取JS文件 +function GetJs +----------------------*/ else if ($dopost == "GetJs") { + header("location:makehtml_js.php"); + exit(); +} +/*----------- +获得子类的内容 +function GetSunListsMenu(); +-----------*/ else if ($dopost == "GetSunListsMenu") { + $userChannel = $cuserLogin->getUserChannel(); + require_once(DEDEINC."/typeunit.class.menu.php"); + AjaxHead(); + PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); + $tu = new TypeUnit($userChannel); + $tu->LogicListAllSunType($cid, " "); +} +/*----------- +获得子类的内容 +function GetSunLists(); +-----------*/ else if ($dopost == "GetSunLists") { + require_once(DEDEINC."/typeunit.class.admin.php"); + AjaxHead(); + PutCookie('lastCid', $cid, 3600 * 24, "/"); + $tu = new TypeUnit(); + $tu->dsql = $dsql; + echo " \r\n"; + $tu->LogicListAllSunType($cid, " "); + echo "
\r\n"; + $tu->Close(); +} +/*---------------- +合并栏目 +function unitCatalog() { } +-----------------*/ else if ($dopost == 'unitCatalog') { + CheckPurview('t_Move'); + require_once(DEDEINC.'/oxwindow.class.php'); + require_once(DEDEINC.'/typelink.class.php'); + require_once(DEDEINC.'/channelunit.func.php'); + if (empty($nextjob)) { + $typeid = isset($typeid) ? intval($typeid) : 0; + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE reid='$typeid' "); + $tl = new TypeLink($typeid); + $typename = $tl->TypeInfos['typename']; + $reid = $tl->TypeInfos['reid']; + $channelid = $tl->TypeInfos['channeltype']; + if (!empty($row['dd'])) { + ShowMsg("栏目: $typename($typeid) 有子栏目,不能进行合并操作", '-1'); + exit(); + } + $typeOptions = $tl->GetOptionArray(0, 0, $channelid); + $wintitle = '合并栏目'; + $wecome_info = "栏目管理 >> 合并栏目"; + $win = new OxWindow(); + $win->Init('catalog_do.php', 'js/blank.js', 'POST'); + $win->AddHidden('dopost', 'unitCatalog'); + $win->AddHidden('typeid', $typeid); + $win->AddHidden('channelid', $channelid); + $win->AddHidden('nextjob', 'unitok'); + $win->AddTitle("合并目录时不会删除原来的栏目目录,合并后需手动更新目标栏目的文档HTML和列表HTML。"); + $win->AddItem('您选择的栏目是:', "$typename($typeid)"); + $win->AddItem('您希望合并到那个栏目?', ""); + $win->AddItem('注意事项:', '栏目不能有下级子栏目,只允许子级到更高级或同级或不同父级的情况。'); + $winform = $win->GetWindow('ok'); + $win->Display(); + exit(); + } else { + if ($typeid == $unittype) { + ShowMsg("同一栏目无法合并,请后退重试", '-1'); + exit(); + } + if (IsParent($unittype, $typeid)) { + ShowMsg('不能从父类合并到子类', 'catalog_main.php'); + exit(); + } + $row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = (empty($row['addtable']) ? '#@__addonarticle' : $row['addtable']); + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid2='$unittype' WHERE typeid2='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__addonspec` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id='$typeid' "); + UpDateCatCache(); + ShowMsg('成功合并指定栏目', 'catalog_main.php'); + exit(); + } +} +/*---------------- +移动栏目 +function moveCatalog() { } +-----------------*/ else if ($dopost == 'moveCatalog') { + CheckPurview('t_Move'); + require_once(DEDEINC.'/oxwindow.class.php'); + require_once(DEDEINC.'/typelink.class.php'); + require_once(DEDEINC.'/channelunit.func.php'); + if (empty($nextjob)) { + $tl = new TypeLink($typeid); + $typename = $tl->TypeInfos['typename']; + $reid = $tl->TypeInfos['reid']; + $channelid = $tl->TypeInfos['channeltype']; + $typeOptions = $tl->GetOptionArray(0, 0, $channelid); + $wintitle = "移动栏目"; + $wecome_info = "栏目管理 >> 移动栏目"; + $win = new OxWindow(); + $win->Init('catalog_do.php', 'js/blank.js', 'POST'); + $win->AddHidden('dopost', 'moveCatalog'); + $win->AddHidden('typeid', $typeid); + $win->AddHidden('channelid', $channelid); + $win->AddHidden('nextjob', 'unitok'); + $win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。"); + $win->AddItem('您选择的栏目是:', "$typename($typeid)"); + $win->AddItem('您希望移动到那个栏目?', ""); + $win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。'); + $winform = $win->GetWindow('ok'); + $win->Display(); + exit(); + } else { + if ($typeid == $movetype) { + ShowMsg('移对对象和目标位置相同', 'catalog_main.php'); + exit(); + } + if (IsParent($movetype, $typeid)) { + ShowMsg('不能从父类移动到子类', 'catalog_main.php'); + exit(); + } + $dsql->ExecuteNoneQuery(" UPDATE `#@__arctype` SET reid='$movetype' WHERE id='$typeid' "); + UpDateCatCache(); + ShowMsg('成功移动目录', 'catalog_main.php'); + exit(); + } +} diff --git a/src/dede/catalog_edit.php b/src/admin/catalog_edit.php old mode 100755 new mode 100644 similarity index 67% rename from src/dede/catalog_edit.php rename to src/admin/catalog_edit.php index 3fbeefc0..827a0562 --- a/src/dede/catalog_edit.php +++ b/src/admin/catalog_edit.php @@ -1,246 +1,251 @@ -ExecuteNoneQuery($upquery)) { - ShowMsg("保存当前栏目更改时失败,请检查您的输入资料是否存在问题", "-1"); - exit(); - } - //如果选择子栏目可投稿,更新顶级栏目为可投稿 - if ($topid > 0 && $issend == 1) { - $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); - } - $slinks = " id IN (".GetSonIds($id).")"; - //修改顶级栏目时强制修改下级的多站点支持属性 - if ($topid == 0 && preg_match("#,#", $slinks)) { - $upquery = "UPDATE `#@__arctype` SET moresite='$moresite', siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' WHERE 1=1 AND $slinks"; - $dsql->ExecuteNoneQuery($upquery); - } - //更改子栏目属性 - if (!empty($upnext)) { - $upquery = "UPDATE `#@__arctype` SET - issend='$issend', - defaultname='$defaultname', - channeltype='$channeltype', - tempindex='$tempindex', - templist='$templist', - temparticle='$temparticle', - namerule='$namerule', - namerule2='$namerule2', - ishidden='$ishidden' - WHERE 1=1 AND $slinks"; - if (!$dsql->ExecuteNoneQuery($upquery)) { - ShowMsg("更改当前栏目成功,但更改下级栏目属性时失败", "-1"); - exit(); - } - } - UpDateCatCache(); - ShowMsg("成功更改一个分类", "catalog_main.php"); - exit(); -} //End Save Action -else if ($dopost == "savetime") { - $uptopsql = ''; - $slinks = " id IN (".GetSonIds($id).")"; - //顶级栏目二级域名根目录处理 - if ($topid == 0 && $moresite == 1) { - $sitepath = $typedir; - $uptopsql = " ,sitepath='$sitepath' "; - if (preg_match("#,#", $slinks)) { - $upquery = "UPDATE `#@__arctype` SET sitepath='$sitepath' WHERE $slinks"; - $dsql->ExecuteNoneQuery($upquery); - } - } - //如果选择子栏目可投稿,更新顶级栏目为可投稿 - if ($topid > 0 && $issend == 1) { - $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); - } - $upquery = "UPDATE `#@__arctype` SET - issend='$issend', - sortrank='$sortrank', - typedir='$typedir', - typename='$typename', - isdefault='$isdefault', - defaultname='$defaultname', - ispart='$ispart', - corank='$corank' $uptopsql - WHERE id='$id' "; - if (!$dsql->ExecuteNoneQuery($upquery)) { - ShowMsg("保存当前栏目更改时失败,请检查您的输入资料是否存在问题", "-1"); - exit(); - } - UpDateCatCache(); - ShowMsg("成功更改一个分类", "catalog_main.php"); - exit(); -} -//读取栏目信息 -$dsql->SetQuery("SELECT tp.*,ch.typename as ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id"); -$myrow = $dsql->GetOne(); -$topid = $myrow['topid']; -if ($topid > 0) { - $toprow = $dsql->GetOne("SELECT moresite,siteurl,sitepath FROM `#@__arctype` WHERE id=$topid"); - foreach ($toprow as $k => $v) { - if (!preg_match("#[0-9]#", $k)) { - $myrow[$k] = $v; - } - } -} -$myrow['content'] = empty($myrow['content']) ? " " : $myrow['content']; -//读取频道模型信息 -$channelid = $myrow['channeltype']; -$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $channelArray[$row->id]['typename'] = $row->typename; - $channelArray[$row->id]['nid'] = $row->nid; - if ($row->id == $channelid) { - $nid = $row->nid; - } -} -PutCookie('lastCid', GetTopid($id), 3600 * 24, "/"); -if ($dopost == 'time') { -?> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 当前是快捷编辑模式,您要修改更详细的参数,请使用高级模式 -
是否支持投稿: - - -
内容模型: - $arr) { - if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}"; - } - ?> - 修改 -
栏目名称:
排列顺序: (由低 -> 高)
浏览权限: - (仅限制栏目里的文档浏览权限) -
文件保存目录:
栏目列表选项: - - -
默认页的名称:
栏目属性: -
-
- -
- - -
-
-ExecuteNoneQuery($upquery)) { + ShowMsg("保存当前栏目修改时失败,请检查您的输入资料是否存在问题", "-1"); + exit(); + } + //如果选择子栏目可投稿,更新顶级栏目为可投稿 + if ($topid > 0 && $issend == 1) { + $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); + } + $slinks = " id IN (".GetSonIds($id).")"; + //修改顶级栏目时强制修改下级的多站点支持属性 + if ($topid == 0 && preg_match("#,#", $slinks)) { + $upquery = "UPDATE `#@__arctype` SET moresite='$moresite', siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' WHERE 1=1 AND $slinks"; + $dsql->ExecuteNoneQuery($upquery); + } + //修改子栏目属性 + if (!empty($upnext)) { + $upquery = "UPDATE `#@__arctype` SET + issend='$issend', + defaultname='$defaultname', + channeltype='$channeltype', + tempindex='$tempindex', + templist='$templist', + temparticle='$temparticle', + namerule='$namerule', + namerule2='$namerule2', + ishidden='$ishidden' + WHERE 1=1 AND $slinks"; + if (!$dsql->ExecuteNoneQuery($upquery)) { + ShowMsg("修改当前栏目成功,但修改下级栏目属性时失败", "-1"); + exit(); + } + } + UpDateCatCache(); + ShowMsg("成功修改一个分类", "catalog_main.php"); + exit(); +}//End Save Action +else if ($dopost == "savetime") { + $uptopsql = ''; + $slinks = " id IN (".GetSonIds($id).")"; + //顶级栏目二级域名根目录处理 + if ($topid == 0 && $moresite == 1) { + $sitepath = $typedir; + $uptopsql = " ,sitepath='$sitepath' "; + if (preg_match("#,#", $slinks)) { + $upquery = "UPDATE `#@__arctype` SET sitepath='$sitepath' WHERE $slinks"; + $dsql->ExecuteNoneQuery($upquery); + } + } + //如果选择子栏目可投稿,更新顶级栏目为可投稿 + if ($topid > 0 && $issend == 1) { + $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); + } + $upquery = "UPDATE `#@__arctype` SET + issend='$issend', + sortrank='$sortrank', + typedir='$typedir', + typename='$typename', + isdefault='$isdefault', + defaultname='$defaultname', + ispart='$ispart', + corank='$corank' $uptopsql + WHERE id='$id' "; + if (!$dsql->ExecuteNoneQuery($upquery)) { + ShowMsg("保存当前栏目修改时失败,请检查您的输入资料是否存在问题", "-1"); + exit(); + } + UpDateCatCache(); + ShowMsg("成功修改一个分类", "catalog_main.php"); + exit(); +} +//读取栏目信息 +$dsql->SetQuery("SELECT tp.*,ch.typename as ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id"); +$myrow = $dsql->GetOne(); +$topid = $myrow['topid']; +if ($topid > 0) { + $toprow = $dsql->GetOne("SELECT moresite,siteurl,sitepath FROM `#@__arctype` WHERE id=$topid"); + foreach ($toprow as $k => $v) { + if (!preg_match("#[0-9]#", $k)) { + $myrow[$k] = $v; + } + } +} +$myrow['content'] = empty($myrow['content']) ? " " : $myrow['content']; +//读取频道模型信息 +$channelid = $myrow['channeltype']; +$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $channelArray[$row->id]['typename'] = $row->typename; + $channelArray[$row->id]['nid'] = $row->nid; + if ($row->id == $channelid) { + $nid = $row->nid; + } +} +PutCookie('lastCid', GetTopid($id), 3600 * 24, "/"); +if ($dopost == 'time') { +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 当前是快捷编辑模式,如果您要修改更详细的参数,请使用高级模式>> +
是否支持投稿: +   + +
内容模型: + $arr) { + if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}"; + } + ?> + [修改] +
栏目名称:
排列顺序: (由低 -> 高)
浏览权限:(仅限制栏目里的文档浏览权限)
文件保存目录:
栏目列表选项: + + + +
默认页的名称:
栏目属性: +
+
+
+ +     + +
+
+ \ No newline at end of file diff --git a/src/dede/catalog_main.php b/src/admin/catalog_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/catalog_main.php rename to src/admin/catalog_main.php index 974fd6ac..b57a4c51 --- a/src/dede/catalog_main.php +++ b/src/admin/catalog_main.php @@ -1,15 +1,14 @@ -getUserChannel(); -include DedeInclude('templets/catalog_main.htm'); +getUserChannel(); +include DedeInclude('templets/catalog_main.htm'); diff --git a/src/dede/catalog_menu.php b/src/admin/catalog_menu.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/catalog_menu.php rename to src/admin/catalog_menu.php index 18ac59ba..563184b0 --- a/src/dede/catalog_menu.php +++ b/src/admin/catalog_menu.php @@ -1,24 +1,23 @@ -getUserChannel(); -if (empty($opendir)) $opendir = -1; -if ($userChannel > 0) $opendir = $userChannel; - -if ($cuserLogin->adminStyle == 'dedecms') { - include DedeInclude('templets/catalog_menu.htm'); - exit(); -} else { - include DedeInclude('templets/catalog_menu2.htm'); - exit(); -} +getUserChannel(); +if (empty($opendir)) $opendir = -1; +if ($userChannel > 0) $opendir = $userChannel; + +if ($cuserLogin->adminStyle == 'dedecms') { + include DedeInclude('templets/catalog_menu.htm'); + exit(); +} else { + include DedeInclude('templets/catalog_menu2.htm'); + exit(); +} diff --git a/src/dede/config.php b/src/admin/config.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/config.php rename to src/admin/config.php index bca94e9f..e1d2eead --- a/src/dede/config.php +++ b/src/admin/config.php @@ -40,7 +40,7 @@ if (!isset($GLOBALS['csrf_token']) || $GLOBALS['csrf_token'] === null) { if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') { PutCookie('dede_csrf_token', $GLOBALS['csrf_token'], 7200, '/'); } -//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行更改这个选项 +//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行修改这个选项 $dedeNowurl = $s_scriptName = ''; $isUrlOpen = @ini_get('allow_url_fopen'); $dedeNowurl = GetCurUrl(); diff --git a/src/dede/content_att.php b/src/admin/content_att.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/content_att.php rename to src/admin/content_att.php index 15a86bef..78174646 --- a/src/dede/content_att.php +++ b/src/admin/content_att.php @@ -1,30 +1,29 @@ -ExecuteNoneQuery($query); - } - echo ""; -} - -include DedeInclude('templets/content_att.htm'); +ExecuteNoneQuery($query); + } + echo ""; +} + +include DedeInclude('templets/content_att.htm'); diff --git a/src/dede/content_batch_up.php b/src/admin/content_batch_up.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/content_batch_up.php rename to src/admin/content_batch_up.php index 0d5cd4f7..3b30af26 --- a/src/dede/content_batch_up.php +++ b/src/admin/content_batch_up.php @@ -1,14 +1,13 @@ - 0) $gwhere .= " AND id>= $startid "; -if ($endid > $startid) $gwhere .= " AND id<= $endid "; -$idsql = ''; - -if ($typeid != 0) { - $ids = GetSonIds($typeid); - $gwhere .= " AND typeid IN($ids) "; -} -if ($seltime == 1) { - $t1 = GetMkTime($starttime); - $t2 = GetMkTime($endtime); - $gwhere .= " AND (senddate >= $t1 AND senddate <= $t2) "; -} -if (!empty($userid)) { - $row = $dsql->GetOne("SELECT `mid` FROM #@__member WHERE `userid` LIKE '$userid'"); - if (is_array($row)) { - $gwhere .= " AND mid = {$row['mid']} "; - } -} -//特殊操作 -if (!empty($heightdone)) $action = $heightdone; - -//指量审核 -if ($action == 'check') { - if (empty($startid) || empty($endid) || $endid < $startid) { - ShowMsg('该操作必须指定起始ID', 'javascript:;'); - exit(); - } - $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; - $jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; - $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); - $dsql->SetQuery("SELECT id,arcrank FROM `#@__arctiny` $gwhere"); - $dsql->Execute('c'); - while ($row = $dsql->GetObject('c')) { - if ($row->arcrank == -1) { - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank=0 WHERE id='{$row->id}'"); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank=0 WHERE id='{$row->id}'"); - } - } - ShowMsg("完成数据库的审核处理,准备更新HTML...", $jumpurl); - exit(); -} -//批量删除 -else if ($action == 'del') { - if (empty($startid) || empty($endid) || $endid < $startid) { - ShowMsg('该操作必须指定起始ID', 'javascript:;'); - exit(); - } - $dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); - $dsql->Execute('x'); - $tdd = 0; - while ($row = $dsql->GetObject('x')) { - if (DelArc($row->id)) $tdd++; - } - ShowMsg("成功删除 $tdd 条记录", "javascript:;"); - exit(); -} -//删除空标题文档 -else if ($action == 'delnulltitle') { - $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE trim(title)='' "); - $dsql->Execute('x'); - $tdd = 0; - while ($row = $dsql->GetObject('x')) { - if (DelArc($row->id)) $tdd++; - } - ShowMsg("成功删除 $tdd 条记录", "javascript:;"); - exit(); -} -//删除空内容文章 -else if ($action == 'delnullbody') { - $dsql->SetQuery("SELECT aid FROM `#@__addonarticle` WHERE LENGTH(body) < 10 "); - $dsql->Execute('x'); - $tdd = 0; - while ($row = $dsql->GetObject('x')) { - if (DelArc($row->aid)) $tdd++; - } - ShowMsg("成功删除 $tdd 条记录", "javascript:;"); - exit(); -} -//修正缩略图错误 -else if ($action == 'modddpic') { - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET litpic='' WHERE trim(litpic)='litpic' "); - ShowMsg("成功修正缩略图错误", "javascript:;"); - exit(); -} -//批量移动 -else if ($action == 'move') { - if (empty($typeid)) { - ShowMsg('该操作必须指定栏目', 'javascript:;'); - exit(); - } - $typeold = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$typeid'; "); - $typenew = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$newtypeid'; "); - if (!is_array($typenew)) { - ShowMsg("无法检测移动到的新栏目的信息,不能完成操作", "javascript:;"); - exit(); - } - if ($typenew['ispart'] != 0) { - ShowMsg("您不能把数据移动到非最终列表的栏目", "javascript:;"); - exit(); - } - if ($typenew['channeltype'] != $typeold['channeltype']) { - ShowMsg("不能把数据移动到内容类型不同的栏目", "javascript:;"); - exit(); - } - $gwhere .= " And channel='".$typenew['channeltype']."' And title like '%$keyword%'"; - - $ch = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id={$typenew['channeltype']} "); - $addtable = $ch['addtable']; - - $dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); - $dsql->Execute('m'); - $tdd = 0; - while ($row = $dsql->GetObject('m')) { - $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$newtypeid' WHERE id='{$row->id}'"); - $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$newtypeid' WHERE id='{$row->id}'"); - if ($addtable != '') { - $dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$newtypeid' WHERE aid='{$row->id}' "); - } - if ($rs) $tdd++; - //DelArc($row->id,true); - } - - if ($tdd > 0) { - $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; - $jumpurl .= "&typeid=$newtypeid&pagesize=20&seltime=$seltime"; - $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); - ShowMsg("成功移动 $tdd 条记录,准备重新生成HTML...", $jumpurl); - } else { - ShowMsg("完成操作,没移动任何数据...", "javascript:;"); - } -} -//删除空标题内容 -else if ($action == 'delnulltitle') { - $dsql->SetQuery("SELECT id FROM #@__archives WHERE trim(title)='' "); - $dsql->Execute('x'); - $tdd = 0; - while ($row = $dsql->GetObject('x')) { - if (DelArc($row->id)) $tdd++; - } - ShowMsg("成功删除 $tdd 条记录", "javascript:;"); - exit(); -} -//修正缩略图错误 -else if ($action == 'modddpic') { - $dsql->ExecuteNoneQuery("UPDATE #@__archives SET litpic='' WHERE trim(litpic)='litpic' "); - ShowMsg("成功修正缩略图错误", "javascript:;"); - exit(); -} + 0) $gwhere .= " AND id>= $startid "; +if ($endid > $startid) $gwhere .= " AND id<= $endid "; +$idsql = ''; + +if ($typeid != 0) { + $ids = GetSonIds($typeid); + $gwhere .= " AND typeid IN($ids) "; +} +if ($seltime == 1) { + $t1 = GetMkTime($starttime); + $t2 = GetMkTime($endtime); + $gwhere .= " AND (senddate >= $t1 AND senddate <= $t2) "; +} +if (!empty($userid)) { + $row = $dsql->GetOne("SELECT `mid` FROM #@__member WHERE `userid` LIKE '$userid'"); + if (is_array($row)) { + $gwhere .= " AND mid = {$row['mid']} "; + } +} +//特殊操作 +if (!empty($heightdone)) $action = $heightdone; + +//指量审核 +if ($action == 'check') { + if (empty($startid) || empty($endid) || $endid < $startid) { + ShowMsg('该操作必须指定起始ID', 'javascript:;'); + exit(); + } + $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; + $jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; + $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); + $dsql->SetQuery("SELECT id,arcrank FROM `#@__arctiny` $gwhere"); + $dsql->Execute('c'); + while ($row = $dsql->GetObject('c')) { + if ($row->arcrank == -1) { + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank=0 WHERE id='{$row->id}'"); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank=0 WHERE id='{$row->id}'"); + } + } + ShowMsg("完成数据库的审核处理,准备更新HTML...", $jumpurl); + exit(); +} +//批量删除 +else if ($action == 'del') { + if (empty($startid) || empty($endid) || $endid < $startid) { + ShowMsg('该操作必须指定起始ID', 'javascript:;'); + exit(); + } + $dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); + $dsql->Execute('x'); + $tdd = 0; + while ($row = $dsql->GetObject('x')) { + if (DelArc($row->id)) $tdd++; + } + ShowMsg("成功删除 $tdd 条记录", "javascript:;"); + exit(); +} +//删除空标题文档 +else if ($action == 'delnulltitle') { + $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE trim(title)='' "); + $dsql->Execute('x'); + $tdd = 0; + while ($row = $dsql->GetObject('x')) { + if (DelArc($row->id)) $tdd++; + } + ShowMsg("成功删除 $tdd 条记录", "javascript:;"); + exit(); +} +//删除空内容文章 +else if ($action == 'delnullbody') { + $dsql->SetQuery("SELECT aid FROM `#@__addonarticle` WHERE LENGTH(body) < 10 "); + $dsql->Execute('x'); + $tdd = 0; + while ($row = $dsql->GetObject('x')) { + if (DelArc($row->aid)) $tdd++; + } + ShowMsg("成功删除 $tdd 条记录", "javascript:;"); + exit(); +} +//修正缩略图错误 +else if ($action == 'modddpic') { + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET litpic='' WHERE trim(litpic)='litpic' "); + ShowMsg("成功修正缩略图错误", "javascript:;"); + exit(); +} +//批量移动 +else if ($action == 'move') { + if (empty($typeid)) { + ShowMsg('该操作必须指定栏目', 'javascript:;'); + exit(); + } + $typeold = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$typeid'; "); + $typenew = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$newtypeid'; "); + if (!is_array($typenew)) { + ShowMsg("无法检测移动到的新栏目的信息,不能完成操作", "javascript:;"); + exit(); + } + if ($typenew['ispart'] != 0) { + ShowMsg("您不能把数据移动到非最终列表的栏目", "javascript:;"); + exit(); + } + if ($typenew['channeltype'] != $typeold['channeltype']) { + ShowMsg("不能把数据移动到内容类型不同的栏目", "javascript:;"); + exit(); + } + $gwhere .= " And channel='".$typenew['channeltype']."' And title like '%$keyword%'"; + + $ch = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id={$typenew['channeltype']} "); + $addtable = $ch['addtable']; + + $dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); + $dsql->Execute('m'); + $tdd = 0; + while ($row = $dsql->GetObject('m')) { + $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$newtypeid' WHERE id='{$row->id}'"); + $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$newtypeid' WHERE id='{$row->id}'"); + if ($addtable != '') { + $dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$newtypeid' WHERE aid='{$row->id}' "); + } + if ($rs) $tdd++; + //DelArc($row->id,true); + } + + if ($tdd > 0) { + $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; + $jumpurl .= "&typeid=$newtypeid&pagesize=20&seltime=$seltime"; + $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); + ShowMsg("成功移动 $tdd 条记录,准备重新生成HTML...", $jumpurl); + } else { + ShowMsg("完成操作,没移动任何数据...", "javascript:;"); + } +} +//删除空标题内容 +else if ($action == 'delnulltitle') { + $dsql->SetQuery("SELECT id FROM #@__archives WHERE trim(title)='' "); + $dsql->Execute('x'); + $tdd = 0; + while ($row = $dsql->GetObject('x')) { + if (DelArc($row->id)) $tdd++; + } + ShowMsg("成功删除 $tdd 条记录", "javascript:;"); + exit(); +} +//修正缩略图错误 +else if ($action == 'modddpic') { + $dsql->ExecuteNoneQuery("UPDATE #@__archives SET litpic='' WHERE trim(litpic)='litpic' "); + ShowMsg("成功修正缩略图错误", "javascript:;"); + exit(); +} diff --git a/src/dede/content_i_list.php b/src/admin/content_i_list.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/content_i_list.php rename to src/admin/content_i_list.php index e9444ce1..c5af00c7 --- a/src/dede/content_i_list.php +++ b/src/admin/content_i_list.php @@ -1,13 +1,12 @@ -getUserID(); -} - -$adminid = $cuserLogin->getUserID(); -$maintable = '#@__archives'; -setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); -$tl = new TypeLink($cid); - -//---------------------------------------- -//在不指定排序条件和关键字的情况下直接统计微表 -//---------------------------------------- -if (empty($totalresult) && empty($keyword) && empty($orderby) && empty($flag)) { - $tinyQuerys = array(); - - if (!empty($userCatalogSql)) { - $tinyQuerys[] = str_replace('arc.', '', $userCatalogSql); - } - - if (!empty($channelid) && empty($cid)) { - $tinyQuerys[] = " channel = '$channelid' "; - } else { - $tinyQuerys[] = " channel>0 "; - } - - if (!empty($arcrank)) { - $tinyQuerys[] = " arcrank='$arcrank' "; - } else { - $tinyQuerys[] = " arcrank > -2 "; - } - - if (!empty($mid)) { - $tinyQuerys[] = " mid='$mid' "; - } - - if (!empty($cid)) { - $tinyQuerys[] = " typeid in(".GetSonIds($cid).") "; - } - - if (count($tinyQuerys) > 0) { - $tinyQuery = "WHERE ".join(' AND ', $tinyQuerys); - } - // 缓存处理 - $sql = "SELECT COUNT(*) AS dd FROM `#@__arctiny` $tinyQuery "; - $arr = $dsql->GetOne($sql); - $totalresult = $arr['dd']; -} - -if ($cid == 0) { - if ($channelid == 0) { - $positionname = '所有栏目>'; - } else { - $row = $tl->dsql->GetOne("SELECT id,typename,maintable FROM `#@__channeltype` WHERE id='$channelid'"); - $positionname = $row['typename']." > "; - $maintable = $row['maintable']; - $channelid = $row['id']; - } -} else { - $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; -} - -//当选择的是单表模型栏目时,直接跳转到单表模型管理区 -if ( - empty($channelid) - && isset($tl->TypeInfos['channeltype']) -) { - $channelid = $tl->TypeInfos['channeltype']; -} -if ($channelid < -1) { - header("location:content_sg_list.php?f=$f&cid=$cid&channelid=$channelid&keyword=$keyword"); - exit(); -} - - -// 栏目大于800则需要缓存数据 -$optHash = md5($cid.serialize($admin_catalogs).$channelid); -$optCache = DEDEDATA."/tplcache/inc_option_$optHash.inc"; - -$typeCount = 0; -if (file_exists($cache1)) require_once($cache1); -else $cfg_Cs = array(); -$typeCount = count($cfg_Cs); -if ($typeCount > 800) { - if (file_exists($optCache)) { - $optionarr = file_get_contents($optCache); - } else { - $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); - file_put_contents($optCache, $optionarr); - } -} else { - $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); -} - -$whereSql = empty($channelid) ? " WHERE arc.channel > 0 AND arc.arcrank > -2 " : " WHERE arc.channel = '$channelid' AND arc.arcrank > -2 "; - -$flagsArr = ''; -$dsql->Execute('f', 'SELECT * FROM `#@__arcatt` ORDER BY sortid ASC'); -while ($frow = $dsql->GetArray('f')) { - $flagsArr .= ($frow['att'] == $flag ? "\r\n" : "\r\n"); -} - - -if (!empty($userCatalogSql)) { - $whereSql .= " AND ".$userCatalogSql; -} -if (!empty($mid)) { - $whereSql .= " AND arc.mid = '$mid' "; -} -if ($keyword != '') { - $whereSql .= " AND ( CONCAT(arc.title,arc.writer) LIKE '%$keyword%') "; -} -if ($flag != '') { - $whereSql .= " AND FIND_IN_SET('$flag', arc.flag) "; -} -if ($cid != 0) { - $whereSql .= ' AND arc.typeid IN ('.GetSonIds($cid).')'; -} -if ($arcrank != '') { - $whereSql .= " AND arc.arcrank = '$arcrank' "; - $CheckUserSend = ""; -} else { - $CheckUserSend = ""; -} - -$orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby); -$orderbyField = 'arc.'.$orderby; - -$query = "SELECT arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake, -arc.channel,arc.arcrank,arc.click,arc.title,arc.color,arc.litpic,arc.pubdate,arc.mid -FROM `$maintable` arc -$whereSql -ORDER BY $orderbyField DESC"; - -if (empty($f) || !preg_match("#form#", $f)) $f = 'form1.arcid1'; - -//初始化 -$dlist = new DataListCP(); -$dlist->pageSize = 30; - -//GET参数 -$dlist->SetParameter('dopost', 'listArchives'); -$dlist->SetParameter('keyword', $keyword); -if (!empty($mid)) $dlist->SetParameter('mid', $mid); -$dlist->SetParameter('cid', $cid); -$dlist->SetParameter('flag', $flag); -$dlist->SetParameter('orderby', $orderby); -$dlist->SetParameter('arcrank', $arcrank); -$dlist->SetParameter('channelid', $channelid); -$dlist->SetParameter('f', $f); - -//模板 -if (empty($s_tmplets)) $s_tmplets = 'templets/content_list.htm'; -$dlist->SetTemplate(DEDEADMIN.'/'.$s_tmplets); - -//查询 -$dlist->SetSource($query); - -//显示 -$dlist->Display(); -// echo $dlist->queryTime; -$dlist->Close(); +getUserID(); +} + +$adminid = $cuserLogin->getUserID(); +$maintable = '#@__archives'; +setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); +$tl = new TypeLink($cid); + +//---------------------------------------- +//在不指定排序条件和关键字的情况下直接统计微表 +//---------------------------------------- +if (empty($totalresult) && empty($keyword) && empty($orderby) && empty($flag)) { + $tinyQuerys = array(); + + if (!empty($userCatalogSql)) { + $tinyQuerys[] = str_replace('arc.', '', $userCatalogSql); + } + + if (!empty($channelid) && empty($cid)) { + $tinyQuerys[] = " channel = '$channelid' "; + } else { + $tinyQuerys[] = " channel>0 "; + } + + if (!empty($arcrank)) { + $tinyQuerys[] = " arcrank='$arcrank' "; + } else { + $tinyQuerys[] = " arcrank > -2 "; + } + + if (!empty($mid)) { + $tinyQuerys[] = " mid='$mid' "; + } + + if (!empty($cid)) { + $tinyQuerys[] = " typeid in(".GetSonIds($cid).") "; + } + + if (count($tinyQuerys) > 0) { + $tinyQuery = "WHERE ".join(' AND ', $tinyQuerys); + } + //缓存处理 + $sql = "SELECT COUNT(*) AS dd FROM `#@__arctiny` $tinyQuery "; + $arr = $dsql->GetOne($sql); + $totalresult = $arr['dd']; +} + +if ($cid == 0) { + if ($channelid == 0) { + $positionname = '所有栏目>'; + } else { + $row = $tl->dsql->GetOne("SELECT id,typename,maintable FROM `#@__channeltype` WHERE id='$channelid'"); + $positionname = $row['typename']." > "; + $maintable = $row['maintable']; + $channelid = $row['id']; + } +} else { + $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; +} + +//当选择的是单表模型栏目时,直接跳转到单表模型管理区 +if ( + empty($channelid) + && isset($tl->TypeInfos['channeltype']) +) { + $channelid = $tl->TypeInfos['channeltype']; +} +if ($channelid < -1) { + header("location:content_sg_list.php?f=$f&cid=$cid&channelid=$channelid&keyword=$keyword"); + exit(); +} + + +//栏目大于800则需要缓存数据 +$optHash = md5($cid.serialize($admin_catalogs).$channelid); +$optCache = DEDEDATA."/tplcache/inc_option_$optHash.inc"; + +$typeCount = 0; +if (file_exists($cache1)) require_once($cache1); +else $cfg_Cs = array(); +$typeCount = count($cfg_Cs); +if ($typeCount > 800) { + if (file_exists($optCache)) { + $optionarr = file_get_contents($optCache); + } else { + $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); + file_put_contents($optCache, $optionarr); + } +} else { + $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); +} + +$whereSql = empty($channelid) ? " WHERE arc.channel > 0 AND arc.arcrank > -2 " : " WHERE arc.channel = '$channelid' AND arc.arcrank > -2 "; + +$flagsArr = ''; +$dsql->Execute('f', 'SELECT * FROM `#@__arcatt` ORDER BY sortid ASC'); +while ($frow = $dsql->GetArray('f')) { + $flagsArr .= ($frow['att'] == $flag ? "\r\n" : "\r\n"); +} + + +if (!empty($userCatalogSql)) { + $whereSql .= " AND ".$userCatalogSql; +} +if (!empty($mid)) { + $whereSql .= " AND arc.mid = '$mid' "; +} +if ($keyword != '') { + $whereSql .= " AND ( CONCAT(arc.title,arc.writer) LIKE '%$keyword%') "; +} +if ($flag != '') { + $whereSql .= " AND FIND_IN_SET('$flag', arc.flag) "; +} +if ($cid != 0) { + $whereSql .= ' AND arc.typeid IN ('.GetSonIds($cid).')'; +} +if ($arcrank != '') { + $whereSql .= " AND arc.arcrank = '$arcrank' "; + $CheckUserSend = ""; +} else { + $CheckUserSend = ""; +} + +$orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby); +$orderbyField = 'arc.'.$orderby; + +$query = "SELECT arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake, +arc.channel,arc.arcrank,arc.click,arc.title,arc.color,arc.litpic,arc.pubdate,arc.mid +FROM `$maintable` arc +$whereSql +ORDER BY $orderbyField DESC"; + +if (empty($f) || !preg_match("#form#", $f)) $f = 'form1.arcid1'; + +//初始化 +$dlist = new DataListCP(); +$dlist->pageSize = 30; + +//GET参数 +$dlist->SetParameter('dopost', 'listArchives'); +$dlist->SetParameter('keyword', $keyword); +if (!empty($mid)) $dlist->SetParameter('mid', $mid); +$dlist->SetParameter('cid', $cid); +$dlist->SetParameter('flag', $flag); +$dlist->SetParameter('orderby', $orderby); +$dlist->SetParameter('arcrank', $arcrank); +$dlist->SetParameter('channelid', $channelid); +$dlist->SetParameter('f', $f); + +//模板 +if (empty($s_tmplets)) $s_tmplets = 'templets/content_list.htm'; +$dlist->SetTemplate(DEDEADMIN.'/'.$s_tmplets); + +//查询 +$dlist->SetSource($query); + +//显示 +$dlist->Display(); +//echo $dlist->queryTime; +$dlist->Close(); diff --git a/src/dede/content_s_list.php b/src/admin/content_s_list.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/content_s_list.php rename to src/admin/content_s_list.php index 75cb8ec2..0ba6c169 --- a/src/dede/content_s_list.php +++ b/src/admin/content_s_list.php @@ -1,16 +1,15 @@ -getUserChannel(); - } else { - CheckCatalog($cid, "您无权浏览非指定栏目的内容"); - } -} - -$adminid = $cuserLogin->getUserID(); -$maintable = '#@__archives'; -require_once(DEDEINC."/typelink.class.php"); -require_once(DEDEINC."/datalistcp.class.php"); -require_once(DEDEADMIN."/inc/inc_list_functions.php"); -setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); -$tl = new TypeLink($cid); -$listtable = @trim($tl->TypeInfos['addtable']); -if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $channelid) { - ShowMsg('您没权限访问此页', 'javascript:;'); - exit(); -} - -if ($cid == 0) { - $row = $tl->dsql->GetOne("SELECT typename,addtable FROM `#@__channeltype` WHERE id='$channelid'"); - $positionname = $row['typename']." > "; - $listtable = $row['addtable']; -} else { - $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; -} - -$optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); -$whereSql = $channelid == 0 ? " WHERE arc.channel < -1 " : " WHERE arc.channel = '$channelid' "; - -if (!empty($mid)) $whereSql .= " AND arc.mid = '$mid' "; -if ($keyword != '') $whereSql .= " AND (arc.title like '%$keyword%') "; -if ($cid != 0) $whereSql .= " AND arc.typeid in (".GetSonIds($cid).")"; - -if ($arcrank != '') { - $whereSql .= " AND arc.arcrank = '$arcrank' "; - $CheckUserSend = ""; -} else { - $CheckUserSend = ""; -} - -$query = "SELECT arc.aid,arc.aid as id,arc.typeid,arc.arcrank,arc.flag,arc.senddate,arc.channel,arc.title,arc.mid,arc.click,tp.typename,ch.typename as channelname -FROM `$listtable` arc -LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid -LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel -$whereSql -ORDER BY arc.aid DESC"; -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("dopost", "listArchives"); -$dlist->SetParameter("keyword", $keyword); -$dlist->SetParameter("cid", $cid); -$dlist->SetParameter("channelid", $channelid); -$dlist->SetTemplate(DEDEADMIN."/templets/content_sg_list.htm"); -$dlist->SetSource($query); -$dlist->Display(); -$dlist->Close(); +getUserChannel(); + } else { + CheckCatalog($cid, "您无权浏览非指定栏目的内容"); + } +} + +$adminid = $cuserLogin->getUserID(); +$maintable = '#@__archives'; +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEADMIN."/inc/inc_list_functions.php"); +setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); +$tl = new TypeLink($cid); +$listtable = @trim($tl->TypeInfos['addtable']); +if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $channelid) { + ShowMsg('您没权限访问此页', 'javascript:;'); + exit(); +} + +if ($cid == 0) { + $row = $tl->dsql->GetOne("SELECT typename,addtable FROM `#@__channeltype` WHERE id='$channelid'"); + $positionname = $row['typename']." > "; + $listtable = $row['addtable']; +} else { + $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; +} + +$optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); +$whereSql = $channelid == 0 ? " WHERE arc.channel < -1 " : " WHERE arc.channel = '$channelid' "; + +if (!empty($mid)) $whereSql .= " AND arc.mid = '$mid' "; +if ($keyword != '') $whereSql .= " AND (arc.title like '%$keyword%') "; +if ($cid != 0) $whereSql .= " AND arc.typeid in (".GetSonIds($cid).")"; + +if ($arcrank != '') { + $whereSql .= " AND arc.arcrank = '$arcrank' "; + $CheckUserSend = ""; +} else { + $CheckUserSend = ""; +} + +$query = "SELECT arc.aid,arc.aid as id,arc.typeid,arc.arcrank,arc.flag,arc.senddate,arc.channel,arc.title,arc.mid,arc.click,tp.typename,ch.typename as channelname +FROM `$listtable` arc +LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid +LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel +$whereSql +ORDER BY arc.aid DESC"; +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("dopost", "listArchives"); +$dlist->SetParameter("keyword", $keyword); +$dlist->SetParameter("cid", $cid); +$dlist->SetParameter("channelid", $channelid); +$dlist->SetTemplate(DEDEADMIN."/templets/content_sg_list.htm"); +$dlist->SetSource($query); +$dlist->Display(); +$dlist->Close(); diff --git a/src/dede/content_tj.php b/src/admin/content_tj.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/content_tj.php rename to src/admin/content_tj.php index a1df8f24..50735b5c --- a/src/dede/content_tj.php +++ b/src/admin/content_tj.php @@ -1,51 +1,50 @@ -GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); -$row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` "); -$row3 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__member` "); - -/** - * 获取文档 - * - * @param object $dsql - * @param string $ordertype 排序类型 - * @return string - */ -function GetArchives($dsql, $ordertype) -{ - $starttime = time() - (24 * 3600 * 30); - if ($ordertype == 'monthFeedback' || $ordertype == 'monthHot') { - $swhere = " where senddate>$starttime "; - } else { - $swhere = ""; - } - if (preg_match("#feedback#", $ordertype)) { - $ordersql = " ORDER BY scores DESC "; - } else { - $ordersql = " ORDER BY click DESC "; - } - $query = "SELECT id,title,click,scores FROM `#@__archives` $swhere $ordersql LIMIT 0,20 "; - $dsql->SetQuery($query); - $dsql->Execute('ga'); - while ($row = $dsql->GetObject('ga')) { - if (preg_match("#feedback#i", $ordertype)) { - $moreinfo = "[id}'>评论:{$row->scores}]"; - } else { - $moreinfo = "[点击:{$row->click}]"; - } - echo "·"; - echo cn_substr($row->title, 30)."{$moreinfo}
\r\n"; - } -} -include DedeInclude('templets/content_tj.htm'); +GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); +$row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` "); +$row3 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__member` "); + +/** + * 获取文档 + * + * @param object $dsql + * @param string $ordertype 排序类型 + * @return string + */ +function GetArchives($dsql, $ordertype) +{ + $starttime = time() - (24 * 3600 * 30); + if ($ordertype == 'monthFeedback' || $ordertype == 'monthHot') { + $swhere = " where senddate>$starttime "; + } else { + $swhere = ""; + } + if (preg_match("#feedback#", $ordertype)) { + $ordersql = " ORDER BY scores DESC "; + } else { + $ordersql = " ORDER BY click DESC "; + } + $query = "SELECT id,title,click,scores FROM #@__archives $swhere $ordersql LIMIT 0,20 "; + $dsql->SetQuery($query); + $dsql->Execute('ga'); + while ($row = $dsql->GetObject('ga')) { + if (preg_match("#feedback#i", $ordertype)) { + $moreinfo = "[id}'>评论:{$row->scores}]"; + } else { + $moreinfo = "[点击:{$row->click}]"; + } + echo "·"; + echo cn_substr($row->title, 30)."{$moreinfo}
\r\n"; + } +} +include DedeInclude('templets/content_tj.htm'); diff --git a/src/dede/css/albumupload.css b/src/admin/css/albumupload.css similarity index 100% rename from src/dede/css/albumupload.css rename to src/admin/css/albumupload.css diff --git a/src/admin/css/base.css b/src/admin/css/base.css new file mode 100644 index 00000000..1ddbb0f8 --- /dev/null +++ b/src/admin/css/base.css @@ -0,0 +1 @@ +*{font-size:12px;letter-spacing:.4px}body{font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;line-height:1.5}form,h1,h2,h3,ul,ol,div{margin:0;padding:0}td{line-height:1.5}td,th,div{word-break:break-all;word-wrap:break-word}b,strong{font-weight:400}li,dd{margin:0;padding:0;list-style-type:none}label{display:inline-block;margin:10px 0}input{padding:.25rem .5rem;height:calc(1.5em + .75rem + 2px);line-height:18px;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}input[type=radio],input[type=checkbox]{height:auto;box-shadow:none;outline:none}input[type=button],input[type=submit],input[type=reset]{padding:.25rem .5rem;height:auto;line-height:1.5;color:#fff;background:#28a745;border-radius:.2rem;transition:all .6s;border:0}input[type=button]:focus,input[type=submit]:focus,input[type=reset]:focus{background:#006829;border-color:#005b24;box-shadow:0 0 0 0.2rem rgba(38,159,86,.5)}input:focus,textarea:focus{border-color:#28a745;box-shadow:0 0 2px #28a745;outline:none}textarea{padding:.25rem .5rem;line-height:18px;font-family:Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}select{height:calc(1.5em + .75rem + 2px);padding:.25rem .5rem;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s}img{margin-right:6px;border-radius:.2rem;vertical-align:baseline}h1,h2,h3{font-size:18px;color:#424b51}a:link{color:#424b51;text-decoration:none}a:hover{opacity:.8}a:visited{color:#666}.np{border:0}.linerow{border-bottom:1px solid #ACACAC}.coolbg{padding:.25rem .5rem;background:#f2f2f2;border-bottom:1px solid #ccc;border-radius:.2rem;border:0;cursor:pointer}.coolbg2{height:18px;background:#DFDDD2;border:1px solid #000}.ll{border-right:2px solid #ACACAC;border-bottom:2px solid #ACACAC;background:#E6E6E6}.bline{height:36px;background:#fff;border-bottom:1px solid #eee}#uploadfield{float:left}.bline2{border-bottom:1px solid #eee}.coolbt{border-left:1px solid #EFEFEF;border-top:1px solid #EFEFEF;border-bottom:1px solid #ACACAC;background:#E4F7D7;cursor:pointer}.coolbt2{border-left:1px solid #EFEFEF;border-top:1px solid #EFEFEF;border-bottom:1px solid #ACACAC;background:#F7FCDA}.coolbg3{width:140px;height:20px;border:1px solid #BDC5B4;background:#DFDDD2;text-align:right}.coolbg61{width:380px;height:26px;line-height:26px;border-top:1px solid #BDC5B4;border-left:1px solid #BDC5B4;border-right:1px solid #BDC5B4;background:#E7F3B1;text-align:right}.coolbg62{padding:6px;width:380px;height:300px;border:1px solid #BDC5B4;background:#F8FDF0}.coolbg4{width:190px;height:24px;line-height:24px;border-bottom:1px solid #C9CFC1;background:#F9FCDC url(../images/dlgtitle.gif)repeat-x;text-align:right}.coolbg5{width:190px;height:6px;border-top:1px solid #BDC5B4;background:#F9FCDC}.wsselect{height:60px;line-height:24px;background:#FCFEF1;overflow:auto}.dlg{padding:.25rem .5rem;border:2px solid #008E38;background:#F0FAEB;width:360px;line-height:160%}.pubdlg{background:#fff;border:4px solid #008E38;border-radius:.2rem;z-index:8888}.pubdlg .title{height:29px;line-height:29px;border-bottom:1px solid #C9CFC1;background:url(../images/dlgtitle.gif)repeat-x;text-align:left;cursor:move}.pubdlg .titLeft{float:left;padding-left:10px;line-height:29px;font-weight:600;color:#424b51}.pubdlg .titRight{float:right;padding:0}.fullpagediv{position:absolute;top:0;left:0;width:100%;height:120%;background:#cdcdcd;opacity:.5;z-index:1999}.quicksel{margin-left:10px;margin-top:10px;width:680px;height:420px;overflow:auto;z-index:10005}.quickselfoot{padding-top:8px;border-top:1px dashed #C0CC9D}.quickselItem{margin-bottom:8px}.quickselItem .topcat{padding-left:6px;line-height:24px;border-bottom:1px dashed #ccc;background:#FBFEEF;clear:both}.quickselItem .soncat{padding-left:10px}.quickselItem .item{float:left;margin-right:8px}.mysource,.mywriter{padding:.25rem .5rem;width:280px;line-height:160%;border:4px solid #008E38;background:#F0FAEB;z-index:10001}.dlgws div{width:100%}.dlgTesttitle{padding:.25rem .5rem;width:300px;line-height:150%;border:2px solid #008E38;background:#F0FAEB}#_mysource{z-index:10003}#_mywriter{z-index:10004}#uploadwait{z-index:19999}.option1{background:#DCECA6}.option2{background:#F7FBD2}.option3{background:#fff}.ininput{width:96%;height:20px;border:1px solid #fff}.nbt{padding:2px;background:#fff url(../images/allbtbg.gif);border:1px solid #A5AF83}.tdt{padding-left:6px}.waitpage{position:absolute;top:0;left:0;opacity:.7;background:#ababab url(../../images/loading1.gif)center no-repeat;z-index:10000}.divpre img{max-width:150px;max-height:100px}.divpre{overflow:hidden}.autoinput{padding-left:6px;width:90%}.bodytitle{margin:auto;width:98%;height:28px;border:1px dotted #BFD67C;background:url(../images/wbg.gif)}.bodytitle div{float:left}.bodytitletxt{padding-left:6px;line-height:28px}.tbtitle td{padding:6px}.tblist td{padding:6px;background:#fff}.tblist td.tbsname{padding:6px;background:#F9FFE6}.colordlg{padding:.25rem .5rem;width:100px;line-height:160%;border:2px dashed #008E38;background:#F0FAEB;z-index:10005}option.alltype{padding-left:16px;height:18px;line-height:18px;background:url(../images/arr4.gif)3px 4px no-repeat}option.btype{padding-left:16px;height:18px;line-height:18px;background:url(../images/arr4.gif)3px 4px no-repeat}option.stype{padding-left:26px;height:18px;line-height:18px;background:url(../images/arrr.gif)10px 4px no-repeat}.ilist{border-top:1px dashed #eee;border-bottom:1px dashed #eee;border-left:1px dashed #eee}.ilist td{border-right:1px dashed #eee}#typeid2{padding:0;float:left;height:18px;font-size:12px;background:url(../images/typeid2bg.gif)no-repeat;border:0}#litpic{margin-left:-20px;width:85px;height:20px;opacity:0;cursor:pointer}.litpic_span{margin-left:-60px;width:76px;height:22px;overflow:hidden;cursor:pointer}#starttime,#endtime,#pubdate,#uptime{padding-left:30px;background:url(../images/calendar.gif)10px no-repeat}#title{background:url(../images/ruler.gif)repeat-x 0px 10px}.spec{width:60px}.gtab a{display:block;float:left;width:80px;height:26px;line-height:26px;text-align:center}.albCt img{cursor:pointer}.maintable{width:98%!important;border:1px solid #dee2e6}span.page-link{color:#fff;background:#28a745}a.btn{color:white!important}.btn-success{background:#28a745;border-color:#28a745}.table{color:#424b51}.table td,.table th{padding:.6rem;vertical-align:middle}.table th img,.table td img{vertical-align:text-bottom} \ No newline at end of file diff --git a/src/dede/css/boxy.css b/src/admin/css/boxy.css old mode 100755 new mode 100644 similarity index 97% rename from src/dede/css/boxy.css rename to src/admin/css/boxy.css index f64e7786..e9faef37 --- a/src/dede/css/boxy.css +++ b/src/admin/css/boxy.css @@ -1,53 +1,53 @@ -.boxy-wrapper { position: absolute; } -.boxy-wrapper.fixed { position: fixed; } - - /* Modal */ - - .boxy-modal-blackout { position: absolute; background-color: black; left: 0; top: 0; } - - /* Border */ - - .boxy-wrapper { empty-cells: show; } - .boxy-wrapper .top-left, - .boxy-wrapper .top-right, - .boxy-wrapper .bottom-right, - .boxy-wrapper .bottom-left { width: 10px; height: 10px; padding: 0 } - - .boxy-wrapper .top-left { background: url('../images/boxy-nw.png'); } - .boxy-wrapper .top-right { background: url('../images/boxy-ne.png'); } - .boxy-wrapper .bottom-right { background: url('../images/boxy-se.png'); } - .boxy-wrapper .bottom-left { background: url('../images/boxy-sw.png'); } - - /* IE6+7 hacks for the border. IE7 should support this natively but fails in conjuction with modal blackout bg. */ - /* NB: these must be absolute paths or URLs to your images */ - .boxy-wrapper .top-left { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-nw.png'); } - .boxy-wrapper .top-right { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-ne.png'); } - .boxy-wrapper .bottom-right { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-se.png'); } - .boxy-wrapper .bottom-left { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-sw.png'); } - - .boxy-wrapper .top, - .boxy-wrapper .bottom { height: 10px; background-color: #693; opacity: 0.6; filter: alpha(opacity=60); padding: 0 } - - .boxy-wrapper .left, - .boxy-wrapper .right { width: 10px; background-color: #693; opacity: 0.6; filter: alpha(opacity=60); padding: 0 } - - /* Title bar */ - - .boxy-wrapper .title-bar { - padding: 6px; - position: relative; - background: #693; -} - .boxy-wrapper .title-bar.dragging { cursor: move; } - .boxy-wrapper .title-bar h2 { font-size: 12px; color: white; line-height: 1; margin: 0; padding: 0; font-weight: normal; } - .boxy-wrapper .title-bar .close { color: white; position: absolute; top: 6px; right: 6px; font-size: 90%; line-height: 1; } - - /* Content Region */ - - .boxy-inner { background-color: white; padding: 0 } - .boxy-content { padding: 15px; } - - /* Question Boxes */ - - .boxy-wrapper .question { width: 350px; min-height: 80px; } - .boxy-wrapper .answers { text-align: right; } +.boxy-wrapper { position: absolute; } +.boxy-wrapper.fixed { position: fixed; } + + /* Modal */ + + .boxy-modal-blackout { position: absolute; background-color: black; left: 0; top: 0; } + + /* Border */ + + .boxy-wrapper { empty-cells: show; } + .boxy-wrapper .top-left, + .boxy-wrapper .top-right, + .boxy-wrapper .bottom-right, + .boxy-wrapper .bottom-left { width: 10px; height: 10px; padding: 0 } + + .boxy-wrapper .top-left { background: url('../images/boxy-nw.png'); } + .boxy-wrapper .top-right { background: url('../images/boxy-ne.png'); } + .boxy-wrapper .bottom-right { background: url('../images/boxy-se.png'); } + .boxy-wrapper .bottom-left { background: url('../images/boxy-sw.png'); } + + /* IE6+7 hacks for the border. IE7 should support this natively but fails in conjuction with modal blackout bg. */ + /* NB: these must be absolute paths or URLs to your images */ + .boxy-wrapper .top-left { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-nw.png'); } + .boxy-wrapper .top-right { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-ne.png'); } + .boxy-wrapper .bottom-right { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-se.png'); } + .boxy-wrapper .bottom-left { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-sw.png'); } + + .boxy-wrapper .top, + .boxy-wrapper .bottom { height: 10px; background-color: #693; opacity: 0.6; filter: alpha(opacity=60); padding: 0 } + + .boxy-wrapper .left, + .boxy-wrapper .right { width: 10px; background-color: #693; opacity: 0.6; filter: alpha(opacity=60); padding: 0 } + + /* Title bar */ + + .boxy-wrapper .title-bar { + padding: 6px; + position: relative; + background: #693; +} + .boxy-wrapper .title-bar.dragging { cursor: move; } + .boxy-wrapper .title-bar h2 { font-size: 12px; color: white; line-height: 1; margin: 0; padding: 0; font-weight: normal; } + .boxy-wrapper .title-bar .close { color: white; position: absolute; top: 6px; right: 6px; font-size: 90%; line-height: 1; } + + /* Content Region */ + + .boxy-inner { background-color: white; padding: 0 } + .boxy-content { padding: 15px; } + + /* Question Boxes */ + + .boxy-wrapper .question { width: 350px; min-height: 80px; } + .boxy-wrapper .answers { text-align: right; } diff --git a/src/dede/css/codemirror.css b/src/admin/css/codemirror.css similarity index 100% rename from src/dede/css/codemirror.css rename to src/admin/css/codemirror.css diff --git a/src/admin/css/frame.css b/src/admin/css/frame.css new file mode 100644 index 00000000..a1f15b0f --- /dev/null +++ b/src/admin/css/frame.css @@ -0,0 +1 @@ +*{padding:0;margin:0;box-sizing:border-box}a{text-decoration:none}html,body{width:100%;height:100%}body{height:100%;font-size:12px;overflow:hidden;z-index:1}body.showmenu{background:url(../images/leftmenu_bg.gif)-10px top repeat-y}body.hidemenu{background:none}ul{list-style:none}form{margin:0;padding:0}.head{width:100%;height:76px;overflow:hidden;z-index:8;position:relative}.top{height:46px;width:100%;background-image:linear-gradient(135deg,#008E38 0%,#639709 50%);overflow:hidden;clear:both}.top .top_logo{float:left;margin-left:30px;height:46px;line-height:46px}.top .top_logo a{font-size:18px;font-weight:600;color:#fff}.top .top_version{display:inline-block;margin-top:12px;margin-left:10px;color:#fff}.top .top_link{float:right;margin-right:30px}.top .top_link ul{float:left;line-height:46px;overflow:hidden}.top .top_link ul li.welcome img{margin-top:-2px;margin-right:10px;width:30px;height:30px;vertical-align:middle;border-radius:50%}.top .top_link ul li{float:left;color:#fff}.top .top_link ul li a{color:#fff;padding-left:20px}.top .top_link ul li a:hover{color:#ccc}.top .top_link .quick{padding:3px 0px 0px 0px;float:left}.top .top_link .quick a{display:block;color:#C60;float:left;line-height:21px;height:21px;overflow:hidden}.topnav{width:100%;height:30px;line-height:30px;background:#393d49;overflow:hidden;clear:both}.topnav .menuact{width:168px;float:left;padding-left:30px;overflow:hidden}.topnav .menuact a{overflow:hidden;color:#eee;padding-right:10px}.topnav .menuact a:hover{color:#fff}.nav{float:left;padding-left:2px;line-height:26px;color:#999}.nav ul li{float:left;display:block;margin-left:4px}.nav ul li a{padding:0 10px 0px 10px;color:#FFCC00}.nav ul li a:hover{color:#fff}.nav ul li a.thisclass,.nav ul li a.thisclass:hover{color:#4E8100;display:block;font-weight:bold;background:#fff;line-height:23px;border-top:2px solid #FFDE59;margin-top:4px;padding:0 10px 0px 10px}.sysmsg{padding-right:30px;float:right;width:500px;color:#999;overflow:hidden}.scroll{float:right;overflow:hidden}.scroll ul li,.sysmsg ul li a{color:#bbb}.scroll ul li a:hover{text-decoration:underline}.scroll a{padding-left:10px;color:#fff}body.showmenu .left{display:block}body.hidemenu .left{display:none}body.showmenu .right{left:220px}body.hidemenu .right{left:0}.left{position:absolute;top:76px;width:220px;left:0;bottom:0;z-index:7}.menu{height:100%}.top_link{font-size:12px}.menu iframe{height:100%;width:99.99%;z-index:20}.right{position:absolute;right:0;top:76px;bottom:0;z-index:7}.main{height:100%}.main iframe{height:100%;width:99.99%;z-index:20}.qucikmenu{position:absolute;right:10px;top:32px;z-index:9;display:none}.qucikmenu ul{width:110px;list-style:none;border:1px solid #E7E7E7;background:#fff}.qucikmenu ul li{display:block;text-align:left}.qucikmenu ul li a{height:30px;line-height:30px;display:block;color:#666;padding-left:10px;padding-right:10px}.qucikmenu ul li a:hover{background:#F7F7F7}.pagemask{width:100%;height:100%;background:#424b51;position:absolute;z-index:100;filter:alpha(opacity=70);-moz-opacity:.7;opacity:.7;display:none}.iframemask{position:absolute;z-index:80;top:0;left:0;background:#fff;border:none;filter:alpha(opacity=0);-moz-opacity:0;opacity:0;height:100%;width:100%;display:none}.allmenu{margin-left:-400px;padding:10px;display:none;width:800px;position:absolute;top:76px;left:50%;z-index:999;background:#fff;border-radius:.2rem}.allmenu .allmenu-box{margin:0 auto;text-align:left;overflow:hidden;padding-left:2px}.maptop{float:left;width:130px;overflow:hidden;padding-right:6px;padding-left:6px;margin-left:-1px}.maptop dt.bigitem{padding:5px 10px;line-height:18px;color:#fff;background:#424b51}.mapitem dt{line-height:30px;font-weight:bold;text-indent:10px;background:#EFF1F1}.mapitem ul{margin-top:10px;margin-bottom:10px}.mapitem ul li{text-indent:20px;line-height:24px;background:url(../images/arrr.gif)0 8px no-repeat}.allmenu a{color:#5C604F}.allmenu a:hover{color:#F63}#login .theme{clear:both;padding:10px;width:70%;margin-top:20px}#login .theme li{margin-bottom:15px;margin-top:5px;overflow:hidden}#login .theme span{display:inline-block;float:left;width:150px;height:22px;line-height:22px;color:#424b51;text-align:right}input[type="text"],input[type="password"]{padding:2px 4px;width:140px;height:18px;line-height:18px;border-width:1px;border-style:solid;border-color:#fff;background:#fff;vertical-align:middle}input[type="text"]:focus,input[type="password"]:focus{box-shadow:none;outline:none}* html input.text{width:220px;border:1px solid #a7a6aa;background:#fff url(../images/input.gif)0 0 no-repeat;margin-top:-1px;margin-right:5px;margin-bottom:0;margin-left:2px;padding:3px;line-height:12px}* html input.radio{margin:-1px 0 0 -2px}.allsearch{float:left;margin-top:6px!important;font-size:12px;border:1px solid #fff;border-radius:.2rem}.np{margin-left:10px;width:40px;height:18px;font-size:12px;color:#fff;background:#57960f;border-radius:.2rem;border:none;cursor:pointer} \ No newline at end of file diff --git a/src/dede/css/indexbody.css b/src/admin/css/indexbody.css old mode 100755 new mode 100644 similarity index 100% rename from src/dede/css/indexbody.css rename to src/admin/css/indexbody.css diff --git a/src/dede/css/lurd.css b/src/admin/css/lurd.css old mode 100755 new mode 100644 similarity index 100% rename from src/dede/css/lurd.css rename to src/admin/css/lurd.css diff --git a/src/dede/css/menuold.css b/src/admin/css/menuold.css old mode 100755 new mode 100644 similarity index 100% rename from src/dede/css/menuold.css rename to src/admin/css/menuold.css diff --git a/src/dede/css/tb-box.css b/src/admin/css/tb-box.css old mode 100755 new mode 100644 similarity index 100% rename from src/dede/css/tb-box.css rename to src/admin/css/tb-box.css diff --git a/src/dede/dialog/config.php b/src/admin/dialog/config.php old mode 100755 new mode 100644 similarity index 87% rename from src/dede/dialog/config.php rename to src/admin/dialog/config.php index ba230da9..f874cf23 --- a/src/dede/dialog/config.php +++ b/src/admin/dialog/config.php @@ -1,37 +1,31 @@ -getUserID() <= 0) { - if (empty($adminDirHand)) { - ShowMsg("提示:需输入后台管理目录才能登录
请输入后台管理目录名:
", "javascript:;"); - exit(); - } - $adminDirHand = HtmlReplace($adminDirHand, 1); - $gurl = "../../{$adminDirHand}/login.php?gotopage=".urlencode($dedeNowurl); - echo ""; - exit(); -} +getUserID() <= 0) { + if (empty($adminDirHand)) { + ShowMsg("提示:需输入后台管理目录才能登录
请输入后台管理目录名:
", "javascript:;"); + exit(); + } + $adminDirHand = HtmlReplace($adminDirHand, 1); + $gurl = "../../{$adminDirHand}/login.php?gotopage=".urlencode($dedeNowurl); + echo ""; + exit(); +} \ No newline at end of file diff --git a/src/dede/dialog/img/addnews.gif b/src/admin/dialog/img/addnews.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/addnews.gif rename to src/admin/dialog/img/addnews.gif diff --git a/src/dede/dialog/img/adminuserico.gif b/src/admin/dialog/img/adminuserico.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/adminuserico.gif rename to src/admin/dialog/img/adminuserico.gif diff --git a/src/dede/dialog/img/allbg.gif b/src/admin/dialog/img/allbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/allbg.gif rename to src/admin/dialog/img/allbg.gif diff --git a/src/dede/dialog/img/book1.gif b/src/admin/dialog/img/book1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/book1.gif rename to src/admin/dialog/img/book1.gif diff --git a/src/dede/dialog/img/css.gif b/src/admin/dialog/img/css.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/css.gif rename to src/admin/dialog/img/css.gif diff --git a/src/dede/dialog/img/dir.gif b/src/admin/dialog/img/dir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/dir.gif rename to src/admin/dialog/img/dir.gif diff --git a/src/dede/dialog/img/dir2.gif b/src/admin/dialog/img/dir2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/dir2.gif rename to src/admin/dialog/img/dir2.gif diff --git a/src/dede/dialog/img/exe.gif b/src/admin/dialog/img/exe.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/exe.gif rename to src/admin/dialog/img/exe.gif diff --git a/src/dede/dialog/img/flash.gif b/src/admin/dialog/img/flash.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/flash.gif rename to src/admin/dialog/img/flash.gif diff --git a/src/dede/dialog/img/gif.gif b/src/admin/dialog/img/gif.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/gif.gif rename to src/admin/dialog/img/gif.gif diff --git a/src/dede/dialog/img/htm.gif b/src/admin/dialog/img/htm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/htm.gif rename to src/admin/dialog/img/htm.gif diff --git a/src/dede/dialog/img/img.gif b/src/admin/dialog/img/img.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/img.gif rename to src/admin/dialog/img/img.gif diff --git a/src/dede/dialog/img/jpg.gif b/src/admin/dialog/img/jpg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/jpg.gif rename to src/admin/dialog/img/jpg.gif diff --git a/src/dede/dialog/img/js.gif b/src/admin/dialog/img/js.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/js.gif rename to src/admin/dialog/img/js.gif diff --git a/src/dede/dialog/img/mp3.gif b/src/admin/dialog/img/mp3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/mp3.gif rename to src/admin/dialog/img/mp3.gif diff --git a/src/dede/dialog/img/php.gif b/src/admin/dialog/img/php.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/php.gif rename to src/admin/dialog/img/php.gif diff --git a/src/dede/dialog/img/picviewnone.gif b/src/admin/dialog/img/picviewnone.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/picviewnone.gif rename to src/admin/dialog/img/picviewnone.gif diff --git a/src/dede/dialog/img/rm.gif b/src/admin/dialog/img/rm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/rm.gif rename to src/admin/dialog/img/rm.gif diff --git a/src/dede/dialog/img/sp_bg.gif b/src/admin/dialog/img/sp_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/sp_bg.gif rename to src/admin/dialog/img/sp_bg.gif diff --git a/src/dede/dialog/img/tbg.gif b/src/admin/dialog/img/tbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/tbg.gif rename to src/admin/dialog/img/tbg.gif diff --git a/src/dede/dialog/img/tbgv.gif b/src/admin/dialog/img/tbgv.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/tbgv.gif rename to src/admin/dialog/img/tbgv.gif diff --git a/src/dede/dialog/img/txt.gif b/src/admin/dialog/img/txt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/txt.gif rename to src/admin/dialog/img/txt.gif diff --git a/src/dede/dialog/img/wbg.gif b/src/admin/dialog/img/wbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/wbg.gif rename to src/admin/dialog/img/wbg.gif diff --git a/src/dede/dialog/img/wmv.gif b/src/admin/dialog/img/wmv.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/wmv.gif rename to src/admin/dialog/img/wmv.gif diff --git a/src/dede/dialog/img/zip.gif b/src/admin/dialog/img/zip.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/zip.gif rename to src/admin/dialog/img/zip.gif diff --git a/src/admin/dialog/select_images.php b/src/admin/dialog/select_images.php new file mode 100644 index 00000000..a882d140 --- /dev/null +++ b/src/admin/dialog/select_images.php @@ -0,0 +1,228 @@ + + + + + 图片浏览器 + + + + + + + +
+ 关闭预览 +
+ + + + + + + + + + + + + + + + read()) { + //计算文件大小和创建时间 + if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { + $filesize = filesize("$inpath/$file"); + $filesize = $filesize / 1024; + if ($filesize != "") + if ($filesize < 0.1) { + @list($ty1, $ty2) = split("\.", $filesize); + $filesize = $ty1.".".substr($ty2, 0, 2); + } else { + @list($ty1, $ty2) = split("\.", $filesize); + $filesize = $ty1.".".substr($ty2, 0, 1); + } + $filetime = filemtime("$inpath/$file"); + $filetime = MyDate("Y-m-d H:i", $filetime); + } + if ($file == ".") continue; + else if ($file == "..") { + if ($activepath == "") continue; + $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); + $line = " + + + "; + echo $line; + } else if (is_dir("$inpath/$file")) { + if (preg_match("#^_(.*)$#i", $file)) continue; + if (preg_match("#^\.(.*)$#i", $file)) continue; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) { + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $line = " + + + + + "; + echo "$line"; + } else if (preg_match("#\.(jpg)#i", $file)) { + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $line = " + + + + + "; + echo "$line"; + } + }//End Loop + $dh->close(); + ?> + +
+
+ " : ''; echo $noeditor; ?> + + + + + + + 上传: + + + 宽: + 高: + +
+
预览选择图片文件大小修改时间
点击图片预览,点击图片名选择图片,显示图片后点击该图片关闭预览。
+ 上级目录当前目录:$activepath
+ $file
$file$filesize KB$filetime
$file$filesize KB$filetime
+ + \ No newline at end of file diff --git a/src/dede/dialog/select_images_post.php b/src/admin/dialog/select_images_post.php old mode 100755 new mode 100644 similarity index 89% rename from src/dede/dialog/select_images_post.php rename to src/admin/dialog/select_images_post.php index 978283be..58a66d32 --- a/src/dede/dialog/select_images_post.php +++ b/src/admin/dialog/select_images_post.php @@ -1,100 +1,91 @@ -<\|\":]{1,}#", '', $imgfile_name)); - -if (!preg_match("#\.(".$cfg_imgtype.")#i", $imgfile_name)) { - ShowMsg("您所上传的图片类型不在许可列表,请更改系统对扩展名限定的配置", "-1"); - exit(); -} -$nowtme = time(); -$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); -$imgfile_type = strtolower(trim($imgfile_type)); -if (!in_array($imgfile_type, $sparr)) { - ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG、WBMP格式的其中一种", "-1"); - exit(); -} -$mdir = MyDate($cfg_addon_savetype, $nowtme); -if (!is_dir($cfg_basedir.$activepath."/$mdir")) { - MkdirAll($cfg_basedir.$activepath."/$mdir", $cfg_dir_purview); - CloseFtp(); -} -$filename_name = $cuserLogin->getUserID().'-'.dd2char(MyDate("ymdHis", $nowtme).mt_rand(100, 999)); -$filename = $mdir.'/'.$filename_name; -$fs = explode('.', $imgfile_name); -$filename = $filename.'.'.$fs[count($fs) - 1]; -$filename_name = $filename_name.'.'.$fs[count($fs) - 1]; -$fullfilename = $cfg_basedir.$activepath."/".$filename; -move_uploaded_file($imgfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); - -@unlink($imgfile); -if (empty($resize)) { - $resize = 0; -} -if ($resize == 1) { - if (in_array($imgfile_type, $cfg_photo_typenames)) { - ImageResize($fullfilename, $iwidth, $iheight); - } -} else { - if (in_array($imgfile_type, $cfg_photo_typenames)) { - WaterImg($fullfilename, 'up'); - } -} - -$info = ''; -$sizes[0] = 0; -$sizes[1] = 0; -$sizes = getimagesize($fullfilename, $info); -$imgwidthValue = $sizes[0]; -$imgheightValue = $sizes[1]; -$imgsize = filesize($fullfilename); -$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','".$activepath."/".$filename."','1','$imgwidthValue','$imgheightValue','0','{$imgsize}','{$nowtme}','".$cuserLogin->getUserID()."'); "; -$dsql->ExecuteNoneQuery($inquery); -$fid = $dsql->GetLastID(); -AddMyAddon($fid, $activepath.'/'.$filename); -$CKUpload = isset($CKUpload) ? $CKUpload : FALSE; -if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { - $fileurl = $activepath.'/'.$filename; - $result = array('url' => $fileurl, "uploaded" => 1, 'fileName' => $filename); - echo json_encode($result); - exit; -} - - -if (!empty($noeditor)) { - ShowMsg("成功上传一幅图片", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&noeditor=yes&activepath=".urlencode($activepath)."/$mdir&d=".time()); -} else { - ShowMsg("成功上传一幅图片", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."/$mdir&d=".time()); -} -exit(); +<\|\":]{1,}#", '', $imgfile_name)); + +if (!preg_match("#\.(".$cfg_imgtype.")#i", $imgfile_name)) { + ShowMsg("您所上传的图片类型不在许可列表,请修改系统对扩展名限定的配置", "-1"); + exit(); +} +$nowtme = time(); +$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); +$imgfile_type = strtolower(trim($imgfile_type)); +if (!in_array($imgfile_type, $sparr)) { + ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG、WBMP格式的其中一种", "-1"); + exit(); +} +$mdir = MyDate($cfg_addon_savetype, $nowtme); +if (!is_dir($cfg_basedir.$activepath."/$mdir")) { + MkdirAll($cfg_basedir.$activepath."/$mdir", $cfg_dir_purview); + CloseFtp(); +} +$filename_name = $cuserLogin->getUserID().'-'.dd2char(MyDate("ymdHis", $nowtme).mt_rand(100, 999)); +$filename = $mdir.'/'.$filename_name; +$fs = explode('.', $imgfile_name); +$filename = $filename.'.'.$fs[count($fs) - 1]; +$filename_name = $filename_name.'.'.$fs[count($fs) - 1]; +$fullfilename = $cfg_basedir.$activepath."/".$filename; +move_uploaded_file($imgfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); +@unlink($imgfile); +if (empty($resize)) { + $resize = 0; +} +if ($resize == 1) { + if (in_array($imgfile_type, $cfg_photo_typenames)) { + ImageResize($fullfilename, $iwidth, $iheight); + } +} else { + if (in_array($imgfile_type, $cfg_photo_typenames)) { + WaterImg($fullfilename, 'up'); + } +} +$info = ''; +$sizes[0] = 0; +$sizes[1] = 0; +$sizes = getimagesize($fullfilename, $info); +$imgwidthValue = $sizes[0]; +$imgheightValue = $sizes[1]; +$imgsize = filesize($fullfilename); +$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('0','$filename','".$activepath."/".$filename."','1','$imgwidthValue','$imgheightValue','0','{$imgsize}','{$nowtme}','".$cuserLogin->getUserID()."'); "; +$dsql->ExecuteNoneQuery($inquery); +$fid = $dsql->GetLastID(); +AddMyAddon($fid, $activepath.'/'.$filename); +$CKUpload = isset($CKUpload) ? $CKUpload : FALSE; +if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { + $fileurl = $activepath.'/'.$filename; + $result = array('url' => $fileurl, "uploaded" => 1, 'fileName' => $filename); + echo json_encode($result); + exit; +} +if (!empty($noeditor)) { + ShowMsg("成功上传一幅图片", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&noeditor=yes&activepath=".urlencode($activepath)."/$mdir&d=".time()); +} else { + ShowMsg("成功上传一幅图片", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."/$mdir&d=".time()); +} +exit(); \ No newline at end of file diff --git a/src/admin/dialog/select_media.php b/src/admin/dialog/select_media.php new file mode 100644 index 00000000..a1b4cb80 --- /dev/null +++ b/src/admin/dialog/select_media.php @@ -0,0 +1,187 @@ + + + + + 媒体文件管理器 + + + + + + + + + + + + + + + + + read()) { + //计算文件大小和创建时间 + if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { + $filesize = filesize("$inpath/$file"); + $filesize = $filesize / 1024; + if ($filesize != "") + if ($filesize < 0.1) { + @list($ty1, $ty2) = split("\.", $filesize); + $filesize = $ty1.".".substr($ty2, 0, 2); + } else { + @list($ty1, $ty2) = split("\.", $filesize); + $filesize = $ty1.".".substr($ty2, 0, 1); + } + $filetime = filemtime("$inpath/$file"); + $filetime = MyDate("Y-m-d H:i", $filetime); + } + //判断文件类型并作处理 + if ($file == ".") continue; + else if ($file == "..") { + if ($activepath == "") continue; + $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); + $line = " + + + "; + echo $line; + } else if (is_dir("$inpath/$file")) { + if (preg_match("#^_(.*)$#i", $file)) continue; + if (preg_match("#^\.(.*)$#i", $file)) continue; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(swf|fly|fla|flv)#i", $file)) { + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(wmv|avi)#i", $file)) { + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(rm|rmvb)#i", $file)) { + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(mp3|wma)#", $file)) { + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $line = " + + + + "; + echo "$line"; + } + }//End Loop + $dh->close(); + ?> +
+
+ + + + + 上传: + +
+
点击名称选择文件文件大小最后修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
+ + \ No newline at end of file diff --git a/src/dede/dialog/select_media_post.php b/src/admin/dialog/select_media_post.php old mode 100755 new mode 100644 similarity index 89% rename from src/dede/dialog/select_media_post.php rename to src/admin/dialog/select_media_post.php index 31ff0483..67a8d849 --- a/src/dede/dialog/select_media_post.php +++ b/src/admin/dialog/select_media_post.php @@ -1,27 +1,25 @@ - - - - - 软件管理器 - - - - - - - - - - - - - - - - - -
-
- - - -  上传: -   - 改名: -   - -
-
- - - - - - - read()) { - //计算文件大小和创建时间 - if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { - $filesize = filesize("$inpath/$file"); - $filesize = $filesize / 1024; - if ($filesize != "") - if ($filesize < 0.1) { - @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1.".".substr($ty2, 0, 2); - } else { - @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1.".".substr($ty2, 0, 1); - } - $filetime = filemtime("$inpath/$file"); - $filetime = MyDate("Y-m-d H:i", $filetime); - } - //判断文件类型并作处理 - if ($file == ".") continue; - else if ($file == "..") { - if ($activepath == "") continue; - $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); - $line = "\n - - - \r\n"; - echo $line; - } else if (is_dir("$inpath/$file")) { - if (preg_match("#^_(.*)$#i", $file)) continue; - if (preg_match("#^\.(.*)$#i", $file)) continue; - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(zip|rar|tgr.gz)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - $line = "\n - - - - "; - echo "$line"; - } else { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ''; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - $line = "\n - - - - "; - echo "$line"; - } - }//End Loop - $dh->close(); - ?> -
选择文件文件大小修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
-
点击选择的文件,红色字样的为刚上传的文件
- + + + + + 软件管理器 + + + + + + + + + + + + + + + + + +
+
+ + + + 上传: + 改名: + +
+
+ + + + + + + read()) { + //计算文件大小和创建时间 + if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { + $filesize = filesize("$inpath/$file"); + $filesize = $filesize / 1024; + if ($filesize != "") + if ($filesize < 0.1) { + @list($ty1, $ty2) = split("\.", $filesize); + $filesize = $ty1.".".substr($ty2, 0, 2); + } else { + @list($ty1, $ty2) = split("\.", $filesize); + $filesize = $ty1.".".substr($ty2, 0, 1); + } + $filetime = filemtime("$inpath/$file"); + $filetime = MyDate("Y-m-d H:i", $filetime); + } + //判断文件类型并作处理 + if ($file == ".") continue; + else if ($file == "..") { + if ($activepath == "") continue; + $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); + $line = " + + + \r\n"; + echo $line; + } else if (is_dir("$inpath/$file")) { + if (preg_match("#^_(.*)$#i", $file)) continue; + if (preg_match("#^\.(.*)$#i", $file)) continue; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(zip|rar|tgr.gz)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + $line = " + + + + "; + echo "$line"; + } else { + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ''; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + $line = " + + + + "; + echo "$line"; + } + }//End Loop + $dh->close(); + ?> +
选择文件文件大小修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
+
点击选择的文件,红色字样的为刚上传的文件。
+ \ No newline at end of file diff --git a/src/dede/dialog/select_soft_post.php b/src/admin/dialog/select_soft_post.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/dialog/select_soft_post.php rename to src/admin/dialog/select_soft_post.php index cfa37d36..e09956af --- a/src/dede/dialog/select_soft_post.php +++ b/src/admin/dialog/select_soft_post.php @@ -1,104 +1,91 @@ -':\/|]#", "", $newname)); - -$uploadfile = isset($imgfile) && empty($uploadfile) ? $imgfile : $uploadfile; -$uploadfile_name = isset($imgfile_name) && empty($uploadfile_name) ? $imgfile_name : $uploadfile_name; - -if (!is_uploaded_file($uploadfile)) { - ShowMsg("您没有选择上传的文件或选择的文件大小超出限制!", "-1"); - exit(); -} - -//软件类型所有支持的附件 -$cfg_softtype = $cfg_softtype; - -$cfg_softtype = str_replace('||', '|', $cfg_softtype); -$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); -if (!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) { - ShowMsg("您所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置", "-1"); - exit(); -} - -$nowtme = time(); -if ($activepath == $cfg_soft_dir) { - $newdir = MyDate($cfg_addon_savetype, $nowtme); - $activepath = $activepath.'/'.$newdir; - if (!is_dir($cfg_basedir.$activepath)) { - MkdirAll($cfg_basedir.$activepath, $cfg_dir_purview); - CloseFtp(); - } -} - -//文件名(前为手工指定, 后者自动处理) -if (!empty($newname)) { - $filename = $newname; - if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); - else $fs = explode('.', $filename); - if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { - ShowMsg("您指定的文件名被系统禁止", 'javascript:;'); - exit(); - } - if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; -} else { - $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); - $fs = explode('.', $uploadfile_name); - if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { - ShowMsg("您上传了某些可能存在不安全因素的文件,系统拒绝操作", 'javascript:;'); - exit(); - } - $filename = $filename.'.'.$fs[count($fs) - 1]; -} - -$fullfilename = $cfg_basedir.$activepath.'/'.$filename; -$fullfileurl = $activepath.'/'.$filename; -move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); -@unlink($uploadfile); - -if ($uploadfile_type == 'application/x-shockwave-flash') { - $mediatype = 2; -} else if (preg_match('#image#i', $uploadfile_type)) { - $mediatype = 1; -} else if (preg_match('#audio|media|video#i', $uploadfile_type)) { - $mediatype = 3; -} else { - $mediatype = 4; -} - - -$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','$fullfileurl','$mediatype','0','0','0','{$uploadfile_size}','{$nowtme}','".$cuserLogin->getUserID()."'); "; - -$dsql->ExecuteNoneQuery($inquery); -$fid = $dsql->GetLastID(); -AddMyAddon($fid, $fullfileurl); - -if ($ck == 1) { - $funcNum = isset($_GET['CKEditorFuncNum']) ? $_GET['CKEditorFuncNum'] : 1; - $url = $fullfileurl; - $arr = array( - "uploaded" => 1, - "fileName" => $filename, - "url" => $url, - ); - echo json_encode($arr); -} else { - ShowMsg("成功上传文件", $bkurl."?comeback=".urlencode($filename)."&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."&d=".time()); - exit(); -} +':\/|]#", "", $newname)); +$uploadfile = isset($imgfile) && empty($uploadfile) ? $imgfile : $uploadfile; +$uploadfile_name = isset($imgfile_name) && empty($uploadfile_name) ? $imgfile_name : $uploadfile_name; +if (!is_uploaded_file($uploadfile)) { + ShowMsg("您没有选择上传的文件或选择的文件大小超出限制!", "-1"); + exit(); +} +//软件类型所有支持的附件 +$cfg_softtype = $cfg_softtype; +$cfg_softtype = str_replace('||', '|', $cfg_softtype); +$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); +if (!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) { + ShowMsg("您所上传的{$uploadmbtype}不在许可列表,请修改系统对扩展名限定的配置", "-1"); + exit(); +} +$nowtme = time(); +if ($activepath == $cfg_soft_dir) { + $newdir = MyDate($cfg_addon_savetype, $nowtme); + $activepath = $activepath.'/'.$newdir; + if (!is_dir($cfg_basedir.$activepath)) { + MkdirAll($cfg_basedir.$activepath, $cfg_dir_purview); + CloseFtp(); + } +} +//文件名(前为手工指定, 后者自动处理) +if (!empty($newname)) { + $filename = $newname; + if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); + else $fs = explode('.', $filename); + if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { + ShowMsg("您指定的文件名被系统禁止", 'javascript:;'); + exit(); + } + if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; +} else { + $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); + $fs = explode('.', $uploadfile_name); + if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { + ShowMsg("您上传了某些可能存在不安全因素的文件,系统拒绝操作", "-1"); + exit(); + } + $filename = $filename.'.'.$fs[count($fs) - 1]; +} +$fullfilename = $cfg_basedir.$activepath.'/'.$filename; +$fullfileurl = $activepath.'/'.$filename; +move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); +@unlink($uploadfile); +if ($uploadfile_type == 'application/x-shockwave-flash') { + $mediatype = 2; +} else if (preg_match('#image#i', $uploadfile_type)) { + $mediatype = 1; +} else if (preg_match('#audio|media|video#i', $uploadfile_type)) { + $mediatype = 3; +} else { + $mediatype = 4; +} +$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('0','$filename','$fullfileurl','$mediatype','0','0','0','{$uploadfile_size}','{$nowtme}','".$cuserLogin->getUserID()."'); "; +$dsql->ExecuteNoneQuery($inquery); +$fid = $dsql->GetLastID(); +AddMyAddon($fid, $fullfileurl); +if ($ck == 1) { + $funcNum = isset($_GET['CKEditorFuncNum']) ? $_GET['CKEditorFuncNum'] : 1; + $url = $fullfileurl; + $arr = array( + "uploaded" => 1, + "fileName" => $filename, + "url" => $url, + ); + echo json_encode($arr); +} else { + ShowMsg("成功上传文件", $bkurl."?comeback=".urlencode($filename)."&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."&d=".time()); + exit(); +} \ No newline at end of file diff --git a/src/dede/dialog/select_templets.php b/src/admin/dialog/select_templets.php similarity index 84% rename from src/dede/dialog/select_templets.php rename to src/admin/dialog/select_templets.php index 0a591423..6ad444e6 100644 --- a/src/dede/dialog/select_templets.php +++ b/src/admin/dialog/select_templets.php @@ -1,201 +1,195 @@ - - - - - 模板管理器 - - - - - - - - - - - - - - read()) { - //计算文件大小和创建时间 - if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { - $filesize = filesize("$inpath/$file"); - $filesize = $filesize / 1024; - if ($filesize != "") - if ($filesize < 0.1) { - @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1.".".substr($ty2, 0, 2); - } else { - @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1.".".substr($ty2, 0, 1); - } - $filetime = filemtime("$inpath/$file"); - $filetime = MyDate("Y-m-d H:i", $filetime); - } - //判断文件类型并作处理 - if ($file == ".") continue; - else if ($file == "..") { - if ($activepath == "") continue; - $tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); - $line = "\n - - - \r\n"; - echo $line; - } else if (is_dir("$inpath/$file")) { - if (preg_match("#^_(.*)$#i", $file)) continue; - if (preg_match("#^\.(.*)$#i", $file)) continue; - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(htm|html)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(css)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(js)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(jpg)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(gif|png)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(txt)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - "; - echo "$line"; - } - }//End Loop - $dh->close(); - ?> - - - -
选择文件文件大小修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
- - - - - - - - - -
- 上传: - 改名: - -
-
- + + + + + 模板管理器 + + + + + + + + + + + + + + + + + read()) { + //计算文件大小和创建时间 + if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { + $filesize = filesize("$inpath/$file"); + $filesize = $filesize / 1024; + if ($filesize != "") + if ($filesize < 0.1) { + @list($ty1, $ty2) = split("\.", $filesize); + $filesize = $ty1.".".substr($ty2, 0, 2); + } else { + @list($ty1, $ty2) = split("\.", $filesize); + $filesize = $ty1.".".substr($ty2, 0, 1); + } + $filetime = filemtime("$inpath/$file"); + $filetime = MyDate("Y-m-d H:i", $filetime); + } + //判断文件类型并作处理 + if ($file == ".") continue; + else if ($file == "..") { + if ($activepath == "") continue; + $tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); + $line = " + + + \r\n"; + echo $line; + } else if (is_dir("$inpath/$file")) { + if (preg_match("#^_(.*)$#i", $file)) continue; + if (preg_match("#^\.(.*)$#i", $file)) continue; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(htm|html)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(css)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(js)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(jpg)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(gif|png)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(txt)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:red' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + "; + echo "$line"; + } + }//End Loop + $dh->close(); + ?> +
+
+ + + + 上传: + 改名: + +
+
选择文件文件大小修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
+ \ No newline at end of file diff --git a/src/dede/dialog/select_templets_post.php b/src/admin/dialog/select_templets_post.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/dialog/select_templets_post.php rename to src/admin/dialog/select_templets_post.php index 6d75a36a..45ab04d4 --- a/src/dede/dialog/select_templets_post.php +++ b/src/admin/dialog/select_templets_post.php @@ -1,44 +1,42 @@ -<\|\":]{1,}#", '', $filename)); -} else { - $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); - $filename = $uploadfile_name; - if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { - ShowMsg("您所上传的文件存在问题,请检查文件类型是否适合", "-1"); - exit(); - } -} -$fullfilename = $cfg_basedir.$activepath."/".$filename; -move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); -@unlink($uploadfile); -ShowMsg("成功上传文件", "select_templets.php?comeback=".urlencode($filename)."&f=$f&activepath=".urlencode($activepath)."&d=".time()); -exit(); +<\|\":]{1,}#", '', $filename)); +} else { + $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); + $filename = $uploadfile_name; + if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { + ShowMsg("您所上传的文件存在问题,请检查文件类型是否适合", "-1"); + exit(); + } +} +$fullfilename = $cfg_basedir.$activepath."/".$filename; +move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); +@unlink($uploadfile); +ShowMsg("成功上传文件", "select_templets.php?comeback=".urlencode($filename)."&f=$f&activepath=".urlencode($activepath)."&d=".time()); +exit(); \ No newline at end of file diff --git a/src/dede/diy_add.php b/src/admin/diy_add.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/diy_add.php rename to src/admin/diy_add.php index c0c407bf..5f5e21fe --- a/src/dede/diy_add.php +++ b/src/admin/diy_add.php @@ -1,64 +1,63 @@ -GetVersion(); -$mysql_versions = explode(".", trim($mysql_version)); -$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; -if (empty($action)) { - $row = $dsql->GetOne("SELECT diyid FROM #@__diyforms ORDER BY diyid DESC LIMIT 0,1 "); - if (is_array($row)) $newdiyid = $row['diyid'] + 1; - else $newdiyid = 1; - include(DEDEADMIN."/templets/diy_add.htm"); -} else { - if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { - ShowMsg("'自定义表单diyid'必须为数字", "-1"); - exit(); - } - if ($table == "") { - ShowMsg("表名不能为空", "-1"); - exit(); - } - $public = isset($public) && is_numeric($public) ? $public : 0; - $name = dede_htmlspecialchars($name); - $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='$diyid' OR `table` LIKE '$table' OR name LIKE '$name' "); - if (is_array($row)) { - ShowMsg("可能自定义表单的‘diyid’、‘名称’在数据库中已存在,不能重复使用", "-1"); - exit(); - } - $query = "SHOW TABLES FROM {$dsql->dbName} "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->getarray()) { - if (empty($row[0])) $row[0] = ''; - if ($table == $row[0]) { - showmsg('指定的表在数据库中重复', '-1'); - exit(); - } - } - $sql = "CREATE TABLE IF NOT EXISTS `$table`( - `id` int(10) unsigned NOT NULL auto_increment, - `ifcheck` tinyint(1) NOT NULL default '0', - "; - if ($mysql_version < 4.1) { - $sql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; - } else { - $sql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - if ($dsql->ExecuteNoneQuery($sql)) { - $query = "INSERT INTO #@__diyforms (`diyid`, `name`, `table`, `info`, `listtemplate`, `viewtemplate`, `posttemplate`, `public` ) VALUES ('$diyid', '$name', '$table', '', '$listtemplate', '$viewtemplate', '$posttemplate', '$public')"; - $dsql->ExecuteNoneQuery($query); - showmsg('自定义表单创建成功,请自行添加字段', 'diy_main.php'); - } else { - showmsg('自定义表单创建失败', '-1'); - } -} +GetVersion(); +$mysql_versions = explode(".", trim($mysql_version)); +$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; +if (empty($action)) { + $row = $dsql->GetOne("SELECT diyid FROM #@__diyforms ORDER BY diyid DESC LIMIT 0,1 "); + if (is_array($row)) $newdiyid = $row['diyid'] + 1; + else $newdiyid = 1; + include(DEDEADMIN."/templets/diy_add.htm"); +} else { + if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { + ShowMsg("'自定义表单diyid'必须为数字", "-1"); + exit(); + } + if ($table == "") { + ShowMsg("表名不能为空", "-1"); + exit(); + } + $public = isset($public) && is_numeric($public) ? $public : 0; + $name = dede_htmlspecialchars($name); + $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='$diyid' OR `table` LIKE '$table' OR name LIKE '$name' "); + if (is_array($row)) { + ShowMsg("可能自定义表单的‘diyid’、‘名称’在数据库中已存在,不能重复使用", "-1"); + exit(); + } + $query = "SHOW TABLES FROM {$dsql->dbName} "; + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->getarray()) { + if (empty($row[0])) $row[0] = ''; + if ($table == $row[0]) { + showmsg('指定的表在数据库中重复', '-1'); + exit(); + } + } + $sql = "CREATE TABLE IF NOT EXISTS `$table`( + `id` int(10) unsigned NOT NULL auto_increment, + `ifcheck` tinyint(1) NOT NULL default '0', + "; + if ($mysql_version < 4.1) { + $sql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; + } else { + $sql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + if ($dsql->ExecuteNoneQuery($sql)) { + $query = "INSERT INTO #@__diyforms (`diyid`, `name`, `table`, `info`, `listtemplate`, `viewtemplate`, `posttemplate`, `public` ) VALUES ('$diyid', '$name', '$table', '', '$listtemplate', '$viewtemplate', '$posttemplate', '$public')"; + $dsql->ExecuteNoneQuery($query); + showmsg('自定义表单创建成功,请自行添加字段', 'diy_main.php'); + } else { + showmsg('自定义表单创建失败', '-1'); + } +} diff --git a/src/dede/diy_edit.php b/src/admin/diy_edit.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/diy_edit.php rename to src/admin/diy_edit.php index 4c330b4f..7aa4be3d --- a/src/dede/diy_edit.php +++ b/src/admin/diy_edit.php @@ -1,76 +1,75 @@ -ExecuteNoneQuery($query); - ShowMsg("成功更改一个自定义表单", "diy_main.php"); - exit(); -} -/*---------------- -function __Delete() ------------------*/ else if ($dopost == "delete") { - @set_time_limit(0); - CheckPurview('c_Del'); - $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='$diyid'"); - if (empty($job)) $job = ""; - - //确认提示 - if ($job == "") { - $wintitle = "自定义表单管理-删除自定义表单"; - $wecome_info = "自定义表单管理::删除自定义表单"; - $win = new OxWindow(); - $win->Init("diy_edit.php", "js/blank.js", "POST"); - $win->AddHidden("job", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("diyid", $diyid); - $win->AddTitle("将删除所有与该自定义表单相关的文件和数据
您确实要删除 \"".$row['name']."\" 这个自定义表单?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); - } - - //操作 - else if ($job == "yes") { - $row = $dsql->GetOne("SELECT `table` FROM `#@__diyforms` WHERE diyid='$diyid'", MYSQL_ASSOC); - if (!is_array($row)) { - ShowMsg("您所指定的自定义表单信息不存在!", "-1"); - exit(); - } - - //删除表 - $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$row['table']}`;"); - - //删除频道配置信息 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__diyforms` WHERE diyid='$diyid'"); - ShowMsg("成功删除一个自定义表单", "diy_main.php"); - exit(); - } -} - -/*---------------- -function edit() ------------------*/ -$row = $dsql->GetOne("Select * From #@__diyforms where diyid='$diyid'"); -include DEDEADMIN."/templets/diy_edit.htm"; +ExecuteNoneQuery($query); + ShowMsg("成功修改一个自定义表单", "diy_main.php"); + exit(); +} +/*---------------- +function __Delete() +-----------------*/ else if ($dopost == "delete") { + @set_time_limit(0); + CheckPurview('c_Del'); + $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='$diyid'"); + if (empty($job)) $job = ""; + + //确认提示 + if ($job == "") { + $wintitle = "自定义表单管理-删除自定义表单"; + $wecome_info = "自定义表单管理::删除自定义表单"; + $win = new OxWindow(); + $win->Init("diy_edit.php", "js/blank.js", "POST"); + $win->AddHidden("job", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("diyid", $diyid); + $win->AddTitle("将删除所有与该自定义表单相关的文件和数据
您确实要删除 \"".$row['name']."\" 这个自定义表单?"); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); + } + + //操作 + else if ($job == "yes") { + $row = $dsql->GetOne("SELECT `table` FROM `#@__diyforms` WHERE diyid='$diyid'", MYSQL_ASSOC); + if (!is_array($row)) { + ShowMsg("您所指定的自定义表单信息不存在!", "-1"); + exit(); + } + + //删除表 + $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$row['table']}`;"); + + //删除频道配置信息 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__diyforms` WHERE diyid='$diyid'"); + ShowMsg("成功删除一个自定义表单", "diy_main.php"); + exit(); + } +} + +/*---------------- +function edit() +-----------------*/ +$row = $dsql->GetOne("Select * From #@__diyforms where diyid='$diyid'"); +include DEDEADMIN."/templets/diy_edit.htm"; diff --git a/src/dede/diy_field_add.php b/src/admin/diy_field_add.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/diy_field_add.php rename to src/admin/diy_field_add.php index 893d6d2f..07f322f2 --- a/src/dede/diy_field_add.php +++ b/src/admin/diy_field_add.php @@ -1,109 +1,108 @@ -GetVersion(); -$mysql_versions = explode(".", trim($mysql_version)); -$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; -/*---------------------- -function Save() ----------------------*/ -if ($action == 'save') { - //模型信息 - $fieldname = strtolower($fieldname); - $row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); - $fieldset = $row['info']; - require_once(DEDEINC."/dedetag.class.php"); - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($fieldset); - $trueTable = $row['table']; - - //修改字段配置信息 - $dfvalue = trim($vdefault); - $isnull = ($isnull == 1 ? "true" : "false"); - $mxlen = $maxlength; - - //检测被修改的字段类型 - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - - $rs = $dsql->ExecuteNoneQuery(" ALTER TABLE `$trueTable` ADD $ntabsql "); - - if (!$rs) { - $gerr = $dsql->GetError(); - ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); - exit(); - } - $ok = FALSE; - - //检测旧配置信息,并替换为新配置 - if (is_array($dtp->CTags)) { - //遍历旧配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if ($fieldname == strtolower($ctag->GetName())) { - $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); - $ok = TRUE; - break; - } - } - $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); - } else { - //原来的配置为空 - $oksetting = $fieldset."\n".stripslashes($fieldstring); - } - $addlist = GetAddFieldList($dtp, $oksetting); - $oksetting = addslashes($oksetting); - $rs = $dsql->ExecuteNoneQuery("Update #@__diyforms set `info`='$oksetting' where diyid='$diyid' "); - if (!$rs) { - $grr = $dsql->GetError(); - ShowMsg("保存节点配置出错".$grr, "javascript:;"); - exit(); - } - ShowMsg("成功增加一个字段", "diy_edit.php?diyid=$diyid"); - exit(); -} - -//检测模型相关信息,并初始化相关数据 -/*---------------------- -function ShowPage() ----------------------*/ -$row = $dsql->GetOne("SELECT `table` FROM #@__diyforms WHERE diyid='$diyid'"); -$trueTable = $row['table']; -$tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( -`id` int(10) unsigned NOT NULL auto_increment, -`ifcheck` tinyint(1) NOT NULL default '0', -"; -if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; -} else { - $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; -} -$dsql->ExecuteNoneQuery($tabsql); - -//检测附加表里含有的字段 -$fields = array(); -$rs = $dsql->SetQuery("show fields from `$trueTable`"); -$dsql->Execute('a'); -while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - $fields[strtolower($nrow['Field'])] = 1; -} -$f = ''; -foreach ($fields as $k => $v) { - $f .= ($f == '' ? $k : ' '.$k); -} -require_once(DEDEADMIN."/templets/diy_field_add.htm"); +GetVersion(); +$mysql_versions = explode(".", trim($mysql_version)); +$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; +/*---------------------- +function Save() +---------------------*/ +if ($action == 'save') { + //模型信息 + $fieldname = strtolower($fieldname); + $row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); + $fieldset = $row['info']; + require_once(DEDEINC."/dedetag.class.php"); + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($fieldset); + $trueTable = $row['table']; + + //修改字段配置信息 + $dfvalue = trim($vdefault); + $isnull = ($isnull == 1 ? "true" : "false"); + $mxlen = $maxlength; + + //检测被修改的字段类型 + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + + $rs = $dsql->ExecuteNoneQuery(" ALTER TABLE `$trueTable` ADD $ntabsql "); + + if (!$rs) { + $gerr = $dsql->GetError(); + ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); + exit(); + } + $ok = FALSE; + + //检测旧配置信息,并替换为新配置 + if (is_array($dtp->CTags)) { + //遍历旧配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if ($fieldname == strtolower($ctag->GetName())) { + $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); + $ok = TRUE; + break; + } + } + $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); + } else { + //原来的配置为空 + $oksetting = $fieldset."\n".stripslashes($fieldstring); + } + $addlist = GetAddFieldList($dtp, $oksetting); + $oksetting = addslashes($oksetting); + $rs = $dsql->ExecuteNoneQuery("Update #@__diyforms set `info`='$oksetting' where diyid='$diyid' "); + if (!$rs) { + $grr = $dsql->GetError(); + ShowMsg("保存节点配置出错".$grr, "javascript:;"); + exit(); + } + ShowMsg("成功增加一个字段", "diy_edit.php?diyid=$diyid"); + exit(); +} + +//检测模型相关信息,并初始化相关数据 +/*---------------------- +function ShowPage() +---------------------*/ +$row = $dsql->GetOne("SELECT `table` FROM #@__diyforms WHERE diyid='$diyid'"); +$trueTable = $row['table']; +$tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( +`id` int(10) unsigned NOT NULL auto_increment, +`ifcheck` tinyint(1) NOT NULL default '0', +"; +if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; +} else { + $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; +} +$dsql->ExecuteNoneQuery($tabsql); + +//检测附加表里含有的字段 +$fields = array(); +$rs = $dsql->SetQuery("show fields from `$trueTable`"); +$dsql->Execute('a'); +while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + $fields[strtolower($nrow['Field'])] = 1; +} +$f = ''; +foreach ($fields as $k => $v) { + $f .= ($f == '' ? $k : ' '.$k); +} +require_once(DEDEADMIN."/templets/diy_field_add.htm"); diff --git a/src/dede/diy_field_edit.php b/src/admin/diy_field_edit.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/diy_field_edit.php rename to src/admin/diy_field_edit.php index a8bf9a70..ce424869 --- a/src/dede/diy_field_edit.php +++ b/src/admin/diy_field_edit.php @@ -1,123 +1,122 @@ -GetVersion(); -$mysql_versions = explode(".", trim($mysql_version)); -$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; -$row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); -$fieldset = $row['info']; -$trueTable = $row['table']; -$dtp = new DedeTagParse(); -$dtp->SetNameSpace("field", "<", ">"); -$dtp->LoadSource($fieldset); -foreach ($dtp->CTags as $ctag) { - if (strtolower($ctag->GetName()) == strtolower($fname)) break; -} - -//字段类型信息 -$ds = file(DEDEADMIN."/inc/fieldtype.txt"); -foreach ($ds as $d) { - $dds = explode(',', trim($d)); - $fieldtypes[$dds[0]] = $dds[1]; -} - -//保存更改 -/*-------------------- -function _SAVE() -----------------------*/ -if ($action == 'save') { - - if (!isset($fieldtypes[$dtype])) { - ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); - exit(); - } - - //检测数据库是否存在附加表,不存在则新建一个 - $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( - `id` int(10) unsigned NOT NULL auto_increment, - `ifcheck` tinyint(1) NOT NULL default '0', - "; - if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; - } else { - $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - $dsql->ExecuteNoneQuery($tabsql); - - //检测表里含有的字段 - $fields = array(); - $rs = $dsql->SetQuery("show fields from `$trueTable`"); - $dsql->Execute('a'); - while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - $fields[strtolower($nrow['Field'])] = $nrow['Type']; - } - - //修改字段配置信息 - $dfvalue = $vdefault; - $isnull = ($isnull == 1 ? "true" : "false"); - $mxlen = $maxlength; - $fieldname = strtolower($fname); - - //检测被修改的字段类型,并更新数据表 - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - $tabsql = ''; - - //检测旧数据类型,并替换为新配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if (trim($fieldname) == trim(strtolower($ctag->GetName()))) { - - if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { - $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; - $dsql->ExecuteNoneQuery($tabsql); - } else if (!isset($fields[$fieldname])) { - $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; - $dsql->ExecuteNoneQuery($tabsql); - } else { - $tabsql = ''; - } - $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); - break; - } - } - $oksetting = $dtp->GetResultNP(); - $oksetting = addslashes($oksetting); - $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); - ShowMsg("成功更改一个字段的配置", "diy_edit.php?diyid={$diyid}"); - exit(); -} -/*------------------ -删除字段 -function _DELETE() --------------------*/ else if ($action == "delete") { - //检测旧数据类型,并替换为新配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if (strtolower($ctag->GetName()) == strtolower($fname)) { - $dtp->Assign($tagid, "#@Delete@#"); - } - } - $oksetting = addslashes($dtp->GetResultNP()); - $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); - $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); - ShowMsg("成功删除一个字段", "diy_edit.php?diyid=$diyid"); - exit(); -} -require_once(DEDEADMIN."/templets/diy_field_edit.htm"); +GetVersion(); +$mysql_versions = explode(".", trim($mysql_version)); +$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; +$row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); +$fieldset = $row['info']; +$trueTable = $row['table']; +$dtp = new DedeTagParse(); +$dtp->SetNameSpace("field", "<", ">"); +$dtp->LoadSource($fieldset); +foreach ($dtp->CTags as $ctag) { + if (strtolower($ctag->GetName()) == strtolower($fname)) break; +} + +//字段类型信息 +$ds = file(DEDEADMIN."/inc/fieldtype.txt"); +foreach ($ds as $d) { + $dds = explode(',', trim($d)); + $fieldtypes[$dds[0]] = $dds[1]; +} + +//保存修改 +/*-------------------- +function _SAVE() +----------------------*/ +if ($action == 'save') { + + if (!isset($fieldtypes[$dtype])) { + ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); + exit(); + } + + //检测数据库是否存在附加表,不存在则新建一个 + $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( + `id` int(10) unsigned NOT NULL auto_increment, + `ifcheck` tinyint(1) NOT NULL default '0', + "; + if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; + } else { + $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + $dsql->ExecuteNoneQuery($tabsql); + + //检测表里含有的字段 + $fields = array(); + $rs = $dsql->SetQuery("show fields from `$trueTable`"); + $dsql->Execute('a'); + while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + $fields[strtolower($nrow['Field'])] = $nrow['Type']; + } + + //修改字段配置信息 + $dfvalue = $vdefault; + $isnull = ($isnull == 1 ? "true" : "false"); + $mxlen = $maxlength; + $fieldname = strtolower($fname); + + //检测被修改的字段类型,并更新数据表 + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + $tabsql = ''; + + //检测旧数据类型,并替换为新配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if (trim($fieldname) == trim(strtolower($ctag->GetName()))) { + + if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { + $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; + $dsql->ExecuteNoneQuery($tabsql); + } else if (!isset($fields[$fieldname])) { + $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; + $dsql->ExecuteNoneQuery($tabsql); + } else { + $tabsql = ''; + } + $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); + break; + } + } + $oksetting = $dtp->GetResultNP(); + $oksetting = addslashes($oksetting); + $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); + ShowMsg("成功修改一个字段的配置", "diy_edit.php?diyid={$diyid}"); + exit(); +} +/*------------------ +删除字段 +function _DELETE() +-------------------*/ else if ($action == "delete") { + //检测旧数据类型,并替换为新配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if (strtolower($ctag->GetName()) == strtolower($fname)) { + $dtp->Assign($tagid, "#@Delete@#"); + } + } + $oksetting = addslashes($dtp->GetResultNP()); + $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); + $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); + ShowMsg("成功删除一个字段", "diy_edit.php?diyid=$diyid"); + exit(); +} +require_once(DEDEADMIN."/templets/diy_field_edit.htm"); diff --git a/src/dede/diy_list.php b/src/admin/diy_list.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/diy_list.php rename to src/admin/diy_list.php index 5eb83b06..28dbfbba --- a/src/dede/diy_list.php +++ b/src/admin/diy_list.php @@ -1,204 +1,204 @@ -getForm('post', '', 'admin'); - include DEDEADMIN.'/templets/diy_post.htm'; - } else if ($do == 2) { - $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); - $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); - if (!empty($dede_fields)) { - if ($dede_fieldshash != md5($dede_fields.$cfg_cookie_encode)) { - showMsg("数据校验不对,程序返回", '-1'); - exit(); - } - } - $diyform = $dsql->getOne("SELECT * FROM #@__diyforms WHERE diyid=$diyid"); - if (!is_array($diyform)) { - showmsg("自定义表单不存在", '-1'); - exit(); - } - $addvar = $addvalue = ''; - if (!empty($dede_fields)) { - $fieldarr = explode(';', $dede_fields); - if (is_array($fieldarr)) { - foreach ($fieldarr as $field) { - if ($field == '') { - continue; - } - $fieldinfo = explode(',', $field); - if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') { - ${$fieldinfo[0]} = filterscript(stripslashes(${$fieldinfo[0]})); - ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]}); - ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); - } else { - ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); - } - $addvar .= ', `'.$fieldinfo[0].'`'; - $addvalue .= ", '".${$fieldinfo[0]}."'"; - } - } - } - $query = "INSERT INTO `{$diy->table}` (`id`, `ifcheck` $addvar) VALUES (NULL, 0 $addvalue)"; - if ($dsql->ExecuteNoneQuery($query)) { - $goto = "diy_list.php?action=list&diyid={$diy->diyid}"; - showmsg('发布成功', $goto); - } else { - showmsg('对不起,发布不成功', '-1'); - } - } -} else if ($action == 'list') { - include_once DEDEINC.'/datalistcp.class.php'; - $query = "SELECT * FROM {$diy->table} ORDER BY id DESC"; - $datalist = new DataListCP(); - $datalist->pageSize = 10; - $datalist->SetParameter('action', 'list'); - $datalist->SetParameter('diyid', $diyid); - $datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); - $datalist->SetSource($query); - $fieldlist = $diy->getFieldList(); - $datalist->Display(); -} else if ($action == 'edit') { - if (empty($do)) { - $id = isset($id) && is_numeric($id) ? $id : 0; - if (empty($id)) { - showMsg('非法操作未指定id', 'javascript:;'); - exit(); - } - $query = "SELECT * FROM {$diy->table} WHERE id=$id"; - $row = $dsql->GetOne($query); - if (!is_array($row)) { - showmsg("您访问的记录不存在或未经审核", '-1'); - exit(); - } - $postform = $diy->getForm('edit', $row, 'admin'); - $fieldlist = $diy->getFieldList(); - $c1 = $row['ifcheck'] == 1 ? 'checked' : ''; - $c2 = $row['ifcheck'] == 0 ? 'checked' : ''; - include DEDEADMIN.'/templets/diy_edit_content.htm'; - } else if ($do == 2) { - $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); - $diyform = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid=$diyid"); - $diyco = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); - if (!is_array($diyform)) { - showmsg("自定义表单不存在", '-1'); - exit(); - } - $addsql = ''; - if (!empty($dede_fields)) { - $fieldarr = explode(';', $dede_fields); - if (is_array($fieldarr)) { - foreach ($fieldarr as $field) { - if ($field == '') { - continue; - } - $fieldinfo = explode(',', $field); - if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') { - ${$fieldinfo[0]} = filterscript(stripslashes(${$fieldinfo[0]})); - ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]}); - ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); - ${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]}; - } else { - - ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'diy', $fieldinfo[0]); - ${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]}; - } - $addsql .= !empty($addsql) ? ',`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'" : '`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'"; - } - } - } - $query = "UPDATE `$diy->table` SET $addsql WHERE id=$id"; - if ($dsql->ExecuteNoneQuery($query)) { - $goto = "diy_list.php?action=list&diyid={$diy->diyid}"; - showmsg('编辑成功', $goto); - } else { - showmsg('编辑成功', '-1'); - } - } -} elseif ($action == 'check') { - if (is_array($id)) { - $ids = implode(',', $id); - } else { - showmsg('未选中要操作的内容', '-1'); - exit(); - } - $query = "UPDATE `$diy->table` SET ifcheck=1 WHERE id IN ($ids)"; - if ($dsql->ExecuteNoneQuery($query)) { - showmsg('审核成功', "diy_list.php?action=list&diyid={$diy->diyid}"); - } else { - showmsg('审核失败', "diy_list.php?action=list&diyid={$diy->diyid}"); - } -} elseif ($action == 'delete') { - if (empty($do)) { - if (is_array($id)) { - $ids = implode(',', $id); - } else { - showmsg('未选中要操作的内容', '-1'); - exit(); - } - $query = "DELETE FROM `$diy->table` WHERE id IN ($ids)"; - if ($dsql->ExecuteNoneQuery($query)) { - showmsg('删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); - } else { - showmsg('删除失败', "diy_list.php?action=list&diyid={$diy->diyid}"); - } - } else if ($do = 1) { - $row = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); - if (file_exists($cfg_basedir.$row[$name])) { - unlink($cfg_basedir.$row[$name]); - $dsql->ExecuteNoneQuery("UPDATE `$diy->table` SET $name='' WHERE id='$id'"); - showmsg('文件删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); - } else { - showmsg('文件不存在', '-1'); - } - } -} -elseif($action == 'excel') { - ob_end_clean();//清除缓冲区,避免乱码 - header("Content-type:application/vnd.ms-excel"); - header("Content-Disposition:attachment;filename={$diy->name}_".date("Y-m-d").".xls"); - print(chr(0xEF).chr(0xBB).chr(0xBF));//清除bom - $fieldlist = $diy->getFieldList(); - echo ""; - foreach($fieldlist as $field=>$fielddata) - { - echo ""; - } - echo ""; - echo ""; - $sql = "SELECT * FROM {$diy->table} ORDER BY id DESC"; - $dsql->SetQuery($sql); - $dsql->Execute('t'); - while($arr = $dsql->GetArray('t')) - { - echo ""; - foreach($fieldlist as $key => $field) - { - echo ""; - } - $status = $arr['ifcheck'] == 1 ? '已审核' : '未审核'; - echo ""; - echo ""; - } - echo "
{$fielddata[0]}状态
".$arr[$key]."".$status."
"; -} else { - showmsg('未定义操作', "-1"); +getForm('post', '', 'admin'); + include DEDEADMIN.'/templets/diy_post.htm'; + } else if ($do == 2) { + $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); + $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); + if (!empty($dede_fields)) { + if ($dede_fieldshash != md5($dede_fields.$cfg_cookie_encode)) { + showMsg("数据校验不对,程序返回", '-1'); + exit(); + } + } + $diyform = $dsql->getOne("SELECT * FROM #@__diyforms WHERE diyid=$diyid"); + if (!is_array($diyform)) { + showmsg("自定义表单不存在", '-1'); + exit(); + } + $addvar = $addvalue = ''; + if (!empty($dede_fields)) { + $fieldarr = explode(';', $dede_fields); + if (is_array($fieldarr)) { + foreach ($fieldarr as $field) { + if ($field == '') { + continue; + } + $fieldinfo = explode(',', $field); + if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') { + ${$fieldinfo[0]} = filterscript(stripslashes(${$fieldinfo[0]})); + ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]}); + ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); + } else { + ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); + } + $addvar .= ', `'.$fieldinfo[0].'`'; + $addvalue .= ", '".${$fieldinfo[0]}."'"; + } + } + } + $query = "INSERT INTO `{$diy->table}` (`id`, `ifcheck` $addvar) VALUES (NULL, 0 $addvalue)"; + if ($dsql->ExecuteNoneQuery($query)) { + $goto = "diy_list.php?action=list&diyid={$diy->diyid}"; + showmsg('发布成功', $goto); + } else { + showmsg('对不起,发布不成功', '-1'); + } + } +} else if ($action == 'list') { + include_once DEDEINC.'/datalistcp.class.php'; + $query = "SELECT * FROM {$diy->table} ORDER BY id DESC"; + $datalist = new DataListCP(); + $datalist->pageSize = 10; + $datalist->SetParameter('action', 'list'); + $datalist->SetParameter('diyid', $diyid); + $datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); + $datalist->SetSource($query); + $fieldlist = $diy->getFieldList(); + $datalist->Display(); +} else if ($action == 'edit') { + if (empty($do)) { + $id = isset($id) && is_numeric($id) ? $id : 0; + if (empty($id)) { + showMsg('非法操作未指定id', 'javascript:;'); + exit(); + } + $query = "SELECT * FROM {$diy->table} WHERE id=$id"; + $row = $dsql->GetOne($query); + if (!is_array($row)) { + showmsg("您访问的记录不存在或未经审核", '-1'); + exit(); + } + $postform = $diy->getForm('edit', $row, 'admin'); + $fieldlist = $diy->getFieldList(); + $c1 = $row['ifcheck'] == 1 ? 'checked' : ''; + $c2 = $row['ifcheck'] == 0 ? 'checked' : ''; + include DEDEADMIN.'/templets/diy_edit_content.htm'; + } else if ($do == 2) { + $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); + $diyform = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid=$diyid"); + $diyco = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); + if (!is_array($diyform)) { + showmsg("自定义表单不存在", '-1'); + exit(); + } + $addsql = ''; + if (!empty($dede_fields)) { + $fieldarr = explode(';', $dede_fields); + if (is_array($fieldarr)) { + foreach ($fieldarr as $field) { + if ($field == '') { + continue; + } + $fieldinfo = explode(',', $field); + if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') { + ${$fieldinfo[0]} = filterscript(stripslashes(${$fieldinfo[0]})); + ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]}); + ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); + ${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]}; + } else { + + ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'diy', $fieldinfo[0]); + ${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]}; + } + $addsql .= !empty($addsql) ? ',`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'" : '`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'"; + } + } + } + $query = "UPDATE `$diy->table` SET $addsql WHERE id=$id"; + if ($dsql->ExecuteNoneQuery($query)) { + $goto = "diy_list.php?action=list&diyid={$diy->diyid}"; + showmsg('编辑成功', $goto); + } else { + showmsg('编辑成功', '-1'); + } + } +} elseif ($action == 'check') { + if (is_array($id)) { + $ids = implode(',', $id); + } else { + showmsg('未选中要操作的内容', '-1'); + exit(); + } + $query = "UPDATE `$diy->table` SET ifcheck=1 WHERE id IN ($ids)"; + if ($dsql->ExecuteNoneQuery($query)) { + showmsg('审核成功', "diy_list.php?action=list&diyid={$diy->diyid}"); + } else { + showmsg('审核失败', "diy_list.php?action=list&diyid={$diy->diyid}"); + } +} elseif ($action == 'delete') { + if (empty($do)) { + if (is_array($id)) { + $ids = implode(',', $id); + } else { + showmsg('未选中要操作的内容', '-1'); + exit(); + } + $query = "DELETE FROM `$diy->table` WHERE id IN ($ids)"; + if ($dsql->ExecuteNoneQuery($query)) { + showmsg('删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); + } else { + showmsg('删除失败', "diy_list.php?action=list&diyid={$diy->diyid}"); + } + } else if ($do = 1) { + $row = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); + if (file_exists($cfg_basedir.$row[$name])) { + unlink($cfg_basedir.$row[$name]); + $dsql->ExecuteNoneQuery("UPDATE `$diy->table` SET $name='' WHERE id='$id'"); + showmsg('文件删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); + } else { + showmsg('文件不存在', '-1'); + } + } +} +elseif($action == 'excel') { + ob_end_clean();//清除缓冲区,避免乱码 + header("Content-type:application/vnd.ms-excel"); + header("Content-Disposition:attachment;filename={$diy->name}_".date("Y-m-d").".xls"); + print(chr(0xEF).chr(0xBB).chr(0xBF));//清除bom + $fieldlist = $diy->getFieldList(); + echo ""; + foreach($fieldlist as $field=>$fielddata) + { + echo ""; + } + echo ""; + echo ""; + $sql = "SELECT * FROM {$diy->table} ORDER BY id DESC"; + $dsql->SetQuery($sql); + $dsql->Execute('t'); + while($arr = $dsql->GetArray('t')) + { + echo ""; + foreach($fieldlist as $key => $field) + { + echo ""; + } + $status = $arr['ifcheck'] == 1 ? '已审核' : '未审核'; + echo ""; + echo ""; + } + echo "
{$fielddata[0]}状态
".$arr[$key]."".$status."
"; +} else { + showmsg('未定义操作', "-1"); } \ No newline at end of file diff --git a/src/dede/diy_main.php b/src/admin/diy_main.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/diy_main.php rename to src/admin/diy_main.php index fe053326..b8f47051 --- a/src/dede/diy_main.php +++ b/src/admin/diy_main.php @@ -1,22 +1,21 @@ -SetTemplet(DEDEADMIN."/templets/diy_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); -$dlist->Close(); +SetTemplet(DEDEADMIN."/templets/diy_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); +$dlist->Close(); diff --git a/src/dede/erraddsave.php b/src/admin/erraddsave.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/erraddsave.php rename to src/admin/erraddsave.php index 7fefb37a..4b38a31d --- a/src/dede/erraddsave.php +++ b/src/admin/erraddsave.php @@ -1,100 +1,99 @@ -GetOne($sql); - return $row['uname']; - exit(); - } - exit(); -} - -function typename($me) -{ - switch ($me) { - case $me == 1: - return $me = "错别字"; - break; - case $me == 2: - return $me = "成语运用不当"; - break; - case $me == 3: - return $me = "专业术语写法不规则"; - break; - case $me == 4: - return $me = "产品与图片不符"; - break; - case $me == 5: - return $me = "事实年代以及内容错误"; - break; - case $me == 6: - return $me = "事实年代以及内容错误"; - break; - case $me == 7: - return $me = "其他错误"; - break; - default: - return $me = "未知错误"; - break; - } -} - -if ($dopost == "delete") { - if ($id == '') { - ShowMsg("参数无效", "-1"); - exit(); - } - - - if ($fmdo == 'yes') { - $id = explode("`", $id); - foreach ($id as $var) { - $query = "DELETE FROM `#@__erradd` WHERE `id` = '$var'"; - $dsql->ExecuteNoneQuery($query); - } - ShowMsg("成功删除指定的文档", "erraddsave.php"); - exit(); - } else { - require_once(DEDEINC."/oxwindow.class.php"); - $wintitle = "删除"; - $wecome_info = "错误管理::删除错误"; - $win = new OxWindow(); - $win->Init("erraddsave.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("id", $id); - $win->AddTitle("您确实要删除“ $id ”这些错误提示?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); - } - exit(); -} - -$sql = "SELECT * FROM `#@__erradd` ORDER BY id desc"; -$dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN."/templets/erradd.htm"); -$dlist->SetSource($sql); -$dlist->display(); +GetOne($sql); + return $row['uname']; + exit(); + } + exit(); +} + +function typename($me) +{ + switch ($me) { + case $me == 1: + return $me = "错别字"; + break; + case $me == 2: + return $me = "成语运用不当"; + break; + case $me == 3: + return $me = "专业术语写法不规则"; + break; + case $me == 4: + return $me = "产品与图片不符"; + break; + case $me == 5: + return $me = "事实年代以及内容错误"; + break; + case $me == 6: + return $me = "事实年代以及内容错误"; + break; + case $me == 7: + return $me = "其他错误"; + break; + default: + return $me = "未知错误"; + break; + } +} + +if ($dopost == "delete") { + if ($id == '') { + ShowMsg("参数无效", "-1"); + exit(); + } + + + if ($fmdo == 'yes') { + $id = explode("`", $id); + foreach ($id as $var) { + $query = "DELETE FROM `#@__erradd` WHERE `id` = '$var'"; + $dsql->ExecuteNoneQuery($query); + } + ShowMsg("成功删除指定的文档", "erraddsave.php"); + exit(); + } else { + require_once(DEDEINC."/oxwindow.class.php"); + $wintitle = "删除"; + $wecome_info = "错误管理::删除错误"; + $win = new OxWindow(); + $win->Init("erraddsave.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("id", $id); + $win->AddTitle("您确实要删除“ $id ”这些错误提示?"); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); + } + exit(); +} + +$sql = "SELECT * FROM `#@__erradd` ORDER BY id desc"; +$dlist = new DataListCP(); +$dlist->SetTemplet(DEDEADMIN."/templets/erradd.htm"); +$dlist->SetSource($sql); +$dlist->display(); diff --git a/src/dede/exit.php b/src/admin/exit.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/exit.php rename to src/admin/exit.php index f907b11c..3c573954 --- a/src/dede/exit.php +++ b/src/admin/exit.php @@ -1,24 +1,23 @@ -exitUser(); -if (empty($needclose)) { - header('location:index.php'); -} else { - $msg = ""; - echo $msg; -} +exitUser(); +if (empty($needclose)) { + header('location:index.php'); +} else { + $msg = ""; + echo $msg; +} diff --git a/src/dede/feedback_edit.php b/src/admin/feedback_edit.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/feedback_edit.php rename to src/admin/feedback_edit.php index ca85804a..b9130b36 --- a/src/dede/feedback_edit.php +++ b/src/admin/feedback_edit.php @@ -1,43 +1,42 @@ -", ">", $adminmsg); - $adminmsg = str_replace(" ", "  ", $adminmsg); - $adminmsg = str_replace("\r\n", "
\n", $adminmsg); - $msg = $msg."
\n"."管理员回复: $adminmsg\n"; - } - $query = "UPDATE `#@__feedback` SET username='$username',msg='$msg',ischeck=1 WHERE id=$id"; - $dsql->ExecuteNoneQuery($query); - ShowMsg("成功回复一则留言", $ENV_GOBACK_URL); - exit(); -} elseif ($dopost === 'makehtml') { - require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); - $query = "SELECT * FROM `#@__feedback` WHERE id=$id"; - $row = $dsql->GetOne($query); - MakeArt($row['aid']); - ShowMsg("成功更新评论所在的文档内容", $ENV_GOBACK_URL); - exit(); -} -$query = "SELECT * FROM `#@__feedback` WHERE id=$id"; -$row = $dsql->GetOne($query); -include DedeInclude('templets/feedback_edit.htm'); +", ">", $adminmsg); + $adminmsg = str_replace(" ", "  ", $adminmsg); + $adminmsg = str_replace("\r\n", "
\n", $adminmsg); + $msg = $msg."
\n"."管理员回复: $adminmsg\n"; + } + $query = "UPDATE `#@__feedback` SET username='$username',msg='$msg',ischeck=1 WHERE id=$id"; + $dsql->ExecuteNoneQuery($query); + ShowMsg("成功回复一则留言", $ENV_GOBACK_URL); + exit(); +} elseif ($dopost === 'makehtml') { + require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); + $query = "SELECT * FROM `#@__feedback` WHERE id=$id"; + $row = $dsql->GetOne($query); + MakeArt($row['aid']); + ShowMsg("成功更新评论所在的文档内容", $ENV_GOBACK_URL); + exit(); +} +$query = "SELECT * FROM `#@__feedback` WHERE id=$id"; +$row = $dsql->GetOne($query); +include DedeInclude('templets/feedback_edit.htm'); diff --git a/src/dede/feedback_main.php b/src/admin/feedback_main.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/feedback_main.php rename to src/admin/feedback_main.php index 51967c61..8add72b0 --- a/src/dede/feedback_main.php +++ b/src/admin/feedback_main.php @@ -1,123 +1,122 @@ -[未审核]"; -} - -function jsTrimjajx($str, $len) -{ - $str = preg_replace("/{quote}(.*){\/quote}/is", '', $str); - $str = str_replace('<br/>', ' ', $str); - $str = cn_substr($str, $len); - $str = preg_replace("/['\"\r\n]/", "", $str); - $str = str_replace('<', '<', $str); - $str = str_replace('>', '>', $str); - return $str; -} - -if (!empty($job)) { - $ids = preg_replace("#[^0-9,]#", '', $fid); - if (empty($ids)) { - ShowMsg("您没选中任何选项", $_COOKIE['ENV_GOBACK_URL'], 0, 500); - exit; - } -} else { - $job = ''; -} - -// 更新回复统计 -function UpdateReplycount($id) -{ - global $dsql; - $row = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__feedback` WHERE fid = $id AND ischeck=1"); - $dsql->ExecNoneQuery("UPDATE `#@__feedback` SET `replycount`='{$row['dd']}' WHERE `id`=$id;"); -} - -//删除评论 -if ($job == 'del') { - $query = "DELETE FROM `#@__feedback` WHERE id IN($ids) "; - $dsql->ExecuteNoneQuery($query); - ShowMsg("成功删除指定的评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); - exit(); -} -//删除相同IP的所有评论 -else if ($job == 'delall') { - $dsql->SetQuery("SELECT ip FROM `#@__feedback` WHERE id IN ($ids) "); - $dsql->Execute(); - $ips = ''; - while ($row = $dsql->GetArray()) { - $ips .= ($ips == '' ? " ip = '{$row['ip']}' " : " Or ip = '{$row['ip']}' "); - } - if ($ips != '') { - $query = "DELETE FROM `#@__feedback` WHERE $ips "; - $dsql->ExecuteNoneQuery($query); - } - ShowMsg("成功删除指定相同IP的所有评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); - exit(); -} -//审核评论 -else if ($job == 'check') { - - $query = "UPDATE `#@__feedback` SET ischeck=1 WHERE id IN($ids) "; - $dsql->ExecuteNoneQuery($query); - - $dquery = "SELECT * FROM `#@__feedback` WHERE id IN($ids)"; - $dsql->SetQuery($dquery); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - UpdateReplycount($row['fid']); - } - - ShowMsg("成功审核指定评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); - exit(); -} -//浏览评论 -else { - $bgcolor = ''; - $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; - $aid = isset($aid) && is_numeric($aid) ? $aid : 0; - $fid = isset($fid) && is_numeric($fid) ? $fid : 0; - $keyword = !isset($keyword) ? '' : $keyword; - $ip = !isset($ip) ? '' : $ip; - - $tl = new TypeLink($typeid); - $openarray = $tl->GetOptionArray($typeid, $admin_catalogs, 0); - - $addsql = ($typeid != 0 ? " And typeid IN (".GetSonIds($typeid).")" : ''); - $addsql .= ($aid != 0 ? " And aid=$aid " : ''); - $addsql .= ($ip != '' ? " And ip LIKE '$ip' " : ''); - - if ($fid > 0) { - $addsql .= " AND fid={$fid} "; - } - - $querystring = "SELECT * FROM `#@__feedback` WHERE msg LIKE '%$keyword%' $addsql ORDER BY dtime DESC"; - - $dlist = new DataListCP(); - $dlist->pageSize = 15; - $dlist->SetParameter('aid', $aid); - $dlist->SetParameter('ip', $ip); - $dlist->SetParameter('typeid', $typeid); - $dlist->SetParameter('keyword', $keyword); - $dlist->SetTemplate(DEDEADMIN.'/templets/feedback_main.htm'); - $dlist->SetSource($querystring); - $dlist->Display(); -} +[未审核]"; +} + +function jsTrimjajx($str, $len) +{ + $str = preg_replace("/{quote}(.*){\/quote}/is", '', $str); + $str = str_replace('<br/>', ' ', $str); + $str = cn_substr($str, $len); + $str = preg_replace("/['\"\r\n]/", "", $str); + $str = str_replace('<', '<', $str); + $str = str_replace('>', '>', $str); + return $str; +} + +if (!empty($job)) { + $ids = preg_replace("#[^0-9,]#", '', $fid); + if (empty($ids)) { + ShowMsg("您没选中任何选项", $_COOKIE['ENV_GOBACK_URL'], 0, 500); + exit; + } +} else { + $job = ''; +} + +//更新回复统计 +function UpdateReplycount($id) +{ + global $dsql; + $row = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__feedback` WHERE fid = $id AND ischeck=1"); + $dsql->ExecNoneQuery("UPDATE `#@__feedback` SET `replycount`='{$row['dd']}' WHERE `id`=$id;"); +} + +//删除评论 +if ($job == 'del') { + $query = "DELETE FROM `#@__feedback` WHERE id IN($ids) "; + $dsql->ExecuteNoneQuery($query); + ShowMsg("成功删除指定的评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); + exit(); +} +//删除相同IP的所有评论 +else if ($job == 'delall') { + $dsql->SetQuery("SELECT ip FROM `#@__feedback` WHERE id IN ($ids) "); + $dsql->Execute(); + $ips = ''; + while ($row = $dsql->GetArray()) { + $ips .= ($ips == '' ? " ip = '{$row['ip']}' " : " Or ip = '{$row['ip']}' "); + } + if ($ips != '') { + $query = "DELETE FROM `#@__feedback` WHERE $ips "; + $dsql->ExecuteNoneQuery($query); + } + ShowMsg("成功删除指定相同IP的所有评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); + exit(); +} +//审核评论 +else if ($job == 'check') { + + $query = "UPDATE `#@__feedback` SET ischeck=1 WHERE id IN($ids) "; + $dsql->ExecuteNoneQuery($query); + + $dquery = "SELECT * FROM `#@__feedback` WHERE id IN($ids)"; + $dsql->SetQuery($dquery); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + UpdateReplycount($row['fid']); + } + + ShowMsg("成功审核指定评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); + exit(); +} +//浏览评论 +else { + $bgcolor = ''; + $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; + $aid = isset($aid) && is_numeric($aid) ? $aid : 0; + $fid = isset($fid) && is_numeric($fid) ? $fid : 0; + $keyword = !isset($keyword) ? '' : $keyword; + $ip = !isset($ip) ? '' : $ip; + + $tl = new TypeLink($typeid); + $openarray = $tl->GetOptionArray($typeid, $admin_catalogs, 0); + + $addsql = ($typeid != 0 ? " And typeid IN (".GetSonIds($typeid).")" : ''); + $addsql .= ($aid != 0 ? " And aid=$aid " : ''); + $addsql .= ($ip != '' ? " And ip LIKE '$ip' " : ''); + + if ($fid > 0) { + $addsql .= " AND fid={$fid} "; + } + + $querystring = "SELECT * FROM `#@__feedback` WHERE msg LIKE '%$keyword%' $addsql ORDER BY dtime DESC"; + + $dlist = new DataListCP(); + $dlist->pageSize = 15; + $dlist->SetParameter('aid', $aid); + $dlist->SetParameter('ip', $ip); + $dlist->SetParameter('typeid', $typeid); + $dlist->SetParameter('keyword', $keyword); + $dlist->SetTemplate(DEDEADMIN.'/templets/feedback_main.htm'); + $dlist->SetSource($querystring); + $dlist->Display(); +} diff --git a/src/dede/file_class.php b/src/admin/file_class.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/file_class.php rename to src/admin/file_class.php index 43d58e3b..601da04a --- a/src/dede/file_class.php +++ b/src/admin/file_class.php @@ -1,208 +1,209 @@ -baseDir = $cfg_basedir; - $this->activeDir = $activepath; - } - - //更改文件名 - function RenameFile($oldname, $newname) - { - $oldname = $this->baseDir.$this->activeDir."/".$oldname; - $newname = $this->baseDir.$this->activeDir."/".$newname; - if (($newname != $oldname) && is_writable($oldname)) { - rename($oldname, $newname); - } - ShowMsg("成功更改一个文件名", "file_manage_main.php?activepath=".$this->activeDir); - return 0; - } - - //创建新目录 - function NewDir($dirname) - { - $newdir = $dirname; - $dirname = $this->baseDir.$this->activeDir."/".$dirname; - if (is_writable($this->baseDir.$this->activeDir)) { - MkdirAll($dirname, $GLOBALS['cfg_dir_purview']); - CloseFtp(); - ShowMsg("成功创建一个新目录", "file_manage_main.php?activepath=".$this->activeDir."/".$newdir); - return 1; - } else { - ShowMsg("创建新目录失败,因为这个位置不允许写入", "file_manage_main.php?activepath=".$this->activeDir); - return 0; - } - } - - /** - * 移动文件 - * - * @access public - * @param string $mfile 文件 - * @param string $mpath 路径 - * @return string - */ - function MoveFile($mfile, $mpath) - { - if ($mpath != "" && !preg_match("#\.\.#", $mpath)) { - $oldfile = $this->baseDir.$this->activeDir."/$mfile"; - $mpath = str_replace("\\", "/", $mpath); - $mpath = preg_replace("#\/{1,}#", "/", $mpath); - if (!preg_match("#^/#", $mpath)) { - $mpath = $this->activeDir."/".$mpath; - } - $truepath = $this->baseDir.$mpath; - if (is_readable($oldfile) && is_readable($truepath) && is_writable($truepath)) { - if (is_dir($truepath)) { - copy($oldfile, $truepath."/$mfile"); - } else { - MkdirAll($truepath, $GLOBALS['cfg_dir_purview']); - CloseFtp(); - copy($oldfile, $truepath."/$mfile"); - } - unlink($oldfile); - ShowMsg("成功移动文件", "file_manage_main.php?activepath=$mpath", 0, 1000); - return 1; - } else { - ShowMsg("移动文件 $oldfile -> $truepath/$mfile 失败,可能是某个位置权限不足", "file_manage_main.php?activepath=$mpath", 0, 1000); - return 0; - } - } else { - ShowMsg("对不起,您移动的路径不合法", "-1", 0, 5000); - return 0; - } - } - - /** - * 删除目录 - * - * @param unknown_type $indir - */ - function RmDirFiles($indir) - { - if (!is_dir($indir)) { - return; - } - $dh = dir($indir); - while ($filename = $dh->read()) { - if ($filename == "." || $filename == "..") { - continue; - } else if (is_file("$indir/$filename")) { - @unlink("$indir/$filename"); - } else { - $this->RmDirFiles("$indir/$filename"); - } - } - $dh->close(); - @rmdir($indir); - } - - /** - * 获得某目录合符规则的文件 - * - * @param unknown_type $indir - * @param unknown_type $fileexp - * @param unknown_type $filearr - */ - function GetMatchFiles($indir, $fileexp, &$filearr) - { - $dh = dir($indir); - while ($filename = $dh->read()) { - $truefile = $indir.'/'.$filename; - if ($filename == "." || $filename == "..") { - continue; - } else if (is_dir($truefile)) { - $this->GetMatchFiles($truefile, $fileexp, $filearr); - } else if (substr($filename, -strlen($fileexp)) === $fileexp) { - $filearr[] = $truefile; - } - } - $dh->close(); - } - - /** - * 删除文件 - * - * @param unknown_type $filename - * @return unknown - */ - function DeleteFile($filename) - { - $filename = $this->baseDir.$this->activeDir."/$filename"; - if (is_file($filename)) { - @unlink($filename); - $t = "文件"; - } else { - $t = "目录"; - if ($this->allowDeleteDir == 1) { - $this->RmDirFiles($filename); - } else { - // 完善用户体验,by:sumic - ShowMsg("系统禁止删除".$t."", "file_manage_main.php?activepath=".$this->activeDir); - exit; - } - } - ShowMsg("成功删除一个".$t."", "file_manage_main.php?activepath=".$this->activeDir); - return 0; - } -} - -//目录文件大小检测类 -class SpaceUse -{ - var $totalsize = 0; - - function checksize($indir) - { - $dh = dir($indir); - while ($filename = $dh->read()) { - if (!preg_match("#^\.#", $filename)) { - if (is_dir("$indir/$filename")) { - $this->checksize("$indir/$filename"); - } else { - $this->totalsize = $this->totalsize + filesize("$indir/$filename"); - } - } - } - } - - function setkb($size) - { - $size = $size / 1024; - - if ($size > 0) { - list($t1, $t2) = explode(".", $size); - $size = $t1.".".substr($t2, 0, 1); - } - return $size; - } - - function setmb($size) - { - $size = $size / 1024 / 1024; - if ($size > 0) { - list($t1, $t2) = explode(".", $size); - $size = $t1.".".substr($t2, 0, 2); - } - return $size; - } -} +baseDir = $cfg_basedir; + $this->activeDir = $activepath; + } + + //修改文件名 + function RenameFile($oldname, $newname) + { + $oldname = $this->baseDir.$this->activeDir."/".$oldname; + $newname = $this->baseDir.$this->activeDir."/".$newname; + if (($newname != $oldname) && is_writable($oldname)) { + rename($oldname, $newname); + } + ShowMsg("成功修改一个文件名", "file_manage_main.php?activepath=".$this->activeDir); + return 0; + } + + //创建新目录 + function NewDir($dirname) + { + $newdir = $dirname; + $dirname = $this->baseDir.$this->activeDir."/".$dirname; + if (is_writable($this->baseDir.$this->activeDir)) { + MkdirAll($dirname, $GLOBALS['cfg_dir_purview']); + CloseFtp(); + ShowMsg("成功创建一个新目录", "file_manage_main.php?activepath=".$this->activeDir."/".$newdir); + return 1; + } else { + ShowMsg("创建新目录失败,因为这个位置不允许写入", "file_manage_main.php?activepath=".$this->activeDir); + return 0; + } + } + + /** + * 移动文件 + * + * @access public + * @param string $mfile 文件 + * @param string $mpath 路径 + * @return string + */ + function MoveFile($mfile, $mpath) + { + if ($mpath != "" && !preg_match("#\.\.#", $mpath)) { + $oldfile = $this->baseDir.$this->activeDir."/$mfile"; + $mpath = str_replace("\\", "/", $mpath); + $mpath = preg_replace("#\/{1,}#", "/", $mpath); + if (!preg_match("#^/#", $mpath)) { + $mpath = $this->activeDir."/".$mpath; + } + $truepath = $this->baseDir.$mpath; + if (is_readable($oldfile) && is_readable($truepath) && is_writable($truepath)) { + if (is_dir($truepath)) { + copy($oldfile, $truepath."/$mfile"); + } else { + MkdirAll($truepath, $GLOBALS['cfg_dir_purview']); + CloseFtp(); + copy($oldfile, $truepath."/$mfile"); + } + unlink($oldfile); + ShowMsg("成功移动文件", "file_manage_main.php?activepath=$mpath", 0, 1000); + return 1; + } else { + ShowMsg("移动文件 $oldfile -> $truepath/$mfile 失败,可能是某个位置权限不足", "file_manage_main.php?activepath=$mpath", 0, 1000); + return 0; + } + } else { + ShowMsg("对不起,您移动的路径不合法", "-1", 0, 5000); + return 0; + } + } + + /** + * 删除目录 + * + * @param unknown_type $indir + */ + function RmDirFiles($indir) + { + if (!is_dir($indir)) { + return; + } + $dh = dir($indir); + while ($filename = $dh->read()) { + if ($filename == "." || $filename == "..") { + continue; + } else if (is_file("$indir/$filename")) { + @unlink("$indir/$filename"); + } else { + $this->RmDirFiles("$indir/$filename"); + } + } + $dh->close(); + @rmdir($indir); + } + + /** + * 获得某目录合符规则的文件 + * + * @param unknown_type $indir + * @param unknown_type $fileexp + * @param unknown_type $filearr + */ + function GetMatchFiles($indir, $fileexp, &$filearr) + { + $dh = dir($indir); + while ($filename = $dh->read()) { + $truefile = $indir.'/'.$filename; + if ($filename == "." || $filename == "..") { + continue; + } else if (is_dir($truefile)) { + $this->GetMatchFiles($truefile, $fileexp, $filearr); + } else if (substr($filename, -strlen($fileexp)) === $fileexp) { + $filearr[] = $truefile; + } + } + $dh->close(); + } + + /** + * 删除文件 + * + * @param unknown_type $filename + * @return unknown + */ + function DeleteFile($filename) + { + $filename = $this->baseDir.$this->activeDir."/$filename"; + if (is_file($filename)) { + @unlink($filename); + $t = "文件"; + } else { + $t = "目录"; + if ($this->allowDeleteDir == 1) { + $this->RmDirFiles($filename); + } else { + //完善用户体验,by:sumic + ShowMsg("系统禁止删除".$t."", "file_manage_main.php?activepath=".$this->activeDir); + exit; + } + } + ShowMsg("成功删除一个".$t."", "file_manage_main.php?activepath=".$this->activeDir); + return 0; + } +} + +//目录文件大小检测类 +class SpaceUse +{ + var $totalsize = 0; + + function checksize($indir) + { + $dh = dir($indir); + while ($filename = $dh->read()) { + if (!preg_match("#^\.#", $filename)) { + if (is_dir("$indir/$filename")) { + $this->checksize("$indir/$filename"); + } else { + $this->totalsize = $this->totalsize + filesize("$indir/$filename"); + } + } + } + } + + function setkb($size) + { + $size = $size / 1024; + + if ($size > 0) { + list($t1, $t2) = explode(".", $size); + $size = $t1.".".substr($t2, 0, 1); + } + return $size; + } + + function setmb($size) + { + $size = $size / 1024 / 1024; + if ($size > 0) { + list($t1, $t2) = explode(".", $size); + $size = $t1.".".substr($t2, 0, 2); + } + return $size; + } +} diff --git a/src/dede/file_manage_control.php b/src/admin/file_manage_control.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/file_manage_control.php rename to src/admin/file_manage_control.php index 288d9149..50896bb0 --- a/src/dede/file_manage_control.php +++ b/src/admin/file_manage_control.php @@ -1,5 +1,4 @@ 文件浏览器]"; + $wecome_info = "文件管理::修改文件名 [文件浏览器]"; $win = new OxWindow(); $win->Init("file_manage_control.php", "js/blank.js", "POST"); $win->AddHidden("fmdo", $fmdo); $win->AddHidden("activepath", $activepath); $win->AddHidden("filename", $filename); - $win->AddTitle("更改文件名,当前路径:$ndirstring"); + $win->AddTitle("修改文件名,当前路径:$ndirstring"); $win->AddItem("旧名称:", ""); $win->AddItem("新名称:", ""); $winform = $win->GetWindow("ok"); diff --git a/src/dede/freelist_add.php b/src/admin/freelist_add.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/freelist_add.php rename to src/admin/freelist_add.php index 2a32de96..02a4219f --- a/src/dede/freelist_add.php +++ b/src/admin/freelist_add.php @@ -1,51 +1,50 @@ -ExecuteNoneQuery($inquery); - ShowMsg("成功增加一个自由列表!", "freelist_main.php"); - exit(); -} +ExecuteNoneQuery($inquery); + ShowMsg("成功增加一个自由列表!", "freelist_main.php"); + exit(); +} diff --git a/src/dede/freelist_edit.php b/src/admin/freelist_edit.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/freelist_edit.php rename to src/admin/freelist_edit.php index fd262b23..7e818c88 --- a/src/dede/freelist_edit.php +++ b/src/admin/freelist_edit.php @@ -1,57 +1,56 @@ -GetOne("Select * From `#@__freelist` where aid='$aid' "); - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("dede", "{", "}"); - $dtp->LoadSource("--".$row['listtag']."--"); - $ctag = $dtp->GetTag('list'); - include DedeInclude('templets/freelist_edit.htm'); - exit(); -} else if ($dopost == 'save') { - if (!isset($types)) $types = ''; - if (!isset($nodefault)) $nodefault = '0'; - $atts = " pagesize='$pagesize' col='$col' titlelen='$titlelen' orderby='$orderby' orderway='$order' \r\n"; - $ntype = ''; - $edtime = time(); - if (is_array($types)) { - foreach ($types as $v) $ntype .= $v.' '; - } - - if ($ntype != '') $atts .= " type='".trim($ntype)."' "; - if (!empty($typeid)) $atts .= " typeid='$typeid' "; - if (!empty($channel)) $atts .= " channel='$channel' "; - if (!empty($subday)) $atts .= " subday='$subday' "; - if (!empty($keywordarc)) $atts .= " keyword='$keywordarc' "; - if (!empty($att)) $atts .= " att='$att' "; - - $innertext = trim($innertext); - if (!empty($innertext)) $innertext = stripslashes($innertext); - - $listTag = "{dede:list $atts}$innertext{/dede:list}"; - $listTag = addslashes($listTag); - $inquery = " - UPDATE `#@__freelist` set - title='$title', namerule='$namerule', - listdir='$listdir', defaultpage='$defaultpage', - nodefault='$nodefault', templet='$templet', - edtime='$edtime', `maxpage`='$maxpage', listtag='$listTag', keywords='$keywords', - description='$description' WHERE aid='$aid'; - "; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功更改一个自由列表!", "freelist_main.php"); - exit(); -} +GetOne("Select * From `#@__freelist` where aid='$aid' "); + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("dede", "{", "}"); + $dtp->LoadSource("--".$row['listtag']."--"); + $ctag = $dtp->GetTag('list'); + include DedeInclude('templets/freelist_edit.htm'); + exit(); +} else if ($dopost == 'save') { + if (!isset($types)) $types = ''; + if (!isset($nodefault)) $nodefault = '0'; + $atts = " pagesize='$pagesize' col='$col' titlelen='$titlelen' orderby='$orderby' orderway='$order' \r\n"; + $ntype = ''; + $edtime = time(); + if (is_array($types)) { + foreach ($types as $v) $ntype .= $v.' '; + } + + if ($ntype != '') $atts .= " type='".trim($ntype)."' "; + if (!empty($typeid)) $atts .= " typeid='$typeid' "; + if (!empty($channel)) $atts .= " channel='$channel' "; + if (!empty($subday)) $atts .= " subday='$subday' "; + if (!empty($keywordarc)) $atts .= " keyword='$keywordarc' "; + if (!empty($att)) $atts .= " att='$att' "; + + $innertext = trim($innertext); + if (!empty($innertext)) $innertext = stripslashes($innertext); + + $listTag = "{dede:list $atts}$innertext{/dede:list}"; + $listTag = addslashes($listTag); + $inquery = " + UPDATE `#@__freelist` set + title='$title', namerule='$namerule', + listdir='$listdir', defaultpage='$defaultpage', + nodefault='$nodefault', templet='$templet', + edtime='$edtime', `maxpage`='$maxpage', listtag='$listTag', keywords='$keywords', + description='$description' WHERE aid='$aid'; + "; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功修改一个自由列表!", "freelist_main.php"); + exit(); +} diff --git a/src/dede/freelist_main.php b/src/admin/freelist_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/freelist_main.php rename to src/admin/freelist_main.php index aa1239a0..01151261 --- a/src/dede/freelist_main.php +++ b/src/admin/freelist_main.php @@ -1,99 +1,99 @@ -ExecuteNoneQuery("DELETE FROM `#@__freelist` WHERE aid='$aid'; "); - AjaxHead(); - GetTagList($dsql,$pageno,$pagesize,$orderby); - exit(); -} - -//第一次进入这个页面 -if($dopost=='') -{ - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__freelist` $addsql "); - $totalRow = $row['dd']; - include(DEDEADMIN."/templets/freelist_main.htm"); -} - -/** - * 获得特定的Tag列表 - * - * @param object $dsql - * @param int $pageno - * @param int $pagesize - * @param string $orderby - */ -function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') -{ - global $cfg_phpurl,$addsql; - $start = ($pageno-1) * $pagesize; - $printhead =" - - - - - - - - \r\n"; - echo $printhead; - $dsql->SetQuery("Select aid,title,templet,click,edtime,namerule,listdir,defaultpage,nodefault From #@__freelist $addsql order by $orderby desc limit $start,$pagesize "); - $dsql->Execute(); - while($row = $dsql->GetArray()) - { - $listurl = GetFreeListUrl($row['aid'],$row['namerule'],$row['listdir'],$row['defaultpage'],$row['nodefault']); - $line = " - - - - - - - - "; - echo $line; - } - echo "
ID列表名称模板文件点击创建时间管理
{$row['aid']} {$row['title']} {$row['templet']} {$row['click']} ".MyDate("y-m-d",$row['edtime'])." 更改 - 更新 - 删除 -
\r\n"; -} +ExecuteNoneQuery("DELETE FROM `#@__freelist` WHERE aid='$aid'; "); + AjaxHead(); + GetTagList($dsql,$pageno,$pagesize,$orderby); + exit(); +} + +//第一次进入这个页面 +if($dopost=='') +{ + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__freelist` $addsql "); + $totalRow = $row['dd']; + include(DEDEADMIN."/templets/freelist_main.htm"); +} + +/** + * 获得特定的Tag列表 + * + * @param object $dsql + * @param int $pageno + * @param int $pagesize + * @param string $orderby + */ +function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') +{ + global $cfg_phpurl,$addsql; + $start = ($pageno-1) * $pagesize; + $printhead =" + + + + + + + + \r\n"; + echo $printhead; + $dsql->SetQuery("Select aid,title,templet,click,edtime,namerule,listdir,defaultpage,nodefault From #@__freelist $addsql order by $orderby desc limit $start,$pagesize "); + $dsql->Execute(); + while($row = $dsql->GetArray()) + { + $listurl = GetFreeListUrl($row['aid'],$row['namerule'],$row['listdir'],$row['defaultpage'],$row['nodefault']); + $line = " + + + + + + + + "; + echo $line; + } + echo "
ID列表名称模板文件点击创建时间管理
{$row['aid']} {$row['title']} {$row['templet']} {$row['click']} ".MyDate("y-m-d",$row['edtime'])." 修改 + 更新 + 删除 +
\r\n"; +} diff --git a/src/dede/friendlink_add.php b/src/admin/friendlink_add.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/friendlink_add.php rename to src/admin/friendlink_add.php index 9a0f5e53..dfdb8910 --- a/src/dede/friendlink_add.php +++ b/src/admin/friendlink_add.php @@ -1,55 +1,54 @@ -ExecuteNoneQuery("ALTER TABLE `#@__flinktype` CHANGE `ID` `id` MEDIUMINT( 8 ) UNSIGNED DEFAULT NULL AUTO_INCREMENT; "); - } - - $query = "INSERT INTO `#@__flink`(sortrank,url,webname,logo,msg,email,typeid,dtime,ischeck) - VALUES('$sortrank','$url','$webname','$imgurl','$msg','$email','$typeid','$dtime','$ischeck'); "; - $rs = $dsql->ExecuteNoneQuery($query); - $burl = empty($_COOKIE['ENV_GOBACK_URL']) ? "friendlink_main.php" : $_COOKIE['ENV_GOBACK_URL']; - if ($rs) { - ShowMsg("成功增加一个链接!", $burl, 0, 500); - exit(); - } else { - ShowMsg("增加链接时出错,请向官方反馈,原因:".$dsql->GetError(), "javascript:;"); - exit(); - } -} -include DedeInclude('templets/friendlink_add.htm'); +ExecuteNoneQuery("ALTER TABLE `#@__flinktype` CHANGE `ID` `id` MEDIUMINT( 8 ) UNSIGNED DEFAULT NULL AUTO_INCREMENT; "); + } + + $query = "INSERT INTO `#@__flink`(sortrank,url,webname,logo,msg,email,typeid,dtime,ischeck) + VALUES('$sortrank','$url','$webname','$imgurl','$msg','$email','$typeid','$dtime','$ischeck'); "; + $rs = $dsql->ExecuteNoneQuery($query); + $burl = empty($_COOKIE['ENV_GOBACK_URL']) ? "friendlink_main.php" : $_COOKIE['ENV_GOBACK_URL']; + if ($rs) { + ShowMsg("成功增加一个链接!", $burl, 0, 500); + exit(); + } else { + ShowMsg("增加链接时出错,请向官方反馈,原因:".$dsql->GetError(), "javascript:;"); + exit(); + } +} +include DedeInclude('templets/friendlink_add.htm'); diff --git a/src/dede/friendlink_edit.php b/src/admin/friendlink_edit.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/friendlink_edit.php rename to src/admin/friendlink_edit.php index 8b7132d7..d256fc00 --- a/src/dede/friendlink_edit.php +++ b/src/admin/friendlink_edit.php @@ -1,68 +1,67 @@ -ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$id'"); - ShowMsg("成功删除一个链接", $ENV_GOBACK_URL); - exit(); -} else if ($dopost == "delall") { - $aids = explode(',', $aids); - if (isset($aids) && is_array($aids)) { - foreach ($aids as $aid) { - $aid = preg_replace("#[^0-9]#", "", $aid); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$aid'"); - } - ShowMsg("成功删除指定链接", $ENV_GOBACK_URL); - exit(); - } else { - ShowMsg("您没选定任何链接", $ENV_GOBACK_URL); - exit(); - } -} else if ($dopost == "saveedit") { - require_once DEDEINC.'/request.class.php'; - $request = new Request(); - $request->Init(); - $id = preg_replace("#[^0-9]#", "", $request->Item('id', 0)); - $logo = $request->Item('logo', ''); - $logoimg = $request->Upfile('logoimg', ''); - if (!empty($logoimg)) { - $request->MoveUploadFile('logoimg', DEDEROOT.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name')); - $logo = $cfg_cmspath.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name'); - } - $sortrank = $request->Item('sortrank', 1); - $url = $request->Item('url', ''); - $webname = $request->Item('webname', ''); - $msg = $request->Item('msg', ''); - $email = $request->Item('email', ''); - $typeid = $request->Item('typeid', 0); - $ischeck = $request->Item('ischeck', 0); - - $query = "UPDATE `#@__flink` SET sortrank='$sortrank',url='$url',webname='$webname',logo='$logo',msg='$msg', - email='$email',typeid='$typeid',ischeck='$ischeck' WHERE id='$id' "; - $dsql->ExecuteNoneQuery($query); - ShowMsg("成功更改一个链接", $ENV_GOBACK_URL); - exit(); -} -$myLink = $dsql->GetOne("SELECT #@__flink.*,#@__flinktype.typename FROM #@__flink LEFT JOIN #@__flinktype ON #@__flink.typeid=#@__flinktype.id WHERE #@__flink.id=$id"); -include DedeInclude('templets/friendlink_edit.htm'); +ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$id'"); + ShowMsg("成功删除一个链接", $ENV_GOBACK_URL); + exit(); +} else if ($dopost == "delall") { + $aids = explode(',', $aids); + if (isset($aids) && is_array($aids)) { + foreach ($aids as $aid) { + $aid = preg_replace("#[^0-9]#", "", $aid); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$aid'"); + } + ShowMsg("成功删除指定链接", $ENV_GOBACK_URL); + exit(); + } else { + ShowMsg("您没选定任何链接", $ENV_GOBACK_URL); + exit(); + } +} else if ($dopost == "saveedit") { + require_once DEDEINC.'/request.class.php'; + $request = new Request(); + $request->Init(); + $id = preg_replace("#[^0-9]#", "", $request->Item('id', 0)); + $logo = $request->Item('logo', ''); + $logoimg = $request->Upfile('logoimg', ''); + if (!empty($logoimg)) { + $request->MoveUploadFile('logoimg', DEDEROOT.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name')); + $logo = $cfg_cmspath.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name'); + } + $sortrank = $request->Item('sortrank', 1); + $url = $request->Item('url', ''); + $webname = $request->Item('webname', ''); + $msg = $request->Item('msg', ''); + $email = $request->Item('email', ''); + $typeid = $request->Item('typeid', 0); + $ischeck = $request->Item('ischeck', 0); + + $query = "UPDATE `#@__flink` SET sortrank='$sortrank',url='$url',webname='$webname',logo='$logo',msg='$msg', + email='$email',typeid='$typeid',ischeck='$ischeck' WHERE id='$id' "; + $dsql->ExecuteNoneQuery($query); + ShowMsg("成功修改一个链接", $ENV_GOBACK_URL); + exit(); +} +$myLink = $dsql->GetOne("SELECT #@__flink.*,#@__flinktype.typename FROM #@__flink LEFT JOIN #@__flinktype ON #@__flink.typeid=#@__flinktype.id WHERE #@__flink.id=$id"); +include DedeInclude('templets/friendlink_edit.htm'); diff --git a/src/dede/friendlink_main.php b/src/admin/friendlink_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/friendlink_main.php rename to src/admin/friendlink_main.php index 58755156..76b6ebaa --- a/src/dede/friendlink_main.php +++ b/src/admin/friendlink_main.php @@ -1,47 +1,46 @@ - '不限类型', -1 => '未审核', 1 => '内页', 2 => '首页'); - -$sql = "SELECT * FROM `#@__flink` WHERE CONCAT(`url`,`webname`,`email`) LIKE '%$keyword%' $ischeckSql ORDER BY dtime desc"; - -$dlist = new DataListCP(); -$dlist->SetParameter('keyword', $keyword); -$dlist->SetParameter('ischeck', $ischeck); -$dlist->SetTemplet(DEDEADMIN.'/templets/friendlink_main.htm'); -$dlist->SetSource($sql); -$dlist->display(); - -function GetPic($pic) -{ - if ($pic == '') return '无图标'; - else return ""; -} - -function GetSta($sta) -{ - if ($sta == 1) return '内页'; - if ($sta == 2) return '首页'; - else return '未审核'; -} + '不限类型', -1 => '未审核', 1 => '内页', 2 => '首页'); + +$sql = "SELECT * FROM `#@__flink` WHERE CONCAT(`url`,`webname`,`email`) LIKE '%$keyword%' $ischeckSql ORDER BY dtime desc"; + +$dlist = new DataListCP(); +$dlist->SetParameter('keyword', $keyword); +$dlist->SetParameter('ischeck', $ischeck); +$dlist->SetTemplet(DEDEADMIN.'/templets/friendlink_main.htm'); +$dlist->SetSource($sql); +$dlist->display(); + +function GetPic($pic) +{ + if ($pic == '') return '无图标'; + else return ""; +} + +function GetSta($sta) +{ + if ($sta == 1) return '内页'; + if ($sta == 2) return '首页'; + else return '未审核'; +} diff --git a/src/dede/friendlink_type.php b/src/admin/friendlink_type.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/friendlink_type.php rename to src/admin/friendlink_type.php index 5f6bef01..721f834b --- a/src/dede/friendlink_type.php +++ b/src/admin/friendlink_type.php @@ -1,42 +1,41 @@ -ExecuteNoneQuery($query); - } - } else { - $query = "DELETE FROM `#@__flinktype` WHERE id='$tid' "; - $dsql->ExecuteNoneQuery($query); - } - } - //增加新记录 - if (isset($check_new) && $pname_new != '') { - $query = "INSERT INTO `#@__flinktype`(typename) VALUES('{$pname_new}');"; - $dsql->ExecuteNoneQuery($query); - } - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - echo ""; -} - -include DedeInclude('templets/friendlink_type.htm'); +ExecuteNoneQuery($query); + } + } else { + $query = "DELETE FROM `#@__flinktype` WHERE id='$tid' "; + $dsql->ExecuteNoneQuery($query); + } + } + //增加新记录 + if (isset($check_new) && $pname_new != '') { + $query = "INSERT INTO `#@__flinktype`(typename) VALUES('{$pname_new}');"; + $dsql->ExecuteNoneQuery($query); + } + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + echo ""; +} + +include DedeInclude('templets/friendlink_type.htm'); diff --git a/src/dede/imagecut.php b/src/admin/imagecut.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/imagecut.php rename to src/admin/imagecut.php index 85ec2bca..2e63910e --- a/src/dede/imagecut.php +++ b/src/admin/imagecut.php @@ -1,126 +1,117 @@ -点击'站内选择', 上传或选择一个图片,然后才能进行裁剪", "./dialog/select_images.php?f=form1.picname&imgstick=small", 0, 10000); - exit(); - } - include DEDEADMIN.'/templets/imagecut.htm'; - exit(); -} elseif ($action == 'cut') { - require_once(DEDEINC.'/image.func.php'); - - if (!@is_file($cfg_basedir.$file)) { - ShowMsg('对不起,请重新选择裁剪图片', '-1'); - exit(); - } - if (empty($width)) { - ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); - exit(); - } - if (empty($height)) { - ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); - exit(); - } - $imginfo = getimagesize($cfg_basedir.$file); - $imgw = $imginfo[0]; - $imgh = $imginfo[1]; - $temp = 400 / $imgw; - $newwidth = 400; - $newheight = $imgh * $temp; - $srcFile = $cfg_basedir.$file; - $thumb = imagecreatetruecolor($newwidth, $newheight); - $thumba = imagecreatetruecolor($width, $height); - - switch ($imginfo['mime']) { - case 'image/jpeg': - $source = imagecreatefromjpeg($srcFile); - break; - case 'image/gif': - $source = imagecreatefromgif($srcFile); - break; - case 'image/png': - $source = imagecreatefrompng($srcFile); - break; - default: - ShowMsg('对不起,裁剪图片类型不支持请选择其他类型图片', '-1'); - break; - } - - imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $imgw, $imgh); - imagecopy($thumba, $thumb, 0, 0, $left, $top, $newwidth, $newheight); - - $ddn = substr($srcFile, -3); - - $ddpicok = $reObjJs = ''; - if (empty($isupload)) { - $ddpicok = preg_replace("#\.".$ddn."$#", '-lp.'.$ddn, $file); - $reObjJs = " var backObj = window.opener.document.form1.picname; - var prvObj = window.opener.document.getElementById('divpicview');\r\n"; - } else { - $ddpicok = $file; - $reObjJs = " var backObj = window.opener.parent.document.form1.picname; - var prvObj = window.opener.parent.document.getElementById('divpicview');\r\n"; - } - - $ddpicokurl = $cfg_basedir.$ddpicok; - - switch ($imginfo['mime']) { - case 'image/jpeg': - imagejpeg($thumba, $ddpicokurl, 85); - break; - case 'image/gif': - imagegif($thumba, $ddpicokurl); - break; - case 'image/png': - imagepng($thumba, $ddpicokurl); - break; - default: - ShowMsg("对不起,裁剪图片类型不支持请选择其他类型图片", "-1"); - break; - } - - //对任意裁剪方式再次缩小图片至限定大小 - if ($newwidth > $cfg_ddimg_width || $newheight > $cfg_ddimg_height) { - ImageResize($ddpicokurl, $cfg_ddimg_width, $cfg_ddimg_height); - } - - //如果从其它图中剪出, 保存附件信息 - if (empty($isupload)) { - $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$ddpicok','$ddpicok','1','0','0','0','".filesize($ddpicokurl)."','".time()."','".$cuserLogin->getUserID()."'); "; - $dsql->ExecuteNoneQuery($inquery); - $fid = $dsql->GetLastID(); - AddMyAddon($fid, $ddpicok); - } - -?> - -点击'站内选择', 上传或选择一个图片,然后才能进行裁剪", "./dialog/select_images.php?f=form1.picname&imgstick=small", 0, 10000); + exit(); + } + include DEDEADMIN.'/templets/imagecut.htm'; + exit(); +} elseif ($action == 'cut') { + require_once(DEDEINC.'/image.func.php'); + + if (!@is_file($cfg_basedir.$file)) { + ShowMsg('对不起,请重新选择裁剪图片', '-1'); + exit(); + } + if (empty($width)) { + ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); + exit(); + } + if (empty($height)) { + ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); + exit(); + } + $imginfo = getimagesize($cfg_basedir.$file); + $imgw = $imginfo[0]; + $imgh = $imginfo[1]; + $temp = 400 / $imgw; + $newwidth = 400; + $newheight = $imgh * $temp; + $srcFile = $cfg_basedir.$file; + $thumb = imagecreatetruecolor($newwidth, $newheight); + $thumba = imagecreatetruecolor($width, $height); + switch ($imginfo['mime']) { + case 'image/jpeg': + $source = imagecreatefromjpeg($srcFile); + break; + case 'image/gif': + $source = imagecreatefromgif($srcFile); + break; + case 'image/png': + $source = imagecreatefrompng($srcFile); + break; + default: + ShowMsg('对不起,裁剪图片类型不支持请选择其他类型图片', '-1'); + break; + } + imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $imgw, $imgh); + imagecopy($thumba, $thumb, 0, 0, $left, $top, $newwidth, $newheight); + $ddn = substr($srcFile, -3); + $ddpicok = $reObjJs = ''; + if (empty($isupload)) { + $ddpicok = preg_replace("#\.".$ddn."$#", '-lp.'.$ddn, $file); + $reObjJs = " var backObj = window.opener.document.form1.picname; + var prvObj = window.opener.document.getElementById('divpicview');\r\n"; + } else { + $ddpicok = $file; + $reObjJs = " var backObj = window.opener.parent.document.form1.picname; + var prvObj = window.opener.parent.document.getElementById('divpicview');\r\n"; + } + $ddpicokurl = $cfg_basedir.$ddpicok; + switch ($imginfo['mime']) { + case 'image/jpeg': + imagejpeg($thumba, $ddpicokurl, 85); + break; + case 'image/gif': + imagegif($thumba, $ddpicokurl); + break; + case 'image/png': + imagepng($thumba, $ddpicokurl); + break; + default: + ShowMsg("对不起,裁剪图片类型不支持请选择其他类型图片", "-1"); + break; + } + //对任意裁剪方式再次缩小图片至限定大小 + if ($newwidth > $cfg_ddimg_width || $newheight > $cfg_ddimg_height) { + ImageResize($ddpicokurl, $cfg_ddimg_width, $cfg_ddimg_height); + } + //如果从其它图中剪出, 保存附件信息 + if (empty($isupload)) { + $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('$ddpicok','$ddpicok','1','0','0','0','".filesize($ddpicokurl)."','".time()."','".$cuserLogin->getUserID()."'); "; + $dsql->ExecuteNoneQuery($inquery); + $fid = $dsql->GetLastID(); + AddMyAddon($fid, $ddpicok); + } + +?> + + \ No newline at end of file diff --git a/src/dede/images/SmallSpyGlassWithTransperancy_17x18.png b/src/admin/images/SmallSpyGlassWithTransperancy_17x18.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/SmallSpyGlassWithTransperancy_17x18.png rename to src/admin/images/SmallSpyGlassWithTransperancy_17x18.png diff --git a/src/dede/images/addnews.gif b/src/admin/images/addnews.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/addnews.gif rename to src/admin/images/addnews.gif diff --git a/src/dede/images/admin_top_bg.jpg b/src/admin/images/admin_top_bg.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/admin_top_bg.jpg rename to src/admin/images/admin_top_bg.jpg diff --git a/src/dede/images/adminico.gif b/src/admin/images/adminico.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/adminico.gif rename to src/admin/images/adminico.gif diff --git a/src/dede/images/adminuserico.gif b/src/admin/images/adminuserico.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/adminuserico.gif rename to src/admin/images/adminuserico.gif diff --git a/src/dede/images/adtype_act.gif b/src/admin/images/adtype_act.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/adtype_act.gif rename to src/admin/images/adtype_act.gif diff --git a/src/dede/images/adtype_link.gif b/src/admin/images/adtype_link.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/adtype_link.gif rename to src/admin/images/adtype_link.gif diff --git a/src/dede/images/alb1.jpg b/src/admin/images/alb1.jpg similarity index 100% rename from src/dede/images/alb1.jpg rename to src/admin/images/alb1.jpg diff --git a/src/dede/images/alb2.jpg b/src/admin/images/alb2.jpg similarity index 100% rename from src/dede/images/alb2.jpg rename to src/admin/images/alb2.jpg diff --git a/src/dede/images/alb3.jpg b/src/admin/images/alb3.jpg similarity index 100% rename from src/dede/images/alb3.jpg rename to src/admin/images/alb3.jpg diff --git a/src/dede/images/albviewbg.jpg b/src/admin/images/albviewbg.jpg similarity index 100% rename from src/dede/images/albviewbg.jpg rename to src/admin/images/albviewbg.jpg diff --git a/src/dede/images/allbg.gif b/src/admin/images/allbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/allbg.gif rename to src/admin/images/allbg.gif diff --git a/src/dede/images/allbtbg.gif b/src/admin/images/allbtbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/allbtbg.gif rename to src/admin/images/allbtbg.gif diff --git a/src/dede/images/allbtbg2.gif b/src/admin/images/allbtbg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/allbtbg2.gif rename to src/admin/images/allbtbg2.gif diff --git a/src/dede/images/allmenu.gif b/src/admin/images/allmenu.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/allmenu.gif rename to src/admin/images/allmenu.gif diff --git a/src/dede/images/arr3.gif b/src/admin/images/arr3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arr3.gif rename to src/admin/images/arr3.gif diff --git a/src/dede/images/arr4.gif b/src/admin/images/arr4.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arr4.gif rename to src/admin/images/arr4.gif diff --git a/src/dede/images/arrfc.gif b/src/admin/images/arrfc.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arrfc.gif rename to src/admin/images/arrfc.gif diff --git a/src/dede/images/arrl.gif b/src/admin/images/arrl.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arrl.gif rename to src/admin/images/arrl.gif diff --git a/src/dede/images/arrr.gif b/src/admin/images/arrr.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arrr.gif rename to src/admin/images/arrr.gif diff --git a/src/dede/images/arttag.gif b/src/admin/images/arttag.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arttag.gif rename to src/admin/images/arttag.gif diff --git a/src/dede/images/bk.gif b/src/admin/images/bk.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bk.gif rename to src/admin/images/bk.gif diff --git a/src/dede/images/blank.gif b/src/admin/images/blank.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/blank.gif rename to src/admin/images/blank.gif diff --git a/src/dede/images/blankbg.gif b/src/admin/images/blankbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/blankbg.gif rename to src/admin/images/blankbg.gif diff --git a/src/dede/images/bodybg.gif b/src/admin/images/bodybg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bodybg.gif rename to src/admin/images/bodybg.gif diff --git a/src/dede/images/book.gif b/src/admin/images/book.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/book.gif rename to src/admin/images/book.gif diff --git a/src/dede/images/book1.gif b/src/admin/images/book1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/book1.gif rename to src/admin/images/book1.gif diff --git a/src/dede/images/booknopic.gif b/src/admin/images/booknopic.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/booknopic.gif rename to src/admin/images/booknopic.gif diff --git a/src/dede/images/bottombg.gif b/src/admin/images/bottombg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bottombg.gif rename to src/admin/images/bottombg.gif diff --git a/src/dede/images/boxy-ne.png b/src/admin/images/boxy-ne.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/boxy-ne.png rename to src/admin/images/boxy-ne.png diff --git a/src/dede/images/boxy-nw.png b/src/admin/images/boxy-nw.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/boxy-nw.png rename to src/admin/images/boxy-nw.png diff --git a/src/dede/images/boxy-se.png b/src/admin/images/boxy-se.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/boxy-se.png rename to src/admin/images/boxy-se.png diff --git a/src/dede/images/boxy-sw.png b/src/admin/images/boxy-sw.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/boxy-sw.png rename to src/admin/images/boxy-sw.png diff --git a/src/dede/images/bt.gif b/src/admin/images/bt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bt.gif rename to src/admin/images/bt.gif diff --git a/src/dede/images/bulebg.gif b/src/admin/images/bulebg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bulebg.gif rename to src/admin/images/bulebg.gif diff --git a/src/dede/images/button_back.gif b/src/admin/images/button_back.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_back.gif rename to src/admin/images/button_back.gif diff --git a/src/dede/images/button_bg1.jpg b/src/admin/images/button_bg1.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_bg1.jpg rename to src/admin/images/button_bg1.jpg diff --git a/src/dede/images/button_ok.gif b/src/admin/images/button_ok.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_ok.gif rename to src/admin/images/button_ok.gif diff --git a/src/dede/images/button_reset.gif b/src/admin/images/button_reset.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_reset.gif rename to src/admin/images/button_reset.gif diff --git a/src/dede/images/button_save.gif b/src/admin/images/button_save.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_save.gif rename to src/admin/images/button_save.gif diff --git a/src/dede/images/button_search.gif b/src/admin/images/button_search.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_search.gif rename to src/admin/images/button_search.gif diff --git a/src/dede/images/calendar.gif b/src/admin/images/calendar.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/calendar.gif rename to src/admin/images/calendar.gif diff --git a/src/dede/images/cd.gif b/src/admin/images/cd.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/cd.gif rename to src/admin/images/cd.gif diff --git a/src/dede/images/channeladd.gif b/src/admin/images/channeladd.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/channeladd.gif rename to src/admin/images/channeladd.gif diff --git a/src/dede/images/channellist.gif b/src/admin/images/channellist.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/channellist.gif rename to src/admin/images/channellist.gif diff --git a/src/dede/images/close.gif b/src/admin/images/close.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/close.gif rename to src/admin/images/close.gif diff --git a/src/dede/images/color.htm b/src/admin/images/color.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/images/color.htm rename to src/admin/images/color.htm index ce84d278..3ab70288 --- a/src/dede/images/color.htm +++ b/src/admin/images/color.htm @@ -1,45 +1,45 @@ - - - -颜色选框 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     
     
     
    
- - + + + +颜色选框 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
    
+ + diff --git a/src/dede/images/colornew.htm b/src/admin/images/colornew.htm old mode 100755 new mode 100644 similarity index 98% rename from src/dede/images/colornew.htm rename to src/admin/images/colornew.htm index b55ed4d7..5ae2de92 --- a/src/dede/images/colornew.htm +++ b/src/admin/images/colornew.htm @@ -1,30 +1,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     
     
     
    N
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
    N
diff --git a/src/dede/images/copy.gif b/src/admin/images/copy.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/copy.gif rename to src/admin/images/copy.gif diff --git a/src/dede/images/css.gif b/src/admin/images/css.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/css.gif rename to src/admin/images/css.gif diff --git a/src/dede/images/dedecontract.gif b/src/admin/images/dedecontract.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dedecontract.gif rename to src/admin/images/dedecontract.gif diff --git a/src/dede/images/dedeexplode.gif b/src/admin/images/dedeexplode.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dedeexplode.gif rename to src/admin/images/dedeexplode.gif diff --git a/src/dede/images/dedeexplode2.gif b/src/admin/images/dedeexplode2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dedeexplode2.gif rename to src/admin/images/dedeexplode2.gif diff --git a/src/dede/images/dir.gif b/src/admin/images/dir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dir.gif rename to src/admin/images/dir.gif diff --git a/src/dede/images/dir2.gif b/src/admin/images/dir2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dir2.gif rename to src/admin/images/dir2.gif diff --git a/src/dede/images/dlgtitle.gif b/src/admin/images/dlgtitle.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dlgtitle.gif rename to src/admin/images/dlgtitle.gif diff --git a/src/dede/images/exbg.gif b/src/admin/images/exbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/exbg.gif rename to src/admin/images/exbg.gif diff --git a/src/dede/images/exe.gif b/src/admin/images/exe.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/exe.gif rename to src/admin/images/exe.gif diff --git a/src/dede/images/exit.gif b/src/admin/images/exit.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/exit.gif rename to src/admin/images/exit.gif diff --git a/src/dede/images/feedback-edit.gif b/src/admin/images/feedback-edit.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/feedback-edit.gif rename to src/admin/images/feedback-edit.gif diff --git a/src/dede/images/file_del.gif b/src/admin/images/file_del.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_del.gif rename to src/admin/images/file_del.gif diff --git a/src/dede/images/file_dir.gif b/src/admin/images/file_dir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_dir.gif rename to src/admin/images/file_dir.gif diff --git a/src/dede/images/file_edit.gif b/src/admin/images/file_edit.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_edit.gif rename to src/admin/images/file_edit.gif diff --git a/src/dede/images/file_htm.gif b/src/admin/images/file_htm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_htm.gif rename to src/admin/images/file_htm.gif diff --git a/src/dede/images/file_move.gif b/src/admin/images/file_move.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_move.gif rename to src/admin/images/file_move.gif diff --git a/src/dede/images/file_newdir.gif b/src/admin/images/file_newdir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_newdir.gif rename to src/admin/images/file_newdir.gif diff --git a/src/dede/images/file_newfile.gif b/src/admin/images/file_newfile.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_newfile.gif rename to src/admin/images/file_newfile.gif diff --git a/src/dede/images/file_pic.gif b/src/admin/images/file_pic.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_pic.gif rename to src/admin/images/file_pic.gif diff --git a/src/dede/images/file_rename.gif b/src/admin/images/file_rename.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_rename.gif rename to src/admin/images/file_rename.gif diff --git a/src/dede/images/file_script.gif b/src/admin/images/file_script.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_script.gif rename to src/admin/images/file_script.gif diff --git a/src/dede/images/file_swf.gif b/src/admin/images/file_swf.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_swf.gif rename to src/admin/images/file_swf.gif diff --git a/src/dede/images/file_topdir.gif b/src/admin/images/file_topdir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_topdir.gif rename to src/admin/images/file_topdir.gif diff --git a/src/dede/images/file_tt.gif b/src/admin/images/file_tt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_tt.gif rename to src/admin/images/file_tt.gif diff --git a/src/dede/images/file_txt.gif b/src/admin/images/file_txt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_txt.gif rename to src/admin/images/file_txt.gif diff --git a/src/dede/images/file_unknow.gif b/src/admin/images/file_unknow.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_unknow.gif rename to src/admin/images/file_unknow.gif diff --git a/src/dede/images/file_uploadfile.gif b/src/admin/images/file_uploadfile.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_uploadfile.gif rename to src/admin/images/file_uploadfile.gif diff --git a/src/dede/images/file_view.gif b/src/admin/images/file_view.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_view.gif rename to src/admin/images/file_view.gif diff --git a/src/dede/images/flash.gif b/src/admin/images/flash.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/flash.gif rename to src/admin/images/flash.gif diff --git a/src/dede/images/fold.gif b/src/admin/images/fold.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/fold.gif rename to src/admin/images/fold.gif diff --git a/src/dede/images/g_t1.jpg b/src/admin/images/g_t1.jpg similarity index 100% rename from src/dede/images/g_t1.jpg rename to src/admin/images/g_t1.jpg diff --git a/src/dede/images/g_t2.jpg b/src/admin/images/g_t2.jpg similarity index 100% rename from src/dede/images/g_t2.jpg rename to src/admin/images/g_t2.jpg diff --git a/src/dede/images/g_t3.jpg b/src/admin/images/g_t3.jpg similarity index 100% rename from src/dede/images/g_t3.jpg rename to src/admin/images/g_t3.jpg diff --git a/src/dede/images/g_t4.jpg b/src/admin/images/g_t4.jpg similarity index 100% rename from src/dede/images/g_t4.jpg rename to src/admin/images/g_t4.jpg diff --git a/src/dede/images/gif.gif b/src/admin/images/gif.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gif.gif rename to src/admin/images/gif.gif diff --git a/src/dede/images/gtk-copy.png b/src/admin/images/gtk-copy.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-copy.png rename to src/admin/images/gtk-copy.png diff --git a/src/dede/images/gtk-del.png b/src/admin/images/gtk-del.png similarity index 100% rename from src/dede/images/gtk-del.png rename to src/admin/images/gtk-del.png diff --git a/src/dede/images/gtk-edit.png b/src/admin/images/gtk-edit.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-edit.png rename to src/admin/images/gtk-edit.png diff --git a/src/dede/images/gtk-ex.png b/src/admin/images/gtk-ex.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-ex.png rename to src/admin/images/gtk-ex.png diff --git a/src/dede/images/gtk-ok.png b/src/admin/images/gtk-ok.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-ok.png rename to src/admin/images/gtk-ok.png diff --git a/src/dede/images/gtk-sadd.png b/src/admin/images/gtk-sadd.png similarity index 100% rename from src/dede/images/gtk-sadd.png rename to src/admin/images/gtk-sadd.png diff --git a/src/dede/images/gtk-search.png b/src/admin/images/gtk-search.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-search.png rename to src/admin/images/gtk-search.png diff --git a/src/dede/images/gtk-tmp.png b/src/admin/images/gtk-tmp.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-tmp.png rename to src/admin/images/gtk-tmp.png diff --git a/src/dede/images/help.gif b/src/admin/images/help.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/help.gif rename to src/admin/images/help.gif diff --git a/src/dede/images/htm.gif b/src/admin/images/htm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/htm.gif rename to src/admin/images/htm.gif diff --git a/src/dede/images/ico-close.gif b/src/admin/images/ico-close.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/ico-close.gif rename to src/admin/images/ico-close.gif diff --git a/src/dede/images/ico-sysmsg.png b/src/admin/images/ico-sysmsg.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/ico-sysmsg.png rename to src/admin/images/ico-sysmsg.png diff --git a/src/dede/images/idnbg1.gif b/src/admin/images/idnbg1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/idnbg1.gif rename to src/admin/images/idnbg1.gif diff --git a/src/dede/images/idnbgfoot.gif b/src/admin/images/idnbgfoot.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/idnbgfoot.gif rename to src/admin/images/idnbgfoot.gif diff --git a/src/dede/images/image.gif b/src/admin/images/image.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/image.gif rename to src/admin/images/image.gif diff --git a/src/dede/images/img.gif b/src/admin/images/img.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/img.gif rename to src/admin/images/img.gif diff --git a/src/dede/images/img_pre_none.gif b/src/admin/images/img_pre_none.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/img_pre_none.gif rename to src/admin/images/img_pre_none.gif diff --git a/src/dede/images/indextbg.gif b/src/admin/images/indextbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/indextbg.gif rename to src/admin/images/indextbg.gif diff --git a/src/dede/images/indextitlebg.gif b/src/admin/images/indextitlebg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/indextitlebg.gif rename to src/admin/images/indextitlebg.gif diff --git a/src/dede/images/input.gif b/src/admin/images/input.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/input.gif rename to src/admin/images/input.gif diff --git a/src/dede/images/input.png b/src/admin/images/input.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/input.png rename to src/admin/images/input.png diff --git a/src/dede/images/item_tt2.gif b/src/admin/images/item_tt2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/item_tt2.gif rename to src/admin/images/item_tt2.gif diff --git a/src/dede/images/itemcomenu.gif b/src/admin/images/itemcomenu.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemcomenu.gif rename to src/admin/images/itemcomenu.gif diff --git a/src/dede/images/itemcomenu2.gif b/src/admin/images/itemcomenu2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemcomenu2.gif rename to src/admin/images/itemcomenu2.gif diff --git a/src/dede/images/itemnote1.gif b/src/admin/images/itemnote1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemnote1.gif rename to src/admin/images/itemnote1.gif diff --git a/src/dede/images/itemnote2.gif b/src/admin/images/itemnote2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemnote2.gif rename to src/admin/images/itemnote2.gif diff --git a/src/dede/images/itemnote3.gif b/src/admin/images/itemnote3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemnote3.gif rename to src/admin/images/itemnote3.gif diff --git a/src/dede/images/jpg.gif b/src/admin/images/jpg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/jpg.gif rename to src/admin/images/jpg.gif diff --git a/src/dede/images/js.gif b/src/admin/images/js.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/js.gif rename to src/admin/images/js.gif diff --git a/src/dede/images/lbg.gif b/src/admin/images/lbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/lbg.gif rename to src/admin/images/lbg.gif diff --git a/src/dede/images/left_bg_top.gif b/src/admin/images/left_bg_top.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/left_bg_top.gif rename to src/admin/images/left_bg_top.gif diff --git a/src/dede/images/leftbg2.gif b/src/admin/images/leftbg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/leftbg2.gif rename to src/admin/images/leftbg2.gif diff --git a/src/dede/images/leftmbg1.gif b/src/admin/images/leftmbg1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/leftmbg1.gif rename to src/admin/images/leftmbg1.gif diff --git a/src/dede/images/leftmenu_bg.gif b/src/admin/images/leftmenu_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/leftmenu_bg.gif rename to src/admin/images/leftmenu_bg.gif diff --git a/src/dede/images/list.gif b/src/admin/images/list.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/list.gif rename to src/admin/images/list.gif diff --git a/src/dede/images/listtag.gif b/src/admin/images/listtag.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/listtag.gif rename to src/admin/images/listtag.gif diff --git a/src/dede/images/lmenubg.gif b/src/admin/images/lmenubg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/lmenubg.gif rename to src/admin/images/lmenubg.gif diff --git a/src/dede/images/loadinglit.gif b/src/admin/images/loadinglit.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/loadinglit.gif rename to src/admin/images/loadinglit.gif diff --git a/src/dede/images/login-btn.jpg b/src/admin/images/login-btn.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/login-btn.jpg rename to src/admin/images/login-btn.jpg diff --git a/src/dede/images/login-top.jpg b/src/admin/images/login-top.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/login-top.jpg rename to src/admin/images/login-top.jpg diff --git a/src/dede/images/m-contract.gif b/src/admin/images/m-contract.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/m-contract.gif rename to src/admin/images/m-contract.gif diff --git a/src/dede/images/m-expand.gif b/src/admin/images/m-expand.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/m-expand.gif rename to src/admin/images/m-expand.gif diff --git a/src/dede/images/macFFBgHack.png b/src/admin/images/macFFBgHack.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/macFFBgHack.png rename to src/admin/images/macFFBgHack.png diff --git a/src/dede/images/manage1.gif b/src/admin/images/manage1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/manage1.gif rename to src/admin/images/manage1.gif diff --git a/src/dede/images/mbcbg.gif b/src/admin/images/mbcbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mbcbg.gif rename to src/admin/images/mbcbg.gif diff --git a/src/dede/images/mbtbg.gif b/src/admin/images/mbtbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mbtbg.gif rename to src/admin/images/mbtbg.gif diff --git a/src/dede/images/menu-ex.png b/src/admin/images/menu-ex.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menu-ex.png rename to src/admin/images/menu-ex.png diff --git a/src/dede/images/menu_bg.gif b/src/admin/images/menu_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menu_bg.gif rename to src/admin/images/menu_bg.gif diff --git a/src/dede/images/menu_bottom.gif b/src/admin/images/menu_bottom.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menu_bottom.gif rename to src/admin/images/menu_bottom.gif diff --git a/src/dede/images/menu_top.gif b/src/admin/images/menu_top.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menu_top.gif rename to src/admin/images/menu_top.gif diff --git a/src/dede/images/menuarrow.gif b/src/admin/images/menuarrow.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menuarrow.gif rename to src/admin/images/menuarrow.gif diff --git a/src/dede/images/menubg.gif b/src/admin/images/menubg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menubg.gif rename to src/admin/images/menubg.gif diff --git a/src/dede/images/menumember.gif b/src/admin/images/menumember.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menumember.gif rename to src/admin/images/menumember.gif diff --git a/src/dede/images/menunewbg.gif b/src/admin/images/menunewbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menunewbg.gif rename to src/admin/images/menunewbg.gif diff --git a/src/dede/images/menunewbg2.gif b/src/admin/images/menunewbg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menunewbg2.gif rename to src/admin/images/menunewbg2.gif diff --git a/src/dede/images/menusearch.gif b/src/admin/images/menusearch.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menusearch.gif rename to src/admin/images/menusearch.gif diff --git a/src/dede/images/menusearch2.gif b/src/admin/images/menusearch2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menusearch2.gif rename to src/admin/images/menusearch2.gif diff --git a/src/dede/images/mmenubg.gif b/src/admin/images/mmenubg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mmenubg.gif rename to src/admin/images/mmenubg.gif diff --git a/src/dede/images/mmenubg2.gif b/src/admin/images/mmenubg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mmenubg2.gif rename to src/admin/images/mmenubg2.gif diff --git a/src/dede/images/mp3.gif b/src/admin/images/mp3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mp3.gif rename to src/admin/images/mp3.gif diff --git a/src/dede/images/mtbg1.gif b/src/admin/images/mtbg1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtbg1.gif rename to src/admin/images/mtbg1.gif diff --git a/src/dede/images/mtimg1.gif b/src/admin/images/mtimg1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtimg1.gif rename to src/admin/images/mtimg1.gif diff --git a/src/dede/images/mtitle_bg.gif b/src/admin/images/mtitle_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtitle_bg.gif rename to src/admin/images/mtitle_bg.gif diff --git a/src/dede/images/mtitle_bg.jpg b/src/admin/images/mtitle_bg.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtitle_bg.jpg rename to src/admin/images/mtitle_bg.jpg diff --git a/src/dede/images/mtitle_l.jpg b/src/admin/images/mtitle_l.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtitle_l.jpg rename to src/admin/images/mtitle_l.jpg diff --git a/src/dede/images/mtitle_r.jpg b/src/admin/images/mtitle_r.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtitle_r.jpg rename to src/admin/images/mtitle_r.jpg diff --git a/src/dede/images/newitem.gif b/src/admin/images/newitem.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/newitem.gif rename to src/admin/images/newitem.gif diff --git a/src/dede/images/newlinebg3.gif b/src/admin/images/newlinebg3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/newlinebg3.gif rename to src/admin/images/newlinebg3.gif diff --git a/src/dede/images/newmenu-topright.gif b/src/admin/images/newmenu-topright.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/newmenu-topright.gif rename to src/admin/images/newmenu-topright.gif diff --git a/src/dede/images/next.gif b/src/admin/images/next.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/next.gif rename to src/admin/images/next.gif diff --git a/src/dede/images/open.gif b/src/admin/images/open.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/open.gif rename to src/admin/images/open.gif diff --git a/src/dede/images/paramater.gif b/src/admin/images/paramater.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/paramater.gif rename to src/admin/images/paramater.gif diff --git a/src/dede/images/part-index.gif b/src/admin/images/part-index.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/part-index.gif rename to src/admin/images/part-index.gif diff --git a/src/dede/images/part-list.gif b/src/admin/images/part-list.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/part-list.gif rename to src/admin/images/part-list.gif diff --git a/src/dede/images/part-sgpage.gif b/src/admin/images/part-sgpage.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/part-sgpage.gif rename to src/admin/images/part-sgpage.gif diff --git a/src/dede/images/part-url.gif b/src/admin/images/part-url.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/part-url.gif rename to src/admin/images/part-url.gif diff --git a/src/dede/images/parttag.gif b/src/admin/images/parttag.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/parttag.gif rename to src/admin/images/parttag.gif diff --git a/src/dede/images/pbg.gif b/src/admin/images/pbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/pbg.gif rename to src/admin/images/pbg.gif diff --git a/src/dede/images/php.gif b/src/admin/images/php.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/php.gif rename to src/admin/images/php.gif diff --git a/src/dede/images/pic_dir.gif b/src/admin/images/pic_dir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/pic_dir.gif rename to src/admin/images/pic_dir.gif diff --git a/src/dede/images/picview.gif b/src/admin/images/picview.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/picview.gif rename to src/admin/images/picview.gif diff --git a/src/dede/images/picviewnone.gif b/src/admin/images/picviewnone.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/picviewnone.gif rename to src/admin/images/picviewnone.gif diff --git a/src/dede/images/plan.gif b/src/admin/images/plan.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/plan.gif rename to src/admin/images/plan.gif diff --git a/src/dede/images/pview.gif b/src/admin/images/pview.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/pview.gif rename to src/admin/images/pview.gif diff --git a/src/dede/images/question-balloon.png b/src/admin/images/question-balloon.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/question-balloon.png rename to src/admin/images/question-balloon.png diff --git a/src/dede/images/quick_bg.gif b/src/admin/images/quick_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/quick_bg.gif rename to src/admin/images/quick_bg.gif diff --git a/src/dede/images/re-write1.gif b/src/admin/images/re-write1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/re-write1.gif rename to src/admin/images/re-write1.gif diff --git a/src/dede/images/righttopbg.gif b/src/admin/images/righttopbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/righttopbg.gif rename to src/admin/images/righttopbg.gif diff --git a/src/dede/images/rm.gif b/src/admin/images/rm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/rm.gif rename to src/admin/images/rm.gif diff --git a/src/dede/images/ruler.gif b/src/admin/images/ruler.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/ruler.gif rename to src/admin/images/ruler.gif diff --git a/src/dede/images/safe-tips.gif b/src/admin/images/safe-tips.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/safe-tips.gif rename to src/admin/images/safe-tips.gif diff --git a/src/dede/images/scrdw.gif b/src/admin/images/scrdw.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/scrdw.gif rename to src/admin/images/scrdw.gif diff --git a/src/dede/images/scrup.gif b/src/admin/images/scrup.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/scrup.gif rename to src/admin/images/scrup.gif diff --git a/src/dede/images/search_bn.gif b/src/admin/images/search_bn.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/search_bn.gif rename to src/admin/images/search_bn.gif diff --git a/src/dede/images/skinbutton.png b/src/admin/images/skinbutton.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/skinbutton.png rename to src/admin/images/skinbutton.png diff --git a/src/dede/images/slide.png b/src/admin/images/slide.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/slide.png rename to src/admin/images/slide.png diff --git a/src/dede/images/sp_bg.gif b/src/admin/images/sp_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/sp_bg.gif rename to src/admin/images/sp_bg.gif diff --git a/src/dede/images/spectag.gif b/src/admin/images/spectag.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/spectag.gif rename to src/admin/images/spectag.gif diff --git a/src/dede/images/style2tbgr.gif b/src/admin/images/style2tbgr.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/style2tbgr.gif rename to src/admin/images/style2tbgr.gif diff --git a/src/dede/images/tbg.gif b/src/admin/images/tbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tbg.gif rename to src/admin/images/tbg.gif diff --git a/src/dede/images/tbgv.gif b/src/admin/images/tbgv.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tbgv.gif rename to src/admin/images/tbgv.gif diff --git a/src/dede/images/tbody_toggle.gif b/src/admin/images/tbody_toggle.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tbody_toggle.gif rename to src/admin/images/tbody_toggle.gif diff --git a/src/dede/images/toggle_menu.gif b/src/admin/images/toggle_menu.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/toggle_menu.gif rename to src/admin/images/toggle_menu.gif diff --git a/src/dede/images/topbg.gif b/src/admin/images/topbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/topbg.gif rename to src/admin/images/topbg.gif diff --git a/src/dede/images/topbg2.gif b/src/admin/images/topbg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/topbg2.gif rename to src/admin/images/topbg2.gif diff --git a/src/dede/images/topitem2.gif b/src/admin/images/topitem2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/topitem2.gif rename to src/admin/images/topitem2.gif diff --git a/src/dede/images/topitembg.gif b/src/admin/images/topitembg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/topitembg.gif rename to src/admin/images/topitembg.gif diff --git a/src/dede/images/toprightbg.gif b/src/admin/images/toprightbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/toprightbg.gif rename to src/admin/images/toprightbg.gif diff --git a/src/dede/images/tree_explode.gif b/src/admin/images/tree_explode.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tree_explode.gif rename to src/admin/images/tree_explode.gif diff --git a/src/dede/images/tree_page.gif b/src/admin/images/tree_page.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tree_page.gif rename to src/admin/images/tree_page.gif diff --git a/src/dede/images/tree_part.gif b/src/admin/images/tree_part.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tree_part.gif rename to src/admin/images/tree_part.gif diff --git a/src/dede/images/trun.gif b/src/admin/images/trun.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/trun.gif rename to src/admin/images/trun.gif diff --git a/src/dede/images/txt.gif b/src/admin/images/txt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/txt.gif rename to src/admin/images/txt.gif diff --git a/src/dede/images/typeid2bg.gif b/src/admin/images/typeid2bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/typeid2bg.gif rename to src/admin/images/typeid2bg.gif diff --git a/src/dede/images/view_img.gif b/src/admin/images/view_img.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/view_img.gif rename to src/admin/images/view_img.gif diff --git a/src/dede/images/wbg.gif b/src/admin/images/wbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/wbg.gif rename to src/admin/images/wbg.gif diff --git a/src/dede/images/wmv.gif b/src/admin/images/wmv.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/wmv.gif rename to src/admin/images/wmv.gif diff --git a/src/dede/images/write1.gif b/src/admin/images/write1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/write1.gif rename to src/admin/images/write1.gif diff --git a/src/dede/images/write2.gif b/src/admin/images/write2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/write2.gif rename to src/admin/images/write2.gif diff --git a/src/dede/images/zip.gif b/src/admin/images/zip.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/zip.gif rename to src/admin/images/zip.gif diff --git a/src/dede/inc/configgroup.txt b/src/admin/inc/configgroup.txt old mode 100755 new mode 100644 similarity index 83% rename from src/dede/inc/configgroup.txt rename to src/admin/inc/configgroup.txt index 71777803..f68e20cc --- a/src/dede/inc/configgroup.txt +++ b/src/admin/inc/configgroup.txt @@ -1,8 +1,8 @@ -1,站点设置 -2,核心设置 -3,附件设置 -4,会员设置 -5,互动设置 -6,性能选项 -7,其它选项 +1,站点设置 +2,核心设置 +3,附件设置 +4,会员设置 +5,互动设置 +6,性能选项 +7,其它选项 8,模块设置 \ No newline at end of file diff --git a/src/dede/inc/fieldtype.txt b/src/admin/inc/fieldtype.txt old mode 100755 new mode 100644 similarity index 90% rename from src/dede/inc/fieldtype.txt rename to src/admin/inc/fieldtype.txt index 8771bd1e..90e05aa3 --- a/src/dede/inc/fieldtype.txt +++ b/src/admin/inc/fieldtype.txt @@ -1,17 +1,17 @@ -text,单行文本(varchar) -textchar,单行文本(char) -multitext,多行文本 -htmltext,HTML文本 -textdata,文本保存HTML数据 -int,整数类型 -float,小数类型 -datetime,时间类型 -img,图片 -imgfile,图片(无格式) -media,多媒体文件 -addon,附件类型 -select,使用select下拉框 -radio,使用radio选项卡 -checkbox,checkbox多选框 -stepselect,联动类型 +text,单行文本(varchar) +textchar,单行文本(char) +multitext,多行文本 +htmltext,HTML文本 +textdata,文本保存HTML数据 +int,整数类型 +float,小数类型 +datetime,时间类型 +img,图片 +imgfile,图片(无格式) +media,多媒体文件 +addon,附件类型 +select,使用select下拉框 +radio,使用radio选项卡 +checkbox,checkbox多选框 +stepselect,联动类型 relation,关联内容 \ No newline at end of file diff --git a/src/dede/inc/grouplist.txt b/src/admin/inc/grouplist.txt old mode 100755 new mode 100644 similarity index 93% rename from src/dede/inc/grouplist.txt rename to src/admin/inc/grouplist.txt index 56f70c95..66e6b233 --- a/src/dede/inc/grouplist.txt +++ b/src/admin/inc/grouplist.txt @@ -1,90 +1,90 @@ ->>特别权限(仅超级管理员使用) - ->admin_AllowAll>可以进行任意操作 - - ->>频道管理 - ->c_List>列出频道 ->c_New>新建频道 ->c_Edit>修改频道 ->c_Del>删除频道 ->c_Stepselect>联动类别管理 - ->>栏目管理 - ->t_List>列出任意栏目 ->t_New>新建任意栏目 ->t_Edit>修改任意栏目 ->t_Move>移动任意栏目 ->t_Del>删除任意栏目 ->t_AccList>列出授权栏目 ->t_AccNew>新建授权子栏目 ->t_AccEdit>修改授权子栏目 ->t_AccDel>删除授权子栏目 - ->>内容管理 - ->a_List>列出内容 ->a_New>发布任意文档 ->a_Edit>修改任意文档 ->a_Del>删除任意文档 ->a_Commend>推荐任意文档 ->a_Check>审核任意文档 ->a_AccNew>发布授权文档 ->a_AccList>列出授权文档 ->a_AccEdit>修改授权文档 ->a_AccDel>删除授权文档 ->a_AccCheck>审核授权文档 ->a_MyList>列出我发布的文档 ->a_MyEdit>修改我发布的文档 ->a_MyDel>删除我发布的文档 ->a_MyCheck>审核我发布的文档 ->a_Recycling>管理回收站 - ->>模板管理 - ->temp_All>管理所有模板 ->temp_New>新建模板 ->temp_Edit>修改模板 ->temp_Del>删除模板 ->temp_One>单页模板管理 ->temp_MyTag>自定义标记 ->temp_Test>测试标记 ->temp_Other>模板其它管理 - ->>专题管理 - ->spec_New>新建专题 ->spec_List>列出专题 ->spec_Edit>修改专题 - ->>系统管理权限 - ->sys_User>系统用户管理 ->sys_Group>系统组管理 ->sys_MdPwd>更改个人密码 ->sys_DelUpload>删除附件 ->sys_Edit>修改系统参数 ->sys_Log>管理日志 ->sys_plus>插件管理 ->sys_Data>数据备份还原 ->sys_Att>自定义文档属性 ->sys_ArcBatch>文档批量维护 ->sys_ArcTj>文档信息统计 ->sys_Source>新闻来源 ->sys_Writer>作者管理 ->sys_SoftConfig>软件频道参数 ->sys_Keyword>关键字管理 ->sys_MakeHtml>更新HTML ->sys_Feedback>评论管理 ->sys_Upload>管理任意上传 ->sys_MyUpload>管理我的上传 ->pic_view>图片浏览器 - ->>会员管理 - ->member_Type>会员类型管理 ->member_List>列出会员 ->member_Edit>更改会员 ->member_Del>删除会员 +>>特别权限(仅超级管理员使用) + +>admin_AllowAll>可以进行任意操作 + + +>>频道管理 + +>c_List>列出频道 +>c_New>新建频道 +>c_Edit>修改频道 +>c_Del>删除频道 +>c_Stepselect>联动类别管理 + +>>栏目管理 + +>t_List>列出任意栏目 +>t_New>新建任意栏目 +>t_Edit>修改任意栏目 +>t_Move>移动任意栏目 +>t_Del>删除任意栏目 +>t_AccList>列出授权栏目 +>t_AccNew>新建授权子栏目 +>t_AccEdit>修改授权子栏目 +>t_AccDel>删除授权子栏目 + +>>内容管理 + +>a_List>列出内容 +>a_New>发布任意文档 +>a_Edit>修改任意文档 +>a_Del>删除任意文档 +>a_Commend>推荐任意文档 +>a_Check>审核任意文档 +>a_AccNew>发布授权文档 +>a_AccList>列出授权文档 +>a_AccEdit>修改授权文档 +>a_AccDel>删除授权文档 +>a_AccCheck>审核授权文档 +>a_MyList>列出我发布的文档 +>a_MyEdit>修改我发布的文档 +>a_MyDel>删除我发布的文档 +>a_MyCheck>审核我发布的文档 +>a_Recycling>管理回收站 + +>>模板管理 + +>temp_All>管理所有模板 +>temp_New>新建模板 +>temp_Edit>修改模板 +>temp_Del>删除模板 +>temp_One>单页模板管理 +>temp_MyTag>自定义标记 +>temp_Test>测试标记 +>temp_Other>模板其它管理 + +>>专题管理 + +>spec_New>新建专题 +>spec_List>列出专题 +>spec_Edit>修改专题 + +>>系统管理权限 + +>sys_User>系统用户管理 +>sys_Group>系统组管理 +>sys_MdPwd>修改个人密码 +>sys_DelUpload>删除附件 +>sys_Edit>修改系统参数 +>sys_Log>管理日志 +>sys_plus>插件管理 +>sys_Data>数据备份还原 +>sys_Att>自定义文档属性 +>sys_ArcBatch>文档批量维护 +>sys_ArcTj>文档信息统计 +>sys_Source>新闻来源 +>sys_Writer>作者管理 +>sys_SoftConfig>软件频道参数 +>sys_Keyword>关键字管理 +>sys_MakeHtml>更新HTML +>sys_Feedback>评论管理 +>sys_Upload>管理任意上传 +>sys_MyUpload>管理我的上传 +>pic_view>图片浏览器 + +>>会员管理 + +>member_Type>会员类型管理 +>member_List>列出会员 +>member_Edit>修改会员 +>member_Del>删除会员 diff --git a/src/dede/inc/inc_action_info.php b/src/admin/inc/inc_action_info.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/inc/inc_action_info.php rename to src/admin/inc/inc_action_info.php index c0a69d08..1fd9e6ca --- a/src/dede/inc/inc_action_info.php +++ b/src/admin/inc/inc_action_info.php @@ -1,457 +1,456 @@ - '核心', - 'title' => '常规操作', - 'description' => '站点档案常规功能操作', - 'soniterm' => array( - 0 => array( - 'title' => '网站栏目管理', - 'description' => '站点所有栏目管理', - 'purview' => 't_List,t_AccList', - 'linkurl' => 'catalog_main.php' - ), - 1 => array( - 'title' => '等审核的档案', - 'description' => '所有内容模型发表的未经审核内容列表', - 'purview' => 'a_Check,a_AccCheck', - 'linkurl' => 'content_list.php?arcrank=-1' - ), - 2 => array( - 'title' => '我发布的文档', - 'description' => '现在登录的管理员所发表的所有内容模型中的文档', - 'purview' => 'a_List,a_AccList,a_MyList', - 'linkurl' => 'content_list.php?mid='.$cuserLogin->userID - ), - 3 => array( - 'title' => '评论管理', - 'description' => '网站所有评论管理', - 'purview' => 'sys_Feedback', - 'linkurl' => 'feedback_main.php' - ), - 4 => array( - 'title' => '内容回收站', - 'description' => '如果在"系统基本参数"的"核心设置"中开启了"文章回收站(是/否)开启功能",后台删除的文档将会存放在此处', - 'purview' => 'a_List,a_AccList,a_MyList', - 'linkurl' => 'recycling.php' - ) - ) -); -$actionSearch[1] = array( - 'toptitle' => '核心', - 'title' => '内容管理', - 'description' => '网站对应内容模型的文档管理', - 'soniterm' => array( - 0 => array( - 'title' => '专题管理', - 'description' => '所有专题内容的管理', - 'purview' => 'spec_New', - 'linkurl' => 'content_s_list.php' - ), - ) -); -$actionSearch[2] = array( - 'toptitle' => '核心', - 'title' => '附件管理', - 'description' => '所有上传的附件管理', - 'soniterm' => array( - 0 => array( - 'title' => '上传新文件 ', - 'description' => '通过这可以上传图片、FLASH、视频/音频、附件/其它等附件 ', - 'purview' => '', - 'linkurl' => 'media_add.php' - ), - 1 => array( - 'title' => '附件数据管理 ', - 'description' => '列出所有上传的附件', - 'purview' => 'sys_Upload,sys_MyUpload', - 'linkurl' => 'media_main.php' - ), - 2 => array( - 'title' => '文件式管理器 ', - 'description' => '应用文件浏览的模式进行附件的管理', - 'purview' => 'plus_文件管理器', - 'linkurl' => 'media_main.php?dopost=filemanager' - ), - ) -); -$actionSearch[3] = array( - 'toptitle' => '核心', - 'title' => '频道模型', - 'description' => '所有上传的附件管理', - 'soniterm' => array( - 0 => array( - 'title' => '内容模型管理 ', - 'description' => '可以对现有商品、软件、图片集、普通文章、专题、分类信息等模型就行管理,也可以创建新的内容模型', - 'purview' => 'c_List', - 'linkurl' => 'mychannel_main.php' - ), - 1 => array( - 'title' => '单页文档管理 ', - 'description' => '创建和管理单页面', - 'purview' => 'temp_One', - 'linkurl' => 'templets_one.php' - ), - 2 => array( - 'title' => '联动类别管理 ', - 'description' => '创建和管理所有的联动', - 'purview' => 'c_Stepseclect', - 'linkurl' => 'stepselect_main.php?dopost=filemanager' - ), - 3 => array( - 'title' => '自由列表管理 ', - 'description' => '创建不同的列表形式', - 'purview' => 'c_List', - 'linkurl' => 'freelist_main.php' - ), - 4 => array( - 'title' => '自定义表单 ', - 'description' => '创建和管理自定义表单', - 'purview' => 'c_List', - 'linkurl' => 'diy_main.php' - ), - ) -); -$actionSearch[4] = array( - 'toptitle' => '核心', - 'title' => '批量维护', - 'description' => '对一些东西进行批量的删除,添加等等', - 'soniterm' => array( - 0 => array( - 'title' => '更新系统缓存 ', - 'description' => '更新栏目缓存、更新枚举缓存 、清理arclist调用缓存 、清理过期会员访问历史 、删除过期短信', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'sys_cache_up.php' - ), - 1 => array( - 'title' => '文档批量维护 ', - 'description' => '批量的对某个栏目或者全部栏目的内容进行审核文档、更新HTML、移动文档、删除文档', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'content_batch_up.php' - ), - 2 => array( - 'title' => '搜索关键词维护 ', - 'description' => '对已经进行的所有所搜的关键词进行管理', - 'purview' => 'sys_Keyword', - 'linkurl' => 'search_keywords_main.php?dopost=filemanager' - ), - 3 => array( - 'title' => '文档关键词维护 ', - 'description' => '对文档中的关键词进行批量的维护', - 'purview' => 'sys_Keyword', - 'linkurl' => 'article_keywords_main.php' - ), - 4 => array( - 'title' => '重复文档检测 ', - 'description' => '可以对网站中出现的重复标题的文档进行处理', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'article_test_same.php' - ), - 5 => array( - 'title' => '自动摘要|分页 ', - 'description' => '用于自动更新您系统没有填写摘要的文档的摘要信息或更新没分页的文档的自动分页标识', - 'purview' => 'sys_Keyword', - 'linkurl' => 'article_description_main.php' - ), - 6 => array( - 'title' => 'Tag标签管理 ', - 'description' => '对整个网站的tag进行批量的维护', - 'purview' => 'sys_Keyword', - 'linkurl' => 'tags_main.php' - ), - 7 => array( - 'title' => '数据库内容替换 ', - 'description' => '可以对数据库中的某张表中的字段进行内容的批量替换', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'sys_data_replace.php' - ), - ) -); -$actionSearch[5] = array( - 'toptitle' => '会员', - 'title' => '会员管理', - 'description' => '注册会员及积分等配置管理', - 'soniterm' => array( - 0 => array( - 'title' => '注册会员列表', - 'description' => '所有注册会员的管理项,其中包含修改,删除,查看会员文档以及提升管理员等操作', - 'purview' => 'member_List', - 'linkurl' => 'member_main.php' - ), - 1 => array( - 'title' => '会员级别设置', - 'description' => '设置会员的级别,可以通过设计不同会员的访问权限来对会员级别进行一个扩展', - 'purview' => 'member_Type', - 'linkurl' => 'member_rank.php' - ), - 2 => array( - 'title' => '积分头衔设置', - 'description' => '会员积分等级设置,根据会员活动积分对会员进行头衔划分', - 'purview' => 'member_Type', - 'linkurl' => 'member_scores.php' - ), - 4 => array( - 'title' => '会员短信管理', - 'description' => '会员之间发送的短消息管理,其中包含群发短消息和对单个会员发送短消息两种', - 'purview' => 'member_Type', - 'linkurl' => 'member_pm.php' - ), - ) -); -$actionSearch[6] = array( - 'toptitle' => '会员', - 'title' => '支付工具', - 'description' => '站点财务相关设置,包含点卡,商店订单等操作', - 'soniterm' => array( - 0 => array( - 'title' => '点卡产品分类', - 'description' => '网站点卡产品分类,可以添加不同点数的点卡产品类型', - 'purview' => 'sys_Data', - 'linkurl' => 'cards_type.php' - ), - 1 => array( - 'title' => '点卡产品管理', - 'description' => '管理网站点卡,可以在这里生成点卡以及查看点卡的当前状态', - 'purview' => 'sys_Data', - 'linkurl' => 'cards_manage.php' - ), - 2 => array( - 'title' => '会员产品分类', - 'description' => '可以将会员类型进行产品划分,比如出售高级会员1年这种,在这里可以对会员产品进行定义', - 'purview' => 'sys_Data', - 'linkurl' => 'member_type.php' - ), - 3 => array( - 'title' => '会员消费记录', - 'description' => '会员在前台进行操作、消费积分的消费记录,同时可以查看消费充值订单的付款情况', - 'purview' => 'sys_Data', - 'linkurl' => 'member_operations.php' - ), - 4 => array( - 'title' => '商店订单记录', - 'description' => '前台会员商店提交的订单记录,这里可以对这些订单进行一个统一的管理', - 'purview' => 'sys_Data', - 'linkurl' => 'shops_operations.php' - ), - 5 => array( - 'title' => '支付接口设置', - 'description' => '商店以及会员产品付款用到的在线付款方式需要设置的支付接口,这里含有常用的接口,例如:支付宝,易宝等', - 'purview' => 'sys_Data', - 'linkurl' => 'sys_payment.php' - ), - 6 => array( - 'title' => '配货方式设置', - 'description' => '网站在线商城的送货方式,这里可以对其进行编辑管理', - 'purview' => 'sys_Data', - 'linkurl' => 'shops_delivery.php' - ), - 7 => array( - 'title' => '汇款账号设置', - 'description' => '银行付款的账号设置,用户可以查看到您的银行付款账号方便支付', - 'purview' => 'sys_Data', - 'linkurl' => 'shops_bank.php' - ), - ) -); -$actionSearch[7] = array( - 'toptitle' => '生成', - 'title' => '自动任务', - 'description' => '一键生成静态管理', - 'soniterm' => array( - 0 => array( - 'title' => '一键更新网站', - 'description' => '可以一键生成所有静态页面', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_all.php' - ), - 1 => array( - 'title' => '更新系统缓存', - 'description' => '更新栏目缓存、更新枚举缓存、清理arclist调用缓存、清理过期会员访问历史、删除过期短信 ', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'sys_cache_up.php' - ), - ) -); -$actionSearch[8] = array( - 'toptitle' => '生成', - 'title' => 'HTML更新', - 'description' => '针对主页、栏目、文档、专题等等进行更新', - 'soniterm' => array( - 0 => array( - 'title' => '更新主页HTML', - 'description' => '生成网站主页面的HTML', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_homepage.php' - ), - 1 => array( - 'title' => '更新栏目 HTML', - 'description' => '对每个栏目进行静态HTML页面的生成', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_list.php' - ), - 2 => array( - 'title' => '更新文档HTML', - 'description' => '对每个栏目下的文档进行静态HTML页面的生成', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_archives.php' - ), - 3 => array( - 'title' => '更新网站地图', - 'description' => '生成网站地图的静态HTML页面', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_map_guide.php' - ), - 4 => array( - 'title' => '更新RSS文件 HTML', - 'description' => '对全站的RSS进行更新', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_rss.php' - ), - 5 => array( - 'title' => '获取JS文件', - 'description' => '可以获取某个栏目的js连接', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_js.php' - ), - 6 => array( - 'title' => '更新专题 HTML', - 'description' => '对专题进行静态HTML页面的生成', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_spec.php' - ), - ) -); -$actionSearch[9] = array( - 'toptitle' => '模板', - 'title' => '模板管理', - 'description' => '针对主页、栏目、文档、专题等等进行更新', - 'soniterm' => array( - 0 => array( - 'title' => '默认模板管理 ', - 'description' => '对网站正在采用的模板文件进行管理', - 'purview' => 'temp_All', - 'linkurl' => 'templets_main.php' - ), - 1 => array( - 'title' => '标签源码管理 ', - 'description' => '对现有的标签文件进行修改、添加', - 'purview' => 'temp_All', - 'linkurl' => 'templets_tagsource.php' - ), - 2 => array( - 'title' => '自定义宏标记', - 'description' => '管理自定义标记', - 'purview' => 'temp_MyTag', - 'linkurl' => 'mytag_main.php' - ), - 3 => array( - 'title' => '智能标记向导', - 'description' => '可以根据需要生成相应的调用标签', - 'purview' => 'temp_Other', - 'linkurl' => 'mytag_tag_guide.php' - ), - 4 => array( - 'title' => '全局标记测试 ', - 'description' => '可以对全局的标签调用进行测试', - 'purview' => 'temp_Test', - 'linkurl' => 'tag_test.php' - ), - ) -); -$actionSearch[10] = array( - 'toptitle' => '系统', - 'title' => '系统设置', - 'description' => '对网站的一些基本信息和配置进行管理', - 'soniterm' => array( - 0 => array( - 'title' => '系统基本参数', - 'description' => '包含站点设置、核心设置 、附件设置、会员设置、互动设置、性能选项、其它选项、模块设置、添加新变量等分类,其中有网站基本信息和网站的基本设置选项', - 'purview' => 'sys_Edit', - 'linkurl' => 'sys_info.php' - ), - 1 => array( - 'title' => '系统用户管理', - 'description' => '对现有的网站管理员进行管理', - 'purview' => 'sys_User', - 'linkurl' => 'sys_admin_user.php' - ), - 2 => array( - 'title' => '用户组设定', - 'description' => '对网站管理员进行用户组别的划分', - 'purview' => 'sys_Group', - 'linkurl' => 'sys_group.php' - ), - 3 => array( - 'title' => '系统日志管理', - 'description' => '对每个登录后台的管理员进行的操作进行记录', - 'purview' => 'sys_Log', - 'linkurl' => 'log_list.php' - ), - 5 => array( - 'title' => '图片水印设置', - 'description' => '对于上传的图片添加的水印进行配置', - 'purview' => 'sys_Edit', - 'linkurl' => 'sys_info_mark.php' - ), - 6 => array( - 'title' => '自定义文档属性', - 'description' => '在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist 标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档。', - 'purview' => 'sys_Att', - 'linkurl' => 'content_att.php' - ), - 7 => array( - 'title' => '软件频道设置', - 'description' => '可以对软件下载时的连接显示方式,下载方式,镜像服务器等等进行配置', - 'purview' => 'sys_SoftConfig', - 'linkurl' => 'soft_config.php' - ), - 8 => array( - 'title' => '防采集串混淆', - 'description' => '防采集混淆字符串管理', - 'purview' => 'sys_StringMix', - 'linkurl' => 'article_string_mix.php' - ), - 9 => array( - 'title' => '随机模板设置', - 'description' => '本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可', - 'purview' => 'sys_StringMix', - 'linkurl' => 'article_template_rand.php' - ), - 11 => array( - 'title' => '数据库备份/还原', - 'description' => '对数据库进行备份和还原', - 'purview' => 'sys_data', - 'linkurl' => 'sys_data.php' - ), - 12 => array( - 'title' => 'SQL命令行工具', - 'description' => '可以在针对每张数据表执行单行或者多行的SQL语句', - 'purview' => 'sys_data', - 'linkurl' => 'sys_sql_query.php' - ), - 14 => array( - 'title' => '病毒扫描[S]', - 'description' => '以DedeBIZ开发模式为标准对现有的文件进行扫描并进行判断', - 'purview' => 'sys_verifies', - 'linkurl' => 'sys_safetest.php' - ), - 15 => array( - 'title' => '系统错误修复[S]', - 'description' => '由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理。', - 'purview' => 'sys_verifies', - 'linkurl' => 'sys_repair.php' - ), - ) -); + '核心', + 'title' => '常规操作', + 'description' => '站点档案常规功能操作', + 'soniterm' => array( + 0 => array( + 'title' => '网站栏目管理', + 'description' => '站点所有栏目管理', + 'purview' => 't_List,t_AccList', + 'linkurl' => 'catalog_main.php' + ), + 1 => array( + 'title' => '等审核的档案', + 'description' => '所有内容模型发表的未经审核内容列表', + 'purview' => 'a_Check,a_AccCheck', + 'linkurl' => 'content_list.php?arcrank=-1' + ), + 2 => array( + 'title' => '我发布的文档', + 'description' => '现在登录的管理员所发表的所有内容模型中的文档', + 'purview' => 'a_List,a_AccList,a_MyList', + 'linkurl' => 'content_list.php?mid='.$cuserLogin->userID + ), + 3 => array( + 'title' => '评论管理', + 'description' => '网站所有评论管理', + 'purview' => 'sys_Feedback', + 'linkurl' => 'feedback_main.php' + ), + 4 => array( + 'title' => '内容回收站', + 'description' => '如果在"系统基本参数"的"核心设置"中开启了"文章回收站(是/否)开启功能",后台删除的文档将会存放在此处', + 'purview' => 'a_List,a_AccList,a_MyList', + 'linkurl' => 'recycling.php' + ) + ) +); +$actionSearch[1] = array( + 'toptitle' => '核心', + 'title' => '内容管理', + 'description' => '网站对应内容模型的文档管理', + 'soniterm' => array( + 0 => array( + 'title' => '专题管理', + 'description' => '所有专题内容的管理', + 'purview' => 'spec_New', + 'linkurl' => 'content_s_list.php' + ), + ) +); +$actionSearch[2] = array( + 'toptitle' => '核心', + 'title' => '附件管理', + 'description' => '所有上传的附件管理', + 'soniterm' => array( + 0 => array( + 'title' => '上传新文件 ', + 'description' => '通过这可以上传图片、FLASH、视频/音频、附件/其它等附件 ', + 'purview' => '', + 'linkurl' => 'media_add.php' + ), + 1 => array( + 'title' => '附件数据管理 ', + 'description' => '列出所有上传的附件', + 'purview' => 'sys_Upload,sys_MyUpload', + 'linkurl' => 'media_main.php' + ), + 2 => array( + 'title' => '文件式管理器 ', + 'description' => '应用文件浏览的模式进行附件的管理', + 'purview' => 'plus_文件管理器', + 'linkurl' => 'media_main.php?dopost=filemanager' + ), + ) +); +$actionSearch[3] = array( + 'toptitle' => '核心', + 'title' => '频道模型', + 'description' => '所有上传的附件管理', + 'soniterm' => array( + 0 => array( + 'title' => '内容模型管理 ', + 'description' => '可以对现有商品、软件、图片集、普通文章、专题、分类信息等模型就行管理,也可以创建新的内容模型', + 'purview' => 'c_List', + 'linkurl' => 'mychannel_main.php' + ), + 1 => array( + 'title' => '单页文档管理 ', + 'description' => '创建和管理单页面', + 'purview' => 'temp_One', + 'linkurl' => 'templets_one.php' + ), + 2 => array( + 'title' => '联动类别管理 ', + 'description' => '创建和管理所有的联动', + 'purview' => 'c_Stepseclect', + 'linkurl' => 'stepselect_main.php?dopost=filemanager' + ), + 3 => array( + 'title' => '自由列表管理 ', + 'description' => '创建不同的列表形式', + 'purview' => 'c_List', + 'linkurl' => 'freelist_main.php' + ), + 4 => array( + 'title' => '自定义表单 ', + 'description' => '创建和管理自定义表单', + 'purview' => 'c_List', + 'linkurl' => 'diy_main.php' + ), + ) +); +$actionSearch[4] = array( + 'toptitle' => '核心', + 'title' => '批量维护', + 'description' => '对一些东西进行批量的删除,添加等等', + 'soniterm' => array( + 0 => array( + 'title' => '更新系统缓存 ', + 'description' => '更新栏目缓存、更新枚举缓存 、清理arclist调用缓存 、清理过期会员访问历史 、删除过期短信', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'sys_cache_up.php' + ), + 1 => array( + 'title' => '文档批量维护 ', + 'description' => '批量的对某个栏目或者全部栏目的内容进行审核文档、更新HTML、移动文档、删除文档', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'content_batch_up.php' + ), + 2 => array( + 'title' => '搜索关键词维护 ', + 'description' => '对已经进行的所有所搜的关键词进行管理', + 'purview' => 'sys_Keyword', + 'linkurl' => 'search_keywords_main.php?dopost=filemanager' + ), + 3 => array( + 'title' => '文档关键词维护 ', + 'description' => '对文档中的关键词进行批量的维护', + 'purview' => 'sys_Keyword', + 'linkurl' => 'article_keywords_main.php' + ), + 4 => array( + 'title' => '重复文档检测 ', + 'description' => '可以对网站中出现的重复标题的文档进行处理', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'article_test_same.php' + ), + 5 => array( + 'title' => '自动摘要|分页 ', + 'description' => '用于自动更新您系统没有填写摘要的文档的摘要信息或更新没分页的文档的自动分页标识', + 'purview' => 'sys_Keyword', + 'linkurl' => 'article_description_main.php' + ), + 6 => array( + 'title' => 'Tag标签管理 ', + 'description' => '对整个网站的tag进行批量的维护', + 'purview' => 'sys_Keyword', + 'linkurl' => 'tags_main.php' + ), + 7 => array( + 'title' => '数据库内容替换 ', + 'description' => '可以对数据库中的某张表中的字段进行内容的批量替换', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'sys_data_replace.php' + ), + ) +); +$actionSearch[5] = array( + 'toptitle' => '会员', + 'title' => '会员管理', + 'description' => '注册会员及积分等配置管理', + 'soniterm' => array( + 0 => array( + 'title' => '注册会员列表', + 'description' => '所有注册会员的管理项,其中包含修改,删除,查看会员文档以及提升管理员等操作', + 'purview' => 'member_List', + 'linkurl' => 'member_main.php' + ), + 1 => array( + 'title' => '会员级别设置', + 'description' => '设置会员的级别,可以通过设计不同会员的访问权限来对会员级别进行一个扩展', + 'purview' => 'member_Type', + 'linkurl' => 'member_rank.php' + ), + 2 => array( + 'title' => '积分头衔设置', + 'description' => '会员积分等级设置,根据会员活动积分对会员进行头衔划分', + 'purview' => 'member_Type', + 'linkurl' => 'member_scores.php' + ), + 4 => array( + 'title' => '会员短信管理', + 'description' => '会员之间发送的短消息管理,其中包含群发短消息和对单个会员发送短消息两种', + 'purview' => 'member_Type', + 'linkurl' => 'member_pm.php' + ), + ) +); +$actionSearch[6] = array( + 'toptitle' => '会员', + 'title' => '支付工具', + 'description' => '站点财务相关设置,包含点卡,商店订单等操作', + 'soniterm' => array( + 0 => array( + 'title' => '点卡产品分类', + 'description' => '网站点卡产品分类,可以添加不同点数的点卡产品类型', + 'purview' => 'sys_Data', + 'linkurl' => 'cards_type.php' + ), + 1 => array( + 'title' => '点卡产品管理', + 'description' => '管理网站点卡,可以在这里生成点卡以及查看点卡的当前状态', + 'purview' => 'sys_Data', + 'linkurl' => 'cards_manage.php' + ), + 2 => array( + 'title' => '会员产品分类', + 'description' => '可以将会员类型进行产品划分,比如出售高级会员1年这种,在这里可以对会员产品进行定义', + 'purview' => 'sys_Data', + 'linkurl' => 'member_type.php' + ), + 3 => array( + 'title' => '会员消费记录', + 'description' => '会员在前台进行操作、消费积分的消费记录,同时可以查看消费充值订单的付款情况', + 'purview' => 'sys_Data', + 'linkurl' => 'member_operations.php' + ), + 4 => array( + 'title' => '商店订单记录', + 'description' => '前台会员商店提交的订单记录,这里可以对这些订单进行一个统一的管理', + 'purview' => 'sys_Data', + 'linkurl' => 'shops_operations.php' + ), + 5 => array( + 'title' => '支付接口设置', + 'description' => '商店以及会员产品付款用到的在线付款方式需要设置的支付接口,这里含有常用的接口,例如:支付宝,易宝等', + 'purview' => 'sys_Data', + 'linkurl' => 'sys_payment.php' + ), + 6 => array( + 'title' => '配货方式设置', + 'description' => '网站在线商城的送货方式,这里可以对其进行编辑管理', + 'purview' => 'sys_Data', + 'linkurl' => 'shops_delivery.php' + ), + 7 => array( + 'title' => '汇款账号设置', + 'description' => '银行付款的账号设置,用户可以查看到您的银行付款账号方便支付', + 'purview' => 'sys_Data', + 'linkurl' => 'shops_bank.php' + ), + ) +); +$actionSearch[7] = array( + 'toptitle' => '生成', + 'title' => '自动任务', + 'description' => '一键生成静态管理', + 'soniterm' => array( + 0 => array( + 'title' => '一键更新网站', + 'description' => '可以一键生成所有静态页面', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_all.php' + ), + 1 => array( + 'title' => '更新系统缓存', + 'description' => '更新栏目缓存、更新枚举缓存、清理arclist调用缓存、清理过期会员访问历史、删除过期短信 ', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'sys_cache_up.php' + ), + ) +); +$actionSearch[8] = array( + 'toptitle' => '生成', + 'title' => 'HTML更新', + 'description' => '针对主页、栏目、文档、专题等等进行更新', + 'soniterm' => array( + 0 => array( + 'title' => '更新主页HTML', + 'description' => '生成网站主页面的HTML', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_homepage.php' + ), + 1 => array( + 'title' => '更新栏目 HTML', + 'description' => '对每个栏目进行静态HTML页面的生成', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_list.php' + ), + 2 => array( + 'title' => '更新文档HTML', + 'description' => '对每个栏目下的文档进行静态HTML页面的生成', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_archives.php' + ), + 3 => array( + 'title' => '更新网站地图', + 'description' => '生成网站地图的静态HTML页面', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_map_guide.php' + ), + 4 => array( + 'title' => '更新RSS文件 HTML', + 'description' => '对全站的RSS进行更新', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_rss.php' + ), + 5 => array( + 'title' => '获取JS文件', + 'description' => '可以获取某个栏目的js连接', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_js.php' + ), + 6 => array( + 'title' => '更新专题 HTML', + 'description' => '对专题进行静态HTML页面的生成', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_spec.php' + ), + ) +); +$actionSearch[9] = array( + 'toptitle' => '模板', + 'title' => '模板管理', + 'description' => '针对主页、栏目、文档、专题等等进行更新', + 'soniterm' => array( + 0 => array( + 'title' => '默认模板管理 ', + 'description' => '对网站正在采用的模板文件进行管理', + 'purview' => 'temp_All', + 'linkurl' => 'templets_main.php' + ), + 1 => array( + 'title' => '标签源码管理 ', + 'description' => '对现有的标签文件进行修改、添加', + 'purview' => 'temp_All', + 'linkurl' => 'templets_tagsource.php' + ), + 2 => array( + 'title' => '自定义宏标记', + 'description' => '管理自定义标记', + 'purview' => 'temp_MyTag', + 'linkurl' => 'mytag_main.php' + ), + 3 => array( + 'title' => '智能标记向导', + 'description' => '可以根据需要生成相应的调用标签', + 'purview' => 'temp_Other', + 'linkurl' => 'mytag_tag_guide.php' + ), + 4 => array( + 'title' => '全局标记测试 ', + 'description' => '可以对全局的标签调用进行测试', + 'purview' => 'temp_Test', + 'linkurl' => 'tag_test.php' + ), + ) +); +$actionSearch[10] = array( + 'toptitle' => '系统', + 'title' => '系统设置', + 'description' => '对网站的一些基本信息和配置进行管理', + 'soniterm' => array( + 0 => array( + 'title' => '系统基本参数', + 'description' => '包含站点设置、核心设置 、附件设置、会员设置、互动设置、性能选项、其它选项、模块设置、添加新变量等分类,其中有网站基本信息和网站的基本设置选项', + 'purview' => 'sys_Edit', + 'linkurl' => 'sys_info.php' + ), + 1 => array( + 'title' => '系统用户管理', + 'description' => '对现有的网站管理员进行管理', + 'purview' => 'sys_User', + 'linkurl' => 'sys_admin_user.php' + ), + 2 => array( + 'title' => '用户组设定', + 'description' => '对网站管理员进行用户组别的划分', + 'purview' => 'sys_Group', + 'linkurl' => 'sys_group.php' + ), + 3 => array( + 'title' => '系统日志管理', + 'description' => '对每个登录后台的管理员进行的操作进行记录', + 'purview' => 'sys_Log', + 'linkurl' => 'log_list.php' + ), + 5 => array( + 'title' => '图片水印设置', + 'description' => '对于上传的图片添加的水印进行配置', + 'purview' => 'sys_Edit', + 'linkurl' => 'sys_info_mark.php' + ), + 6 => array( + 'title' => '自定义文档属性', + 'description' => '在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist 标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档。', + 'purview' => 'sys_Att', + 'linkurl' => 'content_att.php' + ), + 7 => array( + 'title' => '软件频道设置', + 'description' => '可以对软件下载时的连接显示方式,下载方式,镜像服务器等等进行配置', + 'purview' => 'sys_SoftConfig', + 'linkurl' => 'soft_config.php' + ), + 8 => array( + 'title' => '防采集串混淆', + 'description' => '防采集混淆字符串管理', + 'purview' => 'sys_StringMix', + 'linkurl' => 'article_string_mix.php' + ), + 9 => array( + 'title' => '随机模板设置', + 'description' => '本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可', + 'purview' => 'sys_StringMix', + 'linkurl' => 'article_template_rand.php' + ), + 11 => array( + 'title' => '数据库备份/还原', + 'description' => '对数据库进行备份和还原', + 'purview' => 'sys_data', + 'linkurl' => 'sys_data.php' + ), + 12 => array( + 'title' => 'SQL命令行工具', + 'description' => '可以在针对每张数据表执行单行或者多行的SQL语句', + 'purview' => 'sys_data', + 'linkurl' => 'sys_sql_query.php' + ), + 14 => array( + 'title' => '病毒扫描[S]', + 'description' => '以DedeBIZ开发模式为标准对现有的文件进行扫描并进行判断', + 'purview' => 'sys_verifies', + 'linkurl' => 'sys_safetest.php' + ), + 15 => array( + 'title' => '系统错误修复[S]', + 'description' => '由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理。', + 'purview' => 'sys_verifies', + 'linkurl' => 'sys_repair.php' + ), + ) +); diff --git a/src/dede/inc/inc_admin_channel.php b/src/admin/inc/inc_admin_channel.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/inc/inc_admin_channel.php rename to src/admin/inc/inc_admin_channel.php index 4514b64b..3ac8588d --- a/src/dede/inc/inc_admin_channel.php +++ b/src/admin/inc/inc_admin_channel.php @@ -1,134 +1,134 @@ - 255) $mxlen = 100; - - $fields[0] = " `$fieldname` varchar($mxlen) NOT NULL default '$dfvalue';"; - $fields[1] = "varchar($mxlen)"; - } - else if($dtype == "multitext" || $dtype == "htmltext") - { - $fields[0] = " `$fieldname` mediumtext;"; - $fields[1] = "mediumtext"; - } - else if($dtype=="textdata") - { - if(empty($dfvalue)) $dfvalue = ''; - - $fields[0] = " `$fieldname` varchar(100) NOT NULL default '';"; - $fields[1] = "varchar(100)"; - } - else if($dtype=="relation") { - if(empty($dfvalue)) $dfvalue = ''; - - $fields[0] = " `$fieldname` TEXT NOT NULL default '$dfvalue';"; - $fields[1] = "TEXT"; - } - else if($dtype=="textchar") - { - if(empty($dfvalue)) $dfvalue = ''; - - $fields[0] = " `$fieldname` char(100) NOT NULL default '$dfvalue';"; - $fields[1] = "char(100)"; - } - else if($dtype=="checkbox") - { - $dfvalue = str_replace(',',"','",$dfvalue); - $dfvalue = "'".$dfvalue."'"; - $fields[0] = " `$fieldname` SET($dfvalue) NULL;"; - $fields[1] = "SET($dfvalue)"; - } - else if($dtype=="select" || $dtype=="radio") - { - $dfvalue = str_replace(',', "','", $dfvalue); - $dfvalue = "'".$dfvalue."'"; - $fields[0] = " `$fieldname` enum($dfvalue) NULL;"; - $fields[1] = "enum($dfvalue)"; - } - else - { - if(empty($dfvalue)) - { - $dfvalue = ''; - } - if(empty($mxlen)) - { - $mxlen = 100; - } - if($mxlen > 255) - { - $mxlen = 250; - } - $fields[0] = " `$fieldname` varchar($mxlen) NOT NULL default '$dfvalue';"; - $fields[1] = "varchar($mxlen)"; - } - return $fields; -} - -/** - * 获取模型列表字段 - * - * @access public - * @param object $dtp 模板引擎 - * @param string $oksetting 设置 - * @return array - */ -function GetAddFieldList(&$dtp,&$oksetting) -{ - $oklist = ''; - $dtp->SetNameSpace("field","<",">"); - $dtp->LoadSource($oksetting); - if(is_array($dtp->CTags)) - { - foreach($dtp->CTags as $tagid=>$ctag) - { - if($ctag->GetAtt('islist')==1) - { - $oklist .= ($oklist=='' ? strtolower($ctag->GetName()) : ','.strtolower($ctag->GetName()) ); - } - } - } - return $oklist; + 255) $mxlen = 100; + + $fields[0] = " `$fieldname` varchar($mxlen) NOT NULL default '$dfvalue';"; + $fields[1] = "varchar($mxlen)"; + } + else if($dtype == "multitext" || $dtype == "htmltext") + { + $fields[0] = " `$fieldname` mediumtext;"; + $fields[1] = "mediumtext"; + } + else if($dtype=="textdata") + { + if(empty($dfvalue)) $dfvalue = ''; + + $fields[0] = " `$fieldname` varchar(100) NOT NULL default '';"; + $fields[1] = "varchar(100)"; + } + else if($dtype=="relation") { + if(empty($dfvalue)) $dfvalue = ''; + + $fields[0] = " `$fieldname` TEXT NOT NULL default '$dfvalue';"; + $fields[1] = "TEXT"; + } + else if($dtype=="textchar") + { + if(empty($dfvalue)) $dfvalue = ''; + + $fields[0] = " `$fieldname` char(100) NOT NULL default '$dfvalue';"; + $fields[1] = "char(100)"; + } + else if($dtype=="checkbox") + { + $dfvalue = str_replace(',',"','",$dfvalue); + $dfvalue = "'".$dfvalue."'"; + $fields[0] = " `$fieldname` SET($dfvalue) NULL;"; + $fields[1] = "SET($dfvalue)"; + } + else if($dtype=="select" || $dtype=="radio") + { + $dfvalue = str_replace(',', "','", $dfvalue); + $dfvalue = "'".$dfvalue."'"; + $fields[0] = " `$fieldname` enum($dfvalue) NULL;"; + $fields[1] = "enum($dfvalue)"; + } + else + { + if(empty($dfvalue)) + { + $dfvalue = ''; + } + if(empty($mxlen)) + { + $mxlen = 100; + } + if($mxlen > 255) + { + $mxlen = 250; + } + $fields[0] = " `$fieldname` varchar($mxlen) NOT NULL default '$dfvalue';"; + $fields[1] = "varchar($mxlen)"; + } + return $fields; +} + +/** + * 获取模型列表字段 + * + * @access public + * @param object $dtp 模板引擎 + * @param string $oksetting 设置 + * @return array + */ +function GetAddFieldList(&$dtp,&$oksetting) +{ + $oklist = ''; + $dtp->SetNameSpace("field","<",">"); + $dtp->LoadSource($oksetting); + if(is_array($dtp->CTags)) + { + foreach($dtp->CTags as $tagid=>$ctag) + { + if($ctag->GetAtt('islist')==1) + { + $oklist .= ($oklist=='' ? strtolower($ctag->GetName()) : ','.strtolower($ctag->GetName()) ); + } + } + } + return $oklist; } \ No newline at end of file diff --git a/src/dede/inc/inc_archives_all.php b/src/admin/inc/inc_archives_all.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/inc/inc_archives_all.php rename to src/admin/inc/inc_archives_all.php index d421a57f..78178eb8 --- a/src/dede/inc/inc_archives_all.php +++ b/src/admin/inc/inc_archives_all.php @@ -1,335 +1,332 @@ -GetName(); - $formitem = " - - - - - -
~name~~form~
\r\n"; - $innertext = trim($ctag->GetInnerText()); - if ($innertext != "") { - if ($ctag->GetAtt("type") == 'select') { - $myformItem = ''; - $items = explode(',', $innertext); - $myformItem = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $myformItem, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == 'radio') { - $myformItem = ''; - $items = explode(',', $innertext); - foreach ($items as $v) { - $v = trim($v); - $i = 0; - if ($v != '') { - if ($i == 0) { - $myformItem .= "\r\n"; - } else { - $myformItem .= "\r\n"; - } - } - } - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $myformItem, $formitem); - return $formitem; - } else { - $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace('~form~', $innertext, $formitem); - $formitem = str_replace('@value', '', $formitem); - return $formitem; - } - } - if ($ctag->GetAtt("type") == "htmltext" || $ctag->GetAtt("type") == "textdata") { - $formitem = ""; - $formitem .= "
".$ctag->GetAtt('itemname').""; - $formitem .= GetEditor($fieldname, '', 350, 'Basic', 'string'); - $formitem .= "
\r\n"; - return $formitem; - } else if ($ctag->GetAtt("type") == "multitext") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "datetime") { - $nowtime = GetDateTimeMk(time()); - $innertext = ""; - $innertext .= ""; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "img") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "media") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "addon") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "media") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "relation") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else { - if ($ctag->GetAtt('default') != "") $dfvalue = $ctag->GetAtt('default'); - else $dfvalue = ""; - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } -} - -/** - * 处理不同类型的数据 - * - * @access public - * @param string $dvalue 值 - * @param string $dtype 类型 - * @param int $aid 文档ID - * @param string $job 操作类型 - * @param string $addvar 增加值 - * @return string - */ -function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') -{ - global $cfg_cookie_encode, $cfg_dir_purview, $isUrlOpen; - if ($dtype == "int") { - $dvalue = trim(preg_replace("#[^0-9]#", "", $dvalue)); - if ($dvalue == "") $dvalue = 0; - return $dvalue; - } else if ($dtype == "float") { - $dvalue = trim(preg_replace("#[^0-9\.]#", "", $dvalue)); - if ($dvalue == "") $dvalue = 0; - return $dvalue; - } else if ($dtype == "datetime") { - return GetMkTime($dvalue); - } else if ($dtype == "textdata") { - if ($job == 'edit') { - $addvarDirs = explode('/', $addvar); - $addvarDir = preg_replace("#\/".$addvarDirs[count($addvarDirs) - 1]."$#", "", $addvar); - $mdir = $GLOBALS['cfg_basedir'].$addvarDir; - if (!is_dir($mdir)) { - MkdirAll($mdir, $GLOBALS['cfg_dir_purview']); - } - $fp = fopen($GLOBALS['cfg_basedir'].$addvar, "w"); - fwrite($fp, stripslashes($dvalue)); - fclose($fp); - CloseFtp(); - return $addvar; - } else { - $ipath = $GLOBALS['cfg_cmspath']."/data/textdata"; - $tpath = ceil($aid / 5000); - if (!is_dir($GLOBALS['cfg_basedir'].$ipath)) { - MkdirAll($GLOBALS['cfg_basedir'].$ipath, $cfg_dir_purview); - } - if (!is_dir($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath)) { - MkdirAll($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath, $cfg_dir_purview); - } - $ipath = $ipath.'/'.$tpath; - $filename = "{$ipath}/{$aid}-".cn_substr(md5($cfg_cookie_encode), 0, 16).".txt"; - $fp = fopen($GLOBALS['cfg_basedir'].$filename, "w"); - fwrite($fp, stripslashes($dvalue)); - fclose($fp); - CloseFtp(); - return $filename; - } - } else if ($dtype == "img") { - $iurl = stripslashes($dvalue); - if (trim($iurl) == "") { - return ""; - } - $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl)); - $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; - if (preg_match("#^http:\/\/#i", $iurl) && $GLOBALS['isUrlOpen']) { - //远程图片 - $reimgs = ""; - if ($isUrlOpen) { - $reimgs = GetRemoteImage($iurl, $GLOBALS['adminid']); - if (is_array($reimgs)) { - $imgurl = "{dede:img text='' width='".$reimgs[1]."' height='".$reimgs[2]."'} ".$reimgs[0]." {/dede:img}"; - } - } else { - $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; - } - } else if ($iurl != "") { - //站内图片 - $imgfile = $GLOBALS['cfg_basedir'].$iurl; - if (is_file($imgfile)) { - $imginfos = GetImageSize($imgfile); - $imgurl = "{dede:img text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}"; - } - } - return addslashes($imgurl); - } else { - return $dvalue; - } -} - -/** - * 获得带值的表单(编辑时用) - * - * @access public - * @param object $ctag ctag - * @param string $fvalue 表单值 - * @return string - */ - -function GetFormItemValue($ctag, $fvalue) -{ - $fieldname = $ctag->GetName(); - $formitem = " - - - - - -
~name~~form~
\r\n"; - $innertext = trim($ctag->GetInnerText()); - if ($innertext != "") { - if ($ctag->GetAtt("type") == 'select') { - $myformItem = ''; - $items = explode(',', $innertext); - $myformItem = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $myformItem, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == 'radio') { - $myformItem = ''; - $items = explode(',', $innertext); - foreach ($items as $v) { - $v = trim($v); - if ($v != '') { - if ($fvalue == $v) { - $myformItem .= "\r\n"; - } else { - $myformItem .= "\r\n"; - } - } - } - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $myformItem, $formitem); - return $formitem; - } else { - $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace('~form~', $innertext, $formitem); - $formitem = str_replace('@value', $fvalue, $formitem); - return $formitem; - } - } - - //文本数据的特殊处理 - if ($ctag->GetAtt("type") == "textdata") { - if (is_file($GLOBALS['cfg_basedir'].$fvalue)) { - $fp = fopen($GLOBALS['cfg_basedir'].$fvalue, 'r'); - $okfvalue = ""; - while (!feof($fp)) { - $okfvalue .= fgets($fp, 1024); - } - fclose($fp); - } else { - $okfvalue = ""; - } - $formitem = "\r\n"; - $formitem .= "\r\n"; - $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')."
\r\n"; - $formitem .= "\r\n"; - return $formitem; - } else if ($ctag->GetAtt("type") == "htmltext") { - $formitem = "\r\n"; - $formitem .= "\r\n"; - $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')."
\r\n"; - return $formitem; - } else if ($ctag->GetAtt("type") == "multitext") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "datetime") { - $nowtime = GetDateTimeMk($fvalue); - $innertext = ""; - $innertext .= ""; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "img") { - $ndtp = new DedeTagParse(); - $ndtp->LoadSource($fvalue); - if (!is_array($ndtp->CTags)) { - $ndtp->Clear(); - $fvalue = ""; - } - $ntag = $ndtp->GetTag("img"); - $fvalue = trim($ntag->GetInnerText()); - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "media") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "addon") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } -} +GetName(); + $formitem = " + + + + + +
~name~~form~
\r\n"; + $innertext = trim($ctag->GetInnerText()); + if ($innertext != "") { + if ($ctag->GetAtt("type") == 'select') { + $myformItem = ''; + $items = explode(',', $innertext); + $myformItem = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $myformItem, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == 'radio') { + $myformItem = ''; + $items = explode(',', $innertext); + foreach ($items as $v) { + $v = trim($v); + $i = 0; + if ($v != '') { + if ($i == 0) { + $myformItem .= "\r\n"; + } else { + $myformItem .= "\r\n"; + } + } + } + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $myformItem, $formitem); + return $formitem; + } else { + $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace('~form~', $innertext, $formitem); + $formitem = str_replace('@value', '', $formitem); + return $formitem; + } + } + if ($ctag->GetAtt("type") == "htmltext" || $ctag->GetAtt("type") == "textdata") { + $formitem = ""; + $formitem .= "
".$ctag->GetAtt('itemname').""; + $formitem .= GetEditor($fieldname, '', 350, 'Basic', 'string'); + $formitem .= "
\r\n"; + return $formitem; + } else if ($ctag->GetAtt("type") == "multitext") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "datetime") { + $nowtime = GetDateTimeMk(time()); + $innertext = ""; + $innertext .= ""; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "img") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "media") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "addon") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "media") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "relation") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else { + if ($ctag->GetAtt('default') != "") $dfvalue = $ctag->GetAtt('default'); + else $dfvalue = ""; + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } +} + +/** + * 处理不同类型的数据 + * + * @access public + * @param string $dvalue 值 + * @param string $dtype 类型 + * @param int $aid 文档ID + * @param string $job 操作类型 + * @param string $addvar 增加值 + * @return string + */ +function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') +{ + global $cfg_cookie_encode, $cfg_dir_purview, $isUrlOpen; + if ($dtype == "int") { + $dvalue = trim(preg_replace("#[^0-9]#", "", $dvalue)); + if ($dvalue == "") $dvalue = 0; + return $dvalue; + } else if ($dtype == "float") { + $dvalue = trim(preg_replace("#[^0-9\.]#", "", $dvalue)); + if ($dvalue == "") $dvalue = 0; + return $dvalue; + } else if ($dtype == "datetime") { + return GetMkTime($dvalue); + } else if ($dtype == "textdata") { + if ($job == 'edit') { + $addvarDirs = explode('/', $addvar); + $addvarDir = preg_replace("#\/".$addvarDirs[count($addvarDirs) - 1]."$#", "", $addvar); + $mdir = $GLOBALS['cfg_basedir'].$addvarDir; + if (!is_dir($mdir)) { + MkdirAll($mdir, $GLOBALS['cfg_dir_purview']); + } + $fp = fopen($GLOBALS['cfg_basedir'].$addvar, "w"); + fwrite($fp, stripslashes($dvalue)); + fclose($fp); + CloseFtp(); + return $addvar; + } else { + $ipath = $GLOBALS['cfg_cmspath']."/data/textdata"; + $tpath = ceil($aid / 5000); + if (!is_dir($GLOBALS['cfg_basedir'].$ipath)) { + MkdirAll($GLOBALS['cfg_basedir'].$ipath, $cfg_dir_purview); + } + if (!is_dir($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath)) { + MkdirAll($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath, $cfg_dir_purview); + } + $ipath = $ipath.'/'.$tpath; + $filename = "{$ipath}/{$aid}-".cn_substr(md5($cfg_cookie_encode), 0, 16).".txt"; + $fp = fopen($GLOBALS['cfg_basedir'].$filename, "w"); + fwrite($fp, stripslashes($dvalue)); + fclose($fp); + CloseFtp(); + return $filename; + } + } else if ($dtype == "img") { + $iurl = stripslashes($dvalue); + if (trim($iurl) == "") { + return ""; + } + $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl)); + $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; + if (preg_match("#^http:\/\/#i", $iurl) && $GLOBALS['isUrlOpen']) { + //远程图片 + $reimgs = ""; + if ($isUrlOpen) { + $reimgs = GetRemoteImage($iurl, $GLOBALS['adminid']); + if (is_array($reimgs)) { + $imgurl = "{dede:img text='' width='".$reimgs[1]."' height='".$reimgs[2]."'} ".$reimgs[0]." {/dede:img}"; + } + } else { + $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; + } + } else if ($iurl != "") { + //站内图片 + $imgfile = $GLOBALS['cfg_basedir'].$iurl; + if (is_file($imgfile)) { + $imginfos = GetImageSize($imgfile); + $imgurl = "{dede:img text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}"; + } + } + return addslashes($imgurl); + } else { + return $dvalue; + } +} + +/** + * 获得带值的表单(编辑时用) + * + * @access public + * @param object $ctag ctag + * @param string $fvalue 表单值 + * @return string + */ +function GetFormItemValue($ctag, $fvalue) +{ + $fieldname = $ctag->GetName(); + $formitem = " + + + + + +
~name~~form~
\r\n"; + $innertext = trim($ctag->GetInnerText()); + if ($innertext != "") { + if ($ctag->GetAtt("type") == 'select') { + $myformItem = ''; + $items = explode(',', $innertext); + $myformItem = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $myformItem, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == 'radio') { + $myformItem = ''; + $items = explode(',', $innertext); + foreach ($items as $v) { + $v = trim($v); + if ($v != '') { + if ($fvalue == $v) { + $myformItem .= "\r\n"; + } else { + $myformItem .= "\r\n"; + } + } + } + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $myformItem, $formitem); + return $formitem; + } else { + $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace('~form~', $innertext, $formitem); + $formitem = str_replace('@value', $fvalue, $formitem); + return $formitem; + } + } + + //文本数据的特殊处理 + if ($ctag->GetAtt("type") == "textdata") { + if (is_file($GLOBALS['cfg_basedir'].$fvalue)) { + $fp = fopen($GLOBALS['cfg_basedir'].$fvalue, 'r'); + $okfvalue = ""; + while (!feof($fp)) { + $okfvalue .= fgets($fp, 1024); + } + fclose($fp); + } else { + $okfvalue = ""; + } + $formitem = "\r\n"; + $formitem .= "\r\n"; + $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')."
\r\n"; + $formitem .= "\r\n"; + return $formitem; + } else if ($ctag->GetAtt("type") == "htmltext") { + $formitem = "\r\n"; + $formitem .= "\r\n"; + $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')."
\r\n"; + return $formitem; + } else if ($ctag->GetAtt("type") == "multitext") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "datetime") { + $nowtime = GetDateTimeMk($fvalue); + $innertext = ""; + $innertext .= ""; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "img") { + $ndtp = new DedeTagParse(); + $ndtp->LoadSource($fvalue); + if (!is_array($ndtp->CTags)) { + $ndtp->Clear(); + $fvalue = ""; + } + $ntag = $ndtp->GetTag("img"); + $fvalue = trim($ntag->GetInnerText()); + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "media") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "addon") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } +} diff --git a/src/dede/inc/inc_archives_functions.php b/src/admin/inc/inc_archives_functions.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/inc/inc_archives_functions.php rename to src/admin/inc/inc_archives_functions.php index 421759de..ad856329 --- a/src/dede/inc/inc_archives_functions.php +++ b/src/admin/inc/inc_archives_functions.php @@ -544,7 +544,7 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' //删除非站内链接 if ($dellink == 1) { $allow_urls = array($_SERVER['HTTP_HOST']); - // 读取允许的超链接设置 + //读取允许的超链接设置 if (file_exists(DEDEDATA."/admin/allowurl.txt")) { $allow_urls = array_merge($allow_urls, file(DEDEDATA."/admin/allowurl.txt")); } @@ -564,7 +564,7 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' if ($autokey == 2 && $keywords == '') { $subject = $title; $message = $body; - // 采用DedeBIZ Core分词组件分词 + //采用DedeBIZ Core分词组件分词 if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { $keywords = ''; $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); diff --git a/src/dede/inc/inc_batchup.php b/src/admin/inc/inc_batchup.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/inc/inc_batchup.php rename to src/admin/inc/inc_batchup.php index 835f6e44..78b65ad7 --- a/src/dede/inc/inc_batchup.php +++ b/src/admin/inc/inc_batchup.php @@ -1,157 +1,155 @@ -GetOne($query); - $nid = $row['nid']; - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $addtable = trim($row['addtable']); - $issystem = $row['issystem']; - - //查询档案信息 - if ($issystem == -1) { - $arcQuery = "SELECT arc.*,tp.* from `$addtable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.aid='$aid' "; - } else { - $arcQuery = "SELECT arc.*,tp.*,arc.id AS aid FROM `$maintable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.id='$aid' "; - } - - $arcRow = $dsql->GetOne($arcQuery); - - //检测权限 - if (!TestPurview('a_Del,sys_ArcBatch')) { - if (TestPurview('a_AccDel')) { - if (!in_array($arcRow['typeid'], $admin_catalogs) && (count($admin_catalogs) != 0 || $cfg_admin_channel != 'all')) { - return FALSE; - } - } else if (TestPurview('a_MyDel')) { - if ($arcRow['mid'] != $cuserLogin->getUserID()) { - return FALSE; - } - } else { - return FALSE; - } - } - - //$issystem==-1 是单表模型,不使用回收站 - if ($issystem == -1) $type = 'OK'; - if (!is_array($arcRow)) return FALSE; - - /** 删除到回收站 **/ - if ($cfg_delete == 'Y' && $type == 'ON') { - $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='-2' WHERE id='$aid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-2' WHERE id = '$aid'; "); - } else { - //删除数据库记录 - if (!$onlyfile) { - $query = "Delete From `#@__arctiny` where id='$aid' $whererecycle"; - if ($dsql->ExecuteNoneQuery($query)) { - $dsql->ExecuteNoneQuery("Delete From `#@__feedback` where aid='$aid' "); - $dsql->ExecuteNoneQuery("Delete From `#@__member_stow` where aid='$aid' "); - $dsql->ExecuteNoneQuery("Delete From `#@__taglist` where aid='$aid' "); - $dsql->ExecuteNoneQuery("Delete From `#@__erradd` where aid='$aid' "); - if ($addtable != '') { - $dsql->ExecuteNoneQuery("Delete From `$addtable` where aid='$aid'"); - } - if ($issystem != -1) { - $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$aid' $whererecycle"); - } - //删除相关附件 - if ($cfg_upload_switch == 'Y') { - $dsql->Execute("me", "SELECT * FROM `#@__uploads` WHERE arcid = '$aid'"); - while ($row = $dsql->GetArray('me')) { - $addfile = $row['url']; - $aid = $row['aid']; - $dsql->ExecuteNoneQuery("Delete From `#@__uploads` where aid = '$aid' "); - $upfile = $cfg_basedir.$addfile; - if (@file_exists($upfile)) @unlink($upfile); - } - } - } - } - //删除文本数据 - $filenameh = DEDEDATA."/textdata/".(ceil($aid / 5000))."/{$aid}-".substr(md5($cfg_cookie_encode), 0, 16).".txt"; - if (@is_file($filenameh)) @unlink($filenameh); - } - - if (empty($arcRow['money'])) $arcRow['money'] = 0; - if (empty($arcRow['ismake'])) $arcRow['ismake'] = 1; - if (empty($arcRow['arcrank'])) $arcRow['arcrank'] = 0; - if (empty($arcRow['filename'])) $arcRow['filename'] = ''; - - //删除HTML - if ($arcRow['ismake'] == -1 || $arcRow['arcrank'] != 0 || $arcRow['typeid'] == 0 || $arcRow['money'] > 0) { - return TRUE; - } - - //强制转换非多站点模式,以便统一方式获得实际HTML文件 - $GLOBALS['cfg_multi_site'] = 'N'; - $arcurl = GetFileUrl( - $arcRow['aid'], - $arcRow['typeid'], - $arcRow['senddate'], - $arcRow['title'], - $arcRow['ismake'], - $arcRow['arcrank'], - $arcRow['namerule'], - $arcRow['typedir'], - $arcRow['money'], - $arcRow['filename'] - ); - if (!preg_match("#\?#", $arcurl)) { - $htmlfile = GetTruePath().str_replace($GLOBALS['cfg_basehost'], '', $arcurl); - if (file_exists($htmlfile) && !is_dir($htmlfile)) { - @unlink($htmlfile); - $arcurls = explode(".", $htmlfile); - $sname = $arcurls[count($arcurls) - 1]; - $fname = preg_replace("#(\.$sname)$#", "", $htmlfile); - for ($i = 2; $i <= 100; $i++) { - $htmlfile = $fname."_{$i}.".$sname; - if (@file_exists($htmlfile)) @unlink($htmlfile); - else break; - } - } - } - - return true; -} - -//获取真实路径 -function GetTruePath($siterefer = '', $sitepath = '') -{ - $truepath = $GLOBALS['cfg_basedir']; - return $truepath; -} +GetOne($query); + $nid = $row['nid']; + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $addtable = trim($row['addtable']); + $issystem = $row['issystem']; + + //查询档案信息 + if ($issystem == -1) { + $arcQuery = "SELECT arc.*,tp.* from `$addtable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.aid='$aid' "; + } else { + $arcQuery = "SELECT arc.*,tp.*,arc.id AS aid FROM `$maintable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.id='$aid' "; + } + + $arcRow = $dsql->GetOne($arcQuery); + + //检测权限 + if (!TestPurview('a_Del,sys_ArcBatch')) { + if (TestPurview('a_AccDel')) { + if (!in_array($arcRow['typeid'], $admin_catalogs) && (count($admin_catalogs) != 0 || $cfg_admin_channel != 'all')) { + return FALSE; + } + } else if (TestPurview('a_MyDel')) { + if ($arcRow['mid'] != $cuserLogin->getUserID()) { + return FALSE; + } + } else { + return FALSE; + } + } + + //$issystem==-1 是单表模型,不使用回收站 + if ($issystem == -1) $type = 'OK'; + if (!is_array($arcRow)) return FALSE; + + /** 删除到回收站 **/ + if ($cfg_delete == 'Y' && $type == 'ON') { + $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='-2' WHERE id='$aid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-2' WHERE id = '$aid'; "); + } else { + //删除数据库记录 + if (!$onlyfile) { + $query = "Delete From `#@__arctiny` where id='$aid' $whererecycle"; + if ($dsql->ExecuteNoneQuery($query)) { + $dsql->ExecuteNoneQuery("Delete From `#@__feedback` where aid='$aid' "); + $dsql->ExecuteNoneQuery("Delete From `#@__member_stow` where aid='$aid' "); + $dsql->ExecuteNoneQuery("Delete From `#@__taglist` where aid='$aid' "); + $dsql->ExecuteNoneQuery("Delete From `#@__erradd` where aid='$aid' "); + if ($addtable != '') { + $dsql->ExecuteNoneQuery("Delete From `$addtable` where aid='$aid'"); + } + if ($issystem != -1) { + $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$aid' $whererecycle"); + } + //删除相关附件 + if ($cfg_upload_switch == 'Y') { + $dsql->Execute("me", "SELECT * FROM `#@__uploads` WHERE arcid = '$aid'"); + while ($row = $dsql->GetArray('me')) { + $addfile = $row['url']; + $aid = $row['aid']; + $dsql->ExecuteNoneQuery("Delete From `#@__uploads` where aid = '$aid' "); + $upfile = $cfg_basedir.$addfile; + if (@file_exists($upfile)) @unlink($upfile); + } + } + } + } + //删除文本数据 + $filenameh = DEDEDATA."/textdata/".(ceil($aid / 5000))."/{$aid}-".substr(md5($cfg_cookie_encode), 0, 16).".txt"; + if (@is_file($filenameh)) @unlink($filenameh); + } + + if (empty($arcRow['money'])) $arcRow['money'] = 0; + if (empty($arcRow['ismake'])) $arcRow['ismake'] = 1; + if (empty($arcRow['arcrank'])) $arcRow['arcrank'] = 0; + if (empty($arcRow['filename'])) $arcRow['filename'] = ''; + + //删除HTML + if ($arcRow['ismake'] == -1 || $arcRow['arcrank'] != 0 || $arcRow['typeid'] == 0 || $arcRow['money'] > 0) { + return TRUE; + } + + //强制转换非多站点模式,以便统一方式获得实际HTML文件 + $GLOBALS['cfg_multi_site'] = 'N'; + $arcurl = GetFileUrl( + $arcRow['aid'], + $arcRow['typeid'], + $arcRow['senddate'], + $arcRow['title'], + $arcRow['ismake'], + $arcRow['arcrank'], + $arcRow['namerule'], + $arcRow['typedir'], + $arcRow['money'], + $arcRow['filename'] + ); + if (!preg_match("#\?#", $arcurl)) { + $htmlfile = GetTruePath().str_replace($GLOBALS['cfg_basehost'], '', $arcurl); + if (file_exists($htmlfile) && !is_dir($htmlfile)) { + @unlink($htmlfile); + $arcurls = explode(".", $htmlfile); + $sname = $arcurls[count($arcurls) - 1]; + $fname = preg_replace("#(\.$sname)$#", "", $htmlfile); + for ($i = 2; $i <= 100; $i++) { + $htmlfile = $fname."_{$i}.".$sname; + if (@file_exists($htmlfile)) @unlink($htmlfile); + else break; + } + } + } + + return true; +} + +//获取真实路径 +function GetTruePath($siterefer = '', $sitepath = '') +{ + $truepath = $GLOBALS['cfg_basedir']; + return $truepath; +} diff --git a/src/dede/inc/inc_catalog_options.php b/src/admin/inc/inc_catalog_options.php old mode 100755 new mode 100644 similarity index 80% rename from src/dede/inc/inc_catalog_options.php rename to src/admin/inc/inc_catalog_options.php index 9ced1e56..2d3ffb05 --- a/src/dede/inc/inc_catalog_options.php +++ b/src/admin/inc/inc_catalog_options.php @@ -1,104 +1,94 @@ -SetQuery("SELECT id,typename FROM `#@__channeltype` "); - $dsql->Execute('dd'); - $channels = array(); - while ($row = $dsql->GetObject('dd')) $channels[$row->id] = $row->typename; - - $OptionArrayList = ''; - - //当前选中的栏目 - if ($selid > 0) { - $row = $dsql->GetOne("SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id='$selid'"); - if ($row['ispart'] == 1) $OptionArrayList .= "\r\n"; - else $OptionArrayList .= "\r\n"; - } - - //是否限定用户管理的栏目 - if ($cfg_admin_channel == 'array') { - if (count($admin_catalogs) == 0) { - $query = "SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE 1=2 "; - } else { - $admin_catalog = join(',', $admin_catalogs); - $dsql->SetQuery("SELECT reid FROM `#@__arctype` WHERE id IN($admin_catalog) GROUP BY reid "); - $dsql->Execute('qq'); - $topidstr = ''; - while ($row = $dsql->GetObject('qq')) { - if ($row->reid == 0) continue; - $topidstr .= ($topidstr == '' ? $row->reid : ','.$row->reid); - } - $admin_catalog .= ','.$topidstr; - $admin_catalogs = explode(',', $admin_catalog); - $admin_catalogs = array_unique($admin_catalogs); - $admin_catalog = join(',', $admin_catalogs); - $admin_catalog = preg_replace("#,$#", '', $admin_catalog); - $query = "SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id IN($admin_catalog) AND reid=0 AND ispart<>2 "; - } - } else { - $query = "SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE ispart<>2 AND reid=0 ORDER BY sortrank ASC "; - } - - $dsql->SetQuery($query); - $dsql->Execute('cc'); - - while ($row = $dsql->GetObject('cc')) { - $sonCats = ''; - LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); - if ($sonCats != '') { - if ($row->ispart == 1) $OptionArrayList .= "\r\n"; - else if ($row->ispart == 2) $OptionArrayList .= ''; - else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "\r\n"; - else $OptionArrayList .= "\r\n"; - $OptionArrayList .= $sonCats; - } else { - if ($row->ispart == 0 && (!empty($channeltype) && $row->channeltype == $channeltype)) { - $OptionArrayList .= "\r\n"; - } else if ($row->ispart == 0 && empty($channeltype)) { - // 专题 - $OptionArrayList .= "\r\n"; - } - } - } - return $OptionArrayList; -} - -function LogicGetOptionArray($id, $step, $channeltype, &$dsql, &$sonCats) -{ - global $OptionArrayList, $channels, $cfg_admin_channel, $admin_catalogs; - $dsql->SetQuery("Select id,typename,ispart,channeltype From `#@__arctype` where reid='".$id."' And ispart<>2 order by sortrank asc"); - $dsql->Execute($id); - while ($row = $dsql->GetObject($id)) { - if ($cfg_admin_channel != 'all' && !in_array($row->id, $admin_catalogs)) { - continue; - } - if ($row->channeltype == $channeltype && $row->ispart == 1) { - $sonCats .= "\r\n"; - } else if (($row->channeltype == $channeltype && $row->ispart == 0) || empty($channeltype)) { - $sonCats .= "\r\n"; - } - LogicGetOptionArray($row->id, $step.'─', $channeltype, $dsql, $sonCats); - } -} +SetQuery("SELECT id,typename FROM `#@__channeltype` "); + $dsql->Execute('dd'); + $channels = array(); + while ($row = $dsql->GetObject('dd')) $channels[$row->id] = $row->typename; + $OptionArrayList = ''; + //当前选中的栏目 + if ($selid > 0) { + $row = $dsql->GetOne("SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id='$selid'"); + if ($row['ispart'] == 1) $OptionArrayList .= ""; + else $OptionArrayList .= ""; + } + //是否限定用户管理的栏目 + if ($cfg_admin_channel == 'array') { + if (count($admin_catalogs) == 0) { + $query = "SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE 1=2 "; + } else { + $admin_catalog = join(',', $admin_catalogs); + $dsql->SetQuery("SELECT reid FROM `#@__arctype` WHERE id IN($admin_catalog) GROUP BY reid "); + $dsql->Execute('qq'); + $topidstr = ''; + while ($row = $dsql->GetObject('qq')) { + if ($row->reid == 0) continue; + $topidstr .= ($topidstr == '' ? $row->reid : ','.$row->reid); + } + $admin_catalog .= ','.$topidstr; + $admin_catalogs = explode(',', $admin_catalog); + $admin_catalogs = array_unique($admin_catalogs); + $admin_catalog = join(',', $admin_catalogs); + $admin_catalog = preg_replace("#,$#", '', $admin_catalog); + $query = "Select id,typename,ispart,channeltype From `#@__arctype` where id in($admin_catalog) And reid=0"; + } + } else { + $query = "Select id,typename,ispart,channeltype From `#@__arctype` where reid=0 order by sortrank asc"; + } + $dsql->SetQuery($query); + $dsql->Execute('cc'); + while ($row = $dsql->GetObject('cc')) { + $sonCats = ''; + LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); + if ($sonCats != '') { + if ($row->ispart == 1) $OptionArrayList .= ""; + else if($row->ispart == 2) $OptionArrayList .= ""; + else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= ""; + else $OptionArrayList .= ""; + $OptionArrayList .= $sonCats; + } else { + if ($row->ispart == 0 && (!empty($channeltype) && $row->channeltype == $channeltype)) { + $OptionArrayList .= ""; + } else if ($row->ispart == 0 && empty($channeltype)) { + $OptionArrayList .= ""; + } + } + } + return $OptionArrayList; +} +function LogicGetOptionArray($id, $step, $channeltype, &$dsql, &$sonCats) +{ + global $OptionArrayList, $channels, $cfg_admin_channel, $admin_catalogs; + $dsql->SetQuery("Select id,typename,ispart,channeltype From `#@__arctype` where reid='".$id."' order by sortrank asc"); + $dsql->Execute($id); + while ($row = $dsql->GetObject($id)) { + if ($cfg_admin_channel != 'all' && !in_array($row->id, $admin_catalogs)) { + continue; + } + if ($row->channeltype == $channeltype && $row->ispart == 1) { + $sonCats .= ""; + } else if (($row->channeltype == $channeltype && $row->ispart == 0) || empty($channeltype)) { + $sonCats .= ""; + } + LogicGetOptionArray($row->id, $step.'─', $channeltype, $dsql, $sonCats); + } +} \ No newline at end of file diff --git a/src/dede/inc/inc_coonepage.php b/src/admin/inc/inc_coonepage.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/inc/inc_coonepage.php rename to src/admin/inc/inc_coonepage.php index 3831ed32..a57e068a --- a/src/dede/inc/inc_coonepage.php +++ b/src/admin/inc/inc_coonepage.php @@ -1,108 +1,107 @@ - '', 'body' => '', 'source' => '', 'writer' => '', 'description' => '', 'keywords' => ''); - $redatas['source'] = preg_replace("/http:\/\//i", "", $gurl); - $redatas['source'] = preg_replace("/\/(.*)$/i", "", $redatas['source']); - $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '".$redatas['source']."' "); - $s = $e = ''; - if (is_array($row)) { - list($s, $e) = explode('{@body}', $row['rule']); - $s = trim($s); - $e = trim($e); - if ($row['issource'] == 1) { - $redatas['source'] = $row['title']; - } - } - $htd = new DedeHttpDown(); - $htd->OpenUrl($gurl); - $body = $htd->GetHtml(); - if ($body != '') { - //编码自动转换 - if ($cfg_soft_lang == 'utf-8') { - if ($row['lang'] == 'gb2312') { - $body = gb2utf8($body); - } - } else if ($cfg_soft_lang == 'gb2312') { - if ($row['lang'] == 'utf-8') { - $body = utf82gb($body); - } - } - - //获取标题 - $inarr = array(); - preg_match("/(.*)<\/title>/isU", $body, $inarr); - if (isset($inarr[1])) { - $redatas['title'] = $inarr[1]; - } - - //获取关键词 - $inarr = array(); - preg_match("/<meta[\s]+name=['\"]keywords['\"] content=['\"](.*)['\"]/isU", $body, $inarr); - if (isset($inarr[1])) { - $redatas['keywords'] = cn_substr(html2text($inarr[1]), 30); - } - - //获取摘要 - $inarr = array(); - preg_match("/<meta[\s]+name=['\"]description['\"] content=['\"](.*)['\"]/isU", $body, $inarr); - if (isset($inarr[1])) { - $redatas['description'] = cn_substr(html2text($inarr[1]), $cfg_auot_description); - } - - //获取内容 - if ($s != '' && $e != '') { - $redatas['body'] = GetHtmlAreaA($s, $e, $body); - if ($redatas['body'] != '' && $redatas['description'] == '') { - $redatas['description'] = cn_substr(html2text($redatas['body']), $GLOBALS['cfg_auot_description']); - } - } - } - return $redatas; -} - -/** - * 获取特定区域的HTML - * - * @access public - * @param string $s 开始标识符 - * @param string $e 末尾标识符 - * @param string $html 文档信息 - * @return string - */ -function GetHtmlAreaA($s, $e, &$html) -{ - if ($html == "" || $s == "") { - return ""; - } - $posstart = @strpos($html, $s); - if ($posstart === FALSE) { - return ""; - } - $posend = strpos($html, $e, $posstart); - if ($posend > $posstart && $posend !== FALSE) { - return substr($html, $posstart + strlen($s), $posend - $posstart - strlen($s)); - } else { - return ''; - } -} +<?php +/** + * 采集指定页面作为文章发布源 + * + * @version $Id: inc_coonepage.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(DEDEINC.'/charset.func.php'); + +/** + * 获取一个页面 + * + * @access public + * @param string $gurl 操作地址 + * @return string + */ +function CoOnePage($gurl) +{ + global $dsql, $cfg_auot_description, $cfg_soft_lang; + $redatas = array('title' => '', 'body' => '', 'source' => '', 'writer' => '', 'description' => '', 'keywords' => ''); + $redatas['source'] = preg_replace("/http:\/\//i", "", $gurl); + $redatas['source'] = preg_replace("/\/(.*)$/i", "", $redatas['source']); + $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '".$redatas['source']."' "); + $s = $e = ''; + if (is_array($row)) { + list($s, $e) = explode('{@body}', $row['rule']); + $s = trim($s); + $e = trim($e); + if ($row['issource'] == 1) { + $redatas['source'] = $row['title']; + } + } + $htd = new DedeHttpDown(); + $htd->OpenUrl($gurl); + $body = $htd->GetHtml(); + if ($body != '') { + //编码自动转换 + if ($cfg_soft_lang == 'utf-8') { + if ($row['lang'] == 'gb2312') { + $body = gb2utf8($body); + } + } else if ($cfg_soft_lang == 'gb2312') { + if ($row['lang'] == 'utf-8') { + $body = utf82gb($body); + } + } + + //获取标题 + $inarr = array(); + preg_match("/<title>(.*)<\/title>/isU", $body, $inarr); + if (isset($inarr[1])) { + $redatas['title'] = $inarr[1]; + } + + //获取关键词 + $inarr = array(); + preg_match("/<meta[\s]+name=['\"]keywords['\"] content=['\"](.*)['\"]/isU", $body, $inarr); + if (isset($inarr[1])) { + $redatas['keywords'] = cn_substr(html2text($inarr[1]), 30); + } + + //获取摘要 + $inarr = array(); + preg_match("/<meta[\s]+name=['\"]description['\"] content=['\"](.*)['\"]/isU", $body, $inarr); + if (isset($inarr[1])) { + $redatas['description'] = cn_substr(html2text($inarr[1]), $cfg_auot_description); + } + + //获取内容 + if ($s != '' && $e != '') { + $redatas['body'] = GetHtmlAreaA($s, $e, $body); + if ($redatas['body'] != '' && $redatas['description'] == '') { + $redatas['description'] = cn_substr(html2text($redatas['body']), $GLOBALS['cfg_auot_description']); + } + } + } + return $redatas; +} + +/** + * 获取特定区域的HTML + * + * @access public + * @param string $s 开始标识符 + * @param string $e 末尾标识符 + * @param string $html 文档信息 + * @return string + */ +function GetHtmlAreaA($s, $e, &$html) +{ + if ($html == "" || $s == "") { + return ""; + } + $posstart = @strpos($html, $s); + if ($posstart === FALSE) { + return ""; + } + $posend = strpos($html, $e, $posstart); + if ($posend > $posstart && $posend !== FALSE) { + return substr($html, $posstart + strlen($s), $posend - $posstart - strlen($s)); + } else { + return ''; + } +} diff --git a/src/dede/inc/inc_list_functions.php b/src/admin/inc/inc_list_functions.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/inc/inc_list_functions.php rename to src/admin/inc/inc_list_functions.php index 1a4e123a..b02eafe5 --- a/src/dede/inc/inc_list_functions.php +++ b/src/admin/inc/inc_list_functions.php @@ -11,7 +11,7 @@ if (!isset($registerGlobals)) { require_once(dirname(__FILE__)."/../../include/common.inc.php"); } -// 获取栏目名称 +//获取栏目名称 function GetTypename($tid) { global $dsql; diff --git a/src/dede/inc/inc_menu.php b/src/admin/inc/inc_menu.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/inc/inc_menu.php rename to src/admin/inc/inc_menu.php index 57546790..aa039283 --- a/src/dede/inc/inc_menu.php +++ b/src/admin/inc/inc_menu.php @@ -1,129 +1,129 @@ -<?php -/** - * 后台管理菜单项 - * - * @version $Id: inc_menu.php 1 10:32 2010年7月21日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__)."/../config.php"); -//载入可发布频道 -$addset = ''; -//检测可用的内容模型 -if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { - $admin_catalog = join(',', $admin_catalogs); - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); -} else { - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); -} -$dsql->Execute(); -$candoChannel = ''; -while ($row = $dsql->GetObject()) { - $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); -} -if (empty($candoChannel)) $candoChannel = 1; -$dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); -$dsql->Execute('mm'); -while ($row = $dsql->GetObject('mm')) { - $addset .= "<m:item name='{$row->typename}' ischannel='1' link='{$row->mancon}?channelid={$row->id}' linkadd='{$row->addcon}?channelid={$row->id}' channelid='{$row->id}' rank='' target='main' />\r\n"; -} -$helpUrl = DEDEBIZURL."/help"; -$gitUrl = DEDEBIZURL."/git"; -$dedebizUrl = DEDEBIZURL; -$adminMenu1 = $adminMenu2 = ''; -if ($cuserLogin->getUserType() >= 10) { - $adminMenu1 = "<m:top item='1_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'> - <m:item name='内容模型管理' link='mychannel_main.php' rank='c_List' target='main' /> - <m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> - <m:item name='联动类别管理' link='stepselect_main.php' rank='c_Stepseclect' target='main' /> - <m:item name='自由列表管理' link='freelist_main.php' rank='c_List' target='main' /> - <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> -</m:top>"; - $adminMenu2 = "<m:top item='7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> - <m:item name='默认模板管理' link='templets_main.php' rank='temp_All' target='main'/> - <m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> - <m:item name='自定义宏标记' link='mytag_main.php' rank='temp_MyTag' target='main'/> - <m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' target='main'/> - <m:item name='全局标记测试' link='tag_test.php' rank='temp_Test' target='main'/> -</m:top> -<m:top item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> - <m:item name='系统基本参数' link='sys_info.php' rank='sys_Edit' target='main' /> - <m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' /> - <m:item name='用户组设定' link='sys_group.php' rank='sys_Group' target='main' /> - <m:item name='系统日志管理' link='log_list.php' rank='sys_Log' target='main' /> - <m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' /> - <m:item name='自定义文档属性' link='content_att.php' rank='sys_Att' target='main' /> - <m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' target='main' /> - <m:item name='防采集串混淆' link='article_string_mix.php' rank='sys_StringMix' target='main' /> - <m:item name='随机模板设置' link='article_template_rand.php' rank='sys_StringMix' target='main' /> - <m:item name='数据备份还原' link='sys_data.php' rank='sys_Data' target='main' /> - <m:item name='SQL命令行工具' link='sys_sql_query.php' rank='sys_Data' target='main' /> - <m:item name='病毒文件扫描' link='sys_safetest.php' rank='sys_verify' target='main' /> - <m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> -</m:top> -<m:top item='10_6_' name='支付工具' display='none' rank='sys_Data'> - <m:item name='点卡产品分类' link='cards_type.php' rank='sys_Data' target='main' /> - <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> - <m:item name='会员产品分类' link='member_type.php' rank='sys_Data' target='main' /> - <m:item name='会员消费记录' link='member_operations.php' rank='sys_Data' target='main' /> - <m:item name='商店订单记录' link='shops_operations.php' rank='sys_Data' target='main' /> - <m:item name='支付接口设置' link='sys_payment.php' .php' rank='sys_Data' target='main' /> - <m:item name='配货方式设置' link='shops_delivery.php' rank='sys_Data' target='main' /> -</m:top>"; -} -$menusMain = "<m:top item='1_' name='常用操作' display='block'> - <m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' addalt='创建栏目' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' /> - <m:item name='所有档案列表' link='content_list.php' rank='a_List,a_AccList' target='main' /> - <m:item name='等审核的档案' link='content_list.php?arcrank=-1' rank='a_Check,a_AccCheck' target='main' /> - <m:item name='我发布的文档' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' /> - <m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' /> - <m:item name='文档回收站' link='recycling.php' ischannel='1' addalt='清空回收站' addico='images/gtk-del.png' linkadd='archives_do.php?dopost=clear&aid=no&recycle=1' rank='a_List,a_AccList,a_MyList' target='main' /> -</m:top> -<m:top item='1_' name='内容管理' display='block'> - $addset - <m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> -</m:top> -<m:top item='1_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> - <m:item name='上传新文件' link='media_add.php' rank='' target='main' /> - <m:item name='附件数据管理' link='media_main.php' rank='sys_Upload,sys_MyUpload' target='main' /> - <m:item name='文件式管理器' link='media_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> -</m:top> -$adminMenu1 -<m:top item='1_3_3' name='批量维护' display='block'> - <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> - <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> - <m:item name='搜索关键词维护' link='search_keywords_main.php' rank='sys_Keyword' target='main' /> - <m:item name='文档关键词维护' link='article_keywords_main.php' rank='sys_Keyword' target='main' /> - <m:item name='重复文档检测' link='article_test_same.php' rank='sys_ArcBatch' target='main' /> - <m:item name='自动摘要分页' link='article_description_main.php' rank='sys_Keyword' target='main' /> - <m:item name='Tag标签管理' link='tags_main.php' rank='sys_Keyword' target='main' /> - <m:item name='数据库内容替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' /> -</m:top> -<m:top item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> - <m:item name='一键更新网站' link='makehtml_all.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> -</m:top> -<m:top item='5_' name='更新网站' notshowall='1' display='none' rank='sys_MakeHtml'> - <m:item name='更新主页' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新栏目' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新文档' link='makehtml_archives.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新网站地图' link='makehtml_map_guide.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新订阅' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> - <m:item name='获取脚本' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新专题' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新Tag标签' link='makehtml_taglist.php' rank='sys_MakeHtml' target='main' /> -</m:top> -<m:top item='6_' name='会员管理' display='none' rank='member_List,member_Type'> - <m:item name='注册会员列表' link='member_main.php' rank='member_List' target='main' /> - <m:item name='会员级别设置' link='member_rank.php' rank='member_Type' target='main' /> - <m:item name='积分头衔设置' link='member_scores.php' rank='member_Type' target='main' /> - <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> -</m:top> -$adminMenu2 -<m:top item='1_10_7_' name='系统帮助' display='none'> - <m:item name='参考文档' link='$cfg_biz_helpUrl' rank='' target='_blank' /> - <m:item name='代码托管' link='$cfg_biz_gitUrl' rank='' target='_blank' /> - <m:item name='商业支持' link='$cfg_biz_dedebizUrl' rank='' target='_blank' /> +<?php +/** + * 后台管理菜单项 + * + * @version $Id: inc_menu.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__)."/../config.php"); +//载入可发布频道 +$addset = ''; +//检测可用的内容模型 +if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { + $admin_catalog = join(',', $admin_catalogs); + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); +} else { + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); +} +$dsql->Execute(); +$candoChannel = ''; +while ($row = $dsql->GetObject()) { + $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); +} +if (empty($candoChannel)) $candoChannel = 1; +$dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); +$dsql->Execute('mm'); +while ($row = $dsql->GetObject('mm')) { + $addset .= "<m:item name='{$row->typename}' ischannel='1' link='{$row->mancon}?channelid={$row->id}' linkadd='{$row->addcon}?channelid={$row->id}' channelid='{$row->id}' rank='' target='main' />\r\n"; +} +$helpUrl = DEDEBIZURL."/help"; +$gitUrl = DEDEBIZURL."/git"; +$dedebizUrl = DEDEBIZURL; +$adminMenu1 = $adminMenu2 = ''; +if ($cuserLogin->getUserType() >= 10) { + $adminMenu1 = "<m:top item='1_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'> + <m:item name='内容模型管理' link='mychannel_main.php' rank='c_List' target='main' /> + <m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> + <m:item name='联动类别管理' link='stepselect_main.php' rank='c_Stepseclect' target='main' /> + <m:item name='自由列表管理' link='freelist_main.php' rank='c_List' target='main' /> + <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> +</m:top>"; + $adminMenu2 = "<m:top item='7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> + <m:item name='默认模板管理' link='templets_main.php' rank='temp_All' target='main'/> + <m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> + <m:item name='自定义宏标记' link='mytag_main.php' rank='temp_MyTag' target='main'/> + <m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' target='main'/> + <m:item name='全局标记测试' link='tag_test.php' rank='temp_Test' target='main'/> +</m:top> +<m:top item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> + <m:item name='系统基本参数' link='sys_info.php' rank='sys_Edit' target='main' /> + <m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' /> + <m:item name='用户组设定' link='sys_group.php' rank='sys_Group' target='main' /> + <m:item name='系统日志管理' link='log_list.php' rank='sys_Log' target='main' /> + <m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' /> + <m:item name='自定义文档属性' link='content_att.php' rank='sys_Att' target='main' /> + <m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' target='main' /> + <m:item name='防采集串混淆' link='article_string_mix.php' rank='sys_StringMix' target='main' /> + <m:item name='随机模板设置' link='article_template_rand.php' rank='sys_StringMix' target='main' /> + <m:item name='数据备份还原' link='sys_data.php' rank='sys_Data' target='main' /> + <m:item name='SQL命令行工具' link='sys_sql_query.php' rank='sys_Data' target='main' /> + <m:item name='病毒文件扫描' link='sys_safetest.php' rank='sys_verify' target='main' /> + <m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> +</m:top> +<m:top item='10_6_' name='支付工具' display='none' rank='sys_Data'> + <m:item name='点卡产品分类' link='cards_type.php' rank='sys_Data' target='main' /> + <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> + <m:item name='会员产品分类' link='member_type.php' rank='sys_Data' target='main' /> + <m:item name='会员消费记录' link='member_operations.php' rank='sys_Data' target='main' /> + <m:item name='商店订单记录' link='shops_operations.php' rank='sys_Data' target='main' /> + <m:item name='支付接口设置' link='sys_payment.php' .php' rank='sys_Data' target='main' /> + <m:item name='配货方式设置' link='shops_delivery.php' rank='sys_Data' target='main' /> +</m:top>"; +} +$menusMain = "<m:top item='1_' name='常用操作' display='block'> + <m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' addalt='创建栏目' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' /> + <m:item name='所有档案列表' link='content_list.php' rank='a_List,a_AccList' target='main' /> + <m:item name='等审核的档案' link='content_list.php?arcrank=-1' rank='a_Check,a_AccCheck' target='main' /> + <m:item name='我发布的文档' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' /> + <m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' /> + <m:item name='文档回收站' link='recycling.php' ischannel='1' addalt='清空回收站' addico='images/gtk-del.png' linkadd='archives_do.php?dopost=clear&aid=no&recycle=1' rank='a_List,a_AccList,a_MyList' target='main' /> +</m:top> +<m:top item='1_' name='内容管理' display='block'> + $addset + <m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> +</m:top> +<m:top item='1_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> + <m:item name='上传新文件' link='media_add.php' rank='' target='main' /> + <m:item name='附件数据管理' link='media_main.php' rank='sys_Upload,sys_MyUpload' target='main' /> + <m:item name='文件式管理器' link='media_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> +</m:top> +$adminMenu1 +<m:top item='1_3_3' name='批量维护' display='block'> + <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> + <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> + <m:item name='搜索关键词维护' link='search_keywords_main.php' rank='sys_Keyword' target='main' /> + <m:item name='文档关键词维护' link='article_keywords_main.php' rank='sys_Keyword' target='main' /> + <m:item name='重复文档检测' link='article_test_same.php' rank='sys_ArcBatch' target='main' /> + <m:item name='自动摘要分页' link='article_description_main.php' rank='sys_Keyword' target='main' /> + <m:item name='Tag标签管理' link='tags_main.php' rank='sys_Keyword' target='main' /> + <m:item name='数据库内容替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' /> +</m:top> +<m:top item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> + <m:item name='一键更新网站' link='makehtml_all.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> +</m:top> +<m:top item='5_' name='更新网站' notshowall='1' display='none' rank='sys_MakeHtml'> + <m:item name='更新首页' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新栏目' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新文档' link='makehtml_archives.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新网站地图' link='makehtml_map_guide.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新订阅' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> + <m:item name='获取脚本' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新专题' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新标签' link='makehtml_taglist.php' rank='sys_MakeHtml' target='main' /> +</m:top> +<m:top item='6_' name='会员管理' display='none' rank='member_List,member_Type'> + <m:item name='注册会员列表' link='member_main.php' rank='member_List' target='main' /> + <m:item name='会员级别设置' link='member_rank.php' rank='member_Type' target='main' /> + <m:item name='积分头衔设置' link='member_scores.php' rank='member_Type' target='main' /> + <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> +</m:top> +$adminMenu2 +<m:top item='1_10_7_' name='系统帮助' display='none'> + <m:item name='参考文档' link='$cfg_biz_helpUrl' rank='' target='_blank' /> + <m:item name='代码托管' link='$cfg_biz_gitUrl' rank='' target='_blank' /> + <m:item name='商业支持' link='$cfg_biz_dedebizUrl' rank='' target='_blank' /> </m:top>"; \ No newline at end of file diff --git a/src/dede/inc/inc_menu_func.php b/src/admin/inc/inc_menu_func.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/inc/inc_menu_func.php rename to src/admin/inc/inc_menu_func.php index 581a95af..aaaf052d --- a/src/dede/inc/inc_menu_func.php +++ b/src/admin/inc/inc_menu_func.php @@ -1,93 +1,92 @@ -<?php - -/** - * 管理菜单函数 - * - * @version $Id: inc_menu_func.php 1 10:32 2010年7月21日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__)."/../config.php"); -require_once(DEDEINC."/dedetag.class.php"); - -$headTemplet = "<dl class='bitem' id='sunitems~cc~'><dt onClick='showHide(\"items~cc~\")'><b>~channelname~</b></dt> -<dd style='display:~display~' class='sitem' id='items~cc~'> -<ul class='sitemu'>\r\n"; - -$footTemplet = "</ul>\r\n</dd>\r\n</dl>\r\n"; - -$itemTemplet = "<li>~link~</li>\r\n"; - -function GetMenus($userrank, $topos = 'main') -{ - global $openitem, $headTemplet, $footTemplet, $itemTemplet; - if ($topos == 'main') { - $openitem = (empty($openitem) ? 1 : $openitem); - $menus = $GLOBALS['menusMain']; - } else if ($topos == 'module') { - $openitem = 100; - $menus = $GLOBALS['menusMoudle']; - } - $dtp = new DedeTagParse(); - $dtp->SetNameSpace('m', '<', '>'); - $dtp->LoadSource($menus); - $dtp2 = new DedeTagParse(); - $dtp2->SetNameSpace('m', '<', '>'); - $m = 0; - foreach ($dtp->CTags as $i => $ctag) { - if ($ctag->GetName() == 'top' && ($ctag->GetAtt('rank') == '' || TestPurview($ctag->GetAtt('rank')))) { - if ($openitem != 999 && !preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) && $openitem != 100) continue; - $m++; - echo "<!-- Item ".($m + 1)." Strat -->\r\n"; - $htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet); - if (empty($openitem) || $openitem == 100) { - if ($ctag->GetAtt('notshowall') == '1') continue; - $htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp); - } else { - if ($openitem == $ctag->GetAtt('item') || preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) || $openitem == '-1') - $htmp = str_replace('~display~', 'block', $htmp); - else - $htmp = str_replace('~display~', 'none', $htmp); - } - $htmp = str_replace('~cc~', $m.'_'.$openitem, $htmp); - echo $htmp; - $dtp2->LoadSource($ctag->InnerText); - foreach ($dtp2->CTags as $j => $ctag2) { - $ischannel = trim($ctag2->GetAtt('ischannel')); - if ($ctag2->GetName() == 'item' && ($ctag2->GetAtt('rank') == '' || TestPurview($ctag2->GetAtt('rank')))) { - $link = "<a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a>"; - if ($ischannel == '1') { - if ($ctag2->GetAtt('addalt') != '') { - $addalt = $ctag2->GetAtt('addalt'); - } else { - $addalt = '录入新内容'; - } - - if ($ctag2->GetAtt('addico') != '') { - $addico = $ctag2->GetAtt('addico'); - } else { - $addico = 'images/gtk-sadd.png'; - } - - //an add icos , small items use att ischannel='1' addico='ico' addalt='msg' linkadd='' - $link = " <div class='items'> - <div class='fllct'>$link</div>\r\n - <div class='flrct'> - <a href='".$ctag2->GetAtt('linkadd')."' target='".$ctag2->GetAtt('target')."'><img src='$addico' alt='$addalt' title='$addalt'/></a> - </div> - </div>\r\n"; - } else { - $link .= "\r\n"; - } - $itemtmp = str_replace('~link~', $link, $itemTemplet); - echo $itemtmp; - } - } - echo $footTemplet; - echo "<!-- Item ".($m + 1)." End -->\r\n"; - } - } -} +<?php +/** + * 管理菜单函数 + * + * @version $Id: inc_menu_func.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__)."/../config.php"); +require_once(DEDEINC."/dedetag.class.php"); + +$headTemplet = "<dl class='bitem' id='sunitems~cc~'><dt onClick='showHide(\"items~cc~\")'><b>~channelname~</b></dt> +<dd style='display:~display~' class='sitem' id='items~cc~'> +<ul class='sitemu'>\r\n"; + +$footTemplet = "</ul>\r\n</dd>\r\n</dl>\r\n"; + +$itemTemplet = "<li>~link~</li>\r\n"; + +function GetMenus($userrank, $topos = 'main') +{ + global $openitem, $headTemplet, $footTemplet, $itemTemplet; + if ($topos == 'main') { + $openitem = (empty($openitem) ? 1 : $openitem); + $menus = $GLOBALS['menusMain']; + } else if ($topos == 'module') { + $openitem = 100; + $menus = $GLOBALS['menusMoudle']; + } + $dtp = new DedeTagParse(); + $dtp->SetNameSpace('m', '<', '>'); + $dtp->LoadSource($menus); + $dtp2 = new DedeTagParse(); + $dtp2->SetNameSpace('m', '<', '>'); + $m = 0; + foreach ($dtp->CTags as $i => $ctag) { + if ($ctag->GetName() == 'top' && ($ctag->GetAtt('rank') == '' || TestPurview($ctag->GetAtt('rank')))) { + if ($openitem != 999 && !preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) && $openitem != 100) continue; + $m++; + echo "<!-- Item ".($m + 1)." Strat -->\r\n"; + $htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet); + if (empty($openitem) || $openitem == 100) { + if ($ctag->GetAtt('notshowall') == '1') continue; + $htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp); + } else { + if ($openitem == $ctag->GetAtt('item') || preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) || $openitem == '-1') + $htmp = str_replace('~display~', 'block', $htmp); + else + $htmp = str_replace('~display~', 'none', $htmp); + } + $htmp = str_replace('~cc~', $m.'_'.$openitem, $htmp); + echo $htmp; + $dtp2->LoadSource($ctag->InnerText); + foreach ($dtp2->CTags as $j => $ctag2) { + $ischannel = trim($ctag2->GetAtt('ischannel')); + if ($ctag2->GetName() == 'item' && ($ctag2->GetAtt('rank') == '' || TestPurview($ctag2->GetAtt('rank')))) { + $link = "<a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a>"; + if ($ischannel == '1') { + if ($ctag2->GetAtt('addalt') != '') { + $addalt = $ctag2->GetAtt('addalt'); + } else { + $addalt = '录入新内容'; + } + + if ($ctag2->GetAtt('addico') != '') { + $addico = $ctag2->GetAtt('addico'); + } else { + $addico = 'images/gtk-sadd.png'; + } + + //an add icos , small items use att ischannel='1' addico='ico' addalt='msg' linkadd='' + $link = " <div class='items'> + <div class='fllct'>$link</div>\r\n + <div class='flrct'> + <a href='".$ctag2->GetAtt('linkadd')."' target='".$ctag2->GetAtt('target')."'><img src='$addico' alt='$addalt' title='$addalt'/></a> + </div> + </div>\r\n"; + } else { + $link .= "\r\n"; + } + $itemtmp = str_replace('~link~', $link, $itemTemplet); + echo $itemtmp; + } + } + echo $footTemplet; + echo "<!-- Item ".($m + 1)." End -->\r\n"; + } + } +} //End Function \ No newline at end of file diff --git a/src/dede/inc/inc_menu_map.php b/src/admin/inc/inc_menu_map.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/inc/inc_menu_map.php rename to src/admin/inc/inc_menu_map.php index b3118d65..28dad79d --- a/src/dede/inc/inc_menu_map.php +++ b/src/admin/inc/inc_menu_map.php @@ -1,157 +1,157 @@ -<?php -/** - * 菜单地图 - * - * @version $Id: inc_menu_map.php 1 10:32 2010年7月21日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__)."/../config.php"); -$maparray = array(1 => '文档相关', 2 => '系统设置', 3 => '必须辅助功能', 4 => '网站更新操作', 5 => '会员相关', 6 => '基本模块插件'); -//载入可发布频道 -$addset = ''; -//检测可用的内容模型 -if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { - $admin_catalog = join(',', $admin_catalogs); - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); -} else { - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); -} -$dsql->Execute(); -$candoChannel = ''; -while ($row = $dsql->GetObject()) { - $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); -} -if (empty($candoChannel)) $candoChannel = 1; -$dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $addset .= "<m:item name='{$row->typename}' ischannel='1' link='{$row->mancon}?channelid={$row->id}' linkadd='{$row->addcon}?channelid={$row->id}' channelid='{$row->id}' rank='' target='main' />\r\n"; -} -$menusMain = "<m:top mapitem='1' item='1_' name='常用操作' display='block'> - <m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' addalt='创建栏目' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' /> - <m:item name='所有档案列表' link='content_list.php' rank='a_List,a_AccList' target='main' /> - <m:item name='等审核的档案' link='content_list.php?arcrank=-1' rank='a_Check,a_AccCheck' target='main' /> - <m:item name='我发布的文档' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' /> - <m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' /> - <m:item name='文档回收站' link='recycling.php' ischannel='1' addalt='清空回收站' addico='img/gtk-del.png' linkadd='archives_do.php?dopost=clear&aid=no' rank='a_List' target='main' /> -</m:top> -<m:top mapitem='1' item='1_' name='内容管理' display='block'> - $addset - <m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> -</m:top> -<m:top mapitem='1' item='1_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'> - <m:item name='内容模型管理' link='mychannel_main.php' rank='c_List' target='main' /> - <m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> - <m:item name='联动类别管理' link='stepselect_main.php' rank='c_Stepseclect' target='main' /> - <m:item name='自由列表管理' link='freelist_main.php' rank='c_List' target='main' /> - <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> -</m:top> -<m:top mapitem='3' item='1_3_3' name='批量维护' display='block'> - <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> - <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> - <m:item name='搜索关键词维护' link='search_keywords_main.php' rank='sys_Keyword' target='main' /> - <m:item name='文档关键词维护' link='article_keywords_main.php' rank='sys_Keyword' target='main' /> - <m:item name='自动摘要分页' link='article_description_main.php' rank='sys_Keyword' target='main' /> - <m:item name='Tag标签管理' link='tags_main.php' rank='sys_Keyword' target='main' /> - <m:item name='数据库内容替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' /> -</m:top> -<m:top mapitem='4' item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> - <m:item name='一键更新网站' link='makehtml_all.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> -</m:top> -<m:top mapitem='4' item='5_' name='更新网站' notshowall='1' display='none' rank='sys_MakeHtml'> - <m:item name='更新主页' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新栏目' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新文档' link='makehtml_archives.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新网站地图' link='makehtml_map_guide.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新订阅' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> - <m:item name='获取脚本' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新专题' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新Tag' link='makehtml_taglist.php' rank='sys_MakeHtml' target='main' /> -</m:top> -<m:top mapitem='3' item='1_6_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> - <m:item name='上传新文件' link='media_add.php' rank='' target='main' /> - <m:item name='附件数据管理' link='media_main.php' rank='sys_Upload,sys_MyUpload' target='main' /> - <m:item name='文件式管理器' link='media_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> -</m:top> -<m:top mapitem='5' item='6_' name='会员管理' display='none' rank='member_List,member_Type'> - <m:item name='注册会员列表' link='member_main.php' rank='member_List' target='main' /> - <m:item name='会员级别设置' link='member_rank.php' rank='member_Type' target='main' /> - <m:item name='积分头衔设置' link='member_scores.php' rank='member_Type' target='main' /> - <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> -</m:top> -<m:top mapitem='2' item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> - <m:item name='系统基本参数' link='sys_info.php' rank='sys_Edit' target='main' /> - <m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' /> - <m:item name='用户组设定' link='sys_group.php' rank='sys_Group' target='main' /> - <m:item name='系统日志管理' link='log_list.php' rank='sys_Log' target='main' /> - <m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' /> - <m:item name='自定义文档属性' link='content_att.php' rank='sys_Att' target='main' /> - <m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' target='main' /> - <m:item name='防采集串混淆' link='article_string_mix.php' rank='sys_StringMix' target='main' /> - <m:item name='随机模板设置' link='article_template_rand.php' rank='sys_StringMix' target='main' /> - <m:item name='数据库备份还原' link='sys_data.php' rank='sys_Data' target='main' /> - <m:item name='SQL命令行工具' link='sys_sql_query.php' rank='sys_Data' target='main' /> - <m:item name='病毒文件扫描' link='sys_safetest.php' rank='sys_verify' target='main' /> - <m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> -</m:top> -<m:top mapitem='5' item='10_6_' name='支付工具' display='none' rank='sys_Data'> - <m:item name='点卡产品分类' link='cards_type.php' rank='sys_Data' target='main' /> - <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> - <m:item name='会员产品分类' link='member_type.php' rank='sys_Data' target='main' /> - <m:item name='会员消费记录' link='member_operations.php' rank='sys_Data' target='main' /> - <m:item name='商店订单记录' link='shops_operations.php' rank='sys_Data' target='main' /> - <m:item name='支付接口设置' link='sys_payment.php' .php' rank='sys_Data' target='main' /> - <m:item name='配货方式设置' link='shops_delivery.php' rank='sys_Data' target='main' /> -</m:top> -<m:top mapitem='2' item='10_7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> - <m:item name='默认模板管理' link='templets_main.php' rank='temp_All' target='main'/> - <m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> - <m:item name='自定义宏标记' link='mytag_main.php' rank='temp_MyTag' target='main'/> - <m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' target='main'/> - <m:item name='全局标记测试' link='tag_test.php' rank='temp_Test' target='main'/> -</m:top>"; -//载入插件菜单 -$plusset = ''; -$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $plusset .= $row->menustring."\r\n"; -} -$menusMain .= " -<m:top mapitem='6' name='模块管理' c='6,' display='block'> - <m:item name='模块管理' link='module_main.php' rank='sys_module' target='main' /> - <m:item name='上传新模块' link='module_upload.php' rank='sys_module' target='main' /> - <m:item name='模块打包' link='module_make.php' rank='sys_module' target='main' /> -</m:top> -<m:top mapitem='6' item='7' name='辅助插件' display='block'> - <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> - $plusset -</m:top>"; -$mapstring = ''; -$dtp = new DedeTagparse(); -$dtp->SetNameSpace('m', '<', '>'); -$dtp->LoadString($menusMain); -foreach ($maparray as $k => $bigname) { - $mapstring .= "<dl class='maptop'>\r\n"; - $mapstring .= "<dt class='bigitem'>$bigname</dt>\r\n"; - $mapstring .= "<dd>\r\n"; - foreach ($dtp->CTags as $ctag) { - if ($ctag->GetAtt('mapitem') == $k) { - $mapstring .= "<dl class='mapitem'>\r\n"; - $mapstring .= "<dt>".$ctag->GetAtt('name')."</dt>\r\n"; - $mapstring .= "<dd>\r\n<ul class='item'>\r\n"; - $dtp2 = new DedeTagParse(); - $dtp2->SetNameSpace('m', '<', '>'); - $dtp2->LoadSource($ctag->InnerText); - foreach ($dtp2->CTags as $j => $ctag2) { - $mapstring .= "<li><a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a></li>\r\n"; - } - $mapstring .= "</ul>\r\n</dd>\r\n</dl>\r\n"; - } - } - $mapstring .= "</dd>\r\n</dl>\r\n"; +<?php +/** + * 菜单地图 + * + * @version $Id: inc_menu_map.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__)."/../config.php"); +$maparray = array(1 => '文档相关', 2 => '系统设置', 3 => '必须辅助功能', 4 => '网站更新操作', 5 => '会员相关', 6 => '基本模块插件'); +//载入可发布频道 +$addset = ''; +//检测可用的内容模型 +if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { + $admin_catalog = join(',', $admin_catalogs); + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); +} else { + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); +} +$dsql->Execute(); +$candoChannel = ''; +while ($row = $dsql->GetObject()) { + $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); +} +if (empty($candoChannel)) $candoChannel = 1; +$dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $addset .= "<m:item name='{$row->typename}' ischannel='1' link='{$row->mancon}?channelid={$row->id}' linkadd='{$row->addcon}?channelid={$row->id}' channelid='{$row->id}' rank='' target='main' />\r\n"; +} +$menusMain = "<m:top mapitem='1' item='1_' name='常用操作' display='block'> + <m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' addalt='创建栏目' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' /> + <m:item name='所有档案列表' link='content_list.php' rank='a_List,a_AccList' target='main' /> + <m:item name='等审核的档案' link='content_list.php?arcrank=-1' rank='a_Check,a_AccCheck' target='main' /> + <m:item name='我发布的文档' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' /> + <m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' /> + <m:item name='文档回收站' link='recycling.php' ischannel='1' addalt='清空回收站' addico='img/gtk-del.png' linkadd='archives_do.php?dopost=clear&aid=no' rank='a_List' target='main' /> +</m:top> +<m:top mapitem='1' item='1_' name='内容管理' display='block'> + $addset + <m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> +</m:top> +<m:top mapitem='1' item='1_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'> + <m:item name='内容模型管理' link='mychannel_main.php' rank='c_List' target='main' /> + <m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> + <m:item name='联动类别管理' link='stepselect_main.php' rank='c_Stepseclect' target='main' /> + <m:item name='自由列表管理' link='freelist_main.php' rank='c_List' target='main' /> + <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> +</m:top> +<m:top mapitem='3' item='1_3_3' name='批量维护' display='block'> + <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> + <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> + <m:item name='搜索关键词维护' link='search_keywords_main.php' rank='sys_Keyword' target='main' /> + <m:item name='文档关键词维护' link='article_keywords_main.php' rank='sys_Keyword' target='main' /> + <m:item name='自动摘要分页' link='article_description_main.php' rank='sys_Keyword' target='main' /> + <m:item name='Tag标签管理' link='tags_main.php' rank='sys_Keyword' target='main' /> + <m:item name='数据库内容替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' /> +</m:top> +<m:top mapitem='4' item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> + <m:item name='一键更新网站' link='makehtml_all.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> +</m:top> +<m:top mapitem='4' item='5_' name='更新网站' notshowall='1' display='none' rank='sys_MakeHtml'> + <m:item name='更新首页' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新栏目' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新文档' link='makehtml_archives.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新网站地图' link='makehtml_map_guide.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新订阅' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> + <m:item name='获取脚本' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新专题' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新标签' link='makehtml_taglist.php' rank='sys_MakeHtml' target='main' /> +</m:top> +<m:top mapitem='3' item='1_6_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> + <m:item name='上传新文件' link='media_add.php' rank='' target='main' /> + <m:item name='附件数据管理' link='media_main.php' rank='sys_Upload,sys_MyUpload' target='main' /> + <m:item name='文件式管理器' link='media_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> +</m:top> +<m:top mapitem='5' item='6_' name='会员管理' display='none' rank='member_List,member_Type'> + <m:item name='注册会员列表' link='member_main.php' rank='member_List' target='main' /> + <m:item name='会员级别设置' link='member_rank.php' rank='member_Type' target='main' /> + <m:item name='积分头衔设置' link='member_scores.php' rank='member_Type' target='main' /> + <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> +</m:top> +<m:top mapitem='2' item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> + <m:item name='系统基本参数' link='sys_info.php' rank='sys_Edit' target='main' /> + <m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' /> + <m:item name='用户组设定' link='sys_group.php' rank='sys_Group' target='main' /> + <m:item name='系统日志管理' link='log_list.php' rank='sys_Log' target='main' /> + <m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' /> + <m:item name='自定义文档属性' link='content_att.php' rank='sys_Att' target='main' /> + <m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' target='main' /> + <m:item name='防采集串混淆' link='article_string_mix.php' rank='sys_StringMix' target='main' /> + <m:item name='随机模板设置' link='article_template_rand.php' rank='sys_StringMix' target='main' /> + <m:item name='数据库备份还原' link='sys_data.php' rank='sys_Data' target='main' /> + <m:item name='SQL命令行工具' link='sys_sql_query.php' rank='sys_Data' target='main' /> + <m:item name='病毒文件扫描' link='sys_safetest.php' rank='sys_verify' target='main' /> + <m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> +</m:top> +<m:top mapitem='5' item='10_6_' name='支付工具' display='none' rank='sys_Data'> + <m:item name='点卡产品分类' link='cards_type.php' rank='sys_Data' target='main' /> + <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> + <m:item name='会员产品分类' link='member_type.php' rank='sys_Data' target='main' /> + <m:item name='会员消费记录' link='member_operations.php' rank='sys_Data' target='main' /> + <m:item name='商店订单记录' link='shops_operations.php' rank='sys_Data' target='main' /> + <m:item name='支付接口设置' link='sys_payment.php' .php' rank='sys_Data' target='main' /> + <m:item name='配货方式设置' link='shops_delivery.php' rank='sys_Data' target='main' /> +</m:top> +<m:top mapitem='2' item='10_7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> + <m:item name='默认模板管理' link='templets_main.php' rank='temp_All' target='main'/> + <m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> + <m:item name='自定义宏标记' link='mytag_main.php' rank='temp_MyTag' target='main'/> + <m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' target='main'/> + <m:item name='全局标记测试' link='tag_test.php' rank='temp_Test' target='main'/> +</m:top>"; +//载入插件菜单 +$plusset = ''; +$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $plusset .= $row->menustring."\r\n"; +} +$menusMain .= " +<m:top mapitem='6' name='模块管理' c='6,' display='block'> + <m:item name='模块管理' link='module_main.php' rank='sys_module' target='main' /> + <m:item name='上传新模块' link='module_upload.php' rank='sys_module' target='main' /> + <m:item name='模块打包' link='module_make.php' rank='sys_module' target='main' /> +</m:top> +<m:top mapitem='6' item='7' name='辅助插件' display='block'> + <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> + $plusset +</m:top>"; +$mapstring = ''; +$dtp = new DedeTagparse(); +$dtp->SetNameSpace('m', '<', '>'); +$dtp->LoadString($menusMain); +foreach ($maparray as $k => $bigname) { + $mapstring .= "<dl class='maptop'>\r\n"; + $mapstring .= "<dt class='bigitem'>$bigname</dt>\r\n"; + $mapstring .= "<dd>\r\n"; + foreach ($dtp->CTags as $ctag) { + if ($ctag->GetAtt('mapitem') == $k) { + $mapstring .= "<dl class='mapitem'>\r\n"; + $mapstring .= "<dt>".$ctag->GetAtt('name')."</dt>\r\n"; + $mapstring .= "<dd>\r\n<ul class='item'>\r\n"; + $dtp2 = new DedeTagParse(); + $dtp2->SetNameSpace('m', '<', '>'); + $dtp2->LoadSource($ctag->InnerText); + foreach ($dtp2->CTags as $j => $ctag2) { + $mapstring .= "<li><a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a></li>\r\n"; + } + $mapstring .= "</ul>\r\n</dd>\r\n</dl>\r\n"; + } + } + $mapstring .= "</dd>\r\n</dl>\r\n"; } \ No newline at end of file diff --git a/src/dede/inc/inc_menu_module.php b/src/admin/inc/inc_menu_module.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/inc/inc_menu_module.php rename to src/admin/inc/inc_menu_module.php index 7fdc720c..c8501826 --- a/src/dede/inc/inc_menu_module.php +++ b/src/admin/inc/inc_menu_module.php @@ -1,51 +1,51 @@ -<?php -/** - * 模块菜单 - * - * @version $Id: inc_menu_module.php 1 10:32 2010年7月21日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__)."/../config.php"); -/* -模块菜单一般在不要直接改此文件,直接保存在#@__sys_module表即可,格式为 -<m:top name='问答模块管理' c='6,' display='block' rank=''> -<m:item name='问答栏目管理' link='ask_type.php' rank='' target='main' /> -<m:item name='问答问题管理' link='ask_admin.php' rank='' target='main' /> -<m:item name='问答答案管理' link='ask_answer.php' rank='' target='main' /> -</m:top> -这个菜单可在生成模块时指定 -*/ -//载入模块菜单 -$moduleset = ''; -$dsql->SetQuery("SELECT * FROM `#@__sys_module` ORDER BY id DESC"); -$dsql->Execute('mm'); -while ($row = $dsql->GetObject('mm')) { - $moduleset .= $row->menustring."\r\n"; -} -//载入插件菜单 -$plusset = ''; -$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $row->menustring = str_replace('plus_友情链接', 'plus_友情链接模块', $row->menustring); - $plusset .= $row->menustring."\r\n"; -} -$adminMenu = ''; -if ($cuserLogin->getUserType() >= 10) { - $adminMenu = "<m:top name='模块管理' c='6,' display='block'> - <m:item name='模块管理' link='module_main.php' rank='sys_module' target='main' /> - <m:item name='上传新模块' link='module_upload.php' rank='sys_module' target='main' /> - <m:item name='模块打包' link='module_make.php' rank='sys_module' target='main' /> - </m:top>"; -} -$menusMoudle = " -$adminMenu -<m:top item='7' name='辅助插件' display='block'> - <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> - $plusset -</m:top> -$moduleset +<?php +/** + * 模块菜单 + * + * @version $Id: inc_menu_module.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__)."/../config.php"); +/* +模块菜单一般在不要直接改此文件,直接保存在#@__sys_module表即可,格式为 +<m:top name='问答模块管理' c='6,' display='block' rank=''> +<m:item name='问答栏目管理' link='ask_type.php' rank='' target='main' /> +<m:item name='问答问题管理' link='ask_admin.php' rank='' target='main' /> +<m:item name='问答答案管理' link='ask_answer.php' rank='' target='main' /> +</m:top> +这个菜单可在生成模块时指定 +*/ +//载入模块菜单 +$moduleset = ''; +$dsql->SetQuery("SELECT * FROM `#@__sys_module` ORDER BY id DESC"); +$dsql->Execute('mm'); +while ($row = $dsql->GetObject('mm')) { + $moduleset .= $row->menustring."\r\n"; +} +//载入插件菜单 +$plusset = ''; +$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $row->menustring = str_replace('plus_友情链接', 'plus_友情链接模块', $row->menustring); + $plusset .= $row->menustring."\r\n"; +} +$adminMenu = ''; +if ($cuserLogin->getUserType() >= 10) { + $adminMenu = "<m:top name='模块管理' c='6,' display='block'> + <m:item name='模块管理' link='module_main.php' rank='sys_module' target='main' /> + <m:item name='上传新模块' link='module_upload.php' rank='sys_module' target='main' /> + <m:item name='模块打包' link='module_make.php' rank='sys_module' target='main' /> + </m:top>"; +} +$menusMoudle = " +$adminMenu +<m:top item='7' name='辅助插件' display='block'> + <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> + $plusset +</m:top> +$moduleset "; \ No newline at end of file diff --git a/src/dede/index.php b/src/admin/index.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/index.php rename to src/admin/index.php index 4f50b951..72e36b2a --- a/src/dede/index.php +++ b/src/admin/index.php @@ -1,30 +1,24 @@ -<?php - -/** - * 管理后台首页 - * - * @version $Id: index.php 1 11:06 2010年7月13日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { - if ($_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME'])) { - header('HTTP/1.1 301 Moved Permanently'); - header('Location:'.$_SERVER['REQUEST_URI'].'/'); - } -} - - -require_once(dirname(__FILE__)."/config.php"); -require_once(DEDEINC.'/dedetag.class.php'); -$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; -$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; - -if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; - -require(DEDEADMIN.'/inc/inc_menu_map.php'); -include(DEDEADMIN.'/templets/index2.htm'); -exit(); +<?php +/** + * 管理后台首页 + * + * @version $Id: index.php 1 11:06 2010年7月13日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { + if ($_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME'])) { + header('HTTP/1.1 301 Moved Permanently'); + header('Location:'.$_SERVER['REQUEST_URI'].'/'); + } +} +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC.'/dedetag.class.php'); +$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; +$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; +if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; +require(DEDEADMIN.'/inc/inc_menu_map.php'); +include(DEDEADMIN.'/templets/index2.htm'); +exit(); \ No newline at end of file diff --git a/src/dede/index_body.php b/src/admin/index_body.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/index_body.php rename to src/admin/index_body.php index 23e96af4..723b8386 --- a/src/dede/index_body.php +++ b/src/admin/index_body.php @@ -1,254 +1,254 @@ -<?php -/** - * 管理后台首页主体 - * - * @version $Id: index_body.php 1 11:06 2010年7月13日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require(dirname(__FILE__).'/config.php'); -require(DEDEINC.'/image.func.php'); -require(DEDEINC.'/dedetag.class.php'); -$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; -$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; -if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; -//默认主页 -if (empty($dopost)) { - require(DEDEINC.'/inc/inc_fun_funAdmin.php'); - $verLockFile = DEDEDATA.'/admin/ver.txt'; - $fp = fopen($verLockFile, 'r'); - $upTime = trim(fread($fp, 64)); - fclose($fp); - $oktime = substr($upTime, 0, 4).'-'.substr($upTime, 4, 2).'-'.substr($upTime, 6, 2); - $offUrl = SpGetNewInfo(); - $dedecmsidc = DEDEDATA.'/admin/idc.txt'; - $fp = fopen($dedecmsidc, 'r'); - $dedeIDC = fread($fp, filesize($dedecmsidc)); - fclose($fp); - include DedeInclude('templets/index_body.htm'); - exit(); -} -/*----------------------- -增加新项 -function _AddNew() { } --------------------------*/ -else if ($dopost == 'addnew') { - if (empty($link) || empty($title)) { - ShowMsg("链接网址或标题不能为空", "-1"); - exit(); - } - $fp = fopen($myIcoFile, 'r'); - $oldct = trim(fread($fp, filesize($myIcoFile))); - fclose($fp); - $link = preg_replace("#['\"]#", '`', $link); - $title = preg_replace("#['\"]#", '`', $title); - $ico = preg_replace("#['\"]#", '`', $ico); - $oldct .= "\r\n<menu:item ico=\"{$ico}\" link=\"{$link}\" title=\"{$title}\">"; - $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; - $fp = fopen($myIcoFileTrue, 'w'); - fwrite($fp, $oldct); - fclose($fp); - ShowMsg("成功增加一个项目", "index_body.php?".time()); - exit(); -} -/*--------------------------- -保存修改的项 -function _EditSave() { } -----------------------------*/ -else if ($dopost == 'editsave') { - $quickmenu = stripslashes($quickmenu); - $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; - $fp = fopen($myIcoFileTrue, 'w'); - fwrite($fp, $quickmenu); - fclose($fp); - ShowMsg("成功修改快捷操作项目", "index_body.php?".time()); - exit(); -} -/*--------------------------- -保存修改的项 -function _EditSave() { } -----------------------------*/ -else if ($dopost == 'movesave') { - $movedata = str_replace('\\', "", $sortorder); - $movedata = json_decode($movedata, TRUE); - $movedata = serialize($movedata); - $myIcoFileTrue = DEDEDATA.'/admin/move-'.$cuserLogin->getUserID().'.txt'; - $fp = fopen($myIcoFileTrue, 'w'); - fwrite($fp, $movedata); - fclose($fp); -} -/*----------------------------- -显示修改表单 -function _EditShow() { } ------------------------------*/ -else if ($dopost == 'editshow') { - $fp = fopen($myIcoFile, 'r'); - $oldct = trim(fread($fp, filesize($myIcoFile))); - fclose($fp); -?> - <form name='editform' action='index_body.php' method='post'> - <input type='hidden' name='dopost' value='editsave'> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td height='26' background="images/tbg.gif"> - <div style='float:left'><b>修改快捷操作项</b></div> - <div style='float:right;padding:3px 10px 0 0;'> - <a href="javascript:CloseTab('editTab')"><img src="images/close.gif" width="12" height="12" border="0"></a> - </div> - </td> - </tr> - <tr> - <td style="height:6px;font-size:1px;border-top:1px solid #8DA659"> </td> - </tr> - <tr> - <td>按原格式修改/增加XML项。</td> - </tr> - <tr> - <td align='center'><textarea name="quickmenu" rows="10" cols="50" style="width:94%;height:220px"><?php echo $oldct; ?></textarea></td> - </tr> - <tr> - <td height="46" align="center"> - <input type="submit" name="Submit" value="保存项目" class="np coolbg" style="width:80px;cursor:pointer">  - <input type="reset" name="reset" value="重设" class="np coolbg" style="width:50px;cursor:pointer"> - </td> - </tr> - </table> - </form> -<?php -exit(); -} -/*--------------------------------- -载入右边内容 -function _getRightSide() { } ----------------------------------*/ -else if ($dopost == 'getRightSide') { - $query = " SELECT COUNT(*) AS dd FROM `#@__member` "; - $row1 = $dsql->GetOne($query); - $query = " SELECT COUNT(*) AS dd FROM `#@__feedback` "; - $row2 = $dsql->GetOne($query); - $chArrNames = array(); - $query = "SELECT id, typename FROM `#@__channeltype` "; - $dsql->Execute('c', $query); - while ($row = $dsql->GetArray('c')) { - $chArrNames[$row['id']] = $row['typename']; - } - $query = "SELECT COUNT(channel) AS dd, channel FROM `#@__arctiny` GROUP BY channel "; - $allArc = 0; - $chArr = array(); - $dsql->Execute('a', $query); - while ($row = $dsql->GetArray('a')) { - $allArc += $row['dd']; - $row['typename'] = $chArrNames[$row['channel']]; - $chArr[] = $row; - } -?> - <table width="100%" class="table table-borderless"> - <tr> - <td width='50%' class='nline' style="text-align:left"> 会员数: </td> - <td class='nline' style="text-align:left"> <?php echo $row1['dd']; ?> </td> - </tr> - <tr> - <td class='nline' style="text-align:left"> 文档数: </td> - <td class='nline' style="text-align:left"> <?php echo $allArc; ?> </td> - </tr> - <?php - foreach ($chArr as $row) { - ?> - <tr> - <td class='nline' style="text-align:left"> <?php echo $row['typename']; ?>: </td> - <td class='nline' style="text-align:left"> <?php echo $row['dd']; ?>  </td> - </tr> - <?php - } - ?> - <tr> - <td style="text-align:left"> 评论数: </td> - <td style="text-align:left"> <?php echo $row2['dd']; ?> </td> - </tr> - </table> -<?php -exit(); -} else if ($dopost == 'getRightSideNews') { - $query = "SELECT arc.id, arc.arcrank, arc.title, arc.channel, ch.editcon FROM `#@__archives` arc - LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel - WHERE arc.arcrank<>-2 ORDER BY arc.id DESC LIMIT 0, 6 "; - $arcArr = array(); - $dsql->Execute('m', $query); - while ($row = $dsql->GetArray('m')) { - $arcArr[] = $row; - } - AjaxHead(); -?> - <table width="100%" class="table table-borderless"> - <?php - foreach ($arcArr as $row) { - if (trim($row['editcon']) == '') { - $row['editcon'] = 'archives_edit.php'; - } - $linkstr = "·<a href='{$row['editcon']}?aid={$row['id']}&channelid={$row['channel']}'>{$row['title']}</a>"; - if ($row['arcrank'] == -1) $linkstr .= "<font color='red'>(未审核)</font>"; - ?> - <tr> - <td class='nline'><?php echo $linkstr; ?></td> - </tr> - <?php - } - ?> - </table> -<?php -exit; -} else if ($dopost == 'setskin') { - $cskin = empty($cskin) ? 1 : $cskin; - $skin = !in_array($cskin, array(1, 2, 3, 4)) ? 1 : $cskin; - $skinconfig = DEDEDATA.'/admin/skin.txt'; - PutFile($skinconfig, $skin); -} elseif ($dopost == 'get_seo') { - //直接采用DedeBIZ重写方法 - exit; -} elseif ($dopost == "system_info") { - if (!extension_loaded("openssl")) { - echo json_encode(array( - "code" => -1001, - "msg" => "PHP不支持OpenSSL,无法完成商业版授权", - "result" => null, - )); - exit; - } - if (empty($cfg_auth_code)) { - echo json_encode(array( - "code" => -1002, - "msg" => "当前站点尚未购买商业版授权", - "result" => null, - )); - exit; - } - openssl_public_decrypt(base64_decode($cfg_auth_code), $decotent, DEDEPUB); - $core_info = new stdClass; - if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { - $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); - $client->appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $core_info = $client->SystemInfo(); - $client->Close(); - } - if (!empty($decotent)) { - $res = json_decode($decotent); - if (isset($res->sid)) { - echo json_encode(array( - "code" => 200, - "msg" => "", - "result" => array( - "domain" => $res->domain, - "title" => $res->title, - "stype" => $res->stype == 1 ? "企业单位" : "个人", - "auth_version" => $res->auth_version, - "auth_at" => date("Y-m-d", $res->auth_at), - "core" => $core_info, - ), - )); - } - } -} +<?php +/** + * 管理后台首页主体 + * + * @version $Id: index_body.php 1 11:06 2010年7月13日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require(dirname(__FILE__).'/config.php'); +require(DEDEINC.'/image.func.php'); +require(DEDEINC.'/dedetag.class.php'); +$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; +$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; +if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; +//默认主页 +if (empty($dopost)) { + require(DEDEINC.'/inc/inc_fun_funAdmin.php'); + $verLockFile = DEDEDATA.'/admin/ver.txt'; + $fp = fopen($verLockFile, 'r'); + $upTime = trim(fread($fp, 64)); + fclose($fp); + $oktime = substr($upTime, 0, 4).'-'.substr($upTime, 4, 2).'-'.substr($upTime, 6, 2); + $offUrl = SpGetNewInfo(); + $dedecmsidc = DEDEDATA.'/admin/idc.txt'; + $fp = fopen($dedecmsidc, 'r'); + $dedeIDC = fread($fp, filesize($dedecmsidc)); + fclose($fp); + include DedeInclude('templets/index_body.htm'); + exit(); +} +/*----------------------- +增加新项 +function _AddNew() { } +-------------------------*/ +else if ($dopost == 'addnew') { + if (empty($link) || empty($title)) { + ShowMsg("链接网址或标题不能为空", "-1"); + exit(); + } + $fp = fopen($myIcoFile, 'r'); + $oldct = trim(fread($fp, filesize($myIcoFile))); + fclose($fp); + $link = preg_replace("#['\"]#", '`', $link); + $title = preg_replace("#['\"]#", '`', $title); + $ico = preg_replace("#['\"]#", '`', $ico); + $oldct .= "\r\n<menu:item ico=\"{$ico}\" link=\"{$link}\" title=\"{$title}\">"; + $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; + $fp = fopen($myIcoFileTrue, 'w'); + fwrite($fp, $oldct); + fclose($fp); + ShowMsg("成功增加一个项目", "index_body.php?".time()); + exit(); +} +/*--------------------------- +保存修改的项 +function _EditSave() { } +----------------------------*/ +else if ($dopost == 'editsave') { + $quickmenu = stripslashes($quickmenu); + $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; + $fp = fopen($myIcoFileTrue, 'w'); + fwrite($fp, $quickmenu); + fclose($fp); + ShowMsg("成功修改快捷操作项目", "index_body.php?".time()); + exit(); +} +/*--------------------------- +保存修改的项 +function _EditSave() { } +----------------------------*/ +else if ($dopost == 'movesave') { + $movedata = str_replace('\\', "", $sortorder); + $movedata = json_decode($movedata, TRUE); + $movedata = serialize($movedata); + $myIcoFileTrue = DEDEDATA.'/admin/move-'.$cuserLogin->getUserID().'.txt'; + $fp = fopen($myIcoFileTrue, 'w'); + fwrite($fp, $movedata); + fclose($fp); +} +/*----------------------------- +显示修改表单 +function _EditShow() { } +-----------------------------*/ +else if ($dopost == 'editshow') { + $fp = fopen($myIcoFile, 'r'); + $oldct = trim(fread($fp, filesize($myIcoFile))); + fclose($fp); +?> + <form name='editform' action='index_body.php' method='post'> + <input type='hidden' name='dopost' value='editsave'> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td height='26' background="images/tbg.gif"> + <div style='float:left'><b>修改快捷操作项</b></div> + <div style='float:right;padding:3px 10px 0 0;'> + <a href="javascript:CloseTab('editTab')"><img src="images/close.gif" width="12" height="12" border="0"></a> + </div> + </td> + </tr> + <tr> + <td style="height:6px;font-size:1px;border-top:1px solid #8DA659"> </td> + </tr> + <tr> + <td>按原格式修改/增加XML项。</td> + </tr> + <tr> + <td align='center'><textarea name="quickmenu" rows="10" cols="50" style="width:94%;height:220px"><?php echo $oldct; ?></textarea></td> + </tr> + <tr> + <td height="36" align="center"> + <input type="submit" name="Submit" value="保存项目" class="np coolbg" style="width:80px;cursor:pointer">  + <input type="reset" name="reset" value="重设" class="np coolbg" style="width:50px;cursor:pointer"> + </td> + </tr> + </table> + </form> +<?php +exit(); +} +/*--------------------------------- +载入右边内容 +function _getRightSide() { } +---------------------------------*/ +else if ($dopost == 'getRightSide') { + $query = " SELECT COUNT(*) AS dd FROM `#@__member` "; + $row1 = $dsql->GetOne($query); + $query = " SELECT COUNT(*) AS dd FROM `#@__feedback` "; + $row2 = $dsql->GetOne($query); + $chArrNames = array(); + $query = "SELECT id, typename FROM `#@__channeltype` "; + $dsql->Execute('c', $query); + while ($row = $dsql->GetArray('c')) { + $chArrNames[$row['id']] = $row['typename']; + } + $query = "SELECT COUNT(channel) AS dd, channel FROM `#@__arctiny` GROUP BY channel "; + $allArc = 0; + $chArr = array(); + $dsql->Execute('a', $query); + while ($row = $dsql->GetArray('a')) { + $allArc += $row['dd']; + $row['typename'] = $chArrNames[$row['channel']]; + $chArr[] = $row; + } +?> + <table width="100%" class="table table-borderless"> + <tr> + <td width='50%' class='nline' style="text-align:left"> 会员数: </td> + <td class='nline' style="text-align:left"> <?php echo $row1['dd']; ?> </td> + </tr> + <tr> + <td class='nline' style="text-align:left"> 文档数: </td> + <td class='nline' style="text-align:left"> <?php echo $allArc; ?> </td> + </tr> + <?php + foreach ($chArr as $row) { + ?> + <tr> + <td class='nline' style="text-align:left"> <?php echo $row['typename']; ?>: </td> + <td class='nline' style="text-align:left"> <?php echo $row['dd']; ?>  </td> + </tr> + <?php + } + ?> + <tr> + <td style="text-align:left"> 评论数: </td> + <td style="text-align:left"> <?php echo $row2['dd']; ?> </td> + </tr> + </table> +<?php +exit(); +} else if ($dopost == 'getRightSideNews') { + $query = "SELECT arc.id, arc.arcrank, arc.title, arc.channel, ch.editcon FROM `#@__archives` arc + LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel + WHERE arc.arcrank<>-2 ORDER BY arc.id DESC LIMIT 0, 6 "; + $arcArr = array(); + $dsql->Execute('m', $query); + while ($row = $dsql->GetArray('m')) { + $arcArr[] = $row; + } + AjaxHead(); +?> + <table width="100%" class="table table-borderless"> + <?php + foreach ($arcArr as $row) { + if (trim($row['editcon']) == '') { + $row['editcon'] = 'archives_edit.php'; + } + $linkstr = "·<a href='{$row['editcon']}?aid={$row['id']}&channelid={$row['channel']}'>{$row['title']}</a>"; + if ($row['arcrank'] == -1) $linkstr .= "<span style='color:#e74d58'>(未审核)</span>"; + ?> + <tr> + <td class='nline'><?php echo $linkstr; ?></td> + </tr> + <?php + } + ?> + </table> +<?php +exit; +} else if ($dopost == 'setskin') { + $cskin = empty($cskin) ? 1 : $cskin; + $skin = !in_array($cskin, array(1, 2, 3, 4)) ? 1 : $cskin; + $skinconfig = DEDEDATA.'/admin/skin.txt'; + PutFile($skinconfig, $skin); +} elseif ($dopost == 'get_seo') { + //直接采用DedeBIZ重写方法 + exit; +} elseif ($dopost == "system_info") { + if (!extension_loaded("openssl")) { + echo json_encode(array( + "code" => -1001, + "msg" => "PHP不支持OpenSSL,无法完成商业版授权", + "result" => null, + )); + exit; + } + if (empty($cfg_auth_code)) { + echo json_encode(array( + "code" => -1002, + "msg" => "当前站点尚未购买商业版授权", + "result" => null, + )); + exit; + } + openssl_public_decrypt(base64_decode($cfg_auth_code), $decotent, DEDEPUB); + $core_info = new stdClass; + if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { + $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); + $client->appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $core_info = $client->SystemInfo(); + $client->Close(); + } + if (!empty($decotent)) { + $res = json_decode($decotent); + if (isset($res->sid)) { + echo json_encode(array( + "code" => 200, + "msg" => "", + "result" => array( + "domain" => $res->domain, + "title" => $res->title, + "stype" => $res->stype == 1 ? "企业单位" : "个人", + "auth_version" => $res->auth_version, + "auth_at" => date("Y-m-d", $res->auth_at), + "core" => $core_info, + ), + )); + } + } +} ?> \ No newline at end of file diff --git a/src/dede/index_menu.php b/src/admin/index_menu.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/index_menu.php rename to src/admin/index_menu.php index 01e839a8..6cf3d008 --- a/src/dede/index_menu.php +++ b/src/admin/index_menu.php @@ -1,16 +1,15 @@ -<?php - -/** - * 菜单项 - * - * @version $Id: index_menu.php 1 11:06 2010年7月13日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require(dirname(__FILE__).'/config.php'); -require(DEDEADMIN.'/inc/inc_menu.php'); -require(DEDEADMIN.'/inc/inc_menu_func.php'); -$openitem = (empty($openitem) ? 1 : $openitem); -include DedeInclude('templets/index_menu2.htm'); +<?php +/** + * 菜单项 + * + * @version $Id: index_menu.php 1 11:06 2010年7月13日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require(dirname(__FILE__).'/config.php'); +require(DEDEADMIN.'/inc/inc_menu.php'); +require(DEDEADMIN.'/inc/inc_menu_func.php'); +$openitem = (empty($openitem) ? 1 : $openitem); +include DedeInclude('templets/index_menu2.htm'); diff --git a/src/dede/index_menu_load.php b/src/admin/index_menu_load.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/index_menu_load.php rename to src/admin/index_menu_load.php index b504de27..ee98a49b --- a/src/dede/index_menu_load.php +++ b/src/admin/index_menu_load.php @@ -1,25 +1,24 @@ -<?php - -/** - * 载入菜单 - * - * @version $Id: index_menu_load.php 1 8:48 2010年7月13日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__).'/config.php'); -AjaxHead(); -if ($openitem != 100) { - require(dirname(__FILE__).'/inc/inc_menu.php'); - require(DEDEADMIN.'/inc/inc_menu_func.php'); - GetMenus($cuserLogin->getUserRank(), 'main'); - exit(); -} else { - $openitem = 0; - require(dirname(__FILE__).'/inc/inc_menu_module.php'); - require(DEDEADMIN.'/inc/inc_menu_func.php'); - GetMenus($cuserLogin->getUserRank(), 'module'); - exit(); -} +<?php +/** + * 载入菜单 + * + * @version $Id: index_menu_load.php 1 8:48 2010年7月13日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__).'/config.php'); +AjaxHead(); +if ($openitem != 100) { + require(dirname(__FILE__).'/inc/inc_menu.php'); + require(DEDEADMIN.'/inc/inc_menu_func.php'); + GetMenus($cuserLogin->getUserRank(), 'main'); + exit(); +} else { + $openitem = 0; + require(dirname(__FILE__).'/inc/inc_menu_module.php'); + require(DEDEADMIN.'/inc/inc_menu_func.php'); + GetMenus($cuserLogin->getUserRank(), 'module'); + exit(); +} diff --git a/src/dede/index_menu_module.php b/src/admin/index_menu_module.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/index_menu_module.php rename to src/admin/index_menu_module.php index 1cd703f4..7c04d31f --- a/src/dede/index_menu_module.php +++ b/src/admin/index_menu_module.php @@ -1,56 +1,54 @@ -<?php - -/** - * 快捷发布菜单 - * - * @version $Id: index_memnu_module.php 1 23:44 2011/2/16 tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require(dirname(__FILE__)."/config.php"); -if ($cuserLogin->adminStyle != 'dedecms') { - header("location:index_menu.php?openitem=100"); - exit(); -} - -require(DEDEADMIN.'/inc/inc_menu_module.php'); -require(DEDEADMIN.'/inc/inc_menu_func.php'); -?> -<html> - -<head> - <title>DedeBIZ menu - - - - - - - - - - - - - -
- getUserRank(), 'module'); - ?> -
- - - - -
- - +adminStyle != 'dedecms') { + header("location:index_menu.php?openitem=100"); + exit(); +} + +require(DEDEADMIN.'/inc/inc_menu_module.php'); +require(DEDEADMIN.'/inc/inc_menu_func.php'); +?> + + + DedeBIZ menu + + + + + + + + + + + + + +
+ getUserRank(), 'module'); + ?> +
+ + + + +
+ + \ No newline at end of file diff --git a/src/dede/index_testenv.php b/src/admin/index_testenv.php old mode 100755 new mode 100644 similarity index 80% rename from src/dede/index_testenv.php rename to src/admin/index_testenv.php index 169e4785..e5e8e8be --- a/src/dede/index_testenv.php +++ b/src/admin/index_testenv.php @@ -1,171 +1,161 @@ -'; - $reval = false; - if (empty($rootDir)) $rootDir = DEDEROOT; - if (TestWriteable($d)) { - @file_put_contents($d.'/'.$filename, $testStr); - $remoteUrl = $siteuRL.'/'.str_replace($rootDir, '', str_replace("\\", '/', realpath($d))).'/'.$filename; - $tempStr = @PostHost($remoteUrl); - $reval = (md5($d) == trim($tempStr)) ? true : false; - unlink($d.'/'.$filename); - return $reval; - } else { - return -1; - } - } -} - -if (!function_exists('PostHost')) { - function PostHost($host, $data = '', $method = 'GET', $showagent = null, $port = null, $timeout = 30) - { - $parse = @parse_url($host); - if (empty($parse)) return false; - if ((int)$port > 0) { - $parse['port'] = $port; - } elseif (!@$parse['port']) { - $parse['port'] = '80'; - } - $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://").$parse['host']; - if (!$fp = @fsockopen($parse['host'], $parse['port'], $errnum, $errstr, $timeout)) { - return false; - } - $method = strtoupper($method); - $wlength = $wdata = $responseText = ''; - $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path'])."?".@$parse['query']; - if ($method == 'GET') { - $separator = @$parse['query'] ? '&' : ''; - substr($data, 0, 1) == '&' && $data = substr($data, 1); - $parse['path'] .= $separator.$data; - } elseif ($method == 'POST') { - $wlength = "Content-length: ".strlen($data)."\r\n"; - $wdata = $data; - } - $write = "$method $parse[path] HTTP/1.0\r\nHost: $parse[host]\r\nContent-type: application/x-www-form-urlencoded\r\n{$wlength}Connection: close\r\n\r\n$wdata"; - @fwrite($fp, $write); - while ($data = @fread($fp, 4096)) { - $responseText .= $data; - } - @fclose($fp); - empty($showagent) && $responseText = trim(stristr($responseText, "\r\n\r\n"), "\r\n"); - return $responseText; - } -} - -if (!function_exists('TestAdminPWD')) { - //返回结果,-1:没有更改默认管理员名称 -2:没有更改默认管理员用户名和密码 0:没有发现默认账号 - function TestAdminPWD() - { - global $dsql; - // 查询栏目表确定栏目所在的目录 - $sql = "SELECT usertype,userid,pwd FROM #@__admin WHERE `userid`='admin'"; - $row = $dsql->GetOne($sql); - if (is_array($row)) { - if ($row['pwd'] == 'f297a57a5a743894a0e4') { - return -2; - } else { - return -1; - } - } else { - return 0; - } - } -} - -if (!function_exists('IsWritable')) { - // 检测是否可写 - function IsWritable($pathfile) - { - $isDir = substr($pathfile, -1) == '/' ? true : false; - if ($isDir) { - if (is_dir($pathfile)) { - mt_srand((float)microtime() * 1000000); - $pathfile = $pathfile.'dede_'.uniqid(mt_rand()).'.tmp'; - } elseif (@mkdir($pathfile)) { - return IsWritable($pathfile); - } else { - return false; - } - } - @chmod($pathfile, 0777); - $fp = @fopen($pathfile, 'ab'); - if ($fp === false) return false; - fclose($fp); - $isDir && @unlink($pathfile); - return true; - } -} - -// 检测权限 -$safeMsg = array(); - -$dirname = str_replace('index_body.php', '', strtolower($_SERVER['PHP_SELF'])); -if (preg_match("#[\\|/]dede[\\|/]#", $dirname)) { - $safeMsg[] = '默认管理目录为dede,需要立即将它更名;'; -} -if (IsWritable(DEDEDATA.'/common.inc.php')) { - $safeMsg[] = '强烈建议data/common.inc.php文件属性设置为644(Linux/Unix)或只读(NT);'; -} -$rs = TestAdminPWD(); -if ($rs < 0) { - $linkurl = "马上修改"; - switch ($rs) { - case -1: - $msg = "没有更改默认管理员名称admin,建议您修改为其他管理账号{$linkurl}"; - break; - case -2: - $msg = "没有更改默认的管理员名称和密码,强烈建议您进行更改{$linkurl}"; - break; - } - $safeMsg[] = $msg; -} - -?> - 0) { -?> - -'; + $reval = false; + if (empty($rootDir)) $rootDir = DEDEROOT; + if (TestWriteable($d)) { + @file_put_contents($d.'/'.$filename, $testStr); + $remoteUrl = $siteuRL.'/'.str_replace($rootDir, '', str_replace("\\", '/', realpath($d))).'/'.$filename; + $tempStr = @PostHost($remoteUrl); + $reval = (md5($d) == trim($tempStr)) ? true : false; + unlink($d.'/'.$filename); + return $reval; + } else { + return -1; + } + } +} +if (!function_exists('PostHost')) { + function PostHost($host, $data = '', $method = 'GET', $showagent = null, $port = null, $timeout = 30) + { + $parse = @parse_url($host); + if (empty($parse)) return false; + if ((int)$port > 0) { + $parse['port'] = $port; + } elseif (!@$parse['port']) { + $parse['port'] = '80'; + } + $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://").$parse['host']; + if (!$fp = @fsockopen($parse['host'], $parse['port'], $errnum, $errstr, $timeout)) { + return false; + } + $method = strtoupper($method); + $wlength = $wdata = $responseText = ''; + $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path'])."?".@$parse['query']; + if ($method == 'GET') { + $separator = @$parse['query'] ? '&' : ''; + substr($data, 0, 1) == '&' && $data = substr($data, 1); + $parse['path'] .= $separator.$data; + } elseif ($method == 'POST') { + $wlength = "Content-length: ".strlen($data)."\r\n"; + $wdata = $data; + } + $write = "$method $parse[path] HTTP/1.0\r\nHost: $parse[host]\r\nContent-type: application/x-www-form-urlencoded\r\n{$wlength}Connection: close\r\n\r\n$wdata"; + @fwrite($fp, $write); + while ($data = @fread($fp, 4096)) { + $responseText .= $data; + } + @fclose($fp); + empty($showagent) && $responseText = trim(stristr($responseText, "\r\n\r\n"), "\r\n"); + return $responseText; + } +} +if (!function_exists('TestAdminPWD')) { + //返回结果,1.没有修改默认管理员名称,2.没有修改默认管理员用户名和密码,3.没有发现默认账号 + function TestAdminPWD() + { + global $dsql; + //查询栏目表确定栏目所在的目录 + $sql = "SELECT usertype,userid,pwd FROM #@__admin WHERE `userid`='admin'"; + $row = $dsql->GetOne($sql); + if (is_array($row)) { + if ($row['pwd'] == 'f297a57a5a743894a0e4') { + return -2; + } else { + return -1; + } + } else { + return 0; + } + } +} +if (!function_exists('IsWritable')) { + //检测是否可写 + function IsWritable($pathfile) + { + $isDir = substr($pathfile, -1) == '/' ? true : false; + if ($isDir) { + if (is_dir($pathfile)) { + mt_srand((float)microtime() * 1000000); + $pathfile = $pathfile.'dede_'.uniqid(mt_rand()).'.tmp'; + } elseif (@mkdir($pathfile)) { + return IsWritable($pathfile); + } else { + return false; + } + } + @chmod($pathfile, 0777); + $fp = @fopen($pathfile, 'ab'); + if ($fp === false) return false; + fclose($fp); + $isDir && @unlink($pathfile); + return true; + } +} +//检测权限 +$safeMsg = array(); +$dirname = str_replace('index_body.php', '', strtolower($_SERVER['PHP_SELF'])); +if (preg_match("#[\\|/]admin[\\|/]#", $dirname)) { + $safeMsg[] = '您的管理目录的名称中包含默认名称admin,建议将它更名;'; +} +if (IsWritable(DEDEDATA.'/common.inc.php')) { + $safeMsg[] = '强烈建议data/common.inc.php文件属性设置为644(Linux/Unix)或只读(NT);'; +} +$rs = TestAdminPWD(); +if ($rs < 0) { + $linkurl = "修改"; + switch ($rs) { + case -1: + $msg = "没有修改默认管理员名称admin,建议您修改为其他管理账号。{$linkurl}"; + break; + case -2: + $msg = "没有修改默认的管理员名称和密码,强烈建议您进行修改。{$linkurl}"; + break; + } + $safeMsg[] = $msg; +} +?> + 0) { +?> +
+ $val) { + ?> +
.
+ +
+ \ No newline at end of file diff --git a/src/dede/index_top.php b/src/admin/index_top.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/index_top.php rename to src/admin/index_top.php index 40a134ad..e51bedd1 --- a/src/dede/index_top.php +++ b/src/admin/index_top.php @@ -1,17 +1,16 @@ -adminStyle == 'dedecms') { - include DedeInclude('templets/index_top1.htm'); -} else { - include DedeInclude('templets/index_top2.htm'); -} +adminStyle == 'dedecms') { + include DedeInclude('templets/index_top1.htm'); +} else { + include DedeInclude('templets/index_top2.htm'); +} diff --git a/src/dede/js/album.js b/src/admin/js/album.js old mode 100755 new mode 100644 similarity index 92% rename from src/dede/js/album.js rename to src/admin/js/album.js index 43103b9a..f7eb46e2 --- a/src/dede/js/album.js +++ b/src/admin/js/album.js @@ -1,141 +1,141 @@ -/** - * 图集 - * - * @version $Id: album.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - - -function checkSubmitAlb() { - if (document.form1.title.value == '') { - ShowMsg("档案标题不能为空"); - return false; - } - if (document.form1.typeid.value == 0) { - ShowMsg("请选择档案的主类别"); - return false; - } - document.form1.imagebody.value = $Obj('copyhtml').innerHTML; - - if ($("#thumbnails .albCt").length > 0) { - // 这里从thumbnails中取出图片元素信息 - $("#thumbnails .albCt").each(function () { - albums.push({ - "img": $(this).find("img").attr("src"), - "txt": $(this).find("input").val() - }) - }) - } - - $("#albums").val(JSON.stringify(albums)); - - return true; -} - -function testGet() { - LoadTestDiv(); -} - -function checkMuList(psid, cmid) { - if ($Obj('pagestyle3').checked) { - $Obj('cfgmulist').style.display = 'block'; - $Obj('spagelist').style.display = 'none'; - } else if ($Obj('pagestyle1').checked) { - $Obj('cfgmulist').style.display = 'none'; - $Obj('spagelist').style.display = 'block'; - } else { - $Obj('cfgmulist').style.display = 'none'; - $Obj('spagelist').style.display = 'none'; - } -} - -//图集,显示与隐藏zip文件选项 -function showZipField(formitem, zipid, upid) { - if (formitem.checked) { - $Obj(zipid).style.display = 'block'; - $Obj(upid).style.display = 'none'; - //$Obj('handfield').style.display = 'none'; - // $Obj('formhtml').checked = false; - $Obj('copyhtml').innerHTML = ''; - } else { - $Obj(zipid).style.display = 'none'; - //$Obj('handfield').style.display = 'block'; - } -} - -//图集,显示与隐藏Html编辑框 -function showHtmlField(formitem, htmlid, upid) { - if ($Nav() != "IE") { - alert("该方法不适用于非IE浏览器"); - return; - } - if (formitem.checked) { - $Obj(htmlid).style.display = 'block'; - $Obj(upid).style.display = 'none'; - //$Obj('handfield').style.display = 'none'; - $Obj('formzip').checked = false; - } else { - $Obj(htmlid).style.display = 'none'; - //$Obj('handfield').style.display = 'block'; - $Obj('copyhtml').innerHTML = ''; - } -} - -function seePicNewAlb(f, imgdid, frname, hpos, acname) { - var newobj = null; - if (f.value == '') return; - vImg = $Obj(imgdid); - picnameObj = document.getElementById('picname'); - nFrame = $Nav() == 'IE' ? eval('document.frames.' + frname) : $Obj(frname); - nForm = f.form; - //修改form的action等参数 - if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmitAlb); - else nForm.removeEventListener("submit", checkSubmitAlb, false); - nForm.action = 'archives_do.php'; - nForm.target = frname; - nForm.dopost.value = 'uploadLitpic'; - nForm.submit(); - - picnameObj.value = ''; - newobj = $Obj('uploadwait'); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = 'uploadwait'; - newobj.style.position = 'absolute'; - newobj.className = 'uploadwait'; - newobj.style.width = 120; - newobj.style.height = 20; - newobj.style.top = hpos; - newobj.style.left = 100; - document.body.appendChild(newobj); - newobj.innerHTML = '上传中...'; - } - newobj.style.display = 'block'; - //提交后还原form的action等参数 - nForm.action = acname; - nForm.dopost.value = 'save'; - nForm.target = ''; - nForm.litpic.disabled = true; - //nForm.litpic = null; - //if(nForm.attachEvent) nForm.attachEvent("onsubmit", checkSubmit); - //else nForm.addEventListener("submit", checkSubmit, true); -} - -//删除已经上传的图片 -function delAlbPic(pid) { - var tgobj = $Obj('albCtok' + pid); - var myajax = new DedeAjax(tgobj); - myajax.SendGet2('swfupload.php?dopost=del&id=' + pid); - $Obj('thumbnails').removeChild(tgobj); -} - -//删除已经上传的图片(编辑时用) -function delAlbPicOld(picfile, pid) { - var tgobj = $Obj('albold' + pid); - var myajax = new DedeAjax(tgobj); - myajax.SendGet2('swfupload.php?dopost=delold&picfile=' + picfile); - $Obj('thumbnailsEdit').removeChild(tgobj); +/** + * 图集 + * + * @version $Id: album.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + + +function checkSubmitAlb() { + if (document.form1.title.value == '') { + ShowMsg("档案标题不能为空"); + return false; + } + if (document.form1.typeid.value == 0) { + ShowMsg("请选择档案的主类别"); + return false; + } + document.form1.imagebody.value = $Obj('copyhtml').innerHTML; + + if ($("#thumbnails .albCt").length > 0) { + // 这里从thumbnails中取出图片元素信息 + $("#thumbnails .albCt").each(function () { + albums.push({ + "img": $(this).find("img").attr("src"), + "txt": $(this).find("input").val() + }) + }) + } + + $("#albums").val(JSON.stringify(albums)); + + return true; +} + +function testGet() { + LoadTestDiv(); +} + +function checkMuList(psid, cmid) { + if ($Obj('pagestyle3').checked) { + $Obj('cfgmulist').style.display = 'block'; + $Obj('spagelist').style.display = 'none'; + } else if ($Obj('pagestyle1').checked) { + $Obj('cfgmulist').style.display = 'none'; + $Obj('spagelist').style.display = 'block'; + } else { + $Obj('cfgmulist').style.display = 'none'; + $Obj('spagelist').style.display = 'none'; + } +} + +//图集,显示与隐藏zip文件选项 +function showZipField(formitem, zipid, upid) { + if (formitem.checked) { + $Obj(zipid).style.display = 'block'; + $Obj(upid).style.display = 'none'; + //$Obj('handfield').style.display = 'none'; + // $Obj('formhtml').checked = false; + $Obj('copyhtml').innerHTML = ''; + } else { + $Obj(zipid).style.display = 'none'; + //$Obj('handfield').style.display = 'block'; + } +} + +//图集,显示与隐藏Html编辑框 +function showHtmlField(formitem, htmlid, upid) { + if ($Nav() != "IE") { + alert("该方法不适用于非IE浏览器"); + return; + } + if (formitem.checked) { + $Obj(htmlid).style.display = 'block'; + $Obj(upid).style.display = 'none'; + //$Obj('handfield').style.display = 'none'; + $Obj('formzip').checked = false; + } else { + $Obj(htmlid).style.display = 'none'; + //$Obj('handfield').style.display = 'block'; + $Obj('copyhtml').innerHTML = ''; + } +} + +function seePicNewAlb(f, imgdid, frname, hpos, acname) { + var newobj = null; + if (f.value == '') return; + vImg = $Obj(imgdid); + picnameObj = document.getElementById('picname'); + nFrame = $Nav() == 'IE' ? eval('document.frames.' + frname) : $Obj(frname); + nForm = f.form; + //修改form的action等参数 + if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmitAlb); + else nForm.removeEventListener("submit", checkSubmitAlb, false); + nForm.action = 'archives_do.php'; + nForm.target = frname; + nForm.dopost.value = 'uploadLitpic'; + nForm.submit(); + + picnameObj.value = ''; + newobj = $Obj('uploadwait'); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = 'uploadwait'; + newobj.style.position = 'absolute'; + newobj.className = 'uploadwait'; + newobj.style.width = 120; + newobj.style.height = 20; + newobj.style.top = hpos; + newobj.style.left = 100; + document.body.appendChild(newobj); + newobj.innerHTML = '上传中...'; + } + newobj.style.display = 'block'; + //提交后还原form的action等参数 + nForm.action = acname; + nForm.dopost.value = 'save'; + nForm.target = ''; + nForm.litpic.disabled = true; + //nForm.litpic = null; + //if(nForm.attachEvent) nForm.attachEvent("onsubmit", checkSubmit); + //else nForm.addEventListener("submit", checkSubmit, true); +} + +//删除已经上传的图片 +function delAlbPic(pid) { + var tgobj = $Obj('albCtok' + pid); + var myajax = new DedeAjax(tgobj); + myajax.SendGet2('swfupload.php?dopost=del&id=' + pid); + $Obj('thumbnails').removeChild(tgobj); +} + +//删除已经上传的图片(编辑时用) +function delAlbPicOld(picfile, pid) { + var tgobj = $Obj('albold' + pid); + var myajax = new DedeAjax(tgobj); + myajax.SendGet2('swfupload.php?dopost=delold&picfile=' + picfile); + $Obj('thumbnailsEdit').removeChild(tgobj); } \ No newline at end of file diff --git a/src/dede/js/base.js b/src/admin/js/base.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/base.js rename to src/admin/js/base.js index 53689b74..99f1c05e --- a/src/dede/js/base.js +++ b/src/admin/js/base.js @@ -1,159 +1,159 @@ - $(function(){ - //文本框Style - $(".txt").mouseover(function(){ - $(this).addClass("txt_o"); - }).mouseout(function(){ - $(this).removeClass("txt_o"); - }).focus(function(){ - $(this).addClass("txt_s"); - }).blur(function(){ - $(this).removeClass("txt_s"); - }); - - //表格折叠 - $(".tform").find("tbody tr th[_show]").each(function(i){ - //加入折叠提示 - if($(this).attr("_show")=="no"){ - $(this).append(" "); - }else{ - $(this).append(" "); - } - //折叠动作 - $(this).click(function(){ - if($(this).find("button[class^='tbody_']").attr("class")=="tbody_up"){ - $(this).find("button[class^='tbody_']").attr("class","tbody_down"); - $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).hide(); - }else if($(this).find("button[class^='tbody_']").attr("class")=="tbody_down"){ - $(this).find("button[class^='tbody_']").attr("class","tbody_up"); - $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).show(); - } - }).mouseover(function(){ - $(this).addClass("mouseon"); - }).mouseout(function(){ - $(this).removeClass("mouseon"); - }).click(); - }); - - //列表行高亮 - $("table[_dlist*='light']").children("tbody").children("tr").mouseover(function(){ - if($(this).attr("_nolight")!="yes")$(this).addClass("t_on"); - }).mouseout(function(){ - $(this).removeClass("t_on"); - }); - - //列表行整行选择 - $("table[_dlist*='check']").each(function(){ - //处理行点击 - $(this).find("tbody tr").click(function(){ - checkbox = $(this).find("td input[type='checkbox']"); - tr = $(this); - - if(checkbox.attr("checked")===false){ - checkbox.attr("checked","checked"); - tr.addClass("t_sl"); - }else{ - checkbox.removeAttr("checked"); - tr.removeClass("t_sl"); - } - - }); - - //处理checkbox点击 - $(this).find("td input[type='checkbox']").click(function(){ - tr = $(this).parent("td").parent("tr"); - if($(this).attr("checked")===false){ - $(this).attr("checked","checked"); - tr.removeClass("t_sl"); - }else{ - $(this).removeAttr("checked"); - tr.addClass("t_sl"); - } - }); - - //排除链接及按钮点击 - $(this).find("tbody tr td a,tbody tr td button,tbody tr td table").click(function(){ - tr = $(this).parent("td").parent("tr"); - checkbox = tr.find("td input[type='checkbox']"); - if(checkbox.attr("checked")===false){ - checkbox.attr("checked","checked"); - tr.removeClass("t_sl"); - }else{ - checkbox.removeAttr("checked"); - tr.addClass("t_sl"); - } - }); - - }); - - - - //高亮初始化 - setChecklight(); - - //全选按钮 - $("button[_click='allSelect']").click(function(){ - ckbox = $(this).parent("td").parent("tr").parent("tbody").find("td input[type='checkbox']"); - ckbox.attr("checked","checked"); - setChecklight(); - }); - - //反选按钮 - $("button[_click='unSelect']").click(function(){ - ckbox = $(this).parent("td").parent("tr").parent("tbody").find("td input[type='checkbox']"); - ckbox.each(function(){ - $(this).attr("checked") === false ? $(this).attr("checked","checked") : $(this).removeAttr("checked"); - }); - - setChecklight(); - }); - - //自定义提交 - $("button[_submit]").click(function(){ - url = $(this).attr("_submit"); - if(/\[new\].*/.test(url)){ - url = url.replace(/\[new\]/,""); - }else{ - url = $(this).parents("form").attr("action")+url; - } - $(this).parents("form").attr("action",url).submit(); - }); - - - }); - - /*高亮初始化*/ - function setChecklight(){ - $(".tlist[_dlist*='check']").find("tbody tr td input[type='checkbox']").each(function(i){ - tr = $(this).parent("td").parent("tr"); - if($(this).attr("checked")){ - tr.addClass("t_sl"); - }else{ - tr.removeClass("t_sl"); - } - }); - } - - /*栏目跳转*/ - function AC(mid){ - f = $(window.parent.document); - mlink = f.find("a[id='"+mid+"']"); - if(mlink.size()>0){ - box = mlink.parents("div[id^='menu_']"); - boxid = box.attr("id").substring(5,128); - if($("body").attr("class")!="showmenu")$("#togglemenu").click(); - if(mlink.attr("_url")){ - $("#menu").find("div[id^=menu]").hide(); - box.show(); - mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); - if($("#mod_"+boxid).attr("class")==""){ - $("#nav").find("a").removeClass("thisclass"); - $("#nav").find("a[id='mod_"+boxid+"']").addClass("thisclass").blur(); - } - window.location.href = mlink.attr("_url"); - }else if(mlink.attr("_open") && mlink.attr("_open")!=undefined){ - window.open(mlink.attr("_open")); - } - } - - } - + $(function(){ + //文本框Style + $(".txt").mouseover(function(){ + $(this).addClass("txt_o"); + }).mouseout(function(){ + $(this).removeClass("txt_o"); + }).focus(function(){ + $(this).addClass("txt_s"); + }).blur(function(){ + $(this).removeClass("txt_s"); + }); + + //表格折叠 + $(".tform").find("tbody tr th[_show]").each(function(i){ + //加入折叠提示 + if($(this).attr("_show")=="no"){ + $(this).append(" "); + }else{ + $(this).append(" "); + } + //折叠动作 + $(this).click(function(){ + if($(this).find("button[class^='tbody_']").attr("class")=="tbody_up"){ + $(this).find("button[class^='tbody_']").attr("class","tbody_down"); + $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).hide(); + }else if($(this).find("button[class^='tbody_']").attr("class")=="tbody_down"){ + $(this).find("button[class^='tbody_']").attr("class","tbody_up"); + $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).show(); + } + }).mouseover(function(){ + $(this).addClass("mouseon"); + }).mouseout(function(){ + $(this).removeClass("mouseon"); + }).click(); + }); + + //列表行高亮 + $("table[_dlist*='light']").children("tbody").children("tr").mouseover(function(){ + if($(this).attr("_nolight")!="yes")$(this).addClass("t_on"); + }).mouseout(function(){ + $(this).removeClass("t_on"); + }); + + //列表行整行选择 + $("table[_dlist*='check']").each(function(){ + //处理行点击 + $(this).find("tbody tr").click(function(){ + checkbox = $(this).find("td input[type='checkbox']"); + tr = $(this); + + if(checkbox.attr("checked")===false){ + checkbox.attr("checked","checked"); + tr.addClass("t_sl"); + }else{ + checkbox.removeAttr("checked"); + tr.removeClass("t_sl"); + } + + }); + + //处理checkbox点击 + $(this).find("td input[type='checkbox']").click(function(){ + tr = $(this).parent("td").parent("tr"); + if($(this).attr("checked")===false){ + $(this).attr("checked","checked"); + tr.removeClass("t_sl"); + }else{ + $(this).removeAttr("checked"); + tr.addClass("t_sl"); + } + }); + + //排除链接及按钮点击 + $(this).find("tbody tr td a,tbody tr td button,tbody tr td table").click(function(){ + tr = $(this).parent("td").parent("tr"); + checkbox = tr.find("td input[type='checkbox']"); + if(checkbox.attr("checked")===false){ + checkbox.attr("checked","checked"); + tr.removeClass("t_sl"); + }else{ + checkbox.removeAttr("checked"); + tr.addClass("t_sl"); + } + }); + + }); + + + + //高亮初始化 + setChecklight(); + + //全选按钮 + $("button[_click='allSelect']").click(function(){ + ckbox = $(this).parent("td").parent("tr").parent("tbody").find("td input[type='checkbox']"); + ckbox.attr("checked","checked"); + setChecklight(); + }); + + //反选按钮 + $("button[_click='unSelect']").click(function(){ + ckbox = $(this).parent("td").parent("tr").parent("tbody").find("td input[type='checkbox']"); + ckbox.each(function(){ + $(this).attr("checked") === false ? $(this).attr("checked","checked") : $(this).removeAttr("checked"); + }); + + setChecklight(); + }); + + //自定义提交 + $("button[_submit]").click(function(){ + url = $(this).attr("_submit"); + if(/\[new\].*/.test(url)){ + url = url.replace(/\[new\]/,""); + }else{ + url = $(this).parents("form").attr("action")+url; + } + $(this).parents("form").attr("action",url).submit(); + }); + + + }); + + /*高亮初始化*/ + function setChecklight(){ + $(".tlist[_dlist*='check']").find("tbody tr td input[type='checkbox']").each(function(i){ + tr = $(this).parent("td").parent("tr"); + if($(this).attr("checked")){ + tr.addClass("t_sl"); + }else{ + tr.removeClass("t_sl"); + } + }); + } + + /*栏目跳转*/ + function AC(mid){ + f = $(window.parent.document); + mlink = f.find("a[id='"+mid+"']"); + if(mlink.size()>0){ + box = mlink.parents("div[id^='menu_']"); + boxid = box.attr("id").substring(5,128); + if($("body").attr("class")!="showmenu")$("#togglemenu").click(); + if(mlink.attr("_url")){ + $("#menu").find("div[id^=menu]").hide(); + box.show(); + mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); + if($("#mod_"+boxid).attr("class")==""){ + $("#nav").find("a").removeClass("thisclass"); + $("#nav").find("a[id='mod_"+boxid+"']").addClass("thisclass").blur(); + } + window.location.href = mlink.attr("_url"); + }else if(mlink.attr("_open") && mlink.attr("_open")!=undefined){ + window.open(mlink.attr("_open")); + } + } + + } + diff --git a/src/dede/js/blank.js b/src/admin/js/blank.js old mode 100755 new mode 100644 similarity index 93% rename from src/dede/js/blank.js rename to src/admin/js/blank.js index 5b7ed62f..3c5b3d1e --- a/src/dede/js/blank.js +++ b/src/admin/js/blank.js @@ -1,3 +1,3 @@ -function CheckSubmit(){ - return true; -} +function CheckSubmit(){ + return true; +} diff --git a/src/dede/js/boxy.js b/src/admin/js/boxy.js old mode 100755 new mode 100644 similarity index 100% rename from src/dede/js/boxy.js rename to src/admin/js/boxy.js diff --git a/src/dede/js/co.js b/src/admin/js/co.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/co.js rename to src/admin/js/co.js index 99c596a6..1376c6a9 --- a/src/dede/js/co.js +++ b/src/admin/js/co.js @@ -1,154 +1,154 @@ -/** - * - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - - -function nav() { - if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; - else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; - else return "OT"; -} - -function myObj(oid) { - return document.getElementById(oid); -} - -function showHide(objname) { - var obj = myObj(objname); - if (obj.style.display == null || obj.style.display == 'none') { - if (nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "table-row"; - } else { - obj.style.display = "none"; - } -} - -function showTestWin(surl) { - window.open(surl, "testWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=450,left=100, top=100"); -} - -function showItem(objname) { - var obj = myObj(objname); - if (nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "table"; -} - -function showItemM(objname) { - var obj = myObj(objname); - if (nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "table"; -} - -function showItem1() { - showItem('needset'); - showItem('head1'); - myObj('adset').style.display = "none"; - myObj('head2').style.display = "none"; -} -function showItem2() { - showItemM('adset'); - showItemM('head2'); - myObj('needset').style.display = "none"; - myObj('head1').style.display = "none"; -} - -function testMore() { - if (myObj('usemore').checked) { - if (nav() == 'IE') myObj('usemoretr').style.display = 'block'; - else myObj('usemoretr').style.display = 'table-row'; - myObj('handset').style.display = 'none'; - } else { - myObj('usemoretr').style.display = 'none'; - if (nav() == 'IE') myObj('handset').style.display = 'block'; - else myObj('handset').style.display = 'table-row'; - } -} - -function selSourceSet() { - if (myObj('source3').checked) { - if (nav() == 'IE') myObj('rssset').style.display = 'block'; - else myObj('rssset').style.display = 'table-row'; - myObj('batchset').style.display = 'none'; - myObj('handset').style.display = 'none'; - myObj('arturl').style.display = 'none'; - } else if (myObj('source2').checked) { - myObj('rssset').style.display = 'none'; - myObj('batchset').style.display = 'none'; - if (nav() == 'IE') myObj('handset').style.display = 'block'; - else myObj('handset').style.display = 'table-row'; - if (nav() == 'IE') myObj('arturl').style.display = 'block'; - else myObj('arturl').style.display = 'table-row'; - } else { - myObj('rssset').style.display = 'none'; - if (nav() == 'IE') myObj('batchset').style.display = 'block'; - else myObj('batchset').style.display = 'table-row'; - if (nav() == 'IE') myObj('handset').style.display = 'block'; - else myObj('handset').style.display = 'table-row'; - if (nav() == 'IE') myObj('arturl').style.display = 'block'; - else myObj('arturl').style.display = 'table-row'; - } - testMore(); -} - -function selListenSet() { - if (myObj('islisten1').checked) { - myObj('listentr').style.display = 'none'; - } else { - if (nav() == 'IE') myObj('listentr').style.display = 'block'; - else myObj('listentr').style.display = 'table-row'; - } -} - -function selUrlRuleSet() { - if (myObj('urlrule2').checked) { - myObj('arearuletr').style.display = 'none'; - if (nav() == 'IE') myObj('regxruletr').style.display = 'block'; - else myObj('regxruletr').style.display = 'table-row'; - } - else { - if (nav() == 'IE') myObj('arearuletr').style.display = 'block'; - else myObj('arearuletr').style.display = 'table-row'; - myObj('regxruletr').style.display = 'none'; - } -} - -function testRss() { - var surl = ''; - surl = escape(myObj('rssurl').value); - showTestWin("co_do.php?dopost=testrss&rssurl=" + surl); -} - -function testRegx() { - var surl = escape(myObj('regxurl').value); - var sstart = myObj('startid').value; - var send = myObj('endid').value; - var saddv = myObj('addv').value; - showTestWin("co_do.php?dopost=testregx®xurl=" + surl + "&startid=" + sstart + "&endid=" + send + "&addv=" + saddv); -} - -function toHex(n) { - var digitArray = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); - var result = '' - var start = true; - - for (var i = 32; i > 0;) { - i -= 4; - var digit = (n >> i) & 0xf; - if (!start || digit != 0) { - start = false; - result += digitArray[digit]; - } - } - return (result == '' ? '0' : result); -} - -function selTrim(selfield) { - var tagobj = myObj(selfield); - if (nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - window.open("templets/co_trimrule.html?" + selfield, "coRule", "scrollbars=no,resizable=yes,statebar=no,width=320,height=180,left=" + posLeft + ", top=" + posTop); +/** + * + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + + +function nav() { + if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; + else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; + else return "OT"; +} + +function myObj(oid) { + return document.getElementById(oid); +} + +function showHide(objname) { + var obj = myObj(objname); + if (obj.style.display == null || obj.style.display == 'none') { + if (nav() == 'IE') obj.style.display = "block"; + else obj.style.display = "table-row"; + } else { + obj.style.display = "none"; + } +} + +function showTestWin(surl) { + window.open(surl, "testWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=450,left=100, top=100"); +} + +function showItem(objname) { + var obj = myObj(objname); + if (nav() == 'IE') obj.style.display = "block"; + else obj.style.display = "table"; +} + +function showItemM(objname) { + var obj = myObj(objname); + if (nav() == 'IE') obj.style.display = "block"; + else obj.style.display = "table"; +} + +function showItem1() { + showItem('needset'); + showItem('head1'); + myObj('adset').style.display = "none"; + myObj('head2').style.display = "none"; +} +function showItem2() { + showItemM('adset'); + showItemM('head2'); + myObj('needset').style.display = "none"; + myObj('head1').style.display = "none"; +} + +function testMore() { + if (myObj('usemore').checked) { + if (nav() == 'IE') myObj('usemoretr').style.display = 'block'; + else myObj('usemoretr').style.display = 'table-row'; + myObj('handset').style.display = 'none'; + } else { + myObj('usemoretr').style.display = 'none'; + if (nav() == 'IE') myObj('handset').style.display = 'block'; + else myObj('handset').style.display = 'table-row'; + } +} + +function selSourceSet() { + if (myObj('source3').checked) { + if (nav() == 'IE') myObj('rssset').style.display = 'block'; + else myObj('rssset').style.display = 'table-row'; + myObj('batchset').style.display = 'none'; + myObj('handset').style.display = 'none'; + myObj('arturl').style.display = 'none'; + } else if (myObj('source2').checked) { + myObj('rssset').style.display = 'none'; + myObj('batchset').style.display = 'none'; + if (nav() == 'IE') myObj('handset').style.display = 'block'; + else myObj('handset').style.display = 'table-row'; + if (nav() == 'IE') myObj('arturl').style.display = 'block'; + else myObj('arturl').style.display = 'table-row'; + } else { + myObj('rssset').style.display = 'none'; + if (nav() == 'IE') myObj('batchset').style.display = 'block'; + else myObj('batchset').style.display = 'table-row'; + if (nav() == 'IE') myObj('handset').style.display = 'block'; + else myObj('handset').style.display = 'table-row'; + if (nav() == 'IE') myObj('arturl').style.display = 'block'; + else myObj('arturl').style.display = 'table-row'; + } + testMore(); +} + +function selListenSet() { + if (myObj('islisten1').checked) { + myObj('listentr').style.display = 'none'; + } else { + if (nav() == 'IE') myObj('listentr').style.display = 'block'; + else myObj('listentr').style.display = 'table-row'; + } +} + +function selUrlRuleSet() { + if (myObj('urlrule2').checked) { + myObj('arearuletr').style.display = 'none'; + if (nav() == 'IE') myObj('regxruletr').style.display = 'block'; + else myObj('regxruletr').style.display = 'table-row'; + } + else { + if (nav() == 'IE') myObj('arearuletr').style.display = 'block'; + else myObj('arearuletr').style.display = 'table-row'; + myObj('regxruletr').style.display = 'none'; + } +} + +function testRss() { + var surl = ''; + surl = escape(myObj('rssurl').value); + showTestWin("co_do.php?dopost=testrss&rssurl=" + surl); +} + +function testRegx() { + var surl = escape(myObj('regxurl').value); + var sstart = myObj('startid').value; + var send = myObj('endid').value; + var saddv = myObj('addv').value; + showTestWin("co_do.php?dopost=testregx®xurl=" + surl + "&startid=" + sstart + "&endid=" + send + "&addv=" + saddv); +} + +function toHex(n) { + var digitArray = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); + var result = '' + var start = true; + + for (var i = 32; i > 0;) { + i -= 4; + var digit = (n >> i) & 0xf; + if (!start || digit != 0) { + start = false; + result += digitArray[digit]; + } + } + return (result == '' ? '0' : result); +} + +function selTrim(selfield) { + var tagobj = myObj(selfield); + if (nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + window.open("templets/co_trimrule.html?" + selfield, "coRule", "scrollbars=no,resizable=yes,statebar=no,width=320,height=180,left=" + posLeft + ", top=" + posTop); } \ No newline at end of file diff --git a/src/dede/js/codemirror.js b/src/admin/js/codemirror.js old mode 100755 new mode 100644 similarity index 100% rename from src/dede/js/codemirror.js rename to src/admin/js/codemirror.js diff --git a/src/dede/js/context_menu.js b/src/admin/js/context_menu.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/context_menu.js rename to src/admin/js/context_menu.js index 4d05c5c6..d8d9fe5a --- a/src/dede/js/context_menu.js +++ b/src/admin/js/context_menu.js @@ -1,169 +1,169 @@ -/** - * - * @version $Id: context_menu.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -var MenuWidth = 120; -var ItemHeight = 16; -var ItemNumber = 0; - -function curNav() { - if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; - else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; - else return 'OT'; -} - -function insertHtm(op, code, isStart) { - if (curNav() == 'IE') { - op.insertAdjacentHTML(isStart ? "beforeEnd" : "afterEnd", code); - } else { - var range = op.ownerDocument.createRange(); - range.setStartBefore(op); - var fragment = range.createContextualFragment(code); - if (isStart) op.insertBefore(fragment, op.firstChild); - else op.appendChild(fragment); - } -} - -ContextMenu.WebFX_PopUp = null; -ContextMenu.WbFX_PopUpcss = null; - -ContextMenu.intializeContextMenu = function () { - insertHtm(document.body, '', true); - - if (curNav() == 'IE') WebFX_PopUp = document.frames['WebFX_PopUp']; - else WebFX_PopUp = document.getElementById('WebFX_PopUp'); - - WebFX_PopUpcss = document.getElementById('WebFX_PopUp'); - - WebFX_PopUpcss.onfocus = function () { WebFX_PopUpcss.style.display = "inline" }; - WebFX_PopUpcss.onblur = function () { WebFX_PopUpcss.style.display = "none" }; - - if (curNav() == 'IE') document.body.attachEvent("onmousedown", function () { WebFX_PopUpcss.style.display = "none" }); - else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); - - if (curNav() == 'IE') document.attachEvent("onblur", function () { WebFX_PopUpcss.style.display = "none" }); - else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); - -} - - -function ContextSeperator() { } - -function ContextMenu() { } - -ContextMenu.showPopup = function (x, y) { - WebFX_PopUpcss.style.display = "block" -} - -ContextMenu.display = function (evt, popupoptions) { - var eobj, x, y; - - eobj = evt ? evt : (window.event ? window.event : null); - - if (curNav() == 'IE') { - x = eobj.x; y = eobj.y - } else { - x = eobj.pageX; y = eobj.pageY; - } - - ContextMenu.populatePopup(popupoptions, window) - ContextMenu.showPopup(x, y); - ContextMenu.fixSize(); - ContextMenu.fixPos(x, y); - eobj.cancelBubble = true; - eobj.returnValue = false; -} - -//TODO -ContextMenu.getScrollTop = function () { - return document.body.scrollTop; - //window.pageXOffset and window.pageYOffset for moz -} - -ContextMenu.getScrollLeft = function () { - return document.body.scrollLeft; -} - - -ContextMenu.fixPos = function (x, y) { - /*var docheight,docwidth,dh,dw; - if(!x) { x=0; y=0; } - docheight = document.body.clientHeight; - docwidth = document.body.clientWidth; - dh = (WebFX_PopUpcss.offsetHeight+y) - docheight; - dw = (WebFX_PopUpcss.offsetWidth+x) - docwidth; - if(dw>0){ - WebFX_PopUpcss.style.left = (x - dw) + ContextMenu.getScrollLeft() + "px"; - }else { - WebFX_PopUpcss.style.left = x + ContextMenu.getScrollLeft(); - } if(dh>0) { - WebFX_PopUpcss.style.top = (y - dh) + ContextMenu.getScrollTop() + "px" - }else{ - WebFX_PopUpcss.style.top = y + ContextMenu.getScrollTop(); }*/ - WebFX_PopUpcss.style.top = y + "px"; - WebFX_PopUpcss.style.left = x + "px"; -} - -ContextMenu.fixSize = function () { - WebFX_PopUpcss.style.height = (ItemHeight * ItemNember + 20) + "px"; - WebFX_PopUpcss.style.width = MenuWidth + "px"; - ItemNember = 0; -} - -ContextMenu.populatePopup = function (arr, win) { - var alen, i, tmpobj, doc, height, htmstr; - alen = arr.length; - ItemNember = alen; - - if (curNav() == 'IE') doc = WebFX_PopUp.document; - else doc = WebFX_PopUp.contentWindow.document; - - doc.body.innerHTML = ''; - //if (doc.getElementsByTagName("LINK").length == 0){ - doc.open(); - doc.write(''); - doc.close(); - //} - for (i = 0; i < alen; i++) { - if (arr[i].constructor == ContextItem) { - tmpobj = doc.createElement("DIV"); - tmpobj.noWrap = true; - tmpobj.className = "WebFX-ContextMenu-Item"; - if (arr[i].disabled) { - htmstr = '' - htmstr += arr[i].text + '' - tmpobj.innerHTML = htmstr - tmpobj.className = "WebFX-ContextMenu-Disabled"; - tmpobj.onmouseover = function () { this.className = "WebFX-ContextMenu-Disabled-Over" } - tmpobj.onmouseout = function () { this.className = "WebFX-ContextMenu-Disabled" } - } else { - tmpobj.innerHTML = arr[i].text; - tmpobj.onclick = (function (f) { - return function () { - win.WebFX_PopUpcss.style.display = 'none' - if (typeof (f) == "function") { f(); } - }; - })(arr[i].action); - - tmpobj.onmouseover = function () { this.className = "WebFX-ContextMenu-Over" } - tmpobj.onmouseout = function () { this.className = "WebFX-ContextMenu-Item" } - } - doc.body.appendChild(tmpobj); - } else { - doc.body.appendChild(doc.createElement("DIV")).className = "WebFX-ContextMenu-Separator"; - } - } - doc.body.className = "WebFX-ContextMenu-Body"; - doc.body.onselectstart = function () { return false; } -} - -function ContextItem(str, fnc, disabled) { - this.text = str; - this.action = fnc; - this.disabled = disabled || false; +/** + * + * @version $Id: context_menu.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + +var MenuWidth = 120; +var ItemHeight = 16; +var ItemNumber = 0; + +function curNav() { + if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; + else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; + else return 'OT'; +} + +function insertHtm(op, code, isStart) { + if (curNav() == 'IE') { + op.insertAdjacentHTML(isStart ? "beforeEnd" : "afterEnd", code); + } else { + var range = op.ownerDocument.createRange(); + range.setStartBefore(op); + var fragment = range.createContextualFragment(code); + if (isStart) op.insertBefore(fragment, op.firstChild); + else op.appendChild(fragment); + } +} + +ContextMenu.WebFX_PopUp = null; +ContextMenu.WbFX_PopUpcss = null; + +ContextMenu.intializeContextMenu = function () { + insertHtm(document.body, '', true); + + if (curNav() == 'IE') WebFX_PopUp = document.frames['WebFX_PopUp']; + else WebFX_PopUp = document.getElementById('WebFX_PopUp'); + + WebFX_PopUpcss = document.getElementById('WebFX_PopUp'); + + WebFX_PopUpcss.onfocus = function () { WebFX_PopUpcss.style.display = "inline" }; + WebFX_PopUpcss.onblur = function () { WebFX_PopUpcss.style.display = "none" }; + + if (curNav() == 'IE') document.body.attachEvent("onmousedown", function () { WebFX_PopUpcss.style.display = "none" }); + else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); + + if (curNav() == 'IE') document.attachEvent("onblur", function () { WebFX_PopUpcss.style.display = "none" }); + else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); + +} + + +function ContextSeperator() { } + +function ContextMenu() { } + +ContextMenu.showPopup = function (x, y) { + WebFX_PopUpcss.style.display = "block" +} + +ContextMenu.display = function (evt, popupoptions) { + var eobj, x, y; + + eobj = evt ? evt : (window.event ? window.event : null); + + if (curNav() == 'IE') { + x = eobj.x; y = eobj.y + } else { + x = eobj.pageX; y = eobj.pageY; + } + + ContextMenu.populatePopup(popupoptions, window) + ContextMenu.showPopup(x, y); + ContextMenu.fixSize(); + ContextMenu.fixPos(x, y); + eobj.cancelBubble = true; + eobj.returnValue = false; +} + +//TODO +ContextMenu.getScrollTop = function () { + return document.body.scrollTop; + //window.pageXOffset and window.pageYOffset for moz +} + +ContextMenu.getScrollLeft = function () { + return document.body.scrollLeft; +} + + +ContextMenu.fixPos = function (x, y) { + /*var docheight,docwidth,dh,dw; + if(!x) { x=0; y=0; } + docheight = document.body.clientHeight; + docwidth = document.body.clientWidth; + dh = (WebFX_PopUpcss.offsetHeight+y) - docheight; + dw = (WebFX_PopUpcss.offsetWidth+x) - docwidth; + if(dw>0){ + WebFX_PopUpcss.style.left = (x - dw) + ContextMenu.getScrollLeft() + "px"; + }else { + WebFX_PopUpcss.style.left = x + ContextMenu.getScrollLeft(); + } if(dh>0) { + WebFX_PopUpcss.style.top = (y - dh) + ContextMenu.getScrollTop() + "px" + }else{ + WebFX_PopUpcss.style.top = y + ContextMenu.getScrollTop(); }*/ + WebFX_PopUpcss.style.top = y + "px"; + WebFX_PopUpcss.style.left = x + "px"; +} + +ContextMenu.fixSize = function () { + WebFX_PopUpcss.style.height = (ItemHeight * ItemNember + 20) + "px"; + WebFX_PopUpcss.style.width = MenuWidth + "px"; + ItemNember = 0; +} + +ContextMenu.populatePopup = function (arr, win) { + var alen, i, tmpobj, doc, height, htmstr; + alen = arr.length; + ItemNember = alen; + + if (curNav() == 'IE') doc = WebFX_PopUp.document; + else doc = WebFX_PopUp.contentWindow.document; + + doc.body.innerHTML = ''; + //if (doc.getElementsByTagName("LINK").length == 0){ + doc.open(); + doc.write(''); + doc.close(); + //} + for (i = 0; i < alen; i++) { + if (arr[i].constructor == ContextItem) { + tmpobj = doc.createElement("DIV"); + tmpobj.noWrap = true; + tmpobj.className = "WebFX-ContextMenu-Item"; + if (arr[i].disabled) { + htmstr = '' + htmstr += arr[i].text + '' + tmpobj.innerHTML = htmstr + tmpobj.className = "WebFX-ContextMenu-Disabled"; + tmpobj.onmouseover = function () { this.className = "WebFX-ContextMenu-Disabled-Over" } + tmpobj.onmouseout = function () { this.className = "WebFX-ContextMenu-Disabled" } + } else { + tmpobj.innerHTML = arr[i].text; + tmpobj.onclick = (function (f) { + return function () { + win.WebFX_PopUpcss.style.display = 'none' + if (typeof (f) == "function") { f(); } + }; + })(arr[i].action); + + tmpobj.onmouseover = function () { this.className = "WebFX-ContextMenu-Over" } + tmpobj.onmouseout = function () { this.className = "WebFX-ContextMenu-Item" } + } + doc.body.appendChild(tmpobj); + } else { + doc.body.appendChild(doc.createElement("DIV")).className = "WebFX-ContextMenu-Separator"; + } + } + doc.body.className = "WebFX-ContextMenu-Body"; + doc.body.onselectstart = function () { return false; } +} + +function ContextItem(str, fnc, disabled) { + this.text = str; + this.action = fnc; + this.disabled = disabled || false; } \ No newline at end of file diff --git a/src/dede/js/contextmenu.css b/src/admin/js/contextmenu.css old mode 100755 new mode 100644 similarity index 93% rename from src/dede/js/contextmenu.css rename to src/admin/js/contextmenu.css index 32e6f115..2a9aca62 --- a/src/dede/js/contextmenu.css +++ b/src/admin/js/contextmenu.css @@ -1,86 +1,86 @@ - a { - font-size: 12px; - } - - .WebFX-ContextMenu { - border: 0; - /*2px outset;*/ - width: 10px; - } - - .WebFX-ContextMenu-Body { - background-color: #EEFFEC; - background-image: url('../images/mmenubg.gif'); - margin: 0px; - padding: 1px; - border: 1px solid #E0E7C9; - } - - .WebFX-ContextMenu-Separator { - font-size: 0pt; - border: 1px dotted #E0E7C9; - height: 1px; - overflow: hidden; - margin: 3px 1px 3px 1px; - } - - .WebFX-ContextMenu-Item { - cursor: default; - font: menu; - font-size: 13px; - color: black !important; - width: 100%; - padding: 2px 20px 2px 16px; - - } - - .WebFX-ContextMenu-Over { - cursor: default; - background-color: highlight; - font: menu; - font-size: 13px; - width: 100%; - padding: 2px 20px 2px 16px; - color: highlighttext; - } - - .WebFX-ContextMenu-Disabled { - cursor: default; - font: menu; - width: 100%; - padding: 2px 20px 2px 16px; - color: graytext; - } - - .WebFX-ContextMenu-Disabled-Over { - cursor: default; - background-color: highlight; - font: menu; - width: 100%; - padding: 2px 20px 2px 16px; - color: graytext; - } - - .WebFX-ContextMenu-Disabled-Over .WebFX-ContextMenu-DisabledContainer { - display: block; - width: 100%; - vertical-align: center; - } - - /*very nice hack by erik below */ - .WebFX-ContextMenu-Disabled .WebFX-ContextMenu-DisabledContainer { - display: block; - background: GrayText; - filter: chroma(color=#010101) dropshadow(color=ButtonHighlight, offx=1, offy=1); - width: 100%; - vertical-align: center; - } - - .WebFX-ContextMenu-Disabled .WebFX-ContextMenu-DisabledContainer .WebFX-ContextMenu-DisabledContainer { - background: Transparent; - filter: gray() - /* Remove all bright shades of gray */ - chroma(color=#ffffff) chroma(color=#fefefe) chroma(color=#fdfdfd) chroma(color=#fcfcfc) chroma(color=#fbfbfb) chroma(color=#fafafa) chroma(color=#f9f9f9) chroma(color=#f8f8f8) chroma(color=#f7f7f7) chroma(color=#f6f6f6) chroma(color=#f5f5f5) chroma(color=#f4f4f4) chroma(color=#f3f3f3) mask(color=#010101); - } - + a { + font-size: 12px; + } + + .WebFX-ContextMenu { + border: 0; + /*2px outset;*/ + width: 10px; + } + + .WebFX-ContextMenu-Body { + background-color: #EEFFEC; + background-image: url('../images/mmenubg.gif'); + margin: 0px; + padding: 1px; + border: 1px solid #E0E7C9; + } + + .WebFX-ContextMenu-Separator { + font-size: 0pt; + border: 1px dotted #E0E7C9; + height: 1px; + overflow: hidden; + margin: 3px 1px 3px 1px; + } + + .WebFX-ContextMenu-Item { + cursor: default; + font: menu; + font-size: 13px; + color: black !important; + width: 100%; + padding: 2px 20px 2px 16px; + + } + + .WebFX-ContextMenu-Over { + cursor: default; + background-color: highlight; + font: menu; + font-size: 13px; + width: 100%; + padding: 2px 20px 2px 16px; + color: highlighttext; + } + + .WebFX-ContextMenu-Disabled { + cursor: default; + font: menu; + width: 100%; + padding: 2px 20px 2px 16px; + color: graytext; + } + + .WebFX-ContextMenu-Disabled-Over { + cursor: default; + background-color: highlight; + font: menu; + width: 100%; + padding: 2px 20px 2px 16px; + color: graytext; + } + + .WebFX-ContextMenu-Disabled-Over .WebFX-ContextMenu-DisabledContainer { + display: block; + width: 100%; + vertical-align: center; + } + + /*very nice hack by erik below */ + .WebFX-ContextMenu-Disabled .WebFX-ContextMenu-DisabledContainer { + display: block; + background: GrayText; + filter: chroma(color=#010101) dropshadow(color=ButtonHighlight, offx=1, offy=1); + width: 100%; + vertical-align: center; + } + + .WebFX-ContextMenu-Disabled .WebFX-ContextMenu-DisabledContainer .WebFX-ContextMenu-DisabledContainer { + background: Transparent; + filter: gray() + /* Remove all bright shades of gray */ + chroma(color=#ffffff) chroma(color=#fefefe) chroma(color=#fdfdfd) chroma(color=#fcfcfc) chroma(color=#fbfbfb) chroma(color=#fafafa) chroma(color=#f9f9f9) chroma(color=#f8f8f8) chroma(color=#f7f7f7) chroma(color=#f6f6f6) chroma(color=#f5f5f5) chroma(color=#f4f4f4) chroma(color=#f3f3f3) mask(color=#010101); + } + .WebFX-ContextMenu-Disabled-Over .WebFX-ContextMenu-DisabledContainer .WebFX-ContextMenu-DisabledContainer {} \ No newline at end of file diff --git a/src/dede/js/dedeajax.js b/src/admin/js/dedeajax.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/dedeajax.js rename to src/admin/js/dedeajax.js index df883d07..f140fbc9 --- a/src/dede/js/dedeajax.js +++ b/src/admin/js/dedeajax.js @@ -1,146 +1,146 @@ -/** - * - * @version $Id: dedeajax.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -//xmlhttp和xmldom对象 -DedeXHTTP = null; -DedeXDOM = null; -DedeContainer = null; - -//获取指定ID的元素 -function $(eid) { - return document.getElementById(eid); -} - -function $DE(id) { - return document.getElementById(id); -} - -//参数 gcontainer 是保存下载完成的内容的容器 - -function DedeAjax(gcontainer) { - - DedeContainer = gcontainer; - - //post或get发送数据的键值对 - this.keys = Array(); - this.values = Array(); - this.keyCount = -1; - - //http请求头 - this.rkeys = Array(); - this.rvalues = Array(); - this.rkeyCount = -1; - //请求头类型 - this.rtype = 'text'; - - //初始化xmlhttp - if (window.ActiveXObject) {//IE6、IE5 - try { DedeXHTTP = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { } - if (DedeXHTTP == null) try { DedeXHTTP = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } - } - else { - DedeXHTTP = new XMLHttpRequest(); - } - - DedeXHTTP.onreadystatechange = function () { - if (DedeXHTTP.readyState == 4) { - if (DedeXHTTP.status == 200) { - DedeContainer.innerHTML = DedeXHTTP.responseText; - DedeXHTTP = null; - } else DedeContainer.innerHTML = "下载数据失败"; - } else DedeContainer.innerHTML = "正在下载数据..."; - }; - - //增加一个POST或GET键值对 - this.AddKey = function (skey, svalue) { - this.keyCount++; - this.keys[this.keyCount] = skey; - this.values[this.keyCount] = escape(svalue); - }; - - //增加一个Http请求头键值对 - this.AddHead = function (skey, svalue) { - this.rkeyCount++; - this.rkeys[this.rkeyCount] = skey; - this.rvalues[this.rkeyCount] = svalue; - }; - - //清除当前对象的哈希表参数 - this.ClearSet = function () { - this.keyCount = -1; - this.keys = Array(); - this.values = Array(); - this.rkeyCount = -1; - this.rkeys = Array(); - this.rvalues = Array(); - }; - - //发送http请求头 - this.SendHead = function () { - if (this.rkeyCount != -1) { //发送用户自行设定的请求头 - for (; i <= this.rkeyCount; i++) { - DedeXHTTP.setRequestHeader(this.rkeys[i], this.rvalues[i]); - } - } - if (this.rtype == 'binary') { - DedeXHTTP.setRequestHeader("Content-Type", "multipart/form-data"); - } else { - DedeXHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - } - }; - - //用Post方式发送数据 - this.SendPost = function (purl) { - var pdata = ""; - var i = 0; - this.state = 0; - DedeXHTTP.open("POST", purl, true); - this.SendHead(); - if (this.keyCount != -1) { //post数据 - for (; i <= this.keyCount; i++) { - if (pdata == "") pdata = this.keys[i] + '=' + this.values[i]; - else pdata += "&" + this.keys[i] + '=' + this.values[i]; - } - } - DedeXHTTP.send(pdata); - }; - - //用GET方式发送数据 - this.SendGet = function (purl) { - var gkey = ""; - var i = 0; - this.state = 0; - if (this.keyCount != -1) { //get参数 - for (; i <= this.keyCount; i++) { - if (gkey == "") gkey = this.keys[i] + '=' + this.values[i]; - else gkey += "&" + this.keys[i] + '=' + this.values[i]; - } - if (purl.indexOf('?') == -1) purl = purl + '?' + gkey; - else purl = purl + '&' + gkey; - } - DedeXHTTP.open("GET", purl, true); - this.SendHead(); - DedeXHTTP.send(null); - }; - -} // End Class DedeAjax - -//初始化xmldom -function InitXDom() { - if (DedeXDOM != null) return; - var obj = null; - if (typeof (DOMParser) != "undefined") { // Gecko、Mozilla、Firefox - var parser = new DOMParser(); - obj = parser.parseFromString(xmlText, "text/xml"); - } else { // IE - try { obj = new ActiveXObject("MSXML2.DOMDocument"); } catch (e) { } - if (obj == null) try { obj = new ActiveXObject("Microsoft.XMLDOM"); } catch (e) { } - } - DedeXDOM = obj; -}; +/** + * + * @version $Id: dedeajax.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + +//xmlhttp和xmldom对象 +DedeXHTTP = null; +DedeXDOM = null; +DedeContainer = null; + +//获取指定ID的元素 +function $(eid) { + return document.getElementById(eid); +} + +function $DE(id) { + return document.getElementById(id); +} + +//参数 gcontainer 是保存下载完成的内容的容器 + +function DedeAjax(gcontainer) { + + DedeContainer = gcontainer; + + //post或get发送数据的键值对 + this.keys = Array(); + this.values = Array(); + this.keyCount = -1; + + //http请求头 + this.rkeys = Array(); + this.rvalues = Array(); + this.rkeyCount = -1; + //请求头类型 + this.rtype = 'text'; + + //初始化xmlhttp + if (window.ActiveXObject) {//IE6、IE5 + try { DedeXHTTP = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { } + if (DedeXHTTP == null) try { DedeXHTTP = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } + } + else { + DedeXHTTP = new XMLHttpRequest(); + } + + DedeXHTTP.onreadystatechange = function () { + if (DedeXHTTP.readyState == 4) { + if (DedeXHTTP.status == 200) { + DedeContainer.innerHTML = DedeXHTTP.responseText; + DedeXHTTP = null; + } else DedeContainer.innerHTML = "下载数据失败"; + } else DedeContainer.innerHTML = "正在下载数据..."; + }; + + //增加一个POST或GET键值对 + this.AddKey = function (skey, svalue) { + this.keyCount++; + this.keys[this.keyCount] = skey; + this.values[this.keyCount] = escape(svalue); + }; + + //增加一个Http请求头键值对 + this.AddHead = function (skey, svalue) { + this.rkeyCount++; + this.rkeys[this.rkeyCount] = skey; + this.rvalues[this.rkeyCount] = svalue; + }; + + //清除当前对象的哈希表参数 + this.ClearSet = function () { + this.keyCount = -1; + this.keys = Array(); + this.values = Array(); + this.rkeyCount = -1; + this.rkeys = Array(); + this.rvalues = Array(); + }; + + //发送http请求头 + this.SendHead = function () { + if (this.rkeyCount != -1) { //发送用户自行设定的请求头 + for (; i <= this.rkeyCount; i++) { + DedeXHTTP.setRequestHeader(this.rkeys[i], this.rvalues[i]); + } + } + if (this.rtype == 'binary') { + DedeXHTTP.setRequestHeader("Content-Type", "multipart/form-data"); + } else { + DedeXHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + } + }; + + //用Post方式发送数据 + this.SendPost = function (purl) { + var pdata = ""; + var i = 0; + this.state = 0; + DedeXHTTP.open("POST", purl, true); + this.SendHead(); + if (this.keyCount != -1) { //post数据 + for (; i <= this.keyCount; i++) { + if (pdata == "") pdata = this.keys[i] + '=' + this.values[i]; + else pdata += "&" + this.keys[i] + '=' + this.values[i]; + } + } + DedeXHTTP.send(pdata); + }; + + //用GET方式发送数据 + this.SendGet = function (purl) { + var gkey = ""; + var i = 0; + this.state = 0; + if (this.keyCount != -1) { //get参数 + for (; i <= this.keyCount; i++) { + if (gkey == "") gkey = this.keys[i] + '=' + this.values[i]; + else gkey += "&" + this.keys[i] + '=' + this.values[i]; + } + if (purl.indexOf('?') == -1) purl = purl + '?' + gkey; + else purl = purl + '&' + gkey; + } + DedeXHTTP.open("GET", purl, true); + this.SendHead(); + DedeXHTTP.send(null); + }; + +} // End Class DedeAjax + +//初始化xmldom +function InitXDom() { + if (DedeXDOM != null) return; + var obj = null; + if (typeof (DOMParser) != "undefined") { // Gecko、Mozilla、Firefox + var parser = new DOMParser(); + obj = parser.parseFromString(xmlText, "text/xml"); + } else { // IE + try { obj = new ActiveXObject("MSXML2.DOMDocument"); } catch (e) { } + if (obj == null) try { obj = new ActiveXObject("Microsoft.XMLDOM"); } catch (e) { } + } + DedeXDOM = obj; +}; diff --git a/src/dede/js/dialog.js b/src/admin/js/dialog.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/dialog.js rename to src/admin/js/dialog.js index 2f0542fe..749cd396 --- a/src/dede/js/dialog.js +++ b/src/admin/js/dialog.js @@ -1,126 +1,126 @@ -/** - * - * @version $Id: dialog.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -document.write("") -function editTitle(aid) { - var show = document.getElementById("show_news"); - var myajax = new DedeAjax(show, false, false, "", "", ""); - myajax.SendGet2("catalog_edit.php?dopost=time&id=" + aid); - DedeXHTTP = null; -} -function $Dede(id) { return document.getElementById(id) } -function AlertMsg(title, id) { - var msgw, msgh, msgbg, msgcolor, bordercolor, titlecolor, titlebg, content; - //弹出窗口设置 - msgw = 600;//窗口宽度 - msgbg = "#FFF";//内容背景 - msgcolor = "#000";//内容颜色 - bordercolor = "#5A6D58";//边框颜色 - titlecolor = "#254015";//标题颜色 - titlebg = "#369 url(images/tbg.gif)";//标题背景 - //遮罩背景设置 - content = "
对不起,载入失败
"; - var sWidth, sHeight; - sWidth = screen.availWidth; - if (screen.availHeight > document.body.scrollHeight) { - sHeight = screen.availHeight;//少于一屏 - } else { - sHeight = document.body.scrollHeight;//多于一屏 - } - //创建遮罩背景 - var maskObj = document.createElement("div"); - maskObj.setAttribute('id', 'maskdiv'); - maskObj.style.position = "absolute"; - maskObj.style.top = "0"; - maskObj.style.left = "0"; - maskObj.style.background = "#666"; - maskObj.style.filter = "Alpha(opacity=30);"; - maskObj.style.opacity = "0.3"; - maskObj.style.width = sWidth + "px"; - maskObj.style.height = sHeight + "px"; - maskObj.style.zIndex = "10000"; - document.body.appendChild(maskObj); - //创建弹出窗口 - var msgObj = document.createElement("div") - msgObj.setAttribute("id", "msgdiv"); - msgObj.style.position = "absolute"; - //msgObj.style.top = (screen.availHeight - msgh) / 4 + "px"; - //msgObj.style.left = (screen.availWidth - msgw) / 2 + "px"; - msgObj.style.top = "100px"; - msgObj.style.left = "100px"; - msgObj.style.width = msgw + "px"; - msgObj.style.height = msgh + "px"; - msgObj.style.fontSize = "14px"; - msgObj.style.background = msgbg; - msgObj.style.border = "1px solid " + bordercolor; - msgObj.style.zIndex = "10001"; - //创建标题 - var thObj = document.createElement("div"); - thObj.setAttribute("id", "msgth"); - thObj.className = "DragAble"; - thObj.title = "按住鼠标左键可以拖动窗口"; - thObj.style.cursor = "move"; - thObj.style.padding = "10px"; - thObj.style.color = titlecolor; - thObj.style.fontWeight = 'bold'; - thObj.style.background = titlebg; - var titleStr = "关闭" + "" + title + ""; - thObj.innerHTML = titleStr; - //创建内容 - var bodyObj = document.createElement("div"); - bodyObj.setAttribute("id", "msgbody"); - bodyObj.style.padding = "0px"; - bodyObj.style.lineHeight = "1.5em"; - var txt = document.createTextNode(content); - bodyObj.appendChild(txt); - bodyObj.innerHTML = content; - //生成窗口 - document.body.appendChild(msgObj); - $Dede("msgdiv").appendChild(thObj); - $Dede("msgdiv").appendChild(bodyObj); - editTitle(id); -} -function CloseMsg() { - //移除对象 - document.body.removeChild($Dede("maskdiv")); - $Dede("msgdiv").removeChild($Dede("msgth")); - $Dede("msgdiv").removeChild($Dede("msgbody")); - document.body.removeChild($Dede("msgdiv")); -} -//拖动窗口 -var ie = document.all; -var nn6 = document.getElementById && !document.all; -var isdrag = false; -var y, x; -var oDragObj; -function moveMouse(e) { - if (isdrag) { - oDragObj.style.top = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) + "px"; - oDragObj.style.left = (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x) + "px"; - return false; - } -} -function initDrag(e) { - var oDragHandle = nn6 ? e.target : event.srcElement; - var topElement = "HTML"; - while (oDragHandle.tagName != topElement && oDragHandle.className != "DragAble") { - oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement; - } - if (oDragHandle.className == "DragAble") { - isdrag = true; - oDragObj = oDragHandle.parentNode; - nTY = parseInt(oDragObj.style.top); - y = nn6 ? e.clientY : event.clientY; - nTX = parseInt(oDragObj.style.left); - x = nn6 ? e.clientX : event.clientX; - document.onmousemove = moveMouse; - return false; - } -} -document.onmousedown = initDrag; +/** + * + * @version $Id: dialog.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +document.write("") +function editTitle(aid) { + var show = document.getElementById("show_news"); + var myajax = new DedeAjax(show, false, false, "", "", ""); + myajax.SendGet2("catalog_edit.php?dopost=time&id=" + aid); + DedeXHTTP = null; +} +function $Dede(id) { return document.getElementById(id) } +function AlertMsg(title, id) { + var msgw, msgh, msgbg, msgcolor, bordercolor, titlecolor, titlebg, content; + //弹出窗口设置 + msgw = 600;//窗口宽度 + msgbg = "#FFF";//内容背景 + msgcolor = "#000";//内容颜色 + bordercolor = "#5A6D58";//边框颜色 + titlecolor = "#254015";//标题颜色 + titlebg = "#369 url(images/tbg.gif)";//标题背景 + //遮罩背景设置 + content = "
对不起,载入失败
"; + var sWidth, sHeight; + sWidth = screen.availWidth; + if (screen.availHeight > document.body.scrollHeight) { + sHeight = screen.availHeight;//少于一屏 + } else { + sHeight = document.body.scrollHeight;//多于一屏 + } + //创建遮罩背景 + var maskObj = document.createElement("div"); + maskObj.setAttribute('id', 'maskdiv'); + maskObj.style.position = "absolute"; + maskObj.style.top = "0"; + maskObj.style.left = "0"; + maskObj.style.background = "#666"; + maskObj.style.filter = "Alpha(opacity=30);"; + maskObj.style.opacity = "0.3"; + maskObj.style.width = sWidth + "px"; + maskObj.style.height = sHeight + "px"; + maskObj.style.zIndex = "10000"; + document.body.appendChild(maskObj); + //创建弹出窗口 + var msgObj = document.createElement("div") + msgObj.setAttribute("id", "msgdiv"); + msgObj.style.position = "absolute"; + //msgObj.style.top = (screen.availHeight - msgh) / 4 + "px"; + //msgObj.style.left = (screen.availWidth - msgw) / 2 + "px"; + msgObj.style.top = "100px"; + msgObj.style.left = "100px"; + msgObj.style.width = msgw + "px"; + msgObj.style.height = msgh + "px"; + msgObj.style.fontSize = "14px"; + msgObj.style.background = msgbg; + msgObj.style.border = "1px solid " + bordercolor; + msgObj.style.zIndex = "10001"; + //创建标题 + var thObj = document.createElement("div"); + thObj.setAttribute("id", "msgth"); + thObj.className = "DragAble"; + thObj.title = "按住鼠标左键可以拖动窗口"; + thObj.style.cursor = "move"; + thObj.style.padding = "10px"; + thObj.style.color = titlecolor; + thObj.style.fontWeight = 'bold'; + thObj.style.background = titlebg; + var titleStr = "关闭" + "" + title + ""; + thObj.innerHTML = titleStr; + //创建内容 + var bodyObj = document.createElement("div"); + bodyObj.setAttribute("id", "msgbody"); + bodyObj.style.padding = "0px"; + bodyObj.style.lineHeight = "1.5em"; + var txt = document.createTextNode(content); + bodyObj.appendChild(txt); + bodyObj.innerHTML = content; + //生成窗口 + document.body.appendChild(msgObj); + $Dede("msgdiv").appendChild(thObj); + $Dede("msgdiv").appendChild(bodyObj); + editTitle(id); +} +function CloseMsg() { + //移除对象 + document.body.removeChild($Dede("maskdiv")); + $Dede("msgdiv").removeChild($Dede("msgth")); + $Dede("msgdiv").removeChild($Dede("msgbody")); + document.body.removeChild($Dede("msgdiv")); +} +//拖动窗口 +var ie = document.all; +var nn6 = document.getElementById && !document.all; +var isdrag = false; +var y, x; +var oDragObj; +function moveMouse(e) { + if (isdrag) { + oDragObj.style.top = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) + "px"; + oDragObj.style.left = (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x) + "px"; + return false; + } +} +function initDrag(e) { + var oDragHandle = nn6 ? e.target : event.srcElement; + var topElement = "HTML"; + while (oDragHandle.tagName != topElement && oDragHandle.className != "DragAble") { + oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement; + } + if (oDragHandle.className == "DragAble") { + isdrag = true; + oDragObj = oDragHandle.parentNode; + nTY = parseInt(oDragObj.style.top); + y = nn6 ? e.clientY : event.clientY; + nTX = parseInt(oDragObj.style.left); + x = nn6 ? e.clientX : event.clientX; + document.onmousemove = moveMouse; + return false; + } +} +document.onmousedown = initDrag; document.onmouseup = new Function("isdrag=false"); \ No newline at end of file diff --git a/src/dede/js/diy.js b/src/admin/js/diy.js old mode 100755 new mode 100644 similarity index 85% rename from src/dede/js/diy.js rename to src/admin/js/diy.js index 3505d9b2..2d6b2d15 --- a/src/dede/js/diy.js +++ b/src/admin/js/diy.js @@ -1,15 +1,15 @@ -/** - * - * @version $Id: diy.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - - -function showHide2(objname) { - var obj = $Obj(objname); - if (obj.style.display != 'block') { obj.style.display = 'block' } - else { obj.style.display = 'none'; } +/** + * + * @version $Id: diy.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + + +function showHide2(objname) { + var obj = $Obj(objname); + if (obj.style.display != 'block') { obj.style.display = 'block' } + else { obj.style.display = 'none'; } } \ No newline at end of file diff --git a/src/dede/js/drag.js b/src/admin/js/drag.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/drag.js rename to src/admin/js/drag.js index 7a744d9d..25ea02ab --- a/src/dede/js/drag.js +++ b/src/admin/js/drag.js @@ -1,52 +1,52 @@ -var $ = jQuery; -var disabelsort = true; //是否停止使用块级移动 -$(function(){ - $('.dbox') - .each(function(){ - $(this).hover(function(){ - $(this).find('dt').addClass('collapse'); - }, function(){ - $(this).find('dt').removeClass('collapse'); - }) - //.find('h2').hover(function(){ - // $(this).find('.configure').css('visibility', 'visible'); - //}, function(){ - // $(this).find('.configure').css('visibility', 'hidden'); - //}) - .click(function(){ - $(this).siblings('dd').toggle(); - }) - .end() - //.find('.configure').css('visibility', 'hidden'); - }); - $('.column').sortable({ - connectWith: '.column', - handle: 'dt', - disable:true, - cursor: 'pointer', - placeholder: 'placeholder', - forcePlaceholderSize: true, - opacity: 0.4, - stop: function(event, ui){ - $(ui.item).find('h2').click(); - var items=[]; - $('.column').each(function(){ - var columnId=$(this).attr('id'); - $('.dbox', this).each(function(i){ - var item={ - id: $(this).attr('id'), - order : i, - column: columnId - }; - items.push(item); - }); - }); - var sortorder = { items: items }; - $.post('index_body.php?dopost=movesave', 'sortorder='+$.toJSON(sortorder), function(response){ - }); - } - }) - .disableSelection(); - if(disabelsort) $('.column').sortable("option", "disabled", true ); -}); - +var $ = jQuery; +var disabelsort = true; //是否停止使用块级移动 +$(function(){ + $('.dbox') + .each(function(){ + $(this).hover(function(){ + $(this).find('dt').addClass('collapse'); + }, function(){ + $(this).find('dt').removeClass('collapse'); + }) + //.find('h2').hover(function(){ + // $(this).find('.configure').css('visibility', 'visible'); + //}, function(){ + // $(this).find('.configure').css('visibility', 'hidden'); + //}) + .click(function(){ + $(this).siblings('dd').toggle(); + }) + .end() + //.find('.configure').css('visibility', 'hidden'); + }); + $('.column').sortable({ + connectWith: '.column', + handle: 'dt', + disable:true, + cursor: 'pointer', + placeholder: 'placeholder', + forcePlaceholderSize: true, + opacity: 0.4, + stop: function(event, ui){ + $(ui.item).find('h2').click(); + var items=[]; + $('.column').each(function(){ + var columnId=$(this).attr('id'); + $('.dbox', this).each(function(i){ + var item={ + id: $(this).attr('id'), + order : i, + column: columnId + }; + items.push(item); + }); + }); + var sortorder = { items: items }; + $.post('index_body.php?dopost=movesave', 'sortorder='+$.toJSON(sortorder), function(response){ + }); + } + }) + .disableSelection(); + if(disabelsort) $('.column').sortable("option", "disabled", true ); +}); + diff --git a/src/dede/js/float.js b/src/admin/js/float.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/float.js rename to src/admin/js/float.js index b651799e..0fdf2ba6 --- a/src/dede/js/float.js +++ b/src/admin/js/float.js @@ -1,108 +1,108 @@ -/** - * - * @version $Id: float.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -self.onError=null; -currentX = currentY = 0; -whichIt = null; -lastScrollX = 0; lastScrollY = 0; -NS = (document.layers) ? 1 : 0; -IE = (document.all) ? 1 : 0; -function heartBeat() { - if (IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; } - if (NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } - if (diffY != lastScrollY) { - percent = .1 * (diffY - lastScrollY); - if (percent > 0) percent = Math.ceil(percent); - else percent = Math.floor(percent); - if (IE) document.all.floater.style.pixelTop += percent; - if (NS) document.floater.top += percent; - lastScrollY = lastScrollY + percent; - } if (diffX != lastScrollX) { - percent = .1 * (diffX - lastScrollX); - if (percent > 0) percent = Math.ceil(percent); - else percent = Math.floor(percent); - if (IE) document.all.floater.style.pixelLeft += percent; - if (NS) document.floater.left += percent; - lastScrollX = lastScrollX + percent; - } - -} - -function checkFocus(x, y) { - stalkerx = document.floater.pageX; - stalkery = document.floater.pageY; - stalkerwidth = document.floater.clip.width; - stalkerheight = document.floater.clip.height; - if ((x > stalkerx && x < (stalkerx + stalkerwidth)) && (y > stalkery && y < (stalkery + stalkerheight))) return true; - else return false; -} - -function grabIt(e) { - if (IE) { - whichIt = event.srcElement; - while (whichIt.id.indexOf("floater") == -1) { - whichIt = whichIt.parentElement; - if (whichIt == null) { return true; } - } - whichIt.style.pixelLeft = whichIt.offsetLeft; - whichIt.style.pixelTop = whichIt.offsetTop; - currentX = (event.clientX + document.body.scrollLeft); - currentY = (event.clientY + document.body.scrollTop); - } else { - window.captureEvents(Event.MOUSEMOVE); - if (checkFocus(e.pageX, e.pageY)) { - whichIt = document.floater; - StalkerTouchedX = e.pageX - document.floater.pageX; - StalkerTouchedY = e.pageY - document.floater.pageY; - } - } return true; -} - -function moveIt(e) { - - if (whichIt == null) { return false; } - if (IE) { - newX = (event.clientX + document.body.scrollLeft); - newY = (event.clientY + document.body.scrollTop); - distanceX = (newX - currentX); distanceY = (newY - currentY); - currentX = newX; currentY = newY; - whichIt.style.pixelLeft += distanceX; - whichIt.style.pixelTop += distanceY; - if (whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop; - if (whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft; - if (whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20; - if (whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5; - event.returnValue = false; - } else { - whichIt.moveTo(e.pageX - StalkerTouchedX, e.pageY - StalkerTouchedY); - if (whichIt.left < 0 + self.pageXOffset) whichIt.left = 0 + self.pageXOffset; - if (whichIt.top < 0 + self.pageYOffset) whichIt.top = 0 + self.pageYOffset; - if ((whichIt.left + whichIt.clip.width) >= (window.innerWidth + self.pageXOffset - 17)) whichIt.left = ((window.innerWidth + self.pageXOffset) - whichIt.clip.width) - 17; - if ((whichIt.top + whichIt.clip.height) >= (window.innerHeight + self.pageYOffset + 50)) whichIt.top = ((window.innerHeight + self.pageYOffset) - whichIt.clip.height) - 17; - return false; - } - return false; -} - -function dropIt() { - whichIt = null; - if (NS) window.releaseEvents(Event.MOUSEMOVE); - return true; -} -if (NS) { - window.captureEvents(Event.MOUSEUPEvent.MOUSEDOWN); - window.onmousedown = grabIt; - window.onmousemove = moveIt; - window.onmouseup = dropIt; -} -if (IE) { - document.onmousedown = grabIt; - document.onmousemove = moveIt; - document.onmouseup = dropIt; -} +/** + * + * @version $Id: float.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +self.onError=null; +currentX = currentY = 0; +whichIt = null; +lastScrollX = 0; lastScrollY = 0; +NS = (document.layers) ? 1 : 0; +IE = (document.all) ? 1 : 0; +function heartBeat() { + if (IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; } + if (NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } + if (diffY != lastScrollY) { + percent = .1 * (diffY - lastScrollY); + if (percent > 0) percent = Math.ceil(percent); + else percent = Math.floor(percent); + if (IE) document.all.floater.style.pixelTop += percent; + if (NS) document.floater.top += percent; + lastScrollY = lastScrollY + percent; + } if (diffX != lastScrollX) { + percent = .1 * (diffX - lastScrollX); + if (percent > 0) percent = Math.ceil(percent); + else percent = Math.floor(percent); + if (IE) document.all.floater.style.pixelLeft += percent; + if (NS) document.floater.left += percent; + lastScrollX = lastScrollX + percent; + } + +} + +function checkFocus(x, y) { + stalkerx = document.floater.pageX; + stalkery = document.floater.pageY; + stalkerwidth = document.floater.clip.width; + stalkerheight = document.floater.clip.height; + if ((x > stalkerx && x < (stalkerx + stalkerwidth)) && (y > stalkery && y < (stalkery + stalkerheight))) return true; + else return false; +} + +function grabIt(e) { + if (IE) { + whichIt = event.srcElement; + while (whichIt.id.indexOf("floater") == -1) { + whichIt = whichIt.parentElement; + if (whichIt == null) { return true; } + } + whichIt.style.pixelLeft = whichIt.offsetLeft; + whichIt.style.pixelTop = whichIt.offsetTop; + currentX = (event.clientX + document.body.scrollLeft); + currentY = (event.clientY + document.body.scrollTop); + } else { + window.captureEvents(Event.MOUSEMOVE); + if (checkFocus(e.pageX, e.pageY)) { + whichIt = document.floater; + StalkerTouchedX = e.pageX - document.floater.pageX; + StalkerTouchedY = e.pageY - document.floater.pageY; + } + } return true; +} + +function moveIt(e) { + + if (whichIt == null) { return false; } + if (IE) { + newX = (event.clientX + document.body.scrollLeft); + newY = (event.clientY + document.body.scrollTop); + distanceX = (newX - currentX); distanceY = (newY - currentY); + currentX = newX; currentY = newY; + whichIt.style.pixelLeft += distanceX; + whichIt.style.pixelTop += distanceY; + if (whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop; + if (whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft; + if (whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20; + if (whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5; + event.returnValue = false; + } else { + whichIt.moveTo(e.pageX - StalkerTouchedX, e.pageY - StalkerTouchedY); + if (whichIt.left < 0 + self.pageXOffset) whichIt.left = 0 + self.pageXOffset; + if (whichIt.top < 0 + self.pageYOffset) whichIt.top = 0 + self.pageYOffset; + if ((whichIt.left + whichIt.clip.width) >= (window.innerWidth + self.pageXOffset - 17)) whichIt.left = ((window.innerWidth + self.pageXOffset) - whichIt.clip.width) - 17; + if ((whichIt.top + whichIt.clip.height) >= (window.innerHeight + self.pageYOffset + 50)) whichIt.top = ((window.innerHeight + self.pageYOffset) - whichIt.clip.height) - 17; + return false; + } + return false; +} + +function dropIt() { + whichIt = null; + if (NS) window.releaseEvents(Event.MOUSEMOVE); + return true; +} +if (NS) { + window.captureEvents(Event.MOUSEUPEvent.MOUSEDOWN); + window.onmousedown = grabIt; + window.onmousemove = moveIt; + window.onmouseup = dropIt; +} +if (IE) { + document.onmousedown = grabIt; + document.onmousemove = moveIt; + document.onmouseup = dropIt; +} if (NS || IE) action = window.setInterval("heartBeat()", 1); \ No newline at end of file diff --git a/src/dede/js/frame.js b/src/admin/js/frame.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/frame.js rename to src/admin/js/frame.js index 5c5c8a93..38d2cb2e --- a/src/dede/js/frame.js +++ b/src/admin/js/frame.js @@ -1,149 +1,149 @@ -var $ = jQuery; -var thespeed = 5; -var navIE = document.all && navigator.userAgent.indexOf("Firefox") == -1; -var myspeed = 0; -$(function () { - - //快捷菜单 - bindQuickMenu(); - - //左侧菜单开关 - LeftMenuToggle(); - - //全部功能开关 - AllMenuToggle(); - - //取消菜单链接虚线 - $(".head").find("a").click(function () { $(this).blur() }); - $(".menu").find("a").click(function () { $(this).blur() }); - - -}).keydown(function (event) {//快捷键 - if (event.keyCode == 116) { - //url = $("#main").attr("src"); - //main.location.href = url; - //return false; - } - if (event.keyCode == 27) { - $("#qucikmenu").slideToggle("fast") - } -}); - -function bindQuickMenu() {//快捷菜单 - $("#ac_qucikmenu").bind("mouseenter", function () { - $("#qucikmenu").slideDown("fast"); - }).dblclick(function () { - $("#qucikmenu").slideToggle("fast"); - }).bind("mouseleave", function () { - hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700); - $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); }); - }); - $("#qucikmenu").bind("mouseleave", function () { - hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700); - $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); }); - }).find("a").click(function () { - $(this).blur(); - $("#qucikmenu").slideUp("fast"); - //$("#ac_qucikmenu").text($(this).text()); - }); -} - -function LeftMenuToggle() {//左侧菜单开关 - $("#togglemenu").click(function () { - if ($("body").attr("class") == "showmenu") { - $("body").attr("class", "hidemenu"); - $(this).html("显示菜单"); - } else { - $("body").attr("class", "showmenu"); - $(this).html("隐藏菜单"); - } - }); -} - - -function AllMenuToggle() {//全部功能开关 - mask = $(".pagemask,.iframemask,.allmenu"); - $("#allmenu").click(function () { - mask.show(); - }); - //mask.mousedown(function(){alert("123");}); - mask.click(function () { mask.hide(); }); -} - -function AC(act) { - //alert(act); - mlink = $("a[id='" + act + "']"); - if (mlink.size() > 0) { - box = mlink.parents("div[id^='menu_']"); - boxid = box.attr("id").substring(5, 128); - if ($("body").attr("class") != "showmenu") $("#togglemenu").click(); - if (mlink.attr("_url")) { - $("#menu").find("div[id^=menu]").hide(); - box.show(); - mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); - if ($("#mod_" + boxid).attr("class") == "") { - $("#nav").find("a").removeClass("thisclass"); - $("#nav").find("a[id='mod_" + boxid + "']").addClass("thisclass").blur(); - } - main.location.href = mlink.attr("_url"); - } else if (mlink.attr("_open") && mlink.attr("_open") != undefined) { - window.open(mlink.attr("_open")); - } - } -} - -/********************* - * 滚动按钮设置 -*********************/ - -function scrollwindow() { - parent.frames['menu'].scrollBy(0, myspeed); -} - -function initializeIT() { - if (myspeed != 0) { - scrollwindow(); - } -} - - -//滚动插件 -/* -(function($){ - $.fn.extend({ - Scroll:function(opt,callback){ - //参数初始化 - if(!opt) var opt={}; - var _this=this.eq(0).find("ul:first"); - var lineH=_this.find("li:first").height(), //获取行高 - line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数,默认为一屏,即父容器高度 - speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度,数值越大,速度越慢(毫秒) - timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔(毫秒) - if(line==0) line=1; - var upHeight=0-line*lineH; - //滚动函数 - scrollUp=function(){ - _this.animate({ - marginTop:upHeight - },speed,function(){ - for(i=1;i<=line;i++){ - _this.find("li:first").appendTo(_this); - } - _this.css({marginTop:0}); - }); - } - //鼠标事件绑定 - var timerID; - timerID=setInterval("scrollUp()",timer); - _this.mouseover(function(){ - clearInterval(timerID); - }).mouseout(function(){ - timerID=setInterval("scrollUp()",timer); - }); - } - }) -})(jQuery); -*/ - - - +var $ = jQuery; +var thespeed = 5; +var navIE = document.all && navigator.userAgent.indexOf("Firefox") == -1; +var myspeed = 0; +$(function () { + + //快捷菜单 + bindQuickMenu(); + + //左侧菜单开关 + LeftMenuToggle(); + + //全部功能开关 + AllMenuToggle(); + + //取消菜单链接虚线 + $(".head").find("a").click(function () { $(this).blur() }); + $(".menu").find("a").click(function () { $(this).blur() }); + + +}).keydown(function (event) {//快捷键 + if (event.keyCode == 116) { + //url = $("#main").attr("src"); + //main.location.href = url; + //return false; + } + if (event.keyCode == 27) { + $("#qucikmenu").slideToggle("fast") + } +}); + +function bindQuickMenu() {//快捷菜单 + $("#ac_qucikmenu").bind("mouseenter", function () { + $("#qucikmenu").slideDown("fast"); + }).dblclick(function () { + $("#qucikmenu").slideToggle("fast"); + }).bind("mouseleave", function () { + hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700); + $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); }); + }); + $("#qucikmenu").bind("mouseleave", function () { + hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700); + $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); }); + }).find("a").click(function () { + $(this).blur(); + $("#qucikmenu").slideUp("fast"); + //$("#ac_qucikmenu").text($(this).text()); + }); +} + +function LeftMenuToggle() {//左侧菜单开关 + $("#togglemenu").click(function () { + if ($("body").attr("class") == "showmenu") { + $("body").attr("class", "hidemenu"); + $(this).html("显示菜单"); + } else { + $("body").attr("class", "showmenu"); + $(this).html("隐藏菜单"); + } + }); +} + + +function AllMenuToggle() {//全部功能开关 + mask = $(".pagemask,.iframemask,.allmenu"); + $("#allmenu").click(function () { + mask.show(); + }); + //mask.mousedown(function(){alert("123");}); + mask.click(function () { mask.hide(); }); +} + +function AC(act) { + //alert(act); + mlink = $("a[id='" + act + "']"); + if (mlink.size() > 0) { + box = mlink.parents("div[id^='menu_']"); + boxid = box.attr("id").substring(5, 128); + if ($("body").attr("class") != "showmenu") $("#togglemenu").click(); + if (mlink.attr("_url")) { + $("#menu").find("div[id^=menu]").hide(); + box.show(); + mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); + if ($("#mod_" + boxid).attr("class") == "") { + $("#nav").find("a").removeClass("thisclass"); + $("#nav").find("a[id='mod_" + boxid + "']").addClass("thisclass").blur(); + } + main.location.href = mlink.attr("_url"); + } else if (mlink.attr("_open") && mlink.attr("_open") != undefined) { + window.open(mlink.attr("_open")); + } + } +} + +/********************* + * 滚动按钮设置 +*********************/ + +function scrollwindow() { + parent.frames['menu'].scrollBy(0, myspeed); +} + +function initializeIT() { + if (myspeed != 0) { + scrollwindow(); + } +} + + +//滚动插件 +/* +(function($){ + $.fn.extend({ + Scroll:function(opt,callback){ + //参数初始化 + if(!opt) var opt={}; + var _this=this.eq(0).find("ul:first"); + var lineH=_this.find("li:first").height(), //获取行高 + line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数,默认为一屏,即父容器高度 + speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度,数值越大,速度越慢(毫秒) + timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔(毫秒) + if(line==0) line=1; + var upHeight=0-line*lineH; + //滚动函数 + scrollUp=function(){ + _this.animate({ + marginTop:upHeight + },speed,function(){ + for(i=1;i<=line;i++){ + _this.find("li:first").appendTo(_this); + } + _this.css({marginTop:0}); + }); + } + //鼠标事件绑定 + var timerID; + timerID=setInterval("scrollUp()",timer); + _this.mouseover(function(){ + clearInterval(timerID); + }).mouseout(function(){ + timerID=setInterval("scrollUp()",timer); + }); + } + }) +})(jQuery); +*/ + + + diff --git a/src/dede/js/global.js b/src/admin/js/global.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/global.js rename to src/admin/js/global.js index 17ac70c6..78844fcc --- a/src/dede/js/global.js +++ b/src/admin/js/global.js @@ -1,23 +1,23 @@ -var BROWSER = {}; -var USERAGENT = navigator.userAgent.toLowerCase(); -browserVersion({'ie':'msie','firefox':'','chrome':'','opera':'','safari':'','maxthon':'','mozilla':'','webkit':''}); -if(BROWSER.safari) { - BROWSER.firefox = true; -} -BROWSER.opera = BROWSER.opera ? opera.version() : 0; -function browserVersion(types) { - var other = 1; - for(i in types) { - var v = types[i] ? types[i] : i; - if(USERAGENT.indexOf(v) != -1) { - var re = new RegExp(v + '(\\/|\\s)([\\d\\.]+)', 'ig'); - var matches = re.exec(USERAGENT); - var ver = matches != null ? matches[2] : 0; - other = ver !== 0 ? 0 : other; - }else { - var ver = 0; - } - eval('BROWSER.' + i + '= ver'); - } - BROWSER.other = other; -} +var BROWSER = {}; +var USERAGENT = navigator.userAgent.toLowerCase(); +browserVersion({'ie':'msie','firefox':'','chrome':'','opera':'','safari':'','maxthon':'','mozilla':'','webkit':''}); +if(BROWSER.safari) { + BROWSER.firefox = true; +} +BROWSER.opera = BROWSER.opera ? opera.version() : 0; +function browserVersion(types) { + var other = 1; + for(i in types) { + var v = types[i] ? types[i] : i; + if(USERAGENT.indexOf(v) != -1) { + var re = new RegExp(v + '(\\/|\\s)([\\d\\.]+)', 'ig'); + var matches = re.exec(USERAGENT); + var ver = matches != null ? matches[2] : 0; + other = ver !== 0 ? 0 : other; + }else { + var ver = 0; + } + eval('BROWSER.' + i + '= ver'); + } + BROWSER.other = other; +} diff --git a/src/dede/js/handlers.js b/src/admin/js/handlers.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/handlers.js rename to src/admin/js/handlers.js index 53937d89..d372b279 --- a/src/dede/js/handlers.js +++ b/src/admin/js/handlers.js @@ -1,263 +1,263 @@ -/** - * - * @version $Id: handlers.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -//---事件句并------------------------------ -function fileQueueError(file, errorCode, message) { - try { - var imageName = "error.gif"; - var errorName = ""; - if (errorCode === SWFUpload.errorCode_QUEUE_LIMIT_EXCEEDED) { - errorName = "您添加的文件超过了限制"; - } - - if (errorName !== "") { - alert(errorName); - return; - } - - switch (errorCode) { - case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: - imageName = "zerobyte.gif"; - break; - case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT: - imageName = "toobig.gif"; - break; - case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: - case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE: - default: - alert(message); - break; - } - addImage("images/" + imageName, 0); - } catch (ex) { - this.debug(ex); - } - -} - -function fileDialogComplete(numFilesSelected, numFilesQueued) { - try { - if (numFilesQueued > 0) { - this.startUpload(); - } - } catch (ex) { - this.debug(ex); - } -} - -function uploadProgress(file, bytesLoaded) { - try { - var percent = Math.ceil((bytesLoaded / file.size) * 100); - var progress = new FileProgress(file, this.customSettings.upload_target); - progress.setProgress(percent); - if (percent === 100) { - progress.setStatus("创建缩略图..."); - progress.toggleCancel(false, this); - } else { - progress.setStatus("上传中..."); - progress.toggleCancel(true, this); - } - } catch (ex) { - this.debug(ex); - } -} - -function uploadSuccess(file, serverData) { - try { - var progress = new FileProgress(file, this.customSettings.upload_target); - - if (serverData.substring(0, 7) === "FILEID:") { - addImage("swfupload.php?dopost=thumbnail&id=" + serverData.substring(7), serverData.substring(7)); - - progress.setStatus("获取缩略图..."); - progress.toggleCancel(false); - } else { - addImage("images/error.gif", 0); - progress.setStatus("有错误"); - progress.toggleCancel(false); - alert(serverData); - - } - } catch (ex) { - this.debug(ex); - } -} - -function uploadComplete(file) { - try { - /* I want the next upload to continue automatically so I'll call startUpload here */ - if (this.getStats().files_queued > 0) { - this.startUpload(); - } else { - var progress = new FileProgress(file, this.customSettings.upload_target); - progress.setComplete(); - progress.setStatus("所有图片上传完成..."); - progress.toggleCancel(false); - } - } catch (ex) { - this.debug(ex); - } -} - -function uploadError(file, errorCode, message) { - var imageName = "error.gif"; - var progress; - try { - switch (errorCode) { - case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED: - try { - progress = new FileProgress(file, this.customSettings.upload_target); - progress.setCancelled(); - progress.setStatus("Cancelled"); - progress.toggleCancel(false); - } - catch (ex1) { - this.debug(ex1); - } - break; - case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED: - try { - progress = new FileProgress(file, this.customSettings.upload_target); - progress.setCancelled(); - progress.setStatus("Stopped"); - progress.toggleCancel(true); - } - catch (ex2) { - this.debug(ex2); - } - case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED: - imageName = "uploadlimit.gif"; - break; - default: - alert(message); - break; - } - - addImage("images/" + imageName, 0); - - } catch (ex3) { - this.debug(ex3); - } - -} - -var albImg = 0; -function addImage(src, pid) { - var newImgDiv = document.createElement("div"); - var delstr = ''; - var iptwidth = 190; - albImg++; - if (pid != 0) { - albImg = 'ok' + pid; - delstr = '[删除]'; - } else { - albImg = 'err' + albImg; - } - newImgDiv.className = 'albCt'; - newImgDiv.id = 'albCt' + albImg; - document.getElementById("thumbnails").appendChild(newImgDiv); - newImgDiv.innerHTML = '' + delstr; - if (typeof arctype != 'undefined' && arctype == 'article') { - iptwidth = 100; - if (pid != 0) { - newImgDiv.innerHTML = '' + delstr; - } - } - newImgDiv.innerHTML += '
注释:
'; -} - - -/* ****************************************** - * FileProgress Object - * Control object for displaying file info - * ****************************************** */ - -function FileProgress(file, targetID) { - this.fileProgressID = "divFileProgress"; - - this.fileProgressWrapper = document.getElementById(this.fileProgressID); - if (!this.fileProgressWrapper) { - this.fileProgressWrapper = document.createElement("div"); - this.fileProgressWrapper.className = "progressWrapper"; - this.fileProgressWrapper.id = this.fileProgressID; - - this.fileProgressElement = document.createElement("div"); - this.fileProgressElement.className = "progressContainer"; - - var progressCancel = document.createElement("a"); - progressCancel.className = "progressCancel"; - progressCancel.href = "#"; - progressCancel.style.visibility = "hidden"; - progressCancel.appendChild(document.createTextNode(" ")); - - var progressText = document.createElement("div"); - progressText.className = "progressName"; - progressText.appendChild(document.createTextNode(file.name)); - - var progressBar = document.createElement("div"); - progressBar.className = "progressBarInProgress"; - - var progressStatus = document.createElement("div"); - progressStatus.className = "progressBarStatus"; - progressStatus.innerHTML = " "; - - this.fileProgressElement.appendChild(progressCancel); - this.fileProgressElement.appendChild(progressText); - this.fileProgressElement.appendChild(progressStatus); - this.fileProgressElement.appendChild(progressBar); - - this.fileProgressWrapper.appendChild(this.fileProgressElement); - - document.getElementById(targetID).appendChild(this.fileProgressWrapper); - - } else { - this.fileProgressElement = this.fileProgressWrapper.firstChild; - this.fileProgressElement.childNodes[1].firstChild.nodeValue = file.name; - } - - this.height = this.fileProgressWrapper.offsetHeight; - -} -FileProgress.prototype.setProgress = function (percentage) { - this.fileProgressElement.className = "progressContainer blue"; - this.fileProgressElement.childNodes[3].className = "progressBarInProgress"; - this.fileProgressElement.childNodes[3].style.width = percentage + "%"; -}; -FileProgress.prototype.setComplete = function () { - this.fileProgressElement.className = "progressContainer green"; - this.fileProgressElement.childNodes[3].className = "progressBarComplete"; - this.fileProgressElement.childNodes[3].style.width = ""; - -}; -FileProgress.prototype.setError = function () { - this.fileProgressElement.className = "progressContainer red"; - this.fileProgressElement.childNodes[3].className = "progressBarError"; - this.fileProgressElement.childNodes[3].style.width = ""; - -}; -FileProgress.prototype.setCancelled = function () { - this.fileProgressElement.className = "progressContainer"; - this.fileProgressElement.childNodes[3].className = "progressBarError"; - this.fileProgressElement.childNodes[3].style.width = ""; - -}; -FileProgress.prototype.setStatus = function (status) { - this.fileProgressElement.childNodes[2].innerHTML = status; -}; - -FileProgress.prototype.toggleCancel = function (show, swfuploadInstance) { - this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden"; - if (swfuploadInstance) { - var fileID = this.fileProgressID; - this.fileProgressElement.childNodes[0].onclick = function () { - swfuploadInstance.cancelUpload(fileID); - return false; - }; - } -}; +/** + * + * @version $Id: handlers.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + +//---事件句并------------------------------ +function fileQueueError(file, errorCode, message) { + try { + var imageName = "error.gif"; + var errorName = ""; + if (errorCode === SWFUpload.errorCode_QUEUE_LIMIT_EXCEEDED) { + errorName = "您添加的文件超过了限制"; + } + + if (errorName !== "") { + alert(errorName); + return; + } + + switch (errorCode) { + case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: + imageName = "zerobyte.gif"; + break; + case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT: + imageName = "toobig.gif"; + break; + case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: + case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE: + default: + alert(message); + break; + } + addImage("images/" + imageName, 0); + } catch (ex) { + this.debug(ex); + } + +} + +function fileDialogComplete(numFilesSelected, numFilesQueued) { + try { + if (numFilesQueued > 0) { + this.startUpload(); + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadProgress(file, bytesLoaded) { + try { + var percent = Math.ceil((bytesLoaded / file.size) * 100); + var progress = new FileProgress(file, this.customSettings.upload_target); + progress.setProgress(percent); + if (percent === 100) { + progress.setStatus("创建缩略图..."); + progress.toggleCancel(false, this); + } else { + progress.setStatus("上传中..."); + progress.toggleCancel(true, this); + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadSuccess(file, serverData) { + try { + var progress = new FileProgress(file, this.customSettings.upload_target); + + if (serverData.substring(0, 7) === "FILEID:") { + addImage("swfupload.php?dopost=thumbnail&id=" + serverData.substring(7), serverData.substring(7)); + + progress.setStatus("获取缩略图..."); + progress.toggleCancel(false); + } else { + addImage("images/error.gif", 0); + progress.setStatus("有错误"); + progress.toggleCancel(false); + alert(serverData); + + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadComplete(file) { + try { + /* I want the next upload to continue automatically so I'll call startUpload here */ + if (this.getStats().files_queued > 0) { + this.startUpload(); + } else { + var progress = new FileProgress(file, this.customSettings.upload_target); + progress.setComplete(); + progress.setStatus("所有图片上传完成..."); + progress.toggleCancel(false); + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadError(file, errorCode, message) { + var imageName = "error.gif"; + var progress; + try { + switch (errorCode) { + case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED: + try { + progress = new FileProgress(file, this.customSettings.upload_target); + progress.setCancelled(); + progress.setStatus("Cancelled"); + progress.toggleCancel(false); + } + catch (ex1) { + this.debug(ex1); + } + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED: + try { + progress = new FileProgress(file, this.customSettings.upload_target); + progress.setCancelled(); + progress.setStatus("Stopped"); + progress.toggleCancel(true); + } + catch (ex2) { + this.debug(ex2); + } + case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED: + imageName = "uploadlimit.gif"; + break; + default: + alert(message); + break; + } + + addImage("images/" + imageName, 0); + + } catch (ex3) { + this.debug(ex3); + } + +} + +var albImg = 0; +function addImage(src, pid) { + var newImgDiv = document.createElement("div"); + var delstr = ''; + var iptwidth = 190; + albImg++; + if (pid != 0) { + albImg = 'ok' + pid; + delstr = '[删除]'; + } else { + albImg = 'err' + albImg; + } + newImgDiv.className = 'albCt'; + newImgDiv.id = 'albCt' + albImg; + document.getElementById("thumbnails").appendChild(newImgDiv); + newImgDiv.innerHTML = '' + delstr; + if (typeof arctype != 'undefined' && arctype == 'article') { + iptwidth = 100; + if (pid != 0) { + newImgDiv.innerHTML = '' + delstr; + } + } + newImgDiv.innerHTML += '
注释:
'; +} + + +/* ****************************************** + * FileProgress Object + * Control object for displaying file info + * ****************************************** */ + +function FileProgress(file, targetID) { + this.fileProgressID = "divFileProgress"; + + this.fileProgressWrapper = document.getElementById(this.fileProgressID); + if (!this.fileProgressWrapper) { + this.fileProgressWrapper = document.createElement("div"); + this.fileProgressWrapper.className = "progressWrapper"; + this.fileProgressWrapper.id = this.fileProgressID; + + this.fileProgressElement = document.createElement("div"); + this.fileProgressElement.className = "progressContainer"; + + var progressCancel = document.createElement("a"); + progressCancel.className = "progressCancel"; + progressCancel.href = "#"; + progressCancel.style.visibility = "hidden"; + progressCancel.appendChild(document.createTextNode(" ")); + + var progressText = document.createElement("div"); + progressText.className = "progressName"; + progressText.appendChild(document.createTextNode(file.name)); + + var progressBar = document.createElement("div"); + progressBar.className = "progressBarInProgress"; + + var progressStatus = document.createElement("div"); + progressStatus.className = "progressBarStatus"; + progressStatus.innerHTML = " "; + + this.fileProgressElement.appendChild(progressCancel); + this.fileProgressElement.appendChild(progressText); + this.fileProgressElement.appendChild(progressStatus); + this.fileProgressElement.appendChild(progressBar); + + this.fileProgressWrapper.appendChild(this.fileProgressElement); + + document.getElementById(targetID).appendChild(this.fileProgressWrapper); + + } else { + this.fileProgressElement = this.fileProgressWrapper.firstChild; + this.fileProgressElement.childNodes[1].firstChild.nodeValue = file.name; + } + + this.height = this.fileProgressWrapper.offsetHeight; + +} +FileProgress.prototype.setProgress = function (percentage) { + this.fileProgressElement.className = "progressContainer blue"; + this.fileProgressElement.childNodes[3].className = "progressBarInProgress"; + this.fileProgressElement.childNodes[3].style.width = percentage + "%"; +}; +FileProgress.prototype.setComplete = function () { + this.fileProgressElement.className = "progressContainer green"; + this.fileProgressElement.childNodes[3].className = "progressBarComplete"; + this.fileProgressElement.childNodes[3].style.width = ""; + +}; +FileProgress.prototype.setError = function () { + this.fileProgressElement.className = "progressContainer red"; + this.fileProgressElement.childNodes[3].className = "progressBarError"; + this.fileProgressElement.childNodes[3].style.width = ""; + +}; +FileProgress.prototype.setCancelled = function () { + this.fileProgressElement.className = "progressContainer"; + this.fileProgressElement.childNodes[3].className = "progressBarError"; + this.fileProgressElement.childNodes[3].style.width = ""; + +}; +FileProgress.prototype.setStatus = function (status) { + this.fileProgressElement.childNodes[2].innerHTML = status; +}; + +FileProgress.prototype.toggleCancel = function (show, swfuploadInstance) { + this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden"; + if (swfuploadInstance) { + var fileID = this.fileProgressID; + this.fileProgressElement.childNodes[0].onclick = function () { + swfuploadInstance.cancelUpload(fileID); + return false; + }; + } +}; diff --git a/src/dede/js/ieemu.js b/src/admin/js/ieemu.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/ieemu.js rename to src/admin/js/ieemu.js index d2ff457f..7c616d01 --- a/src/dede/js/ieemu.js +++ b/src/admin/js/ieemu.js @@ -1,286 +1,286 @@ -/** - * - * @version $Id: ieemu.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -var ie = document.all != null; -var moz = !ie && document.getElementById != null && document.layers == null; - -/* - * Extends the event object with srcElement, cancelBubble, returnValue, - * fromElement and toElement - */ -function extendEventObject() { - Event.prototype.__defineSetter__("returnValue", function (b) { - if (!b) this.preventDefault(); - }); - - Event.prototype.__defineSetter__("cancelBubble", function (b) { - if (b) this.stopPropagation(); - }); - - Event.prototype.__defineGetter__("srcElement", function () { - var node = this.target; - while (node.nodeType != 1) node = node.parentNode; - return node; - }); - - Event.prototype.__defineGetter__("fromElement", function () { - var node; - if (this.type == "mouseover") - node = this.relatedTarget; - else if (this.type == "mouseout") - node = this.target; - if (!node) return; - while (node.nodeType != 1) node = node.parentNode; - return node; - }); - - Event.prototype.__defineGetter__("toElement", function () { - var node; - if (this.type == "mouseout") - node = this.relatedTarget; - else if (this.type == "mouseover") - node = this.target; - if (!node) return; - while (node.nodeType != 1) node = node.parentNode; - return node; - }); - - Event.prototype.__defineGetter__("offsetX", function () { - return this.layerX; - }); - Event.prototype.__defineGetter__("offsetY", function () { - return this.layerY; - }); -} - -/* - * Emulates element.attachEvent as well as detachEvent - */ -function emulateAttachEvent() { - HTMLDocument.prototype.attachEvent = - HTMLElement.prototype.attachEvent = function (sType, fHandler) { - var shortTypeName = sType.replace(/on/, ""); - fHandler._ieEmuEventHandler = function (e) { - window.event = e; - return fHandler(); - }; - this.addEventListener(shortTypeName, fHandler._ieEmuEventHandler, false); - }; - - HTMLDocument.prototype.detachEvent = - HTMLElement.prototype.detachEvent = function (sType, fHandler) { - var shortTypeName = sType.replace(/on/, ""); - if (typeof fHandler._ieEmuEventHandler == "function") - this.removeEventListener(shortTypeName, fHandler._ieEmuEventHandler, false); - else - this.removeEventListener(shortTypeName, fHandler, true); - }; -} - -/* - * This function binds the event object passed along in an - * event to window.event - */ -function emulateEventHandlers(eventNames) { - for (var i = 0; i < eventNames.length; i++) { - document.addEventListener(eventNames[i], function (e) { - window.event = e; - }, true); // using capture - } -} - -/* - * Simple emulation of document.all - * this one is far from complete. Be cautious - */ - -function emulateAllModel() { - var allGetter = function () { - var a = this.getElementsByTagName("*"); - var node = this; - a.tags = function (sTagName) { - return node.getElementsByTagName(sTagName); - }; - return a; - }; - HTMLDocument.prototype.__defineGetter__("all", allGetter); - HTMLElement.prototype.__defineGetter__("all", allGetter); -} - -function extendElementModel() { - HTMLElement.prototype.__defineGetter__("parentElement", function () { - if (this.parentNode == this.ownerDocument) return null; - return this.parentNode; - }); - - HTMLElement.prototype.__defineGetter__("children", function () { - var tmp = []; - var j = 0; - var n; - for (var i = 0; i < this.childNodes.length; i++) { - n = this.childNodes[i]; - if (n.nodeType == 1) { - tmp[j++] = n; - if (n.name) { // named children - if (!tmp[n.name]) - tmp[n.name] = []; - tmp[n.name][tmp[n.name].length] = n; - } - if (n.id) // child with id - tmp[n.id] = n - } - } - return tmp; - }); - - HTMLElement.prototype.contains = function (oEl) { - if (oEl == this) return true; - if (oEl == null) return false; - return this.contains(oEl.parentNode); - }; -} - -/* - -document.defaultView.getComputedStyle(el1,
null).getPropertyValue('top'); - -*/ -function emulateCurrentStyle(properties) { - HTMLElement.prototype.__defineGetter__("currentStyle", function () { - var cs = {}; - var el = this; - for (var i = 0; i < properties.length; i++) { - //cs.__defineGetter__(properties[i], function () { - // window.status = "i: " + i ; - // return document.defaultView.getComputedStyle(el, null).getPropertyValue(properties[i]); - //}); - cs.__defineGetter__(properties[i], encapsulateObjects(el, properties[i])); - } - return cs; - }); -} -// used internally for emualteCurrentStyle -function encapsulateObjects(el, sProperty) { - return function () { - return document.defaultView.getComputedStyle(el, null).getPropertyValue(sProperty); - }; -} - -function emulateHTMLModel() { - - // This function is used to generate a html string for the text properties/methods - // It replaces '\n' with " as well as fixes consecutive white spaces - // It also repalaces some special characters - function convertTextToHTML(s) { - s = s.replace(/\&/g, "&").replace(//g, ">").replace(/\n/g, "
"); - while (/\s\s/.test(s)) - s = s.replace(/\s\s/, "  "); - return s.replace(/\s/g, " "); - } - - HTMLElement.prototype.insertAdjacentHTML = function (sWhere, sHTML) { - var df; // : DocumentFragment - var r = this.ownerDocument.createRange(); - - switch (String(sWhere).toLowerCase()) { - case "beforebegin": - r.setStartBefore(this); - df = r.createContextualFragment(sHTML); - this.parentNode.insertBefore(df, this); - break; - - case "afterbegin": - r.selectNodeContents(this); - r.collapse(true); - df = r.createContextualFragment(sHTML); - this.insertBefore(df, this.firstChild); - break; - - case "beforeend": - r.selectNodeContents(this); - r.collapse(false); - df = r.createContextualFragment(sHTML); - this.appendChild(df); - break; - - case "afterend": - r.setStartAfter(this); - df = r.createContextualFragment(sHTML); - this.parentNode.insertBefore(df, this.nextSibling); - break; - } - }; - - HTMLElement.prototype.__defineSetter__("outerHTML", function (sHTML) { - var r = this.ownerDocument.createRange(); - r.setStartBefore(this); - var df = r.createContextualFragment(sHTML); - this.parentNode.replaceChild(df, this); - - return sHTML; - }); - - HTMLElement.prototype.__defineGetter__("canHaveChildren", function () { - switch (this.tagName) { - case "AREA": - case "BASE": - case "BASEFONT": - case "COL": - case "FRAME": - case "HR": - case "IMG": - case "BR": - case "INPUT": - case "ISINDEX": - case "LINK": - case "META": - case "PARAM": - return false; - } - return true; - }); - - HTMLElement.prototype.__defineGetter__("outerHTML", function () { - var attr, attrs = this.attributes; - var str = "<" + this.tagName; - for (var i = 0; i < attrs.length; i++) { - attr = attrs[i]; - if (attr.specified) - str += " " + attr.name + '="' + attr.value + '"'; - } - if (!this.canHaveChildren) - return str + ">"; - - return str + ">" + this.innerHTML + ""; - }); - - - HTMLElement.prototype.__defineSetter__("innerText", function (sText) { - this.innerHTML = convertTextToHTML(sText); - return sText; - }); - - var tmpGet; - HTMLElement.prototype.__defineGetter__("innerText", tmpGet = function () { - var r = this.ownerDocument.createRange(); - r.selectNodeContents(this); - return r.toString(); - }); - - HTMLElement.prototype.__defineSetter__("outerText", function (sText) { - this.outerHTML = convertTextToHTML(sText); - return sText; - }); - HTMLElement.prototype.__defineGetter__("outerText", tmpGet); - - HTMLElement.prototype.insertAdjacentText = function (sWhere, sText) { - this.insertAdjacentHTML(sWhere, convertTextToHTML(sText)); - }; - +/** + * + * @version $Id: ieemu.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + +var ie = document.all != null; +var moz = !ie && document.getElementById != null && document.layers == null; + +/* + * Extends the event object with srcElement, cancelBubble, returnValue, + * fromElement and toElement + */ +function extendEventObject() { + Event.prototype.__defineSetter__("returnValue", function (b) { + if (!b) this.preventDefault(); + }); + + Event.prototype.__defineSetter__("cancelBubble", function (b) { + if (b) this.stopPropagation(); + }); + + Event.prototype.__defineGetter__("srcElement", function () { + var node = this.target; + while (node.nodeType != 1) node = node.parentNode; + return node; + }); + + Event.prototype.__defineGetter__("fromElement", function () { + var node; + if (this.type == "mouseover") + node = this.relatedTarget; + else if (this.type == "mouseout") + node = this.target; + if (!node) return; + while (node.nodeType != 1) node = node.parentNode; + return node; + }); + + Event.prototype.__defineGetter__("toElement", function () { + var node; + if (this.type == "mouseout") + node = this.relatedTarget; + else if (this.type == "mouseover") + node = this.target; + if (!node) return; + while (node.nodeType != 1) node = node.parentNode; + return node; + }); + + Event.prototype.__defineGetter__("offsetX", function () { + return this.layerX; + }); + Event.prototype.__defineGetter__("offsetY", function () { + return this.layerY; + }); +} + +/* + * Emulates element.attachEvent as well as detachEvent + */ +function emulateAttachEvent() { + HTMLDocument.prototype.attachEvent = + HTMLElement.prototype.attachEvent = function (sType, fHandler) { + var shortTypeName = sType.replace(/on/, ""); + fHandler._ieEmuEventHandler = function (e) { + window.event = e; + return fHandler(); + }; + this.addEventListener(shortTypeName, fHandler._ieEmuEventHandler, false); + }; + + HTMLDocument.prototype.detachEvent = + HTMLElement.prototype.detachEvent = function (sType, fHandler) { + var shortTypeName = sType.replace(/on/, ""); + if (typeof fHandler._ieEmuEventHandler == "function") + this.removeEventListener(shortTypeName, fHandler._ieEmuEventHandler, false); + else + this.removeEventListener(shortTypeName, fHandler, true); + }; +} + +/* + * This function binds the event object passed along in an + * event to window.event + */ +function emulateEventHandlers(eventNames) { + for (var i = 0; i < eventNames.length; i++) { + document.addEventListener(eventNames[i], function (e) { + window.event = e; + }, true); // using capture + } +} + +/* + * Simple emulation of document.all + * this one is far from complete. Be cautious + */ + +function emulateAllModel() { + var allGetter = function () { + var a = this.getElementsByTagName("*"); + var node = this; + a.tags = function (sTagName) { + return node.getElementsByTagName(sTagName); + }; + return a; + }; + HTMLDocument.prototype.__defineGetter__("all", allGetter); + HTMLElement.prototype.__defineGetter__("all", allGetter); +} + +function extendElementModel() { + HTMLElement.prototype.__defineGetter__("parentElement", function () { + if (this.parentNode == this.ownerDocument) return null; + return this.parentNode; + }); + + HTMLElement.prototype.__defineGetter__("children", function () { + var tmp = []; + var j = 0; + var n; + for (var i = 0; i < this.childNodes.length; i++) { + n = this.childNodes[i]; + if (n.nodeType == 1) { + tmp[j++] = n; + if (n.name) { // named children + if (!tmp[n.name]) + tmp[n.name] = []; + tmp[n.name][tmp[n.name].length] = n; + } + if (n.id) // child with id + tmp[n.id] = n + } + } + return tmp; + }); + + HTMLElement.prototype.contains = function (oEl) { + if (oEl == this) return true; + if (oEl == null) return false; + return this.contains(oEl.parentNode); + }; +} + +/* + +document.defaultView.getComputedStyle(el1,
null).getPropertyValue('top'); + +*/ +function emulateCurrentStyle(properties) { + HTMLElement.prototype.__defineGetter__("currentStyle", function () { + var cs = {}; + var el = this; + for (var i = 0; i < properties.length; i++) { + //cs.__defineGetter__(properties[i], function () { + // window.status = "i: " + i ; + // return document.defaultView.getComputedStyle(el, null).getPropertyValue(properties[i]); + //}); + cs.__defineGetter__(properties[i], encapsulateObjects(el, properties[i])); + } + return cs; + }); +} +// used internally for emualteCurrentStyle +function encapsulateObjects(el, sProperty) { + return function () { + return document.defaultView.getComputedStyle(el, null).getPropertyValue(sProperty); + }; +} + +function emulateHTMLModel() { + + // This function is used to generate a html string for the text properties/methods + // It replaces '\n' with " as well as fixes consecutive white spaces + // It also repalaces some special characters + function convertTextToHTML(s) { + s = s.replace(/\&/g, "&").replace(//g, ">").replace(/\n/g, "
"); + while (/\s\s/.test(s)) + s = s.replace(/\s\s/, "  "); + return s.replace(/\s/g, " "); + } + + HTMLElement.prototype.insertAdjacentHTML = function (sWhere, sHTML) { + var df; // : DocumentFragment + var r = this.ownerDocument.createRange(); + + switch (String(sWhere).toLowerCase()) { + case "beforebegin": + r.setStartBefore(this); + df = r.createContextualFragment(sHTML); + this.parentNode.insertBefore(df, this); + break; + + case "afterbegin": + r.selectNodeContents(this); + r.collapse(true); + df = r.createContextualFragment(sHTML); + this.insertBefore(df, this.firstChild); + break; + + case "beforeend": + r.selectNodeContents(this); + r.collapse(false); + df = r.createContextualFragment(sHTML); + this.appendChild(df); + break; + + case "afterend": + r.setStartAfter(this); + df = r.createContextualFragment(sHTML); + this.parentNode.insertBefore(df, this.nextSibling); + break; + } + }; + + HTMLElement.prototype.__defineSetter__("outerHTML", function (sHTML) { + var r = this.ownerDocument.createRange(); + r.setStartBefore(this); + var df = r.createContextualFragment(sHTML); + this.parentNode.replaceChild(df, this); + + return sHTML; + }); + + HTMLElement.prototype.__defineGetter__("canHaveChildren", function () { + switch (this.tagName) { + case "AREA": + case "BASE": + case "BASEFONT": + case "COL": + case "FRAME": + case "HR": + case "IMG": + case "BR": + case "INPUT": + case "ISINDEX": + case "LINK": + case "META": + case "PARAM": + return false; + } + return true; + }); + + HTMLElement.prototype.__defineGetter__("outerHTML", function () { + var attr, attrs = this.attributes; + var str = "<" + this.tagName; + for (var i = 0; i < attrs.length; i++) { + attr = attrs[i]; + if (attr.specified) + str += " " + attr.name + '="' + attr.value + '"'; + } + if (!this.canHaveChildren) + return str + ">"; + + return str + ">" + this.innerHTML + ""; + }); + + + HTMLElement.prototype.__defineSetter__("innerText", function (sText) { + this.innerHTML = convertTextToHTML(sText); + return sText; + }); + + var tmpGet; + HTMLElement.prototype.__defineGetter__("innerText", tmpGet = function () { + var r = this.ownerDocument.createRange(); + r.selectNodeContents(this); + return r.toString(); + }); + + HTMLElement.prototype.__defineSetter__("outerText", function (sText) { + this.outerHTML = convertTextToHTML(sText); + return sText; + }); + HTMLElement.prototype.__defineGetter__("outerText", tmpGet); + + HTMLElement.prototype.insertAdjacentText = function (sWhere, sText) { + this.insertAdjacentHTML(sWhere, convertTextToHTML(sText)); + }; + } \ No newline at end of file diff --git a/src/dede/js/indexbody.js b/src/admin/js/indexbody.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/indexbody.js rename to src/admin/js/indexbody.js index 697339c1..9e0d5086 --- a/src/dede/js/indexbody.js +++ b/src/admin/js/indexbody.js @@ -1,26 +1,26 @@ -function AddNew() -{ - $DE('addTab').style.display = 'block'; -} - -function CloseTab(tb) -{ - $DE(tb).style.display = 'none'; -} - -function ListAll(){ - $DE('editTab').style.display = 'block'; - var myajax = new DedeAjax($DE('editTabBody')); - myajax.SendGet('index_body.php?dopost=editshow'); -} - -function ShowWaitDiv(){ - $DE('loaddiv').style.display = 'block'; - return true; -} - -window.onload = function() -{ - var myajax = new DedeAjax($DE('listCount')); - myajax.SendGet('index_body.php?dopost=getRightSide'); -}; +function AddNew() +{ + $DE('addTab').style.display = 'block'; +} + +function CloseTab(tb) +{ + $DE(tb).style.display = 'none'; +} + +function ListAll(){ + $DE('editTab').style.display = 'block'; + var myajax = new DedeAjax($DE('editTabBody')); + myajax.SendGet('index_body.php?dopost=editshow'); +} + +function ShowWaitDiv(){ + $DE('loaddiv').style.display = 'block'; + return true; +} + +window.onload = function() +{ + var myajax = new DedeAjax($DE('listCount')); + myajax.SendGet('index_body.php?dopost=getRightSide'); +}; diff --git a/src/dede/js/jquery.json-2.2.min.js b/src/admin/js/jquery.json-2.2.min.js old mode 100755 new mode 100644 similarity index 100% rename from src/dede/js/jquery.json-2.2.min.js rename to src/admin/js/jquery.json-2.2.min.js diff --git a/src/dede/js/key.js b/src/admin/js/key.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/key.js rename to src/admin/js/key.js index 0abc9a73..63db3479 --- a/src/dede/js/key.js +++ b/src/admin/js/key.js @@ -1,76 +1,76 @@ -function selAll() -{ - var celements = document.getElementsByName('aids[]'); - for(i=0;i0) - { - if(obj.style.display == 'block' || obj.style.display =='') - obj.style.display = 'none'; - else - obj.style.display = 'block'; - return true; - } - //正常设置cookie - var ckstr = getCookie('menuitems'); - var ckstrs = null; - var okstr =''; - var ischange = false; - if(ckstr==null) ckstr = ''; - ckstrs = ckstr.split(','); - objname = objname.replace('items',''); - if(obj.style.display == 'block' || obj.style.display =='') - { - obj.style.display = 'none'; - for(var i=0; i < ckstrs.length; i++) - { - if(ckstrs[i]=='') continue; - if(ckstrs[i]==objname){ ischange = true; } - else okstr += (okstr=='' ? ckstrs[i] : ','+ckstrs[i] ); - } - if(ischange) setCookie('menuitems',okstr,7); - objsun.className = 'bitem2'; - } - else - { - obj.style.display = 'block'; - ischange = true; - for(var i=0; i < ckstrs.length; i++) - { - if(ckstrs[i]==objname) { ischange = false; break; } - } - if(ischange) - { - ckstr = (ckstr==null ? objname : ckstr+','+objname); - setCookie('menuitems',ckstr,7); - } - objsun.className = 'bitem'; - } -} -//读写cookie函数 -function getCookie(c_name) -{ - if (document.cookie.length > 0) - { - c_start = document.cookie.indexOf(c_name + "=") - if (c_start != -1) - { - c_start = c_start + c_name.length + 1; - c_end = document.cookie.indexOf(";",c_start); - if (c_end == -1) - { - c_end = document.cookie.length; - } - return unescape(document.cookie.substring(c_start,c_end)); - } - } - return null -} -function setCookie(c_name,value,expiredays) -{ - var exdate = new Date(); - exdate.setDate(exdate.getDate() + expiredays); - document.cookie = c_name + "=" +escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()); //使设置的有效时间正确。增加toGMTString() -} -//检查以前用户展开的菜单项 -var totalitem = 12; -function CheckOpenMenu() -{ - //setCookie('menuitems',''); - var ckstr = getCookie('menuitems'); - var curitem = ''; - var curobj = null; - - //cross_obj = document.getElementById("staticbuttons"); - //setInterval("initializeIT()",20); - - if(ckstr==null) - { - ckstr='1_1,2_1,3_1'; - setCookie('menuitems',ckstr,7); - } - ckstr = ','+ckstr+','; - for(i=0;i 0 && curobj != null) - { - curobj.style.display = 'block'; - } - else - { - if(curobj != null) curobj.style.display = 'none'; - } - } -} - -var curitem = 1; -function ShowMainMenu(n) -{ - var curLink = $DE('link'+curitem); - var targetLink = $DE('link'+n); - var curCt = $DE('ct'+curitem); - var targetCt = $DE('ct'+n); - if(curitem==n) return false; - if(targetCt.innerHTML!='') - { - curCt.style.display = 'none'; - targetCt.style.display = 'block'; - curLink.className = 'mm'; - targetLink.className = 'mmac'; - curitem = n; - } - else - { - var myajax = new DedeAjax(targetCt); - myajax.SendGet2("index_menu_load.php?openitem="+n); - if(targetCt.innerHTML!='') - { - curCt.style.display = 'none'; - targetCt.style.display = 'block'; - curLink.className = 'mm'; - targetLink.className = 'mmac'; - curitem = n; - } - DedeXHTTP = null; - } - // bindClick(); -} - + +function showHide(objname) +{ + //只对主菜单设置cookie + var obj = document.getElementById(objname); + var objsun = document.getElementById('sun'+objname); + if(objname.indexOf('_1')<0 || objname.indexOf('_10')>0) + { + if(obj.style.display == 'block' || obj.style.display =='') + obj.style.display = 'none'; + else + obj.style.display = 'block'; + return true; + } + //正常设置cookie + var ckstr = getCookie('menuitems'); + var ckstrs = null; + var okstr =''; + var ischange = false; + if(ckstr==null) ckstr = ''; + ckstrs = ckstr.split(','); + objname = objname.replace('items',''); + if(obj.style.display == 'block' || obj.style.display =='') + { + obj.style.display = 'none'; + for(var i=0; i < ckstrs.length; i++) + { + if(ckstrs[i]=='') continue; + if(ckstrs[i]==objname){ ischange = true; } + else okstr += (okstr=='' ? ckstrs[i] : ','+ckstrs[i] ); + } + if(ischange) setCookie('menuitems',okstr,7); + objsun.className = 'bitem2'; + } + else + { + obj.style.display = 'block'; + ischange = true; + for(var i=0; i < ckstrs.length; i++) + { + if(ckstrs[i]==objname) { ischange = false; break; } + } + if(ischange) + { + ckstr = (ckstr==null ? objname : ckstr+','+objname); + setCookie('menuitems',ckstr,7); + } + objsun.className = 'bitem'; + } +} +//读写cookie函数 +function getCookie(c_name) +{ + if (document.cookie.length > 0) + { + c_start = document.cookie.indexOf(c_name + "=") + if (c_start != -1) + { + c_start = c_start + c_name.length + 1; + c_end = document.cookie.indexOf(";",c_start); + if (c_end == -1) + { + c_end = document.cookie.length; + } + return unescape(document.cookie.substring(c_start,c_end)); + } + } + return null +} +function setCookie(c_name,value,expiredays) +{ + var exdate = new Date(); + exdate.setDate(exdate.getDate() + expiredays); + document.cookie = c_name + "=" +escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()); //使设置的有效时间正确。增加toGMTString() +} +//检查以前用户展开的菜单项 +var totalitem = 12; +function CheckOpenMenu() +{ + //setCookie('menuitems',''); + var ckstr = getCookie('menuitems'); + var curitem = ''; + var curobj = null; + + //cross_obj = document.getElementById("staticbuttons"); + //setInterval("initializeIT()",20); + + if(ckstr==null) + { + ckstr='1_1,2_1,3_1'; + setCookie('menuitems',ckstr,7); + } + ckstr = ','+ckstr+','; + for(i=0;i 0 && curobj != null) + { + curobj.style.display = 'block'; + } + else + { + if(curobj != null) curobj.style.display = 'none'; + } + } +} + +var curitem = 1; +function ShowMainMenu(n) +{ + var curLink = $DE('link'+curitem); + var targetLink = $DE('link'+n); + var curCt = $DE('ct'+curitem); + var targetCt = $DE('ct'+n); + if(curitem==n) return false; + if(targetCt.innerHTML!='') + { + curCt.style.display = 'none'; + targetCt.style.display = 'block'; + curLink.className = 'mm'; + targetLink.className = 'mmac'; + curitem = n; + } + else + { + var myajax = new DedeAjax(targetCt); + myajax.SendGet2("index_menu_load.php?openitem="+n); + if(targetCt.innerHTML!='') + { + curCt.style.display = 'none'; + targetCt.style.display = 'block'; + curLink.className = 'mm'; + targetLink.className = 'mmac'; + curitem = n; + } + DedeXHTTP = null; + } + // bindClick(); +} + diff --git a/src/dede/js/list.js b/src/admin/js/list.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/list.js rename to src/admin/js/list.js index 146778e3..5bf75a0f --- a/src/dede/js/list.js +++ b/src/admin/js/list.js @@ -1,158 +1,158 @@ -if(moz) { - extendEventObject(); - extendElementModel(); - emulateAttachEvent(); -} -function viewArc(aid){ - if(aid==0) aid = getOneItem(); - window.open("archives_do.php?aid="+aid+"&dopost=viewArchives"); -} -function kwArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - if(qstr=='') - { - ShowMsg('必须选择一个或多个文档'); - return; - } - location="archives_do.php?aid="+aid+"&dopost=makekw&qstr="+qstr; -} -function editArc(aid){ - if(aid==0) aid = getOneItem(); - location="archives_do.php?aid="+aid+"&dopost=editArchives"; -} -function updateArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - location="archives_do.php?aid="+aid+"&dopost=makeArchives&qstr="+qstr; -} -function checkArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - location="archives_do.php?aid="+aid+"&dopost=checkArchives&qstr="+qstr; -} -function moveArc(e, obj, cid){ - var qstr=getCheckboxItem(); - if(qstr=='') - { - ShowMsg('必须选择一个或多个文档'); - return; - } - LoadQuickDiv(e, 'archives_do.php?dopost=moveArchives&qstr='+qstr+'&channelid='+cid+'&rnd='+Math.random(), 'moveArchives', '450px', '180px'); - ChangeFullDiv('show'); -} -function adArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr; -} - -function cAtts(jname, e, obj) -{ - var qstr=getCheckboxItem(); - var screeheight = document.body.clientHeight + 20; - if(qstr=='') - { - ShowMsg('必须选择一个或多个文档'); - return; - } - LoadQuickDiv(e, 'archives_do.php?dopost=attsDlg&qstr='+qstr+'&dojob='+jname+'&rnd='+Math.random(), 'attsDlg', '450px', '160px'); - ChangeFullDiv('show', screeheight); -} - -function delArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives"; -} - -function QuickEdit(aid, e, obj) -{ - LoadQuickDiv(e, 'archives_do.php?dopost=quickEdit&aid='+aid+'&rnd='+Math.random(), 'quickEdit', 'auto', '300px'); - ChangeFullDiv('show'); -} -//上下文菜单 -function ShowMenu(evt,obj,aid,atitle) -{ - var popupoptions - popupoptions = [ - new ContextItem("浏览文档",function(){ viewArc(aid); }), - new ContextItem("编辑属性",function(){ QuickEdit(aid, evt, obj); }), - new ContextItem("编辑文档",function(){ editArc(aid); }), - new ContextSeperator(), - new ContextItem("更新HTML",function(){ updateArc(aid); }), - new ContextItem("审核文档",function(){ checkArc(aid); }), - new ContextItem("推荐文档",function(){ adArc(aid); }), - new ContextItem("删除文档",function(){ delArc(aid); }), - new ContextSeperator(), - new ContextItem("复制(C)",function(){ copyToClipboard(atitle); }), - new ContextItem("重载页面",function(){ location.reload(); }), - new ContextSeperator(), - new ContextItem("全部选择",function(){ selAll(); }), - new ContextItem("取消选择",function(){ noSelAll(); }), - new ContextSeperator(), - new ContextItem("关闭菜单",function(){}) - ] - ContextMenu.display(evt,popupoptions); - //location="catalog_main.php"; -} -//获得选中文件的文件名 -function getCheckboxItem() -{ - var allSel=""; - if(document.form2.arcID.value) return document.form2.arcID.value; - for(i=0;i= 1) return 'IE'; - else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; - else return "OT"; -} - -function $Obj(objname) { - return document.getElementById(objname); -} - -//旧的颜色选择框(已经过期) -/* -function ShowColor() -{ - var fcolor=showModalDialog("images/color.htm?ok",false,"dialogWidth:106px;dialogHeight:110px;status:0;dialogTop:"+(+120)+";dialogLeft:"+(+120)); - if(fcolor!=null && fcolor!="undefined") document.form1.color.value = fcolor; -} -*/ - -function ColorSel(c, oname) { - var tobj = $Obj(oname); - if (!tobj) tobj = eval('document.form1.' + oname); - if (!tobj) { - $Obj('colordlg').style.display = 'none'; - return false; - } - else { - tobj.value = c; - $Obj('colordlg').style.display = 'none'; - return true; - } -} - -function ShowColor(e, o) { - LoadNewDiv(e, 'images/colornew.htm', 'colordlg'); -} - -function ShowHide(objname) { - var obj = $Obj(objname); - if (obj.style.display != "none") obj.style.display = "none"; - else obj.style.display = "inline-block"; -} - -function ShowHideT(objname) { - var obj = $Obj(objname); - if (obj.style.display != "none") obj.style.display = "none"; - else obj.style.display = ($Nav() == "IE" ? "inline-block" : "table"); -} - -function ShowObj(objname) { - var obj = $Obj(objname); - if (obj == null) return false; - obj.style.display = ($Nav() == "IE" ? "inline-block" : "table"); -} - -function ShowObjRow(objname) { - var obj = $Obj(objname); - obj.style.display = ($Nav() == "IE" ? "inline-block" : "table-row"); -} - -function AddTypeid2() { - ShowObjRow('typeid2tr'); - //$Obj('typeid2ct').innerHTML = $Obj('typeidct').innerHTML.replace('typeid','typeid2'); -} - -function HideObj(objname) { - var obj = $Obj(objname); - if (obj == null) return false; - obj.style.display = "none"; -} - -function ShowItem1() { - ShowObj('needset'); ShowObj('head1'); HideObj('head2'); HideObj('adset'); ShowObj('votehead'); -} - -function ShowItem2() { - ShowObj('head2'); ShowObj('adset'); HideObj('voteset'); HideObj('head1'); HideObj('needset'); HideObj('votehead'); -} - -function SeePic(img, f) { - if (f.value != '') img.src = f.value; -} - -function SeePicNew(f, imgdid, frname, hpos, acname) { - var newobj = null; - if (f.value == '') return; - vImg = $Obj(imgdid); - picnameObj = document.getElementById('picname'); - nFrame = $Nav() == 'IE' ? eval('document.frames.' + frname) : $Obj(frname); - nForm = f.form; - //修改form的action等参数 - if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmit); - else nForm.removeEventListener("submit", checkSubmit, false); - nForm.action = 'archives_do.php'; - nForm.target = frname; - nForm.dopost.value = 'uploadLitpic'; - nForm.submit(); - - picnameObj.value = ''; - newobj = $Obj('uploadwait'); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = 'uploadwait'; - newobj.style.position = 'absolute'; - newobj.className = 'uploadwait'; - newobj.style.width = 120; - newobj.style.height = 20; - newobj.style.top = hpos; - newobj.style.left = 100; - newobj.style.display = 'block'; - document.body.appendChild(newobj); - newobj.innerHTML = '上传中...'; - } - newobj.style.display = 'block'; - //提交后还原form的action等参数 - nForm.action = acname; - nForm.dopost.value = 'save'; - nForm.target = ''; - nForm.litpic.disabled = true; - //nForm.litpic = null; - //if(nForm.attachEvent) nForm.attachEvent("onsubmit", checkSubmit); - //else nForm.addEventListener("submit", checkSubmit, true); -} - -function SelectFlash() { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 300; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - window.open("./dialog/select_media.php?f=form1.flashurl", "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); -} - -function SelectMedia(fname) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - window.open("./dialog/select_media.php?f=" + fname, "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); -} - -function SelectSoft(fname) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY - 50; } - else { var posLeft = 100; var posTop = 100; } - window.open("./dialog/select_soft.php?f=" + fname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); -} - -function SelectImage(fname, stype, imgsel) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - if (!fname) fname = 'form1.picname'; - if (imgsel) imgsel = '&noeditor=yes'; - if (!stype) stype = ''; - window.open("./dialog/select_images.php?f=" + fname + "&noeditor=yes&imgstick=" + stype + imgsel, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=650,height=400,left=" + posLeft + ", top=" + posTop); -} - -function imageCut(fname) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - if (!fname) fname = 'picname'; - file = document.getElementById(fname).value; - if (file == '') { - alert('请先选择网站内已上传的图片'); - return false; - } - window.open("imagecut.php?f=" + fname + "&file=" + file, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + posLeft + ", top=" + posTop); -} - -function SelectImageN(fname, stype, vname) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - if (!fname) fname = 'form1.picname'; - if (!stype) stype = ''; - window.open("./dialog/select_images.php?f=" + fname + "&imgstick=" + stype + "&v=" + vname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); -} - -function SelectKeywords(f) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 350; var posTop = window.event.clientY - 200; } - else { var posLeft = 100; var posTop = 100; } - window.open("article_keywords_select.php?f=" + f, "popUpkwWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=450,left=" + posLeft + ", top=" + posTop); -} - -function InitPage() { - var selsource = $Obj('selsource'); - var selwriter = $Obj('selwriter'); - var titlechange = $Obj('title'); - var colorbt = $Obj('color'); - if (selsource) { selsource.onmousedown = function (e) { SelectSource(e); } } - if (selwriter) { selwriter.onmousedown = function (e) { SelectWriter(e); } } - if (titlechange) { titlechange.onchange = function (e) { TestHasTitle(e); } } -} - -function OpenMyWin(surl) { - window.open(surl, "popUpMyWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=200, top=100"); -} - -function OpenMyWinCoOne(surl) { - window.open(surl, "popUpMyWin2", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=450,left=100,top=50"); -} - -function PutSource(str) { - var osource = $Obj('source'); - if (osource) osource.value = str; - $Obj('mysource').style.display = 'none'; - ChangeFullDiv('hide'); -} - -function PutWriter(str) { - var owriter = $Obj('writer'); - if (owriter) owriter.value = str; - $Obj('mywriter').style.display = 'none'; - ChangeFullDiv('hide'); -} - -// 增加选择投票内容 -function PutVote(str) { - var ovote = $Obj('voteid'); - if (ovote) { - ovote.value = str; - tb_remove(false); - } else { - parent.document.form1.voteid.value = str; - tb_remove(true); - } - -} - -function ClearDivCt(objname) { - if (!$Obj(objname)) return; - $Obj(objname).innerHTML = ''; - $Obj(objname).style.display = 'none'; - ChangeFullDiv("hide"); -} - -function ChangeFullDiv(showhide, screenheigt) { - var newobj = $Obj('fullpagediv'); - if (showhide == 'show') { - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = 'fullpagediv'; - newobj.style.position = 'absolute'; - newobj.className = 'fullpagediv'; - newobj.style.height = document.body.clientHeight + 50 + 'px'; - document.body.appendChild(newobj); - } - else { - newobj.style.display = 'block'; - } - } - else { - if (newobj) newobj.style.display = 'none'; - } -} - -function SelectSource(e) { - LoadNewDiv(e, 'article_select_sw.php?t=source&k=8&rnd=' + Math.random(), 'mysource'); - //ChangeFullDiv('show'); -} - -function SelectWriter(e) { - LoadNewDiv(e, 'article_select_sw.php?t=writer&k=8&rnd=' + Math.random(), 'mywriter'); - //ChangeFullDiv('show'); -} - -function LoadNewDiv(e, surl, oname) { - var pxStr = ''; - if ($Nav() == 'IE') { - var posLeft = window.event.clientX - 20; - var posTop = window.event.clientY - 30; - // IE下scrollTop的兼容性问题 - var scrollTop = document.documentElement.scrollTop || window.pageYOffset; - if (typeof (scrollTop) == 'undefined') scrollTop = document.body.scrollTop; - posTop += scrollTop; - - } - else { - var posLeft = e.pageX - 20; - var posTop = e.pageY - 30; - pxStr = 'px'; - } - posLeft = posLeft - 100; - var newobj = $Obj(oname); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = oname; - newobj.style.position = 'absolute'; - newobj.className = oname; - newobj.className += ' dlgws'; - newobj.style.top = posTop + pxStr; - newobj.style.left = posLeft + pxStr; - document.body.appendChild(newobj); - } - else { - newobj.style.display = "block"; - } - if (newobj.innerHTML.length < 10) { - var myajax = new DedeAjax(newobj); - myajax.SendGet(surl); - } -} - -function TestHasTitle(e) { - LoadNewDiv2(e, 'article_test_title.php?t=' + $Obj('title').value, 'mytitle', "dlgTesttitle"); -} - -function LoadNewDiv2(e, surl, oname, dlgcls) { - var posLeft = 300; - var posTop = 50; - var newobj = $Obj(oname); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = oname; - newobj.style.position = 'absolute'; - newobj.className = dlgcls; - newobj.style.top = posTop; - newobj.style.left = posLeft; - newobj.style.display = 'none'; - document.body.appendChild(newobj); - } - newobj.innerHTML = ''; - var myajax = new DedeAjax(newobj); - myajax.SendGet2(surl); - if (newobj.innerHTML == '') newobj.style.display = 'none'; - else newobj.style.display = 'block'; - jQuery(newobj).css('top', '50px').css('left', '300px'); - DedeXHTTP = null; -} - -function ShowUrlTr() { - var jumpTest = $Obj('flagsj'); - var jtr = $Obj('redirecturltr'); - var jf = $Obj('redirecturl'); - if (jumpTest.checked) jtr.style.display = "block"; - else { - jf.value = ''; - jtr.style.display = "none"; - } -} - -function ShowUrlTrEdit() { - ShowUrlTr(); - var jumpTest = $Obj('isjump'); - var rurl = $Obj('redirecturl'); - if (!jumpTest.checked) rurl.value = ""; -} - -function CkRemote() { - document.getElementById('picname').value = ''; -} - -//载入指定宽高的AJAX窗体 -function LoadQuickDiv(e, surl, oname, w, h) { - if ($Nav() == 'IE') { - if (window.event) { - var posLeft = window.event.clientX - 20; - var posTop = window.event.clientY - 30; - } - else { - var posLeft = e.clientX - 20; - var posTop = e.clientY + 30; - } - } - else { - var posLeft = e.pageX - 20; - var posTop = e.pageY - 30; - } - posTop += MyGetScrollTop(); - posLeft = posLeft - 400; - //固定位置的高度 - if (fixupPos) { - posLeft = posTop = 50; - } - var newobj = $Obj(oname); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = oname; - newobj.style.position = 'absolute'; - newobj.className = 'pubdlg'; - newobj.style.width = w; - newobj.style.height = h + 30; - document.body.appendChild(newobj); - } - if (posTop > 500) posTop = 500; - if (posLeft < 50) posLeft = 50; - newobj.style.minWidth = "450px"; - newobj.style.top = posTop + "px"; - newobj.style.left = posLeft + "px"; - newobj.innerHTML = '
Loading...
'; - newobj.style.display = 'block'; - var myajax = new DedeAjax(newobj); - myajax.SendGet(surl); - fixupPos = false; -} - -function MyGetScrollTop() { - return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; -} - -//通用事件获取接口 -function getEvent() { - if ($Nav() == 'IE') return window.event; - func = getEvent.caller; - while (func != null) { - var arg0 = func.arguments[0]; - if (arg0) { - if ((arg0.constructor == Event || arg0.constructor == MouseEvent) - || (typeof (arg0) == "object" && arg0.preventDefault && arg0.stopPropagation)) { - return arg0; - } - } - func = func.caller; - } - return null; -} - -//模拟ondrop事件相关代码 -/*---------------------------- -leftLeaning = 300; -如果对象内容固定,用onmousedown=DropStart去除底下的DropStop -newobj.ondblclick = DropStart; -newobj.onmousemove = DropMove; -newobj.onmousedown = DropStop; -----------------------------*/ -function DropStart() { - this.style.cursor = 'move'; -} - -function DropStop() { - this.style.cursor = 'default'; -} - -function DropMove() { - if (this.style.cursor != 'move') return; - var event = getEvent(); - if ($Nav() == 'IE') { - var posLeft = event.clientX - 20; - var posTop = event.clientY - 30; - posTop += document.body.scrollTop; - } - else { - var posLeft = event.pageX - 20; - var posTop = event.pageY - 30; - } - this.style.top = posTop; - this.style.left = posLeft - leftLeaning; -} - -//对指定的元素绑定move事件 -/*----------------------------- -onmousemove="DropMoveHand('divname', 225);" -onmousedown="DropStartHand();" -onmouseup="DropStopHand();" ------------------------------*/ -function DropStartHand() { - canMove = (canMove ? false : true); -} -function DropStopHand() { - canMove = false; -} -function DropMoveHand(objid, mleftLeaning) { - var event = getEvent(); - var obj = $Obj(objid); - if (!canMove) return; - - if ($Nav() == 'IE') { - var posLeft = event.clientX - 20; - var posTop = event.clientY - 20; - posTop += window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; - } - else { - var posLeft = event.pageX - 20; - var posTop = event.pageY - 20; - } - obj.style.top = posTop + "px"; - obj.style.left = posLeft - mleftLeaning + "px"; -} - -//复制内容到剪切板 -function copyToClipboard(txt) { - if (txt == null || txt == '') { - alert("没有选择任何内容!"); - return; - } - if (window.clipboardData) { - window.clipboardData.clearData(); - window.clipboardData.setData("Text", txt); - } - else if (navigator.userAgent.indexOf('Opera') != -1) { - window.location = txt; - } - else { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - } catch (e) { - alert("被浏览器拒绝\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'"); - } - var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); - if (!clip) return; - - var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); - if (!trans) return; - - trans.addDataFlavor('text/unicode'); - var str = new Object(); - var len = new Object(); - var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); - var copytext = txt; - str.data = copytext; - trans.setTransferData("text/unicode", str, copytext.length * 2); - var clipid = Components.interfaces.nsIClipboard; - if (!clip) return false; - clip.setData(trans, null, clipid.kGlobalClipboard); - } -} - -function getSelTxt() { - var g, r; - if (document.all) { - g = document.selection.createRange().text; - } else { - g = document.getSelection(); - } - return g; -} - -//显示栏目Map地图 -function ShowCatMap(e, obj, cid, targetId, oldvalue) { - fixupPos = true; - LoadQuickDiv(e, 'archives_do.php?dopost=getCatMap&targetid=' + targetId + '&channelid=' + cid + '&oldvalue=' + oldvalue + '&rnd=' + Math.random(), 'getCatMap', '700px', '500px'); - ChangeFullDiv('show'); -} - -function getSelCat(targetId) { - var selBox = document.quicksel.seltypeid; - var targetObj = $Obj(targetId); - var selvalue = ''; - //副栏目(多选) - if (targetId == 'typeid2') { - var j = 0; - for (var i = 0; i < selBox.length; i++) { - if (selBox[i].checked) { - j++; - if (j == 10) break; - selvalue += (selvalue == '' ? selBox[i].value : ',' + selBox[i].value); - } - } - if (targetObj) targetObj.value = selvalue; - } - //主栏目(单选) - else { - if (selBox) { - for (var i = 0; i < selBox.length; i++) { - if (selBox[i].checked) selvalue = selBox[i].value; - } - } - if (selvalue == '') { - alert('您没有选中任何项目'); - return; - } - if (targetObj) { - for (var j = 0; j < targetObj.length; j++) { - op = targetObj.options[j]; - if (op.value == selvalue) op.selected = true; - } - } - } - HideObj("getCatMap"); - ChangeFullDiv("hide"); -} - -function getElementLeft(element) { - var actualLeft = element.offsetLeft; - var current = element.offsetParent; - - while (current !== null) { - actualLeft += current.offsetLeft; - current = current.offsetParent; - } - - return actualLeft; -} - -function getElementTop(element) { - var actualTop = element.offsetTop; - var current = element.offsetParent; - - while (current !== null) { - actualTop += current.offsetTop; - current = current.offsetParent; - } - - return actualTop; -} - -// Copyright 2020 The MuEMS Authors. All rights reserved. -// license that can be found in the LICENSE file. - -// -----msgbox------------------------------------- - -// 生成一个随机ID -function guid() { - function S4() { - return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); - } - return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4()); -} - -// 显示对话框,动态创建modal并显示,退出自动销毁窗体 -// args是以下结构体 -/* -args = { - title : "", // 标题,默认是MuEMS - footer : "", // 底部按钮,可以自定义按钮 - noClose : false, // 是否显示右上角关闭按钮,默认显示 -} -*/ -// 函数会返回一个modalID,通过这个ID可自已定义一些方法 -// 这里用到了一个展开语法 -// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax -function ShowMsg(content, ...args) { - title = "DedeBIZ信息提示"; - if (typeof content == "undefined") content = ""; - modalID = guid(); - var footer = ``; - var noClose = false; - - if (args.length == 1) { - // 存在args参数 - if (typeof args[0].title !== 'undefined' && args[0].title != "") { - title = args[0].title; - } - if (typeof args[0].footer !== 'undefined' && args[0].footer != "") { - footer = args[0].footer; - } - if (typeof args[0].noClose !== 'undefined' && args[0].noClose == true) { - noClose = true; - } - } - - footer = footer.replace("~modalID~", modalID); - content = content.replace("~modalID~", modalID); - - var modal = ``; - $("body").append(modal) - $("#GKModal" + modalID).modal({ - backdrop: 'static', - show: true - }); - $("#GKModal" + modalID).on('hidden.bs.modal', function (e) { - $("#GKModal" + modalID).remove(); - }) - return modalID; -} - -// 隐藏并销毁modal -function CloseModal(modalID) { - $("#" + modalID).modal('hide'); - $("#" + modalID).on('hidden.bs.modal', function (e) { - if ($("#" + modalID).length > 0) { - $("#" + modalID).remove(); - } - }) -} - -// 获取缩略图 -var litpicImgSrc = ""; -var litpicImg = ""; -var currentCID = 0; -var mdlCropperID = ""; -var pubAt = 0; -var optCropper = { - preview: ".pv", - crop: function (e) { - $("#cropWidth").text(Math.round(e.detail.height)); - $("#cropHeight").text(Math.round(e.detail.width)); - var dataUrl = $(this).cropper("getCroppedCanvas") - .toDataURL(); - litpicImg = dataUrl; - $("#litPic").attr("src", litpicImg); - $("#litpic_b64").val(litpicImg); - }, - aspectRatio: 4 / 3, - // 拖动截取缩略图后,截取的缩略图更新到imageItems中 - cropend: function (data) { - // 这里的ID要单独取出来 - var dataUrl = $(this).cropper("getCroppedCanvas") - .toDataURL(); - litpicImg = dataUrl; - $("#litPic").attr("src", litpicImg); - $("#litpic_b64").val(litpicImg); - } -} - -var cropperAspectRatio = { - 0: 16 / 9, - 1: 4 / 3, - 2: 1 / 1, - 3: 2 / 3, - 4: NaN, -} - -function setAspectRatio(ar) { - var opts = optCropper; - opts.aspectRatio = cropperAspectRatio[ar]; - $("#cropImg" + mdlCropperID).cropper('destroy').cropper(opts); -} - -function useDefault(modalID) { - $("#litpic_b64").val(litpicImgSrc); - $("#litPic").attr("src", litpicImgSrc); - CloseModal('GKModal' + modalID); -} - -$(document).ready(function () { - - $("#btnClearAll").click(function (event) { - litpicImgSrc = ""; - litpicImg = ""; - $("#litpic_b64").val(litpicImg); - $("#litPic").attr("src", "../static/defaultpic.gif"); - }) - - // 添加图片 - $("#iptAddImages").change(function (event) { - var files = event.target.files; - for (var i = 0, f; f = files[i]; i++) { - // 如果不是图片忽略 - if (!f.type.match('image.*')) { - continue; - } - - // 将图片渲染到浏览器 - var reader = new FileReader(); - reader.onload = (function (theFile) { - return function (e) { - litpicImgSrc = e.target.result; - SetThumb(litpicImgSrc); - }; - })(f); - reader.readAsDataURL(f); - } - $("#iptAddImages").val(""); - }); - - // 截取缩略图 - function SetThumb(srcURL) { - var footer = - "

使用原图 确定

"; - var optButton = `

- - -

`; - mdlCropperID = ShowMsg( - '

宽度:px,高度:px

' + optButton + '
', { - footer: footer, - noClose: false, - title: 'DedeBIZ缩略图裁剪', - }); - - setTimeout(function () { - $("#cropImg" + mdlCropperID).cropper(optCropper); - }, 500); - } - - if ($.fn.daterangepicker) { - $('.datepicker').daterangepicker({ - "singleDatePicker": true, - "autoApply": true, - "showDropdowns": true, - "linkedCalendars": false, - "timePicker": true, - "timePicker24Hour": true, - "timePickerSeconds": true, - "showCustomRangeLabel": false, - "drops": "up", - ranges: { - '今日': [moment(), moment()], - '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], - '本月': [moment().startOf('month'), moment().startOf('month')], - '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').startOf('month')] - }, - "locale": { - format: 'YYYY-MM-DD HH:mm:ss', - applyLabel: '确定', - cancelLabel: '取消', - daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'], - monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', - '七月', '八月', '九月', '十月', '十一月', '十二月'], - firstDay: 1 - } - }, function (start) { - $(this).val(start.format("YYYY-MM-DD HH:mm:ss")); - }); - $('.datepicker').on('show.daterangepicker', function (ev, picker) { - if (picker.element.offset().top - $(window).scrollTop() + picker.container.outerHeight() > $(window).height()) { - picker.drops = 'up'; - } else { - picker.drops = 'down'; - } - picker.move(); - }) - } - - - +var fixupPos = false; +var canMove = false; +var leftLeaning = 0; +//异步上传缩略图相关变量 +var nForm = null; +var nFrame = null; +var picnameObj = null; +var vImg = null; + +function $Nav() { + if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; + else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; + else return "OT"; +} + +function $Obj(objname) { + return document.getElementById(objname); +} + +//旧的颜色选择框(已经过期) +/* +function ShowColor() +{ + var fcolor=showModalDialog("images/color.htm?ok",false,"dialogWidth:106px;dialogHeight:110px;status:0;dialogTop:"+(+120)+";dialogLeft:"+(+120)); + if(fcolor!=null && fcolor!="undefined") document.form1.color.value = fcolor; +} +*/ + +function ColorSel(c, oname) { + var tobj = $Obj(oname); + if (!tobj) tobj = eval('document.form1.' + oname); + if (!tobj) { + $Obj('colordlg').style.display = 'none'; + return false; + } + else { + tobj.value = c; + $Obj('colordlg').style.display = 'none'; + return true; + } +} + +function ShowColor(e, o) { + LoadNewDiv(e, 'images/colornew.htm', 'colordlg'); +} + +function ShowHide(objname) { + var obj = $Obj(objname); + if (obj.style.display != "none") obj.style.display = "none"; + else obj.style.display = "inline-block"; +} + +function ShowHideT(objname) { + var obj = $Obj(objname); + if (obj.style.display != "none") obj.style.display = "none"; + else obj.style.display = ($Nav() == "IE" ? "inline-block" : "table"); +} + +function ShowObj(objname) { + var obj = $Obj(objname); + if (obj == null) return false; + obj.style.display = ($Nav() == "IE" ? "inline-block" : "table"); +} + +function ShowObjRow(objname) { + var obj = $Obj(objname); + obj.style.display = ($Nav() == "IE" ? "inline-block" : "table-row"); +} + +function AddTypeid2() { + ShowObjRow('typeid2tr'); + //$Obj('typeid2ct').innerHTML = $Obj('typeidct').innerHTML.replace('typeid','typeid2'); +} + +function HideObj(objname) { + var obj = $Obj(objname); + if (obj == null) return false; + obj.style.display = "none"; +} + +function ShowItem1() { + ShowObj('needset'); ShowObj('head1'); HideObj('head2'); HideObj('adset'); ShowObj('votehead'); +} + +function ShowItem2() { + ShowObj('head2'); ShowObj('adset'); HideObj('voteset'); HideObj('head1'); HideObj('needset'); HideObj('votehead'); +} + +function SeePic(img, f) { + if (f.value != '') img.src = f.value; +} + +function SeePicNew(f, imgdid, frname, hpos, acname) { + var newobj = null; + if (f.value == '') return; + vImg = $Obj(imgdid); + picnameObj = document.getElementById('picname'); + nFrame = $Nav() == 'IE' ? eval('document.frames.' + frname) : $Obj(frname); + nForm = f.form; + //修改form的action等参数 + if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmit); + else nForm.removeEventListener("submit", checkSubmit, false); + nForm.action = 'archives_do.php'; + nForm.target = frname; + nForm.dopost.value = 'uploadLitpic'; + nForm.submit(); + + picnameObj.value = ''; + newobj = $Obj('uploadwait'); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = 'uploadwait'; + newobj.style.position = 'absolute'; + newobj.className = 'uploadwait'; + newobj.style.width = 120; + newobj.style.height = 20; + newobj.style.top = hpos; + newobj.style.left = 100; + newobj.style.display = 'block'; + document.body.appendChild(newobj); + newobj.innerHTML = '上传中...'; + } + newobj.style.display = 'block'; + //提交后还原form的action等参数 + nForm.action = acname; + nForm.dopost.value = 'save'; + nForm.target = ''; + nForm.litpic.disabled = true; + //nForm.litpic = null; + //if(nForm.attachEvent) nForm.attachEvent("onsubmit", checkSubmit); + //else nForm.addEventListener("submit", checkSubmit, true); +} + +function SelectFlash() { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 300; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + window.open("./dialog/select_media.php?f=form1.flashurl", "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); +} + +function SelectMedia(fname) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + window.open("./dialog/select_media.php?f=" + fname, "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); +} + +function SelectSoft(fname) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY - 50; } + else { var posLeft = 100; var posTop = 100; } + window.open("./dialog/select_soft.php?f=" + fname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); +} + +function SelectImage(fname, stype, imgsel) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + if (!fname) fname = 'form1.picname'; + if (imgsel) imgsel = '&noeditor=yes'; + if (!stype) stype = ''; + window.open("./dialog/select_images.php?f=" + fname + "&noeditor=yes&imgstick=" + stype + imgsel, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=650,height=400,left=" + posLeft + ", top=" + posTop); +} + +function imageCut(fname) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + if (!fname) fname = 'picname'; + file = document.getElementById(fname).value; + if (file == '') { + alert('请先选择网站内已上传的图片'); + return false; + } + window.open("imagecut.php?f=" + fname + "&file=" + file, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + posLeft + ", top=" + posTop); +} + +function SelectImageN(fname, stype, vname) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + if (!fname) fname = 'form1.picname'; + if (!stype) stype = ''; + window.open("./dialog/select_images.php?f=" + fname + "&imgstick=" + stype + "&v=" + vname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); +} + +function SelectKeywords(f) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 350; var posTop = window.event.clientY - 200; } + else { var posLeft = 100; var posTop = 100; } + window.open("article_keywords_select.php?f=" + f, "popUpkwWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=450,left=" + posLeft + ", top=" + posTop); +} + +function InitPage() { + var selsource = $Obj('selsource'); + var selwriter = $Obj('selwriter'); + var titlechange = $Obj('title'); + var colorbt = $Obj('color'); + if (selsource) { selsource.onmousedown = function (e) { SelectSource(e); } } + if (selwriter) { selwriter.onmousedown = function (e) { SelectWriter(e); } } + if (titlechange) { titlechange.onchange = function (e) { TestHasTitle(e); } } +} + +function OpenMyWin(surl) { + window.open(surl, "popUpMyWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=200, top=100"); +} + +function OpenMyWinCoOne(surl) { + window.open(surl, "popUpMyWin2", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=450,left=100,top=50"); +} + +function PutSource(str) { + var osource = $Obj('source'); + if (osource) osource.value = str; + $Obj('mysource').style.display = 'none'; + ChangeFullDiv('hide'); +} + +function PutWriter(str) { + var owriter = $Obj('writer'); + if (owriter) owriter.value = str; + $Obj('mywriter').style.display = 'none'; + ChangeFullDiv('hide'); +} + +// 增加选择投票内容 +function PutVote(str) { + var ovote = $Obj('voteid'); + if (ovote) { + ovote.value = str; + tb_remove(false); + } else { + parent.document.form1.voteid.value = str; + tb_remove(true); + } + +} + +function ClearDivCt(objname) { + if (!$Obj(objname)) return; + $Obj(objname).innerHTML = ''; + $Obj(objname).style.display = 'none'; + ChangeFullDiv("hide"); +} + +function ChangeFullDiv(showhide, screenheigt) { + var newobj = $Obj('fullpagediv'); + if (showhide == 'show') { + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = 'fullpagediv'; + newobj.style.position = 'absolute'; + newobj.className = 'fullpagediv'; + newobj.style.height = document.body.clientHeight + 50 + 'px'; + document.body.appendChild(newobj); + } + else { + newobj.style.display = 'block'; + } + } + else { + if (newobj) newobj.style.display = 'none'; + } +} + +function SelectSource(e) { + LoadNewDiv(e, 'article_select_sw.php?t=source&k=8&rnd=' + Math.random(), 'mysource'); + //ChangeFullDiv('show'); +} + +function SelectWriter(e) { + LoadNewDiv(e, 'article_select_sw.php?t=writer&k=8&rnd=' + Math.random(), 'mywriter'); + //ChangeFullDiv('show'); +} + +function LoadNewDiv(e, surl, oname) { + var pxStr = ''; + if ($Nav() == 'IE') { + var posLeft = window.event.clientX - 20; + var posTop = window.event.clientY - 30; + // IE下scrollTop的兼容性问题 + var scrollTop = document.documentElement.scrollTop || window.pageYOffset; + if (typeof (scrollTop) == 'undefined') scrollTop = document.body.scrollTop; + posTop += scrollTop; + + } + else { + var posLeft = e.pageX - 20; + var posTop = e.pageY - 30; + pxStr = 'px'; + } + posLeft = posLeft - 100; + var newobj = $Obj(oname); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = oname; + newobj.style.position = 'absolute'; + newobj.className = oname; + newobj.className += ' dlgws'; + newobj.style.top = posTop + pxStr; + newobj.style.left = posLeft + pxStr; + document.body.appendChild(newobj); + } + else { + newobj.style.display = "block"; + } + if (newobj.innerHTML.length < 10) { + var myajax = new DedeAjax(newobj); + myajax.SendGet(surl); + } +} + +function TestHasTitle(e) { + LoadNewDiv2(e, 'article_test_title.php?t=' + $Obj('title').value, 'mytitle', "dlgTesttitle"); +} + +function LoadNewDiv2(e, surl, oname, dlgcls) { + var posLeft = 300; + var posTop = 50; + var newobj = $Obj(oname); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = oname; + newobj.style.position = 'absolute'; + newobj.className = dlgcls; + newobj.style.top = posTop; + newobj.style.left = posLeft; + newobj.style.display = 'none'; + document.body.appendChild(newobj); + } + newobj.innerHTML = ''; + var myajax = new DedeAjax(newobj); + myajax.SendGet2(surl); + if (newobj.innerHTML == '') newobj.style.display = 'none'; + else newobj.style.display = 'block'; + jQuery(newobj).css('top', '50px').css('left', '300px'); + DedeXHTTP = null; +} + +function ShowUrlTr() { + var jumpTest = $Obj('flagsj'); + var jtr = $Obj('redirecturltr'); + var jf = $Obj('redirecturl'); + if (jumpTest.checked) jtr.style.display = "block"; + else { + jf.value = ''; + jtr.style.display = "none"; + } +} + +function ShowUrlTrEdit() { + ShowUrlTr(); + var jumpTest = $Obj('isjump'); + var rurl = $Obj('redirecturl'); + if (!jumpTest.checked) rurl.value = ""; +} + +function CkRemote() { + document.getElementById('picname').value = ''; +} + +//载入指定宽高的AJAX窗体 +function LoadQuickDiv(e, surl, oname, w, h) { + if ($Nav() == 'IE') { + if (window.event) { + var posLeft = window.event.clientX - 20; + var posTop = window.event.clientY - 30; + } + else { + var posLeft = e.clientX - 20; + var posTop = e.clientY + 30; + } + } + else { + var posLeft = e.pageX - 20; + var posTop = e.pageY - 30; + } + posTop += MyGetScrollTop(); + posLeft = posLeft - 400; + //固定位置的高度 + if (fixupPos) { + posLeft = posTop = 50; + } + var newobj = $Obj(oname); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = oname; + newobj.style.position = 'absolute'; + newobj.className = 'pubdlg'; + newobj.style.width = w; + newobj.style.height = h + 30; + document.body.appendChild(newobj); + } + if (posTop > 500) posTop = 500; + if (posLeft < 50) posLeft = 50; + newobj.style.minWidth = "450px"; + newobj.style.top = posTop + "px"; + newobj.style.left = posLeft + "px"; + newobj.innerHTML = '
Loading...
'; + newobj.style.display = 'block'; + var myajax = new DedeAjax(newobj); + myajax.SendGet(surl); + fixupPos = false; +} + +function MyGetScrollTop() { + return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; +} + +//通用事件获取接口 +function getEvent() { + if ($Nav() == 'IE') return window.event; + func = getEvent.caller; + while (func != null) { + var arg0 = func.arguments[0]; + if (arg0) { + if ((arg0.constructor == Event || arg0.constructor == MouseEvent) + || (typeof (arg0) == "object" && arg0.preventDefault && arg0.stopPropagation)) { + return arg0; + } + } + func = func.caller; + } + return null; +} + +//模拟ondrop事件相关代码 +/*---------------------------- +leftLeaning = 300; +如果对象内容固定,用onmousedown=DropStart去除底下的DropStop +newobj.ondblclick = DropStart; +newobj.onmousemove = DropMove; +newobj.onmousedown = DropStop; +----------------------------*/ +function DropStart() { + this.style.cursor = 'move'; +} + +function DropStop() { + this.style.cursor = 'default'; +} + +function DropMove() { + if (this.style.cursor != 'move') return; + var event = getEvent(); + if ($Nav() == 'IE') { + var posLeft = event.clientX - 20; + var posTop = event.clientY - 30; + posTop += document.body.scrollTop; + } + else { + var posLeft = event.pageX - 20; + var posTop = event.pageY - 30; + } + this.style.top = posTop; + this.style.left = posLeft - leftLeaning; +} + +//对指定的元素绑定move事件 +/*----------------------------- +onmousemove="DropMoveHand('divname', 225);" +onmousedown="DropStartHand();" +onmouseup="DropStopHand();" +-----------------------------*/ +function DropStartHand() { + canMove = (canMove ? false : true); +} +function DropStopHand() { + canMove = false; +} +function DropMoveHand(objid, mleftLeaning) { + var event = getEvent(); + var obj = $Obj(objid); + if (!canMove) return; + + if ($Nav() == 'IE') { + var posLeft = event.clientX - 20; + var posTop = event.clientY - 20; + posTop += window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; + } + else { + var posLeft = event.pageX - 20; + var posTop = event.pageY - 20; + } + obj.style.top = posTop + "px"; + obj.style.left = posLeft - mleftLeaning + "px"; +} + +//复制内容到剪切板 +function copyToClipboard(txt) { + if (txt == null || txt == '') { + alert("没有选择任何内容!"); + return; + } + if (window.clipboardData) { + window.clipboardData.clearData(); + window.clipboardData.setData("Text", txt); + } + else if (navigator.userAgent.indexOf('Opera') != -1) { + window.location = txt; + } + else { + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + } catch (e) { + alert("被浏览器拒绝\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'"); + } + var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); + if (!clip) return; + + var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); + if (!trans) return; + + trans.addDataFlavor('text/unicode'); + var str = new Object(); + var len = new Object(); + var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); + var copytext = txt; + str.data = copytext; + trans.setTransferData("text/unicode", str, copytext.length * 2); + var clipid = Components.interfaces.nsIClipboard; + if (!clip) return false; + clip.setData(trans, null, clipid.kGlobalClipboard); + } +} + +function getSelTxt() { + var g, r; + if (document.all) { + g = document.selection.createRange().text; + } else { + g = document.getSelection(); + } + return g; +} + +//显示栏目Map地图 +function ShowCatMap(e, obj, cid, targetId, oldvalue) { + fixupPos = true; + LoadQuickDiv(e, 'archives_do.php?dopost=getCatMap&targetid=' + targetId + '&channelid=' + cid + '&oldvalue=' + oldvalue + '&rnd=' + Math.random(), 'getCatMap', '700px', '500px'); + ChangeFullDiv('show'); +} + +function getSelCat(targetId) { + var selBox = document.quicksel.seltypeid; + var targetObj = $Obj(targetId); + var selvalue = ''; + //副栏目(多选) + if (targetId == 'typeid2') { + var j = 0; + for (var i = 0; i < selBox.length; i++) { + if (selBox[i].checked) { + j++; + if (j == 10) break; + selvalue += (selvalue == '' ? selBox[i].value : ',' + selBox[i].value); + } + } + if (targetObj) targetObj.value = selvalue; + } + //主栏目(单选) + else { + if (selBox) { + for (var i = 0; i < selBox.length; i++) { + if (selBox[i].checked) selvalue = selBox[i].value; + } + } + if (selvalue == '') { + alert('您没有选中任何项目'); + return; + } + if (targetObj) { + for (var j = 0; j < targetObj.length; j++) { + op = targetObj.options[j]; + if (op.value == selvalue) op.selected = true; + } + } + } + HideObj("getCatMap"); + ChangeFullDiv("hide"); +} + +function getElementLeft(element) { + var actualLeft = element.offsetLeft; + var current = element.offsetParent; + + while (current !== null) { + actualLeft += current.offsetLeft; + current = current.offsetParent; + } + + return actualLeft; +} + +function getElementTop(element) { + var actualTop = element.offsetTop; + var current = element.offsetParent; + + while (current !== null) { + actualTop += current.offsetTop; + current = current.offsetParent; + } + + return actualTop; +} + +// Copyright 2020 The MuEMS Authors. All rights reserved. +// license that can be found in the LICENSE file. + +// -----msgbox------------------------------------- + +// 生成一个随机ID +function guid() { + function S4() { + return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); + } + return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4()); +} + +// 显示对话框,动态创建modal并显示,退出自动销毁窗体 +// args是以下结构体 +/* +args = { + title : "", // 标题,默认是MuEMS + footer : "", // 底部按钮,可以自定义按钮 + noClose : false, // 是否显示右上角关闭按钮,默认显示 +} +*/ +// 函数会返回一个modalID,通过这个ID可自已定义一些方法 +// 这里用到了一个展开语法 +// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax +function ShowMsg(content, ...args) { + title = "DedeBIZ信息提示"; + if (typeof content == "undefined") content = ""; + modalID = guid(); + var footer = ``; + var noClose = false; + + if (args.length == 1) { + // 存在args参数 + if (typeof args[0].title !== 'undefined' && args[0].title != "") { + title = args[0].title; + } + if (typeof args[0].footer !== 'undefined' && args[0].footer != "") { + footer = args[0].footer; + } + if (typeof args[0].noClose !== 'undefined' && args[0].noClose == true) { + noClose = true; + } + } + + footer = footer.replace("~modalID~", modalID); + content = content.replace("~modalID~", modalID); + + var modal = ``; + $("body").append(modal) + $("#GKModal" + modalID).modal({ + backdrop: 'static', + show: true + }); + $("#GKModal" + modalID).on('hidden.bs.modal', function (e) { + $("#GKModal" + modalID).remove(); + }) + return modalID; +} + +// 隐藏并销毁modal +function CloseModal(modalID) { + $("#" + modalID).modal('hide'); + $("#" + modalID).on('hidden.bs.modal', function (e) { + if ($("#" + modalID).length > 0) { + $("#" + modalID).remove(); + } + }) +} + +// 获取缩略图 +var litpicImgSrc = ""; +var litpicImg = ""; +var currentCID = 0; +var mdlCropperID = ""; +var pubAt = 0; +var optCropper = { + preview: ".pv", + crop: function (e) { + $("#cropWidth").text(Math.round(e.detail.height)); + $("#cropHeight").text(Math.round(e.detail.width)); + var dataUrl = $(this).cropper("getCroppedCanvas") + .toDataURL(); + litpicImg = dataUrl; + $("#litPic").attr("src", litpicImg); + $("#litpic_b64").val(litpicImg); + }, + aspectRatio: 4 / 3, + // 拖动截取缩略图后,截取的缩略图更新到imageItems中 + cropend: function (data) { + // 这里的ID要单独取出来 + var dataUrl = $(this).cropper("getCroppedCanvas") + .toDataURL(); + litpicImg = dataUrl; + $("#litPic").attr("src", litpicImg); + $("#litpic_b64").val(litpicImg); + } +} + +var cropperAspectRatio = { + 0: 16 / 9, + 1: 4 / 3, + 2: 1 / 1, + 3: 2 / 3, + 4: NaN, +} + +function setAspectRatio(ar) { + var opts = optCropper; + opts.aspectRatio = cropperAspectRatio[ar]; + $("#cropImg" + mdlCropperID).cropper('destroy').cropper(opts); +} + +function useDefault(modalID) { + $("#litpic_b64").val(litpicImgSrc); + $("#litPic").attr("src", litpicImgSrc); + CloseModal('GKModal' + modalID); +} + +$(document).ready(function () { + + $("#btnClearAll").click(function (event) { + litpicImgSrc = ""; + litpicImg = ""; + $("#litpic_b64").val(litpicImg); + $("#litPic").attr("src", "../static/defaultpic.gif"); + }) + + // 添加图片 + $("#iptAddImages").change(function (event) { + var files = event.target.files; + for (var i = 0, f; f = files[i]; i++) { + // 如果不是图片忽略 + if (!f.type.match('image.*')) { + continue; + } + + // 将图片渲染到浏览器 + var reader = new FileReader(); + reader.onload = (function (theFile) { + return function (e) { + litpicImgSrc = e.target.result; + SetThumb(litpicImgSrc); + }; + })(f); + reader.readAsDataURL(f); + } + $("#iptAddImages").val(""); + }); + + // 截取缩略图 + function SetThumb(srcURL) { + var footer = + "

使用原图 确定

"; + var optButton = `

+ + +

`; + mdlCropperID = ShowMsg( + '

宽度:px,高度:px

' + optButton + '
', { + footer: footer, + noClose: false, + title: 'DedeBIZ缩略图裁剪', + }); + + setTimeout(function () { + $("#cropImg" + mdlCropperID).cropper(optCropper); + }, 500); + } + + if ($.fn.daterangepicker) { + $('.datepicker').daterangepicker({ + "singleDatePicker": true, + "autoApply": true, + "showDropdowns": true, + "linkedCalendars": false, + "timePicker": true, + "timePicker24Hour": true, + "timePickerSeconds": true, + "showCustomRangeLabel": false, + "drops": "up", + ranges: { + '今日': [moment(), moment()], + '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + '本月': [moment().startOf('month'), moment().startOf('month')], + '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').startOf('month')] + }, + "locale": { + format: 'YYYY-MM-DD HH:mm:ss', + applyLabel: '确定', + cancelLabel: '取消', + daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'], + monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', + '七月', '八月', '九月', '十月', '十一月', '十二月'], + firstDay: 1 + } + }, function (start) { + $(this).val(start.format("YYYY-MM-DD HH:mm:ss")); + }); + $('.datepicker').on('show.daterangepicker', function (ev, picker) { + if (picker.element.offset().top - $(window).scrollTop() + picker.container.outerHeight() > $(window).height()) { + picker.drops = 'up'; + } else { + picker.drops = 'down'; + } + picker.move(); + }) + } + + + }) \ No newline at end of file diff --git a/src/dede/js/member.js b/src/admin/js/member.js old mode 100755 new mode 100644 similarity index 94% rename from src/dede/js/member.js rename to src/admin/js/member.js index 2a1c09b0..e96f2849 --- a/src/dede/js/member.js +++ b/src/admin/js/member.js @@ -1,71 +1,71 @@ -if(moz == null) -{ - var ie = document.all != null; - var moz = !ie && document.getElementById != null && document.layers == null; -} -if(moz) { - extendEventObject(); - extendElementModel(); - emulateAttachEvent(); -} - -function delArc(mid){ - var qstr=getCheckboxItem(); - if(mid==0) mid = getOneItem(); - location="member_do.php?id="+qstr+"&dopost=delmembers"; -} - -//获得选中文件的文件名 -function getCheckboxItem() -{ - var allSel=""; - if(document.form2.mid.value) return document.form2.mid.value; - for(i=0;i确定要操作>>"; - tb_showmsg(msg); -} - -/** - * 弹窗主函数 - * refParent 参数(0|1)决定点击关闭后是否刷新上级窗口 - */ -function tb_show(caption, url, refParent) -{ - ref_parent = refParent; - if (typeof document.body.style.maxHeight === "undefined") - { - $("body","html").css({height: "100%", width: "100%"}); - $("html").css("overflow","hidden"); - if (document.getElementById("TB_HideSelect") === null) { - $("body").append("
"); - $("#TB_overlay").click(tb_remove); - } - } - else - { - if(document.getElementById("TB_overlay") === null){ - $("body").append("
"); - $("#TB_overlay").click(tb_remove); - } - } - - if(tb_detectMacXFF()){ - $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); - }else{ - $("#TB_overlay").addClass("TB_overlayBG"); - } - - if(caption===null) caption="消息窗口"; - $("body").append("
"); - $('#TB_load').show(); - - var baseURL; - if(url.indexOf("?")!==-1){ - baseURL = url.substr(0, url.indexOf("?")); - }else{ - baseURL = url; - } - - var queryString = url.replace(/^[^\?]+\??/,''); - var params = tb_parseQuery( queryString ); - - TB_WIDTH = (params['width']*1) + 30 || 630; - TB_HEIGHT = (params['height']*1) + 40 || 420; - ajaxContentW = TB_WIDTH - 30; - ajaxContentH = TB_HEIGHT - 45; - - // either iframe or ajax window - if(url.indexOf('TB_iframe') != -1) - { - urlNoQuery = url.split('TB_'); - $("#TB_iframeContent").remove(); - tb_frameid++; - if(params['modal'] != "true"){ - $("#TB_window").append("
"+caption+"
"); - }else{ - $("#TB_overlay").unbind(); - $("#TB_window").append(""); - } - } - // not an iframe, ajax - else - { - if($("#TB_window").css("display") != "block"){ - if(params['modal'] != "true"){ - $("#TB_window").append("
"+caption+"
"); - }else{ - $("#TB_overlay").unbind(); - $("#TB_window").append("
"); - } - }else{ - $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; - $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; - $("#TB_ajaxContent")[0].scrollTop = 0; - $("#TB_ajaxWindowTitle").html(caption); - } - } - - $("#TB_closeWindowButton").click(tb_remove); - - if(url.indexOf('TB_inline') != -1) - { - $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); - $("#TB_window").unload(function () { - $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished - }); - tb_position(); - $("#TB_load").remove(); - $("#TB_window").css({display:"block"}); - } - else if(url.indexOf('TB_iframe') != -1) - { - tb_position(); - if($.browser.safari){//safari needs help because it will not fire iframe onload - $("#TB_load").remove(); - $("#TB_window").css({display:"block"}); - } - } - else - { - $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method - tb_position(); - $("#TB_load").remove(); - tb_init("#TB_ajaxContent a.thickbox"); - $("#TB_window").css({display:"block"}); - }); - } - $("#TB_window").draggable(); //支持窗口拖动 - //alert( $("#TB_window").get(0).innerHTML ); - if(!params['modal']) - { - document.onkeyup = function(e){ kc = (e == null ? event.keyCode : e.which); if(kc == 27){ tb_remove(); } }; - } -} - -/** - * 弹窗信息框 - */ -function tb_showmsg(msg, caption, talign, ww, wh) -{ - //默认参数 - if(!caption || caption=="") caption="消息窗口"; - if(!talign) talign = "center"; - if(!ww) ww = "350px"; - if(!wh) wh = "180px"; - - if (typeof document.body.style.maxHeight === "undefined") { - $("body","html").css({height: "100%", width: "100%"}); - $("html").css("overflow","hidden"); - } - if(document.getElementById("TB_overlay") === null){ - $("body").append("
"); - $("#TB_overlay").click(tb_remove); - } - - if(tb_detectMacXFF()){ - $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); - }else{ - $("#TB_overlay").addClass("TB_overlayBG"); - } - - - $("#TB_window").append("
"+caption+"
"+ msg +"
"); - - $("#TB_closeWindowButton").click(tb_remove); - - $("#TB_window").css({display:"block"}); - topx = ($.browser.msie)? 150 : 50; - $("#TB_window").css({top: topx + "px"}); - $("#TB_window")[0].style.width = ww; - $("#TB_window")[0].style.height = wh; - $("#TB_window").draggable(); //支持窗口拖动 - - document.onkeyup = function(e){ kc = (e == null ? event.keyCode : e.which); if(kc == 27){ tb_remove(); } }; -} - -//helper functions below -function tb_showIframe() -{ - $("#TB_load").remove(); - $("#TB_window").css({display:"block"}); -} - -// 增加父级框架关闭内容的方法 -function tb_remove() -{ - var isparent = $("#TB_imageOff",parent.document).length; - if(isparent ) - { - $("#TB_imageOff",parent.document).unbind("click"); - $("#TB_closeWindowButton",parent.document).unbind("click"); - $("#TB_window",parent.document).fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect',parent.document).trigger("unload").unbind().remove();}); - $("#TB_load",parent.document).remove(); - //if IE 6 - if (typeof parent.document.body.style.maxHeight == "undefined") - { - $("body","html",parent.document).css({height: "auto", width: "auto"}); - $("html",parent.document).css("overflow",""); - } - document.onkeydown = ""; - document.onkeyup = ""; - if( ref_parent ) location.reload(); - return; - } else { - $("#TB_imageOff").unbind("click"); - $("#TB_closeWindowButton").unbind("click"); - $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); - $("#TB_load").remove(); - //if IE 6 - if (typeof document.body.style.maxHeight == "undefined") - { - $("body","html").css({height: "auto", width: "auto"}); - $("html").css("overflow",""); - } - document.onkeydown = ""; - document.onkeyup = ""; - if( ref_parent ) location.reload(); - return; - } -} - -function tb_position() -{ - $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); - // take away IE6 - if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) - { - $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); - } -} - -function tb_parseQuery ( query ) -{ - var Params = {}; - if ( ! query ) {return Params;}// return empty object - var Pairs = query.split(/[;&]/); - for ( var i = 0; i < Pairs.length; i++ ) { - var KeyVal = Pairs[i].split('='); - if ( ! KeyVal || KeyVal.length != 2 ) {continue;} - var key = unescape( KeyVal[0] ); - var val = unescape( KeyVal[1] ); - val = val.replace(/\+/g, ' '); - Params[key] = val; - } - return Params; -} - -function tb_getPageSize() -{ - var de = document.documentElement; - var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; - var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; - arrayPageSize = [w,h]; - return arrayPageSize; -} - -function tb_detectMacXFF() -{ - var userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { - return true; - } -} - - +/*********************************************************** + * 使用iframe模拟ajax的窗体,本JS需要引用jquery框架 + * 为了支持拖动,需要同时引入jquery.ui.core以及ui.draggable.js + * 修改自 thickbox 源码 +************************************************************/ +var $ = jQuery; +var tb_pathToImage = "images/loadinglit.gif"; +var ref_parent = false; +var tb_frameid = 0; + +/** + * 对于指定了class为'thickbox'的超链接自动监听其超链接,其中可以指定 rel=(0|1) 属性决定点击关闭后是否刷新上级窗口 + * 如果不需要侦听超链接事件,可以禁用些初始化方法 + */ +$(document).ready(function() +{ + tb_init('a.thickbox, area.thickbox, input.thickbox'); + imgLoader = new Image(); + imgLoader.src = tb_pathToImage; +}); + +function tb_init(domChunk) +{ + $(domChunk).click(function(){ + var t = this.title || this.name || null; + var a = this.href || this.alt; + var g = this.rel || false; + tb_show(t, a, g); + this.blur(); + return false; + }); +} + +/** + * 弹窗警告窗口让用户确认操作 + * refParent 参数(0|1)决定点击关闭后是否刷新上级窗口 + */ +function tb_action(msg, gourl) +{ + msg += "
<<点错了  |  确定要操作>>"; + tb_showmsg(msg); +} + +/** + * 弹窗主函数 + * refParent 参数(0|1)决定点击关闭后是否刷新上级窗口 + */ +function tb_show(caption, url, refParent) +{ + ref_parent = refParent; + if (typeof document.body.style.maxHeight === "undefined") + { + $("body","html").css({height: "100%", width: "100%"}); + $("html").css("overflow","hidden"); + if (document.getElementById("TB_HideSelect") === null) { + $("body").append("
"); + $("#TB_overlay").click(tb_remove); + } + } + else + { + if(document.getElementById("TB_overlay") === null){ + $("body").append("
"); + $("#TB_overlay").click(tb_remove); + } + } + + if(tb_detectMacXFF()){ + $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); + }else{ + $("#TB_overlay").addClass("TB_overlayBG"); + } + + if(caption===null) caption="消息窗口"; + $("body").append("
"); + $('#TB_load').show(); + + var baseURL; + if(url.indexOf("?")!==-1){ + baseURL = url.substr(0, url.indexOf("?")); + }else{ + baseURL = url; + } + + var queryString = url.replace(/^[^\?]+\??/,''); + var params = tb_parseQuery( queryString ); + + TB_WIDTH = (params['width']*1) + 30 || 630; + TB_HEIGHT = (params['height']*1) + 40 || 420; + ajaxContentW = TB_WIDTH - 30; + ajaxContentH = TB_HEIGHT - 45; + + // either iframe or ajax window + if(url.indexOf('TB_iframe') != -1) + { + urlNoQuery = url.split('TB_'); + $("#TB_iframeContent").remove(); + tb_frameid++; + if(params['modal'] != "true"){ + $("#TB_window").append("
"+caption+"
"); + }else{ + $("#TB_overlay").unbind(); + $("#TB_window").append(""); + } + } + // not an iframe, ajax + else + { + if($("#TB_window").css("display") != "block"){ + if(params['modal'] != "true"){ + $("#TB_window").append("
"+caption+"
"); + }else{ + $("#TB_overlay").unbind(); + $("#TB_window").append("
"); + } + }else{ + $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; + $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; + $("#TB_ajaxContent")[0].scrollTop = 0; + $("#TB_ajaxWindowTitle").html(caption); + } + } + + $("#TB_closeWindowButton").click(tb_remove); + + if(url.indexOf('TB_inline') != -1) + { + $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); + $("#TB_window").unload(function () { + $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished + }); + tb_position(); + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + } + else if(url.indexOf('TB_iframe') != -1) + { + tb_position(); + if($.browser.safari){//safari needs help because it will not fire iframe onload + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + } + } + else + { + $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method + tb_position(); + $("#TB_load").remove(); + tb_init("#TB_ajaxContent a.thickbox"); + $("#TB_window").css({display:"block"}); + }); + } + $("#TB_window").draggable(); //支持窗口拖动 + //alert( $("#TB_window").get(0).innerHTML ); + if(!params['modal']) + { + document.onkeyup = function(e){ kc = (e == null ? event.keyCode : e.which); if(kc == 27){ tb_remove(); } }; + } +} + +/** + * 弹窗信息框 + */ +function tb_showmsg(msg, caption, talign, ww, wh) +{ + //默认参数 + if(!caption || caption=="") caption="消息窗口"; + if(!talign) talign = "center"; + if(!ww) ww = "350px"; + if(!wh) wh = "180px"; + + if (typeof document.body.style.maxHeight === "undefined") { + $("body","html").css({height: "100%", width: "100%"}); + $("html").css("overflow","hidden"); + } + if(document.getElementById("TB_overlay") === null){ + $("body").append("
"); + $("#TB_overlay").click(tb_remove); + } + + if(tb_detectMacXFF()){ + $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); + }else{ + $("#TB_overlay").addClass("TB_overlayBG"); + } + + + $("#TB_window").append("
"+caption+"
"+ msg +"
"); + + $("#TB_closeWindowButton").click(tb_remove); + + $("#TB_window").css({display:"block"}); + topx = ($.browser.msie)? 150 : 50; + $("#TB_window").css({top: topx + "px"}); + $("#TB_window")[0].style.width = ww; + $("#TB_window")[0].style.height = wh; + $("#TB_window").draggable(); //支持窗口拖动 + + document.onkeyup = function(e){ kc = (e == null ? event.keyCode : e.which); if(kc == 27){ tb_remove(); } }; +} + +//helper functions below +function tb_showIframe() +{ + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); +} + +// 增加父级框架关闭内容的方法 +function tb_remove() +{ + var isparent = $("#TB_imageOff",parent.document).length; + if(isparent ) + { + $("#TB_imageOff",parent.document).unbind("click"); + $("#TB_closeWindowButton",parent.document).unbind("click"); + $("#TB_window",parent.document).fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect',parent.document).trigger("unload").unbind().remove();}); + $("#TB_load",parent.document).remove(); + //if IE 6 + if (typeof parent.document.body.style.maxHeight == "undefined") + { + $("body","html",parent.document).css({height: "auto", width: "auto"}); + $("html",parent.document).css("overflow",""); + } + document.onkeydown = ""; + document.onkeyup = ""; + if( ref_parent ) location.reload(); + return; + } else { + $("#TB_imageOff").unbind("click"); + $("#TB_closeWindowButton").unbind("click"); + $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); + $("#TB_load").remove(); + //if IE 6 + if (typeof document.body.style.maxHeight == "undefined") + { + $("body","html").css({height: "auto", width: "auto"}); + $("html").css("overflow",""); + } + document.onkeydown = ""; + document.onkeyup = ""; + if( ref_parent ) location.reload(); + return; + } +} + +function tb_position() +{ + $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); + // take away IE6 + if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) + { + $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); + } +} + +function tb_parseQuery ( query ) +{ + var Params = {}; + if ( ! query ) {return Params;}// return empty object + var Pairs = query.split(/[;&]/); + for ( var i = 0; i < Pairs.length; i++ ) { + var KeyVal = Pairs[i].split('='); + if ( ! KeyVal || KeyVal.length != 2 ) {continue;} + var key = unescape( KeyVal[0] ); + var val = unescape( KeyVal[1] ); + val = val.replace(/\+/g, ' '); + Params[key] = val; + } + return Params; +} + +function tb_getPageSize() +{ + var de = document.documentElement; + var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; + var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; + arrayPageSize = [w,h]; + return arrayPageSize; +} + +function tb_detectMacXFF() +{ + var userAgent = navigator.userAgent.toLowerCase(); + if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { + return true; + } +} + + diff --git a/src/dede/log_edit.php b/src/admin/log_edit.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/log_edit.php rename to src/admin/log_edit.php index bc63e0f4..63cfbe6f --- a/src/dede/log_edit.php +++ b/src/admin/log_edit.php @@ -1,42 +1,41 @@ -ExecuteNoneQuery("DELETE FROM #@__log"); - ShowMsg("成功清空所有日志", "log_list.php"); - exit(); -} else if ($dopost == "del") { - $bkurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "log_list.php"; - $ids = explode('`', $ids); - $dquery = ""; - foreach ($ids as $id) { - if ($dquery == "") { - $dquery .= " lid='$id' "; - } else { - $dquery .= " Or lid='$id' "; - } - } - if ($dquery != "") $dquery = " where ".$dquery; - $dsql->ExecuteNoneQuery("DELETE FROM #@__log $dquery"); - ShowMsg("成功删除指定的日志", $bkurl); - exit(); -} else { - ShowMsg("无法识别您的请求", "javascript:;"); - exit(); -} +ExecuteNoneQuery("DELETE FROM #@__log"); + ShowMsg("成功清空所有日志", "log_list.php"); + exit(); +} else if ($dopost == "del") { + $bkurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "log_list.php"; + $ids = explode('`', $ids); + $dquery = ""; + foreach ($ids as $id) { + if ($dquery == "") { + $dquery .= " lid='$id' "; + } else { + $dquery .= " Or lid='$id' "; + } + } + if ($dquery != "") $dquery = " where ".$dquery; + $dsql->ExecuteNoneQuery("DELETE FROM #@__log $dquery"); + ShowMsg("成功删除指定的日志", $bkurl); + exit(); +} else { + ShowMsg("无法识别您的请求", "javascript:;"); + exit(); +} diff --git a/src/dede/log_list.php b/src/admin/log_list.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/log_list.php rename to src/admin/log_list.php index 67528b58..2a15e2d9 --- a/src/dede/log_list.php +++ b/src/admin/log_list.php @@ -1,46 +1,45 @@ - 0) $where .= " AND #@__log.adminid='$adminid' "; -if ($cip != "") $where .= " AND #@__log.cip LIKE '%$cip%' "; - -if ($dtime > 0) { - $nowtime = time(); - $starttime = $nowtime - ($dtime * 24 * 3600); - $where .= " AND #@__log.dtime>'$starttime' "; -} -$sql = "SELECT #@__log.*,#@__admin.userid FROM #@__log - LEFT JOIN #@__admin ON #@__admin.id=#@__log.adminid - WHERE 1=1 $where ORDER BY #@__log.lid DESC"; -$adminlist = ""; -$dsql->SetQuery("SELECT id,uname FROM #@__admin"); -$dsql->Execute('admin'); -while ($myrow = $dsql->GetObject('admin')) { - $adminlist .= "\r\n"; -} -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("adminid", $adminid); -$dlist->SetParameter("cip", $cip); -$dlist->SetParameter("dtime", $dtime); -$dlist->SetTemplate(DEDEADMIN."/templets/log_list.htm"); -$dlist->SetSource($sql); -$dlist->Display(); + 0) $where .= " AND #@__log.adminid='$adminid' "; +if ($cip != "") $where .= " AND #@__log.cip LIKE '%$cip%' "; + +if ($dtime > 0) { + $nowtime = time(); + $starttime = $nowtime - ($dtime * 24 * 3600); + $where .= " AND #@__log.dtime>'$starttime' "; +} +$sql = "SELECT #@__log.*,#@__admin.userid FROM #@__log + LEFT JOIN #@__admin ON #@__admin.id=#@__log.adminid + WHERE 1=1 $where ORDER BY #@__log.lid DESC"; +$adminlist = ""; +$dsql->SetQuery("SELECT id,uname FROM #@__admin"); +$dsql->Execute('admin'); +while ($myrow = $dsql->GetObject('admin')) { + $adminlist .= "\r\n"; +} +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("adminid", $adminid); +$dlist->SetParameter("cip", $cip); +$dlist->SetParameter("dtime", $dtime); +$dlist->SetTemplate(DEDEADMIN."/templets/log_list.htm"); +$dlist->SetSource($sql); +$dlist->Display(); diff --git a/src/dede/login.php b/src/admin/login.php old mode 100755 new mode 100644 similarity index 89% rename from src/dede/login.php rename to src/admin/login.php index af4f4222..a59d4cc1 --- a/src/dede/login.php +++ b/src/admin/login.php @@ -1,90 +1,90 @@ -
您的管理目录的名称中包含默认名称dede,建议在FTP里把它修改为其它名称,那样会更安全
'; -} else { - $redmsg = ''; -} -//登录检测 -$admindirs = explode('/', str_replace("\\", '/', dirname(__FILE__))); -$admindir = $admindirs[count($admindirs) - 1]; -if ($dopost == 'login') { - $validate = empty($validate) ? '' : strtolower(trim($validate)); - $svali = strtolower(GetCkVdValue()); - if (($validate == '' || $validate != $svali) && preg_match("/6/", $safe_gdopen)) { - ResetVdValue(); - ShowMsg('验证码不正确', 'login.php', 0, 1000); - exit; - } else { - $cuserLogin = new userLogin($admindir); - if (!empty($userid) && !empty($pwd)) { - $res = $cuserLogin->checkUser($userid, $pwd); - //success - if ($res == 1) { - $cuserLogin->keepUser(); - if (!empty($gotopage)) { - ShowMsg('成功登录,正在转向管理管理主页', $gotopage); - exit(); - } else { - ShowMsg('成功登录,正在转向管理管理主页', "index.php"); - exit(); - } - } - //error - else if ($res == -1) { - ResetVdValue(); - ShowMsg('您的用户名不存在', 'login.php', 0, 1000); - exit; - } else { - ResetVdValue(); - ShowMsg('您的密码错误', 'login.php', 0, 1000); - exit; - } - } - //password empty - else { - ResetVdValue(); - ShowMsg('用户和密码没填写完整', 'login.php', 0, 1000); - exit; - } - } -} +
您的管理目录的名称中包含默认名称admin,建议在FTP里把它修改为其它名称,那样会更安全。
'; +} else { + $redmsg = ''; +} +//登录检测 +$admindirs = explode('/', str_replace("\\", '/', dirname(__FILE__))); +$admindir = $admindirs[count($admindirs) - 1]; +if ($dopost == 'login') { + $validate = empty($validate) ? '' : strtolower(trim($validate)); + $svali = strtolower(GetCkVdValue()); + if (($validate == '' || $validate != $svali) && preg_match("/6/", $safe_gdopen)) { + ResetVdValue(); + ShowMsg('验证码不正确', 'login.php', 0, 1000); + exit; + } else { + $cuserLogin = new userLogin($admindir); + if (!empty($userid) && !empty($pwd)) { + $res = $cuserLogin->checkUser($userid, $pwd); + //success + if ($res == 1) { + $cuserLogin->keepUser(); + if (!empty($gotopage)) { + ShowMsg('成功登录,正在转向管理管理主页', $gotopage); + exit(); + } else { + ShowMsg('成功登录,正在转向管理管理主页', "index.php"); + exit(); + } + } + //error + else if ($res == -1) { + ResetVdValue(); + ShowMsg('您的用户名不存在', 'login.php', 0, 1000); + exit; + } else { + ResetVdValue(); + ShowMsg('您的密码错误', 'login.php', 0, 1000); + exit; + } + } + //password empty + else { + ResetVdValue(); + ShowMsg('用户和密码没填写完整', 'login.php', 0, 1000); + exit; + } + } +} include('templets/login.htm'); \ No newline at end of file diff --git a/src/dede/mail_file_manage.php b/src/admin/mail_file_manage.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/mail_file_manage.php rename to src/admin/mail_file_manage.php index 0823b324..955b9c5e --- a/src/dede/mail_file_manage.php +++ b/src/admin/mail_file_manage.php @@ -1,37 +1,37 @@ - \ No newline at end of file diff --git a/src/dede/mail_getfile.php b/src/admin/mail_getfile.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mail_getfile.php rename to src/admin/mail_getfile.php index c35b43e2..6d7bae31 --- a/src/dede/mail_getfile.php +++ b/src/admin/mail_getfile.php @@ -1,42 +1,42 @@ -Execute('me',$sql); - while($row = $db->GetArray()){ - $mails[]=$row; - } - $email=""; - foreach($mails as $mail){ - $email.=$mail['email'].","; - } - - $m_file = DEDEDATA."/mail/".$filename.".txt"; - - if (file_exists($m_file)) { - ShowMsg("该文件已经存在,重新换个文件名!","-1"); - exit(); - } else { - $fp = fopen($m_file,'w'); - flock($fp,3); - fwrite($fp,$email); - fclose($fp); - ShowMsg("获取邮件列表成功!","-1"); - exit(); - } -} -require_once(DEDEADMIN."/templets/mail_getfile.htm"); +Execute('me',$sql); + while($row = $db->GetArray()){ + $mails[]=$row; + } + $email=""; + foreach($mails as $mail){ + $email.=$mail['email'].","; + } + + $m_file = DEDEDATA."/mail/".$filename.".txt"; + + if (file_exists($m_file)) { + ShowMsg("该文件已经存在,重新换个文件名!","-1"); + exit(); + } else { + $fp = fopen($m_file,'w'); + flock($fp,3); + fwrite($fp,$email); + fclose($fp); + ShowMsg("获取邮件列表成功!","-1"); + exit(); + } +} +require_once(DEDEADMIN."/templets/mail_getfile.htm"); ?> \ No newline at end of file diff --git a/src/dede/mail_send.php b/src/admin/mail_send.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mail_send.php rename to src/admin/mail_send.php index 4da64708..cdae21e6 --- a/src/dede/mail_send.php +++ b/src/admin/mail_send.php @@ -1,94 +1,94 @@ -appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $client->MailSend($email,$mailtitle,$mailtitle,$mailbody); - $client->Close(); - } else { - if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) - { - $mailtype = 'HTML'; - require_once(DEDEINC.'/mail.class.php'); - $smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); - $smtp->debug = false; - if(!$smtp->smtp_sockopen($cfg_smtp_server)){ - ShowMsg('邮件发送失败,请联系管理员','-1'); - exit(); - } - $smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); - }else{ - @mail($email, $mailtitle, $mailbody, $headers); - } - } -} - -if(!isset($action)){ - $action = ''; -} -if($action==""){ - $mfile = glob(DEDEDATA.'/mail/*.txt'); - $mnumber = count($mfile); - $mailfiles = array(); - if($mnumber > 0){ - if(is_array($mfile)){ - foreach( $mfile as $key=>$filename){ - $mailfiles[$key] = basename($filename); - } - } - } - unset($mfile); - require_once(DEDEADMIN."/templets/mail_send.htm"); -} -if($action=="post"){ - if($title==''){ - ShowMsg("请填写信息标题!","-1"); - exit(); - } - if($message==''){ - ShowMsg("请填写内容!","-1"); - exit(); - } - - if($mode=="group"){ - if(file_exists(DEDEDATA.'/mail/'.$mailfile)){ - $address = file(DEDEDATA.'/mail/'.$mailfile); - $address=implode(",", $address); - }else{ - ShowMsg($mailfile."不存在","-1"); - exit(); - } - }elseif($mode=="more"){ - $address=$address2; - } - if(!preg_match('/^(.+)@(.+)$/',$address)){ - ShowMsg("请填写正确的邮件地址!","-1"); - exit(); - } - - $title = cn_substrR(HtmlReplace($title,1),60); - $sendtime = time(); - $mailtitle = $title; - $mailto = $address; - $mailbody = stripslashes($message); - $pattern="/\\".$cfg_medias_dir."/"; - $mailbody =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$mailbody); - $fromid=$cuserLogin->getUserID(); - $fromuid=$cuserLogin->getUserName(); - sendmail($mailto,$mailtitle,$mailbody); - - //$inquery = "INSERT INTO `#@__member_mail` (`fromid`,`fromuid`,`address`,`title`,`sendtime`,`message`)VALUES ('$fromid','$fromuid','$mailto','$mailtitle','$sendtime','$mailbody'); "; - - //$dsql->ExecuteNoneQuery($inquery); - ShowMsg('邮件已成功发送','mail_send.php'); - exit(); - -} +appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $client->MailSend($email,$mailtitle,$mailtitle,$mailbody); + $client->Close(); + } else { + if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) + { + $mailtype = 'HTML'; + require_once(DEDEINC.'/mail.class.php'); + $smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); + $smtp->debug = false; + if(!$smtp->smtp_sockopen($cfg_smtp_server)){ + ShowMsg('邮件发送失败,请联系管理员','-1'); + exit(); + } + $smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); + }else{ + @mail($email, $mailtitle, $mailbody, $headers); + } + } +} + +if(!isset($action)){ + $action = ''; +} +if($action==""){ + $mfile = glob(DEDEDATA.'/mail/*.txt'); + $mnumber = count($mfile); + $mailfiles = array(); + if($mnumber > 0){ + if(is_array($mfile)){ + foreach( $mfile as $key=>$filename){ + $mailfiles[$key] = basename($filename); + } + } + } + unset($mfile); + require_once(DEDEADMIN."/templets/mail_send.htm"); +} +if($action=="post"){ + if($title==''){ + ShowMsg("请填写信息标题!","-1"); + exit(); + } + if($message==''){ + ShowMsg("请填写内容!","-1"); + exit(); + } + + if($mode=="group"){ + if(file_exists(DEDEDATA.'/mail/'.$mailfile)){ + $address = file(DEDEDATA.'/mail/'.$mailfile); + $address=implode(",", $address); + }else{ + ShowMsg($mailfile."不存在","-1"); + exit(); + } + }elseif($mode=="more"){ + $address=$address2; + } + if(!preg_match('/^(.+)@(.+)$/',$address)){ + ShowMsg("请填写正确的邮件地址!","-1"); + exit(); + } + + $title = cn_substrR(HtmlReplace($title,1),60); + $sendtime = time(); + $mailtitle = $title; + $mailto = $address; + $mailbody = stripslashes($message); + $pattern="/\\".$cfg_medias_dir."/"; + $mailbody =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$mailbody); + $fromid=$cuserLogin->getUserID(); + $fromuid=$cuserLogin->getUserName(); + sendmail($mailto,$mailtitle,$mailbody); + + //$inquery = "INSERT INTO `#@__member_mail` (`fromid`,`fromuid`,`address`,`title`,`sendtime`,`message`)VALUES ('$fromid','$fromuid','$mailto','$mailtitle','$sendtime','$mailbody'); "; + + //$dsql->ExecuteNoneQuery($inquery); + ShowMsg('邮件已成功发送','mail_send.php'); + exit(); + +} diff --git a/src/dede/mail_title.php b/src/admin/mail_title.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mail_title.php rename to src/admin/mail_title.php index 74a588d1..7ac0d2af --- a/src/dede/mail_title.php +++ b/src/admin/mail_title.php @@ -1,103 +1,103 @@ -SetQuery("SELECT id,typename FROM `#@__mail_type` ORDER BY id"); - $dsql->Execute(); - $btypes = Array(); - while($row = $dsql->GetArray()) - { - $btypes[$row['id']] = $row['typename']; - } - require_once(DEDEADMIN."/templets/mail_title_add.htm"); -}elseif($dopost=="edit"){ - $dsql->SetQuery("SELECT id,typename FROM `#@__mail_type` ORDER BY id"); - $dsql->Execute(); - $btypes = Array(); - while($row = $dsql->GetArray()) - { - $btypes[$row['id']] = $row['typename']; - } - $row=$dsql->GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); - require_once(DEDEADMIN."/templets/mail_title_edit.htm"); -}elseif($dopost=="addsave"){ - if(!preg_match('/[0-9]/',$period)){ - ShowMsg("期刊号只能为数字!","-1"); - exit(); - } - if($typeid=="0"){ - ShowMsg("请选择类别!","-1"); - exit(); - } - if($title==''){ - ShowMsg("请填写信息标题!","-1"); - exit(); - } - if($message==''){ - ShowMsg("请填写内容!","-1"); - exit(); - } - $message = stripslashes($message); - $pattern="/\\".$cfg_medias_dir."/"; - $message =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$message); - $title = cn_substrR(HtmlReplace($title,1),60); - $addtime=$sendtime = time(); - $writer= $cuserLogin->getUserName(); - $mid=$cuserLogin->getUserID(); - $query = "INSERT INTO #@__mail_title (period,typeid,title,content,addtime,sendtime,writer,mid,state,count) VALUES ('$period','$typeid','$title','$message','$addtime',0,'$writer','$mid',0,0)"; - if(!$dsql->ExecuteNoneQuery($query)){ - ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;"); - exit(); - }else{ - ShowMsg("发表期刊成功","mail_title.php"); - exit(); - } -}elseif($dopost=="editsave"){ - if(!preg_match('/[0-9]/',$period)){ - ShowMsg("期刊号只能为数字!","-1"); - exit(); - } - if($title==''){ - ShowMsg("请填写信息标题!","-1"); - exit(); - } - if($message==''){ - ShowMsg("请填写内容!","-1"); - exit(); - } - $message = stripslashes($message); - $pattern="/\\".$cfg_medias_dir."/"; - $message =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$message); - $title = cn_substrR(HtmlReplace($title,1),60); - $writer= $cuserLogin->getUserName(); - $mid=$cuserLogin->getUserID(); - - $query = "UPDATE #@__mail_title SET period='$period',typeid='$typeid',title='$title',content='$message',writer='$writer',mid='$mid' WHERE id=$id"; - if(!$dsql->ExecuteNoneQuery($query)){ - ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;"); - exit(); - }else{ - ShowMsg("编辑期刊成功","mail_title.php"); - exit(); - } -}elseif($dopost=="delete"){ - $dsql->ExecuteNoneQuery("Delete From `#@__mail_title` where id='$id'"); - ShowMsg("删除期刊成功","mail_title.php"); - exit(); -}else{ - - function GetSendTimeMk($mktime){ - if($mktime=="0") return "未发送"; - else return MyDate('Y-m-d H:i:s',$mktime); - } - - $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc"; - $dlist = new DataListCP(); - $dlist->SetTemplet(DEDEADMIN."/templets/mail_title_main.htm"); - $dlist->SetSource($sql); - $dlist->display(); -} - +SetQuery("SELECT id,typename FROM `#@__mail_type` ORDER BY id"); + $dsql->Execute(); + $btypes = Array(); + while($row = $dsql->GetArray()) + { + $btypes[$row['id']] = $row['typename']; + } + require_once(DEDEADMIN."/templets/mail_title_add.htm"); +}elseif($dopost=="edit"){ + $dsql->SetQuery("SELECT id,typename FROM `#@__mail_type` ORDER BY id"); + $dsql->Execute(); + $btypes = Array(); + while($row = $dsql->GetArray()) + { + $btypes[$row['id']] = $row['typename']; + } + $row=$dsql->GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); + require_once(DEDEADMIN."/templets/mail_title_edit.htm"); +}elseif($dopost=="addsave"){ + if(!preg_match('/[0-9]/',$period)){ + ShowMsg("期刊号只能为数字!","-1"); + exit(); + } + if($typeid=="0"){ + ShowMsg("请选择类别!","-1"); + exit(); + } + if($title==''){ + ShowMsg("请填写信息标题!","-1"); + exit(); + } + if($message==''){ + ShowMsg("请填写内容!","-1"); + exit(); + } + $message = stripslashes($message); + $pattern="/\\".$cfg_medias_dir."/"; + $message =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$message); + $title = cn_substrR(HtmlReplace($title,1),60); + $addtime=$sendtime = time(); + $writer= $cuserLogin->getUserName(); + $mid=$cuserLogin->getUserID(); + $query = "INSERT INTO #@__mail_title (period,typeid,title,content,addtime,sendtime,writer,mid,state,count) VALUES ('$period','$typeid','$title','$message','$addtime',0,'$writer','$mid',0,0)"; + if(!$dsql->ExecuteNoneQuery($query)){ + ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;"); + exit(); + }else{ + ShowMsg("发表期刊成功","mail_title.php"); + exit(); + } +}elseif($dopost=="editsave"){ + if(!preg_match('/[0-9]/',$period)){ + ShowMsg("期刊号只能为数字!","-1"); + exit(); + } + if($title==''){ + ShowMsg("请填写信息标题!","-1"); + exit(); + } + if($message==''){ + ShowMsg("请填写内容!","-1"); + exit(); + } + $message = stripslashes($message); + $pattern="/\\".$cfg_medias_dir."/"; + $message =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$message); + $title = cn_substrR(HtmlReplace($title,1),60); + $writer= $cuserLogin->getUserName(); + $mid=$cuserLogin->getUserID(); + + $query = "UPDATE #@__mail_title SET period='$period',typeid='$typeid',title='$title',content='$message',writer='$writer',mid='$mid' WHERE id=$id"; + if(!$dsql->ExecuteNoneQuery($query)){ + ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;"); + exit(); + }else{ + ShowMsg("编辑期刊成功","mail_title.php"); + exit(); + } +}elseif($dopost=="delete"){ + $dsql->ExecuteNoneQuery("Delete From `#@__mail_title` where id='$id'"); + ShowMsg("删除期刊成功","mail_title.php"); + exit(); +}else{ + + function GetSendTimeMk($mktime){ + if($mktime=="0") return "未发送"; + else return MyDate('Y-m-d H:i:s',$mktime); + } + + $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc"; + $dlist = new DataListCP(); + $dlist->SetTemplet(DEDEADMIN."/templets/mail_title_main.htm"); + $dlist->SetSource($sql); + $dlist->display(); +} + ?> \ No newline at end of file diff --git a/src/dede/mail_title_send.php b/src/admin/mail_title_send.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/mail_title_send.php rename to src/admin/mail_title_send.php index ad8644d6..1ec8b668 --- a/src/dede/mail_title_send.php +++ b/src/admin/mail_title_send.php @@ -1,83 +1,83 @@ -appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $client->MailSend($email,$mailtitle,$mailtitle,$mailbody); - $client->Close(); - } else { - if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) - { - $mailtype = 'HTML'; - require_once(DEDEINC.'/mail.class.php'); - $smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); - $smtp->debug = false; - if(!$smtp->smtp_sockopen($cfg_smtp_server)){ - ShowMsg('邮件发送失败,请联系管理员','-1'); - exit(); - } - $smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); - }else{ - @mail($email, $mailtitle, $mailbody, $headers); - } - } - } - - $row=$dsql->GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); - $mailtitle=$row['title']; - $mailbody=$row['content']; - - $sql="SELECT m.email FROM `#@__member` AS m LEFT JOIN `#@__mail_order` AS o ON o.mid=m.mid WHERE o.typeid=$typeid"; - $db->Execute('me',$sql); - while($row = $db->GetArray()){ - $mails[]=$row; - } - $email=""; - foreach($mails as $mail){ - $email.=$mail['email'].","; - } - - $mailto=$email; - - sendmail($mailto,$mailtitle,$mailbody); - - $sendtime = time(); - $inquery = "UPDATE `#@__mail_title` SET count=count+1,sendtime='$sendtime',state='1' WHERE id=$id"; - if($dsql->ExecuteNoneQuery($inquery)){ - ShowMsg('邮件已成功发送','mail_title_send.php'); - exit(); - } -}else{ - - function GetState($state){ - if($state=="0") return "未发送"; - else return "已发送"; - } - - function GetSendTimeMk($mktime){ - if($mktime=="0") return "未发送"; - else return MyDate('Y-m-d H:i:s',$mktime); - } - - function GetCount($typeid){ - global $dsql; - $row=$dsql->GetOne("SELECT COUNT(typeid) as cc FROM `#@__mail_order`"); - return $row['cc']; - } - - $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc"; - $dlist = new DataListCP(); - $dlist->SetTemplet(DEDEADMIN."/templets/mail_title_send.htm"); - $dlist->SetSource($sql); - $dlist->display(); -} +appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $client->MailSend($email,$mailtitle,$mailtitle,$mailbody); + $client->Close(); + } else { + if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) + { + $mailtype = 'HTML'; + require_once(DEDEINC.'/mail.class.php'); + $smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); + $smtp->debug = false; + if(!$smtp->smtp_sockopen($cfg_smtp_server)){ + ShowMsg('邮件发送失败,请联系管理员','-1'); + exit(); + } + $smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); + }else{ + @mail($email, $mailtitle, $mailbody, $headers); + } + } + } + + $row=$dsql->GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); + $mailtitle=$row['title']; + $mailbody=$row['content']; + + $sql="SELECT m.email FROM `#@__member` AS m LEFT JOIN `#@__mail_order` AS o ON o.mid=m.mid WHERE o.typeid=$typeid"; + $db->Execute('me',$sql); + while($row = $db->GetArray()){ + $mails[]=$row; + } + $email=""; + foreach($mails as $mail){ + $email.=$mail['email'].","; + } + + $mailto=$email; + + sendmail($mailto,$mailtitle,$mailbody); + + $sendtime = time(); + $inquery = "UPDATE `#@__mail_title` SET count=count+1,sendtime='$sendtime',state='1' WHERE id=$id"; + if($dsql->ExecuteNoneQuery($inquery)){ + ShowMsg('邮件已成功发送','mail_title_send.php'); + exit(); + } +}else{ + + function GetState($state){ + if($state=="0") return "未发送"; + else return "已发送"; + } + + function GetSendTimeMk($mktime){ + if($mktime=="0") return "未发送"; + else return MyDate('Y-m-d H:i:s',$mktime); + } + + function GetCount($typeid){ + global $dsql; + $row=$dsql->GetOne("SELECT COUNT(typeid) as cc FROM `#@__mail_order`"); + return $row['cc']; + } + + $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc"; + $dlist = new DataListCP(); + $dlist->SetTemplet(DEDEADMIN."/templets/mail_title_send.htm"); + $dlist->SetSource($sql); + $dlist->display(); +} diff --git a/src/dede/mail_type.php b/src/admin/mail_type.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/mail_type.php rename to src/admin/mail_type.php index 0f057c01..bf883a98 --- a/src/dede/mail_type.php +++ b/src/admin/mail_type.php @@ -1,55 +1,55 @@ -GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); - require_once(DEDEADMIN."/templets/mail_title_edit.htm"); -}elseif($dopost=="addsave"){ - if($typename==""){ - ShowMsg("分类名不能为空","-1"); - exit(); - } - $typename=Html2Text($typename,1); - $description = Html2Text($description,1); - - $query = "INSERT INTO #@__mail_type (typename,description) VALUES ('$typename','$description')"; - if(!$dsql->ExecuteNoneQuery($query)){ - ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;"); - exit(); - }else{ - ShowMsg("添加分类成功","mail_type.php"); - exit(); - } -}elseif($dopost=="editsave"){ - if($typename==""){ - ShowMsg("分类名不能为空","-1"); - exit(); - } - $typename=Html2Text($typename,1); - $description = Html2Text($description,1); - - $query = "UPDATE #@__mail_type SET typename='$typename',description='$description' WHERE id=$id"; - if(!$dsql->ExecuteNoneQuery($query)){ - ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;"); - exit(); - }else{ - ShowMsg("更改分类成功","mail_type.php"); - exit(); - } -}elseif($dopost=="delete"){ - $dsql->ExecuteNoneQuery("Delete From `#@__mail_type` where id='$id'"); - ShowMsg("删除分类成功","mail_type.php"); - exit(); -}else{ - $sql = "SELECT * FROM `#@__mail_type` ORDER BY id "; - $dlist = new DataListCP(); - $dlist->SetTemplet(DEDEADMIN."/templets/mail_type_main.htm"); - $dlist->SetSource($sql); - $dlist->display(); -} +GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); + require_once(DEDEADMIN."/templets/mail_title_edit.htm"); +}elseif($dopost=="addsave"){ + if($typename==""){ + ShowMsg("分类名不能为空","-1"); + exit(); + } + $typename=Html2Text($typename,1); + $description = Html2Text($description,1); + + $query = "INSERT INTO #@__mail_type (typename,description) VALUES ('$typename','$description')"; + if(!$dsql->ExecuteNoneQuery($query)){ + ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;"); + exit(); + }else{ + ShowMsg("添加分类成功","mail_type.php"); + exit(); + } +}elseif($dopost=="editsave"){ + if($typename==""){ + ShowMsg("分类名不能为空","-1"); + exit(); + } + $typename=Html2Text($typename,1); + $description = Html2Text($description,1); + + $query = "UPDATE #@__mail_type SET typename='$typename',description='$description' WHERE id=$id"; + if(!$dsql->ExecuteNoneQuery($query)){ + ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;"); + exit(); + }else{ + ShowMsg("修改分类成功","mail_type.php"); + exit(); + } +}elseif($dopost=="delete"){ + $dsql->ExecuteNoneQuery("Delete From `#@__mail_type` where id='$id'"); + ShowMsg("删除分类成功","mail_type.php"); + exit(); +}else{ + $sql = "SELECT * FROM `#@__mail_type` ORDER BY id "; + $dlist = new DataListCP(); + $dlist->SetTemplet(DEDEADMIN."/templets/mail_type_main.htm"); + $dlist->SetSource($sql); + $dlist->display(); +} ?> \ No newline at end of file diff --git a/src/dede/makehtml_all.php b/src/admin/makehtml_all.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/makehtml_all.php rename to src/admin/makehtml_all.php index 215ab89f..2525ea33 --- a/src/dede/makehtml_all.php +++ b/src/admin/makehtml_all.php @@ -1,153 +1,152 @@ -dsql->GetOne("SELECT * FROM `#@__homepageset` "); - $templet = str_replace("{style}", $cfg_df_style, $row['templet']); - $homeFile = DEDEADMIN.'/'.$row['position']; - $homeFile = str_replace("\\", '/', $homeFile); - $homeFile = preg_replace("#\/{1,}#", '/', $homeFile); - if ($row['showmod'] == 1) { - $pv->SetTemplet($cfg_basedir.$cfg_templets_dir.'/'.$templet); - $pv->SaveToHtml($homeFile); - $pv->Close(); - } else { - if (file_exists($homeFile)) echo "启用静态生成,建议删除"+$homeFile; - } - ShowMsg("完成更新所有文档,现在开始更新栏目页", "makehtml_all.php?action=make&step=4&uptype=$uptype&mkvalue=$mkvalue"); - exit(); - } - //更新栏目 - /*------------------- - function _4_MakeCatalog() - --------------------*/ else if ($step == 4) { - $mkvalue = intval($mkvalue); - $typeidsok = $typeids = array(); - $adminID = $cuserLogin->getUserID(); - $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; - if ($uptype == 'all' || empty($mkvalue)) { - ShowMsg("不需要进行初处理,现更新所有栏目", "makehtml_list_action.php?gotype=mkallct"); - exit(); - } else { - if ($uptype == 'time') { - $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE senddate >=".GetMkTime($mkvalue)." AND arcrank>-1"; - } else { - $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE id>=$mkvalue AND arcrank>-1"; - } - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $typeids[$row['typeid']] = 1; - } - - foreach ($typeids as $k => $v) { - $vs = array(); - $vs = GetParentIds($k); - if (!isset($typeidsok[$k])) { - $typeidsok[$k] = 1; - } - foreach ($vs as $k => $v) { - if (!isset($typeidsok[$v])) { - $typeidsok[$v] = 1; - } - } - } - } - $fp = fopen($mkcachefile, 'w') or die("无法写入缓存文件:{$mkcachefile} 所以无法更新栏目"); - if (count($typeidsok) > 0) { - fwrite($fp, "<"."?php\r\n"); - $i = -1; - foreach ($typeidsok as $k => $t) { - if ($k != '') { - $i++; - fwrite($fp, "\$idArray[$i]={$k};\r\n"); - } - } - fwrite($fp, "?".">"); - fclose($fp); - ShowMsg("完成栏目缓存处理,现转向更新栏目", "makehtml_list_action.php?gotype=mkall"); - exit(); - } else { - fclose($fp); - ShowMsg("没有可更新的栏目,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); - exit(); - } - } - //成功状态 - /*------------------- - function _10_MakeAllOK() - --------------------*/ else if ($step == 10) { - $adminID = $cuserLogin->getUserID(); - $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; - @unlink($mkcachefile); - OptimizeData($dsql); - ShowMsg("完成所有文件的更新", "javascript:;"); - exit(); - } //make step - -} //action=='make' - -/** - * 优化数据 - * - * @access public - * @param object $dsql 数据库对象 - * @return void - */ -function OptimizeData($dsql) -{ - global $cfg_dbprefix; - $tptables = array("{$cfg_dbprefix}archives", "{$cfg_dbprefix}arctiny"); - $dsql->SetQuery("SELECT maintable,addtable FROM `#@__channeltype` "); - $dsql->Execute(); - while ($row = $dsql->GetObject()) { - $addtable = str_replace('#@__', $cfg_dbprefix, $row->addtable); - if ($addtable != '' && !in_array($addtable, $tptables)) $tptables[] = $addtable; - } - $tptable = ''; - foreach ($tptables as $t) $tptable .= ($tptable == '' ? "`{$t}`" : ",`{$t}`"); - $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable; "); -} +dsql->GetOne("SELECT * FROM `#@__homepageset` "); + $templet = str_replace("{style}", $cfg_df_style, $row['templet']); + $homeFile = DEDEADMIN.'/'.$row['position']; + $homeFile = str_replace("\\", '/', $homeFile); + $homeFile = preg_replace("#\/{1,}#", '/', $homeFile); + if ($row['showmod'] == 1) { + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir.'/'.$templet); + $pv->SaveToHtml($homeFile); + $pv->Close(); + } else { + if (file_exists($homeFile)) echo "启用静态生成,建议删除"+$homeFile; + } + ShowMsg("完成更新所有文档,现在开始更新栏目页", "makehtml_all.php?action=make&step=4&uptype=$uptype&mkvalue=$mkvalue"); + exit(); + } + //更新栏目 + /*------------------- + function _4_MakeCatalog() + --------------------*/ else if ($step == 4) { + $mkvalue = intval($mkvalue); + $typeidsok = $typeids = array(); + $adminID = $cuserLogin->getUserID(); + $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; + if ($uptype == 'all' || empty($mkvalue)) { + ShowMsg("不需要进行初处理,现更新所有栏目", "makehtml_list_action.php?gotype=mkallct"); + exit(); + } else { + if ($uptype == 'time') { + $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE senddate >=".GetMkTime($mkvalue)." AND arcrank>-1"; + } else { + $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE id>=$mkvalue AND arcrank>-1"; + } + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $typeids[$row['typeid']] = 1; + } + + foreach ($typeids as $k => $v) { + $vs = array(); + $vs = GetParentIds($k); + if (!isset($typeidsok[$k])) { + $typeidsok[$k] = 1; + } + foreach ($vs as $k => $v) { + if (!isset($typeidsok[$v])) { + $typeidsok[$v] = 1; + } + } + } + } + $fp = fopen($mkcachefile, 'w') or die("无法写入缓存文件:{$mkcachefile} 所以无法更新栏目"); + if (count($typeidsok) > 0) { + fwrite($fp, "<"."?php\r\n"); + $i = -1; + foreach ($typeidsok as $k => $t) { + if ($k != '') { + $i++; + fwrite($fp, "\$idArray[$i]={$k};\r\n"); + } + } + fwrite($fp, "?".">"); + fclose($fp); + ShowMsg("完成栏目缓存处理,现转向更新栏目", "makehtml_list_action.php?gotype=mkall"); + exit(); + } else { + fclose($fp); + ShowMsg("没有可更新的栏目,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); + exit(); + } + } + //成功状态 + /*------------------- + function _10_MakeAllOK() + --------------------*/ else if ($step == 10) { + $adminID = $cuserLogin->getUserID(); + $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; + @unlink($mkcachefile); + OptimizeData($dsql); + ShowMsg("完成所有文件的更新", "javascript:;"); + exit(); + } //make step + +} //action=='make' + +/** + * 优化数据 + * + * @access public + * @param object $dsql 数据库对象 + * @return void + */ +function OptimizeData($dsql) +{ + global $cfg_dbprefix; + $tptables = array("{$cfg_dbprefix}archives", "{$cfg_dbprefix}arctiny"); + $dsql->SetQuery("SELECT maintable,addtable FROM `#@__channeltype` "); + $dsql->Execute(); + while ($row = $dsql->GetObject()) { + $addtable = str_replace('#@__', $cfg_dbprefix, $row->addtable); + if ($addtable != '' && !in_array($addtable, $tptables)) $tptables[] = $addtable; + } + $tptable = ''; + foreach ($tptables as $t) $tptable .= ($tptable == '' ? "`{$t}`" : ",`{$t}`"); + $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable; "); +} diff --git a/src/dede/makehtml_archives.php b/src/admin/makehtml_archives.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/makehtml_archives.php rename to src/admin/makehtml_archives.php index dc673d15..87924619 --- a/src/dede/makehtml_archives.php +++ b/src/admin/makehtml_archives.php @@ -1,14 +1,13 @@ -=$startid AND arcrank=0 "); -if ($endid > $startid && $startid > 0) $gwhere .= " AND id <= $endid "; - -if ($typeid != 0) { - $ids = GetSonIds($typeid); - $gwhere .= " AND typeid in($ids) "; -} - -if ($idsql == '') $idsql = $gwhere; - -if ($seltime == 1) { - $t1 = GetMkTime($stime); - $t2 = GetMkTime($etime); - $idsql .= " And (senddate >= $t1 And senddate <= $t2) "; -} else if (isset($t1) && is_numeric($t1)) { - $idsql .= " And senddate >= $t1 "; -} - -//统计记录总数 -if ($totalnum == 0) { - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` $idsql"); - $totalnum = $row['dd']; - //清空缓存 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache` "); -} - -//获取记录,并生成HTML -if ($totalnum > $startdd + $pagesize) { - $limitSql = " LIMIT $startdd,$pagesize"; -} else { - $limitSql = " LIMIT $startdd,".($totalnum - $startdd); -} - -$tjnum = $startdd; -if (empty($sstime)) $sstime = time(); - -//如果生成数量大于500,并且没选栏目,按栏目排序生成 -if ($totalnum > 500 && empty($typeid)) { - $dsql->Execute('out', "SELECT id FROM `#@__arctiny` $idsql ORDER BY typeid ASC $limitSql"); -} else { - $dsql->Execute('out', "SELECT id FROM `#@__arctiny` $idsql $limitSql"); -} - -while ($row = $dsql->GetObject('out')) { - $tjnum++; - $id = $row->id; - $ac = new Archives($id); - $rurl = $ac->MakeHtml(0); -} - -$t2 = ExecTime(); -$t2 = ($t2 - $est1); -$ttime = time() - $sstime; -$ttime = number_format(($ttime / 60), 2); - -//返回提示信息 -$tjlen = $totalnum > 0 ? ceil(($tjnum / $totalnum) * 100) : 100; -$dvlen = $tjlen * 2; -$tjsta = "
"; -$tjsta .= "
本次用时:".number_format($t2, 2).",总用时:$ttime 分钟,到达位置:".($startdd + $pagesize)."
完成创建文件总数的:$tjlen %,继续执行任务..."; - - -//速度测试 -/* -if($startdd > 1000) -{ - ShowMsg("生成文件:1000 总用时:{$ttime} 分钟", "javascript:;"); - exit(); -} -*/ - -if ($tjnum < $totalnum) { - $nurl = "makehtml_archives_action.php?endid=$endid&startid=$startid&typeid=$typeid"; - $nurl .= "&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; - $nurl .= "&seltime=$seltime&sstime=$sstime&stime=".urlencode($stime)."&etime=".urlencode($etime)."&uptype=$uptype&mkvalue=$mkvalue"; - ShowMsg($tjsta, $nurl, 0, 100); - exit(); -} else { - if ($typeid != '') { - ShowMsg("生成文件:$totalnum 总用时:{$ttime} 分钟,现转向当前栏目更新>>", "makehtml_list_action.php?typeid=$typeid&uptype=all&maxpagesize=50&upnext=1"); - } else { - if ($uptype == '') { - ShowMsg("完成所有创建任务,生成文件:$totalnum 总用时:{$ttime} 分钟。", "javascript:;"); - } else { - ShowMsg("完成文档HTML更新任务,现在开始进行主页更新...", "makehtml_all.php?action=make&step=3&uptype=$uptype&mkvalue=$mkvalue"); - } - } -} +=$startid AND arcrank=0 "); +if ($endid > $startid && $startid > 0) $gwhere .= " AND id <= $endid "; + +if ($typeid != 0) { + $ids = GetSonIds($typeid); + $gwhere .= " AND typeid in($ids) "; +} + +if ($idsql == '') $idsql = $gwhere; + +if ($seltime == 1) { + $t1 = GetMkTime($stime); + $t2 = GetMkTime($etime); + $idsql .= " And (senddate >= $t1 And senddate <= $t2) "; +} else if (isset($t1) && is_numeric($t1)) { + $idsql .= " And senddate >= $t1 "; +} + +//统计记录总数 +if ($totalnum == 0) { + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` $idsql"); + $totalnum = $row['dd']; + //清空缓存 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache` "); +} + +//获取记录,并生成HTML +if ($totalnum > $startdd + $pagesize) { + $limitSql = " LIMIT $startdd,$pagesize"; +} else { + $limitSql = " LIMIT $startdd,".($totalnum - $startdd); +} + +$tjnum = $startdd; +if (empty($sstime)) $sstime = time(); + +//如果生成数量大于500,并且没选栏目,按栏目排序生成 +if ($totalnum > 500 && empty($typeid)) { + $dsql->Execute('out', "SELECT id FROM `#@__arctiny` $idsql ORDER BY typeid ASC $limitSql"); +} else { + $dsql->Execute('out', "SELECT id FROM `#@__arctiny` $idsql $limitSql"); +} + +while ($row = $dsql->GetObject('out')) { + $tjnum++; + $id = $row->id; + $ac = new Archives($id); + $rurl = $ac->MakeHtml(0); +} + +$t2 = ExecTime(); +$t2 = ($t2 - $est1); +$ttime = time() - $sstime; +$ttime = number_format(($ttime / 60), 2); + +//返回提示信息 +$tjlen = $totalnum > 0 ? ceil(($tjnum / $totalnum) * 100) : 100; +$dvlen = $tjlen * 2; +$tjsta = "
"; +$tjsta .= "
本次用时:".number_format($t2, 2).",总用时:$ttime 分钟,到达位置:".($startdd + $pagesize)."
完成创建文件总数的:$tjlen %,继续执行任务..."; + + +//速度测试 +/* +if($startdd > 1000) +{ + ShowMsg("生成文件:1000 总用时:{$ttime} 分钟", "javascript:;"); + exit(); +} +*/ + +if ($tjnum < $totalnum) { + $nurl = "makehtml_archives_action.php?endid=$endid&startid=$startid&typeid=$typeid"; + $nurl .= "&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; + $nurl .= "&seltime=$seltime&sstime=$sstime&stime=".urlencode($stime)."&etime=".urlencode($etime)."&uptype=$uptype&mkvalue=$mkvalue"; + ShowMsg($tjsta, $nurl, 0, 100); + exit(); +} else { + if ($typeid != '') { + ShowMsg("生成文件:$totalnum 总用时:{$ttime} 分钟,现转向当前栏目更新>>", "makehtml_list_action.php?typeid=$typeid&uptype=all&maxpagesize=50&upnext=1"); + } else { + if ($uptype == '') { + ShowMsg("完成所有创建任务,生成文件:$totalnum 总用时:{$ttime} 分钟。", "javascript:;"); + } else { + ShowMsg("完成文档HTML更新任务,现在开始进行主页更新...", "makehtml_all.php?action=make&step=3&uptype=$uptype&mkvalue=$mkvalue"); + } + } +} diff --git a/src/dede/makehtml_freelist.php b/src/admin/makehtml_freelist.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/makehtml_freelist.php rename to src/admin/makehtml_freelist.php index 2216d2d9..049b125f --- a/src/dede/makehtml_freelist.php +++ b/src/admin/makehtml_freelist.php @@ -1,13 +1,12 @@ -= $startid "; -if (!empty($endid) && $endid >= $startid) { - $ci .= " And aid <= $endid "; -} -header("Content-Type: text/html; charset={$cfg_soft_lang}"); -$dsql->SetQuery("SELECT aid FROM `#@__freelist` WHERE $ci"); -$dsql->Execute(); -while ($row = $dsql->GetArray()) { - $idArray[] = $row['aid']; -} -if (!isset($pageno)) $pageno = 0; -if (empty($idArray)) $idArray = ''; -$totalpage = count($idArray); -if (isset($idArray[$pageno])) { - $lid = $idArray[$pageno]; -} else { - ShowMsg("完成所有文件创建", 'javascript:;'); - exit(); -} -$lv = new FreeList($lid); -$ntotalpage = $lv->TotalPage; -if (empty($mkpage)) $mkpage = 1; -if (empty($maxpagesize)) $maxpagesize = 50; - -//如果栏目的文档太多,分多批次更新 -if ($ntotalpage <= $maxpagesize) { - $lv->MakeHtml(); - $finishType = true; -} else { - $lv->MakeHtml($mkpage, $maxpagesize); - $finishType = false; - $mkpage = $mkpage + $maxpagesize; - if ($mkpage >= ($ntotalpage + 1)) { - $finishType = true; - } -} -$lv->Close(); -$nextpage = $pageno + 1; -if ($nextpage == $totalpage) { - ShowMsg("完成所有文件创建", 'javascript:;'); -} else { - if ($finishType) { - $gourl = "makehtml_freelist_action.php?maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$nextpage"; - ShowMsg("成功创建列表:".$tid.",继续进行操作", $gourl, 0, 100); - } else { - $gourl = "makehtml_freelist_action.php?mkpage=$mkpage&maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$pageno"; - ShowMsg("列表:".$tid.",继续进行操作...", $gourl, 0, 100); - } -} -$dsql->ExecuteNoneQuery("Update `#@__freelist` set nodefault='1' where aid='$startid';"); += $startid "; +if (!empty($endid) && $endid >= $startid) { + $ci .= " And aid <= $endid "; +} +header("Content-Type: text/html; charset={$cfg_soft_lang}"); +$dsql->SetQuery("SELECT aid FROM `#@__freelist` WHERE $ci"); +$dsql->Execute(); +while ($row = $dsql->GetArray()) { + $idArray[] = $row['aid']; +} +if (!isset($pageno)) $pageno = 0; +if (empty($idArray)) $idArray = ''; +$totalpage = count($idArray); +if (isset($idArray[$pageno])) { + $lid = $idArray[$pageno]; +} else { + ShowMsg("完成所有文件创建", 'javascript:;'); + exit(); +} +$lv = new FreeList($lid); +$ntotalpage = $lv->TotalPage; +if (empty($mkpage)) $mkpage = 1; +if (empty($maxpagesize)) $maxpagesize = 50; + +//如果栏目的文档太多,分多批次更新 +if ($ntotalpage <= $maxpagesize) { + $lv->MakeHtml(); + $finishType = true; +} else { + $lv->MakeHtml($mkpage, $maxpagesize); + $finishType = false; + $mkpage = $mkpage + $maxpagesize; + if ($mkpage >= ($ntotalpage + 1)) { + $finishType = true; + } +} +$lv->Close(); +$nextpage = $pageno + 1; +if ($nextpage == $totalpage) { + ShowMsg("完成所有文件创建", 'javascript:;'); +} else { + if ($finishType) { + $gourl = "makehtml_freelist_action.php?maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$nextpage"; + ShowMsg("成功创建列表:".$tid.",继续进行操作", $gourl, 0, 100); + } else { + $gourl = "makehtml_freelist_action.php?mkpage=$mkpage&maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$pageno"; + ShowMsg("列表:".$tid.",继续进行操作...", $gourl, 0, 100); + } +} +$dsql->ExecuteNoneQuery("Update `#@__freelist` set nodefault='1' where aid='$startid';"); diff --git a/src/dede/makehtml_homepage.php b/src/admin/makehtml_homepage.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/makehtml_homepage.php rename to src/admin/makehtml_homepage.php index f5184327..b72549d5 --- a/src/dede/makehtml_homepage.php +++ b/src/admin/makehtml_homepage.php @@ -1,107 +1,104 @@ -SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); - $pv->Display(); - exit(); -} else if ($dopost == "make") { - if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { - $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); - $client->appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $data = $client->AdminPWDExists(); - $data = json_decode($data->data); - $rs = (array)($data->result); - - if ($rs["admin_pwd_exists"] == "false") { - // 设定dedebiz admin密码 - if ($dedebiz_admin == "" || $dedebiz_admin !== $re_dedebiz_admin) { - echo ""; - echo "
DedeBIZ操作密码为空或两次指定的密码不符

"; - $client->Close(); - exit; - } - $data = $client->AdminPWDCreate($dedebiz_admin); - if ($data->data != "ok") { - echo ""; - echo "
DedeBIZ设定操作密码失败:${$data}

"; - $client->Close(); - exit; - } - } else { - if ($dedebiz_admin == "") { - echo ""; - echo "
DedeBIZ操作密码为空

"; - $client->Close(); - exit; - } - $data = $client->AdminSetIndexLockState($dedebiz_admin, $lockindex); - if ($data->data != "ok") { - echo ""; - echo "
DedeBIZ操作密码失败,填写正确的操作密码

"; - $client->Close(); - exit; - } - } - $client->Close(); - } - $remotepos = empty($remotepos) ? '/index.html' : $remotepos; - $serviterm = empty($serviterm) ? "" : $serviterm; - $homeFile = DEDEADMIN."/".$position; - $homeFile = str_replace("\\", "/", $homeFile); - $homeFile = str_replace("//", "/", $homeFile); - $fp = fopen($homeFile, "w") or die("您指定的文件名有问题,无法创建文件"); - fclose($fp); - if ($saveset == 1) { - $iquery = "UPDATE `#@__homepageset` SET templet='$templet',position='$position' "; - $dsql->ExecuteNoneQuery($iquery); - } - // 判断首页生成模式 - if ($showmod == 1) { - // 需要生成静态 - $templet = str_replace("{style}", $cfg_df_style, $templet); - $pv = new PartView(); - $GLOBALS['_arclistEnv'] = 'index'; - $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); - $pv->SaveToHtml($homeFile); - echo ""; - echo "
成功更新主页HTML:".$homeFile."
浏览...

"; - } else { - // 动态浏览 - if (file_exists($homeFile)) @unlink($homeFile); - echo ""; - echo "
采用动态浏览模式:浏览...

"; - } - - $iquery = "UPDATE `#@__homepageset` SET showmod='$showmod'"; - $dsql->ExecuteNoneQuery($iquery); - - if ($serviterm == "") { - $config = array(); - } else { - list($servurl, $servuser, $servpwd) = explode(',', $serviterm); - $config = array( - 'hostname' => $servurl, 'username' => $servuser, - 'password' => $servpwd, 'debug' => 'TRUE' - ); - } - exit(); -} -$row = $dsql->GetOne("SELECT * FROM `#@__homepageset`"); -include DedeInclude('templets/makehtml_homepage.htm'); +SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->Display(); + exit(); +} else if ($dopost == "make") { + if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { + $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); + $client->appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $data = $client->AdminPWDExists(); + $data = json_decode($data->data); + $rs = (array)($data->result); + if ($rs["admin_pwd_exists"] == "false") { + //设定dedebiz admin密码 + if ($dedebiz_admin == "" || $dedebiz_admin !== $re_dedebiz_admin) { + echo ""; + echo "
DedeBIZ操作密码为空或两次指定的密码不符

"; + $client->Close(); + exit; + } + $data = $client->AdminPWDCreate($dedebiz_admin); + if ($data->data != "ok") { + echo ""; + echo "
DedeBIZ设定操作密码失败:${$data}

"; + $client->Close(); + exit; + } + } else { + if ($dedebiz_admin == "") { + echo ""; + echo "
DedeBIZ操作密码为空

"; + $client->Close(); + exit; + } + $data = $client->AdminSetIndexLockState($dedebiz_admin, $lockindex); + if ($data->data != "ok") { + echo ""; + echo "
DedeBIZ操作密码失败,填写正确的操作密码

"; + $client->Close(); + exit; + } + } + $client->Close(); + } + $remotepos = empty($remotepos) ? '/index.html' : $remotepos; + $serviterm = empty($serviterm) ? "" : $serviterm; + $homeFile = DEDEADMIN."/".$position; + $homeFile = str_replace("\\", "/", $homeFile); + $homeFile = str_replace("//", "/", $homeFile); + $fp = fopen($homeFile, "w") or die("您指定的文件名有问题,无法创建文件"); + fclose($fp); + if ($saveset == 1) { + $iquery = "UPDATE `#@__homepageset` SET templet='$templet',position='$position' "; + $dsql->ExecuteNoneQuery($iquery); + } + //判断首页生成模式 + if ($showmod == 1) { + //需要生成静态 + $templet = str_replace("{style}", $cfg_df_style, $templet); + $pv = new PartView(); + $GLOBALS['_arclistEnv'] = 'index'; + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->SaveToHtml($homeFile); + echo ""; + echo "
成功更新首页HTML:".$homeFile."
浏览...

"; + } else { + //动态浏览 + if (file_exists($homeFile)) @unlink($homeFile); + echo ""; + echo "
采用动态浏览模式:浏览...

"; + } + $iquery = "UPDATE `#@__homepageset` SET showmod='$showmod'"; + $dsql->ExecuteNoneQuery($iquery); + + if ($serviterm == "") { + $config = array(); + } else { + list($servurl, $servuser, $servpwd) = explode(',', $serviterm); + $config = array( + 'hostname' => $servurl, 'username' => $servuser, + 'password' => $servpwd, 'debug' => 'TRUE' + ); + } + exit(); +} +$row = $dsql->GetOne("SELECT * FROM `#@__homepageset`"); +include DedeInclude('templets/makehtml_homepage.htm'); \ No newline at end of file diff --git a/src/dede/makehtml_js.php b/src/admin/makehtml_js.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/makehtml_js.php rename to src/admin/makehtml_js.php index 1fa9f3c6..f8daab9c --- a/src/dede/makehtml_js.php +++ b/src/admin/makehtml_js.php @@ -1,14 +1,13 @@ -GetOne("SELECT id FROM `#@__arctype` WHERE id>'$typeid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); - if (!is_array($row)) { - echo ""; - echo "
完成所有文件更新
"; - exit(); - } else { - $pv = new PartView($row['id']); - $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); - $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$row['id'].".js", 0); - $typeid = $row['id'];; - ShowMsg("成功更新".$cfg_cmspath."/data/js/".$row['id'].".js,继续进行操作", "makehtml_js_action.php?typeid=$typeid", 0, 100); - exit(); - } -} else { - $pv = new PartView($typeid); - $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); - $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$typeid.".js", 0); - echo ""; - echo "
成功更新".$cfg_cmspath."/data/js/".$typeid.".js"; - echo "预览:
"; - echo "
"; - echo ""; - exit(); -} +GetOne("SELECT id FROM `#@__arctype` WHERE id>'$typeid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); + if (!is_array($row)) { + echo ""; + echo "
完成所有文件更新
"; + exit(); + } else { + $pv = new PartView($row['id']); + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$row['id'].".js", 0); + $typeid = $row['id'];; + ShowMsg("成功更新".$cfg_cmspath."/data/js/".$row['id'].".js,继续进行操作", "makehtml_js_action.php?typeid=$typeid", 0, 100); + exit(); + } +} else { + $pv = new PartView($typeid); + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$typeid.".js", 0); + echo ""; + echo "
成功更新".$cfg_cmspath."/data/js/".$typeid.".js"; + echo "预览:
"; + echo "
"; + echo ""; + exit(); +} diff --git a/src/dede/makehtml_list.php b/src/admin/makehtml_list.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/makehtml_list.php rename to src/admin/makehtml_list.php index 45851f2a..aba2e538 --- a/src/dede/makehtml_list.php +++ b/src/admin/makehtml_list.php @@ -1,14 +1,13 @@ -getUserID(); - -//检测获取所有栏目ID -//普通生成或一键更新时更新所有栏目 -if ($gotype == '' || $gotype == 'mkallct') { - if ($upnext == 1 || $typeid == 0) { - if ($typeid > 0) { - $tidss = GetSonIds($typeid, 0); - $idArray = explode(',', $tidss); - } else { - foreach ($cfg_Cs as $k => $v) $idArray[] = $k; - } - } else { - $idArray = array(); - $idArray[] = $typeid; - } -} -//一键更新带缓存的情况 -else if ($gotype == 'mkall') { - $uppage = 1; - $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; - $idArray = array(); - if (file_exists($mkcachefile)) require_once($mkcachefile); -} - -//当前更新栏目的ID -$totalpage = count($idArray); -if (isset($idArray[$pageno])) { - $tid = $idArray[$pageno]; -} else { - if ($gotype == '') { - ShowMsg("完成所有列表更新", "javascript:;"); - exit(); - } else if ($gotype == 'mkall' || $gotype == 'mkallct') { - ShowMsg("完成所有栏目列表更新,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); - exit(); - } -} - -if ($pageno == 0 && $mkpage == 1) //清空缓存 -{ - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache` "); -} - -$reurl = ''; - -//更新数组所记录的栏目 -if (!empty($tid)) { - if (!isset($cfg_Cs[$tid])) { - ShowMsg('没有该栏目数据, 可能缓存文件(/data/cache/inc_catalog_base.inc)没有更新, 请检查是否有写入权限', 'javascript:;'); - exit(); - } - if ($cfg_Cs[$tid][1] > 0) { - require_once(DEDEINC."/arc.listview.class.php"); - $lv = new ListView($tid); - $position = MfTypedir($lv->Fields['typedir']); - } else { - require_once(DEDEINC."/arc.sglistview.class.php"); - $lv = new SgListView($tid); - } - // 这里统一统计 - $lv->CountRecord(); - if ($lv->TypeLink->TypeInfos['ispart'] == 0 && $lv->TypeLink->TypeInfos['isdefault'] != -1) $ntotalpage = $lv->TotalPage; - else $ntotalpage = 1; - //如果栏目的文档太多,分多批次更新 - if ($ntotalpage <= $maxpagesize || $lv->TypeLink->TypeInfos['ispart'] != 0 || $lv->TypeLink->TypeInfos['isdefault'] == -1) { - $reurl = $lv->MakeHtml('', '', 0); - $finishType = TRUE; - } else { - $reurl = $lv->MakeHtml($mkpage, $maxpagesize, 0); - $finishType = FALSE; - $mkpage = $mkpage + $maxpagesize; - if ($mkpage >= ($ntotalpage + 1)) $finishType = TRUE; - } -} - -$nextpage = $pageno + 1; -if ($nextpage >= $totalpage && $finishType) { - if ($gotype == '') { - if (empty($reurl)) { - $reurl = '../plus/list.php?tid='.$tid; - } - ShowMsg("完成所有栏目列表更新浏览栏目", "javascript:;"); - exit(); - } else if ($gotype == 'mkall' || $gotype == 'mkallct') { - ShowMsg("完成所有栏目列表更新,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); - exit(); - } -} else { - if ($finishType) { - $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$nextpage"; - ShowMsg("成功创建栏目:".$tid.",继续进行操作", $gourl, 0, 100); - exit(); - } else { - $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&mkpage=$mkpage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$pageno"; - ShowMsg("栏目:".$tid.",继续进行操作...", $gourl, 0, 100); - exit(); - } -} +getUserID(); + +//检测获取所有栏目ID +//普通生成或一键更新时更新所有栏目 +if ($gotype == '' || $gotype == 'mkallct') { + if ($upnext == 1 || $typeid == 0) { + if ($typeid > 0) { + $tidss = GetSonIds($typeid, 0); + $idArray = explode(',', $tidss); + } else { + foreach ($cfg_Cs as $k => $v) $idArray[] = $k; + } + } else { + $idArray = array(); + $idArray[] = $typeid; + } +} +//一键更新带缓存的情况 +else if ($gotype == 'mkall') { + $uppage = 1; + $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; + $idArray = array(); + if (file_exists($mkcachefile)) require_once($mkcachefile); +} + +//当前更新栏目的ID +$totalpage = count($idArray); +if (isset($idArray[$pageno])) { + $tid = $idArray[$pageno]; +} else { + if ($gotype == '') { + ShowMsg("完成所有列表更新", "javascript:;"); + exit(); + } else if ($gotype == 'mkall' || $gotype == 'mkallct') { + ShowMsg("完成所有栏目列表更新,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); + exit(); + } +} + +if ($pageno == 0 && $mkpage == 1) //清空缓存 +{ + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache` "); +} + +$reurl = ''; + +//更新数组所记录的栏目 +if (!empty($tid)) { + if (!isset($cfg_Cs[$tid])) { + ShowMsg('没有该栏目数据, 可能缓存文件(/data/cache/inc_catalog_base.inc)没有更新, 请检查是否有写入权限', 'javascript:;'); + exit(); + } + if ($cfg_Cs[$tid][1] > 0) { + require_once(DEDEINC."/arc.listview.class.php"); + $lv = new ListView($tid); + $position = MfTypedir($lv->Fields['typedir']); + } else { + require_once(DEDEINC."/arc.sglistview.class.php"); + $lv = new SgListView($tid); + } + //这里统一统计 + $lv->CountRecord(); + if ($lv->TypeLink->TypeInfos['ispart'] == 0 && $lv->TypeLink->TypeInfos['isdefault'] != -1) $ntotalpage = $lv->TotalPage; + else $ntotalpage = 1; + //如果栏目的文档太多,分多批次更新 + if ($ntotalpage <= $maxpagesize || $lv->TypeLink->TypeInfos['ispart'] != 0 || $lv->TypeLink->TypeInfos['isdefault'] == -1) { + $reurl = $lv->MakeHtml('', '', 0); + $finishType = TRUE; + } else { + $reurl = $lv->MakeHtml($mkpage, $maxpagesize, 0); + $finishType = FALSE; + $mkpage = $mkpage + $maxpagesize; + if ($mkpage >= ($ntotalpage + 1)) $finishType = TRUE; + } +} + +$nextpage = $pageno + 1; +if ($nextpage >= $totalpage && $finishType) { + if ($gotype == '') { + if (empty($reurl)) { + $reurl = '../plus/list.php?tid='.$tid; + } + ShowMsg("完成所有栏目列表更新浏览栏目", "javascript:;"); + exit(); + } else if ($gotype == 'mkall' || $gotype == 'mkallct') { + ShowMsg("完成所有栏目列表更新,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); + exit(); + } +} else { + if ($finishType) { + $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$nextpage"; + ShowMsg("成功创建栏目:".$tid.",继续进行操作", $gourl, 0, 100); + exit(); + } else { + $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&mkpage=$mkpage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$pageno"; + ShowMsg("栏目:".$tid.",继续进行操作...", $gourl, 0, 100); + exit(); + } +} diff --git a/src/dede/makehtml_map.php b/src/admin/makehtml_map.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/makehtml_map.php rename to src/admin/makehtml_map.php index 7a032156..780aeecb --- a/src/dede/makehtml_map.php +++ b/src/admin/makehtml_map.php @@ -1,37 +1,36 @@ -GetSiteMap($dopost); -if ($dopost == "site") { - $murl = $cfg_cmspath."/data/sitemap.html"; - $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm"; -} else { - $murl = $cfg_cmspath."/data/rssmap.html"; - $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/rssmap.htm"; -} -$dtp = new DedeTagParse(); -$dtp->LoadTemplet($tmpfile); -$dtp->SaveTo($cfg_basedir.$murl); -$dtp->Clear(); -echo ""; -echo "
成功更新文件: $murl 浏览...
"; -exit(); +GetSiteMap($dopost); +if ($dopost == "site") { + $murl = $cfg_cmspath."/data/sitemap.html"; + $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm"; +} else { + $murl = $cfg_cmspath."/data/rssmap.html"; + $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/rssmap.htm"; +} +$dtp = new DedeTagParse(); +$dtp->LoadTemplet($tmpfile); +$dtp->SaveTo($cfg_basedir.$murl); +$dtp->Clear(); +echo ""; +echo "
成功更新文件: $murl 浏览...
"; +exit(); diff --git a/src/dede/makehtml_map_guide.php b/src/admin/makehtml_map_guide.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/makehtml_map_guide.php rename to src/admin/makehtml_map_guide.php index 76b21274..f8250d77 --- a/src/dede/makehtml_map_guide.php +++ b/src/admin/makehtml_map_guide.php @@ -1,13 +1,12 @@ -GetOne("SELECT id FROM `#@__arctype` WHERE id>'$tid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); -if (!is_array($row)) { - echo ""; - echo "
完成所有文件更新
"; -} else { - $rv = new RssView($row['id'], $maxrecord); - $rssurl = $rv->MakeRss(0); - $tid = $row['id']; - ShowMsg("成功更新".$rssurl.",继续进行操作", "makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord", 0, 100); -} +GetOne("SELECT id FROM `#@__arctype` WHERE id>'$tid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); +if (!is_array($row)) { + echo ""; + echo "
完成所有文件更新
"; +} else { + $rv = new RssView($row['id'], $maxrecord); + $rssurl = $rv->MakeRss(0); + $tid = $row['id']; + ShowMsg("成功更新".$rssurl.",继续进行操作", "makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord", 0, 100); +} diff --git a/src/dede/makehtml_spec.php b/src/admin/makehtml_spec.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/makehtml_spec.php rename to src/admin/makehtml_spec.php index 74f248d3..1c88d8ab --- a/src/dede/makehtml_spec.php +++ b/src/admin/makehtml_spec.php @@ -1,24 +1,23 @@ -MakeHtml(0); - echo ""; - echo "
成功生成所有专题HTML列表预览
"; - exit(); -} -include DedeInclude('templets/makehtml_spec.htm'); +MakeHtml(0); + echo ""; + echo "
成功生成所有专题HTML列表预览
"; + exit(); +} +include DedeInclude('templets/makehtml_spec.htm'); diff --git a/src/dede/makehtml_taglist.php b/src/admin/makehtml_taglist.php similarity index 100% rename from src/dede/makehtml_taglist.php rename to src/admin/makehtml_taglist.php diff --git a/src/dede/makehtml_taglist_action.php b/src/admin/makehtml_taglist_action.php similarity index 89% rename from src/dede/makehtml_taglist_action.php rename to src/admin/makehtml_taglist_action.php index d4b7b1db..e32c6dc5 100644 --- a/src/dede/makehtml_taglist_action.php +++ b/src/admin/makehtml_taglist_action.php @@ -1,5 +1,4 @@ 0) { - $upall = 0; // 更新单个模式 + $upall = 0; //更新单个模式 $ctagid = $tagid; } else { - $upall = 1; // 更新全部模式 + $upall = 1; //更新全部模式 } -$allfinish = false; // 是否全部完成 +$allfinish = false; //是否全部完成 -$dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); // 取一个平均 +$dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); //取一个平均 if ($upall == 1 && $ctagid == 0) { $rr = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE mktime <> uptime AND total > {$dd['tt']} LIMIT 1"); @@ -57,7 +56,7 @@ if (is_array($tag) && count($tag) > 0) { if ($ntotalpage <= $maxpagesize) { $dlist->MakeHtml('', ''); - $finishType = TRUE; // 生成一个TAG完成 + $finishType = TRUE; //生成一个TAG完成 } else { $reurl = $dlist->MakeHtml($mkpage, $maxpagesize); $finishType = FALSE; @@ -87,7 +86,7 @@ if (is_array($tag) && count($tag) > 0) { exit(); } else { if ($finishType) { - // 完成了一个跳到下一个 + //完成了一个跳到下一个 if ($upall == 1) { $query = "UPDATE `#@__tagindex` SET mktime=uptime WHERE id='$ctagid' "; $dsql->ExecuteNoneQuery($query); @@ -98,7 +97,7 @@ if (is_array($tag) && count($tag) > 0) { ShowMsg("成功生成TAG:[".$tag['tag']."],继续进行操作", $gourl, 0, 100); exit(); } else { - // 继续当前这个 + //继续当前这个 $gourl = "makehtml_taglist_action.php?mkpage=$mkpage&maxpagesize=$maxpagesize&tagid=$tagid&pageno=$pageno&upall=$upall&ctagid=$ctagid"; ShowMsg("成功生成TAG:[".$tag['tag']."],继续进行操作...", $gourl, 0, 100); exit(); diff --git a/src/dede/mda_main.php b/src/admin/mda_main.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/mda_main.php rename to src/admin/mda_main.php index 3ea43ff0..19f104e5 --- a/src/dede/mda_main.php +++ b/src/admin/mda_main.php @@ -1,438 +1,434 @@ -IsTable('#@__plus_mda_setting')) { - $mysql_version = $dsql->GetVersion(TRUE); - - foreach ($install_sqls as $install_sql) { - $sql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $install_sql); - $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; - - if ($mysql_version >= 4.1) { - $sql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $sql); - } - $dsql->ExecuteNoneQuery($sql); - } -} - -/*-------------------------------- -function __update(){ } --------------------------------*/ - -$version = mda_get_setting('version'); -if (empty($version)) $version = '0.0.1'; -if (version_compare($version, MDA_VER, '<')) { - $mysql_version = $dsql->GetVersion(TRUE); - - foreach ($update_sqls as $ver => $sqls) { - if (version_compare($ver, $version, '<')) { - continue; - } - foreach ($sqls as $sql) { - $sql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $sql); - $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; - - if ($mysql_version >= 4.1) { - $sql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $sql); - } - $dsql->ExecuteNoneQuery($sql); - } - mda_set_setting('version', $ver); - $version = mda_get_setting('version'); - } -} - -if (empty($dopost)) $dopost = ''; - -/*-------------------------------- -function __link(){ } --------------------------------*/ -if ($dopost == 'place' or $dopost == 'report' or $dopost == 'account' or $dopost == 'setting') { - if (!mda_islogin()) { - ShowMsg("您尚未登录德得广告,请先登录后继续使用……", '?dopost=login'); - exit(); - } - mda_check_islogin(); - - if ($dopost == 'place') { - $channel_uuid = mda_get_setting('channel_uuid'); - $manage_url = MDA_APIHOST."/place?from=dedecms&uuid={$channel_uuid}"; - $ptitle = '广告管理'; - } elseif ($dopost == 'report') { - $manage_url = MDA_APIHOST."/report"; - $ptitle = '报表管理'; - } elseif ($dopost == 'account') { - $manage_url = MDA_APIHOST."/account"; - $ptitle = '结算中心'; - } elseif ($dopost == 'setting') { - $manage_url = MDA_APIHOST."/setting"; - $ptitle = '德得设置'; - } - - echo << - - -{$ptitle} - - - - - - - - - - -
- -
 德得广告 》{$ptitle}
-
您好:{$_SESSION['mda_email']} {$account_str}
-
- - - - {$addstr} - - - - - - -
{$ptitle}
 
-


-
-

- - - -EOT; -} -/*-------------------------------- -function __clearcache(){ } --------------------------------*/ else if ($dopost == 'clearcache') { - if (!is_dir(DEDEDATA."/cache/mda/") or RmRecurse(DEDEDATA."/cache/mda/")) { - ShowMsg("成功清除缓存信息", -1); - exit(); - } else { - ShowMsg("清除缓存失败,请尝试手工删除".DEDEDATA."/cache/mda/", 'javascript:;'); - exit(); - } -} -/*-------------------------------- -function __bind_user(){ } --------------------------------*/ else if ($dopost == 'bind_user') { - $email = isset($email) ? $email : ''; - $pwd = isset($pwd) ? $pwd : ''; - $domain = isset($domain) ? $domain : ''; - $channel_name = isset($channel_name) ? $channel_name : ''; - if (!$email or !$pwd or !$domain or !$channel_name) { - ShowMsg("填写正确的账号信息", -1); - exit(); - } - if ($cfg_soft_lang == 'gb2312') $channel_name = gb2utf8($channel_name); - $paramsArr = array( - 'email' => $email, - 'password' => $pwd, - 'domain' => $domain, - 'channel_name' => $channel_name, - ); - $rs = json_decode(mda_http_send(MDA_API_BIND_USER, 0, $paramsArr), TRUE); - if (!$rs) { - ShowMsg("请求API错误,请重试", -1); - exit(); - } - if ($rs['code'] != 0) { - ShowMsg("请求失败,错误代码[code:{$rs['code']}],消息[{$rs['msg']}]", -1); - exit(); - } - $channel_uuid = $rs['data']['channel_uuid']; - $channel_secret = $rs['data']['channel_secret']; - - mda_set_setting('email', $email); - mda_set_setting('channel_uuid', $channel_uuid); - mda_set_setting('channel_secret', $channel_secret); - $login_url = "?dopost=login"; - echo << -EOT; - ShowMsg("绑定成功,下面自动登录德得广告平台", "?dopost=login"); - exit(); -} -/*-------------------------------- -function __login(){ } --------------------------------*/ else if ($dopost == 'login') { - $email = mda_get_setting('email'); - $channel_uuid = mda_get_setting('channel_uuid'); - $channel_secret = mda_get_setting('channel_secret'); - $ts = time(); - $paramsArr = array( - 'channel_uuid' => $channel_uuid, - 'channel_secret' => $channel_secret, - 'email' => $email, - 'ts' => $ts, - 'crc' => md5($channel_uuid.$channel_secret.$ts), - ); - $jquery_file = MDA_JQUERY; - $api_login = MDA_API_LOGIN; - $params = json_encode($paramsArr); - $rs = json_decode(mda_http_send(MDA_API_LOGIN, 0, $paramsArr), TRUE); - if (isset($rs['code']) and $rs['code'] == 0) { - $_SESSION['mda_email'] = $email; - } else { - unset($_SESSION['mda_email']); - header('Location:?logout=1'); - exit(); - } - - echo << - -EOT; - exit; -} -/*-------------------------------- -function __main(){ } --------------------------------*/ else if ($dopost == 'main') { - $mda_version = MDA_VER; - $channel_uuid = mda_get_setting('channel_uuid'); - $channel_secret = mda_get_setting('channel_secret'); - $msg = << - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
登录用户:{$_SESSION['email']} {$account_str}
德得模块版本:v{$mda_version}
Channel UUID:
Channel Secret: - - -
您已成功登录德得广告您可以进行以下操作:
- [广告管理] - [查看报表] - [结算中心] - [德得设置] - [清空缓存] -
-
- 使用说明:
- 在广告管理中创建对应广告位,获取广告位标签,置入模板相应位置即可。 -
- 功能说明:
- [广告管理]管理站点相应的广告位;
- [查看报表]获取广告位相应的统计情况;
- [结算中心]查看收益统计;
- [德得设置]德得广告平台账号信息配置;
- [清空缓存]清空广告标签缓存,如果更改登录账号建议清空缓存再生成;
-
-
德得广告是一个简单友好的广告平台,深度融合织梦系统,帮助您获取更多收益。
- -{$login_str} -{$change_isv_id} -EOT; - $wintitle = '德得广告管理'; - $wecome_info = '德得广告模块 》'; - $win = new OxWindow(); - $win->AddTitle($wintitle); - $win->AddMsgItem($msg); - $winform = $win->GetWindow('hand', ' ', false); - $win->Display(); - exit; -} else if ($dopost == 'set_secret') { - $email = mda_get_setting('email'); - $channel_uuid = mda_get_setting('channel_uuid'); - $ts = time(); - $paramsArr = array( - 'channel_uuid' => $channel_uuid, - 'channel_secret' => $channel_secret, - 'email' => $email, - 'ts' => $ts, - 'crc' => md5($channel_uuid.$channel_secret.$ts), - ); - $rs = json_decode(mda_http_send(MDA_API_LOGIN, 0, $paramsArr), TRUE); - if (!$rs) { - ShowMsg("请求API错误,请重试", -1); - exit(); - } - if ($rs['code'] != 0) { - ShowMsg("请求失败,错误代码[code:{$rs['code']}],消息[{$rs['msg']}]", '?dopost=main'); - exit(); - } - if ($rs['code'] == 0) { - ShowMsg("Channel Secret 修改成功……", '?dopost=main'); - mda_set_setting('channel_secret', $channel_secret); - } -} -// ------------------------------------------------------------------------ -/*-------------------------------- -function __index(){ } --------------------------------*/ else { - if (mda_get_setting('email') and mda_get_setting('channel_uuid') and mda_get_setting('channel_secret') and empty($logout)) { - header('Location:?dopost=login'); - exit; - } - - $mda_reg_url = MDA_REG_URL; - $mda_forget_pwd_url = MDA_FORGOT_PASSWORD_URL; - $domain = !empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; - $mda_update_url = MDA_APIHOST."/help/dedecms_module_download"; - - echo << - - -德得广告 - - - - - - - - - - -
 德得广告 >> 配置德得广告
-
- - - - - - - - - - - -
德得广告
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
邮箱: - 免费注册 ,获取专业广告服务
密码: - 忘记密码  
站点域名: -
名称: -
模块版本:{$version} - 下载新版模块  
-
-
- - - - - -
-
-
-


-
-

- - -EOT; -} +IsTable('#@__plus_mda_setting')) { + $mysql_version = $dsql->GetVersion(TRUE); + + foreach ($install_sqls as $install_sql) { + $sql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $install_sql); + $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; + + if ($mysql_version >= 4.1) { + $sql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $sql); + } + $dsql->ExecuteNoneQuery($sql); + } +} + +/*-------------------------------- +function __update(){ } +-------------------------------*/ + +$version = mda_get_setting('version'); +if (empty($version)) $version = '0.0.1'; +if (version_compare($version, MDA_VER, '<')) { + $mysql_version = $dsql->GetVersion(TRUE); + + foreach ($update_sqls as $ver => $sqls) { + if (version_compare($ver, $version, '<')) { + continue; + } + foreach ($sqls as $sql) { + $sql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $sql); + $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; + + if ($mysql_version >= 4.1) { + $sql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $sql); + } + $dsql->ExecuteNoneQuery($sql); + } + mda_set_setting('version', $ver); + $version = mda_get_setting('version'); + } +} + +if (empty($dopost)) $dopost = ''; + +/*-------------------------------- +function __link(){ } +-------------------------------*/ +if ($dopost == 'place' or $dopost == 'report' or $dopost == 'account' or $dopost == 'setting') { + if (!mda_islogin()) { + ShowMsg("您尚未登录德得广告,请先登录后继续使用……", '?dopost=login'); + exit(); + } + mda_check_islogin(); + + if ($dopost == 'place') { + $channel_uuid = mda_get_setting('channel_uuid'); + $manage_url = MDA_APIHOST."/place?from=dedecms&uuid={$channel_uuid}"; + $ptitle = '广告管理'; + } elseif ($dopost == 'report') { + $manage_url = MDA_APIHOST."/report"; + $ptitle = '报表管理'; + } elseif ($dopost == 'account') { + $manage_url = MDA_APIHOST."/account"; + $ptitle = '结算中心'; + } elseif ($dopost == 'setting') { + $manage_url = MDA_APIHOST."/setting"; + $ptitle = '德得设置'; + } + + echo << + + +{$ptitle} + + + + + + + + + + +
+
 德得广告 {$ptitle}
+
您好:{$_SESSION['mda_email']} {$account_str}
+
+ + + + {$addstr} + + + + + + +
{$ptitle}
 
+ + + +EOT; +} +/*-------------------------------- +function __clearcache(){ } +-------------------------------*/ else if ($dopost == 'clearcache') { + if (!is_dir(DEDEDATA."/cache/mda/") or RmRecurse(DEDEDATA."/cache/mda/")) { + ShowMsg("成功清除缓存信息", -1); + exit(); + } else { + ShowMsg("清除缓存失败,请尝试手工删除".DEDEDATA."/cache/mda/", 'javascript:;'); + exit(); + } +} +/*-------------------------------- +function __bind_user(){ } +-------------------------------*/ else if ($dopost == 'bind_user') { + $email = isset($email) ? $email : ''; + $pwd = isset($pwd) ? $pwd : ''; + $domain = isset($domain) ? $domain : ''; + $channel_name = isset($channel_name) ? $channel_name : ''; + if (!$email or !$pwd or !$domain or !$channel_name) { + ShowMsg("填写正确的账号信息", -1); + exit(); + } + if ($cfg_soft_lang == 'gb2312') $channel_name = gb2utf8($channel_name); + $paramsArr = array( + 'email' => $email, + 'password' => $pwd, + 'domain' => $domain, + 'channel_name' => $channel_name, + ); + $rs = json_decode(mda_http_send(MDA_API_BIND_USER, 0, $paramsArr), TRUE); + if (!$rs) { + ShowMsg("请求API错误,请重试", -1); + exit(); + } + if ($rs['code'] != 0) { + ShowMsg("请求失败,错误代码[code:{$rs['code']}],消息[{$rs['msg']}]", -1); + exit(); + } + $channel_uuid = $rs['data']['channel_uuid']; + $channel_secret = $rs['data']['channel_secret']; + + mda_set_setting('email', $email); + mda_set_setting('channel_uuid', $channel_uuid); + mda_set_setting('channel_secret', $channel_secret); + $login_url = "?dopost=login"; + echo << +EOT; + ShowMsg("绑定成功,下面自动登录德得广告平台", "?dopost=login"); + exit(); +} +/*-------------------------------- +function __login(){ } +-------------------------------*/ else if ($dopost == 'login') { + $email = mda_get_setting('email'); + $channel_uuid = mda_get_setting('channel_uuid'); + $channel_secret = mda_get_setting('channel_secret'); + $ts = time(); + $paramsArr = array( + 'channel_uuid' => $channel_uuid, + 'channel_secret' => $channel_secret, + 'email' => $email, + 'ts' => $ts, + 'crc' => md5($channel_uuid.$channel_secret.$ts), + ); + $jquery_file = MDA_JQUERY; + $api_login = MDA_API_LOGIN; + $params = json_encode($paramsArr); + $rs = json_decode(mda_http_send(MDA_API_LOGIN, 0, $paramsArr), TRUE); + if (isset($rs['code']) and $rs['code'] == 0) { + $_SESSION['mda_email'] = $email; + } else { + unset($_SESSION['mda_email']); + header('Location:?logout=1'); + exit(); + } + + echo << + +EOT; + exit; +} +/*-------------------------------- +function __main(){ } +-------------------------------*/ else if ($dopost == 'main') { + $mda_version = MDA_VER; + $channel_uuid = mda_get_setting('channel_uuid'); + $channel_secret = mda_get_setting('channel_secret'); + $msg = << + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
登录用户:{$_SESSION['email']} {$account_str}
德得模块版本:v{$mda_version}
Channel UUID:
Channel Secret: + + +
您已成功登录德得广告您可以进行以下操作:
+ [广告管理] + [查看报表] + [结算中心] + [德得设置] + [清空缓存] +
+
+ 使用说明:
+ 在广告管理中创建对应广告位,获取广告位标签,置入模板相应位置即可。 +
+ 功能说明:
+ [广告管理]管理站点相应的广告位;
+ [查看报表]获取广告位相应的统计情况;
+ [结算中心]查看收益统计;
+ [德得设置]德得广告平台账号信息配置;
+ [清空缓存]清空广告标签缓存,如果修改登录账号建议清空缓存再生成;
+
+
德得广告是一个简单友好的广告平台,深度融合织梦系统,帮助您获取更多收益。
+ +{$login_str} +{$change_isv_id} +EOT; + $wintitle = '德得广告管理'; + $wecome_info = '德得广告模块 》'; + $win = new OxWindow(); + $win->AddTitle($wintitle); + $win->AddMsgItem($msg); + $winform = $win->GetWindow('hand', ' ', false); + $win->Display(); + exit; +} else if ($dopost == 'set_secret') { + $email = mda_get_setting('email'); + $channel_uuid = mda_get_setting('channel_uuid'); + $ts = time(); + $paramsArr = array( + 'channel_uuid' => $channel_uuid, + 'channel_secret' => $channel_secret, + 'email' => $email, + 'ts' => $ts, + 'crc' => md5($channel_uuid.$channel_secret.$ts), + ); + $rs = json_decode(mda_http_send(MDA_API_LOGIN, 0, $paramsArr), TRUE); + if (!$rs) { + ShowMsg("请求API错误,请重试", -1); + exit(); + } + if ($rs['code'] != 0) { + ShowMsg("请求失败,错误代码[code:{$rs['code']}],消息[{$rs['msg']}]", '?dopost=main'); + exit(); + } + if ($rs['code'] == 0) { + ShowMsg("Channel Secret 修改成功……", '?dopost=main'); + mda_set_setting('channel_secret', $channel_secret); + } +} +//------------------------------------------------------------------------ +/*-------------------------------- +function __index(){ } +-------------------------------*/ else { + if (mda_get_setting('email') and mda_get_setting('channel_uuid') and mda_get_setting('channel_secret') and empty($logout)) { + header('Location:?dopost=login'); + exit; + } + + $mda_reg_url = MDA_REG_URL; + $mda_forget_pwd_url = MDA_FORGOT_PASSWORD_URL; + $domain = !empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; + $mda_update_url = MDA_APIHOST."/help/dedecms_module_download"; + + echo << + + +德得广告 + + + + + + + + + + +
 德得广告 >> 配置德得广告
+
+ + + + + + + + + + + +
德得广告
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
邮箱: + 免费注册 ,获取专业广告服务
密码: + 忘记密码  
站点域名: +
名称: +
模块版本:{$version} + 下载新版模块  
+
+
+ + + + + +
+
+
+
+


+
+

+ + +EOT; +} \ No newline at end of file diff --git a/src/dede/media_add.php b/src/admin/media_add.php old mode 100755 new mode 100644 similarity index 98% rename from src/dede/media_add.php rename to src/admin/media_add.php index dc0fccad..01cf390f --- a/src/dede/media_add.php +++ b/src/admin/media_add.php @@ -1,5 +1,4 @@ ExecuteNoneQuery($query); - ShowMsg('成功更改一则附件数据', 'media_edit.php?aid='.$aid); + ShowMsg('成功修改一则附件数据', 'media_edit.php?aid='.$aid); exit(); } diff --git a/src/dede/media_main.php b/src/admin/media_main.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/media_main.php rename to src/admin/media_main.php index 9b0cee1b..9be92bdc --- a/src/dede/media_main.php +++ b/src/admin/media_main.php @@ -1,85 +1,84 @@ -0 "; -} else if ($membertype == 2) { - $addsql .= " AND u.mid>0 "; -} - -if (empty($mediatype)) { - $mediatype = 0; -} -if ($mediatype > 1) { - $addsql .= " AND u.mediatype='$membertype' "; -} -$sql = "SELECT u.aid,u.title,u.url,u.mediatype,u.filesize,u.mid,u.uptime -,a.userid AS adminname,m.userid AS membername -FROM #@__uploads u -LEFT JOIN #@__admin a ON a.id = u.mid -LEFT JOIN #@__member m ON m.mid = u.mid -$addsql ORDER BY u.aid DESC"; -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("mediatype", $mediatype); -$dlist->SetParameter("keyword", $keyword); -$dlist->SetParameter("membertype", $membertype); -$dlist->SetTemplate(DEDEADMIN."/templets/media_main.htm"); -$dlist->SetSource($sql); -$dlist->Display(); - -function MediaType($tid, $nurl) -{ - if ($tid == 1) { - return "图片预览"; - } else if ($tid == 2) { - return "FLASH"; - } else if ($tid == 3) { - return "视频/音频"; - } else { - return "附件/其它"; - } -} - -function GetFileSize($fs) -{ - $fs = $fs / 1024; - return trim(sprintf("%10.1f", $fs)." K"); -} - -function UploadAdmin($adminid, $mid) -{ - if ($adminid != '') return $adminid; - else return $mid; -} +0 "; +} else if ($membertype == 2) { + $addsql .= " AND u.mid>0 "; +} + +if (empty($mediatype)) { + $mediatype = 0; +} +if ($mediatype > 1) { + $addsql .= " AND u.mediatype='$membertype' "; +} +$sql = "SELECT u.aid,u.title,u.url,u.mediatype,u.filesize,u.mid,u.uptime +,a.userid AS adminname,m.userid AS membername +FROM #@__uploads u +LEFT JOIN #@__admin a ON a.id = u.mid +LEFT JOIN #@__member m ON m.mid = u.mid +$addsql ORDER BY u.aid DESC"; +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("mediatype", $mediatype); +$dlist->SetParameter("keyword", $keyword); +$dlist->SetParameter("membertype", $membertype); +$dlist->SetTemplate(DEDEADMIN."/templets/media_main.htm"); +$dlist->SetSource($sql); +$dlist->Display(); + +function MediaType($tid, $nurl) +{ + if ($tid == 1) { + return "图片预览"; + } else if ($tid == 2) { + return "FLASH"; + } else if ($tid == 3) { + return "视频/音频"; + } else { + return "附件/其它"; + } +} + +function GetFileSize($fs) +{ + $fs = $fs / 1024; + return trim(sprintf("%10.1f", $fs)." K"); +} + +function UploadAdmin($adminid, $mid) +{ + if ($adminid != '') return $adminid; + else return $mid; +} diff --git a/src/dede/member_do.php b/src/admin/member_do.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/member_do.php rename to src/admin/member_do.php index 0e997ed1..db81bdb4 --- a/src/dede/member_do.php +++ b/src/admin/member_do.php @@ -1,234 +1,233 @@ -GetOne("SELECT * FROM `#@__member` WHERE mid='$id' LIMIT 1 "); - $rs = 0; - if ($row['matt'] == 10) { - $nrow = $dsql->GetOne("SELECT * FROM `#@__admin` WHERE id='$id' LIMIT 1 "); - //已经删除关连的管理员帐号 - if (!is_array($nrow)) $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid='$id' LIMIT 1"); - } else { - $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid='$id' LIMIT 1"); - } - if ($rs > 0) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` 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_person` WHERE mid='$id' LIMIT 1"); - - //删除用户相关数据 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid='$id' Or fromid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid='$id' Or fid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid='$id' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid='$id'"); - } else { - ShowMsg("无法删除此会员,如果这个会员是[管理员]
必须先删除这个[管理员]才能删除此帐号", $ENV_GOBACK_URL, 0, 5000); - exit(); - } - } - ShowMsg("成功删除一个会员", $ENV_GOBACK_URL); - exit(); - } - $randcode = mt_rand(10000, 99999); - $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); - $wintitle = "会员管理-删除会员"; - $wecome_info = "会员管理::删除会员"; - $win = new OxWindow(); - $win->Init("member_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("id", $id); - $win->AddHidden("randcode", $randcode); - $win->AddHidden("safecode", $safecode); - $win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); - $win->AddMsgItem("安全验证串: (复制本代码: $safecode )", "30"); - $winform = $win->GetWindow("ok"); - $win->Display(); -} else if ($dopost == "delmembers") { - CheckPurview('member_Del'); - if ($fmdo == 'yes') { - $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); - if ($safecodeok != $safecode) { - ShowMsg("请填写正确的安全验证串", "member_do.php?id={$id}&dopost=delmembers"); - exit(); - } - if (!empty($id)) { - //删除用户信息 - - $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid IN (".str_replace("`", ",", $id).") And matt<>10 "); - if ($rs > 0) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid IN (".str_replace("`", ",", $id).") "); - - //删除用户相关数据 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid IN (".str_replace("`", ",", $id).") Or fromid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid IN (".str_replace("`", ",", $id).") Or fid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid IN (".str_replace("`", ",", $id).")"); - } else { - ShowMsg("无法删除此会员,如果这个会员是管理员关连的ID,
必须先删除这个管理员才能删除此帐号", $ENV_GOBACK_URL, 0, 3000); - exit(); - } - } - ShowMsg("成功删除这些会员", $ENV_GOBACK_URL); - exit(); - } - $randcode = mt_rand(10000, 99999); - $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); - $wintitle = "会员管理-删除会员"; - $wecome_info = "会员管理::删除会员"; - $win = new OxWindow(); - $win->Init("member_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("id", $id); - $win->AddHidden("randcode", $randcode); - $win->AddHidden("safecode", $safecode); - $win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); - $win->AddMsgItem(" 安全验证串: (复制本代码: $safecode)", "30"); - $winform = $win->GetWindow("ok"); - $win->Display(); -} -/*---------------- -function __Recommend() -推荐会员 -----------------*/ else if ($dopost == "recommend") { - CheckPurview('member_Edit'); - $id = preg_replace("#[^0-9]#", "", $id); - if ($matt == 0) { - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=1 WHERE mid='$id' AND matt<>10 LIMIT 1"); - ShowMsg("成功设置一个会员推荐", $ENV_GOBACK_URL); - exit(); - } else { - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=0 WHERE mid='$id' AND matt<>10 LIMIT 1"); - ShowMsg("成功取消一个会员推荐", $ENV_GOBACK_URL); - exit(); - } -} -/*---------------- -function __EditUser() -更改会员 -----------------*/ else if ($dopost == 'edituser') { - CheckPurview('member_Edit'); - if (!isset($_POST['id'])) exit('Request Error!'); - $pwdsql = empty($pwd) ? '' : ",pwd='".md5($pwd)."'"; - if (empty($sex)) $sex = '男'; - $uptime = GetMkTime($uptime); - - if ($matt == 10 && $oldmatt != 10) { - ShowMsg("对不起,为安全起见,不支持直接把前台会员转为管理的操作", "-1"); - exit(); - } - $query = "UPDATE `#@__member` SET - email = '$email', - uname = '$uname', - sex = '$sex', - matt = '$matt', - money = '$money', - scores = '$scores', - rank = '$rank', - spacesta='$spacesta', - uptime='$uptime', - exptime='$exptime' - $pwdsql - WHERE mid='$id' AND matt<>10 "; - $rs = $dsql->ExecuteNoneQuery2($query); - if ($rs == 0) { - $query = "UPDATE `#@__member` SET - email = '$email', - uname = '$uname', - sex = '$sex', - money = '$money', - scores = '$scores', - rank = '$rank', - spacesta='$spacesta', - uptime='$uptime', - exptime='$exptime' - $pwdsql - WHERE mid='$id' "; - $rs = $dsql->ExecuteNoneQuery2($query); - } - - ShowMsg('成功更改会员资料', 'member_view.php?id='.$id); - exit(); -} -/*-------------- -function __LoginCP() -登录会员的控制面板 -----------*/ else if ($dopost == "memberlogin") { - CheckPurview('member_Edit'); - PutCookie('DedeUserID', $id, 1800); - PutCookie('DedeLoginTime', time(), 1800); - if (empty($jumpurl)) header("location:../member/index.php"); - else header("location:$jumpurl"); -} else if ($dopost == "deoperations") { - $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); - $nid = explode(',', $nid); - if (is_array($nid)) { - foreach ($nid as $var) { - $query = "DELETE FROM `#@__member_operation` WHERE aid = '$var'"; - $dsql->ExecuteNoneQuery($query); - } - ShowMsg("删除成功", "member_operations.php"); - exit(); - } -} else if ($dopost == "upoperations") { - $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); - $nid = explode(',', $nid); - if (is_array($nid)) { - foreach ($nid as $var) { - $query = "UPDATE `#@__member_operation` SET sta = '1' WHERE aid = '$var'"; - $dsql->ExecuteNoneQuery($query); - ShowMsg("设置成功", "member_operations.php"); - exit(); - } - } -} else if ($dopost == "okoperations") { - $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); - $nid = explode(',', $nid); - if (is_array($nid)) { - foreach ($nid as $var) { - $query = "UPDATE `#@__member_operation` SET sta = '2' WHERE aid = '$var'"; - $dsql->ExecuteNoneQuery($query); - ShowMsg("设置成功", "member_operations.php"); - exit(); - } - } -} +GetOne("SELECT * FROM `#@__member` WHERE mid='$id' LIMIT 1 "); + $rs = 0; + if ($row['matt'] == 10) { + $nrow = $dsql->GetOne("SELECT * FROM `#@__admin` WHERE id='$id' LIMIT 1 "); + //已经删除关连的管理员帐号 + if (!is_array($nrow)) $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid='$id' LIMIT 1"); + } else { + $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid='$id' LIMIT 1"); + } + if ($rs > 0) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` 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_person` WHERE mid='$id' LIMIT 1"); + + //删除用户相关数据 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid='$id' Or fromid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid='$id' Or fid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid='$id' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid='$id'"); + } else { + ShowMsg("无法删除此会员,如果这个会员是[管理员]
必须先删除这个[管理员]才能删除此帐号", $ENV_GOBACK_URL, 0, 5000); + exit(); + } + } + ShowMsg("成功删除一个会员", $ENV_GOBACK_URL); + exit(); + } + $randcode = mt_rand(10000, 99999); + $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); + $wintitle = "会员管理-删除会员"; + $wecome_info = "会员管理::删除会员"; + $win = new OxWindow(); + $win->Init("member_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("id", $id); + $win->AddHidden("randcode", $randcode); + $win->AddHidden("safecode", $safecode); + $win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); + $win->AddMsgItem("安全验证串: (复制本代码: $safecode )", "30"); + $winform = $win->GetWindow("ok"); + $win->Display(); +} else if ($dopost == "delmembers") { + CheckPurview('member_Del'); + if ($fmdo == 'yes') { + $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); + if ($safecodeok != $safecode) { + ShowMsg("请填写正确的安全验证串", "member_do.php?id={$id}&dopost=delmembers"); + exit(); + } + if (!empty($id)) { + //删除用户信息 + + $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid IN (".str_replace("`", ",", $id).") And matt<>10 "); + if ($rs > 0) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid IN (".str_replace("`", ",", $id).") "); + + //删除用户相关数据 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid IN (".str_replace("`", ",", $id).") Or fromid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid IN (".str_replace("`", ",", $id).") Or fid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid IN (".str_replace("`", ",", $id).")"); + } else { + ShowMsg("无法删除此会员,如果这个会员是管理员关连的ID,
必须先删除这个管理员才能删除此帐号", $ENV_GOBACK_URL, 0, 3000); + exit(); + } + } + ShowMsg("成功删除这些会员", $ENV_GOBACK_URL); + exit(); + } + $randcode = mt_rand(10000, 99999); + $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); + $wintitle = "会员管理-删除会员"; + $wecome_info = "会员管理::删除会员"; + $win = new OxWindow(); + $win->Init("member_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("id", $id); + $win->AddHidden("randcode", $randcode); + $win->AddHidden("safecode", $safecode); + $win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); + $win->AddMsgItem(" 安全验证串: (复制本代码: $safecode)", "30"); + $winform = $win->GetWindow("ok"); + $win->Display(); +} +/*---------------- +function __Recommend() +推荐会员 +----------------*/ else if ($dopost == "recommend") { + CheckPurview('member_Edit'); + $id = preg_replace("#[^0-9]#", "", $id); + if ($matt == 0) { + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=1 WHERE mid='$id' AND matt<>10 LIMIT 1"); + ShowMsg("成功设置一个会员推荐", $ENV_GOBACK_URL); + exit(); + } else { + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=0 WHERE mid='$id' AND matt<>10 LIMIT 1"); + ShowMsg("成功取消一个会员推荐", $ENV_GOBACK_URL); + exit(); + } +} +/*---------------- +function __EditUser() +修改会员 +----------------*/ else if ($dopost == 'edituser') { + CheckPurview('member_Edit'); + if (!isset($_POST['id'])) exit('Request Error!'); + $pwdsql = empty($pwd) ? '' : ",pwd='".md5($pwd)."'"; + if (empty($sex)) $sex = '男'; + $uptime = GetMkTime($uptime); + + if ($matt == 10 && $oldmatt != 10) { + ShowMsg("对不起,为安全起见,不支持直接把前台会员转为管理的操作", "-1"); + exit(); + } + $query = "UPDATE `#@__member` SET + email = '$email', + uname = '$uname', + sex = '$sex', + matt = '$matt', + money = '$money', + scores = '$scores', + rank = '$rank', + spacesta='$spacesta', + uptime='$uptime', + exptime='$exptime' + $pwdsql + WHERE mid='$id' AND matt<>10 "; + $rs = $dsql->ExecuteNoneQuery2($query); + if ($rs == 0) { + $query = "UPDATE `#@__member` SET + email = '$email', + uname = '$uname', + sex = '$sex', + money = '$money', + scores = '$scores', + rank = '$rank', + spacesta='$spacesta', + uptime='$uptime', + exptime='$exptime' + $pwdsql + WHERE mid='$id' "; + $rs = $dsql->ExecuteNoneQuery2($query); + } + + ShowMsg('成功修改会员资料', 'member_view.php?id='.$id); + exit(); +} +/*-------------- +function __LoginCP() +登录会员的控制面板 +----------*/ else if ($dopost == "memberlogin") { + CheckPurview('member_Edit'); + PutCookie('DedeUserID', $id, 1800); + PutCookie('DedeLoginTime', time(), 1800); + if (empty($jumpurl)) header("location:../member/index.php"); + else header("location:$jumpurl"); +} else if ($dopost == "deoperations") { + $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); + $nid = explode(',', $nid); + if (is_array($nid)) { + foreach ($nid as $var) { + $query = "DELETE FROM `#@__member_operation` WHERE aid = '$var'"; + $dsql->ExecuteNoneQuery($query); + } + ShowMsg("删除成功", "member_operations.php"); + exit(); + } +} else if ($dopost == "upoperations") { + $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); + $nid = explode(',', $nid); + if (is_array($nid)) { + foreach ($nid as $var) { + $query = "UPDATE `#@__member_operation` SET sta = '1' WHERE aid = '$var'"; + $dsql->ExecuteNoneQuery($query); + ShowMsg("设置成功", "member_operations.php"); + exit(); + } + } +} else if ($dopost == "okoperations") { + $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); + $nid = explode(',', $nid); + if (is_array($nid)) { + foreach ($nid as $var) { + $query = "UPDATE `#@__member_operation` SET sta = '2' WHERE aid = '$var'"; + $dsql->ExecuteNoneQuery($query); + ShowMsg("设置成功", "member_operations.php"); + exit(); + } + } +} diff --git a/src/dede/member_main.php b/src/admin/member_main.php old mode 100755 new mode 100644 similarity index 88% rename from src/dede/member_main.php rename to src/admin/member_main.php index 0ce0d9ba..8ca55494 --- a/src/dede/member_main.php +++ b/src/admin/member_main.php @@ -1,102 +1,101 @@ -类型\r\n" : "\r\n"; -$sexform = empty($sex) ? "\r\n" : "\r\n"; -$sortkey = empty($sortkey) ? 'mid' : preg_replace("#[^a-z]#i", '', $sortkey); - -$staArr = array(-2 => '限制用户(禁言)', -1 => '未通过审核', 0 => '审核通过,提示填写完整信息', 1 => '没填写详细资料', 2 => '正常使用状态'); -$staArrmatt = array(1 => '被推荐', 0 => '非普通 '); -$MemberTypes = array(); -$dsql->SetQuery("Select `rank`,`membername` From `#@__arcrank` where `rank`>0 "); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $MemberTypes[$row->rank] = $row->membername; -} - -if ($sortkey == 'mid') { - $sortform = "\r\n"; -} else if ($sortkey == 'rank') { - $sortform = "\r\n"; -} else if ($sortkey == 'money') { - $sortform = "\r\n"; -} else if ($sortkey == 'scores') { - $sortform = "\r\n"; -} else { - $sortform = "\r\n"; -} - -$wheres[] = " (userid LIKE '%$keyword%' OR uname LIKE '%$keyword%' OR email LIKE '%$keyword%') "; - -if ($sex != '') { - $wheres[] = " sex LIKE '$sex' "; -} - -if ($mtype != '') { - $wheres[] = " mtype LIKE '$mtype' "; -} - -if ($spacesta != -10) { - $wheres[] = " spacesta = '$spacesta' "; -} - -if ($matt != 10) { - $wheres[] = " matt= '$matt' "; -} - -$whereSql = join(' AND ', $wheres); -if ($whereSql != '') { - $whereSql = ' WHERE '.$whereSql; -} - -$sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC "; -$dlist = new DataListCP(); -$dlist->SetParameter('sex', $sex); -$dlist->SetParameter('spacesta', $spacesta); -$dlist->SetParameter('matt', $matt); -$dlist->SetParameter('mtype', $mtype); -$dlist->SetParameter('sortkey', $sortkey); -$dlist->SetParameter('keyword', $keyword); -$dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); - -function GetMemberName($rank, $mt) -{ - global $MemberTypes; - if (isset($MemberTypes[$rank])) { - if ($mt == 'ut') return " 待升级:".$MemberTypes[$rank].""; - else return $MemberTypes[$rank]; - } else { - if ($mt == 'ut') return ''; - else return $mt; - } -} - -function GetMAtt($m) -{ - if ($m < 1) return ''; - else if ($m == 10) return " [管理员]"; - else return " [荐]"; -} +类型\r\n" : "\r\n"; +$sexform = empty($sex) ? "\r\n" : "\r\n"; +$sortkey = empty($sortkey) ? 'mid' : preg_replace("#[^a-z]#i", '', $sortkey); + +$staArr = array(-2 => '限制用户(禁言)', -1 => '未通过审核', 0 => '审核通过,提示填写完整信息', 1 => '没填写详细资料', 2 => '正常使用状态'); +$staArrmatt = array(1 => '被推荐', 0 => '非普通 '); +$MemberTypes = array(); +$dsql->SetQuery("Select rank,membername From `#@__arcrank` where rank>0 "); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $MemberTypes[$row->rank] = $row->membername; +} + +if ($sortkey == 'mid') { + $sortform = "\r\n"; +} else if ($sortkey == 'rank') { + $sortform = "\r\n"; +} else if ($sortkey == 'money') { + $sortform = "\r\n"; +} else if ($sortkey == 'scores') { + $sortform = "\r\n"; +} else { + $sortform = "\r\n"; +} + +$wheres[] = " (userid LIKE '%$keyword%' OR uname LIKE '%$keyword%' OR email LIKE '%$keyword%') "; + +if ($sex != '') { + $wheres[] = " sex LIKE '$sex' "; +} + +if ($mtype != '') { + $wheres[] = " mtype LIKE '$mtype' "; +} + +if ($spacesta != -10) { + $wheres[] = " spacesta = '$spacesta' "; +} + +if ($matt != 10) { + $wheres[] = " matt= '$matt' "; +} + +$whereSql = join(' AND ', $wheres); +if ($whereSql != '') { + $whereSql = ' WHERE '.$whereSql; +} + +$sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC "; +$dlist = new DataListCP(); +$dlist->SetParameter('sex', $sex); +$dlist->SetParameter('spacesta', $spacesta); +$dlist->SetParameter('matt', $matt); +$dlist->SetParameter('mtype', $mtype); +$dlist->SetParameter('sortkey', $sortkey); +$dlist->SetParameter('keyword', $keyword); +$dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); + +function GetMemberName($rank, $mt) +{ + global $MemberTypes; + if (isset($MemberTypes[$rank])) { + if ($mt == 'ut') return " 待升级:".$MemberTypes[$rank].""; + else return $MemberTypes[$rank]; + } else { + if ($mt == 'ut') return ''; + else return $mt; + } +} + +function GetMAtt($m) +{ + if ($m < 1) return ''; + else if ($m == 10) return " [管理员]"; + else return " [荐]"; +} diff --git a/src/dede/member_operations.php b/src/admin/member_operations.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/member_operations.php rename to src/admin/member_operations.php index 4f6411a6..15773853 --- a/src/dede/member_operations.php +++ b/src/admin/member_operations.php @@ -1,72 +1,71 @@ -pageSize = 25; -$dlist->SetParameter("buyid", $buyid); -if (isset($sta)) $dlist->SetParameter("sta", $sta); - -$dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); -$dlist->dsql->Execute('ts'); -while ($rw = $dlist->dsql->GetArray('ts')) { - $TypeNames[$rw['tid']] = $rw['pname']; -} -$tplfile = DEDEADMIN."/templets/member_operations.htm"; - -//这两句的顺序不能更换 -$dlist->SetTemplate($tplfile); //载入模板 -$dlist->SetSource($sql); //设定查询SQL -$dlist->Display(); //显示 - -function GetMemberID($mid) -{ - global $dsql; - if ($mid == 0) { - return '0'; - } - $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); - if (is_array($row)) { - return "".$row['userid'].""; - } else { - return '0'; - } -} - -function GetPType($tname) -{ - if ($tname == 'card') return '点数卡'; - else if ($tname == 'archive') return '购买文章'; - else if ($tname == 'stc') return '兑换金币'; - else return '会员升级'; -} - -function GetSta($sta) -{ - if ($sta == 0) { - return '未付款'; - } else if ($sta == 1) { - return '已付款'; - } else { - return '已完成'; - } -} +pageSize = 25; +$dlist->SetParameter("buyid", $buyid); +if (isset($sta)) $dlist->SetParameter("sta", $sta); + +$dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); +$dlist->dsql->Execute('ts'); +while ($rw = $dlist->dsql->GetArray('ts')) { + $TypeNames[$rw['tid']] = $rw['pname']; +} +$tplfile = DEDEADMIN."/templets/member_operations.htm"; + +//这两句的顺序不能更换 +$dlist->SetTemplate($tplfile); //载入模板 +$dlist->SetSource($sql); //设定查询SQL +$dlist->Display(); //显示 + +function GetMemberID($mid) +{ + global $dsql; + if ($mid == 0) { + return '0'; + } + $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); + if (is_array($row)) { + return "".$row['userid'].""; + } else { + return '0'; + } +} + +function GetPType($tname) +{ + if ($tname == 'card') return '点数卡'; + else if ($tname == 'archive') return '购买文章'; + else if ($tname == 'stc') return '兑换金币'; + else return '会员升级'; +} + +function GetSta($sta) +{ + if ($sta == 0) { + return '未付款'; + } else if ($sta == 1) { + return '已付款'; + } else { + return '已完成'; + } +} diff --git a/src/dede/member_pm.php b/src/admin/member_pm.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/member_pm.php rename to src/admin/member_pm.php index ae3ebc39..a85e8431 --- a/src/dede/member_pm.php +++ b/src/admin/member_pm.php @@ -1,61 +1,60 @@ -ExecuteNoneQuery("DELETE FROM #@__member_pms WHERE id='$ID'"); - } -} - -$whereSql = ''; -if (!empty($folder)) $whereSql = "WHERE folder='$folder'"; -$postuser = "收件人"; -if ($folder == "inbox" || $folder == '') $postuser = "发件人"; - -if (!empty($keyword)) { - $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$keyword."%')"; -} -if (!empty($username)) { - $whereSql .= " AND floginid like '%".$username."%'"; -} -$sql = "SELECT * FROM #@__member_pms $whereSql ORDER BY sendtime desc"; -$dlist = new DataListCP(); -$dlist->pagesize = 25; -$dlist->SetParameter("folder", $folder); -$dlist->SetParameter("username", $username); -$dlist->SetParameter("keyword", $keyword); -$dlist->SetTemplate(DEDEADMIN."/templets/member_pm.htm"); -$dlist->SetSource($sql); -$dlist->Display(); -$dlist->Close(); - -function GetFolders($me) -{ - if ($me == "outbox") return '发件箱'; - else if ($me == "inbox") return '收件箱'; -} - -function IsReader($me) -{ - $me = preg_replace("#[^0-1]#", "", $me); - if ($me) return ""; - else return "×"; -} +ExecuteNoneQuery("DELETE FROM #@__member_pms WHERE id='$ID'"); + } +} + +$whereSql = ''; +if (!empty($folder)) $whereSql = "WHERE folder='$folder'"; +$postuser = "收件人"; +if ($folder == "inbox" || $folder == '') $postuser = "发件人"; + +if (!empty($keyword)) { + $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$keyword."%')"; +} +if (!empty($username)) { + $whereSql .= " AND floginid like '%".$username."%'"; +} +$sql = "SELECT * FROM #@__member_pms $whereSql ORDER BY sendtime desc"; +$dlist = new DataListCP(); +$dlist->pagesize = 25; +$dlist->SetParameter("folder", $folder); +$dlist->SetParameter("username", $username); +$dlist->SetParameter("keyword", $keyword); +$dlist->SetTemplate(DEDEADMIN."/templets/member_pm.htm"); +$dlist->SetSource($sql); +$dlist->Display(); +$dlist->Close(); + +function GetFolders($me) +{ + if ($me == "outbox") return '发件箱'; + else if ($me == "inbox") return '收件箱'; +} + +function IsReader($me) +{ + $me = preg_replace("#[^0-1]#", "", $me); + if ($me) return ""; + else return "×"; +} diff --git a/src/dede/member_pmall.php b/src/admin/member_pmall.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/member_pmall.php rename to src/admin/member_pmall.php index 1dae18f4..058a22a4 --- a/src/dede/member_pmall.php +++ b/src/admin/member_pmall.php @@ -1,37 +1,36 @@ -ExecuteNoneQuery("INSERT INTO `#@__member_pms`(floginid,fromid,toid,tologinid,folder,hasview,subject,sendtime,writetime,message,isadmin) VALUES('$floginid','$fromid','$toid','$tologinid','outbox','0','$subject','$sendtime','$writetime','$message','1');"); - ShowMsg('短信已成功发送', '-1'); - exit(); -} -require_once(DEDEADMIN."/templets/member_pmall.htm"); +ExecuteNoneQuery("INSERT INTO `#@__member_pms`(floginid,fromid,toid,tologinid,folder,hasview,subject,sendtime,writetime,message,isadmin) VALUES('$floginid','$fromid','$toid','$tologinid','outbox','0','$subject','$sendtime','$writetime','$message','1');"); + ShowMsg('短信已成功发送', '-1'); + exit(); +} +require_once(DEDEADMIN."/templets/member_pmall.htm"); diff --git a/src/dede/member_pmone.php b/src/admin/member_pmone.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/member_pmone.php rename to src/admin/member_pmone.php index d164d94c..f0ba11de --- a/src/dede/member_pmone.php +++ b/src/admin/member_pmone.php @@ -1,81 +1,80 @@ - 0x80) { - if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { - $i++; - } else { - return $msgtitle.'可能含有乱码,建议您改用英文字母和数字组合'; - } - } else { - if (preg_match("#[^0-9a-z@\.-]i#", $ck_uid[$i])) { - return $msgtitle.'不能含有 [@]、[.]、[-]以外的特殊符号'; - } - } - } - if ($ckhas) { - $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE userid LIKE '$uid' "); - if (is_array($row)) return $msgtitle."已经存在"; - } - return 'ok'; -} - -if (!isset($action)) $action = ''; -if ($action == "post") { - $floginid = $cuserLogin->getUserName(); - $fromid = $cuserLogin->getUserID(); - if ($subject == '') { - ShowMsg("请填写信息标题!", "-1"); - exit(); - } - $msg = CheckUserID($msgtoid, "用户名", false); - if ($msg != 'ok') { - ShowMsg($msg, "-1"); - exit(); - } - $row = $dsql->GetOne("Select * From `#@__member` where userid like '$msgtoid' "); - if (!is_array($row)) { - ShowMsg("您指定的用户不存在,不能发送信息!", "-1"); - exit(); - } - $subject = cn_substrR(HtmlReplace($subject, 1), 60); - $message = cn_substrR(HtmlReplace($message, 0), 1024); - $sendtime = $writetime = time(); - - //发给收件人(收件人可管理) - $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) - VALUES ('$floginid','$fromid','{$row['mid']}','{$row['userid']}','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; - - $dsql->ExecuteNoneQuery($inquery); - ShowMsg('短信已成功发送', 'member_pmone.php'); - exit(); -} -require_once(DEDEADMIN."/templets/member_pmone.htm"); + 0x80) { + if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { + $i++; + } else { + return $msgtitle.'可能含有乱码,建议您改用英文字母和数字组合'; + } + } else { + if (preg_match("#[^0-9a-z@\.-]i#", $ck_uid[$i])) { + return $msgtitle.'不能含有 [@]、[.]、[-]以外的特殊符号'; + } + } + } + if ($ckhas) { + $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE userid LIKE '$uid' "); + if (is_array($row)) return $msgtitle."已经存在"; + } + return 'ok'; +} + +if (!isset($action)) $action = ''; +if ($action == "post") { + $floginid = $cuserLogin->getUserName(); + $fromid = $cuserLogin->getUserID(); + if ($subject == '') { + ShowMsg("请填写信息标题!", "-1"); + exit(); + } + $msg = CheckUserID($msgtoid, "用户名", false); + if ($msg != 'ok') { + ShowMsg($msg, "-1"); + exit(); + } + $row = $dsql->GetOne("Select * From `#@__member` where userid like '$msgtoid' "); + if (!is_array($row)) { + ShowMsg("您指定的用户不存在,不能发送信息!", "-1"); + exit(); + } + $subject = cn_substrR(HtmlReplace($subject, 1), 60); + $message = cn_substrR(HtmlReplace($message, 0), 1024); + $sendtime = $writetime = time(); + + //发给收件人(收件人可管理) + $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) + VALUES ('$floginid','$fromid','{$row['mid']}','{$row['userid']}','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; + + $dsql->ExecuteNoneQuery($inquery); + ShowMsg('短信已成功发送', 'member_pmone.php'); + exit(); +} +require_once(DEDEADMIN."/templets/member_pmone.htm"); diff --git a/src/dede/member_rank.php b/src/admin/member_rank.php old mode 100755 new mode 100644 similarity index 86% rename from src/dede/member_rank.php rename to src/admin/member_rank.php index 5f40913b..1c793c0b --- a/src/dede/member_rank.php +++ b/src/admin/member_rank.php @@ -1,52 +1,51 @@ - 0) { - $query = "UPDATE `#@__arcrank` SET membername='$name',money='$money',`rank`='$rank',scores='$scores' WHERE id='$id' "; - } - } else { - $query = "DELETE FROM `#@__arcrank` WHERE id='$id' AND `rank`<>10"; - } - if ($query != '') $dsql->ExecuteNoneQuery($query); - } - if (isset($check_new)) { - if ($rank_new > 0 && $name_new != '' && $rank_new > 10) { - $inquery = "INSERT INTO `#@__arcrank`(`rank`,`membername`,`adminrank`,`money`,`scores`,`purviews`) VALUES('$rank_new','$name_new','5','$money_new','$scores',''); "; - $dsql->ExecuteNoneQuery($inquery); - } - } - echo ""; -} -if ($dopost == 'del') { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arcrank` WHERE id='$id' AND `rank`<>10"); - ShowMsg("删除成功", "member_rank.php"); - exit(); -} - -$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>0 ORDER BY `rank`"); -$dsql->Execute(); -include DedeInclude('templets/member_rank.htm'); + 0) { + $query = "UPDATE `#@__arcrank` SET membername='$name',money='$money',rank='$rank',scores='$scores' WHERE id='$id' "; + } + } else { + $query = "DELETE FROM `#@__arcrank` WHERE id='$id' AND rank<>10"; + } + if ($query != '') $dsql->ExecuteNoneQuery($query); + } + if (isset($check_new)) { + if ($rank_new > 0 && $name_new != '' && $rank_new > 10) { + $inquery = "INSERT INTO `#@__arcrank`(`rank`,`membername`,`adminrank`,`money`,`scores`,`purviews`) VALUES('$rank_new','$name_new','5','$money_new','$scores',''); "; + $dsql->ExecuteNoneQuery($inquery); + } + } + echo ""; +} +if ($dopost == 'del') { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arcrank` WHERE id='$id' AND rank<>10"); + ShowMsg("删除成功", "member_rank.php"); + exit(); +} + +$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE rank>0 ORDER BY rank"); +$dsql->Execute(); +include DedeInclude('templets/member_rank.htm'); diff --git a/src/dede/member_scores.php b/src/admin/member_scores.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/member_scores.php rename to src/admin/member_scores.php index 2b3d24e8..9a74e793 --- a/src/dede/member_scores.php +++ b/src/admin/member_scores.php @@ -1,46 +1,45 @@ -ExecuteNoneQuery("INSERT INTO `#@__scores`(integral,icon,titles,isdefault) VALUES('$integral','$add_icon','$add_titles','$add_isdefault')"); - } - foreach ($_POST as $rk => $rv) { - if (preg_match("#-#", $rk)) { - $ID = preg_replace("#[^0-9]#", "", $rk); - $fildes = preg_replace("#[^a-z]#", "", $rk); - $k = $$rk; - if (empty($k)) { - $k = 0; - } - $sql = $fildes."='".$k."'"; - $dsql->ExecuteNoneQuery("UPDATE `#@__scores` SET ".$sql." WHERE id='{$ID}'"); - if (preg_match("#Ids-#", $rk)) { - if ($k) $dsql->ExecuteNoneQuery("DELETE FROM `#@__scores` WHERE id='$ID'"); - } - } - } -} - -$Scores = array(); -$dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC"); -$dsql->Execute(); -while ($rs = $dsql->GetArray()) { - array_push($Scores, $rs); -} -include DedeInclude('templets/member_scores.htm'); +ExecuteNoneQuery("INSERT INTO `#@__scores`(integral,icon,titles,isdefault) VALUES('$integral','$add_icon','$add_titles','$add_isdefault')"); + } + foreach ($_POST as $rk => $rv) { + if (preg_match("#-#", $rk)) { + $ID = preg_replace("#[^0-9]#", "", $rk); + $fildes = preg_replace("#[^a-z]#", "", $rk); + $k = $$rk; + if (empty($k)) { + $k = 0; + } + $sql = $fildes."='".$k."'"; + $dsql->ExecuteNoneQuery("UPDATE `#@__scores` SET ".$sql." WHERE id='{$ID}'"); + if (preg_match("#Ids-#", $rk)) { + if ($k) $dsql->ExecuteNoneQuery("DELETE FROM `#@__scores` WHERE id='$ID'"); + } + } + } +} + +$Scores = array(); +$dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC"); +$dsql->Execute(); +while ($rs = $dsql->GetArray()) { + array_push($Scores, $rs); +} +include DedeInclude('templets/member_scores.htm'); diff --git a/src/dede/member_toadmin.php b/src/admin/member_toadmin.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/member_toadmin.php rename to src/admin/member_toadmin.php index 686f359e..4ebb4415 --- a/src/dede/member_toadmin.php +++ b/src/admin/member_toadmin.php @@ -1,95 +1,94 @@ -GetOne("SELECT * FROM #@__member WHERE mid='$id'"); - $password = $row['pwd']; - $inputpwd = ",pwd"; - $pwd = substr($password, 5, 20); - $inputpwdv = ",'".$pwd."'"; - $pwdm = ",pwd='".$password."'"; - } - $typeids = (empty($typeids)) ? "" : $typeids; - if ($typeids == '') { - ShowMsg("请为该管理员指定管理栏目", "member_toadmin.php?id={$id}"); - exit(); - } - $typeid = join(',', $typeids); - if ($typeid == '0') $typeid = ''; - if ($id != 1) { - $query = "INSERT INTO `#@__admin`(id,usertype,userid$inputpwd,uname,typeid,tname,email) - VALUES('$id','$usertype','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; - } else { - $query = "INSERT INTO `#@__admin`(id,userid$inputpwd,uname,typeid,tname,email) - VALUES('$id','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; - } - $dsql->ExecuteNoneQuery($query); - $query = "UPDATE `#@__member` SET rank='100',uname='$uname',matt='10',email='$email'$pwdm WHERE mid='$id'"; - $dsql->ExecuteNoneQuery($query); - $row = $dsql->GetOne("SELECT * FROM #@__admintype WHERE rank='$usertype'"); - $floginid = $cuserLogin->getUserName(); - $fromid = $cuserLogin->getUserID(); - $subject = "恭喜您已经成功提升为管理员"; - $message = "亲爱的会员{$userid},您已经成功提升为{$row['typename']},具体操作权限请同网站超级管理员联系。"; - $sendtime = $writetime = time(); - $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) - VALUES ('$floginid','$fromid','$id','$userid','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功升级一个帐户", "member_main.php"); - exit(); -} -$id = preg_replace("#[^0-9]#", "", $id); - -//显示用户信息 -$randcode = mt_rand(10000, 99999); -$safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); -$typeOptions = ''; -$typeid = (empty($typeid)) ? '' : $typeid; -$typeids = explode(',', $typeid); -$dsql->SetQuery("SELECT id,typename FROM `#@__arctype` WHERE reid=0 AND (ispart=0 OR ispart=1)"); -$dsql->Execute('op'); -while ($nrow = $dsql->GetObject('op')) { - $typeOptions .= "\r\n"; - $dsql->SetQuery("SELECT id,typename FROM #@__arctype WHERE reid={$nrow->id} AND (ispart=0 OR ispart=1)"); - $dsql->Execute('s'); - while ($nrow = $dsql->GetObject('s')) { - $typeOptions .= "\r\n"; - } -} -$row = $dsql->GetOne("SELECT * FROM #@__member WHERE mid='$id'"); -include DedeInclude('templets/member_toadmin.htm'); +GetOne("SELECT * FROM #@__member WHERE mid='$id'"); + $password = $row['pwd']; + $inputpwd = ",pwd"; + $pwd = substr($password, 5, 20); + $inputpwdv = ",'".$pwd."'"; + $pwdm = ",pwd='".$password."'"; + } + $typeids = (empty($typeids)) ? "" : $typeids; + if ($typeids == '') { + ShowMsg("请为该管理员指定管理栏目", "member_toadmin.php?id={$id}"); + exit(); + } + $typeid = join(',', $typeids); + if ($typeid == '0') $typeid = ''; + if ($id != 1) { + $query = "INSERT INTO `#@__admin`(id,usertype,userid$inputpwd,uname,typeid,tname,email) + VALUES('$id','$usertype','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; + } else { + $query = "INSERT INTO `#@__admin`(id,userid$inputpwd,uname,typeid,tname,email) + VALUES('$id','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; + } + $dsql->ExecuteNoneQuery($query); + $query = "UPDATE `#@__member` SET rank='100',uname='$uname',matt='10',email='$email'$pwdm WHERE mid='$id'"; + $dsql->ExecuteNoneQuery($query); + $row = $dsql->GetOne("SELECT * FROM #@__admintype WHERE rank='$usertype'"); + $floginid = $cuserLogin->getUserName(); + $fromid = $cuserLogin->getUserID(); + $subject = "恭喜您已经成功提升为管理员"; + $message = "亲爱的会员{$userid},您已经成功提升为{$row['typename']},具体操作权限请同网站超级管理员联系。"; + $sendtime = $writetime = time(); + $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) + VALUES ('$floginid','$fromid','$id','$userid','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功升级一个帐户", "member_main.php"); + exit(); +} +$id = preg_replace("#[^0-9]#", "", $id); + +//显示用户信息 +$randcode = mt_rand(10000, 99999); +$safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); +$typeOptions = ''; +$typeid = (empty($typeid)) ? '' : $typeid; +$typeids = explode(',', $typeid); +$dsql->SetQuery("SELECT id,typename FROM `#@__arctype` WHERE reid=0 AND (ispart=0 OR ispart=1)"); +$dsql->Execute('op'); +while ($nrow = $dsql->GetObject('op')) { + $typeOptions .= "\r\n"; + $dsql->SetQuery("SELECT id,typename FROM #@__arctype WHERE reid={$nrow->id} AND (ispart=0 OR ispart=1)"); + $dsql->Execute('s'); + while ($nrow = $dsql->GetObject('s')) { + $typeOptions .= "\r\n"; + } +} +$row = $dsql->GetOne("SELECT * FROM #@__member WHERE mid='$id'"); +include DedeInclude('templets/member_toadmin.htm'); diff --git a/src/dede/member_type.php b/src/admin/member_type.php old mode 100755 new mode 100644 similarity index 74% rename from src/dede/member_type.php rename to src/admin/member_type.php index ff0f6d98..f028585e --- a/src/dede/member_type.php +++ b/src/admin/member_type.php @@ -1,62 +1,61 @@ -ExecuteNoneQuery($query); - } - } - - //增加新记录 - if (isset($check_new) && $pname_new != '') { - $query = "INSERT INTO `#@__member_type`(`rank`,`pname`,`money`,`exptime`) VALUES('{$rank_new}','{$pname_new}','{$money_new}','{$exptime_new}');"; - $dsql->ExecuteNoneQuery($query); - } - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - echo ""; -} -$arcranks = array(); -$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>10 "); -$dsql->Execute(); -while ($row = $dsql->GetArray()) { - $arcranks[$row['rank']] = $row['membername']; -} - -$times = array(); -$times[7] = '一周'; -$times[30] = '一个月'; -$times[90] = '三个月'; -$times[183] = '半年'; -$times[366] = '一年'; -$times[32767] = '终身'; - -require_once(DEDEADMIN."/templets/member_type.htm"); +ExecuteNoneQuery($query); + } + } + + //增加新记录 + if (isset($check_new) && $pname_new != '') { + $query = "INSERT INTO #@__member_type(rank,pname,money,exptime) VALUES('{$rank_new}','{$pname_new}','{$money_new}','{$exptime_new}');"; + $dsql->ExecuteNoneQuery($query); + } + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + echo ""; +} +$arcranks = array(); +$dsql->SetQuery("SELECT * FROM #@__arcrank WHERE rank>10 "); +$dsql->Execute(); +while ($row = $dsql->GetArray()) { + $arcranks[$row['rank']] = $row['membername']; +} + +$times = array(); +$times[7] = '一周'; +$times[30] = '一个月'; +$times[90] = '三个月'; +$times[183] = '半年'; +$times[366] = '一年'; +$times[32767] = '终身'; + +require_once(DEDEADMIN."/templets/member_type.htm"); diff --git a/src/dede/member_view.php b/src/admin/member_view.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/member_view.php rename to src/admin/member_view.php index 8801a321..1917ea0c --- a/src/dede/member_view.php +++ b/src/admin/member_view.php @@ -1,35 +1,34 @@ -GetOne("select * from `#@__member` where mid='$id'"); - -$staArr = array( - -10 => '等待验证邮件', - -2 => '限制用户(禁言)', - -1 => '未通过审核', - 0 => '审核通过,提示填写完整信息', - 1 => '没填写详细资料', - 2 => '正常使用状态' -); - -//如果这个用户是管理员帐号,必须有足够权限的用户才能操作 -if ($row['matt'] == 10) CheckPurview('sys_User'); - -if ($row['uptime'] > 0 && $row['exptime'] > 0) { - $mhasDay = $row['exptime'] - ceil((time() - $row['uptime']) / 3600 / 24) + 1; -} else { - $mhasDay = 0; -} -include DedeInclude('templets/member_view.htm'); +GetOne("select * from #@__member where mid='$id'"); + +$staArr = array( + -10 => '等待验证邮件', + -2 => '限制用户(禁言)', + -1 => '未通过审核', + 0 => '审核通过,提示填写完整信息', + 1 => '没填写详细资料', + 2 => '正常使用状态' +); + +//如果这个用户是管理员帐号,必须有足够权限的用户才能操作 +if ($row['matt'] == 10) CheckPurview('sys_User'); + +if ($row['uptime'] > 0 && $row['exptime'] > 0) { + $mhasDay = $row['exptime'] - ceil((time() - $row['uptime']) / 3600 / 24) + 1; +} else { + $mhasDay = 0; +} +include DedeInclude('templets/member_view.htm'); diff --git a/src/dede/module_main.php b/src/admin/module_main.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/module_main.php rename to src/admin/module_main.php index e4ed2322..cdc91a53 --- a/src/dede/module_main.php +++ b/src/admin/module_main.php @@ -1,552 +1,552 @@ -SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - if ($row['type'] == 'number') fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n"); - else fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n"); - } - fwrite($fp, "?".">"); - fclose($fp); -} -/*-------------- -function ShowAll(); ---------------*/ -if ($action == '') { - $types = array('soft' => '模块', 'templets' => '模板', 'plus' => '小插件', 'patch' => '补丁'); - $dm = new DedeModule($mdir); - if (empty($moduletype)) $moduletype = ''; - $modules_remote = $dm->GetModuleUrlList($moduletype, $mdurl); - $modules = array(); - $modules = $dm->GetModuleList($moduletype); - is_array($modules) || $modules = array(); - if (is_array($modules_remote) && count($modules_remote) > 0) { - $modules = array_merge($modules, $modules_remote); - } - require_once(dirname(__FILE__)."/templets/module_main.htm"); - $dm->Clear(); - exit(); -} -/*-------------- -function ViewDevelopoer(); ---------------*/ -else if ($action == 'view_developoer') { - //检验开发者信息 - $dm = new DedeModule($mdir); - $info = $dm->GetModuleInfo($hash); - if ($info == null) { - ShowMsg("获取模块信息错误,模块文件可能被篡改", -1); - exit; - } - $dev_id = $info['dev_id']; - $devURL = DEDECDNURL."/developers/$dev_id.json"; - $dhd = new DedeHttpDown(); - $dhd->OpenUrl($devURL); - $devContent = $dhd->GetHtml(); - $devInfo = (array)json_decode($devContent); - $offUrl = ""; - if ($devInfo['dev_type'] == 1) { - $offUrl = "

官方网址:{$devInfo['offurl']} (复制在浏览器中打开)

"; - } - $authAt = date("Y-m-d", $devInfo['auth_at']); - - if (!isset($info['dev_id'])) { - $devInfo['realname'] = $devInfo['dev_name'] = $info['team']." 未认证"; - $authAt = "0000-00-00"; - } - ShowMsg("

开发者名称:{$devInfo['dev_name']}

开发者全称:{$devInfo['realname']}

开发者ID:{$devInfo['dev_id']} 未认证

$offUrl

认证于:{$authAt}

", "javascript:;"); - exit; -} -/*-------------- -function Setup(); ---------------*/ -else if ($action == 'setup') { - $dm = new DedeModule($mdir); - $infos = $dm->GetModuleInfo($hash); - if ($infos == null) { - ShowMsg("获取模块信息错误,模块文件可能被篡改", -1); - exit; - } - $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); - $filelists = $dm->GetFileLists($hash); - $filelist = ''; - $prvdirs = array(); - $incdir = array(); - foreach ($filelists as $v) { - if (empty($v['name'])) continue; - if ($v['type'] == 'dir') { - $v['type'] = '目录'; - $incdir[] = $v['name']; - } else { - $v['type'] = '文件'; - } - $filelist .= "{$v['type']}|{$v['name']}\r\n"; - } - //检测需要的目录权限 - foreach ($filelists as $v) { - $prvdir = preg_replace("#\/([^\/]*)$#", '/', $v['name']); - if (!preg_match("#^\.#", $prvdir)) $prvdir = './'; - $n = TRUE; - foreach ($incdir as $k => $v) { - if (preg_match("#^".$v."#i", $prvdir)) { - $n = FALSE; - break; - } - } - if (!isset($prvdirs[$prvdir]) && $n && is_dir($prvdir)) { - $prvdirs[$prvdir][0] = 1; - $prvdirs[$prvdir][1] = TestWriteAble($prvdir); - } - } - $prvdir = "\r\n"; - $prvdir .= "\r\n"; - foreach ($prvdirs as $k => $v) { - if ($v) $cw = '√'; - else $cw = '×'; - $prvdir .= ""; - $prvdir .= "\r\n"; - } - $prvdir .= "
目录可写
$k$cw
"; - $win = new OxWindow(); - $win->Init("module_main.php", "js/blank.js", "post"); - $wecome_info = "模块管理"; - $win->AddTitle(" 模块管理 >> 安装模块: {$infos['name']}"); - $win->AddHidden("hash", $hash); - $win->AddHidden("action", 'setupstart'); - $msg = " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$infos['dev_id']} 未认证
发布时间:{$infos['time']}
使用协议:浏览
-
注意事项:安装时请确保文件列表中涉及的目录前可写入权限,此外“后台管理目录”、“后台管理目录/templets”目录也必须暂时设置可写入权限。
-
目录权限检测:
../ 为根目录
./ 表示当前目录
$prvdir
模块包含的所有文件列表:
- -
对于已存在文件处理方法: - - - -
"; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("ok", ""); - $win->Display(); - $dm->Clear(); - exit(); -} -/*--------------- -function SetupRun() ---------------*/ -else if ($action == 'setupstart') { - if (!is_writeable($mdir)) { - ShowMsg("目录 {$mdir} 不支持写入,这将导致安装程序没法正常创建", "-1"); - exit(); - } - $dm = new DedeModule($mdir); - $minfos = $dm->GetModuleInfo($hash); - extract($minfos, EXTR_SKIP); - $menustring = addslashes($dm->GetSystemFile($hash, 'menustring')); - $indexurl = str_replace('**', '=', $indexurl); - $query = "INSERT INTO `#@__sys_module`(`hashcode` , `modname` , `indexname` , `indexurl` , `ismember` , `menustring` ) - VALUES ('$hash' , '$name' , '$indexname' , '$indexurl' , '$ismember' , '$menustring' ) "; - $rs = $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); - $rs = $dsql->ExecuteNoneQuery($query); - if (!$rs) { - ShowMsg('保存数据库信息失败,无法完成安装'.$dsql->GetError(), 'javascript:;'); - exit(); - } - $dm->WriteFiles($hash, $isreplace); - $filename = ''; - if (!isset($autosetup) || $autosetup == 0) $filename = $dm->WriteSystemFile($hash, 'setup'); - if (!isset($autodel) || $autodel == 0) $dm->WriteSystemFile($hash, 'uninstall'); - $dm->WriteSystemFile($hash, 'readme'); - $dm->Clear(); - //用模块的安装程序安装 - if (!isset($autosetup) || $autosetup == 0) { - include(DEDEDATA.'/module/'.$filename); - exit(); - } - //系统自动安装 - else { - $mysql_version = $dsql->GetVersion(TRUE); - //默认使用MySQL 4.1 以下版本的SQL语句,对大于4.1版本采用替换处理 TYPE=MyISAM ==> ENGINE=MyISAM DEFAULT CHARSET=#~lang~# - $setupsql = $dm->GetSystemFile($hash, 'setupsql40'); - $setupsql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $setupsql); - $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; - if ($mysql_version >= 4.1) { - $setupsql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $setupsql); - } - //_ROOTURL_ - if ($cfg_cmspath == '/') $cfg_cmspath = ''; - $rooturl = $cfg_basehost.$cfg_cmspath; - $setupsql = preg_replace("#_ROOTURL_#i", $rooturl, $setupsql); - $setupsql = preg_replace("#[\r\n]{1,}#", "\n", $setupsql); - $sqls = @split(";[ \t]{0,}\n", $setupsql); - foreach ($sqls as $sql) { - if (trim($sql) != '') $dsql->ExecuteNoneQuery($sql); - } - ReWriteConfigAuto(); - $rflwft = ""; - echo $rflwft; - UpDateCatCache(); - ShowMsg('模块安装完成...', 'module_main.php'); - exit(); - } -} -/*-------------- -function DelModule(); ---------------*/ -else if ($action == 'del') { - $dm = new DedeModule($mdir); - $infos = $dm->GetModuleInfo($hash); - $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); - $dev_id = empty($infos['dev_id'])? "未认证" : "{$infos['dev_id']} 未认证"; - $win = new OxWindow(); - $win->Init("module_main.php", "js/blank.js", "post"); - $wecome_info = "模块管理"; - $win->AddTitle("模块管理 >> 删除模块: {$infos['name']}"); - $win->AddHidden('hash', $hash); - $win->AddHidden('action', 'delok'); - $msg = " - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$dev_id}
发布时间:{$infos['time']}
使用协议:浏览
删除模块仅删除这个模块的安装包文件,如果您已经安装,请执行卸载程序来删除
"; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("ok", ""); - $win->Display(); - $dm->Clear(); - exit(); -} else if ($action == 'delok') { - $dm = new DedeModule($mdir); - $modfile = $mdir."/".$dm->GetHashFile($hash); - unlink($modfile) or die("删除文件 {$modfile} 失败"); - ShowMsg("成功删除一个模块文件", "module_main.php"); - exit(); -} -/*-------------- -function UnInstall(); ---------------*/ -else if ($action == 'uninstall') { - $dm = new DedeModule($mdir); - $infos = $dm->GetModuleInfo($hash); - if ($infos['url'] == '') $infos['url'] = ' '; - $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); - $filelists = $dm->GetFileLists($hash); - $filelist = ''; - foreach ($filelists as $v) { - if (empty($v['name'])) continue; - if ($v['type'] == 'dir') $v['type'] = '目录'; - else $v['type'] = '文件'; - $filelist .= "{$v['type']}|{$v['name']}\r\n"; - } - $dev_id = empty($infos['dev_id'])? "未认证" : "{$infos['dev_id']} 未认证"; - $win = new OxWindow(); - $win->Init("module_main.php", "js/blank.js", "post"); - $wecome_info = "模块管理"; - $win->AddTitle("模块管理 >> 卸载模块: {$infos['name']}"); - $win->AddHidden("hash", $hash); - $win->AddHidden("action", 'uninstallok'); - $msg = " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$dev_id}
发布时间:{$infos['time']}
使用协议:浏览
模块包含的文件:
(文件路径相对于当前目录)
 
- -
对于模块的文件处理方法: - - -
"; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("ok", ""); - $win->Display(); - $dm->Clear(); - exit(); -} -/*-------------- -function UnInstallRun(); ---------------*/ -else if ($action == 'uninstallok') { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); - $dm = new DedeModule($mdir); - $minfos = $dm->GetModuleInfo($hash); - extract($minfos, EXTR_SKIP); - if (!isset($moduletype) || $moduletype != 'patch') { - $dm->DeleteFiles($hash, $isreplace); - } - @$dm->DelSystemFile($hash, 'readme'); - @$dm->DelSystemFile($hash, 'setup'); - $dm->Clear(); - if (!isset($autodel) || $autodel == 0) { - include(DEDEDATA."/module/{$hash}-uninstall.php"); - @unlink(DEDEDATA."/module/{$hash}-uninstall.php"); - exit(); - } else { - @$dm->DelSystemFile($hash, 'uninstall'); - $delsql = $dm->GetSystemFile($hash, 'delsql'); - if (trim($delsql) != '') { - $sqls = explode(';', $delsql); - foreach ($sqls as $sql) { - if (trim($sql) != '') $dsql->ExecuteNoneQuery($sql); - } - } - ReWriteConfigAuto(); - $rflwft = ""; - echo $rflwft; - ShowMsg('模块卸载完成...', 'module_main.php'); - exit(); - } -} -/*-------------- -function ShowReadme(); ---------------*/ -else if ($action == 'showreadme') { - $dm = new DedeModule($mdir); - $msg = $dm->GetSystemFile($hash, 'readme'); - $msg = preg_replace("/(.*)(.*)/isU", "", $msg); - $dm->Clear(); - $win = new OxWindow(); - $win->Init("module_main.php", "js/blank.js", "post"); - $wecome_info = "模块管理"; - $win->AddTitle("模块管理 >> 使用说明:"); - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("hand"); - $win->Display(); - exit(); -} -/*-------------- -function ViewOne(); ---------------*/ -else if ($action == 'view') { - $dm = new DedeModule($mdir); - $infos = $dm->GetModuleInfo($hash); - if ($infos['url'] == '') $infos['url'] = ' '; - $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); - $filelists = $dm->GetFileLists($hash); - $filelist = ''; - $setupinfo = ''; - foreach ($filelists as $v) { - if (empty($v['name'])) continue; - if ($v['type'] == 'dir') $v['type'] = '目录'; - else $v['type'] = '文件'; - $filelist .= "{$v['type']}|{$v['name']}\r\n"; - } - if (file_exists(DEDEDATA."/module/{$hash}-readme.php")) { - $setupinfo = "已安装 卸载"; - } else { - $setupinfo = "未安装 安装"; - } - $dev_id = empty($infos['dev_id'])? "安装 未认证" : "{$infos['dev_id']} 未认证"; - $win = new OxWindow(); - $win->Init("", "js/blank.js", ""); - $wecome_info = "模块管理"; - $win->AddTitle("模块管理 >> 模块详情: {$infos['name']}"); - $msg = " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$dev_id}
发布时间:{$infos['time']}
使用协议:浏览
模块包含的文件:
(文件路径相对于当前目录)
 
- -
"; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow('hand', ''); - $win->Display(); - $dm->Clear(); - exit(); -} -/*-------------- -function Edit(); ---------------*/ -else if ($action == 'edit') { - $dm = new DedeModule($mdir); - $minfos = $dm->GetModuleInfo($hash); - extract($minfos, EXTR_SKIP); - if (!isset($lang)) $lang = 'gb2312'; - if (!isset($moduletype)) $moduletype = 'soft'; - $menustring = $dm->GetSystemFile($hash, 'menustring'); - $setupsql40 = dede_htmlspecialchars($dm->GetSystemFile($hash, 'setupsql40')); - $readmetxt = $dm->GetSystemFile($hash, 'readme'); - $delsql = $dm->GetSystemFile($hash, 'delsql'); - $filelist = $dm->GetSystemFile($hash, 'oldfilelist', false); - $indexurl = str_replace('**', '=', $indexurl); - $dm->Clear(); - require_once(dirname(__FILE__).'/templets/module_edit.htm'); - exit(); -} -/*-------------- -function Download(); ---------------*/ -else if ($action == 'download') { - ShowMsg("暂不支持模块下载功能", "javascript:;"); +SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + if ($row['type'] == 'number') fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n"); + else fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n"); + } + fwrite($fp, "?".">"); + fclose($fp); +} +/*-------------- +function ShowAll(); +--------------*/ +if ($action == '') { + $types = array('soft' => '模块', 'templets' => '模板', 'plus' => '小插件', 'patch' => '补丁'); + $dm = new DedeModule($mdir); + if (empty($moduletype)) $moduletype = ''; + $modules_remote = $dm->GetModuleUrlList($moduletype, $mdurl); + $modules = array(); + $modules = $dm->GetModuleList($moduletype); + is_array($modules) || $modules = array(); + if (is_array($modules_remote) && count($modules_remote) > 0) { + $modules = array_merge($modules, $modules_remote); + } + require_once(dirname(__FILE__)."/templets/module_main.htm"); + $dm->Clear(); + exit(); +} +/*-------------- +function ViewDevelopoer(); +--------------*/ +else if ($action == 'view_developoer') { + //检验开发者信息 + $dm = new DedeModule($mdir); + $info = $dm->GetModuleInfo($hash); + if ($info == null) { + ShowMsg("获取模块信息错误,模块文件可能被篡改", -1); + exit; + } + $dev_id = $info['dev_id']; + $devURL = DEDECDNURL."/developers/$dev_id.json"; + $dhd = new DedeHttpDown(); + $dhd->OpenUrl($devURL); + $devContent = $dhd->GetHtml(); + $devInfo = (array)json_decode($devContent); + $offUrl = ""; + if ($devInfo['dev_type'] == 1) { + $offUrl = "

官方网址:{$devInfo['offurl']} (复制在浏览器中打开)

"; + } + $authAt = date("Y-m-d", $devInfo['auth_at']); + + if (!isset($info['dev_id'])) { + $devInfo['realname'] = $devInfo['dev_name'] = $info['team']." 未认证"; + $authAt = "0000-00-00"; + } + ShowMsg("

开发者名称:{$devInfo['dev_name']}

开发者全称:{$devInfo['realname']}

开发者ID:{$devInfo['dev_id']} 未认证

$offUrl

认证于:{$authAt}

", "javascript:;"); + exit; +} +/*-------------- +function Setup(); +--------------*/ +else if ($action == 'setup') { + $dm = new DedeModule($mdir); + $infos = $dm->GetModuleInfo($hash); + if ($infos == null) { + ShowMsg("获取模块信息错误,模块文件可能被篡改", -1); + exit; + } + $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); + $filelists = $dm->GetFileLists($hash); + $filelist = ''; + $prvdirs = array(); + $incdir = array(); + foreach ($filelists as $v) { + if (empty($v['name'])) continue; + if ($v['type'] == 'dir') { + $v['type'] = '目录'; + $incdir[] = $v['name']; + } else { + $v['type'] = '文件'; + } + $filelist .= "{$v['type']}|{$v['name']}\r\n"; + } + //检测需要的目录权限 + foreach ($filelists as $v) { + $prvdir = preg_replace("#\/([^\/]*)$#", '/', $v['name']); + if (!preg_match("#^\.#", $prvdir)) $prvdir = './'; + $n = TRUE; + foreach ($incdir as $k => $v) { + if (preg_match("#^".$v."#i", $prvdir)) { + $n = FALSE; + break; + } + } + if (!isset($prvdirs[$prvdir]) && $n && is_dir($prvdir)) { + $prvdirs[$prvdir][0] = 1; + $prvdirs[$prvdir][1] = TestWriteAble($prvdir); + } + } + $prvdir = "\r\n"; + $prvdir .= "\r\n"; + foreach ($prvdirs as $k => $v) { + if ($v) $cw = '√'; + else $cw = '×'; + $prvdir .= ""; + $prvdir .= "\r\n"; + } + $prvdir .= "
目录可写
$k$cw
"; + $win = new OxWindow(); + $win->Init("module_main.php", "js/blank.js", "post"); + $wecome_info = "模块管理"; + $win->AddTitle(" 模块管理 >> 安装模块: {$infos['name']}"); + $win->AddHidden("hash", $hash); + $win->AddHidden("action", 'setupstart'); + $msg = " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$infos['dev_id']} 未认证
发布时间:{$infos['time']}
使用协议:浏览
+
注意事项:安装时请确保文件列表中涉及的目录前可写入权限,此外“后台管理目录”、“后台管理目录/templets”目录也必须暂时设置可写入权限。
+
目录权限检测:
../ 为根目录
./ 表示当前目录
$prvdir
模块包含的所有文件列表:
+ +
对于已存在文件处理方法: + + + +
"; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("ok", ""); + $win->Display(); + $dm->Clear(); + exit(); +} +/*--------------- +function SetupRun() +--------------*/ +else if ($action == 'setupstart') { + if (!is_writeable($mdir)) { + ShowMsg("目录 {$mdir} 不支持写入,这将导致安装程序没法正常创建", "-1"); + exit(); + } + $dm = new DedeModule($mdir); + $minfos = $dm->GetModuleInfo($hash); + extract($minfos, EXTR_SKIP); + $menustring = addslashes($dm->GetSystemFile($hash, 'menustring')); + $indexurl = str_replace('**', '=', $indexurl); + $query = "INSERT INTO `#@__sys_module`(`hashcode` , `modname` , `indexname` , `indexurl` , `ismember` , `menustring` ) + VALUES ('$hash' , '$name' , '$indexname' , '$indexurl' , '$ismember' , '$menustring' ) "; + $rs = $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); + $rs = $dsql->ExecuteNoneQuery($query); + if (!$rs) { + ShowMsg('保存数据库信息失败,无法完成安装'.$dsql->GetError(), 'javascript:;'); + exit(); + } + $dm->WriteFiles($hash, $isreplace); + $filename = ''; + if (!isset($autosetup) || $autosetup == 0) $filename = $dm->WriteSystemFile($hash, 'setup'); + if (!isset($autodel) || $autodel == 0) $dm->WriteSystemFile($hash, 'uninstall'); + $dm->WriteSystemFile($hash, 'readme'); + $dm->Clear(); + //用模块的安装程序安装 + if (!isset($autosetup) || $autosetup == 0) { + include(DEDEDATA.'/module/'.$filename); + exit(); + } + //系统自动安装 + else { + $mysql_version = $dsql->GetVersion(TRUE); + //默认使用MySQL 4.1 以下版本的SQL语句,对大于4.1版本采用替换处理 TYPE=MyISAM ==> ENGINE=MyISAM DEFAULT CHARSET=#~lang~# + $setupsql = $dm->GetSystemFile($hash, 'setupsql40'); + $setupsql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $setupsql); + $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; + if ($mysql_version >= 4.1) { + $setupsql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $setupsql); + } + //_ROOTURL_ + if ($cfg_cmspath == '/') $cfg_cmspath = ''; + $rooturl = $cfg_basehost.$cfg_cmspath; + $setupsql = preg_replace("#_ROOTURL_#i", $rooturl, $setupsql); + $setupsql = preg_replace("#[\r\n]{1,}#", "\n", $setupsql); + $sqls = @split(";[ \t]{0,}\n", $setupsql); + foreach ($sqls as $sql) { + if (trim($sql) != '') $dsql->ExecuteNoneQuery($sql); + } + ReWriteConfigAuto(); + $rflwft = ""; + echo $rflwft; + UpDateCatCache(); + ShowMsg('模块安装完成...', 'module_main.php'); + exit(); + } +} +/*-------------- +function DelModule(); +--------------*/ +else if ($action == 'del') { + $dm = new DedeModule($mdir); + $infos = $dm->GetModuleInfo($hash); + $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); + $dev_id = empty($infos['dev_id'])? "未认证" : "{$infos['dev_id']} 未认证"; + $win = new OxWindow(); + $win->Init("module_main.php", "js/blank.js", "post"); + $wecome_info = "模块管理"; + $win->AddTitle("模块管理 >> 删除模块: {$infos['name']}"); + $win->AddHidden('hash', $hash); + $win->AddHidden('action', 'delok'); + $msg = " + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$dev_id}
发布时间:{$infos['time']}
使用协议:浏览
删除模块仅删除这个模块的安装包文件,如果您已经安装,请执行卸载程序来删除
"; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("ok", ""); + $win->Display(); + $dm->Clear(); + exit(); +} else if ($action == 'delok') { + $dm = new DedeModule($mdir); + $modfile = $mdir."/".$dm->GetHashFile($hash); + unlink($modfile) or die("删除文件 {$modfile} 失败"); + ShowMsg("成功删除一个模块文件", "module_main.php"); + exit(); +} +/*-------------- +function UnInstall(); +--------------*/ +else if ($action == 'uninstall') { + $dm = new DedeModule($mdir); + $infos = $dm->GetModuleInfo($hash); + if ($infos['url'] == '') $infos['url'] = ' '; + $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); + $filelists = $dm->GetFileLists($hash); + $filelist = ''; + foreach ($filelists as $v) { + if (empty($v['name'])) continue; + if ($v['type'] == 'dir') $v['type'] = '目录'; + else $v['type'] = '文件'; + $filelist .= "{$v['type']}|{$v['name']}\r\n"; + } + $dev_id = empty($infos['dev_id'])? "未认证" : "{$infos['dev_id']} 未认证"; + $win = new OxWindow(); + $win->Init("module_main.php", "js/blank.js", "post"); + $wecome_info = "模块管理"; + $win->AddTitle("模块管理 >> 卸载模块: {$infos['name']}"); + $win->AddHidden("hash", $hash); + $win->AddHidden("action", 'uninstallok'); + $msg = " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$dev_id}
发布时间:{$infos['time']}
使用协议:浏览
模块包含的文件:
(文件路径相对于当前目录)
 
+ +
对于模块的文件处理方法: + + +
"; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("ok", ""); + $win->Display(); + $dm->Clear(); + exit(); +} +/*-------------- +function UnInstallRun(); +--------------*/ +else if ($action == 'uninstallok') { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); + $dm = new DedeModule($mdir); + $minfos = $dm->GetModuleInfo($hash); + extract($minfos, EXTR_SKIP); + if (!isset($moduletype) || $moduletype != 'patch') { + $dm->DeleteFiles($hash, $isreplace); + } + @$dm->DelSystemFile($hash, 'readme'); + @$dm->DelSystemFile($hash, 'setup'); + $dm->Clear(); + if (!isset($autodel) || $autodel == 0) { + include(DEDEDATA."/module/{$hash}-uninstall.php"); + @unlink(DEDEDATA."/module/{$hash}-uninstall.php"); + exit(); + } else { + @$dm->DelSystemFile($hash, 'uninstall'); + $delsql = $dm->GetSystemFile($hash, 'delsql'); + if (trim($delsql) != '') { + $sqls = explode(';', $delsql); + foreach ($sqls as $sql) { + if (trim($sql) != '') $dsql->ExecuteNoneQuery($sql); + } + } + ReWriteConfigAuto(); + $rflwft = ""; + echo $rflwft; + ShowMsg('模块卸载完成...', 'module_main.php'); + exit(); + } +} +/*-------------- +function ShowReadme(); +--------------*/ +else if ($action == 'showreadme') { + $dm = new DedeModule($mdir); + $msg = $dm->GetSystemFile($hash, 'readme'); + $msg = preg_replace("/(.*)(.*)/isU", "", $msg); + $dm->Clear(); + $win = new OxWindow(); + $win->Init("module_main.php", "js/blank.js", "post"); + $wecome_info = "模块管理"; + $win->AddTitle("模块管理 >> 使用说明:"); + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("hand"); + $win->Display(); + exit(); +} +/*-------------- +function ViewOne(); +--------------*/ +else if ($action == 'view') { + $dm = new DedeModule($mdir); + $infos = $dm->GetModuleInfo($hash); + if ($infos['url'] == '') $infos['url'] = ' '; + $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); + $filelists = $dm->GetFileLists($hash); + $filelist = ''; + $setupinfo = ''; + foreach ($filelists as $v) { + if (empty($v['name'])) continue; + if ($v['type'] == 'dir') $v['type'] = '目录'; + else $v['type'] = '文件'; + $filelist .= "{$v['type']}|{$v['name']}\r\n"; + } + if (file_exists(DEDEDATA."/module/{$hash}-readme.php")) { + $setupinfo = "已安装 卸载"; + } else { + $setupinfo = "未安装 安装"; + } + $dev_id = empty($infos['dev_id'])? "安装 未认证" : "{$infos['dev_id']} 未认证"; + $win = new OxWindow(); + $win->Init("", "js/blank.js", ""); + $wecome_info = "模块管理"; + $win->AddTitle("模块管理 >> 模块详情: {$infos['name']}"); + $msg = " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$dev_id}
发布时间:{$infos['time']}
使用协议:浏览
模块包含的文件:
(文件路径相对于当前目录)
 
+ +
"; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow('hand', ''); + $win->Display(); + $dm->Clear(); + exit(); +} +/*-------------- +function Edit(); +--------------*/ +else if ($action == 'edit') { + $dm = new DedeModule($mdir); + $minfos = $dm->GetModuleInfo($hash); + extract($minfos, EXTR_SKIP); + if (!isset($lang)) $lang = 'gb2312'; + if (!isset($moduletype)) $moduletype = 'soft'; + $menustring = $dm->GetSystemFile($hash, 'menustring'); + $setupsql40 = dede_htmlspecialchars($dm->GetSystemFile($hash, 'setupsql40')); + $readmetxt = $dm->GetSystemFile($hash, 'readme'); + $delsql = $dm->GetSystemFile($hash, 'delsql'); + $filelist = $dm->GetSystemFile($hash, 'oldfilelist', false); + $indexurl = str_replace('**', '=', $indexurl); + $dm->Clear(); + require_once(dirname(__FILE__).'/templets/module_edit.htm'); + exit(); +} +/*-------------- +function Download(); +--------------*/ +else if ($action == 'download') { + ShowMsg("暂不支持模块下载功能", "javascript:;"); } \ No newline at end of file diff --git a/src/dede/module_make.php b/src/admin/module_make.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/module_make.php rename to src/admin/module_make.php index af4e53b3..045d30fc --- a/src/dede/module_make.php +++ b/src/admin/module_make.php @@ -1,347 +1,346 @@ -OpenUrl($devURL); - $devContent = $dhd->GetHtml(); - $devInfo = (array)json_decode($devContent); - if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) { - ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); - exit(); - } - - $filelist = str_replace("\r", "\n", trim($filelist)); - $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); - if ($filelist == '') { - ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目", "-1"); - exit(); - } - if (empty($dev_id)) { - ShowMsg("开发者ID不能为空", "-1"); - exit(); - } - if (empty($priv)) { - ShowMsg("请填写开发者私钥信息", "-1"); - exit(); - } - if (strlen($modulname) > 150) { - ShowMsg("模块名称过长", "-1"); - exit(); - } - - // 校验私钥合法性 - $enstr = json_encode(array( - "module_name" => $modulname, - "dev_id" => $devInfo['dev_id'], - )); - // 私钥加密模块信息 - openssl_private_encrypt($enstr, $encotent, $priv); - - $moduleInfo = base64url_encode($encotent); - - openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); - - $minfo = (array)json_decode($decontent); - - if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { - ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); - exit(); - } - - //去除转义 - foreach ($_POST as $k => $v) $$k = stripslashes($v); - - if (!isset($autosetup)) $autosetup = 0; - if (!isset($autodel)) $autodel = 0; - $mdir = DEDEDATA.'/module'; - $hashcode = md5($modulname.$devInfo['dev_id']); - $moduleFilename = $mdir.'/'.$hashcode.'.xml'; - $menustring = base64_encode($menustring); - $indexurl = str_replace('=', '**', $indexurl); - $dm = new DedeModule($mdir); - - if ($dm->HasModule($hashcode)) { - $dm->Clear(); - ShowMsg("对不起,您指定同名模块已经存在,因此不能创建项目
如果您要更新这个模块,请先删除:module/{$hashcode}.xml", "-1"); - exit(); - } - - $readmef = $setupf = $uninstallf = ''; - - if (empty($readmetxt)) { - move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("您没填写说明或上传说明文件"); - $readmef = $dm->GetEncodeFile($mdir."/{$hashcode}-r.html", TRUE); - } else { - $readmetxt = "

".$readmetxt; - $readmetxt = preg_replace("#[\r\n]{1,}#", "
\r\n", $readmetxt); - $readmetxt .= "

"; - $readmef = base64_encode(trim($readmetxt)); - } - - if ($autosetup == 0) { - move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); - $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); - } - - if ($autodel == 0) { - move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); - $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", TRUE); - } - - if (trim($setupsql40) == '') $setupsql40 = ''; - else $setupsql40 = base64_encode(trim($setupsql40)); - - //if(trim($setupsql41)=='') $setupsql41 = ''; - //else $setupsql41 = base64_encode(trim($setupsql41)); - - if (trim($delsql) == '') $delsql = ''; - else $delsql = base64_encode(trim($delsql)); - $pub_key = base64url_encode($devInfo['pub_key']); - - $modulinfo = " - -name={$modulname} -dev_id={$devInfo['dev_id']} -pubkey={$pub_key} -info={$moduleInfo} -time={$mtime} -hash={$hashcode} -indexname={$indexname} -indexurl={$indexurl} -ismember={$ismember} -autosetup={$autosetup} -autodel={$autodel} -lang=utf-8 -moduletype={$moduletype} - - - -$menustring - - -{$readmef} - - -$setupsql40 - - -$delsql - - -{$setupf} - - -{$uninstallf} - - -$filelist - - -"; - - $filelists = explode("\n", $filelist); - foreach ($filelists as $v) { - $v = trim($v); - if (!empty($v)) $dm->MakeEncodeFileTest(dirname(__FILE__), $v); - } - //测试无误后编译安装包 - $fp = fopen($moduleFilename, 'w'); - fwrite($fp, $modulinfo); - fwrite($fp, "\r\n"); - foreach ($filelists as $v) { - $v = trim($v); - if (!empty($v)) $dm->MakeEncodeFile(dirname(__FILE__), $v, $fp); - } - fwrite($fp, "\r\n"); - fwrite($fp, "\r\n"); - fclose($fp); - ShowMsg("成功对一个新模块进行编译", "module_main.php"); - exit(); -} -/*------------- -//修改项目 -function editModule() ---------------*/ else if ($action == 'edit') { - $filelist = str_replace("\r", "\n", trim($filelist)); - $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); - if ($filelist == "") { - ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目", "-1"); - exit(); - } - if (empty($dev_id)) { - ShowMsg("开发者ID不能为空", "-1"); - exit(); - } - if (empty($priv)) { - ShowMsg("请填写开发者私钥信息", "-1"); - exit(); - } - - // 校验私钥,确定开发者身份 - $devURL = DEDECDNURL."/developers/$dev_id.json"; - $dhd = new DedeHttpDown(); - $dhd->OpenUrl($devURL); - $devContent = $dhd->GetHtml(); - $devInfo = (array)json_decode($devContent); - if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) { - ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); - exit(); - } - if (strlen($modulname) > 150) { - ShowMsg("模块名称过长", "-1"); - exit(); - } - - // 校验私钥合法性 - $enstr = json_encode(array( - "module_name" => $modulname, - "dev_id" => $devInfo['dev_id'], - )); - // 私钥加密模块信息 - openssl_private_encrypt($enstr, $encotent, $priv); - - $moduleInfo = base64url_encode($encotent); - - openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); - - $minfo = (array)json_decode($decontent); - - if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { - ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); - exit(); - } - - //已经去除转义 - foreach ($_POST as $k => $v) $$k = stripslashes($v); - if (!isset($autosetup)) $autosetup = 0; - if (!isset($autodel)) $autodel = 0; - $mdir = DEDEDATA.'/module'; - $hashcode = $hash; - $moduleFilename = $mdir.'/'.$hashcode.'.xml'; - $modulname = str_replace('=', '', $modulname); - $indexurl = str_replace('=', '**', $indexurl); - $menustring = base64_encode($menustring); - $dm = new DedeModule($mdir); - $readmef = base64_encode($readmetxt); - $setupf = $uninstallf = ''; - - //编译setup文件 - if (is_uploaded_file($setup)) { - move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); - $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); - } else { - if ($autosetup == 0) $setupf = base64_encode($dm->GetSystemFile($hashcode, 'setup')); - } - - //编译uninstall文件 - if (is_uploaded_file($uninstall)) { - move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); - $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", true); - } else { - if ($autodel == 0) $uninstallf = base64_encode($dm->GetSystemFile($hashcode, 'uninstall')); - } - - if (trim($setupsql40) == '') $setupsql40 = ''; - else $setupsql40 = base64_encode(htmlspecialchars_decode(trim($setupsql40))); - //if(trim($setupsql41)=='') $setupsql41 = ''; - //else $setupsql41 = base64_encode(trim($setupsql41)); - - if (trim($delsql) == '') $delsql = ''; - else $delsql = base64_encode(strip_tags(trim($delsql))); - - $modulinfo = " - -name={$modulname} -dev_id={$devInfo['dev_id']} -pubkey={$devInfo['pub_key']} -info={$moduleInfo} -time={$mtime} -hash={$hashcode} -indexname={$indexname} -indexurl={$indexurl} -ismember={$ismember} -autosetup={$autosetup} -autodel={$autodel} -lang=utf-8 -moduletype={$moduletype} - - - -$menustring - - -{$readmef} - - -$setupsql40 - - -$delsql - - -{$setupf} - - -{$uninstallf} - - -$filelist - - -"; - - if ($rebuild == 'yes') { - $filelists = explode("\n", $filelist); - foreach ($filelists as $v) { - $v = trim($v); - if (!empty($v)) $dm->MakeEncodeFileTest(dirname(__FILE__), $v); - } - //测试无误后编译安装包 - $fp = fopen($moduleFilename, 'w'); - fwrite($fp, $modulinfo."\r\n"); - fwrite($fp, "\r\n"); - foreach ($filelists as $v) { - $v = trim($v); - if (!empty($v)) $dm->MakeEncodeFile(dirname(__FILE__), $v, $fp); - } - fwrite($fp, "\r\n"); - fwrite($fp, "\r\n"); - fclose($fp); - } else { - $fxml = $dm->GetFileXml($hashcode); - $fp = fopen($moduleFilename, 'w'); - fwrite($fp, $modulinfo."\r\n"); - fwrite($fp, $fxml); - fclose($fp); - } - ShowMsg("成功对模块重新编译", "module_main.php"); - exit(); -} -//ClearAllLink(); +OpenUrl($devURL); + $devContent = $dhd->GetHtml(); + $devInfo = (array)json_decode($devContent); + if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) { + ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); + exit(); + } + + $filelist = str_replace("\r", "\n", trim($filelist)); + $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); + if ($filelist == '') { + ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目", "-1"); + exit(); + } + if (empty($dev_id)) { + ShowMsg("开发者ID不能为空", "-1"); + exit(); + } + if (empty($priv)) { + ShowMsg("请填写开发者私钥信息", "-1"); + exit(); + } + if (strlen($modulname) > 150) { + ShowMsg("模块名称过长", "-1"); + exit(); + } + + //校验私钥合法性 + $enstr = json_encode(array( + "module_name" => $modulname, + "dev_id" => $devInfo['dev_id'], + )); + //私钥加密模块信息 + openssl_private_encrypt($enstr, $encotent, $priv); + + $moduleInfo = base64url_encode($encotent); + + openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); + + $minfo = (array)json_decode($decontent); + + if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { + ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); + exit(); + } + + //去除转义 + foreach ($_POST as $k => $v) $$k = stripslashes($v); + + if (!isset($autosetup)) $autosetup = 0; + if (!isset($autodel)) $autodel = 0; + $mdir = DEDEDATA.'/module'; + $hashcode = md5($modulname.$devInfo['dev_id']); + $moduleFilename = $mdir.'/'.$hashcode.'.xml'; + $menustring = base64_encode($menustring); + $indexurl = str_replace('=', '**', $indexurl); + $dm = new DedeModule($mdir); + + if ($dm->HasModule($hashcode)) { + $dm->Clear(); + ShowMsg("对不起,您指定同名模块已经存在,因此不能创建项目
如果您要更新这个模块,请先删除:module/{$hashcode}.xml", "-1"); + exit(); + } + + $readmef = $setupf = $uninstallf = ''; + + if (empty($readmetxt)) { + move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("您没填写说明或上传说明文件"); + $readmef = $dm->GetEncodeFile($mdir."/{$hashcode}-r.html", TRUE); + } else { + $readmetxt = "

".$readmetxt; + $readmetxt = preg_replace("#[\r\n]{1,}#", "
\r\n", $readmetxt); + $readmetxt .= "

"; + $readmef = base64_encode(trim($readmetxt)); + } + + if ($autosetup == 0) { + move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); + $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); + } + + if ($autodel == 0) { + move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); + $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", TRUE); + } + + if (trim($setupsql40) == '') $setupsql40 = ''; + else $setupsql40 = base64_encode(trim($setupsql40)); + + //if(trim($setupsql41)=='') $setupsql41 = ''; + //else $setupsql41 = base64_encode(trim($setupsql41)); + + if (trim($delsql) == '') $delsql = ''; + else $delsql = base64_encode(trim($delsql)); + $pub_key = base64url_encode($devInfo['pub_key']); + + $modulinfo = " + +name={$modulname} +dev_id={$devInfo['dev_id']} +pubkey={$pub_key} +info={$moduleInfo} +time={$mtime} +hash={$hashcode} +indexname={$indexname} +indexurl={$indexurl} +ismember={$ismember} +autosetup={$autosetup} +autodel={$autodel} +lang=utf-8 +moduletype={$moduletype} + + + +$menustring + + +{$readmef} + + +$setupsql40 + + +$delsql + + +{$setupf} + + +{$uninstallf} + + +$filelist + + +"; + + $filelists = explode("\n", $filelist); + foreach ($filelists as $v) { + $v = trim($v); + if (!empty($v)) $dm->MakeEncodeFileTest(dirname(__FILE__), $v); + } + //测试无误后编译安装包 + $fp = fopen($moduleFilename, 'w'); + fwrite($fp, $modulinfo); + fwrite($fp, "\r\n"); + foreach ($filelists as $v) { + $v = trim($v); + if (!empty($v)) $dm->MakeEncodeFile(dirname(__FILE__), $v, $fp); + } + fwrite($fp, "\r\n"); + fwrite($fp, "\r\n"); + fclose($fp); + ShowMsg("成功对一个新模块进行编译", "module_main.php"); + exit(); +} +/*------------- +//修改项目 +function editModule() +--------------*/ else if ($action == 'edit') { + $filelist = str_replace("\r", "\n", trim($filelist)); + $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); + if ($filelist == "") { + ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目", "-1"); + exit(); + } + if (empty($dev_id)) { + ShowMsg("开发者ID不能为空", "-1"); + exit(); + } + if (empty($priv)) { + ShowMsg("请填写开发者私钥信息", "-1"); + exit(); + } + + //校验私钥,确定开发者身份 + $devURL = DEDECDNURL."/developers/$dev_id.json"; + $dhd = new DedeHttpDown(); + $dhd->OpenUrl($devURL); + $devContent = $dhd->GetHtml(); + $devInfo = (array)json_decode($devContent); + if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) { + ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); + exit(); + } + if (strlen($modulname) > 150) { + ShowMsg("模块名称过长", "-1"); + exit(); + } + + //校验私钥合法性 + $enstr = json_encode(array( + "module_name" => $modulname, + "dev_id" => $devInfo['dev_id'], + )); + //私钥加密模块信息 + openssl_private_encrypt($enstr, $encotent, $priv); + + $moduleInfo = base64url_encode($encotent); + + openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); + + $minfo = (array)json_decode($decontent); + + if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { + ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); + exit(); + } + + //已经去除转义 + foreach ($_POST as $k => $v) $$k = stripslashes($v); + if (!isset($autosetup)) $autosetup = 0; + if (!isset($autodel)) $autodel = 0; + $mdir = DEDEDATA.'/module'; + $hashcode = $hash; + $moduleFilename = $mdir.'/'.$hashcode.'.xml'; + $modulname = str_replace('=', '', $modulname); + $indexurl = str_replace('=', '**', $indexurl); + $menustring = base64_encode($menustring); + $dm = new DedeModule($mdir); + $readmef = base64_encode($readmetxt); + $setupf = $uninstallf = ''; + + //编译setup文件 + if (is_uploaded_file($setup)) { + move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); + $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); + } else { + if ($autosetup == 0) $setupf = base64_encode($dm->GetSystemFile($hashcode, 'setup')); + } + + //编译uninstall文件 + if (is_uploaded_file($uninstall)) { + move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); + $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", true); + } else { + if ($autodel == 0) $uninstallf = base64_encode($dm->GetSystemFile($hashcode, 'uninstall')); + } + + if (trim($setupsql40) == '') $setupsql40 = ''; + else $setupsql40 = base64_encode(htmlspecialchars_decode(trim($setupsql40))); + //if(trim($setupsql41)=='') $setupsql41 = ''; + //else $setupsql41 = base64_encode(trim($setupsql41)); + + if (trim($delsql) == '') $delsql = ''; + else $delsql = base64_encode(strip_tags(trim($delsql))); + + $modulinfo = " + +name={$modulname} +dev_id={$devInfo['dev_id']} +pubkey={$devInfo['pub_key']} +info={$moduleInfo} +time={$mtime} +hash={$hashcode} +indexname={$indexname} +indexurl={$indexurl} +ismember={$ismember} +autosetup={$autosetup} +autodel={$autodel} +lang=utf-8 +moduletype={$moduletype} + + + +$menustring + + +{$readmef} + + +$setupsql40 + + +$delsql + + +{$setupf} + + +{$uninstallf} + + +$filelist + + +"; + + if ($rebuild == 'yes') { + $filelists = explode("\n", $filelist); + foreach ($filelists as $v) { + $v = trim($v); + if (!empty($v)) $dm->MakeEncodeFileTest(dirname(__FILE__), $v); + } + //测试无误后编译安装包 + $fp = fopen($moduleFilename, 'w'); + fwrite($fp, $modulinfo."\r\n"); + fwrite($fp, "\r\n"); + foreach ($filelists as $v) { + $v = trim($v); + if (!empty($v)) $dm->MakeEncodeFile(dirname(__FILE__), $v, $fp); + } + fwrite($fp, "\r\n"); + fwrite($fp, "\r\n"); + fclose($fp); + } else { + $fxml = $dm->GetFileXml($hashcode); + $fp = fopen($moduleFilename, 'w'); + fwrite($fp, $modulinfo."\r\n"); + fwrite($fp, $fxml); + fclose($fp); + } + ShowMsg("成功对模块重新编译", "module_main.php"); + exit(); +} +//ClearAllLink(); diff --git a/src/dede/module_upload.php b/src/admin/module_upload.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/module_upload.php rename to src/admin/module_upload.php index 07570870..9e5bb392 --- a/src/dede/module_upload.php +++ b/src/admin/module_upload.php @@ -1,115 +1,114 @@ -get_List($tmpfilename); - $dedefileindex = -1; - //为了节省资源,系统仅以.xml作为扩展名识别ZIP包里了dede模块格式文件 - if (is_array($files)) { - for ($i = 0; $i < count($files); $i++) { - if (preg_match("#\.xml#i", $files[$i]['filename'])) { - $dedefile = $files[$i]['filename']; - $dedefileindex = $i; - break; - } - } - } - if ($dedefileindex == -1) { - unlink($tmpfilename); - ShowMsg("对不起,您上传的压缩包中不存在dede模块文件

>>返回重新上传>>", "javascript:;"); - exit(); - } - $ziptmp = $mdir.'/ziptmp'; - $z->Extract($tmpfilename, $ziptmp, $dedefileindex); - unlink($tmpfilename); - $tmpfilename = $mdir."/ziptmp/".$dedefile; - } - - $dm = new DedeModule($mdir); - $infos = $dm->GetModuleInfo($tmpfilename, 'file'); - if (empty($infos['hash'])) { - unlink($tmpfilename); - $dm->Clear(); - ShowMsg("对不起,您上传的文件可能不是织梦模块的标准格式文件

>>返回重新上传>>", "javascript:;"); - exit(); - } - if (preg_match("#[^0-9a-zA-Z]#", $infos['hash'])) { - exit("hash check failed!"); - } - - $okfile = $mdir.'/'.$infos['hash'].'.xml'; - if ($dm->HasModule($infos['hash']) && empty($delhas)) { - unlink($tmpfilename); - $dm->Clear(); - ShowMsg("对不起,您上传的模块已经存在,
如果要覆盖请先删除原来版本或选择强制删除的选项

>>返回重新上传>>", "javascript:;"); - exit(); - } - @unlink($okfile); - copy($tmpfilename, $okfile); - @unlink($tmpfilename); - $dm->Clear(); - ShowMsg("成功上传一个新的模块", "module_main.php?action=view&hash={$infos['hash']}"); - exit(); - } -} else { - $win = new OxWindow(); - $win->Init("module_upload.php", "js/blank.js", "POST' enctype='multipart/form-data"); - $win->mainTitle = "模块管理"; - $wecome_info = "模块管理 >> 上传模块"; - $win->AddTitle('请选择要上传的文件:'); - $win->AddHidden("action", 'upload'); - $msg = " - - - - - - - - - - - - - -
文件格式: - -
已有模块: - -
请选择文件: -
- "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow('ok', ''); - $win->Display(); - exit(); -} -//ClearAllLink(); +get_List($tmpfilename); + $dedefileindex = -1; + //为了节省资源,系统仅以.xml作为扩展名识别ZIP包里了dede模块格式文件 + if (is_array($files)) { + for ($i = 0; $i < count($files); $i++) { + if (preg_match("#\.xml#i", $files[$i]['filename'])) { + $dedefile = $files[$i]['filename']; + $dedefileindex = $i; + break; + } + } + } + if ($dedefileindex == -1) { + unlink($tmpfilename); + ShowMsg("对不起,您上传的压缩包中不存在dede模块文件

>>返回重新上传>>", "javascript:;"); + exit(); + } + $ziptmp = $mdir.'/ziptmp'; + $z->Extract($tmpfilename, $ziptmp, $dedefileindex); + unlink($tmpfilename); + $tmpfilename = $mdir."/ziptmp/".$dedefile; + } + + $dm = new DedeModule($mdir); + $infos = $dm->GetModuleInfo($tmpfilename, 'file'); + if (empty($infos['hash'])) { + unlink($tmpfilename); + $dm->Clear(); + ShowMsg("对不起,您上传的文件可能不是织梦模块的标准格式文件

>>返回重新上传>>", "javascript:;"); + exit(); + } + if (preg_match("#[^0-9a-zA-Z]#", $infos['hash'])) { + exit("hash check failed!"); + } + + $okfile = $mdir.'/'.$infos['hash'].'.xml'; + if ($dm->HasModule($infos['hash']) && empty($delhas)) { + unlink($tmpfilename); + $dm->Clear(); + ShowMsg("对不起,您上传的模块已经存在,
如果要覆盖请先删除原来版本或选择强制删除的选项

>>返回重新上传>>", "javascript:;"); + exit(); + } + @unlink($okfile); + copy($tmpfilename, $okfile); + @unlink($tmpfilename); + $dm->Clear(); + ShowMsg("成功上传一个新的模块", "module_main.php?action=view&hash={$infos['hash']}"); + exit(); + } +} else { + $win = new OxWindow(); + $win->Init("module_upload.php", "js/blank.js", "POST' enctype='multipart/form-data"); + $win->mainTitle = "模块管理"; + $wecome_info = "模块管理 >> 上传模块"; + $win->AddTitle('请选择要上传的文件:'); + $win->AddHidden("action", 'upload'); + $msg = " + + + + + + + + + + + + + +
文件格式: + +
已有模块: + +
请选择文件: +
+ "; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow('ok', ''); + $win->Display(); + exit(); +} +//ClearAllLink(); diff --git a/src/dede/mychannel_add.php b/src/admin/mychannel_add.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/mychannel_add.php rename to src/admin/mychannel_add.php index a3e58ded..9377acaa --- a/src/dede/mychannel_add.php +++ b/src/admin/mychannel_add.php @@ -1,119 +1,118 @@ -'频道id'必须为数字", "-1"); - exit(); - } - if (preg_match("#[^a-z0-9]#i", $nid) || $nid == "") { - ShowMsg("'频道名字标识'必须为英文字母或与数字混合字符串", "-1"); - exit(); - } - if ($addtable == "") { - ShowMsg("附加表不能为空", "-1"); - exit(); - } - $trueTable2 = str_replace("#@__", $cfg_dbprefix, $addtable); - - if ($issystem == -1 && $id > 0) $id = $id * -1; - - //检查id是否重复 - $row = $dsql->GetOne("SELECT * FROM #@__channeltype WHERE id='$id' OR nid LIKE '$nid' OR addtable LIKE '$addtable'"); - if (is_array($row)) { - ShowMsg("可能‘频道id’、‘频道名称标识’、‘附加表名称’在数据库已存在,不能重复使用", "-1"); - exit(); - } - $mysql_version = $dsql->GetVersion(); - - //创建附加表 - if ($trueTable2 != '') { - $istb = $dsql->IsTable($trueTable2); - if (!$istb || $isdel == 1) { - //是否需要摘要字段 - $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$trueTable2}`;"); - if ($issystem != -1) { - $tabsql = "CREATE TABLE `$trueTable2`( - `aid` int(11) NOT NULL default '0', - `typeid` int(11) NOT NULL default '0', - `redirecturl` varchar(255) NOT NULL default '', - `templet` varchar(30) NOT NULL default '', - `userip` char(15) NOT NULL default '', - "; - } else { - $tabsql = "CREATE TABLE `$trueTable2`( - `aid` int(11) NOT NULL default '0', - `typeid` int(11) NOT NULL default '0', - `channel` SMALLINT NOT NULL DEFAULT '0', - `arcrank` SMALLINT NOT NULL DEFAULT '0', - `mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', - `click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', - `title` varchar(60) NOT NULL default '', - `senddate` int(11) NOT NULL default '0', - `flag` set('c','h','p','f','s','j','a','b') default NULL, - `litpic` varchar(60) NOT NULL default '', - `userip` char(15) NOT NULL default '', - `lastpost` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', - `scores` MEDIUMINT( 8 ) NOT NULL DEFAULT '0', - `goodpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', - `badpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', - "; - } - if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; - } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - $rs = $dsql->ExecuteNoneQuery($tabsql); - if (!$rs) { - ShowMsg("创建附加表失败!".$dsql->GetError(), "javascript:;"); - exit(); - } - } - } - - $listfields = $fieldset = ''; - if ($issystem == -1) { - $fieldset = " - - - - - - - - - - - -\r\n"; - $listfields = 'channel,arcrank,mid,click,title,senddate,flag,listpic,lastpost,scores,goodpost,badpost'; - } - - $inQuery = "INSERT INTO `#@__channeltype`(id,nid,typename,addtable,addcon,mancon,editcon,useraddcon,usermancon,usereditcon,fieldset,listfields,issystem,issend,arcsta,usertype,sendrank,needdes,needpic,titlename,onlyone,dfcid) - VALUES ('$id','$nid','$typename','$addtable','$addcon','$mancon','$editcon','$useraddcon','$usermancon','$usereditcon','$fieldset','$listfields','$issystem','$issend','$arcsta','$usertype','$sendrank','$needdes','$needpic','$titlename','$onlyone','$dfcid');"; - $dsql->ExecuteNoneQuery($inQuery); - ShowMsg("成功增加一个频道模型", "mychannel_edit.php?id=".$id); - exit(); -} -$row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC LIMIT 0,1 "); -$newid = $row['id'] + 1; -if ($newid < 10) $newid = $newid + 10; - -require_once(DEDEADMIN."/templets/mychannel_add.htm"); +'频道id'必须为数字", "-1"); + exit(); + } + if (preg_match("#[^a-z0-9]#i", $nid) || $nid == "") { + ShowMsg("'频道名字标识'必须为英文字母或与数字混合字符串", "-1"); + exit(); + } + if ($addtable == "") { + ShowMsg("附加表不能为空", "-1"); + exit(); + } + $trueTable2 = str_replace("#@__", $cfg_dbprefix, $addtable); + + if ($issystem == -1 && $id > 0) $id = $id * -1; + + //检查id是否重复 + $row = $dsql->GetOne("SELECT * FROM #@__channeltype WHERE id='$id' OR nid LIKE '$nid' OR addtable LIKE '$addtable'"); + if (is_array($row)) { + ShowMsg("可能‘频道id’、‘频道名称标识’、‘附加表名称’在数据库已存在,不能重复使用", "-1"); + exit(); + } + $mysql_version = $dsql->GetVersion(); + + //创建附加表 + if ($trueTable2 != '') { + $istb = $dsql->IsTable($trueTable2); + if (!$istb || $isdel == 1) { + //是否需要摘要字段 + $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$trueTable2}`;"); + if ($issystem != -1) { + $tabsql = "CREATE TABLE `$trueTable2`( + `aid` int(11) NOT NULL default '0', + `typeid` int(11) NOT NULL default '0', + `redirecturl` varchar(255) NOT NULL default '', + `templet` varchar(30) NOT NULL default '', + `userip` char(15) NOT NULL default '', + "; + } else { + $tabsql = "CREATE TABLE `$trueTable2`( + `aid` int(11) NOT NULL default '0', + `typeid` int(11) NOT NULL default '0', + `channel` SMALLINT NOT NULL DEFAULT '0', + `arcrank` SMALLINT NOT NULL DEFAULT '0', + `mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', + `click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', + `title` varchar(60) NOT NULL default '', + `senddate` int(11) NOT NULL default '0', + `flag` set('c','h','p','f','s','j','a','b') default NULL, + `litpic` varchar(60) NOT NULL default '', + `userip` char(15) NOT NULL default '', + `lastpost` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', + `scores` MEDIUMINT( 8 ) NOT NULL DEFAULT '0', + `goodpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', + `badpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', + "; + } + if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; + } else { + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + $rs = $dsql->ExecuteNoneQuery($tabsql); + if (!$rs) { + ShowMsg("创建附加表失败!".$dsql->GetError(), "javascript:;"); + exit(); + } + } + } + + $listfields = $fieldset = ''; + if ($issystem == -1) { + $fieldset = " + + + + + + + + + + + +\r\n"; + $listfields = 'channel,arcrank,mid,click,title,senddate,flag,listpic,lastpost,scores,goodpost,badpost'; + } + + $inQuery = "INSERT INTO `#@__channeltype`(id,nid,typename,addtable,addcon,mancon,editcon,useraddcon,usermancon,usereditcon,fieldset,listfields,issystem,issend,arcsta,usertype,sendrank,needdes,needpic,titlename,onlyone,dfcid) + VALUES ('$id','$nid','$typename','$addtable','$addcon','$mancon','$editcon','$useraddcon','$usermancon','$usereditcon','$fieldset','$listfields','$issystem','$issend','$arcsta','$usertype','$sendrank','$needdes','$needpic','$titlename','$onlyone','$dfcid');"; + $dsql->ExecuteNoneQuery($inQuery); + ShowMsg("成功增加一个频道模型", "mychannel_edit.php?id=".$id); + exit(); +} +$row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC LIMIT 0,1 "); +$newid = $row['id'] + 1; +if ($newid < 10) $newid = $newid + 10; + +require_once(DEDEADMIN."/templets/mychannel_add.htm"); diff --git a/src/dede/mychannel_edit.php b/src/admin/mychannel_edit.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/mychannel_edit.php rename to src/admin/mychannel_edit.php index eadd0f88..3704fb69 --- a/src/dede/mychannel_edit.php +++ b/src/admin/mychannel_edit.php @@ -1,662 +1,661 @@ -ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=1 WHERE id='$id' "); - ShowMsg("操作成功", "mychannel_main.php"); - exit(); -} else if ($dopost == "hide") { - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=0 WHERE id='$id'"); - ShowMsg("操作成功", "mychannel_main.php"); - exit(); -} -/*---------------- -function __CopyStart() ------------------*/ else if ($dopost == "copystart") { - if ($id == -1) { - ShowMsg("专题模型不支持复制", "-1"); - exit(); - } - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); - if ($row['id'] > -1) { - $nrow = $dsql->GetOne("SELECT MAX(id) AS id FROM `#@__channeltype` LIMIT 0,1 "); - $newid = $nrow['id'] + 1; - if ($newid < 10) { - $newid = $newid + 10; - } - $idname = $newid; - } else { - $nrow = $dsql->GetOne("SELECT MIN(id) AS id FROM `#@__channeltype` LIMIT 0,1 "); - $newid = $nrow['id'] - 1; - if ($newid < -10) { - $newid = $newid - 10; - } - $idname = 'w'.($newid * -1); - } - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); - $wintitle = "频道管理-模型复制"; - $wecome_info = " 频道管理 - 模型复制"; - $win = new OxWindow(); - $win->Init("mychannel_edit.php", "js/blank.js", "post"); - $win->AddTitle(" 被复制频道: [".$row['typename']."]"); - $win->AddHidden("cid", $id); - $win->AddHidden("id", $id); - $win->AddHidden("dopost", 'copysave'); - $msg = " - - - - - - - - - - - - - - - - - - - - - -
新频道id:
新频道名称:
新频道标识:
新附加表:
复制模板: - -   - -
- "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("ok", ""); - $win->Display(); - exit(); -} -/*---------------- -function __Export() ------------------*/ else if ($dopost == "export") { - if ($id == -1) { - ShowMsg("专题模型不支持导出", "-1"); - exit(); - } - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' "); - $channelconfig = ''; - $row['maintable'] = preg_replace('#dede_#', '#@__', $row['maintable']); - $row['addtable'] = preg_replace('#dede_#', '#@__', $row['addtable']); - foreach ($row as $k => $v) { - if ($k == 'fieldset') $v = "\r\n$v\r\n"; - $channelconfig .= "$v\r\n"; - } - $wintitle = "导出内容模型规则"; - $wecome_info = "内容模型管理::导出内容模型规则"; - $win = new OxWindow(); - $win->Init(); - $win->AddTitle("以下为规则 [{$row['typename']}] 的模型规则,您可以共享给您的朋友:"); - $winform = $win->GetWindow("hand", ""); - $win->Display(); - exit(); -} -/*---------------- -function __ExportIn() ------------------*/ else if ($dopost == "exportin") { - $wintitle = "导入内容模型规则"; - $wecome_info = "内容模型管理::导入内容模型规则"; - $win = new OxWindow(); - $win->Init("mychannel_edit.php", "js/blank.js", "post"); - $win->AddHidden("dopost", "exportinok"); - $win->AddTitle("输入规则内容:(导入模型会和原有模型冲突,不过可以在导入后修改)"); - $win->AddMsgItem(""); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); -} -/*---------------- -function __ExportInOk() ------------------*/ else if ($dopost == "exportinok") { - require_once(DEDEADMIN."/inc/inc_admin_channel.php"); - function GotoStaMsg($msg) - { - global $wintitle, $wecome_info, $winform; - $wintitle = "导入内容模型规则"; - $wecome_info = "内容模型管理::导入内容模型规则"; - $win = new OxWindow(); - $win->Init(); - $win->AddTitle("操作状态提示:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand"); - $win->Display(); - exit(); - } - - $msg = "无信息"; - $exconfig = stripslashes($exconfig); - - $dtp = new DedeTagParse(); - $dtp->SetNameSpace('channel', '<', '>'); - $dtp->LoadSource($exconfig); - - if (!is_array($dtp->CTags)) GotoStaMsg("模型规则不是合法的Dede模型规则"); - - $fields = array(); - foreach ($dtp->CTags as $ctag) { - $fname = $ctag->GetName('name'); - $fields[$fname] = trim($ctag->GetInnerText()); - } - - if (!isset($fields['nid']) || !isset($fields['fieldset'])) { - GotoStaMsg("模型规则不是合法的Dede模型规则"); - } - - //正常的导入过程 - $mysql_version = $dsql->GetVersion(true); - - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE nid='{$fields['nid']}' "); - if (is_array($row)) { - GotoStaMsg("系统中已经存在相同标识 {$fields['nid']} 的规则"); - } - - //创建表 - if ($fields['issystem'] != -1) { - $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}`( - `aid` int(11) NOT NULL default '0', - `typeid` int(11) NOT NULL default '0', - `redirecturl` varchar(255) NOT NULL default '', - `templet` varchar(30) NOT NULL default '', - `userip` char(15) NOT NULL default '',"; - } else { - $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}`( - `aid` int(11) NOT NULL default '0', - `typeid` int(11) NOT NULL default '0', - `channel` SMALLINT NOT NULL DEFAULT '0', - `arcrank` SMALLINT NOT NULL DEFAULT '0', - `mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', - `click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', - `title` varchar(60) NOT NULL default '', - `senddate` int(11) NOT NULL default '0', - `flag` set('c','h','p','f','s','j','a','b') default NULL,"; - } - if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; - } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - $rs = $dsql->ExecuteNoneQuery($tabsql); - if (!$rs) { - GotoStaMsg("创建表失败!".$dsql->GetError()); - exit(); - } - - if ($fields['issystem'] == 1) $fields['issystem'] = 0; - if ($fields['issystem'] == 0) { - $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC "); - $fields['newid'] = $row['id'] + 1; - } else { - $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id ASC "); - $fields['newid'] = $row['id'] - 1; - } - - $fieldset = $fields['fieldset']; - $fields['fieldset'] = addslashes($fields['fieldset']); - - $inquery = " INSERT INTO `#@__channeltype`(`id` , `nid` , `typename` , `addtable` , `addcon` , - `mancon` , `editcon` , `useraddcon` , `usermancon` , `usereditcon` , - `fieldset` , `listfields` , `issystem` , `isshow` , `issend` , - `arcsta`,`usertype` , `sendrank` ) - VALUES('{$fields['newid']}' , '{$fields['nid']}' , '{$fields['typename']}' , '{$fields['addtable']}' , '{$fields['addcon']}' , - '{$fields['mancon']}' , '{$fields['editcon']}' , '{$fields['useraddcon']}' , '{$fields['usermancon']}' , '{$fields['usereditcon']}' , - '{$fields['fieldset']}' , '{$fields['listfields']}' , '{$fields['issystem']}' , '{$fields['isshow']}' , '{$fields['issend']}' , - '{$fields['arcsta']}' , '{$fields['usertype']}' , '{$fields['sendrank']}' ); "; - - $rs = $dsql->ExecuteNoneQuery($inquery); - - if (!$rs) GotoStaMsg("导入模型时发生错误".$dsql->GetError()); - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($fieldset); - $allfields = ''; - if (is_array($dtp->CTags)) { - foreach ($dtp->CTags as $ctag) { - //检测被修改的字段类型 - $dtype = $ctag->GetAtt('type'); - $fieldname = $ctag->GetName(); - $dfvalue = $ctag->GetAtt('default'); - $islist = $ctag->GetAtt('islist'); - $mxlen = $ctag->GetAtt('maxlength'); - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - if ($islist != '') { - $allfields .= ($allfields == '' ? $fieldname : ','.$fieldname); - } - $dsql->ExecuteNoneQuery(" ALTER TABLE `{$fields['addtable']}` ADD $ntabsql "); - } - } - - if ($allfields != '') { - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET listfields='$allfields' WHERE id='{$fields['newid']}' "); - } - GotoStaMsg("成功导入一个模型"); -} -/*---------------- -function __SaveCopy() ------------------*/ else if ($dopost == "copysave") { - $cid = intval($cid); - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$cid' ", MYSQL_ASSOC); - foreach ($row as $k => $v) { - ${strtolower($k)} = addslashes($v); - } - $inquery = " INSERT INTO `#@__channeltype`(`id` , `nid` , `typename` , `addtable` , `addcon` , - `mancon` , `editcon` , `useraddcon` , `usermancon` , `usereditcon` , `fieldset` , `listfields` , - `issystem` , `isshow` , `issend` , `arcsta`,`usertype` , `sendrank` ) - VALUES('$newid' , '$newnid' , '$newtypename' , '$newaddtable' , '$addcon' , - '$mancon' , '$editcon' , '$useraddcon' , '$usermancon' , '$usereditcon' , '$fieldset' , '$listfields' , - '$issystem' , '$isshow' , '$issend' , '$arcsta','$usertype' , '$sendrank' ); - "; - $mysql_version = $dsql->GetVersion(TRUE); - if (!$dsql->IsTable($newaddtable)) { - $dsql->Execute('me', "SHOW CREATE TABLE {$dsql->dbName}.{$addtable}"); - $row = $dsql->GetArray('me', MYSQL_BOTH); - $tableStruct = $row[1]; - $tb = str_replace('#@__', $cfg_dbprefix, $addtable); - $tableStruct = preg_replace("/CREATE TABLE `$addtable`/iU", "CREATE TABLE `$newaddtable`", $tableStruct); - $dsql->ExecuteNoneQuery($tableStruct); - } - if ($copytemplet == 1) { - $tmpletdir = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style; - copy("{$tmpletdir}/article_{$nid}.htm", "{$tmpletdir}/{$newnid}_article.htm"); - copy("{$tmpletdir}/list_{$nid}.htm", "{$tmpletdir}/{$newnid}_list.htm"); - copy("{$tmpletdir}/index_{$nid}.htm", "{$tmpletdir}/{$newnid}_index.htm"); - } - $rs = $dsql->ExecuteNoneQuery($inquery); - if ($rs) { - ShowMsg("成功复制模型,现转到详细参数页... ", "mychannel_edit.php?id={$newid}&dopost=edit"); - exit(); - } else { - $errv = $dsql->GetError(); - ShowMsg("系统出错,请把错误代码发送到官方论坛,以检查原因
错误代码:mychannel_edit.php?dopost=savecopy $errv", "javascript:;"); - exit(); - } -} -/*------------ -function __SaveEdit() -------------*/ else if ($dopost == "save") { - $fieldset = preg_replace("#[\r\n]{1,}#", "\r\n", $fieldset); - $usertype = empty($usertype) ? '' : $usertype; - - $query = "Update `#@__channeltype` set - typename = '$typename', - addtable = '$addtable', - addcon = '$addcon', - mancon = '$mancon', - editcon = '$editcon', - useraddcon = '$useraddcon', - usermancon = '$usermancon', - usereditcon = '$usereditcon', - fieldset = '$fieldset', - listfields = '$listfields', - issend = '$issend', - arcsta = '$arcsta', - usertype = '$usertype', - sendrank = '$sendrank', - needdes = '$needdes', - needpic = '$needpic', - titlename = '$titlename', - onlyone = '$onlyone', - dfcid = '$dfcid' - where id='$id' "; - if (trim($fieldset) != '') { - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource(stripslashes($fieldset)); - if (!is_array($dtp->CTags)) { - ShowMsg("文本配置参数无效,无法进行解析", "-1"); - exit(); - } - } - $trueTable = str_replace("#@__", $cfg_dbprefix, $addtable); - if (!$dsql->IsTable($trueTable)) { - ShowMsg("系统找不到您所指定的表 $trueTable ,请手工创建这个表", "-1"); - exit(); - } - $dsql->ExecuteNoneQuery($query); - ShowMsg("成功更改一个模型", "mychannel_main.php"); - exit(); -} -/*-------------------- -function __GetTemplate() ---------------------*/ else if ($dopost == "gettemplets") { - require_once(DEDEINC."/oxwindow.class.php"); - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); - $wintitle = " 频道管理-查看模板"; - $wecome_info = "频道管理::查看模板"; - $win = new OxWindow(); - $win->Init("", "js/blank.js", ""); - $win->AddTitle(" 频道:(".$row['typename'].")默认模板文件说明:"); - $defaulttemplate = $cfg_templets_dir.'/'.$cfg_df_style; - $msg = " - 文档模板:{$defaulttemplate}/article_{$row['nid']}.htm - [修改]
- 列表模板:{$defaulttemplate}/list_{$row['nid']}.htm - [修改] -
- 频道封面模板:{$defaulttemplate}/index_{$row['nid']}.htm - [修改] - "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("hand", ""); - $win->Display(); - exit(); -} -/*-------------------- -function __Delete() ---------------------*/ else if ($dopost == "delete") { - CheckPurview('c_Del'); - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); - if ($row['issystem'] == 1) { - ShowMsg("系统模型不允许删除", "mychannel_main.php"); - exit(); - } - if (empty($job)) $job = ""; - - if ($job == "") //确认提示 - { - require_once(DEDEINC."/oxwindow.class.php"); - $wintitle = "频道管理-删除模型"; - $wecome_info = "频道管理::删除模型"; - $win = new OxWindow(); - $win->Init("mychannel_edit.php", "js/blank.js", "POST"); - $win->AddHidden("job", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("id", $id); - $win->AddTitle("您确实要删除 (".$row['typename'].") 这个频道?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); - } else if ($job == "yes") //操作 - { - require_once(DEDEINC."/typeunit.class.admin.php"); - $myrow = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$id'", MYSQL_ASSOC); - if (!is_array($myrow)) { - ShowMsg('您所指定的频道信息不存在!', '-1'); - exit(); - } - - //检查频道的表是否独占数据表 - $addtable = str_replace($cfg_dbprefix, '', str_replace('#@__', $cfg_dbprefix, $myrow['addtable'])); - $row = $dsql->GetOne("SELECT COUNT(id) AS dd FROM `#@__channeltype` WHERE addtable like '{$cfg_dbprefix}{$addtable}' OR addtable LIKE CONCAT('#','@','__','$addtable') ; "); - $isExclusive2 = ($row['dd'] > 1 ? 0 : 1); - - //获取与频道关连的所有栏目id - $tids = ''; - $dsql->Execute('qm', "SELECT id FROM `#@__arctype` WHERE channeltype='$id'"); - while ($row = $dsql->GetArray('qm')) { - $tids .= ($tids == '' ? $row['id'] : ','.$row['id']); - } - - //删除相关信息 - if ($tids != '') { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE typeid IN($tids); "); - $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['maintable']}` WHERE typeid IN($tids); "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__spec` WHERE typeid IN ($tids); "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE typeid IN ($tids); "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id IN ($tids); "); - } - - //删除附加表或附加表内的信息 - if ($isExclusive2 == 1) { - $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$cfg_dbprefix}{$addtable}`;"); - } else { - if ($tids != '' && $myrow['addtable'] != '') { - $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['addtable']}` WHERE typeid IN ($tids); "); - } - } - - //删除频道配置信息 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__channeltype` WHERE id='$id' "); - - //更新栏目缓存 - UpDateCatCache($dsql); - ShowMsg("成功删除一个模型", "mychannel_main.php"); - exit(); - } -} //del -/*---------------- -function __modifysearch() ------------------*/ else if ($dopost == 'modifysearch') { - if (!isset($step)) $step = 0; - if (empty($step)) { - $step = 1; - $mid = intval($mid); - $query = "SELECT mainfields, addonfields, template FROM `#@__advancedsearch` WHERE mid='$mid'"; - $searchinfo = $dsql->GetOne($query); - if (!is_array($searchinfo)) { - $searchinfo = array(); - $searchinfo['mainfields'] = $searchinfo['addonfields'] = $searchinfo['template'] = ''; - } - $searchinfo['mainfields'] = explode(',', $searchinfo['mainfields']); - $searchinfo['addonfields'] = explode(',', $searchinfo['addonfields']); - $addonfieldsarr = array(); - foreach ($searchinfo['addonfields'] as $k) { - $karr = explode(':', $k); - $addonfieldsarr[] = $karr[0]; - } - $template = $searchinfo['template'] == '' ? 'advancedsearch.htm' : $searchinfo['template']; - $c1 = in_array('iscommend', $searchinfo['mainfields']) ? 'checked' : ''; - $c2 = in_array('typeid', $searchinfo['mainfields']) ? 'checked' : ''; - $c3 = in_array('writer', $searchinfo['mainfields']) ? 'checked' : ''; - $c4 = in_array('source', $searchinfo['mainfields']) ? 'checked' : ''; - $c5 = in_array('senddate', $searchinfo['mainfields']) ? 'checked' : ''; - - $mainfields = ' '; - $mainfields .= ' '; - - $mainfields .= ' '; - $mainfields .= ' '; - $mainfields .= ' '; - /* - $mainfields .= ''; - $mainfields .= ''; - $mainfields .= ''; - $mainfields .= ''; - $mainfields .= ''; - */ - $query = "SELECT * FROM `#@__channeltype` WHERE id='$mid'"; - $channel = $dsql->GetOne($query); - - $searchtype = array('int', 'datetime', 'float', 'textdata', 'textchar', 'text', 'htmltext', 'multitext', 'select', 'radio', 'checkbox'); - $addonfields = ''; - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($channel['fieldset']); - if ($channel['issystem'] < 0) { - $checked = in_array('typeid', $addonfieldsarr) ? 'checked' : ''; - $addonfields .= ' '; - $checked = in_array('senddate', $addonfieldsarr) ? 'checked' : ''; - $addonfields .= ' '; - } - if (is_array($dtp->CTags) && !empty($dtp->CTags)) { - foreach ($dtp->CTags as $ctag) { - $datatype = $ctag->GetAtt('type'); - $value = $ctag->GetName(); - if ($channel['issystem'] < 0) { - $_oo = array('channel', 'arcrank', 'title', 'senddate', 'mid', 'click', 'flag', 'litpic', 'userip', 'lastpost', 'scores', 'goodpost', 'badpost', 'endtime'); - if (in_array($value, $_oo)) continue; - } - - $label = $ctag->GetAtt('itemname'); - if (in_array($datatype, $searchtype)) { - $checked = in_array($value, $addonfieldsarr) ? 'checked' : ''; - $addonfields .= " "; - } - } - } - require_once(dirname(__FILE__)."/templets/mychannel_modifysearch.htm"); - } else if ($step == 1) { - $query = "SELECT * FROM `#@__channeltype` WHERE id='$mid'"; - $channel = $dsql->GetOne($query); - if (empty($addonfields)) { - $addonfields = ''; - } - $template = trim($template); - $forms = '
'; - $forms .= ""; - $forms .= ""; - $forms .= "关键词:
"; - $mainstring = ''; - if (!empty($mainfields) && is_array($mainfields)) { - $mainstring = implode(',', $mainfields); - foreach ($mainfields as $mainfield) { - if ($mainfield == 'typeid') { - require_once(dirname(__FILE__)."/../include/typelink.class.php"); - $tl = new TypeLink(0); - $typeOptions = $tl->GetOptionArray(0, 0, $mid); - $forms .= "
栏目:"; - $forms .= "
"; - } else if ($mainfield == 'iscommend') { - $forms .= "
"; - } else if ($mainfield == 'writer') { - $forms .= "作者:
"; - } else if ($mainfield == 'source') { - $forms .= "来源:
"; - } else if ($mainfield == 'senddate') { - $forms .= "开始时间:
"; - $forms .= "结束时间:
"; - } - } - } - - $addonstring = ''; - $intarr = array('int', 'float'); - $textarr = array('textdata', 'textchar', 'text', 'htmltext', 'multitext'); - - if ($channel['issystem'] < 0) { - foreach ($addonfields as $addonfield) { - if ($addonfield == 'typeid') { - require_once(dirname(__FILE__)."/../include/typelink.class.php"); - $tl = new TypeLink(0); - $typeOptions = $tl->GetOptionArray(0, 0, $mid); - $forms .= "
栏目:"; - $forms .= "
"; - $addonstring .= 'typeid:int,'; - } elseif ($addonfield == 'senddate') { - $forms .= "开始时间:
"; - $forms .= "结束时间:
"; - $addonstring .= 'senddate:datetime,'; - } - } - } - - if (is_array($addonfields) && !empty($addonfields)) { - $query = "SELECT * FROM #@__channeltype WHERE id='$mid'"; - $channel = $dsql->GetOne($query); - - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($channel['fieldset']); - $fieldarr = $itemarr = $typearr = array(); - foreach ($dtp->CTags as $ctag) { - foreach ($addonfields as $addonfield) { - - if ($ctag->GetName() == $addonfield) { - if ($addonfield == 'typeid' || $addonfield == 'senddate') continue; - - $fieldarr[] = $addonfield; - $itemarr[] = $ctag->GetAtt('itemname'); - $typearr[] = $ctag->GetAtt('type'); - $valuearr[] = $ctag->GetAtt('default'); - } - } - } - - foreach ($fieldarr as $k => $field) { - $itemname = $itemarr[$k]; - $name = $field; - $type = $typearr[$k]; - $tmp = $name.':'.$type; - if (in_array($type, $intarr)) { - $forms .= "
$itemname :
"; - } else if (in_array($type, $textarr)) { - $forms .= "$itemname :
"; - } else if ($type == 'select') { - $values = explode(',', $valuearr[$k]); - if (is_array($values) && !empty($values)) { - $forms .= "
$itemname : "; - } - } else if ($type == 'radio') { - $values = explode(',', $valuearr[$k]); - if (is_array($values) && !empty($values)) { - $forms .= "
$itemname : "; - foreach ($values as $value) { - $forms .= ""; - } - } - } else if ($type == 'checkbox') { - $values = explode(',', $valuearr[$k]); - if (is_array($values) && !empty($values)) { - $forms .= "
$itemname : "; - foreach ($values as $value) { - $forms .= ""; - } - } - } elseif ($type == 'datetime') { - $forms .= "
开始时间:
"; - $forms .= "结束时间:
"; - } else { - $tmp = ''; - } - $addonstring .= $tmp.','; - } - } - $forms .= '
'; - $formssql = addslashes($forms); - $query = "REPLACE INTO #@__advancedsearch(mid, maintable, mainfields, addontable, addonfields, forms, template) VALUES('$mid','$maintable','$mainstring','$addontable','$addonstring','$formssql', '$template')"; - $dsql->ExecuteNoneQuery($query); - $formshtml = dede_htmlspecialchars($forms); - echo ''; - echo "下面为生成的html表单,请自行复制,根据自己需求修改样式后粘贴到对应的模板中

"; - echo '
预览:

'; - echo $forms; - } - exit; -} -//删除自定义搜索; -else if ($dopost == 'del') { - $mid = intval($mid); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__advancedsearch` WHERE mid = '$mid'; "); - ShowMsg("成功删除一个自定义搜索", "mychannel_main.php"); - exit(); -} -$row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' "); -require_once(DEDEADMIN."/templets/mychannel_edit.htm"); +ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=1 WHERE id='$id' "); + ShowMsg("操作成功", "mychannel_main.php"); + exit(); +} else if ($dopost == "hide") { + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=0 WHERE id='$id'"); + ShowMsg("操作成功", "mychannel_main.php"); + exit(); +} +/*---------------- +function __CopyStart() +-----------------*/ else if ($dopost == "copystart") { + if ($id == -1) { + ShowMsg("专题模型不支持复制", "-1"); + exit(); + } + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); + if ($row['id'] > -1) { + $nrow = $dsql->GetOne("SELECT MAX(id) AS id FROM `#@__channeltype` LIMIT 0,1 "); + $newid = $nrow['id'] + 1; + if ($newid < 10) { + $newid = $newid + 10; + } + $idname = $newid; + } else { + $nrow = $dsql->GetOne("SELECT MIN(id) AS id FROM `#@__channeltype` LIMIT 0,1 "); + $newid = $nrow['id'] - 1; + if ($newid < -10) { + $newid = $newid - 10; + } + $idname = 'w'.($newid * -1); + } + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); + $wintitle = "频道管理-模型复制"; + $wecome_info = " 频道管理 - 模型复制"; + $win = new OxWindow(); + $win->Init("mychannel_edit.php", "js/blank.js", "post"); + $win->AddTitle(" 被复制频道: [".$row['typename']."]"); + $win->AddHidden("cid", $id); + $win->AddHidden("id", $id); + $win->AddHidden("dopost", 'copysave'); + $msg = " + + + + + + + + + + + + + + + + + + + + + +
新频道id:
新频道名称:
新频道标识:
新附加表:
复制模板: + +   + +
+ "; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("ok", ""); + $win->Display(); + exit(); +} +/*---------------- +function __Export() +-----------------*/ else if ($dopost == "export") { + if ($id == -1) { + ShowMsg("专题模型不支持导出", "-1"); + exit(); + } + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' "); + $channelconfig = ''; + $row['maintable'] = preg_replace('#dede_#', '#@__', $row['maintable']); + $row['addtable'] = preg_replace('#dede_#', '#@__', $row['addtable']); + foreach ($row as $k => $v) { + if ($k == 'fieldset') $v = "\r\n$v\r\n"; + $channelconfig .= "$v\r\n"; + } + $wintitle = "导出内容模型规则"; + $wecome_info = "内容模型管理::导出内容模型规则"; + $win = new OxWindow(); + $win->Init(); + $win->AddTitle("以下为规则 [{$row['typename']}] 的模型规则,您可以共享给您的朋友:"); + $winform = $win->GetWindow("hand", ""); + $win->Display(); + exit(); +} +/*---------------- +function __ExportIn() +-----------------*/ else if ($dopost == "exportin") { + $wintitle = "导入内容模型规则"; + $wecome_info = "内容模型管理::导入内容模型规则"; + $win = new OxWindow(); + $win->Init("mychannel_edit.php", "js/blank.js", "post"); + $win->AddHidden("dopost", "exportinok"); + $win->AddTitle("输入规则内容:(导入模型会和原有模型冲突,不过可以在导入后修改)"); + $win->AddMsgItem(""); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); +} +/*---------------- +function __ExportInOk() +-----------------*/ else if ($dopost == "exportinok") { + require_once(DEDEADMIN."/inc/inc_admin_channel.php"); + function GotoStaMsg($msg) + { + global $wintitle, $wecome_info, $winform; + $wintitle = "导入内容模型规则"; + $wecome_info = "内容模型管理::导入内容模型规则"; + $win = new OxWindow(); + $win->Init(); + $win->AddTitle("操作状态提示:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand"); + $win->Display(); + exit(); + } + + $msg = "无信息"; + $exconfig = stripslashes($exconfig); + + $dtp = new DedeTagParse(); + $dtp->SetNameSpace('channel', '<', '>'); + $dtp->LoadSource($exconfig); + + if (!is_array($dtp->CTags)) GotoStaMsg("模型规则不是合法的Dede模型规则"); + + $fields = array(); + foreach ($dtp->CTags as $ctag) { + $fname = $ctag->GetName('name'); + $fields[$fname] = trim($ctag->GetInnerText()); + } + + if (!isset($fields['nid']) || !isset($fields['fieldset'])) { + GotoStaMsg("模型规则不是合法的Dede模型规则"); + } + + //正常的导入过程 + $mysql_version = $dsql->GetVersion(true); + + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE nid='{$fields['nid']}' "); + if (is_array($row)) { + GotoStaMsg("系统中已经存在相同标识 {$fields['nid']} 的规则"); + } + + //创建表 + if ($fields['issystem'] != -1) { + $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}`( + `aid` int(11) NOT NULL default '0', + `typeid` int(11) NOT NULL default '0', + `redirecturl` varchar(255) NOT NULL default '', + `templet` varchar(30) NOT NULL default '', + `userip` char(15) NOT NULL default '',"; + } else { + $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}`( + `aid` int(11) NOT NULL default '0', + `typeid` int(11) NOT NULL default '0', + `channel` SMALLINT NOT NULL DEFAULT '0', + `arcrank` SMALLINT NOT NULL DEFAULT '0', + `mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', + `click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', + `title` varchar(60) NOT NULL default '', + `senddate` int(11) NOT NULL default '0', + `flag` set('c','h','p','f','s','j','a','b') default NULL,"; + } + if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; + } else { + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + $rs = $dsql->ExecuteNoneQuery($tabsql); + if (!$rs) { + GotoStaMsg("创建表失败!".$dsql->GetError()); + exit(); + } + + if ($fields['issystem'] == 1) $fields['issystem'] = 0; + if ($fields['issystem'] == 0) { + $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC "); + $fields['newid'] = $row['id'] + 1; + } else { + $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id ASC "); + $fields['newid'] = $row['id'] - 1; + } + + $fieldset = $fields['fieldset']; + $fields['fieldset'] = addslashes($fields['fieldset']); + + $inquery = " INSERT INTO `#@__channeltype`(`id` , `nid` , `typename` , `addtable` , `addcon` , + `mancon` , `editcon` , `useraddcon` , `usermancon` , `usereditcon` , + `fieldset` , `listfields` , `issystem` , `isshow` , `issend` , + `arcsta`,`usertype` , `sendrank` ) + VALUES('{$fields['newid']}' , '{$fields['nid']}' , '{$fields['typename']}' , '{$fields['addtable']}' , '{$fields['addcon']}' , + '{$fields['mancon']}' , '{$fields['editcon']}' , '{$fields['useraddcon']}' , '{$fields['usermancon']}' , '{$fields['usereditcon']}' , + '{$fields['fieldset']}' , '{$fields['listfields']}' , '{$fields['issystem']}' , '{$fields['isshow']}' , '{$fields['issend']}' , + '{$fields['arcsta']}' , '{$fields['usertype']}' , '{$fields['sendrank']}' ); "; + + $rs = $dsql->ExecuteNoneQuery($inquery); + + if (!$rs) GotoStaMsg("导入模型时发生错误".$dsql->GetError()); + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($fieldset); + $allfields = ''; + if (is_array($dtp->CTags)) { + foreach ($dtp->CTags as $ctag) { + //检测被修改的字段类型 + $dtype = $ctag->GetAtt('type'); + $fieldname = $ctag->GetName(); + $dfvalue = $ctag->GetAtt('default'); + $islist = $ctag->GetAtt('islist'); + $mxlen = $ctag->GetAtt('maxlength'); + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + if ($islist != '') { + $allfields .= ($allfields == '' ? $fieldname : ','.$fieldname); + } + $dsql->ExecuteNoneQuery(" ALTER TABLE `{$fields['addtable']}` ADD $ntabsql "); + } + } + + if ($allfields != '') { + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET listfields='$allfields' WHERE id='{$fields['newid']}' "); + } + GotoStaMsg("成功导入一个模型"); +} +/*---------------- +function __SaveCopy() +-----------------*/ else if ($dopost == "copysave") { + $cid = intval($cid); + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$cid' ", MYSQL_ASSOC); + foreach ($row as $k => $v) { + ${strtolower($k)} = addslashes($v); + } + $inquery = " INSERT INTO `#@__channeltype`(`id` , `nid` , `typename` , `addtable` , `addcon` , + `mancon` , `editcon` , `useraddcon` , `usermancon` , `usereditcon` , `fieldset` , `listfields` , + `issystem` , `isshow` , `issend` , `arcsta`,`usertype` , `sendrank` ) + VALUES('$newid' , '$newnid' , '$newtypename' , '$newaddtable' , '$addcon' , + '$mancon' , '$editcon' , '$useraddcon' , '$usermancon' , '$usereditcon' , '$fieldset' , '$listfields' , + '$issystem' , '$isshow' , '$issend' , '$arcsta','$usertype' , '$sendrank' ); + "; + $mysql_version = $dsql->GetVersion(TRUE); + if (!$dsql->IsTable($newaddtable)) { + $dsql->Execute('me', "SHOW CREATE TABLE {$dsql->dbName}.{$addtable}"); + $row = $dsql->GetArray('me', MYSQL_BOTH); + $tableStruct = $row[1]; + $tb = str_replace('#@__', $cfg_dbprefix, $addtable); + $tableStruct = preg_replace("/CREATE TABLE `$addtable`/iU", "CREATE TABLE `$newaddtable`", $tableStruct); + $dsql->ExecuteNoneQuery($tableStruct); + } + if ($copytemplet == 1) { + $tmpletdir = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style; + copy("{$tmpletdir}/article_{$nid}.htm", "{$tmpletdir}/{$newnid}_article.htm"); + copy("{$tmpletdir}/list_{$nid}.htm", "{$tmpletdir}/{$newnid}_list.htm"); + copy("{$tmpletdir}/index_{$nid}.htm", "{$tmpletdir}/{$newnid}_index.htm"); + } + $rs = $dsql->ExecuteNoneQuery($inquery); + if ($rs) { + ShowMsg("成功复制模型,现转到详细参数页... ", "mychannel_edit.php?id={$newid}&dopost=edit"); + exit(); + } else { + $errv = $dsql->GetError(); + ShowMsg("系统出错,请把错误代码发送到官方论坛,以检查原因
错误代码:mychannel_edit.php?dopost=savecopy $errv", "javascript:;"); + exit(); + } +} +/*------------ +function __SaveEdit() +------------*/ else if ($dopost == "save") { + $fieldset = preg_replace("#[\r\n]{1,}#", "\r\n", $fieldset); + $usertype = empty($usertype) ? '' : $usertype; + + $query = "Update `#@__channeltype` set + typename = '$typename', + addtable = '$addtable', + addcon = '$addcon', + mancon = '$mancon', + editcon = '$editcon', + useraddcon = '$useraddcon', + usermancon = '$usermancon', + usereditcon = '$usereditcon', + fieldset = '$fieldset', + listfields = '$listfields', + issend = '$issend', + arcsta = '$arcsta', + usertype = '$usertype', + sendrank = '$sendrank', + needdes = '$needdes', + needpic = '$needpic', + titlename = '$titlename', + onlyone = '$onlyone', + dfcid = '$dfcid' + where id='$id' "; + if (trim($fieldset) != '') { + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource(stripslashes($fieldset)); + if (!is_array($dtp->CTags)) { + ShowMsg("文本配置参数无效,无法进行解析", "-1"); + exit(); + } + } + $trueTable = str_replace("#@__", $cfg_dbprefix, $addtable); + if (!$dsql->IsTable($trueTable)) { + ShowMsg("系统找不到您所指定的表 $trueTable ,请手工创建这个表", "-1"); + exit(); + } + $dsql->ExecuteNoneQuery($query); + ShowMsg("成功修改一个模型", "mychannel_main.php"); + exit(); +} +/*-------------------- +function __GetTemplate() +--------------------*/ else if ($dopost == "gettemplets") { + require_once(DEDEINC."/oxwindow.class.php"); + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); + $wintitle = " 频道管理-查看模板"; + $wecome_info = "频道管理::查看模板"; + $win = new OxWindow(); + $win->Init("", "js/blank.js", ""); + $win->AddTitle(" 频道:(".$row['typename'].")默认模板文件说明:"); + $defaulttemplate = $cfg_templets_dir.'/'.$cfg_df_style; + $msg = " + 文档模板:{$defaulttemplate}/article_{$row['nid']}.htm + [修改]
+ 列表模板:{$defaulttemplate}/list_{$row['nid']}.htm + [修改] +
+ 频道封面模板:{$defaulttemplate}/index_{$row['nid']}.htm + [修改] + "; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("hand", ""); + $win->Display(); + exit(); +} +/*-------------------- +function __Delete() +--------------------*/ else if ($dopost == "delete") { + CheckPurview('c_Del'); + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); + if ($row['issystem'] == 1) { + ShowMsg("系统模型不允许删除", "mychannel_main.php"); + exit(); + } + if (empty($job)) $job = ""; + + if ($job == "") //确认提示 + { + require_once(DEDEINC."/oxwindow.class.php"); + $wintitle = "频道管理-删除模型"; + $wecome_info = "频道管理::删除模型"; + $win = new OxWindow(); + $win->Init("mychannel_edit.php", "js/blank.js", "POST"); + $win->AddHidden("job", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("id", $id); + $win->AddTitle("您确实要删除 (".$row['typename'].") 这个频道?"); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); + } else if ($job == "yes") //操作 + { + require_once(DEDEINC."/typeunit.class.admin.php"); + $myrow = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$id'", MYSQL_ASSOC); + if (!is_array($myrow)) { + ShowMsg('您所指定的频道信息不存在!', '-1'); + exit(); + } + + //检查频道的表是否独占数据表 + $addtable = str_replace($cfg_dbprefix, '', str_replace('#@__', $cfg_dbprefix, $myrow['addtable'])); + $row = $dsql->GetOne("SELECT COUNT(id) AS dd FROM `#@__channeltype` WHERE addtable like '{$cfg_dbprefix}{$addtable}' OR addtable LIKE CONCAT('#','@','__','$addtable') ; "); + $isExclusive2 = ($row['dd'] > 1 ? 0 : 1); + + //获取与频道关连的所有栏目id + $tids = ''; + $dsql->Execute('qm', "SELECT id FROM `#@__arctype` WHERE channeltype='$id'"); + while ($row = $dsql->GetArray('qm')) { + $tids .= ($tids == '' ? $row['id'] : ','.$row['id']); + } + + //删除相关信息 + if ($tids != '') { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE typeid IN($tids); "); + $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['maintable']}` WHERE typeid IN($tids); "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__spec` WHERE typeid IN ($tids); "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE typeid IN ($tids); "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id IN ($tids); "); + } + + //删除附加表或附加表内的信息 + if ($isExclusive2 == 1) { + $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$cfg_dbprefix}{$addtable}`;"); + } else { + if ($tids != '' && $myrow['addtable'] != '') { + $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['addtable']}` WHERE typeid IN ($tids); "); + } + } + + //删除频道配置信息 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__channeltype` WHERE id='$id' "); + + //更新栏目缓存 + UpDateCatCache($dsql); + ShowMsg("成功删除一个模型", "mychannel_main.php"); + exit(); + } +} //del +/*---------------- +function __modifysearch() +-----------------*/ else if ($dopost == 'modifysearch') { + if (!isset($step)) $step = 0; + if (empty($step)) { + $step = 1; + $mid = intval($mid); + $query = "SELECT mainfields, addonfields, template FROM `#@__advancedsearch` WHERE mid='$mid'"; + $searchinfo = $dsql->GetOne($query); + if (!is_array($searchinfo)) { + $searchinfo = array(); + $searchinfo['mainfields'] = $searchinfo['addonfields'] = $searchinfo['template'] = ''; + } + $searchinfo['mainfields'] = explode(',', $searchinfo['mainfields']); + $searchinfo['addonfields'] = explode(',', $searchinfo['addonfields']); + $addonfieldsarr = array(); + foreach ($searchinfo['addonfields'] as $k) { + $karr = explode(':', $k); + $addonfieldsarr[] = $karr[0]; + } + $template = $searchinfo['template'] == '' ? 'advancedsearch.htm' : $searchinfo['template']; + $c1 = in_array('iscommend', $searchinfo['mainfields']) ? 'checked' : ''; + $c2 = in_array('typeid', $searchinfo['mainfields']) ? 'checked' : ''; + $c3 = in_array('writer', $searchinfo['mainfields']) ? 'checked' : ''; + $c4 = in_array('source', $searchinfo['mainfields']) ? 'checked' : ''; + $c5 = in_array('senddate', $searchinfo['mainfields']) ? 'checked' : ''; + + $mainfields = ' '; + $mainfields .= ' '; + + $mainfields .= ' '; + $mainfields .= ' '; + $mainfields .= ' '; + /* + $mainfields .= ''; + $mainfields .= ''; + $mainfields .= ''; + $mainfields .= ''; + $mainfields .= ''; + */ + $query = "SELECT * FROM `#@__channeltype` WHERE id='$mid'"; + $channel = $dsql->GetOne($query); + + $searchtype = array('int', 'datetime', 'float', 'textdata', 'textchar', 'text', 'htmltext', 'multitext', 'select', 'radio', 'checkbox'); + $addonfields = ''; + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($channel['fieldset']); + if ($channel['issystem'] < 0) { + $checked = in_array('typeid', $addonfieldsarr) ? 'checked' : ''; + $addonfields .= ' '; + $checked = in_array('senddate', $addonfieldsarr) ? 'checked' : ''; + $addonfields .= ' '; + } + if (is_array($dtp->CTags) && !empty($dtp->CTags)) { + foreach ($dtp->CTags as $ctag) { + $datatype = $ctag->GetAtt('type'); + $value = $ctag->GetName(); + if ($channel['issystem'] < 0) { + $_oo = array('channel', 'arcrank', 'title', 'senddate', 'mid', 'click', 'flag', 'litpic', 'userip', 'lastpost', 'scores', 'goodpost', 'badpost', 'endtime'); + if (in_array($value, $_oo)) continue; + } + + $label = $ctag->GetAtt('itemname'); + if (in_array($datatype, $searchtype)) { + $checked = in_array($value, $addonfieldsarr) ? 'checked' : ''; + $addonfields .= " "; + } + } + } + require_once(dirname(__FILE__)."/templets/mychannel_modifysearch.htm"); + } else if ($step == 1) { + $query = "SELECT * FROM `#@__channeltype` WHERE id='$mid'"; + $channel = $dsql->GetOne($query); + if (empty($addonfields)) { + $addonfields = ''; + } + $template = trim($template); + $forms = '
'; + $forms .= ""; + $forms .= ""; + $forms .= "关键词:
"; + $mainstring = ''; + if (!empty($mainfields) && is_array($mainfields)) { + $mainstring = implode(',', $mainfields); + foreach ($mainfields as $mainfield) { + if ($mainfield == 'typeid') { + require_once(dirname(__FILE__)."/../include/typelink.class.php"); + $tl = new TypeLink(0); + $typeOptions = $tl->GetOptionArray(0, 0, $mid); + $forms .= "
栏目:"; + $forms .= "
"; + } else if ($mainfield == 'iscommend') { + $forms .= "
"; + } else if ($mainfield == 'writer') { + $forms .= "作者:
"; + } else if ($mainfield == 'source') { + $forms .= "来源:
"; + } else if ($mainfield == 'senddate') { + $forms .= "开始时间:
"; + $forms .= "结束时间:
"; + } + } + } + + $addonstring = ''; + $intarr = array('int', 'float'); + $textarr = array('textdata', 'textchar', 'text', 'htmltext', 'multitext'); + + if ($channel['issystem'] < 0) { + foreach ($addonfields as $addonfield) { + if ($addonfield == 'typeid') { + require_once(dirname(__FILE__)."/../include/typelink.class.php"); + $tl = new TypeLink(0); + $typeOptions = $tl->GetOptionArray(0, 0, $mid); + $forms .= "
栏目:"; + $forms .= "
"; + $addonstring .= 'typeid:int,'; + } elseif ($addonfield == 'senddate') { + $forms .= "开始时间:
"; + $forms .= "结束时间:
"; + $addonstring .= 'senddate:datetime,'; + } + } + } + + if (is_array($addonfields) && !empty($addonfields)) { + $query = "SELECT * FROM #@__channeltype WHERE id='$mid'"; + $channel = $dsql->GetOne($query); + + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($channel['fieldset']); + $fieldarr = $itemarr = $typearr = array(); + foreach ($dtp->CTags as $ctag) { + foreach ($addonfields as $addonfield) { + + if ($ctag->GetName() == $addonfield) { + if ($addonfield == 'typeid' || $addonfield == 'senddate') continue; + + $fieldarr[] = $addonfield; + $itemarr[] = $ctag->GetAtt('itemname'); + $typearr[] = $ctag->GetAtt('type'); + $valuearr[] = $ctag->GetAtt('default'); + } + } + } + + foreach ($fieldarr as $k => $field) { + $itemname = $itemarr[$k]; + $name = $field; + $type = $typearr[$k]; + $tmp = $name.':'.$type; + if (in_array($type, $intarr)) { + $forms .= "
$itemname :
"; + } else if (in_array($type, $textarr)) { + $forms .= "$itemname :
"; + } else if ($type == 'select') { + $values = explode(',', $valuearr[$k]); + if (is_array($values) && !empty($values)) { + $forms .= "
$itemname : "; + } + } else if ($type == 'radio') { + $values = explode(',', $valuearr[$k]); + if (is_array($values) && !empty($values)) { + $forms .= "
$itemname : "; + foreach ($values as $value) { + $forms .= ""; + } + } + } else if ($type == 'checkbox') { + $values = explode(',', $valuearr[$k]); + if (is_array($values) && !empty($values)) { + $forms .= "
$itemname : "; + foreach ($values as $value) { + $forms .= ""; + } + } + } elseif ($type == 'datetime') { + $forms .= "
开始时间:
"; + $forms .= "结束时间:
"; + } else { + $tmp = ''; + } + $addonstring .= $tmp.','; + } + } + $forms .= '
'; + $formssql = addslashes($forms); + $query = "REPLACE INTO #@__advancedsearch(mid, maintable, mainfields, addontable, addonfields, forms, template) VALUES('$mid','$maintable','$mainstring','$addontable','$addonstring','$formssql', '$template')"; + $dsql->ExecuteNoneQuery($query); + $formshtml = dede_htmlspecialchars($forms); + echo ''; + echo "下面为生成的html表单,请自行复制,根据自己需求修改样式后粘贴到对应的模板中

"; + echo '
预览:

'; + echo $forms; + } + exit; +} +//删除自定义搜索; +else if ($dopost == 'del') { + $mid = intval($mid); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__advancedsearch` WHERE mid = '$mid'; "); + ShowMsg("成功删除一个自定义搜索", "mychannel_main.php"); + exit(); +} +$row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' "); +require_once(DEDEADMIN."/templets/mychannel_edit.htm"); diff --git a/src/dede/mychannel_field_add.php b/src/admin/mychannel_field_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mychannel_field_add.php rename to src/admin/mychannel_field_add.php index a711d1ea..23d8e689 --- a/src/dede/mychannel_field_add.php +++ b/src/admin/mychannel_field_add.php @@ -1,148 +1,147 @@ -GetVersion(); - -/*---------------------- -function Save() ----------------------*/ -if ($action == 'save') { - //修改字段配置信息 - $dfvalue = trim($vdefault); - $isnull = ($isnull == 1 ? "true" : "false"); - $mxlen = $maxlength; - - - if (preg_match("#^(select|radio|checkbox)$#i", $dtype)) { - if (!preg_match("#,#", $dfvalue)) { - ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); - exit(); - } - } - - if ($dtype == 'stepselect') { - $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fieldname' "); - if (!is_array($arr)) { - ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); - exit(); - } - } - - //模型信息 - $row = $dsql->GetOne("SELECT fieldset,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); - $fieldset = $row['fieldset']; - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($fieldset); - $trueTable = $row['addtable']; - - //检测被修改的字段类型 - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - $rs = $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` ADD $ntabsql "); - if (!$rs) { - $gerr = $dsql->GetError(); - ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); - exit(); - } - - //检测旧配置信息,并替换为新配置 - $ok = FALSE; - $fieldname = strtolower($fieldname); - if (is_array($dtp->CTags)) { - foreach ($dtp->CTags as $tagid => $ctag) { - if ($fieldname == strtolower($ctag->GetName())) { - $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); - $ok = true; - break; - } - } - $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); - } else { - $oksetting = $fieldset."\r\n".stripslashes($fieldstring); - } - - $addlist = GetAddFieldList($dtp, $oksetting); - $oksetting = addslashes($oksetting); - $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); - if (!$rs) { - $grr = $dsql->GetError(); - ShowMsg("保存节点配置出错".$grr, "javascript:;"); - exit(); - } - - ShowMsg("成功增加一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); - exit(); -} - -/*---------------------- -function ShowPage() ----------------------*/ -//检测模型相关信息,并初始化相关数据 -$row = $dsql->GetOne("SELECT '#@__archives' AS maintable,addtable FROM `#@__channeltype` WHERE id='$id'"); - -$trueTable = $row['addtable']; -$tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; - -if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; -} else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; -} - -$dsql->ExecuteNoneQuery($tabsql); - -//检测附加表里含有的字段 -$fields = array(); - -if (empty($row['maintable'])) $row['maintable'] = '#@__archives'; - -$rs = $dsql->SetQuery("SHOW fields FROM `{$row['maintable']}`"); -$dsql->Execute('a'); -while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - if ($cfg_dbtype == 'sqlite') { - $nrow['Field'] = $nrow['name']; - } - $fields[strtolower($nrow['Field'])] = 1; -} - -$dsql->Execute("a", "SHOW fields FROM `{$row['addtable']}`"); -while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - if ($cfg_dbtype == 'sqlite') { - $nrow['Field'] = $nrow['name']; - } - if (!isset($fields[strtolower($nrow['Field'])])) { - $fields[strtolower($nrow['Field'])] = 1; - } -} - -$f = ''; -foreach ($fields as $k => $v) { - $f .= ($f == '' ? $k : ' '.$k); -} - -// 获取频道模型 -$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $channelArray[$row->id]['typename'] = $row->typename; - $channelArray[$row->id]['nid'] = $row->nid; -} - -require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); +GetVersion(); + +/*---------------------- +function Save() +---------------------*/ +if ($action == 'save') { + //修改字段配置信息 + $dfvalue = trim($vdefault); + $isnull = ($isnull == 1 ? "true" : "false"); + $mxlen = $maxlength; + + + if (preg_match("#^(select|radio|checkbox)$#i", $dtype)) { + if (!preg_match("#,#", $dfvalue)) { + ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); + exit(); + } + } + + if ($dtype == 'stepselect') { + $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fieldname' "); + if (!is_array($arr)) { + ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); + exit(); + } + } + + //模型信息 + $row = $dsql->GetOne("SELECT fieldset,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); + $fieldset = $row['fieldset']; + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($fieldset); + $trueTable = $row['addtable']; + + //检测被修改的字段类型 + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + $rs = $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` ADD $ntabsql "); + if (!$rs) { + $gerr = $dsql->GetError(); + ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); + exit(); + } + + //检测旧配置信息,并替换为新配置 + $ok = FALSE; + $fieldname = strtolower($fieldname); + if (is_array($dtp->CTags)) { + foreach ($dtp->CTags as $tagid => $ctag) { + if ($fieldname == strtolower($ctag->GetName())) { + $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); + $ok = true; + break; + } + } + $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); + } else { + $oksetting = $fieldset."\r\n".stripslashes($fieldstring); + } + + $addlist = GetAddFieldList($dtp, $oksetting); + $oksetting = addslashes($oksetting); + $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); + if (!$rs) { + $grr = $dsql->GetError(); + ShowMsg("保存节点配置出错".$grr, "javascript:;"); + exit(); + } + + ShowMsg("成功增加一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); + exit(); +} + +/*---------------------- +function ShowPage() +---------------------*/ +//检测模型相关信息,并初始化相关数据 +$row = $dsql->GetOne("SELECT '#@__archives' AS maintable,addtable FROM `#@__channeltype` WHERE id='$id'"); + +$trueTable = $row['addtable']; +$tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; + +if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; +} else { + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; +} + +$dsql->ExecuteNoneQuery($tabsql); + +//检测附加表里含有的字段 +$fields = array(); + +if (empty($row['maintable'])) $row['maintable'] = '#@__archives'; + +$rs = $dsql->SetQuery("SHOW fields FROM `{$row['maintable']}`"); +$dsql->Execute('a'); +while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + if ($cfg_dbtype == 'sqlite') { + $nrow['Field'] = $nrow['name']; + } + $fields[strtolower($nrow['Field'])] = 1; +} + +$dsql->Execute("a", "SHOW fields FROM `{$row['addtable']}`"); +while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + if ($cfg_dbtype == 'sqlite') { + $nrow['Field'] = $nrow['name']; + } + if (!isset($fields[strtolower($nrow['Field'])])) { + $fields[strtolower($nrow['Field'])] = 1; + } +} + +$f = ''; +foreach ($fields as $k => $v) { + $f .= ($f == '' ? $k : ' '.$k); +} + +//获取频道模型 +$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $channelArray[$row->id]['typename'] = $row->typename; + $channelArray[$row->id]['nid'] = $row->nid; +} + +require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); diff --git a/src/dede/mychannel_field_edit.php b/src/admin/mychannel_field_edit.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/mychannel_field_edit.php rename to src/admin/mychannel_field_edit.php index 60921f29..d36c549e --- a/src/dede/mychannel_field_edit.php +++ b/src/admin/mychannel_field_edit.php @@ -1,150 +1,149 @@ -GetVersion(); - -//获取模型信息 -$row = $dsql->GetOne("SELECT fieldset,'' as maintable,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); -$fieldset = $row['fieldset']; -$trueTable = $row['addtable']; - -$dtp = new DedeTagParse(); -$dtp->SetNameSpace("field", "<", ">"); -$dtp->LoadSource($fieldset); -foreach ($dtp->CTags as $ctag) { - if (strtolower($ctag->GetName()) == strtolower($fname)) break; -} - -//字段类型信息 -$ds = file(dirname(__FILE__)."/inc/fieldtype.txt"); -foreach ($ds as $d) { - $dds = explode(',', trim($d)); - $fieldtypes[$dds[0]] = $dds[1]; -} - -// 获取频道模型 -$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); -$dsql->Execute(); -while ($crow = $dsql->GetObject()) { - $channelArray[$crow->id]['typename'] = $crow->typename; - $channelArray[$crow->id]['nid'] = $crow->nid; -} - -//保存更改 -/*-------------------- -function _SAVE() -----------------------*/ -if ($action == 'save') { - if (!isset($fieldtypes[$dtype])) { - ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); - exit(); - } - - $dfvalue = $vdefault; - if (preg_match("#^(select|radio|checkbox)#", $dtype)) { - if (!preg_match("#,#", $dfvalue)) { - ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); - exit(); - } - } - - if ($dtype == 'stepselect') { - $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fname' "); - if (!is_array($arr)) { - ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); - exit(); - } - } - - //检测数据库是否存在附加表,不存在则新建一个 - $tabsql = "CREATE TABLE IF NOT EXISTS `{$row['addtable']}`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; - if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; - } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - $dsql->ExecuteNoneQuery($tabsql); - - //检测附加表里含有的字段 - $fields = array(); - $rs = $dsql->SetQuery("SHOW fields FROM `{$row['addtable']}`"); - $dsql->Execute('a'); - while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - $fields[strtolower($nrow['Field'])] = $nrow['Type']; - } - - //修改字段配置信息 - $isnull = ($isnull == 1 ? "true" : "false"); - $mxlen = $maxlength; - $fieldname = strtolower($fname); - - //检测被修改的字段类型,并更新数据表 - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - $tabsql = ''; - - //检测旧数据类型,并替换为新配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if ($fieldname == strtolower($ctag->GetName())) { - if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { - $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; - $dsql->ExecuteNoneQuery($tabsql); - } else if (!isset($fields[$fieldname])) { - $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; - $dsql->ExecuteNoneQuery($tabsql); - } else { - $tabsql = ''; - } - $dtp->Assign($tagid, stripslashes($fieldstring), false); - break; - } - } - $oksetting = $dtp->GetResultNP(); - - $addlist = GetAddFieldList($dtp, $oksetting); - $oksetting = addslashes($oksetting); - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); - - ShowMsg("成功更改一个字段的配置", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); - exit(); -} -/*------------------ -删除字段 -function _DELETE() --------------------*/ else if ($action == "delete") { - if ($row['issystem'] == 1) { - ShowMsg("对不起,系统模型的字段不允许删除", "-1"); - exit(); - } - - //检测旧数据类型,并替换为新配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if (strtolower($ctag->GetName()) == strtolower($fname)) { - $dtp->Assign($tagid, "#@Delete@#"); - } - } - - $oksetting = addslashes($dtp->GetResultNP()); - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting' WHERE id='$id' "); - $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); - ShowMsg("成功删除一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); - exit(); -} - -require_once(DEDEADMIN."/templets/mychannel_field_edit.htm"); +GetVersion(); + +//获取模型信息 +$row = $dsql->GetOne("SELECT fieldset,'' as maintable,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); +$fieldset = $row['fieldset']; +$trueTable = $row['addtable']; + +$dtp = new DedeTagParse(); +$dtp->SetNameSpace("field", "<", ">"); +$dtp->LoadSource($fieldset); +foreach ($dtp->CTags as $ctag) { + if (strtolower($ctag->GetName()) == strtolower($fname)) break; +} + +//字段类型信息 +$ds = file(dirname(__FILE__)."/inc/fieldtype.txt"); +foreach ($ds as $d) { + $dds = explode(',', trim($d)); + $fieldtypes[$dds[0]] = $dds[1]; +} + +//获取频道模型 +$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while ($crow = $dsql->GetObject()) { + $channelArray[$crow->id]['typename'] = $crow->typename; + $channelArray[$crow->id]['nid'] = $crow->nid; +} + +//保存修改 +/*-------------------- +function _SAVE() +----------------------*/ +if ($action == 'save') { + if (!isset($fieldtypes[$dtype])) { + ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); + exit(); + } + + $dfvalue = $vdefault; + if (preg_match("#^(select|radio|checkbox)#", $dtype)) { + if (!preg_match("#,#", $dfvalue)) { + ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); + exit(); + } + } + + if ($dtype == 'stepselect') { + $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fname' "); + if (!is_array($arr)) { + ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); + exit(); + } + } + + //检测数据库是否存在附加表,不存在则新建一个 + $tabsql = "CREATE TABLE IF NOT EXISTS `{$row['addtable']}`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; + if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; + } else { + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + $dsql->ExecuteNoneQuery($tabsql); + + //检测附加表里含有的字段 + $fields = array(); + $rs = $dsql->SetQuery("SHOW fields FROM `{$row['addtable']}`"); + $dsql->Execute('a'); + while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + $fields[strtolower($nrow['Field'])] = $nrow['Type']; + } + + //修改字段配置信息 + $isnull = ($isnull == 1 ? "true" : "false"); + $mxlen = $maxlength; + $fieldname = strtolower($fname); + + //检测被修改的字段类型,并更新数据表 + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + $tabsql = ''; + + //检测旧数据类型,并替换为新配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if ($fieldname == strtolower($ctag->GetName())) { + if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { + $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; + $dsql->ExecuteNoneQuery($tabsql); + } else if (!isset($fields[$fieldname])) { + $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; + $dsql->ExecuteNoneQuery($tabsql); + } else { + $tabsql = ''; + } + $dtp->Assign($tagid, stripslashes($fieldstring), false); + break; + } + } + $oksetting = $dtp->GetResultNP(); + + $addlist = GetAddFieldList($dtp, $oksetting); + $oksetting = addslashes($oksetting); + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); + + ShowMsg("成功修改一个字段的配置", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); + exit(); +} +/*------------------ +删除字段 +function _DELETE() +-------------------*/ else if ($action == "delete") { + if ($row['issystem'] == 1) { + ShowMsg("对不起,系统模型的字段不允许删除", "-1"); + exit(); + } + + //检测旧数据类型,并替换为新配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if (strtolower($ctag->GetName()) == strtolower($fname)) { + $dtp->Assign($tagid, "#@Delete@#"); + } + } + + $oksetting = addslashes($dtp->GetResultNP()); + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting' WHERE id='$id' "); + $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); + ShowMsg("成功删除一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); + exit(); +} + +require_once(DEDEADMIN."/templets/mychannel_field_edit.htm"); diff --git a/src/dede/mychannel_main.php b/src/admin/mychannel_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mychannel_main.php rename to src/admin/mychannel_main.php index 015143ad..44e765ca --- a/src/dede/mychannel_main.php +++ b/src/admin/mychannel_main.php @@ -1,35 +1,34 @@ -SetTemplet(DEDEADMIN."/templets/mychannel_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); - -function GetSta($sta, $id) -{ - if ($sta == 1) { - return ($id != -1 ? "启用 > 禁用" : "固定项目"); - } else { - return "禁用 > 启用"; - } -} - -function IsSystem($s) -{ - return $s == 1 ? "系统" : "自动"; -} +SetTemplet(DEDEADMIN."/templets/mychannel_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); + +function GetSta($sta, $id) +{ + if ($sta == 1) { + return ($id != -1 ? "启用 > 禁用" : "固定项目"); + } else { + return "禁用 > 启用"; + } +} + +function IsSystem($s) +{ + return $s == 1 ? "系统" : "自动"; +} diff --git a/src/dede/mynews_add.php b/src/admin/mynews_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mynews_add.php rename to src/admin/mynews_add.php index 4e168385..3785d336 --- a/src/dede/mynews_add.php +++ b/src/admin/mynews_add.php @@ -1,24 +1,23 @@ -ExecuteNoneQuery($query); - ShowMsg("成功发布一条站内新闻", "mynews_main.php"); - exit(); -} -include DedeInclude('templets/mynews_add.htm'); +ExecuteNoneQuery($query); + ShowMsg("成功发布一条站内新闻", "mynews_main.php"); + exit(); +} +include DedeInclude('templets/mynews_add.htm'); diff --git a/src/dede/mynews_edit.php b/src/admin/mynews_edit.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/mynews_edit.php rename to src/admin/mynews_edit.php index f3e3fb40..a7f8e31a --- a/src/dede/mynews_edit.php +++ b/src/admin/mynews_edit.php @@ -1,28 +1,27 @@ -ExecuteNoneQuery("DELETE FROM #@__mynews WHERE aid='$aid';"); - ShowMsg("成功删除一条站内新闻", "mynews_main.php"); - exit(); -} else if ($dopost == "editsave") { - $inquery = "UPDATE #@__mynews SET title='$title',typeid='$typeid',writer='$writer',senddate='".GetMKTime($sdate)."',body='$body' WHERE aid='$aid';"; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功更改一条站内新闻", "mynews_main.php"); - exit(); -} -$myNews = $dsql->GetOne("SELECT #@__mynews.*,#@__arctype.typename FROM #@__mynews LEFT JOIN #@__arctype ON #@__arctype.id=#@__mynews.typeid WHERE #@__mynews.aid='$aid';"); -include DedeInclude('templets/mynews_edit.htm'); +ExecuteNoneQuery("DELETE FROM #@__mynews WHERE aid='$aid';"); + ShowMsg("成功删除一条站内新闻", "mynews_main.php"); + exit(); +} else if ($dopost == "editsave") { + $inquery = "UPDATE #@__mynews SET title='$title',typeid='$typeid',writer='$writer',senddate='".GetMKTime($sdate)."',body='$body' WHERE aid='$aid';"; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功修改一条站内新闻", "mynews_main.php"); + exit(); +} +$myNews = $dsql->GetOne("SELECT #@__mynews.*,#@__arctype.typename FROM #@__mynews LEFT JOIN #@__arctype ON #@__arctype.id=#@__mynews.typeid WHERE #@__mynews.aid='$aid';"); +include DedeInclude('templets/mynews_edit.htm'); diff --git a/src/dede/mynews_main.php b/src/admin/mynews_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mynews_main.php rename to src/admin/mynews_main.php index ff426edc..d8d58fff --- a/src/dede/mynews_main.php +++ b/src/admin/mynews_main.php @@ -1,26 +1,25 @@ -SetTemplet(DEDEADMIN."/templets/mynews_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); +SetTemplet(DEDEADMIN."/templets/mynews_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); diff --git a/src/dede/mytag_add.php b/src/admin/mytag_add.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/mytag_add.php rename to src/admin/mytag_add.php index 0fb39ae1..b670c82c --- a/src/dede/mytag_add.php +++ b/src/admin/mytag_add.php @@ -1,5 +1,4 @@ ExecuteNoneQuery($query); - ShowMsg("成功更改一个自定义标记", $ENV_GOBACK_URL); + ShowMsg("成功修改一个自定义标记", $ENV_GOBACK_URL); exit(); } else if ($dopost == "getjs") { require_once(DEDEINC."/oxwindow.class.php"); diff --git a/src/dede/mytag_main.php b/src/admin/mytag_main.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/mytag_main.php rename to src/admin/mytag_main.php index aad19cf4..78075366 --- a/src/dede/mytag_main.php +++ b/src/admin/mytag_main.php @@ -1,5 +1,4 @@ 0) $attlist .= " typeid='".$typeid."'"; -if (isset($arcid)) $attlist .= " idlist='".$arcid."'"; -if ($channel > 0) $attlist .= " channelid='".$channel."'"; -if ($att > 0) $attlist .= " att='".$att."'"; -if ($col > 1) $attlist .= " col='".$col."'"; -if ($subday > 0) $attlist .= " subday='".$subday."'"; - -if (!empty($types)) { - $attlist .= " type='"; - foreach ($types as $v) { - $attlist .= $v.'.'; - } - $attlist .= "'"; -} -$innertext = stripslashes($innertext); -if ($keyword != "") { - $attlist .= " keyword='$keyword'"; -} -$fulltag = "{dede:arclist$attlist} -$innertext -{/dede:arclist}\r\n"; -if ($dopost == 'savetag') { - $fulltag = addslashes($fulltag); - $tagname = "auto"; - $inQuery = "INSERT INTO `#@__mytag`(typeid,tagname,timeset,starttime,endtime,normbody,expbody) - VALUES('0','$tagname','0','0','0','$fulltag',''); - "; - $dsql->ExecuteNoneQuery($inQuery); - $id = $dsql->GetLastID(); - $dsql->ExecuteNoneQuery("UPDATE `#@__mytag` SET tagname='{$tagname}_{$id}' WHERE aid='$id'"); - $fulltag = "{dede:mytag name='{$tagname}_{$id}' ismake='yes'/}"; -} -include DedeInclude('templets/mytag_tag_guide_ok.htm'); + 0) $attlist .= " typeid='".$typeid."'"; +if (isset($arcid)) $attlist .= " idlist='".$arcid."'"; +if ($channel > 0) $attlist .= " channelid='".$channel."'"; +if ($att > 0) $attlist .= " att='".$att."'"; +if ($col > 1) $attlist .= " col='".$col."'"; +if ($subday > 0) $attlist .= " subday='".$subday."'"; + +if (!empty($types)) { + $attlist .= " type='"; + foreach ($types as $v) { + $attlist .= $v.'.'; + } + $attlist .= "'"; +} +$innertext = stripslashes($innertext); +if ($keyword != "") { + $attlist .= " keyword='$keyword'"; +} +$fulltag = "{dede:arclist$attlist} +$innertext +{/dede:arclist}\r\n"; +if ($dopost == 'savetag') { + $fulltag = addslashes($fulltag); + $tagname = "auto"; + $inQuery = "INSERT INTO `#@__mytag`(typeid,tagname,timeset,starttime,endtime,normbody,expbody) + VALUES('0','$tagname','0','0','0','$fulltag',''); + "; + $dsql->ExecuteNoneQuery($inQuery); + $id = $dsql->GetLastID(); + $dsql->ExecuteNoneQuery("UPDATE `#@__mytag` SET tagname='{$tagname}_{$id}' WHERE aid='$id'"); + $fulltag = "{dede:mytag name='{$tagname}_{$id}' ismake='yes'/}"; +} +include DedeInclude('templets/mytag_tag_guide_ok.htm'); diff --git a/src/dede/pic_view.php b/src/admin/pic_view.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/pic_view.php rename to src/admin/pic_view.php index 8940aaab..c6522e05 --- a/src/dede/pic_view.php +++ b/src/admin/pic_view.php @@ -1,137 +1,136 @@ -转到上级目录\n"); - } -} - -function ListPic($truePath, $nowPath) -{ - global $listSize; - $col = 0; - $rowdd = 0; - $rowdd++; - $imgfile = ""; - $truePath = preg_replace("#\/$#", "", preg_replace("#\\\\{1,}#", "/", trim($truePath))); - $nowPath = preg_replace("#\/$#", "", preg_replace("#\/{1,}#", "/", trim($nowPath))); - $dh = dir($truePath); - echo ("\n"); - while ($filename = $dh->read()) { - if (!preg_match("#\.$#", $filename)) { - $fullName = $truePath."/".$filename; - $fileUrl = $nowPath."/".$filename; - if (is_dir($fullName)) { - if ($col % $listSize == 0 && $col != 0) { - echo ("\n\n"); - for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { - echo ("".$filelist[$i]."\n"); - } - echo ("\n\n"); - } - $line = " - - -
- - -
"; - $filelist[$rowdd] = $filename; - $col++; - $rowdd++; - echo $line; - } else if (IsImg($filename)) { - if ($col % $listSize == 0 && $col != 0) { - echo ("\n\n"); - for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { - echo ("".$filelist[$i]."\n"); - } - echo ("\n\n"); - } - $line = " - - - - -
- ".GetImgFile($truePath, $nowPath, $filename)." -
"; - $filelist[$rowdd] = $filename; - $col++; - $rowdd++; - echo $line; - } - } - } - echo ("\n"); - if (!empty($filelist)) { - echo ("\n"); - $t = ($rowdd - 1) % $listSize; - if ($t == 0) { - $t = $listSize; - } - for ($i = $rowdd - $t; $i < $rowdd; $i++) { - echo ("".$filelist[$i]."\n"); - } - echo ("\n"); - } -} - -function GetImgFile($truePath, $nowPath, $fileName) -{ - $toW = 102; - $toH = 102; - $srcFile = $truePath."/".$fileName; - $info = ""; - $data = GetImageSize($srcFile, $info); - $srcW = $data[0]; - $srcH = $data[1]; - if ($toW >= $srcW && $toH >= $srcH) { - $ftoW = $srcW; - $ftoH = $srcH; - } else { - $toWH = $toW / $toH; - $srcWH = $srcW / $srcH; - if ($toWH <= $srcWH) { - $ftoW = $toW; - $ftoH = $ftoW * ($srcH / $srcW); - } else { - $ftoH = $toH; - $ftoW = $ftoH * ($srcW / $srcH); - } - } - return (""); -} - -function IsImg($fileName) -{ - if (preg_match("#\.(jpg|gif|png)$#", $fileName)) return 1; - else return 0; -} +转到上级目录\n"); + } +} + +function ListPic($truePath, $nowPath) +{ + global $listSize; + $col = 0; + $rowdd = 0; + $rowdd++; + $imgfile = ""; + $truePath = preg_replace("#\/$#", "", preg_replace("#\\\\{1,}#", "/", trim($truePath))); + $nowPath = preg_replace("#\/$#", "", preg_replace("#\/{1,}#", "/", trim($nowPath))); + $dh = dir($truePath); + echo ("\n"); + while ($filename = $dh->read()) { + if (!preg_match("#\.$#", $filename)) { + $fullName = $truePath."/".$filename; + $fileUrl = $nowPath."/".$filename; + if (is_dir($fullName)) { + if ($col % $listSize == 0 && $col != 0) { + echo ("\n\n"); + for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { + echo ("".$filelist[$i]."\n"); + } + echo ("\n\n"); + } + $line = " + + +
+ + +
"; + $filelist[$rowdd] = $filename; + $col++; + $rowdd++; + echo $line; + } else if (IsImg($filename)) { + if ($col % $listSize == 0 && $col != 0) { + echo ("\n\n"); + for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { + echo ("".$filelist[$i]."\n"); + } + echo ("\n\n"); + } + $line = " + + + + +
+ ".GetImgFile($truePath, $nowPath, $filename)." +
"; + $filelist[$rowdd] = $filename; + $col++; + $rowdd++; + echo $line; + } + } + } + echo ("\n"); + if (!empty($filelist)) { + echo ("\n"); + $t = ($rowdd - 1) % $listSize; + if ($t == 0) { + $t = $listSize; + } + for ($i = $rowdd - $t; $i < $rowdd; $i++) { + echo ("".$filelist[$i]."\n"); + } + echo ("\n"); + } +} + +function GetImgFile($truePath, $nowPath, $fileName) +{ + $toW = 102; + $toH = 102; + $srcFile = $truePath."/".$fileName; + $info = ""; + $data = GetImageSize($srcFile, $info); + $srcW = $data[0]; + $srcH = $data[1]; + if ($toW >= $srcW && $toH >= $srcH) { + $ftoW = $srcW; + $ftoH = $srcH; + } else { + $toWH = $toW / $toH; + $srcWH = $srcW / $srcH; + if ($toWH <= $srcWH) { + $ftoW = $toW; + $ftoH = $ftoW * ($srcH / $srcW); + } else { + $ftoH = $toH; + $ftoW = $ftoH * ($srcW / $srcH); + } + } + return (""); +} + +function IsImg($fileName) +{ + if (preg_match("#\.(jpg|gif|png)$#", $fileName)) return 1; + else return 0; +} diff --git a/src/dede/plus_edit.php b/src/admin/plus_edit.php old mode 100755 new mode 100644 similarity index 74% rename from src/dede/plus_edit.php rename to src/admin/plus_edit.php index 604716d3..fe4ab492 --- a/src/dede/plus_edit.php +++ b/src/admin/plus_edit.php @@ -1,54 +1,53 @@ -ExecuteNoneQuery("UPDATE `#@__plus` SET isshow=1 WHERE aid='$aid';"); - ShowMsg("成功启用一个插件,请刷新导航菜单!", "plus_main.php"); - exit(); -} else if ($dopost == "hide") { - $dsql->ExecuteNoneQuery("UPDATE `#@__plus` SET isshow=0 WHERE aid='$aid';"); - ShowMsg("成功禁用一个插件,请刷新导航菜单!", "plus_main.php"); - exit(); -} else if ($dopost == "delete") { - if (empty($job)) $job = ""; - if ($job == "") //确认提示 - { - require_once(DEDEINC."/oxwindow.class.php"); - $wintitle = "删除插件"; - $wecome_info = "插件管理::删除插件"; - $win = new OxWindow(); - $win->Init("plus_edit.php", "js/blank.js", "POST"); - $win->AddHidden("job", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("aid", $aid); - $win->AddTitle("您确实要删除'".$title."'这个插件?"); - $win->AddMsgItem("警告:在这里删除仅仅删除菜单项,要干净删除请在模块管理处删除

模块管理>>
"); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); - } else if ($job == "yes") //操作 - { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__plus` WHERE aid='$aid';"); - ShowMsg("成功删除一个插件,请刷新导航菜单!", "plus_main.php"); - exit(); - } -} else if ($dopost == "saveedit") //保存更改 -{ - $inquery = "UPDATE `#@__plus` SET plusname='$plusname',menustring='$menustring',filelist='$filelist' WHERE aid='$aid';"; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功更改插件的配置!", "plus_main.php"); - exit(); -} -$row = $dsql->GetOne("SELECT * FROM `#@__plus` WHERE aid='$aid'"); -include DedeInclude('templets/plus_edit.htm'); +ExecuteNoneQuery("UPDATE `#@__plus` SET isshow=1 WHERE aid='$aid';"); + ShowMsg("成功启用一个插件,请刷新导航菜单", "plus_main.php"); + exit(); +} else if ($dopost == "hide") { + $dsql->ExecuteNoneQuery("UPDATE `#@__plus` SET isshow=0 WHERE aid='$aid';"); + ShowMsg("成功禁用一个插件,请刷新导航菜单", "plus_main.php"); + exit(); +} else if ($dopost == "delete") { + if (empty($job)) $job = ""; + if ($job == "") //确认提示 + { + require_once(DEDEINC."/oxwindow.class.php"); + $wintitle = "删除插件"; + $wecome_info = "插件管理::删除插件"; + $win = new OxWindow(); + $win->Init("plus_edit.php", "js/blank.js", "POST"); + $win->AddHidden("job", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("aid", $aid); + $win->AddTitle("您确实要删除'".$title."'这个插件"); + $win->AddMsgItem("警告:在这里删除仅仅删除菜单项,要干净删除请在模块管理处删除

模块管理>>"); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); + } else if ($job == "yes") //操作 + { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__plus` WHERE aid='$aid';"); + ShowMsg("成功删除一个插件,请刷新导航菜单!", "plus_main.php"); + exit(); + } +} else if ($dopost == "saveedit") //保存修改 +{ + $inquery = "UPDATE `#@__plus` SET plusname='$plusname',menustring='$menustring',filelist='$filelist' WHERE aid='$aid';"; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功修改插件的配置", "plus_main.php"); + exit(); +} +$row = $dsql->GetOne("SELECT * FROM `#@__plus` WHERE aid='$aid'"); +include DedeInclude('templets/plus_edit.htm'); \ No newline at end of file diff --git a/src/dede/plus_main.php b/src/admin/plus_main.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/plus_main.php rename to src/admin/plus_main.php index 089c73ce..a3e08d24 --- a/src/dede/plus_main.php +++ b/src/admin/plus_main.php @@ -1,30 +1,29 @@ -SetTemplet(DEDEADMIN."/templets/plus_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); - -function GetSta($sta, $id, $title) -{ - if ($sta == 1) { - return "   修改   启用 > 禁用   删除"; - } else { - return "   修改   禁用 > 启用   册除"; - } -} +SetTemplet(DEDEADMIN."/templets/plus_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); + +function GetSta($sta, $id, $title) +{ + if ($sta == 1) { + return "   修改   启用 > 禁用   删除"; + } else { + return "   修改   禁用 > 启用   册除"; + } +} diff --git a/src/dede/public_guide.php b/src/admin/public_guide.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/public_guide.php rename to src/admin/public_guide.php index 6c2e7d08..bfd9d37b --- a/src/dede/public_guide.php +++ b/src/admin/public_guide.php @@ -1,79 +1,78 @@ -ExecuteNoneQuery("UPDATE `#@__channeltype` SET isdefault=0 WHERE id<>'$cid'"); - if ($cid != 0) { - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isdefault=1 WHERE id='$cid'"); - } - $win = new OxWindow(); - $win->Init(); - $win->mainTitle = "内容发布向导"; - $wecome_info = "内容发布向导"; - $win->AddTitle("内容发布向导 >> 设置默认发布表单"); - if ($cid == 0) { - $msg = " - 成功取消默认发布表单 -
- 您目前想要进行的操作: 返回发布向导页 - "; - } else { - $msg = " - 成功保存默认发布表单,以后点击“内容发布”面板将直接跳转到您选择的内容发布页 -
- 您目前想要进行的操作: 转到默认发布表单   返回发布向导页 - "; - } - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("hand"); - $win->Display(); - exit(); -} - -//以下为正常浏览的内容 -/*-------------------- -function __PageShow(); -----------------------*/ -$row = $dsql->GetOne("SELECT id,addcon FROM `#@__channeltype` WHERE isdefault='1' "); - -//已经设置了默认发布表单 -if (is_array($row) && $action != 'edit') { - $addcon = $row['addcon']; - if ($addcon == '') { - $addcon = 'archives_add.php'; - } - $channelid = $row['id']; - $cid = 0; - require_once(DEDEADMIN.'/'.$addcon); - exit(); -} - -//没有设置默认发布表单 -else { - $dsql->SetQuery("SELECT id,typename,mancon,isdefault,addtable FROM `#@__channeltype` WHERE id<>-1 And isshow=1 "); - $dsql->Execute(); -} -include DedeInclude('templets/public_guide.htm'); - -//获取频道栏目数 -function GetCatalogs(&$dsql, $cid) -{ - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE channeltype='$cid' "); - return (!is_array($row) ? '0' : $row['dd']); -} +ExecuteNoneQuery("UPDATE `#@__channeltype` SET isdefault=0 WHERE id<>'$cid'"); + if ($cid != 0) { + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isdefault=1 WHERE id='$cid'"); + } + $win = new OxWindow(); + $win->Init(); + $win->mainTitle = "内容发布向导"; + $wecome_info = "内容发布向导"; + $win->AddTitle("内容发布向导 >> 设置默认发布表单"); + if ($cid == 0) { + $msg = " + 成功取消默认发布表单 +
+ 您目前想要进行的操作: 返回发布向导页 + "; + } else { + $msg = " + 成功保存默认发布表单,以后点击“内容发布”面板将直接跳转到您选择的内容发布页 +
+ 您目前想要进行的操作: 转到默认发布表单   返回发布向导页 + "; + } + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("hand"); + $win->Display(); + exit(); +} + +//以下为正常浏览的内容 +/*-------------------- +function __PageShow(); +----------------------*/ +$row = $dsql->GetOne("SELECT id,addcon FROM `#@__channeltype` WHERE isdefault='1' "); + +//已经设置了默认发布表单 +if (is_array($row) && $action != 'edit') { + $addcon = $row['addcon']; + if ($addcon == '') { + $addcon = 'archives_add.php'; + } + $channelid = $row['id']; + $cid = 0; + require_once(DEDEADMIN.'/'.$addcon); + exit(); +} + +//没有设置默认发布表单 +else { + $dsql->SetQuery("SELECT id,typename,mancon,isdefault,addtable FROM `#@__channeltype` WHERE id<>-1 And isshow=1 "); + $dsql->Execute(); +} +include DedeInclude('templets/public_guide.htm'); + +//获取频道栏目数 +function GetCatalogs(&$dsql, $cid) +{ + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE channeltype='$cid' "); + return (!is_array($row) ? '0' : $row['dd']); +} diff --git a/src/dede/recycling.php b/src/admin/recycling.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/recycling.php rename to src/admin/recycling.php index 539eeb5c..8119e8a5 --- a/src/dede/recycling.php +++ b/src/admin/recycling.php @@ -1,29 +1,28 @@ -SetTemplet(DEDEADMIN."/templets/recycling.htm"); -$dlist->SetSource($query); -$dlist->display(); +SetTemplet(DEDEADMIN."/templets/recycling.htm"); +$dlist->SetSource($query); +$dlist->display(); diff --git a/src/dede/search_keywords_main.php b/src/admin/search_keywords_main.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/search_keywords_main.php rename to src/admin/search_keywords_main.php index 3d3fd0b5..53a3f570 --- a/src/dede/search_keywords_main.php +++ b/src/admin/search_keywords_main.php @@ -1,110 +1,109 @@ -ExecuteNoneQuery("UPDATE `#@__search_keywords` SET keyword='$keyword',spwords='$spwords',count='$count' WHERE aid='$aid';"); - AjaxHead(); - GetKeywordList($dsql, $pageno, $pagesize, $orderby); - exit(); -} -//删除字段 -else if ($dopost == 'del') { - $aid = preg_replace("#[^0-9]#", "", $aid); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); - AjaxHead(); - GetKeywordList($dsql, $pageno, $pagesize, $orderby); - exit(); -} -//批量删除字段 -else if ($dopost == 'delall') { - foreach ($aids as $aid) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); - } - ShowMsg("删除成功", $ENV_GOBACK_URL); - exit(); -} -//第一次进入这个页面 -if ($dopost == '') { - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__search_keywords` "); - $totalRow = $row['dd']; - include(DEDEADMIN."/templets/search_keywords_main.htm"); -} - -//获得特定的关键字列表 -function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') -{ - global $cfg_phpurl; - $start = ($pageno - 1) * $pagesize; - $printhead = "
- - - - - - - - - - - - \r\n - "; - echo $printhead; - if ($orderby == 'result') $orderby = $orderby." ASC"; - else $orderby = $orderby." DESC"; - $dsql->SetQuery("SELECT * FROM `#@__search_keywords` ORDER BY $orderby LIMIT $start,$pagesize "); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $line = " - - - - - - - - - - - "; - echo $line; - } - echo " - - \r\n"; - echo "
选择ID关键字分词结果频率结果最后搜索时间管理
{$row['aid']}{$row['result']}".MyDate("Y-m-d H:i:s", $row['lasttime'])." - 更新 | - 删除 -
- 反选 - 取消 - 删除 -
\r\n"; -} +ExecuteNoneQuery("UPDATE `#@__search_keywords` SET keyword='$keyword',spwords='$spwords',count='$count' WHERE aid='$aid';"); + AjaxHead(); + GetKeywordList($dsql, $pageno, $pagesize, $orderby); + exit(); +} +//删除字段 +else if ($dopost == 'del') { + $aid = preg_replace("#[^0-9]#", "", $aid); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); + AjaxHead(); + GetKeywordList($dsql, $pageno, $pagesize, $orderby); + exit(); +} +//批量删除字段 +else if ($dopost == 'delall') { + foreach ($aids as $aid) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); + } + ShowMsg("删除成功", $ENV_GOBACK_URL); + exit(); +} +//第一次进入这个页面 +if ($dopost == '') { + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__search_keywords` "); + $totalRow = $row['dd']; + include(DEDEADMIN."/templets/search_keywords_main.htm"); +} + +//获得特定的关键字列表 +function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') +{ + global $cfg_phpurl; + $start = ($pageno - 1) * $pagesize; + $printhead = "
+ + + + + + + + + + + + \r\n + "; + echo $printhead; + if ($orderby == 'result') $orderby = $orderby." ASC"; + else $orderby = $orderby." DESC"; + $dsql->SetQuery("SELECT * FROM `#@__search_keywords` ORDER BY $orderby LIMIT $start,$pagesize "); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $line = " + + + + + + + + + + + "; + echo $line; + } + echo " + + \r\n"; + echo "
选择ID关键字分词结果频率结果最后搜索时间管理
{$row['aid']}{$row['result']}".MyDate("Y-m-d H:i:s", $row['lasttime'])." + 更新 | + 删除 +
+ 反选 + 取消 + 删除 +
\r\n"; +} diff --git a/src/dede/shops_delivery.php b/src/admin/shops_delivery.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/shops_delivery.php rename to src/admin/shops_delivery.php index a52f3ae5..7d7ccd42 --- a/src/dede/shops_delivery.php +++ b/src/admin/shops_delivery.php @@ -1,79 +1,78 @@ - 100)) { - ShowMsg("请填写配送方式名称!", "-1"); - exit(); - } - $price = preg_replace("#[^.0-9]#", "", $price); - if ($price < 0.01) { - $price = '0.00'; - } - $des = cn_substrR($des, 255); - $InQuery = "INSERT INTO `#@__shops_delivery`(`dname`,`price`,`des`) VALUES ('$dname','$price','$des');"; - $result = $dsql->ExecuteNoneQuery($InQuery); - if ($result) { - ShowMsg("成功添加一个配送方式!", "shops_delivery.php"); - } else { - ShowMsg("添加配送方式时发生SQL错误!", "-1"); - } - exit(); -} else if ($do == 'del') { - $id = intval($id); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__shops_delivery` WHERE pid='$id'"); - ShowMsg("已删除当前配送方式!", "shops_delivery.php"); - exit(); -} else if ($do == 'edit') { - foreach ($pid as $id) { - $id = intval($id); - $row = $dsql->GetOne("SELECT pid,dname,price,des FROM `#@__shops_delivery` WHERE pid='$id' LIMIT 0,1"); - if (!is_array($row)) { - continue; - } - $dname = ${"m_dname".$id}; - $price = ${"m_price".$id}; - $des = ${"m_des".$id}; - if (empty($dname) || (strlen($dname) > 100)) { - $dname = addslashes($row['dname']); - } - $price = preg_replace("#[^.0-9]#", "", $price); - if (empty($price)) { - $price = $row['price']; - } - if (empty($des)) { - $des = addslashes($row['des']); - } else { - $des = cn_substrR($des, 255); - } - $dsql->ExecuteNoneQuery("UPDATE `#@__shops_delivery` SET dname='$dname',price='$price',des='$des' WHERE pid='$id'"); - } - ShowMsg("成功修改配送方式!", "shops_delivery.php"); - exit(); -} -$deliveryarr = array(); -$dsql->SetQuery("SELECT pid,dname,price,des FROM `#@__shops_delivery` ORDER BY orders ASC"); -$dsql->Execute(); -while ($row = $dsql->GetArray()) { - $deliveryarr[] = $row; -} -$dlist = new DataListCP(); -$dlist->pageSize = 25; //设定每页显示记录数(默认25条) - -//这两句的顺序不能更换 -$dlist->SetTemplate(DEDEADMIN."/templets/shops_delivery.htm"); //载入模板 -$dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM `#@__shops_delivery` ORDER BY `orders` ASC"); // 设定查询SQL + 100)) { + ShowMsg("请填写配送方式名称!", "-1"); + exit(); + } + $price = preg_replace("#[^.0-9]#", "", $price); + if ($price < 0.01) { + $price = '0.00'; + } + $des = cn_substrR($des, 255); + $InQuery = "INSERT INTO `#@__shops_delivery`(`dname`,`price`,`des`) VALUES ('$dname','$price','$des');"; + $result = $dsql->ExecuteNoneQuery($InQuery); + if ($result) { + ShowMsg("成功添加一个配送方式!", "shops_delivery.php"); + } else { + ShowMsg("添加配送方式时发生SQL错误!", "-1"); + } + exit(); +} else if ($do == 'del') { + $id = intval($id); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__shops_delivery` WHERE pid='$id'"); + ShowMsg("已删除当前配送方式!", "shops_delivery.php"); + exit(); +} else if ($do == 'edit') { + foreach ($pid as $id) { + $id = intval($id); + $row = $dsql->GetOne("SELECT pid,dname,price,des FROM `#@__shops_delivery` WHERE pid='$id' LIMIT 0,1"); + if (!is_array($row)) { + continue; + } + $dname = ${"m_dname".$id}; + $price = ${"m_price".$id}; + $des = ${"m_des".$id}; + if (empty($dname) || (strlen($dname) > 100)) { + $dname = addslashes($row['dname']); + } + $price = preg_replace("#[^.0-9]#", "", $price); + if (empty($price)) { + $price = $row['price']; + } + if (empty($des)) { + $des = addslashes($row['des']); + } else { + $des = cn_substrR($des, 255); + } + $dsql->ExecuteNoneQuery("UPDATE `#@__shops_delivery` SET dname='$dname',price='$price',des='$des' WHERE pid='$id'"); + } + ShowMsg("成功修改配送方式!", "shops_delivery.php"); + exit(); +} +$deliveryarr = array(); +$dsql->SetQuery("SELECT pid,dname,price,des FROM `#@__shops_delivery` ORDER BY orders ASC"); +$dsql->Execute(); +while ($row = $dsql->GetArray()) { + $deliveryarr[] = $row; +} +$dlist = new DataListCP(); +$dlist->pageSize = 25; //设定每页显示记录数(默认25条) + +//这两句的顺序不能更换 +$dlist->SetTemplate(DEDEADMIN."/templets/shops_delivery.htm"); //载入模板 +$dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM `#@__shops_delivery` ORDER BY `orders` ASC"); //设定查询SQL $dlist->Display(); //显示 \ No newline at end of file diff --git a/src/dede/shops_operations.php b/src/admin/shops_operations.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/shops_operations.php rename to src/admin/shops_operations.php index 0acc42d0..0ee06275 --- a/src/dede/shops_operations.php +++ b/src/admin/shops_operations.php @@ -1,124 +1,123 @@ -ExecuteNoneQuery($sql); - } else if ($dopost == 'push') { - $nids = explode('`', $nid); - $wh = ''; - foreach ($nids as $n) { - if ($wh == '') $wh = " WHERE oid='$n' "; - else $wh .= " OR oid='$n' "; - } - $sql = "UPDATE `#@__shops_orders` SET `state`='2' $wh "; - $dsql->ExecuteNoneQuery($sql); - } else if ($dopost == 'ok') { - $nids = explode('`', $nid); - $wh = ''; - foreach ($nids as $n) { - if ($wh == '') $wh = " WHERE oid='$n' "; - else $wh .= " OR oid='$n' "; - } - $sql = "UPDATE `#@__shops_orders` SET `state`='4' $wh "; - $dsql->ExecuteNoneQuery($sql); - } else if ($dopost == 'delete') { - $nids = explode('`', $nid); - foreach ($nids as $n) { - $query = "DELETE FROM `#@__shops_products` WHERE oid='$n'"; - $query2 = "DELETE FROM `#@__shops_orders` WHERE oid='$n'"; - $query3 = "DELETE FROM `#@__shops_userinfo` WHERE oid='$n'"; - $dsql->ExecuteNoneQuery($query); - $dsql->ExecuteNoneQuery($query2); - $dsql->ExecuteNoneQuery($query3); - } - ShowMsg("成功删除指定的订单记录", $ENV_GOBACK_URL); - exit(); - } else { - ShowMsg("不充许的操作范围", $ENV_GOBACK_URL); - exit(); - } - ShowMsg("成功更改指定的订单记录", $ENV_GOBACK_URL); - exit(); -} - -$addsql = ''; -if (empty($oid)) $oid = 0; -setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); -if (isset($buyid)) { - $buyid = preg_replace("#[^-0-9A-Z]#", "", $buyid); - $addsql = "WHERE s.oid='".$buyid."'"; -} -if (isset($sta)) { - $addsql = "WHERE s.`state`='$sta'"; -} -$sql = "SELECT s.`oid`,s.`cartcount`,s.`price`,s.`state`,s.`stime`,s.priceCount,s.dprice,s.paytype,u.`consignee`,u.`tel`,s.`userid` FROM `#@__shops_orders` AS s LEFT JOIN `#@__shops_userinfo` AS u ON s.oid=u.oid $addsql ORDER BY `stime` DESC"; - -$dlist = new DataListCP(); -$dlist->SetParameter("oid", $oid); -if (isset($sta)) $dlist->SetParameter("sta", $sta); -$tplfile = DEDEADMIN."/templets/shops_operations.htm"; - -//这两句的顺序不能更换 -$dlist->SetTemplate($tplfile); //载入模板 -$dlist->SetSource($sql); //设定查询SQLexit('dd'); -$dlist->Display(); - -function GetSta($sta) -{ - if ($sta == 0) { - return '未付款'; - } else if ($sta == 1) { - return '已付款'; - } else if ($sta == 2) { - return '已发货'; - } else if ($sta == 3) { - return '已确认'; - } else { - return '已完成'; - } -} - -function GetsType($pid) -{ - global $dsql; - $pid = intval($pid); - $row = $dsql->GetOne("SELECT name FROM `#@__payment` WHERE id='$pid'"); - if (is_array($row)) { - return $row['name']; - } else { - return '-'; - } -} - -function GetMemberID($mid) -{ - global $dsql; - if ($mid == 0) return '0'; - $row = $dsql->GetOne("SELECT userid FROM `#@__member` WHERE mid='$mid' "); - if (is_array($row)) { - return "".$row['userid'].""; - } else { - return '0'; - } -} +ExecuteNoneQuery($sql); + } else if ($dopost == 'push') { + $nids = explode('`', $nid); + $wh = ''; + foreach ($nids as $n) { + if ($wh == '') $wh = " WHERE oid='$n' "; + else $wh .= " OR oid='$n' "; + } + $sql = "UPDATE `#@__shops_orders` SET `state`='2' $wh "; + $dsql->ExecuteNoneQuery($sql); + } else if ($dopost == 'ok') { + $nids = explode('`', $nid); + $wh = ''; + foreach ($nids as $n) { + if ($wh == '') $wh = " WHERE oid='$n' "; + else $wh .= " OR oid='$n' "; + } + $sql = "UPDATE `#@__shops_orders` SET `state`='4' $wh "; + $dsql->ExecuteNoneQuery($sql); + } else if ($dopost == 'delete') { + $nids = explode('`', $nid); + foreach ($nids as $n) { + $query = "DELETE FROM `#@__shops_products` WHERE oid='$n'"; + $query2 = "DELETE FROM `#@__shops_orders` WHERE oid='$n'"; + $query3 = "DELETE FROM `#@__shops_userinfo` WHERE oid='$n'"; + $dsql->ExecuteNoneQuery($query); + $dsql->ExecuteNoneQuery($query2); + $dsql->ExecuteNoneQuery($query3); + } + ShowMsg("成功删除指定的订单记录", $ENV_GOBACK_URL); + exit(); + } else { + ShowMsg("不充许的操作范围", $ENV_GOBACK_URL); + exit(); + } + ShowMsg("成功修改指定的订单记录", $ENV_GOBACK_URL); + exit(); +} + +$addsql = ''; +if (empty($oid)) $oid = 0; +setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); +if (isset($buyid)) { + $buyid = preg_replace("#[^-0-9A-Z]#", "", $buyid); + $addsql = "WHERE s.oid='".$buyid."'"; +} +if (isset($sta)) { + $addsql = "WHERE s.`state`='$sta'"; +} +$sql = "SELECT s.`oid`,s.`cartcount`,s.`price`,s.`state`,s.`stime`,s.priceCount,s.dprice,s.paytype,u.`consignee`,u.`tel`,s.`userid` FROM `#@__shops_orders` AS s LEFT JOIN `#@__shops_userinfo` AS u ON s.oid=u.oid $addsql ORDER BY `stime` DESC"; + +$dlist = new DataListCP(); +$dlist->SetParameter("oid", $oid); +if (isset($sta)) $dlist->SetParameter("sta", $sta); +$tplfile = DEDEADMIN."/templets/shops_operations.htm"; + +//这两句的顺序不能更换 +$dlist->SetTemplate($tplfile); //载入模板 +$dlist->SetSource($sql); //设定查询SQLexit('dd'); +$dlist->Display(); + +function GetSta($sta) +{ + if ($sta == 0) { + return '未付款'; + } else if ($sta == 1) { + return '已付款'; + } else if ($sta == 2) { + return '已发货'; + } else if ($sta == 3) { + return '已确认'; + } else { + return '已完成'; + } +} + +function GetsType($pid) +{ + global $dsql; + $pid = intval($pid); + $row = $dsql->GetOne("SELECT name FROM `#@__payment` WHERE id='$pid'"); + if (is_array($row)) { + return $row['name']; + } else { + return '-'; + } +} + +function GetMemberID($mid) +{ + global $dsql; + if ($mid == 0) return '0'; + $row = $dsql->GetOne("SELECT userid FROM `#@__member` WHERE mid='$mid' "); + if (is_array($row)) { + return "".$row['userid'].""; + } else { + return '0'; + } +} diff --git a/src/dede/shops_operations_cart.php b/src/admin/shops_operations_cart.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/shops_operations_cart.php rename to src/admin/shops_operations_cart.php index 5910d9c8..9dfc7d7b --- a/src/dede/shops_operations_cart.php +++ b/src/admin/shops_operations_cart.php @@ -1,45 +1,44 @@ -无效操作!"); -$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); -if (empty($oid)) exit("无效订单号!"); - -$row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid'"); -$sql = "SELECT o.*,p.title,p.price as uprice,d.dname FROM `#@__shops_orders` as o left join `#@__shops_products` as p on o.oid=p.oid left join `#@__shops_delivery` as d on d.pid=o.pid WHERE o.oid='$oid'"; - -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("oid", $oid); -$dlist->SetTemplate(DEDEADMIN."/templets/shops_operations_cart.htm"); -$dlist->SetSource($sql); -$dlist->Display(); -$dlist->Close(); - -function GetSta($sta, $oid) -{ - global $dsql; - $row = $dsql->GetOne("SELECT paytype FROM `#@__shops_orders` WHERE oid='$oid'"); - $payname = $dsql->GetOne("SELECT name,fee FROM `#@__payment` WHERE id='{$row['paytype']}'"); - if ($sta == 0) { - return $payname['name']." 手续费:".$payname['fee']."元"; - } else if ($sta == 1) { - return '已付款,等发货'; - } else if ($sta == 2) { - return '确认'; - } else { - return '已完成'; - } -} +无效操作!"); +$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); +if (empty($oid)) exit("无效订单号!"); + +$row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid'"); +$sql = "SELECT o.*,p.title,p.price as uprice,d.dname FROM `#@__shops_orders` as o left join `#@__shops_products` as p on o.oid=p.oid left join `#@__shops_delivery` as d on d.pid=o.pid WHERE o.oid='$oid'"; + +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("oid", $oid); +$dlist->SetTemplate(DEDEADMIN."/templets/shops_operations_cart.htm"); +$dlist->SetSource($sql); +$dlist->Display(); +$dlist->Close(); + +function GetSta($sta, $oid) +{ + global $dsql; + $row = $dsql->GetOne("SELECT paytype FROM `#@__shops_orders` WHERE oid='$oid'"); + $payname = $dsql->GetOne("SELECT name,fee FROM `#@__payment` WHERE id='{$row['paytype']}'"); + if ($sta == 0) { + return $payname['name']." 手续费:".$payname['fee']."元"; + } else if ($sta == 1) { + return '已付款,等发货'; + } else if ($sta == 2) { + return '确认'; + } else { + return '已完成'; + } +} diff --git a/src/dede/shops_operations_userinfo.php b/src/admin/shops_operations_userinfo.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/shops_operations_userinfo.php rename to src/admin/shops_operations_userinfo.php index 026edc62..59af65c8 --- a/src/dede/shops_operations_userinfo.php +++ b/src/admin/shops_operations_userinfo.php @@ -1,32 +1,31 @@ -无效操作!"); -$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); -if (empty($oid)) exit("无效订单号!"); - -$rows = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid' LIMIT 0,1"); -if (!is_array($rows)) { - $dsql->Close(); - exit("该订单下没相关用户信息!"); -} - -$row = $dsql->GetOne("SELECT pid,dprice FROM `#@__shops_orders` WHERE oid='$oid'"); -if (is_array($row)) { - $rs = $dsql->GetOne("SELECT dname FROM `#@__shops_delivery` WHERE pid='$row[pid]'"); - $rows['dname'] = $rs['dname']; - $rows['dprice'] = $row['dprice']; -} -$rows['des'] = stripslashes($rows['des']); -include DEDEADMIN."/templets/shops_operations_userinfo.htm"; -unset($rows); +无效操作!"); +$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); +if (empty($oid)) exit("无效订单号!"); + +$rows = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid' LIMIT 0,1"); +if (!is_array($rows)) { + $dsql->Close(); + exit("该订单下没相关用户信息!"); +} + +$row = $dsql->GetOne("SELECT pid,dprice FROM `#@__shops_orders` WHERE oid='$oid'"); +if (is_array($row)) { + $rs = $dsql->GetOne("SELECT dname FROM `#@__shops_delivery` WHERE pid='$row[pid]'"); + $rows['dname'] = $rs['dname']; + $rows['dprice'] = $row['dprice']; +} +$rows['des'] = stripslashes($rows['des']); +include DEDEADMIN."/templets/shops_operations_userinfo.htm"; +unset($rows); diff --git a/src/dede/soft_add.php b/src/admin/soft_add.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/soft_add.php rename to src/admin/soft_add.php index 517e0a9c..0dc5b7cd --- a/src/dede/soft_add.php +++ b/src/admin/soft_add.php @@ -1,258 +1,258 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) $channelid = 1; - } - $softconfig = $dsql->GetOne("SELECT * FROM `#@__softconfig` "); - //获得频道模型信息 - $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - $channelid = $cInfos['id']; - //获取文章最大id以确定当前权重 - $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); - include DedeInclude("templets/soft_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if (!isset($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - if ($ishtml == 0) $ismake = -1; - else $ismake = 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - $title = preg_replace('#"#', '"', $title); - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $userip = GetIP(); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - // 处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - //处理body字段自动摘要、自动提取缩略图等 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } else if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match('#j#', $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match('#j#', $flag)) $ismake = -1; - //保存到主表 - $inQuery = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) - VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //软件链接列表 - $urls = ''; - //本地链接处理 - $softurl1 = stripslashes($softurl1); - $nsoftsize = ''; - if ($softurl1 != '') { - $urls .= "{dede:link islocal='1' text='{$servermsg1}'} $softurl1 {/dede:link}\r\n"; - $autosize = empty($autosize) ? FALSE : TRUE; - if ($autosize && empty($softsize)) { - $nsoftsize = @filesize($cfg_basedir.$softurl1); - if (empty($nsoftsize)) $nsoftsize = '未知'; - else { - $nsoftsize = trim(sprintf("%0.2f", $nsoftsize / 1024 / 1024)); - $nsoftsize = $nsoftsize." MB"; - } - } - } - //软件大小 - if (!empty($nsoftsize)) $softsize = $nsoftsize; - else if (empty($softsize)) $softsize = '未知'; - else $softsize = $softsize.' '.$unit; - //其它链接处理 - for ($i = 2; $i <= 30; $i++) { - if (!empty(${'softurl'.$i})) { - $forconfig = empty(${'forconfig'.$i}) ? FALSE : TRUE; - if ($forconfig) { - if (empty(${'need'.$i})) continue; - $serverUrl = stripslashes(${'softurlfirst'.$i}); - $serverUrl = preg_replace("#\/$#", "", $serverUrl); - $softurl = stripslashes(${'softurl'.$i}); - if (cn_substr($softurl, 1) != '/') $softurl = '/'.$softurl; - $softurl = $serverUrl.$softurl; - } else { - $softurl = stripslashes(${'softurl'.$i}); - } - $servermsg = str_replace("'", "", stripslashes(${'servermsg'.$i})); - if ($servermsg == '') $servermsg = '下载地址'.$i; - if ($softurl != 'http://') { - $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; - } - } - } - $urls = addslashes($urls); - //保存到附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (empty($addtable)) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); - exit(); - } - $daccess = isset($daccess) && is_numeric($daccess) ? $daccess : 0; - $useip = GetIP(); - $inQuery = "INSERT INTO `$addtable`(aid,typeid,redirecturl,userip,filetype,language,softtype,accredit, - os,softrank,officialUrl,officialDemo,softsize,softlinks,introduce,daccess,needmoney{$inadd_f}) - VALUES ('$arcID','$typeid','$redirecturl','$useip','$filetype','$language','$softtype','$accredit', - '$os','$softrank','$officialUrl','$officialDemo','$softsize','$urls','$body','$daccess','$needmoney'{$inadd_v});"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //生成HTML - InsertTags($tags, $arcID); - $arcUrl = MakeArt($arcID, TRUE, TRUE, 0); - if ($arcUrl == '') { - $arcUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布软件  查看软件  更改软件  已发布软件管理  网站栏目管理"; - $msg = "
{$msg}
".GetUpdateTest(); - $wintitle = "成功发布一个软件"; - $wecome_info = "文章管理::发布软件"; - $win = new OxWindow(); - $win->AddTitle("成功发布软件:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) $channelid = 1; + } + $softconfig = $dsql->GetOne("SELECT * FROM `#@__softconfig` "); + //获得频道模型信息 + $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + $channelid = $cInfos['id']; + //获取文章最大id以确定当前权重 + $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); + include DedeInclude("templets/soft_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if (!isset($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + if ($ishtml == 0) $ismake = -1; + else $ismake = 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + $title = preg_replace('#"#', '"', $title); + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $userip = GetIP(); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + //处理body字段自动摘要、自动提取缩略图等 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } else if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match('#p#', $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match('#j#', $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match('#j#', $flag)) $ismake = -1; + //保存到主表 + $inQuery = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) + VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //软件链接列表 + $urls = ''; + //本地链接处理 + $softurl1 = stripslashes($softurl1); + $nsoftsize = ''; + if ($softurl1 != '') { + $urls .= "{dede:link islocal='1' text='{$servermsg1}'} $softurl1 {/dede:link}\r\n"; + $autosize = empty($autosize) ? FALSE : TRUE; + if ($autosize && empty($softsize)) { + $nsoftsize = @filesize($cfg_basedir.$softurl1); + if (empty($nsoftsize)) $nsoftsize = '未知'; + else { + $nsoftsize = trim(sprintf("%0.2f", $nsoftsize / 1024 / 1024)); + $nsoftsize = $nsoftsize." MB"; + } + } + } + //软件大小 + if (!empty($nsoftsize)) $softsize = $nsoftsize; + else if (empty($softsize)) $softsize = '未知'; + else $softsize = $softsize.' '.$unit; + //其它链接处理 + for ($i = 2; $i <= 30; $i++) { + if (!empty(${'softurl'.$i})) { + $forconfig = empty(${'forconfig'.$i}) ? FALSE : TRUE; + if ($forconfig) { + if (empty(${'need'.$i})) continue; + $serverUrl = stripslashes(${'softurlfirst'.$i}); + $serverUrl = preg_replace("#\/$#", "", $serverUrl); + $softurl = stripslashes(${'softurl'.$i}); + if (cn_substr($softurl, 1) != '/') $softurl = '/'.$softurl; + $softurl = $serverUrl.$softurl; + } else { + $softurl = stripslashes(${'softurl'.$i}); + } + $servermsg = str_replace("'", "", stripslashes(${'servermsg'.$i})); + if ($servermsg == '') $servermsg = '下载地址'.$i; + if ($softurl != 'http://') { + $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; + } + } + } + $urls = addslashes($urls); + //保存到附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (empty($addtable)) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); + exit(); + } + $daccess = isset($daccess) && is_numeric($daccess) ? $daccess : 0; + $useip = GetIP(); + $inQuery = "INSERT INTO `$addtable`(aid,typeid,redirecturl,userip,filetype,language,softtype,accredit, + os,softrank,officialUrl,officialDemo,softsize,softlinks,introduce,daccess,needmoney{$inadd_f}) + VALUES ('$arcID','$typeid','$redirecturl','$useip','$filetype','$language','$softtype','$accredit', + '$os','$softrank','$officialUrl','$officialDemo','$softsize','$urls','$body','$daccess','$needmoney'{$inadd_v});"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //生成HTML + InsertTags($tags, $arcID); + $arcUrl = MakeArt($arcID, TRUE, TRUE, 0); + if ($arcUrl == '') { + $arcUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布软件  查看软件  修改软件  已发布软件管理  网站栏目管理"; + $msg = "
{$msg}
".GetUpdateTest(); + $wintitle = "成功发布一个软件"; + $wecome_info = "文章管理::发布软件"; + $win = new OxWindow(); + $win->AddTitle("成功发布软件:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/soft_config.php b/src/admin/soft_config.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/soft_config.php rename to src/admin/soft_config.php index 12b6c8a8..53a47080 --- a/src/dede/soft_config.php +++ b/src/admin/soft_config.php @@ -1,51 +1,50 @@ - 0 || $dfywboy > 0) $gotojump = 1; - $query = "UPDATE `#@__softconfig` SET - `downtype` = '$downtype' , - `gotojump` ='$gotojump' , - `ismoresite` = '$ismoresite', - `islocal` = '$islocal', - `sites` = '$sites', - `moresitedo` = '$moresitedo', - `dfrank` = '$dfrank', - `dfywboy` = '$dfywboy', - `argrange` = '$argrange', - downmsg = '$downmsg' "; - $dsql->ExecuteNoneQuery($query); - ShowMsg('成功保存参数', 'soft_config.php'); - exit(); -} -//读取参数 -$row = $dsql->GetOne("SELECT * FROM `#@__softconfig` "); -if (!is_array($row)) { - $dsql->ExecuteNoneQuery("INSERT INTO `#@__softconfig`(`downtype`,`ismoresite`,`islocal`,`gotojump`,`sites`,`downmsg`,`moresitedo`,`dfrank`,`dfywboy`, `argrange`) - VALUES ('1', '0','1', '0', '' ,'$downmsg','1', '0', '0', '0'); "); - $row['downtype'] = 1; - $row['ismoresite'] = 0; - $row['islocal'] = 1; - $row['gotojump'] = 0; - $row['sites'] = ''; - $row['moresitedo'] = '1'; - $row['dfrank'] = '0'; - $row['dfywboy'] = '0'; - $row['downmsg'] = ''; - $row['argrange'] = 0; -} -include DedeInclude('templets/soft_config.htm'); -exit(); + 0 || $dfywboy > 0) $gotojump = 1; + $query = "UPDATE `#@__softconfig` SET + `downtype` = '$downtype' , + `gotojump` ='$gotojump' , + `ismoresite` = '$ismoresite', + `islocal` = '$islocal', + `sites` = '$sites', + `moresitedo` = '$moresitedo', + `dfrank` = '$dfrank', + `dfywboy` = '$dfywboy', + `argrange` = '$argrange', + downmsg = '$downmsg' "; + $dsql->ExecuteNoneQuery($query); + ShowMsg('成功保存参数', 'soft_config.php'); + exit(); +} +//读取参数 +$row = $dsql->GetOne("SELECT * FROM `#@__softconfig` "); +if (!is_array($row)) { + $dsql->ExecuteNoneQuery("INSERT INTO `#@__softconfig`(`downtype`,`ismoresite`,`islocal`,`gotojump`,`sites`,`downmsg`,`moresitedo`,`dfrank`,`dfywboy`, `argrange`) + VALUES ('1', '0','1', '0', '' ,'$downmsg','1', '0', '0', '0'); "); + $row['downtype'] = 1; + $row['ismoresite'] = 0; + $row['islocal'] = 1; + $row['gotojump'] = 0; + $row['sites'] = ''; + $row['moresitedo'] = '1'; + $row['dfrank'] = '0'; + $row['dfywboy'] = '0'; + $row['downmsg'] = ''; + $row['argrange'] = 0; +} +include DedeInclude('templets/soft_config.htm'); +exit(); diff --git a/src/dede/soft_edit.php b/src/admin/soft_edit.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/soft_edit.php rename to src/admin/soft_edit.php index 2c6018e4..39591bbd --- a/src/dede/soft_edit.php +++ b/src/admin/soft_edit.php @@ -1,288 +1,288 @@ -SetQuery($arcQuery); - $arcRow = $dsql->GetOne($arcQuery); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错!", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错!", "javascript:;"); - exit(); - } - $addtable = $cInfos['addtable']; - $addQuery = "SELECT * FROM `$addtable` WHERE aid='$aid'"; - $addRow = $dsql->GetOne($addQuery); - $newRowStart = 1; - $nForm = ''; - $daccess = $addRow['daccess']; - $needmoney = $addRow['needmoney']; - if ($addRow['softlinks'] != '') { - $dtp = new DedeTagParse(); - $dtp->LoadSource($addRow['softlinks']); - if (is_array($dtp->CTags)) { - foreach ($dtp->CTags as $ctag) { - if ($ctag->GetName() == 'link') { - $islocal = $ctag->GetAtt('islocal'); - if ($islocal != 1) $needmsg = "删除"; - else $needmsg = ''; - $nForm .= "
软件地址{$newRowStart}: - 服务器名称: - - $needmsg -
\r\n"; - $newRowStart++; - } - } - } - $dtp->Clear(); - } - $channelid = $arcRow['channel']; - $tags = GetTags($aid); - $arcRow = XSSClean($arcRow); - $addRow = XSSClean($addRow); - include DedeInclude("templets/soft_edit.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - if ($ishtml == 0) { - $ismake = -1; - } else { - $ismake = 0; - } - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('litpic', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match('#j#', $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match('#j#', $flag)) $ismake = -1; - //更改主档案表 - $inQuery = "UPDATE `#@__archives` SET - typeid='$typeid', - typeid2='$typeid2', - sortrank='$sortrank', - flag='$flag', - click='$click', - ismake='$ismake', - arcrank='$arcrank', - money='$money', - title='$title', - color='$color', - source='$source', - writer='$writer', - litpic='$litpic', - pubdate='$pubdate', - notpost='$notpost', - description='$description', - keywords='$keywords', - shorttitle='$shorttitle', - filename='$filename', - dutyadmin='$adminid', - weight='$weight' - WHERE id='$id'; "; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库archives表时出错,请检查", "-1"); - exit(); - } - //软件链接列表 - $urls = ''; - for ($i = 1; $i <= 30; $i++) { - if (!empty(${'softurl'.$i})) { - $islocal = empty(${'islocal'.$i}) ? '' : 1; - $isneed = empty(${'del'.$i}) ? true : false; - $servermsg = str_replace("'", '', stripslashes(${'servermsg'.$i})); - $softurl = stripslashes(${'softurl'.$i}); - if ($servermsg == '') { - $servermsg = '下载地址'.$i; - } - if ($softurl != 'http://') { - if ($islocal == 1) $urls .= "{dede:link islocal='$islocal' text='{$servermsg}'} $softurl {/dede:link}\r\n"; - else if ($isneed) $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; - else continue; - } - } - } - $urls = addslashes($urls); - //更新附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $useip = GetIP(); - $inQuery = "UPDATE `$addtable` - SET typeid ='$typeid', - filetype ='$filetype', - language ='$language', - softtype ='$softtype', - accredit ='$accredit', - os ='$os', - softrank ='$softrank', - officialUrl ='$officialUrl', - officialDemo ='$officialDemo', - softsize ='$softsize', - softlinks ='$urls', - redirecturl='$redirecturl', - userip = '$useip', - daccess = '$daccess', - needmoney = '$needmoney', - introduce='$body' - {$inadd_f} - WHERE aid='$id';"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库附加表 addonsoft 时出错,请检查原因", "-1"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $arcUrl = MakeArt($id, TRUE, TRUE, $isremote); - if ($arcUrl == "") { - $arcUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:发布新软件  继续修改  查看软件  已发布软件管理  网站栏目管理"; - $wintitle = "成功修改一个软件"; - $wecome_info = "文章管理::修改软件"; - $win = new OxWindow(); - $win->AddTitle("成功修改软件:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); +SetQuery($arcQuery); + $arcRow = $dsql->GetOne($arcQuery); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错!", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错!", "javascript:;"); + exit(); + } + $addtable = $cInfos['addtable']; + $addQuery = "SELECT * FROM `$addtable` WHERE aid='$aid'"; + $addRow = $dsql->GetOne($addQuery); + $newRowStart = 1; + $nForm = ''; + $daccess = $addRow['daccess']; + $needmoney = $addRow['needmoney']; + if ($addRow['softlinks'] != '') { + $dtp = new DedeTagParse(); + $dtp->LoadSource($addRow['softlinks']); + if (is_array($dtp->CTags)) { + foreach ($dtp->CTags as $ctag) { + if ($ctag->GetName() == 'link') { + $islocal = $ctag->GetAtt('islocal'); + if ($islocal != 1) $needmsg = "删除"; + else $needmsg = ''; + $nForm .= "
软件地址{$newRowStart}: + 服务器名称: + + $needmsg +
\r\n"; + $newRowStart++; + } + } + } + $dtp->Clear(); + } + $channelid = $arcRow['channel']; + $tags = GetTags($aid); + $arcRow = XSSClean($arcRow); + $addRow = XSSClean($addRow); + include DedeInclude("templets/soft_edit.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + if ($ishtml == 0) { + $ismake = -1; + } else { + $ismake = 0; + } + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('litpic', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match('#p#', $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match('#j#', $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match('#j#', $flag)) $ismake = -1; + //修改主档案表 + $inQuery = "UPDATE `#@__archives` SET + typeid='$typeid', + typeid2='$typeid2', + sortrank='$sortrank', + flag='$flag', + click='$click', + ismake='$ismake', + arcrank='$arcrank', + money='$money', + title='$title', + color='$color', + source='$source', + writer='$writer', + litpic='$litpic', + pubdate='$pubdate', + notpost='$notpost', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename', + dutyadmin='$adminid', + weight='$weight' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库archives表时出错,请检查", "-1"); + exit(); + } + //软件链接列表 + $urls = ''; + for ($i = 1; $i <= 30; $i++) { + if (!empty(${'softurl'.$i})) { + $islocal = empty(${'islocal'.$i}) ? '' : 1; + $isneed = empty(${'del'.$i}) ? true : false; + $servermsg = str_replace("'", '', stripslashes(${'servermsg'.$i})); + $softurl = stripslashes(${'softurl'.$i}); + if ($servermsg == '') { + $servermsg = '下载地址'.$i; + } + if ($softurl != 'http://') { + if ($islocal == 1) $urls .= "{dede:link islocal='$islocal' text='{$servermsg}'} $softurl {/dede:link}\r\n"; + else if ($isneed) $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; + else continue; + } + } + } + $urls = addslashes($urls); + //更新附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $useip = GetIP(); + $inQuery = "UPDATE `$addtable` + SET typeid ='$typeid', + filetype ='$filetype', + language ='$language', + softtype ='$softtype', + accredit ='$accredit', + os ='$os', + softrank ='$softrank', + officialUrl ='$officialUrl', + officialDemo ='$officialDemo', + softsize ='$softsize', + softlinks ='$urls', + redirecturl='$redirecturl', + userip = '$useip', + daccess = '$daccess', + needmoney = '$needmoney', + introduce='$body' + {$inadd_f} + WHERE aid='$id';"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库附加表 addonsoft 时出错,请检查原因", "-1"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $arcUrl = MakeArt($id, TRUE, TRUE, $isremote); + if ($arcUrl == "") { + $arcUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:发布新软件  继续修改  查看软件  已发布软件管理  网站栏目管理"; + $wintitle = "成功修改一个软件"; + $wecome_info = "文章管理::修改软件"; + $win = new OxWindow(); + $win->AddTitle("成功修改软件:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/spec_add.php b/src/admin/spec_add.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/spec_add.php rename to src/admin/spec_add.php index 9a02be66..3b6e9514 --- a/src/dede/spec_add.php +++ b/src/admin/spec_add.php @@ -1,211 +1,211 @@ -GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - include DedeInclude("templets/spec_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - $channelid = -1; - $money = 0; - if (!isset($tags)) $tags = ''; - //处理自定义字段会用到这些变量 - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - if ($ishtml == 0) $ismake = -1; - else $ismake = 0; - $title = preg_replace('#"#', '"', $title); - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,无法进行后续操作", "-1"); - exit(); - } - //保存到主表 - $inQuery = "INSERT INTO `#@__archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename) - VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename');"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - echo $inQuery; - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //专题节点列表 - $arcids = array(); - $notelist = ''; - for ($i = 1; $i <= $cfg_specnote; $i++) { - if (!empty(${'notename'.$i})) { - $notename = str_replace("'", "", trim(${'notename'.$i})); - $arcid = trim(${'arcid'.$i}); - $col = trim(${'col'.$i}); - $imgwidth = trim(${'imgwidth'.$i}); - $imgheight = trim(${'imgheight'.$i}); - $titlelen = trim(${'titlelen'.$i}); - $infolen = trim(${'infolen'.$i}); - $listtmp = trim(${'listtmp'.$i}); - $noteid = trim(${'noteid'.$i}); - $isauto = trim(${'isauto'.$i}); - $keywords = str_replace("'", "", trim(${'keywords'.$i})); - $typeid = trim(${'typeid'.$i}); - if (!empty(${'rownum'.$i})) $rownum = trim(${'rownum'.$i}); - else $rownum = 0; - $arcid = preg_replace("#[^0-9,]#", "", $arcid); - $ids = explode(",", $arcid); - $okids = ""; - if (is_array($ids)) { - foreach ($ids as $mid) { - $mid = trim($mid); - if ($mid == "") continue; - if (!isset($arcids[$mid])) { - if ($okids == "") { - $okids .= $mid; - } else { - $okids .= ",".$mid; - } - $arcids[$mid] = 1; - } - } - } - $notelist .= "{dede:specnote imgheight=\\'$imgheight\\' imgwidth=\\'$imgwidth\\' - infolen=\\'$infolen\\' titlelen=\\'$titlelen\\' col=\\'$col\\' idlist=\\'$okids\\' - name=\\'$notename\\' noteid=\\'$noteid\\' isauto=\'$isauto\' rownum=\\'$rownum\\' - keywords=\\'$keywords\\' typeid=\\'$typeid\\'} - $listtmp - {/dede:specnote}\r\n"; - } - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - $useip = GetIP(); - //加入附加表 - $inQuery = "INSERT INTO `#@__addonspec`(aid,typeid,userip,templet,note{$inadd_f}) VALUES ('$arcID','$typeid','$useip','$templet','$notelist'{$inadd_v});"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 addonspec 时出错,请检查原因", "-1"); - exit(); - } - //生成HTML - InsertTags($tags, $arcID); - $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:创建新专题  查看专题  已发布专题管理"; - $wintitle = "成功创建专题"; - $wecome_info = "文章管理::发布专题"; - $win = new OxWindow(); - $win->AddTitle("成功创建专题:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); +GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + include DedeInclude("templets/spec_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + $channelid = -1; + $money = 0; + if (!isset($tags)) $tags = ''; + //处理自定义字段会用到这些变量 + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + if ($ishtml == 0) $ismake = -1; + else $ismake = 0; + $title = preg_replace('#"#', '"', $title); + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,无法进行后续操作", "-1"); + exit(); + } + //保存到主表 + $inQuery = "INSERT INTO `#@__archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename) + VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename');"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + echo $inQuery; + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //专题节点列表 + $arcids = array(); + $notelist = ''; + for ($i = 1; $i <= $cfg_specnote; $i++) { + if (!empty(${'notename'.$i})) { + $notename = str_replace("'", "", trim(${'notename'.$i})); + $arcid = trim(${'arcid'.$i}); + $col = trim(${'col'.$i}); + $imgwidth = trim(${'imgwidth'.$i}); + $imgheight = trim(${'imgheight'.$i}); + $titlelen = trim(${'titlelen'.$i}); + $infolen = trim(${'infolen'.$i}); + $listtmp = trim(${'listtmp'.$i}); + $noteid = trim(${'noteid'.$i}); + $isauto = trim(${'isauto'.$i}); + $keywords = str_replace("'", "", trim(${'keywords'.$i})); + $typeid = trim(${'typeid'.$i}); + if (!empty(${'rownum'.$i})) $rownum = trim(${'rownum'.$i}); + else $rownum = 0; + $arcid = preg_replace("#[^0-9,]#", "", $arcid); + $ids = explode(",", $arcid); + $okids = ""; + if (is_array($ids)) { + foreach ($ids as $mid) { + $mid = trim($mid); + if ($mid == "") continue; + if (!isset($arcids[$mid])) { + if ($okids == "") { + $okids .= $mid; + } else { + $okids .= ",".$mid; + } + $arcids[$mid] = 1; + } + } + } + $notelist .= "{dede:specnote imgheight=\\'$imgheight\\' imgwidth=\\'$imgwidth\\' + infolen=\\'$infolen\\' titlelen=\\'$titlelen\\' col=\\'$col\\' idlist=\\'$okids\\' + name=\\'$notename\\' noteid=\\'$noteid\\' isauto=\'$isauto\' rownum=\\'$rownum\\' + keywords=\\'$keywords\\' typeid=\\'$typeid\\'} + $listtmp + {/dede:specnote}\r\n"; + } + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match('#p#', $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + $useip = GetIP(); + //加入附加表 + $inQuery = "INSERT INTO `#@__addonspec`(aid,typeid,userip,templet,note{$inadd_f}) VALUES ('$arcID','$typeid','$useip','$templet','$notelist'{$inadd_v});"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 addonspec 时出错,请检查原因", "-1"); + exit(); + } + //生成HTML + InsertTags($tags, $arcID); + $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:创建新专题  查看专题  已发布专题管理"; + $wintitle = "成功创建专题"; + $wecome_info = "文章管理::发布专题"; + $win = new OxWindow(); + $win->AddTitle("成功创建专题:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/spec_edit.php b/src/admin/spec_edit.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/spec_edit.php rename to src/admin/spec_edit.php index cd682b85..ca9202ef --- a/src/dede/spec_edit.php +++ b/src/admin/spec_edit.php @@ -1,243 +1,243 @@ -GetOne($arcQuery); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错!", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='-1'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错!", "javascript:;"); - exit(); - } - $addRow = $dsql->GetOne("SELECT * FROM `#@__addonspec` WHERE aid='$aid'"); - $tags = GetTags($aid); - include DedeInclude("templets/spec_edit.htm"); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (!isset($tags)) $tags = ''; - $channelid = -1; - //处理自定义字段会用到这些变量 - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $sortrank = AddDay($pubdate, $sortup); - if ($ishtml == 0) $ismake = -1; - else $ismake = 0; - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = trim(cn_substrR($keywords, 60)); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - $inQuery = "UPDATE `#@__archives` SET - typeid='$typeid', - sortrank='$sortrank', - flag='$flag', - ismake='$ismake', - arcrank='$arcrank', - click='$click', - title='$title', - color='$color', - writer='$writer', - source='$source', - litpic='$litpic', - pubdate='$pubdate', - notpost='$notpost', - description='$description', - keywords='$keywords', - shorttitle='$shorttitle', - filename='$filename' - WHERE id='$id'; "; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库archives表时出错,请检查", "-1"); - exit(); - } - //专题节点列表 - $arcids = array(); - $notelist = ''; - for ($i = 1; $i <= $cfg_specnote; $i++) { - if (!empty(${'notename'.$i})) { - $notename = str_replace("'", "", trim(${'notename'.$i})); - $arcid = trim(${'arcid'.$i}); - $col = trim(${'col'.$i}); - $imgwidth = trim(${'imgwidth'.$i}); - $imgheight = trim(${'imgheight'.$i}); - $titlelen = trim(${'titlelen'.$i}); - $infolen = trim(${'infolen'.$i}); - $listtmp = trim(${'listtmp'.$i}); - if (isset(${'noteid'.$i})) { - $noteid = trim(${'noteid'.$i}); - } else { - $noteid = $i; - } - if (isset(${'isauto'.$i})) { - $isauto = trim(${'isauto'.$i}); - } else { - $isauto = 0; - } - if (isset(${'keywords'.$i})) { - $keywords = str_replace("'", "", trim(${'keywords'.$i})); - } else { - $keywords = ""; - } - if (!empty(${'typeid'.$i})) { - $ttypeid = trim(${'typeid'.$i}); - } else { - $ttypeid = 0; - } - if (!empty(${'rownum'.$i})) { - $rownum = trim(${'rownum'.$i}); - } else { - $rownum = 0; - } - $arcid = preg_replace("#[^0-9,]#", "", $arcid); - $ids = explode(",", $arcid); - $okids = ""; - if (is_array($ids)) { - foreach ($ids as $mid) { - $mid = trim($mid); - if ($mid == "") continue; - if (!isset($arcids[$mid])) { - if ($okids == "") { - $okids .= $mid; - } else { - $okids .= ",".$mid; - } - $arcids[$mid] = 1; - } - } - } - $notelist .= "{dede:specnote imgheight=\\'$imgheight\\' imgwidth=\\'$imgwidth\\' - infolen=\\'$infolen\\' titlelen=\\'$titlelen\\' col=\\'$col\\' idlist=\\'$okids\\' - name=\\'$notename\\' noteid=\\'$noteid\\' isauto=\'$isauto\' rownum=\\'$rownum\\' - keywords=\\'$keywords\\' typeid=\\'$ttypeid\\'} - $listtmp - {/dede:specnote}\r\n"; - } - } - //更新附加表 - $inQuery = "UPDATE `#@__addonspec` SET typeid ='$typeid',note='$notelist'{$inadd_f},templet='$templet' WHERE aid='$id';"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库附加表 addonspec 时出错,请检查原因", "-1"); - exit(); - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $artUrl = MakeArt($id, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - // 自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:发布新专题  查看更改  查看专题  已发布专题管理 "; - $wintitle = "成功更改一个专题"; - $wecome_info = "专题管理::更改专题"; - $win = new OxWindow(); - $win->AddTitle("成功更改专题"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); +GetOne($arcQuery); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错!", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='-1'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错!", "javascript:;"); + exit(); + } + $addRow = $dsql->GetOne("SELECT * FROM `#@__addonspec` WHERE aid='$aid'"); + $tags = GetTags($aid); + include DedeInclude("templets/spec_edit.htm"); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (!isset($tags)) $tags = ''; + $channelid = -1; + //处理自定义字段会用到这些变量 + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $sortrank = AddDay($pubdate, $sortup); + if ($ishtml == 0) $ismake = -1; + else $ismake = 0; + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = trim(cn_substrR($keywords, 60)); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match('#p#', $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + $inQuery = "UPDATE `#@__archives` SET + typeid='$typeid', + sortrank='$sortrank', + flag='$flag', + ismake='$ismake', + arcrank='$arcrank', + click='$click', + title='$title', + color='$color', + writer='$writer', + source='$source', + litpic='$litpic', + pubdate='$pubdate', + notpost='$notpost', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库archives表时出错,请检查", "-1"); + exit(); + } + //专题节点列表 + $arcids = array(); + $notelist = ''; + for ($i = 1; $i <= $cfg_specnote; $i++) { + if (!empty(${'notename'.$i})) { + $notename = str_replace("'", "", trim(${'notename'.$i})); + $arcid = trim(${'arcid'.$i}); + $col = trim(${'col'.$i}); + $imgwidth = trim(${'imgwidth'.$i}); + $imgheight = trim(${'imgheight'.$i}); + $titlelen = trim(${'titlelen'.$i}); + $infolen = trim(${'infolen'.$i}); + $listtmp = trim(${'listtmp'.$i}); + if (isset(${'noteid'.$i})) { + $noteid = trim(${'noteid'.$i}); + } else { + $noteid = $i; + } + if (isset(${'isauto'.$i})) { + $isauto = trim(${'isauto'.$i}); + } else { + $isauto = 0; + } + if (isset(${'keywords'.$i})) { + $keywords = str_replace("'", "", trim(${'keywords'.$i})); + } else { + $keywords = ""; + } + if (!empty(${'typeid'.$i})) { + $ttypeid = trim(${'typeid'.$i}); + } else { + $ttypeid = 0; + } + if (!empty(${'rownum'.$i})) { + $rownum = trim(${'rownum'.$i}); + } else { + $rownum = 0; + } + $arcid = preg_replace("#[^0-9,]#", "", $arcid); + $ids = explode(",", $arcid); + $okids = ""; + if (is_array($ids)) { + foreach ($ids as $mid) { + $mid = trim($mid); + if ($mid == "") continue; + if (!isset($arcids[$mid])) { + if ($okids == "") { + $okids .= $mid; + } else { + $okids .= ",".$mid; + } + $arcids[$mid] = 1; + } + } + } + $notelist .= "{dede:specnote imgheight=\\'$imgheight\\' imgwidth=\\'$imgwidth\\' + infolen=\\'$infolen\\' titlelen=\\'$titlelen\\' col=\\'$col\\' idlist=\\'$okids\\' + name=\\'$notename\\' noteid=\\'$noteid\\' isauto=\'$isauto\' rownum=\\'$rownum\\' + keywords=\\'$keywords\\' typeid=\\'$ttypeid\\'} + $listtmp + {/dede:specnote}\r\n"; + } + } + //更新附加表 + $inQuery = "UPDATE `#@__addonspec` SET typeid ='$typeid',note='$notelist'{$inadd_f},templet='$templet' WHERE aid='$id';"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库附加表 addonspec 时出错,请检查原因", "-1"); + exit(); + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $artUrl = MakeArt($id, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:发布新专题  查看修改  查看专题  已发布专题管理 "; + $wintitle = "成功修改一个专题"; + $wecome_info = "专题管理::修改专题"; + $win = new OxWindow(); + $win->AddTitle("成功修改专题"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/stepselect_main.php b/src/admin/stepselect_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/stepselect_main.php rename to src/admin/stepselect_main.php index be525d21..c04c5c4e --- a/src/dede/stepselect_main.php +++ b/src/admin/stepselect_main.php @@ -1,263 +1,262 @@ -Execute('me', 'SELECT * FROM `#@__stepselect` ORDER BY id DESC'); - while ($arr = $dsql->GetArray()) { - $etypes[] = $arr; - $egroups[$arr['egroup']] = $arr['itemname']; - } - - if ($egroup != '') { - $orderby = 'ORDER BY disorder ASC, evalue ASC'; - if (!empty($topvalue)) { - // 判断是否为1级联动 - if ($topvalue % 500 == 0) { - $egroupsql = " WHERE egroup LIKE '$egroup' AND evalue>=$topvalue AND evalue < ".($topvalue + 500); - } else { - $egroupsql = " WHERE (evalue LIKE '$topvalue.%%%' OR evalue=$topvalue) AND egroup LIKE '$egroup'"; - } - } else { - $egroupsql = " WHERE egroup LIKE '$egroup' "; - } - $sql = "SELECT * FROM `#@__sys_enum` $egroupsql $orderby"; - } else { - $egroupsql = ''; - $sql = "SELECT * FROM `#@__stepselect` ORDER BY id DESC"; - } - //echo $sql;exit; - $dlist = new DataListCP(); - $dlist->SetParameter('egroup', $egroup); - $dlist->SetParameter('topvalue', $topvalue); - $dlist->SetTemplet(DEDEADMIN."/templets/stepselect_main.htm"); - $dlist->SetSource($sql); - $dlist->display(); - exit(); -} else if ($action == 'edit' || $action == 'addnew' || $action == 'addenum' || $action == 'view') { - AjaxHead(); - include('./templets/stepselect_showajax.htm'); - exit(); -} -/*----------------- -删除类型或枚举值 -function __del() { } -------------------*/ else if ($action == 'del') { - $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE id='$id' "); - if (!is_array($arr)) { - ShowMsg("无法获取分类信息,不允许后续操作", "stepselect_main.php?".ExecTime()); - exit(); - } - if ($arr['issystem'] == 1) { - ShowMsg("系统内置的枚举分类不能删除", "stepselect_main.php?".ExecTime()); - exit(); - } - $dsql->ExecuteNoneQuery("DELETE FROM `#@__stepselect` WHERE id='$id'; "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}'; "); - ShowMsg("成功删除一个分类", "stepselect_main.php?".ExecTime()); - exit(); -} else if ($action == 'delenumAllSel') { - if (isset($ids) && is_array($ids)) { - $id = join(',', $ids); - - $groups = array(); - $dsql->Execute('me', "SELECT egroup FROM `#@__sys_enum` WHERE id IN($id) GROUP BY egroup"); - while ($row = $dsql->GetArray('me')) { - $groups[] = $row['egroup']; - } - - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id IN($id); "); - - //更新缓存 - foreach ($groups as $egropu) { - WriteEnumsCache($egroup); - } - - ShowMsg("成功删除选中的枚举分类", $ENV_GOBACK_URL); - } else { - ShowMsg("您没选择任何分类", "-1"); - } - exit(); -} else if ($action == 'delenum') { - $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id='{$id}'; "); - WriteEnumsCache($row['egroup']); - ShowMsg("成功删除一个枚举", $ENV_GOBACK_URL); - exit(); -} -/*----------------- -保存类型修改 -function __edit_save() { } -------------------*/ else if ($action == 'edit_save') { - if (preg_match("#[^0-9a-z_-]#i", $egroup)) { - ShowMsg("组名称不能有全角字符或特殊符号", "-1"); - exit(); - } - $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `itemname`='$itemname',`egroup`='$egroup' WHERE id='$id'; "); - ShowMsg("成功修改一个分类", "stepselect_main.php?".ExecTime()); - exit(); -} -/*----------------- -保存新类型 -function __addnew_save() { } -------------------*/ else if ($action == 'addnew_save') { - if (preg_match("#[^0-9a-z_-]#i", $egroup)) { - ShowMsg("组名称不能有全角字符或特殊符号", "-1"); - exit(); - } - $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE itemname LIKE '$itemname' OR egroup LIKE '$egroup' "); - if (is_array($arr)) { - ShowMsg("您指定的类别名称或组名称已经存在,不能使用", "stepselect_main.php"); - exit(); - } - $dsql->ExecuteNoneQuery("INSERT INTO `#@__stepselect`(`itemname`,`egroup`,`issign`,`issystem`) VALUES('$itemname','$egroup','0','0'); "); - WriteEnumsCache($egroup); - ShowMsg("成功添加一个分类", "stepselect_main.php?egroup=$egroup"); - exit(); -} -/*--------- -把旧版全国省市表替换当前地区数据 -function __exarea() { } -----------*/ else if ($action == 'exarea') { - $bigtypes = array(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='nativeplace'; "); - $query = "SELECT * FROM `#@__area` WHERE reid =0 order by id asc"; - $dsql->Execute('me', $query); - $n = 1; - while ($row = $dsql->GetArray()) { - $bigtypes[$row['id']] = $evalue = $disorder = $n * 500; - $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); - $n++; - } - $stypes = array(); - foreach ($bigtypes as $k => $v) { - $query = "SELECT * FROM `#@__area` WHERE reid=$k order by id asc"; - $dsql->Execute('me', $query); - $n = 1; - while ($row = $dsql->GetArray()) { - $stypes[$row['id']] = $evalue = $disorder = $v + $n; - $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); - $n++; - } - } - WriteEnumsCache('nativeplace'); - ShowMsg("成功导入所有旧的地区数据", "stepselect_main.php?egroup=nativeplace"); - exit(); -} -/*-------------------- -function __addenum_save() { } -关于二级枚举的说明,为了节省查询速度,二级枚举是通过特殊算法生成的,原理为 -凡是能被 500 整除的都是一级枚举,(500 * n) + 1 < em < 500 * (n+1) 为下级枚举 -如:1000 的下级枚举对应的值为 1001,1002,1003...1499 -对于 issign=1 的,表示这个类别只有一级枚举,则不受上面的算法限制 ------------------------------------------------------------------------- -更新算法: -新增二级枚举下添加"-N"自己类别选择,例如: -1001二级枚举下面的3级类目,则为1001-1,1001-2... -这时候需要issign=2 ----------------------*/ else if ($action == 'addenum_save') { - if (empty($ename) || empty($egroup)) { - Showmsg("类别名称或组名称不能为空", "-1"); - exit(); - } - if ($issign == 1 || $topvalue == 0) { - $enames = explode(',', $ename); - foreach ($enames as $ename) { - $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND (evalue MOD 500)=0 ORDER BY disorder DESC "); - if (!is_array($arr)) $disorder = $evalue = ($issign == 1 ? 1 : 500); - else $disorder = $evalue = $arr['disorder'] + ($issign == 1 ? 1 : 500); - - $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); - } - WriteEnumsCache($egroup); - ShowMsg("成功添加枚举分类".$dsql->GetError(), $ENV_GOBACK_URL); - exit(); - } else if ($issign == 2 && $topvalue != 0) { - $minid = $topvalue; - $maxnum = 500; // 三级子类最多500个 - $enames = explode(',', $ename); - foreach ($enames as $ename) { - $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND evalue LIKE '$topvalue.%%%' ORDER BY evalue DESC "); - if (!is_array($arr)) { - $disorder = $minid; - $evalue = $minid.'.001'; - } else { - $disorder = $minid; - preg_match("#([0-9]{1,})\.([0-9]{1,})#", $arr['evalue'], $matchs); - $addvalue = $matchs[2] + 1; - $addvalue = sprintf("%03d", $addvalue); - $evalue = $matchs[1].'.'.$addvalue; - } - $sql = "INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "; - // echo $sql;exit; - $dsql->ExecuteNoneQuery($sql); - } - // echo $minid; - WriteEnumsCache($egroup); - ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); - exit(); - } else { - $minid = $topvalue; - $maxid = $topvalue + 500; - $enames = explode(',', $ename); - foreach ($enames as $ename) { - $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND evalue>$minid AND evalue<$maxid ORDER BY evalue DESC "); - if (!is_array($arr)) { - $disorder = $evalue = $minid + 1; - } else { - $disorder = $arr['disorder'] + 1; - $evalue = $arr['evalue'] + 1; - } - $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); - } - WriteEnumsCache($egroup); - ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); - exit(); - } -} -/*----------------- -修改枚举名称和排序 -function __upenum() { } -------------------*/ else if ($action == 'upenum') { - $ename = trim(preg_replace("# └─(─){1,}#", '', $ename)); - $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$aid' "); - WriteEnumsCache($row['egroup']); - $dsql->ExecuteNoneQuery("UPDATE `#@__sys_enum` SET `ename`='$ename',`disorder`='$disorder' WHERE id='$aid'; "); - ShowMsg("成功修改一个枚举", $ENV_GOBACK_URL); - exit(); -} -/*----------------- -更新枚举缓存 -function __upallcache() { } -------------------*/ else if ($action == 'upallcache') { - if (!isset($egroup)) $egroup = ''; - WriteEnumsCache($egroup); - ShowMsg("成更新枚举缓存", $ENV_GOBACK_URL); - exit(); -} +Execute('me', 'SELECT * FROM `#@__stepselect` ORDER BY id DESC'); + while ($arr = $dsql->GetArray()) { + $etypes[] = $arr; + $egroups[$arr['egroup']] = $arr['itemname']; + } + + if ($egroup != '') { + $orderby = 'ORDER BY disorder ASC, evalue ASC'; + if (!empty($topvalue)) { + //判断是否为1级联动 + if ($topvalue % 500 == 0) { + $egroupsql = " WHERE egroup LIKE '$egroup' AND evalue>=$topvalue AND evalue < ".($topvalue + 500); + } else { + $egroupsql = " WHERE (evalue LIKE '$topvalue.%%%' OR evalue=$topvalue) AND egroup LIKE '$egroup'"; + } + } else { + $egroupsql = " WHERE egroup LIKE '$egroup' "; + } + $sql = "SELECT * FROM `#@__sys_enum` $egroupsql $orderby"; + } else { + $egroupsql = ''; + $sql = "SELECT * FROM `#@__stepselect` ORDER BY id DESC"; + } + //echo $sql;exit; + $dlist = new DataListCP(); + $dlist->SetParameter('egroup', $egroup); + $dlist->SetParameter('topvalue', $topvalue); + $dlist->SetTemplet(DEDEADMIN."/templets/stepselect_main.htm"); + $dlist->SetSource($sql); + $dlist->display(); + exit(); +} else if ($action == 'edit' || $action == 'addnew' || $action == 'addenum' || $action == 'view') { + AjaxHead(); + include('./templets/stepselect_showajax.htm'); + exit(); +} +/*----------------- +删除类型或枚举值 +function __del() { } +------------------*/ else if ($action == 'del') { + $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE id='$id' "); + if (!is_array($arr)) { + ShowMsg("无法获取分类信息,不允许后续操作", "stepselect_main.php?".ExecTime()); + exit(); + } + if ($arr['issystem'] == 1) { + ShowMsg("系统内置的枚举分类不能删除", "stepselect_main.php?".ExecTime()); + exit(); + } + $dsql->ExecuteNoneQuery("DELETE FROM `#@__stepselect` WHERE id='$id'; "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}'; "); + ShowMsg("成功删除一个分类", "stepselect_main.php?".ExecTime()); + exit(); +} else if ($action == 'delenumAllSel') { + if (isset($ids) && is_array($ids)) { + $id = join(',', $ids); + + $groups = array(); + $dsql->Execute('me', "SELECT egroup FROM `#@__sys_enum` WHERE id IN($id) GROUP BY egroup"); + while ($row = $dsql->GetArray('me')) { + $groups[] = $row['egroup']; + } + + $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id IN($id); "); + + //更新缓存 + foreach ($groups as $egropu) { + WriteEnumsCache($egroup); + } + + ShowMsg("成功删除选中的枚举分类", $ENV_GOBACK_URL); + } else { + ShowMsg("您没选择任何分类", "-1"); + } + exit(); +} else if ($action == 'delenum') { + $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id='{$id}'; "); + WriteEnumsCache($row['egroup']); + ShowMsg("成功删除一个枚举", $ENV_GOBACK_URL); + exit(); +} +/*----------------- +保存类型修改 +function __edit_save() { } +------------------*/ else if ($action == 'edit_save') { + if (preg_match("#[^0-9a-z_-]#i", $egroup)) { + ShowMsg("组名称不能有全角字符或特殊符号", "-1"); + exit(); + } + $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `itemname`='$itemname',`egroup`='$egroup' WHERE id='$id'; "); + ShowMsg("成功修改一个分类", "stepselect_main.php?".ExecTime()); + exit(); +} +/*----------------- +保存新类型 +function __addnew_save() { } +------------------*/ else if ($action == 'addnew_save') { + if (preg_match("#[^0-9a-z_-]#i", $egroup)) { + ShowMsg("组名称不能有全角字符或特殊符号", "-1"); + exit(); + } + $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE itemname LIKE '$itemname' OR egroup LIKE '$egroup' "); + if (is_array($arr)) { + ShowMsg("您指定的类别名称或组名称已经存在,不能使用", "stepselect_main.php"); + exit(); + } + $dsql->ExecuteNoneQuery("INSERT INTO `#@__stepselect`(`itemname`,`egroup`,`issign`,`issystem`) VALUES('$itemname','$egroup','0','0'); "); + WriteEnumsCache($egroup); + ShowMsg("成功添加一个分类", "stepselect_main.php?egroup=$egroup"); + exit(); +} +/*--------- +把旧版全国省市表替换当前地区数据 +function __exarea() { } +----------*/ else if ($action == 'exarea') { + $bigtypes = array(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='nativeplace'; "); + $query = "SELECT * FROM `#@__area` WHERE reid =0 order by id asc"; + $dsql->Execute('me', $query); + $n = 1; + while ($row = $dsql->GetArray()) { + $bigtypes[$row['id']] = $evalue = $disorder = $n * 500; + $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); + $n++; + } + $stypes = array(); + foreach ($bigtypes as $k => $v) { + $query = "SELECT * FROM `#@__area` WHERE reid=$k order by id asc"; + $dsql->Execute('me', $query); + $n = 1; + while ($row = $dsql->GetArray()) { + $stypes[$row['id']] = $evalue = $disorder = $v + $n; + $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); + $n++; + } + } + WriteEnumsCache('nativeplace'); + ShowMsg("成功导入所有旧的地区数据", "stepselect_main.php?egroup=nativeplace"); + exit(); +} +/*-------------------- +function __addenum_save() { } +关于二级枚举的说明,为了节省查询速度,二级枚举是通过特殊算法生成的,原理为 +凡是能被 500 整除的都是一级枚举,(500 * n) + 1 < em < 500 * (n+1) 为下级枚举 +如:1000 的下级枚举对应的值为 1001,1002,1003...1499 +对于 issign=1 的,表示这个类别只有一级枚举,则不受上面的算法限制 +------------------------------------------------------------------------ +更新算法: +新增二级枚举下添加"-N"自己类别选择,例如: +1001二级枚举下面的3级类目,则为1001-1,1001-2... +这时候需要issign=2 +---------------------*/ else if ($action == 'addenum_save') { + if (empty($ename) || empty($egroup)) { + Showmsg("类别名称或组名称不能为空", "-1"); + exit(); + } + if ($issign == 1 || $topvalue == 0) { + $enames = explode(',', $ename); + foreach ($enames as $ename) { + $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND (evalue MOD 500)=0 ORDER BY disorder DESC "); + if (!is_array($arr)) $disorder = $evalue = ($issign == 1 ? 1 : 500); + else $disorder = $evalue = $arr['disorder'] + ($issign == 1 ? 1 : 500); + + $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); + } + WriteEnumsCache($egroup); + ShowMsg("成功添加枚举分类".$dsql->GetError(), $ENV_GOBACK_URL); + exit(); + } else if ($issign == 2 && $topvalue != 0) { + $minid = $topvalue; + $maxnum = 500; //三级子类最多500个 + $enames = explode(',', $ename); + foreach ($enames as $ename) { + $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND evalue LIKE '$topvalue.%%%' ORDER BY evalue DESC "); + if (!is_array($arr)) { + $disorder = $minid; + $evalue = $minid.'.001'; + } else { + $disorder = $minid; + preg_match("#([0-9]{1,})\.([0-9]{1,})#", $arr['evalue'], $matchs); + $addvalue = $matchs[2] + 1; + $addvalue = sprintf("%03d", $addvalue); + $evalue = $matchs[1].'.'.$addvalue; + } + $sql = "INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "; + //echo $sql;exit; + $dsql->ExecuteNoneQuery($sql); + } + //echo $minid; + WriteEnumsCache($egroup); + ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); + exit(); + } else { + $minid = $topvalue; + $maxid = $topvalue + 500; + $enames = explode(',', $ename); + foreach ($enames as $ename) { + $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND evalue>$minid AND evalue<$maxid ORDER BY evalue DESC "); + if (!is_array($arr)) { + $disorder = $evalue = $minid + 1; + } else { + $disorder = $arr['disorder'] + 1; + $evalue = $arr['evalue'] + 1; + } + $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); + } + WriteEnumsCache($egroup); + ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); + exit(); + } +} +/*----------------- +修改枚举名称和排序 +function __upenum() { } +------------------*/ else if ($action == 'upenum') { + $ename = trim(preg_replace("# └─(─){1,}#", '', $ename)); + $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$aid' "); + WriteEnumsCache($row['egroup']); + $dsql->ExecuteNoneQuery("UPDATE `#@__sys_enum` SET `ename`='$ename',`disorder`='$disorder' WHERE id='$aid'; "); + ShowMsg("成功修改一个枚举", $ENV_GOBACK_URL); + exit(); +} +/*----------------- +更新枚举缓存 +function __upallcache() { } +------------------*/ else if ($action == 'upallcache') { + if (!isset($egroup)) $egroup = ''; + WriteEnumsCache($egroup); + ShowMsg("成更新枚举缓存", $ENV_GOBACK_URL); + exit(); +} diff --git a/src/dede/swfupload.php b/src/admin/swfupload.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/swfupload.php rename to src/admin/swfupload.php index 36e88ad2..fac8157c --- a/src/dede/swfupload.php +++ b/src/admin/swfupload.php @@ -1,198 +1,197 @@ -getUserID().'-'.dd2char(MyDate('ymdHis', time())); - if (file_exists($cfg_basedir.$filedir.'/'.$filename.$sname)) { - for ($i = 50; $i <= 5000; $i++) { - if (!file_exists($cfg_basedir.$filedir.'/'.$filename.'-'.$i.$sname)) { - $filename = $filename.'-'.$i; - break; - } - } - } - $fileurl = $filedir.'/'.$filename.$sname; - $rs = copy($FiledataNew, $cfg_basedir.$fileurl); - unlink($FiledataNew); - if (!$rs) { - echo "ERROR: Copy Uploadfile Error! "; - exit(0); - } - //WaterImg($cfg_basedir.$fileurl, 'up'); - $title = $filename.$sname; - - $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; - if (!empty($arcid)) { - $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$arcid','$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; - } - - $dsql->ExecuteNoneQuery($inquery); - $fid = $dsql->GetLastID(); - AddMyAddon($fid, $fileurl); - - //生成缩略图 - ob_start(); - ImageResizeNew($cfg_basedir.$fileurl, $cfg_ddimg_width, $cfg_ddimg_height, '', false); - $imagevariable = ob_get_contents(); - ob_end_clean(); - - //保存信息到 session - if (!isset($_SESSION['file_info'])) $_SESSION['file_info'] = array(); - if (!isset($_SESSION['bigfile_info'])) $_SESSION['bigfile_info'] = array(); - if (!isset($_SESSION['fileid'])) $_SESSION['fileid'] = 1; - else $_SESSION['fileid']++; - - $_SESSION['bigfile_info'][$_SESSION['fileid']] = $fileurl; - $_SESSION['file_info'][$_SESSION['fileid']] = $imagevariable; - echo "FILEID:".$_SESSION['fileid']; - exit(0); -} -/************************ -//生成缩图 -function GetThumbnail(){ } -*************************/ -else if ($dopost == 'thumbnail') { - if (empty($id)) { - header('HTTP/1.1 500 Internal Server Error'); - echo 'No ID'; - exit(0); - } - if (!is_array($_SESSION['file_info']) || !isset($_SESSION['file_info'][$id])) { - header('HTTP/1.1 404 Not found'); - exit(0); - } - header('Content-type: image/jpeg'); - header('Content-Length: '.strlen($_SESSION['file_info'][$id])); - echo $_SESSION['file_info'][$id]; - exit(0); -} -/************************ -//删除指定ID的图片 -*************************/ -else if ($dopost == 'del') { - if (!isset($_SESSION['bigfile_info'][$id])) { - echo ''; - exit(); - } - $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$_SESSION['bigfile_info'][$id]}'; "); - @unlink($cfg_basedir.$_SESSION['bigfile_info'][$id]); - $_SESSION['file_info'][$id] = ''; - $_SESSION['bigfile_info'][$id] = ''; - echo "已删除"; - exit(); -} -/************************ -//获取图片地址 -*************************/ -else if ($dopost == 'addtoedit') { - if (!isset($_SESSION['bigfile_info'][$id])) { - echo ''; - exit(); - } - echo $_SESSION['bigfile_info'][$id]; - exit(); -} -/************************ -//获取本地图片的缩略预览图 -function GetddImg(){ } -*************************/ -else if ($dopost == 'ddimg') { - //生成缩略图 - ob_start(); - if (!preg_match("/^(http[s]?:\/\/)?([^\/]+)/i", $img)) $img = $cfg_basedir.$img; - ImageResizeNew($img, $cfg_ddimg_width, $cfg_ddimg_height, '', false); - $imagevariable = ob_get_contents(); - ob_end_clean(); - header('Content-type: image/jpeg'); - header('Content-Length: '.strlen($imagevariable)); - echo $imagevariable; - exit(); -} -/************************ -//删除指定的图片(编辑图集时用) -*************************/ -else if ($dopost == 'delold') { - $imgfile = $cfg_basedir.$picfile; - if (!file_exists($imgfile) && !is_dir($imgfile) && preg_match("#^".$cfg_medias_dir."#", $imgfile)) { - @unlink($imgfile); - } - $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}'; "); - echo "已删除"; - exit(); -} +getUserID().'-'.dd2char(MyDate('ymdHis', time())); + if (file_exists($cfg_basedir.$filedir.'/'.$filename.$sname)) { + for ($i = 50; $i <= 5000; $i++) { + if (!file_exists($cfg_basedir.$filedir.'/'.$filename.'-'.$i.$sname)) { + $filename = $filename.'-'.$i; + break; + } + } + } + $fileurl = $filedir.'/'.$filename.$sname; + $rs = copy($FiledataNew, $cfg_basedir.$fileurl); + unlink($FiledataNew); + if (!$rs) { + echo "ERROR: Copy Uploadfile Error! "; + exit(0); + } + //WaterImg($cfg_basedir.$fileurl, 'up'); + $title = $filename.$sname; + + $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; + if (!empty($arcid)) { + $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('$arcid','$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; + } + + $dsql->ExecuteNoneQuery($inquery); + $fid = $dsql->GetLastID(); + AddMyAddon($fid, $fileurl); + + //生成缩略图 + ob_start(); + ImageResizeNew($cfg_basedir.$fileurl, $cfg_ddimg_width, $cfg_ddimg_height, '', false); + $imagevariable = ob_get_contents(); + ob_end_clean(); + + //保存信息到 session + if (!isset($_SESSION['file_info'])) $_SESSION['file_info'] = array(); + if (!isset($_SESSION['bigfile_info'])) $_SESSION['bigfile_info'] = array(); + if (!isset($_SESSION['fileid'])) $_SESSION['fileid'] = 1; + else $_SESSION['fileid']++; + + $_SESSION['bigfile_info'][$_SESSION['fileid']] = $fileurl; + $_SESSION['file_info'][$_SESSION['fileid']] = $imagevariable; + echo "FILEID:".$_SESSION['fileid']; + exit(0); +} +/************************ +//生成缩图 +function GetThumbnail(){ } +*************************/ +else if ($dopost == 'thumbnail') { + if (empty($id)) { + header('HTTP/1.1 500 Internal Server Error'); + echo 'No ID'; + exit(0); + } + if (!is_array($_SESSION['file_info']) || !isset($_SESSION['file_info'][$id])) { + header('HTTP/1.1 404 Not found'); + exit(0); + } + header('Content-type: image/jpeg'); + header('Content-Length: '.strlen($_SESSION['file_info'][$id])); + echo $_SESSION['file_info'][$id]; + exit(0); +} +/************************ +//删除指定ID的图片 +*************************/ +else if ($dopost == 'del') { + if (!isset($_SESSION['bigfile_info'][$id])) { + echo ''; + exit(); + } + $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$_SESSION['bigfile_info'][$id]}'; "); + @unlink($cfg_basedir.$_SESSION['bigfile_info'][$id]); + $_SESSION['file_info'][$id] = ''; + $_SESSION['bigfile_info'][$id] = ''; + echo "已删除"; + exit(); +} +/************************ +//获取图片地址 +*************************/ +else if ($dopost == 'addtoedit') { + if (!isset($_SESSION['bigfile_info'][$id])) { + echo ''; + exit(); + } + echo $_SESSION['bigfile_info'][$id]; + exit(); +} +/************************ +//获取本地图片的缩略预览图 +function GetddImg(){ } +*************************/ +else if ($dopost == 'ddimg') { + //生成缩略图 + ob_start(); + if (!preg_match("/^(http[s]?:\/\/)?([^\/]+)/i", $img)) $img = $cfg_basedir.$img; + ImageResizeNew($img, $cfg_ddimg_width, $cfg_ddimg_height, '', false); + $imagevariable = ob_get_contents(); + ob_end_clean(); + header('Content-type: image/jpeg'); + header('Content-Length: '.strlen($imagevariable)); + echo $imagevariable; + exit(); +} +/************************ +//删除指定的图片(编辑图集时用) +*************************/ +else if ($dopost == 'delold') { + $imgfile = $cfg_basedir.$picfile; + if (!file_exists($imgfile) && !is_dir($imgfile) && preg_match("#^".$cfg_medias_dir."#", $imgfile)) { + @unlink($imgfile); + } + $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}'; "); + echo "已删除"; + exit(); +} diff --git a/src/dede/sys_admin_user.php b/src/admin/sys_admin_user.php old mode 100755 new mode 100644 similarity index 80% rename from src/dede/sys_admin_user.php rename to src/admin/sys_admin_user.php index 15bccf02..63327a18 --- a/src/dede/sys_admin_user.php +++ b/src/admin/sys_admin_user.php @@ -1,41 +1,40 @@ -SetQuery("SELECT `rank`,`typename` FROM `#@__admintype` "); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $adminRanks[$row->rank] = $row->typename; -} -$query = "SELECT `#@__admin`.*,`#@__arctype`.typename FROM `#@__admin` LEFT JOIN `#@__arctype` ON `#@__admin`.typeid = `#@__arctype`.id $rank "; -$dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN."/templets/sys_admin_user.htm"); -$dlist->SetSource($query); -$dlist->Display(); - -function GetUserType($trank) -{ - global $adminRanks; - if (isset($adminRanks[$trank])) return $adminRanks[$trank]; - else return "错误类型"; -} - -function GetChannel($c) -{ - if ($c == "" || $c == 0) return "所有频道"; - else return $c; -} +SetQuery("SELECT rank,typename FROM `#@__admintype` "); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $adminRanks[$row->rank] = $row->typename; +} +$query = "SELECT #@__admin.*,#@__arctype.typename FROM #@__admin LEFT JOIN #@__arctype ON #@__admin.typeid = #@__arctype.id $rank "; +$dlist = new DataListCP(); +$dlist->SetTemplet(DEDEADMIN."/templets/sys_admin_user.htm"); +$dlist->SetSource($query); +$dlist->Display(); + +function GetUserType($trank) +{ + global $adminRanks; + if (isset($adminRanks[$trank])) return $adminRanks[$trank]; + else return "错误类型"; +} + +function GetChannel($c) +{ + if ($c == "" || $c == 0) return "所有频道"; + else return $c; +} diff --git a/src/dede/sys_admin_user_add.php b/src/admin/sys_admin_user_add.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/sys_admin_user_add.php rename to src/admin/sys_admin_user_add.php index 78be1f49..0afdfd85 --- a/src/dede/sys_admin_user_add.php +++ b/src/admin/sys_admin_user_add.php @@ -1,5 +1,4 @@ ExecuteNoneQuery($query); $query = "UPDATE `#@__member` SET uname='$uname',email='$email'$pwdm WHERE mid='$id'"; $dsql->ExecuteNoneQuery($query); - ShowMsg("成功更改一个帐户", "sys_admin_user.php"); + ShowMsg("成功修改一个帐户", "sys_admin_user.php"); exit(); } else if ($dopost == 'delete') { if (empty($userok)) $userok = ""; @@ -65,7 +64,7 @@ if ($dopost == 'saveedit') { $win->AddHidden("id", $id); $win->AddTitle("系统警告"); $win->AddMsgItem("您确信要删除用户:$userid 吗?", "50"); - $win->AddMsgItem("安全验证串: (复制本代码: $safecode )", "30"); + $win->AddMsgItem("安全验证串: (复制本代码: $safecode )", "30"); $winform = $win->GetWindow("ok"); $win->Display(); exit(); diff --git a/src/dede/sys_admin_user_tj.php b/src/admin/sys_admin_user_tj.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/sys_admin_user_tj.php rename to src/admin/sys_admin_user_tj.php index b62c95d1..5412fd98 --- a/src/dede/sys_admin_user_tj.php +++ b/src/admin/sys_admin_user_tj.php @@ -1,127 +1,126 @@ -GetOne("SELECT userid FROM `#@__admin` WHERE id='$uid'; "); - $userid = $row['userid']; - $y = intval(MyDate('Y', time())); - $m = intval(MyDate('m', time())); - $d = intval(MyDate('d', time())); - - //全部 - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $dd = empty($dd) ? "0" : $dd; - $cc = empty($cc) ? "0" : $cc; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE mid='$uid'; "); - $dd += $row['dd']; - $cc += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE mid='$uid'; "); - $dd = $row['dd'] + $dd; - $cc = $row['cc'] + $cc; - - //季度 - $starttime = 0; - if (preg_match("#[123]#", $m) && $m < 10) $starttime = $y."-01-01 00:00:00"; - else if (preg_match("#[456]#", $m)) $starttime = $y."-04-01 00:00:00"; - else if (preg_match("#[789]#", $m)) $starttime = $y."-07-01 00:00:00"; - else $starttime = $y."-10-01 00:00:00"; - $istarttime = GetMkTime($starttime); - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $dds = empty($dds) ? "0" : $dds; - $ccs = empty($ccs) ? "0" : $ccs; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); - $dds += $row['dd']; - $ccs += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); - $dds = $row['dd'] + $dds; - $ccs = $row['cc'] + $ccs; - - //当月 - $starttime = $y."-{$m}-01 00:00:00"; - $istarttime = GetMkTime($starttime); - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $ddm = empty($ddm) ? "0" : $ddm; - $ccm = empty($ccm) ? "0" : $ccm; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddm += $row['dd']; - $ccm += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddm = $row['dd'] + $ddm; - $ccm = $row['cc'] + $ccm; - - //本周 - $starttime = $y."-{$m}-{$d} 00:00:00"; - $istarttime = GetMkTime($starttime) - (7 * 24 * 3600); - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $ddw = empty($ddw) ? "0" : $ddw; - $ccw = empty($ccw) ? "0" : $ccw; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddw += $row['dd']; - $ccw += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddw = $row['dd'] + $ddw; - $ccw = $row['cc'] + $ccw; - - //当天 - $starttime = $y."-{$m}-{$d} 00:00:00"; - $istarttime = GetMkTime($starttime); - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $ddd = empty($ddd) ? "0" : $ddd; - $ccd = empty($ccd) ? "0" : $ccd; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddd += $row['dd']; - $ccd += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddd = $row['dd'] + $ddd; - $ccd = $row['cc'] + $ccd; - - $msg = " - - - - - - - - - - - - - - - - -
管理员↓|统计信息→全部(文档|点击)季度当月近七天当天
{$userid}{$dd} | {$cc}{$dds} | {$ccs}{$ddm} | {$ccm}{$ddw} | {$ccw}{$ddd} | {$ccd}

\r\n"; - AjaxHead(); - echo $msg; - exit(); -} - -include DedeInclude('templets/sys_admin_user_tj.htm'); +GetOne("SELECT userid FROM `#@__admin` WHERE id='$uid'; "); + $userid = $row['userid']; + $y = intval(MyDate('Y', time())); + $m = intval(MyDate('m', time())); + $d = intval(MyDate('d', time())); + + //全部 + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $dd = empty($dd) ? "0" : $dd; + $cc = empty($cc) ? "0" : $cc; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE mid='$uid'; "); + $dd += $row['dd']; + $cc += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE mid='$uid'; "); + $dd = $row['dd'] + $dd; + $cc = $row['cc'] + $cc; + + //季度 + $starttime = 0; + if (preg_match("#[123]#", $m) && $m < 10) $starttime = $y."-01-01 00:00:00"; + else if (preg_match("#[456]#", $m)) $starttime = $y."-04-01 00:00:00"; + else if (preg_match("#[789]#", $m)) $starttime = $y."-07-01 00:00:00"; + else $starttime = $y."-10-01 00:00:00"; + $istarttime = GetMkTime($starttime); + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $dds = empty($dds) ? "0" : $dds; + $ccs = empty($ccs) ? "0" : $ccs; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); + $dds += $row['dd']; + $ccs += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); + $dds = $row['dd'] + $dds; + $ccs = $row['cc'] + $ccs; + + //当月 + $starttime = $y."-{$m}-01 00:00:00"; + $istarttime = GetMkTime($starttime); + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $ddm = empty($ddm) ? "0" : $ddm; + $ccm = empty($ccm) ? "0" : $ccm; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddm += $row['dd']; + $ccm += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddm = $row['dd'] + $ddm; + $ccm = $row['cc'] + $ccm; + + //本周 + $starttime = $y."-{$m}-{$d} 00:00:00"; + $istarttime = GetMkTime($starttime) - (7 * 24 * 3600); + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $ddw = empty($ddw) ? "0" : $ddw; + $ccw = empty($ccw) ? "0" : $ccw; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddw += $row['dd']; + $ccw += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddw = $row['dd'] + $ddw; + $ccw = $row['cc'] + $ccw; + + //当天 + $starttime = $y."-{$m}-{$d} 00:00:00"; + $istarttime = GetMkTime($starttime); + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $ddd = empty($ddd) ? "0" : $ddd; + $ccd = empty($ccd) ? "0" : $ccd; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddd += $row['dd']; + $ccd += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddd = $row['dd'] + $ddd; + $ccd = $row['cc'] + $ccd; + + $msg = " + + + + + + + + + + + + + + + + +
管理员↓|统计信息→全部(文档|点击)季度当月近七天当天
{$userid}{$dd} | {$cc}{$dds} | {$ccs}{$ddm} | {$ccm}{$ddw} | {$ccw}{$ddd} | {$ccd}

\r\n"; + AjaxHead(); + echo $msg; + exit(); +} + +include DedeInclude('templets/sys_admin_user_tj.htm'); diff --git a/src/dede/sys_cache_up.php b/src/admin/sys_cache_up.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/sys_cache_up.php rename to src/admin/sys_cache_up.php index 471de1f5..dbbc0a26 --- a/src/dede/sys_cache_up.php +++ b/src/admin/sys_cache_up.php @@ -1,63 +1,62 @@ -'; - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache`"); - echo "\n成功更新arclist调用缓存,准备清理过期会员访问历史...
"; - $oldtime = time() - (90 * 24 * 3600); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE sendtime<'$oldtime' "); - echo "成功清理过期短信,准备修正错误文档,这可能要占较长的时间..."; - if ($uparc == 1) { - echo ""; - } else { - echo ""; - } - exit(); - } - //修正错误文档 - else if ($step == 9) { - ShowMsg('修正错误文档操作已经取消,请在<系统->系统错误修复[S]>中操作...', 'sys_cache_up.php?dopost=ok&step=-1&uparc=1', 0, 5000); - exit(); - } -} -include DedeInclude('templets/sys_cache_up.htm'); +'; + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache`"); + echo "\n成功更新arclist调用缓存,准备清理过期会员访问历史...
"; + $oldtime = time() - (90 * 24 * 3600); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE sendtime<'$oldtime' "); + echo "成功清理过期短信,准备修正错误文档,这可能要占较长的时间..."; + if ($uparc == 1) { + echo ""; + } else { + echo ""; + } + exit(); + } + //修正错误文档 + else if ($step == 9) { + ShowMsg('修正错误文档操作已经取消,请在<系统->系统错误修复[S]>中操作...', 'sys_cache_up.php?dopost=ok&step=-1&uparc=1', 0, 5000); + exit(); + } +} +include DedeInclude('templets/sys_cache_up.htm'); diff --git a/src/dede/sys_data.php b/src/admin/sys_data.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/sys_data.php rename to src/admin/sys_data.php index f48761af..e44cad18 --- a/src/dede/sys_data.php +++ b/src/admin/sys_data.php @@ -1,92 +1,91 @@ -关闭]\r\n"; - if (empty($tablename)) { - echo "没有指定表名"; - } else { - $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$tablename); - $dsql->Execute('me'); - $row2 = $dsql->GetArray('me', MYSQL_BOTH); - $ctinfo = $row2[1]; - echo trim($ctinfo); - } - echo ''; - exit(); -} else if ($dopost == "opimize") //优化表 -{ - echo "[关闭]\r\n"; - if (empty($tablename)) { - echo "没有指定表名"; - } else { - $rs = $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$tablename` "); - if ($rs) { - echo "执行优化表: $tablename OK"; - } else { - echo "执行优化表: $tablename 失败,原因是:".$dsql->GetError(); - } - } - echo ''; - exit(); -} else if ($dopost == "repair") //修复表 -{ - echo "[关闭]\r\n"; - if (empty($tablename)) { - echo "没有指定表名"; - } else { - $rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `$tablename` "); - if ($rs) { - echo "修复表: $tablename OK"; - } else { - echo "修复表: $tablename 失败,原因是:".$dsql->GetError(); - } - } - echo ''; - exit(); -} - -//获取系统存在的表信息 -$otherTables = array(); -$dedeSysTables = array(); -$channelTables = array(); -$dsql->SetQuery("SELECT addtable FROM `#@__channeltype` "); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $channelTables[] = $row->addtable; -} -$dsql->SetQuery("SHOW TABLES"); -$dsql->Execute('t'); -while ($row = $dsql->GetArray('t', MYSQL_BOTH)) { - if (preg_match("#^{$cfg_dbprefix}#", $row[0]) || in_array($row[0], $channelTables)) { - $dedeSysTables[] = $row[0]; - } else { - $otherTables[] = $row[0]; - } -} -$mysql_version = $dsql->GetVersion(); -include DedeInclude('templets/sys_data.htm'); - -function TjCount($tbname, &$dsql) -{ - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM $tbname"); - return $row['dd']; -} +关闭]\r\n"; + if (empty($tablename)) { + echo "没有指定表名"; + } else { + $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$tablename); + $dsql->Execute('me'); + $row2 = $dsql->GetArray('me', MYSQL_BOTH); + $ctinfo = $row2[1]; + echo trim($ctinfo); + } + echo ''; + exit(); +} else if ($dopost == "opimize") //优化表 +{ + echo "[关闭]\r\n"; + if (empty($tablename)) { + echo "没有指定表名"; + } else { + $rs = $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$tablename` "); + if ($rs) { + echo "执行优化表: $tablename OK"; + } else { + echo "执行优化表: $tablename 失败,原因是:".$dsql->GetError(); + } + } + echo ''; + exit(); +} else if ($dopost == "repair") //修复表 +{ + echo "[关闭]\r\n"; + if (empty($tablename)) { + echo "没有指定表名"; + } else { + $rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `$tablename` "); + if ($rs) { + echo "修复表: $tablename OK"; + } else { + echo "修复表: $tablename 失败,原因是:".$dsql->GetError(); + } + } + echo ''; + exit(); +} + +//获取系统存在的表信息 +$otherTables = array(); +$dedeSysTables = array(); +$channelTables = array(); +$dsql->SetQuery("SELECT addtable FROM `#@__channeltype` "); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $channelTables[] = $row->addtable; +} +$dsql->SetQuery("SHOW TABLES"); +$dsql->Execute('t'); +while ($row = $dsql->GetArray('t', MYSQL_BOTH)) { + if (preg_match("#^{$cfg_dbprefix}#", $row[0]) || in_array($row[0], $channelTables)) { + $dedeSysTables[] = $row[0]; + } else { + $otherTables[] = $row[0]; + } +} +$mysql_version = $dsql->GetVersion(); +include DedeInclude('templets/sys_data.htm'); + +function TjCount($tbname, &$dsql) +{ + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM $tbname"); + return $row['dd']; +} diff --git a/src/dede/sys_data_done.php b/src/admin/sys_data_done.php old mode 100755 new mode 100644 similarity index 87% rename from src/dede/sys_data_done.php rename to src/admin/sys_data_done.php index af7cdc28..3a7d2ecf --- a/src/dede/sys_data_done.php +++ b/src/admin/sys_data_done.php @@ -1,291 +1,272 @@ -$gotojs"; - -/*-------------------- -备份数据 -function __bak_data(); ---------------------*/ -if ($dopost == 'bak') { - if (empty($tablearr)) { - ShowMsg('您没选中任何表', 'javascript:;'); - exit(); - } - if (!is_dir($bkdir)) { - MkdirAll($bkdir, $cfg_dir_purview); - CloseFtp(); - } - - //初始化使用到的变量 - $tables = explode(',', $tablearr); - if (!isset($isstruct)) { - $isstruct = 0; - } - if (!isset($startpos)) { - $startpos = 0; - } - if (!isset($iszip)) { - $iszip = 0; - } - if (empty($nowtable)) { - $nowtable = ''; - } - if (empty($fsize)) { - $fsize = 2048; - } - $fsizeb = $fsize * 1024; - - //第一页的操作 - if ($nowtable == '') { - $tmsg = ''; - $dh = dir($bkdir); - while ($filename = $dh->read()) { - if (!preg_match("#txt$#", $filename)) { - continue; - } - $filename = $bkdir."/$filename"; - if (!is_dir($filename)) { - unlink($filename); - } - } - $dh->close(); - $tmsg .= "清除备份目录旧数据完成...
"; - - if ($isstruct == 1) { - $bkfile = $bkdir."/tables_struct_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; - $mysql_version = $dsql->GetVersion(); - $fp = fopen($bkfile, "w"); - foreach ($tables as $t) { - fwrite($fp, "DROP TABLE IF EXISTS `$t`;\r\n\r\n"); - $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$t); - $dsql->Execute('me'); - $row = $dsql->GetArray('me', MYSQL_BOTH); - - // 去除AUTO_INCREMENT - $row[1] = preg_replace("#AUTO_INCREMENT=([0-9]{1,})[ \r\n\t]{1,}#i", "", $row[1]); - - $eng1 = "#ENGINE=MyISAM[ \r\n\t]{1,}DEFAULT[ \r\n\t]{1,}CHARSET=".$cfg_db_language."#i"; - $tableStruct = preg_replace($eng1, "TYPE=MyISAM", $row[1]); - - fwrite($fp, ''.$tableStruct.";\r\n\r\n"); - } - fclose($fp); - $tmsg .= "备份数据表结构信息完成...
"; - } - $tmsg .= "正在进行数据备份的初始化工作,请稍后..."; - $doneForm = "
- - - - - - - \r\n
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } - //执行分页备份 - else { - $j = 0; - $fs = array(); - $bakStr = ''; - - //分析表里的字段信息 - $dsql->GetTableFields($nowtable); - $intable = "INSERT INTO `$nowtable` VALUES("; - while ($r = $dsql->GetFieldObject()) { - - $fs[$j] = trim($r->name); - $j++; - } - $fsd = $j - 1; - - //读取表的内容 - $dsql->SetQuery("SELECT * FROM `$nowtable` "); - $dsql->Execute(); - $m = 0; - $bakfilename = "$bkdir/{$nowtable}_{$startpos}_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; - while ($row2 = $dsql->GetArray()) { - if ($m < $startpos) { - $m++; - continue; - } - - //检测数据是否达到规定大小 - if (strlen($bakStr) > $fsizeb) { - $fp = fopen($bakfilename, "w"); - fwrite($fp, $bakStr); - fclose($fp); - $tmsg = "完成到{$m}条记录的备份,继续备份{$nowtable}..."; - $doneForm = "
- - - - - - - \r\n
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } - - //正常情况 - $line = $intable; - - for ($j = 0; $j <= $fsd; $j++) { - if ($j < $fsd) { - $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."',"; - } else { - $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."');\r\n"; - } - } - $m++; - $bakStr .= $line; - } - - //如果数据比卷设置值小 - if ($bakStr != '') { - $fp = fopen($bakfilename, "w"); - fwrite($fp, $bakStr); - fclose($fp); - } - for ($i = 0; $i < count($tables); $i++) { - if ($tables[$i] == $nowtable) { - if (isset($tables[$i + 1])) { - $nowtable = $tables[$i + 1]; - $startpos = 0; - break; - } else { - PutInfo("完成所有数据备份", ""); - exit(); - } - } - } - $tmsg = "完成到{$m}条记录的备份,继续备份{$nowtable}..."; - $doneForm = "
- - - - - \r\n
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } - //分页备份代码结束 -} -/*------------------------- -还原数据 -function __re_data(); --------------------------*/ -else if ($dopost == 'redat') { - if ($bakfiles == '') { - ShowMsg('没指定任何要还原的文件!', 'javascript:;'); - exit(); - } - $bakfilesTmp = $bakfiles; - $bakfiles = explode(',', $bakfiles); - if (empty($structfile)) { - $structfile = ""; - } - if (empty($delfile)) { - $delfile = 0; - } - if (empty($startgo)) { - $startgo = 0; - } - if ($startgo == 0 && $structfile != '') { - $tbdata = ''; - $fp = fopen("$bkdir/$structfile", 'r'); - while (!feof($fp)) { - $tbdata .= fgets($fp, 1024); - } - fclose($fp); - $querys = explode(';', $tbdata); - foreach ($querys as $q) { - $q = preg_replace("#TYPE=MyISAM#i","ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language, $q); - $rs = $dsql->ExecuteNoneQuery(trim($q).';'); - } - if ($delfile == 1) { - @unlink("$bkdir/$structfile"); - } - $tmsg = "完成数据表信息还原,准备还原数据..."; - $doneForm = "
- - - -
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } else { - $nowfile = $bakfiles[0]; - $bakfilesTmp = preg_replace("#".$nowfile."[,]{0,1}#", "", $bakfilesTmp); - $oknum = 0; - if (filesize("$bkdir/$nowfile") > 0) { - $fp = fopen("$bkdir/$nowfile", 'r'); - while (!feof($fp)) { - $line = trim(fgets($fp, 512 * 1024)); - if ($line == "") continue; - $rs = $dsql->ExecuteNoneQuery($line); - if ($rs) $oknum++; - } - fclose($fp); - } - if ($delfile == 1) { - @unlink("$bkdir/$nowfile"); - } - if ($bakfilesTmp == "") { - ShowMsg('成功还原所有的文件的数据!', 'javascript:;'); - exit(); - } - $tmsg = "成功还原{$nowfile}的{$oknum}条记录

正在准备还原其它数据..."; - $doneForm = "
- - - -
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } -} - -function PutInfo($msg1, $msg2) -{ - global $cfg_soft_lang; - $msginfo = "\n - - - - DedeBIZ 提示信息 - \n\n\n
{$msg2}"; - echo $msginfo."\n\n"; -} - -function RpLine($str) -{ - $str = str_replace("\r", "\\r", $str); - $str = str_replace("\n", "\\n", $str); - return $str; -} +$gotojs"; +/*-------------------- +备份数据 +function __bak_data(); +--------------------*/ +if ($dopost == 'bak') { + if (empty($tablearr)) { + ShowMsg('您没选中任何表', 'javascript:;'); + exit(); + } + if (!is_dir($bkdir)) { + MkdirAll($bkdir, $cfg_dir_purview); + CloseFtp(); + } + //初始化使用到的变量 + $tables = explode(',', $tablearr); + if (!isset($isstruct)) { + $isstruct = 0; + } + if (!isset($startpos)) { + $startpos = 0; + } + if (!isset($iszip)) { + $iszip = 0; + } + if (empty($nowtable)) { + $nowtable = ''; + } + if (empty($fsize)) { + $fsize = 2048; + } + $fsizeb = $fsize * 1024; + //第一页的操作 + if ($nowtable == '') { + $tmsg = ''; + $dh = dir($bkdir); + while ($filename = $dh->read()) { + if (!preg_match("#txt$#", $filename)) { + continue; + } + $filename = $bkdir."/$filename"; + if (!is_dir($filename)) { + unlink($filename); + } + } + $dh->close(); + $tmsg .= "清除备份目录旧数据完成"; + if ($isstruct == 1) { + $bkfile = $bkdir."/tables_struct_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; + $mysql_version = $dsql->GetVersion(); + $fp = fopen($bkfile, "w"); + foreach ($tables as $t) { + fwrite($fp, "DROP TABLE IF EXISTS `$t`;\r\n\r\n"); + $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$t); + $dsql->Execute('me'); + $row = $dsql->GetArray('me', MYSQL_BOTH); + //去除AUTO_INCREMENT + $row[1] = preg_replace("#AUTO_INCREMENT=([0-9]{1,})[ \r\n\t]{1,}#i", "", $row[1]); + $eng1 = "#ENGINE=MyISAM[ \r\n\t]{1,}DEFAULT[ \r\n\t]{1,}CHARSET=".$cfg_db_language."#i"; + $tableStruct = preg_replace($eng1, "TYPE=MyISAM", $row[1]); + fwrite($fp, ''.$tableStruct.";\r\n\r\n"); + } + fclose($fp); + $tmsg .= "备份数据表结构信息完成"; + } + $tmsg .= "正在进行数据备份的初始化工作,请稍后"; + $doneForm = "
+ + + + + + + \r\n
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } + //执行分页备份 + else { + $j = 0; + $fs = array(); + $bakStr = ''; + //分析表里的字段信息 + $dsql->GetTableFields($nowtable); + $intable = "INSERT INTO `$nowtable` VALUES("; + while ($r = $dsql->GetFieldObject()) { + + $fs[$j] = trim($r->name); + $j++; + } + $fsd = $j - 1; + //读取表的内容 + $dsql->SetQuery("SELECT * FROM `$nowtable` "); + $dsql->Execute(); + $m = 0; + $bakfilename = "$bkdir/{$nowtable}_{$startpos}_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; + while ($row2 = $dsql->GetArray()) { + if ($m < $startpos) { + $m++; + continue; + } + //检测数据是否达到规定大小 + if (strlen($bakStr) > $fsizeb) { + $fp = fopen($bakfilename, "w"); + fwrite($fp, $bakStr); + fclose($fp); + $tmsg = "完成到 {$m} 条记录的备份,继续备份 {$nowtable}"; + $doneForm = "
+ + + + + + + \r\n
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } + //正常情况 + $line = $intable; + for ($j = 0; $j <= $fsd; $j++) { + if ($j < $fsd) { + $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."',"; + } else { + $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."');\r\n"; + } + } + $m++; + $bakStr .= $line; + } + //如果数据比卷设置值小 + if ($bakStr != '') { + $fp = fopen($bakfilename, "w"); + fwrite($fp, $bakStr); + fclose($fp); + } + for ($i = 0; $i < count($tables); $i++) { + if ($tables[$i] == $nowtable) { + if (isset($tables[$i + 1])) { + $nowtable = $tables[$i + 1]; + $startpos = 0; + break; + } else { + PutInfo("完成所有数据备份", ""); + exit(); + } + } + } + $tmsg = "完成到 {$m} 条记录的备份,继续备份 {$nowtable}"; + $doneForm = "
+ + + + + \r\n
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } + //分页备份代码结束 +} +/*------------------------- +还原数据 +function __re_data(); +-------------------------*/ +else if ($dopost == 'redat') { + if ($bakfiles == '') { + ShowMsg('没指定任何要还原的文件', 'javascript:;'); + exit(); + } + $bakfilesTmp = $bakfiles; + $bakfiles = explode(',', $bakfiles); + if (empty($structfile)) { + $structfile = ""; + } + if (empty($delfile)) { + $delfile = 0; + } + if (empty($startgo)) { + $startgo = 0; + } + if ($startgo == 0 && $structfile != '') { + $tbdata = ''; + $fp = fopen("$bkdir/$structfile", 'r'); + while (!feof($fp)) { + $tbdata .= fgets($fp, 1024); + } + fclose($fp); + $querys = explode(';', $tbdata); + foreach ($querys as $q) { + $q = preg_replace("#TYPE=MyISAM#i","ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language, $q); + $rs = $dsql->ExecuteNoneQuery(trim($q).';'); + } + if ($delfile == 1) { + @unlink("$bkdir/$structfile"); + } + $tmsg = "完成数据表信息还原,准备还原数据"; + $doneForm = "
+ + + +
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } else { + $nowfile = $bakfiles[0]; + $bakfilesTmp = preg_replace("#".$nowfile."[,]{0,1}#", "", $bakfilesTmp); + $oknum = 0; + if (filesize("$bkdir/$nowfile") > 0) { + $fp = fopen("$bkdir/$nowfile", 'r'); + while (!feof($fp)) { + $line = trim(fgets($fp, 512 * 1024)); + if ($line == "") continue; + $rs = $dsql->ExecuteNoneQuery($line); + if ($rs) $oknum++; + } + fclose($fp); + } + if ($delfile == 1) { + @unlink("$bkdir/$nowfile"); + } + if ($bakfilesTmp == "") { + ShowMsg('成功还原所有的文件的数据', 'javascript:;'); + exit(); + } + $tmsg = "成功还原 {$nowfile} 的 {$oknum} 条记录,正在准备还原其它数据"; + $doneForm = "
+ + + +
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } +} +function PutInfo($msg1, $msg2) +{ + global $cfg_soft_lang; + $msginfo = "\n + + + + 提示信息 + \n\n\n
{$msg2}"; + echo $msginfo."\n\n"; +} +function RpLine($str) +{ + $str = str_replace("\r", "\\r", $str); + $str = str_replace("\n", "\\n", $str); + return $str; +} \ No newline at end of file diff --git a/src/dede/sys_data_replace.php b/src/admin/sys_data_replace.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/sys_data_replace.php rename to src/admin/sys_data_replace.php index ea5b3fe1..09432b7c --- a/src/dede/sys_data_replace.php +++ b/src/admin/sys_data_replace.php @@ -1,88 +1,87 @@ -GetTableFields($exptable); - echo "
"; - echo "表(".$exptable.")含有的字段:
"; - while ($row = $dsql->GetFieldObject()) { - echo "name}')\">".$row->name."\r\n"; - } - echo "
"; - exit(); -} -/*------------------------------- -//保存用户设置,清空会员数据 -function __Apply() ---------------------------------*/ else if ($action == 'apply') { - $validate = empty($validate) ? '' : strtolower($validate); - $svali = GetCkVdValue(); - if ($validate == "" || $validate != $svali) { - ShowMsg("安全确认码不正确!", "javascript:;"); - exit(); - } - if ($exptable == '' || $rpfield == '') { - ShowMsg("请指定数据表和字段", "javascript:;"); - exit(); - } - if ($rpstring == '') { - ShowMsg("请指定被替换内容", "javascript:;"); - exit(); - } - if ($rptype == 'replace') { - $condition = empty($condition) ? '' : " WHERE $condition "; - $rs = $dsql->ExecuteNoneQuery("UPDATE $exptable SET $rpfield=REPLACE($rpfield,'$rpstring','$tostring') $condition "); - $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$exptable`"); - if ($rs) { - ShowMsg("成功完成数据替换", "javascript:;"); - exit(); - } else { - ShowMsg("数据替换失败", "javascript:;"); - exit(); - } - } else { - $condition = empty($condition) ? '' : " And $condition "; - $rpstring = stripslashes($rpstring); - $rpstring2 = str_replace("\\", "\\\\", $rpstring); - $rpstring2 = str_replace("'", "\\'", $rpstring2); - $dsql->SetQuery("SELECT $keyfield,$rpfield FROM $exptable WHERE $rpfield REGEXP '$rpstring2' $condition "); - $dsql->Execute(); - $tt = $dsql->GetTotalRow(); - if ($tt == 0) { - ShowMsg("根据您指定的正则,找不到任何东西", "javascript:;"); - exit(); - } - $oo = 0; - while ($row = $dsql->GetArray()) { - $kid = $row[$keyfield]; - $rpf = preg_replace("#".$rpstring."#i", $tostring, $row[$rpfield]); - $rs = $dsql->ExecuteNoneQuery("UPDATE $exptable SET $rpfield='$rpf' WHERE $keyfield='$kid' "); - if ($rs) { - $oo++; - } - } - $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$exptable`"); - ShowMsg("共找到 $tt 条记录,成功替换了 $oo 条", "javascript:;"); - exit(); - } -} +GetTableFields($exptable); + echo "
"; + echo "表(".$exptable.")含有的字段:
"; + while ($row = $dsql->GetFieldObject()) { + echo "name}')\">".$row->name."\r\n"; + } + echo "
"; + exit(); +} +/*------------------------------- +//保存用户设置,清空会员数据 +function __Apply() +--------------------------------*/ else if ($action == 'apply') { + $validate = empty($validate) ? '' : strtolower($validate); + $svali = GetCkVdValue(); + if ($validate == "" || $validate != $svali) { + ShowMsg("安全确认码不正确!", "javascript:;"); + exit(); + } + if ($exptable == '' || $rpfield == '') { + ShowMsg("请指定数据表和字段", "javascript:;"); + exit(); + } + if ($rpstring == '') { + ShowMsg("请指定被替换内容", "javascript:;"); + exit(); + } + if ($rptype == 'replace') { + $condition = empty($condition) ? '' : " WHERE $condition "; + $rs = $dsql->ExecuteNoneQuery("UPDATE $exptable SET $rpfield=REPLACE($rpfield,'$rpstring','$tostring') $condition "); + $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$exptable`"); + if ($rs) { + ShowMsg("成功完成数据替换", "javascript:;"); + exit(); + } else { + ShowMsg("数据替换失败", "javascript:;"); + exit(); + } + } else { + $condition = empty($condition) ? '' : " And $condition "; + $rpstring = stripslashes($rpstring); + $rpstring2 = str_replace("\\", "\\\\", $rpstring); + $rpstring2 = str_replace("'", "\\'", $rpstring2); + $dsql->SetQuery("SELECT $keyfield,$rpfield FROM $exptable WHERE $rpfield REGEXP '$rpstring2' $condition "); + $dsql->Execute(); + $tt = $dsql->GetTotalRow(); + if ($tt == 0) { + ShowMsg("根据您指定的正则,找不到任何东西", "javascript:;"); + exit(); + } + $oo = 0; + while ($row = $dsql->GetArray()) { + $kid = $row[$keyfield]; + $rpf = preg_replace("#".$rpstring."#i", $tostring, $row[$rpfield]); + $rs = $dsql->ExecuteNoneQuery("UPDATE $exptable SET $rpfield='$rpf' WHERE $keyfield='$kid' "); + if ($rs) { + $oo++; + } + } + $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$exptable`"); + ShowMsg("共找到 $tt 条记录,成功替换了 $oo 条", "javascript:;"); + exit(); + } +} diff --git a/src/dede/sys_data_revert.php b/src/admin/sys_data_revert.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/sys_data_revert.php rename to src/admin/sys_data_revert.php index fafff775..5021e3b0 --- a/src/dede/sys_data_revert.php +++ b/src/admin/sys_data_revert.php @@ -1,27 +1,26 @@ -read()) !== false) { - if (!preg_match("#txt$#", $filename)) { - continue; - } - if (preg_match("#tables_struct#", $filename)) { - $structfile = $filename; - } else if (filesize("$bkdir/$filename") > 0) { - $filelists[] = $filename; - } -} -$dh->close(); -include DedeInclude('templets/sys_data_revert.htm'); +read()) !== false) { + if (!preg_match("#txt$#", $filename)) { + continue; + } + if (preg_match("#tables_struct#", $filename)) { + $structfile = $filename; + } else if (filesize("$bkdir/$filename") > 0) { + $filelists[] = $filename; + } +} +$dh->close(); +include DedeInclude('templets/sys_data_revert.htm'); diff --git a/src/dede/sys_group.php b/src/admin/sys_group.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/sys_group.php rename to src/admin/sys_group.php index cb1666b0..cc08d9f2 --- a/src/dede/sys_group.php +++ b/src/admin/sys_group.php @@ -1,15 +1,14 @@ -GetOne("SELECT * FROM #@__admintype WHERE rank='".$rankid."'"); - if (is_array($row)) { - ShowMsg('您所创建的组别的级别值已存在,不允许重复!', '-1'); - exit(); - } - if ($rankid > 10) { - ShowMsg('组级别值不能大于10, 否则一切权限设置均无效!', '-1'); - exit(); - } - $AllPurviews = ''; - if (is_array($purviews)) { - foreach ($purviews as $pur) { - $AllPurviews = $pur.' '; - } - $AllPurviews = trim($AllPurviews); - } - $dsql->ExecuteNoneQuery("INSERT INTO #@__admintype(rank,typename,system,purviews) VALUES ('$rankid','$groupname', 0, '$AllPurviews');"); - ShowMsg("成功创建一个新的用户组!", "sys_group.php"); - exit(); -} -include DedeInclude('templets/sys_group_add.htm'); +GetOne("SELECT * FROM #@__admintype WHERE rank='".$rankid."'"); + if (is_array($row)) { + ShowMsg('您所创建的组别的级别值已存在,不允许重复!', '-1'); + exit(); + } + if ($rankid > 10) { + ShowMsg('组级别值不能大于10, 否则一切权限设置均无效!', '-1'); + exit(); + } + $AllPurviews = ''; + if (is_array($purviews)) { + foreach ($purviews as $pur) { + $AllPurviews = $pur.' '; + } + $AllPurviews = trim($AllPurviews); + } + $dsql->ExecuteNoneQuery("INSERT INTO #@__admintype(rank,typename,system,purviews) VALUES ('$rankid','$groupname', 0, '$AllPurviews');"); + ShowMsg("成功创建一个新的用户组!", "sys_group.php"); + exit(); +} +include DedeInclude('templets/sys_group_add.htm'); diff --git a/src/dede/sys_group_edit.php b/src/admin/sys_group_edit.php old mode 100755 new mode 100644 similarity index 88% rename from src/dede/sys_group_edit.php rename to src/admin/sys_group_edit.php index 86cfb1f3..8cf4d936 --- a/src/dede/sys_group_edit.php +++ b/src/admin/sys_group_edit.php @@ -1,46 +1,45 @@ -ExecuteNoneQuery("UPDATE `#@__admintype` SET typename='$typename',purviews='$purview' WHERE CONCAT(`rank`)='$rank'"); - ShowMsg('成功更改用户组的权限!', 'sys_group.php'); - exit(); -} else if ($dopost == 'del') { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__admintype` WHERE CONCAT(`rank`)='$rank' AND system='0';"); - ShowMsg("成功删除一个用户组!", "sys_group.php"); - exit(); -} -$groupRanks = array(); -$groupSet = $dsql->GetOne("SELECT * FROM `#@__admintype` WHERE CONCAT(`rank`)='{$rank}' "); -$groupRanks = explode(' ', $groupSet['purviews']); -include DedeInclude('templets/sys_group_edit.htm'); - -//检查是否已经有此权限 -function CRank($n) -{ - global $groupRanks; - return in_array($n, $groupRanks) ? ' checked' : ''; -} +ExecuteNoneQuery("UPDATE `#@__admintype` SET typename='$typename',purviews='$purview' WHERE CONCAT(`rank`)='$rank'"); + ShowMsg('成功修改用户组的权限!', 'sys_group.php'); + exit(); +} else if ($dopost == 'del') { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__admintype` WHERE CONCAT(`rank`)='$rank' AND system='0';"); + ShowMsg("成功删除一个用户组!", "sys_group.php"); + exit(); +} +$groupRanks = array(); +$groupSet = $dsql->GetOne("SELECT * FROM `#@__admintype` WHERE CONCAT(`rank`)='{$rank}' "); +$groupRanks = explode(' ', $groupSet['purviews']); +include DedeInclude('templets/sys_group_edit.htm'); + +//检查是否已经有此权限 +function CRank($n) +{ + global $groupRanks; + return in_array($n, $groupRanks) ? ' checked' : ''; +} diff --git a/src/dede/sys_info.php b/src/admin/sys_info.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/sys_info.php rename to src/admin/sys_info.php index 8e54f029..b8701c0c --- a/src/dede/sys_info.php +++ b/src/admin/sys_info.php @@ -1,5 +1,4 @@ ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='$v' WHERE varname='$k' "); } ReWriteConfig(); - ShowMsg("成功更改站点配置", "sys_info.php"); + ShowMsg("成功修改站点配置", "sys_info.php"); exit(); } //增加新变量 @@ -90,14 +89,14 @@ else if ($dopost == 'add') { exit(); } } -// 搜索配置 +//搜索配置 else if ($dopost == 'search') { $keywords = isset($keywords) ? strip_tags($keywords) : ''; $i = 1; $configstr = << - + 参数说明 参数值 变量名 @@ -111,10 +110,10 @@ EOT; while ($row = $dsql->GetArray()) { $bgcolor = ($i++ % 2 == 0) ? "#F9FCEF" : "#ffffff"; - $row['info'] = preg_replace("#{$keywords}#", ''.$keywords.'', $row['info']); - $row['varname'] = preg_replace("#{$keywords}#", ''.$keywords.'', $row['varname']); + $row['info'] = preg_replace("#{$keywords}#", ''.$keywords.'', $row['info']); + $row['varname'] = preg_replace("#{$keywords}#", ''.$keywords.'', $row['varname']); ?> - + + echo ' 没有找到搜索的内容 '; } diff --git a/src/dede/sys_info_mark.php b/src/admin/sys_info_mark.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/sys_info_mark.php rename to src/admin/sys_info_mark.php index e1d426b7..ebefcddd --- a/src/dede/sys_info_mark.php +++ b/src/admin/sys_info_mark.php @@ -1,59 +1,58 @@ -\r\n"; - $fp = fopen($ImageWaterConfigFile, "w") or die("写入文件 $ImageWaterConfigFile 失败,请检查权限"); - fwrite($fp, $configstr); - fclose($fp); - echo "\r\n"; -} -require_once($ImageWaterConfigFile); -include DedeInclude('templets/sys_info_mark.htm'); +\r\n"; + $fp = fopen($ImageWaterConfigFile, "w") or die("写入文件 $ImageWaterConfigFile 失败,请检查权限"); + fwrite($fp, $configstr); + fclose($fp); + echo "\r\n"; +} +require_once($ImageWaterConfigFile); +include DedeInclude('templets/sys_info_mark.htm'); diff --git a/src/dede/sys_passport.php b/src/admin/sys_passport.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/sys_passport.php rename to src/admin/sys_passport.php index b3b49475..203e0651 --- a/src/dede/sys_passport.php +++ b/src/admin/sys_passport.php @@ -1,29 +1,28 @@ -'; - $fp = fopen($ConfigFile, "w") or die("写入文件 $ConfigFile 失败,请检查权限"); - fwrite($fp, $configstr); - fclose($fp); - echo "\r\n"; -} -include DedeInclude('templets/sys_passport.htm'); +'; + $fp = fopen($ConfigFile, "w") or die("写入文件 $ConfigFile 失败,请检查权限"); + fwrite($fp, $configstr); + fclose($fp); + echo "\r\n"; +} +include DedeInclude('templets/sys_passport.htm'); diff --git a/src/dede/sys_payment.php b/src/admin/sys_payment.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/sys_payment.php rename to src/admin/sys_payment.php index 00c94e32..c7f7164c --- a/src/dede/sys_payment.php +++ b/src/admin/sys_payment.php @@ -1,251 +1,250 @@ -表单]解析类 -/*数组结构应该为: - array( - [name]=>array( - [title]=>'当前表单项的名称', - [type]=>'text|select', - [description]=>'表单内容的介绍说明' - [iterm]=>'1:使用标准双接口,使用担保交易接口', //如果含有":",则前面为value值,后面为显示内容 - [value]=>'使用担保交易接口', - ), - ... - ) - 使用方法: - 将上述的格式传入到数组中去,然后进行解析: - 1.声明类,并创建数组 - $af = new Array2form($config); - - 2.设置一个表单模板(可选,如果不设置载入默认) - $af->SetDefaultTpl($templets); $templets:为一个底册模板文件 - 表单模板格式为: -

~title~:~form~~description~

- - 3.获取特定项目表单 - $af->GetIterm('alipay', 1) //1.表示获取一个默认模板下的完整表单,2.仅获取一个表单项 - - 4.获取所有表单内容 - $af->GetAll() //获取表单所有解析后的内容 - -*/ -class Array2form -{ - var $FormArray = array(); - var $ArrFromTPL = ''; - - function __construct($formarray = array()) - { - if (count($formarray) > 1) { - $this->FormArray = $formarray; - //var_dump($this->FormArray); - $this->SetDefaultTpl(); - } - } - - //析构函数,兼容PHP4 - /* - function Array2form($formarray = array()) - { - $this->__construct($formarray); - } - */ - - //获取一个特定项目的表单 - function GetIterm($itermid = '', $itermtype = 1) - { - $reval = $reval_form = $reval_title = $reval_des = $myformItem = ''; - if (is_array($this->FormArray)) { - foreach ($this->FormArray as $key => $val) { - if ($key == $itermid) { - $reval_title = $val['title']; - $reval_des = $val['description']; - $reval_form = $this->GetForm($key, $val, $val['type']); - //进行模板标签替换 - if ($itermtype == 1) - $reval = preg_replace( - array("/~title~/", "/~form~/", "/~description~/"), - array($reval_title, $reval_form, $reval_des), - $this->ArrFromTPL - ); - else return $reval_form; - } - } - } else { - return FALSE; - } - return empty($reval) ? '' : $reval; - } - - function GetForm($key, $formarry = array(), $formtype = 'text') - { - switch ($formtype) { - case 'text': - //生成文本编辑框 - $valstr = (empty($formarry['value'])) ? "value=''" : "value='{$formarry['value']}'"; - $reval_form = ""; - break; - case 'select': - //生成选择框 - $reval_title = $formarry['title']; - $items = explode(',', $formarry['iterm']); - $reval_form = "\r\n"; - break; - } - return $reval_form; - } - - - //获取所有的表单内容 - function GetAll() - { - $reval = empty($reval) ? '' : $reval; - if (is_array($this->FormArray)) { - foreach ($this->FormArray as $key => $val) { - $reval .= $this->GetIterm($key); - } - return $reval; - } else { - return FALSE; - } - } - - //获取一个特定项目的表单 - function SetDefaultTpl($tplname = '') - { - if (empty($tplname)) { - $this->ArrFromTPL = '

~title~:~form~~description~

'; - } else { - if (file_exists($tplname)) $this->ArrFromTPL = file_get_contents($tplname); - else $this->ArrFromTPL = $tplname; - } - } -} -$tplstring = " - - ~title~: - ~form~ ~description~ - -"; - -//安装支付接口 -if ($dopost == 'install') { - $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); - if (is_array($row)) { - if ($cfg_soft_lang == 'utf-8') { - $config_row = AutoCharset(unserialize(utf82gb($row['config']))); - } else if ($cfg_soft_lang == 'gb2312') { - $config_row = unserialize($row['config']); - } - //print_r($config_row);exit; - $af = new Array2form($config_row); - $af->SetDefaultTpl($tplstring); - $reval = $af->GetAll(); - } - include DedeInclude('templets/sys_payment_install.htm'); - exit; -} -//配置支付接口 -else if ($dopost == 'config') { - if ($pay_name == "" || $pay_desc == "" || $pay_fee == "") { - ShowMsg("您有未填写的项目!", "-1"); - exit(); - } - $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); - if ($cfg_soft_lang == 'utf-8') { - $config = AutoCharset(unserialize(utf82gb($row['config']))); - } else if ($cfg_soft_lang == 'gb2312') { - $config = unserialize($row['config']); - } - $payments = "'code' => '".$row['code']."',"; - foreach ($config as $key => $v) { - $config[$key]['value'] = ${$key}; - $payments .= "'".$key."' => '".$config[$key]['value']."',"; - } - $payments = substr($payments, 0, -1); - $payment = "\$payment=array(".$payments.")"; - $configstr = "<"."?php\r\n".$payment."\r\n?".">\r\n"; - if (!empty($payment)) { - $m_file = DEDEDATA."/payment/".$row['code'].".php"; - $fp = fopen($m_file, "w") or die("写入文件 $safeconfigfile 失败,请检查权限!"); - fwrite($fp, $configstr); - fclose($fp); - } - if ($cfg_soft_lang == 'utf-8') { - $config = AutoCharset($config, 'utf-8', 'gb2312'); - $config = serialize($config); - $config = gb2utf8($config); - } else { - $config = serialize($config); - } - - $query = "UPDATE `#@__payment` SET name = '$pay_name',fee='$pay_fee',description='$pay_desc',config='$config',enabled='1' WHERE id='$pid'"; - $dsql->ExecuteNoneQuery($query); - if ($pm == 'edit') $msg = "保存修改成功"; - else $msg = "安装成功!"; - ShowMsg($msg, "sys_payment.php"); - exit(); -} - -//删除支付接口 -else if ($dopost == 'uninstall') { - $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); - if ($cfg_soft_lang == 'utf-8') { - $config = AutoCharset(unserialize(utf82gb($row['config']))); - } else if ($cfg_soft_lang == 'gb2312') { - $config = unserialize($row['config']); - } - foreach ($config as $key => $v) $config[$key]['value'] = ""; - if ($cfg_soft_lang == 'utf-8') { - $config = AutoCharset($config, 'utf-8', 'gb2312'); - $config = serialize($config); - $config = gb2utf8($config); - } else { - $config = serialize($config); - } - $query = "UPDATE `#@__payment` SET fee='',config='$config',enabled='0' WHERE id='$pid'"; - $dsql->ExecuteNoneQuery($query); - //同时需要删除对应的缓存 - $m_file = DEDEDATA."/payment/".$row['code'].".php"; - @unlink($m_file); - ShowMsg("删除成功!", "sys_payment.php"); - exit(); -} -$sql = "SELECT * FROM `#@__payment` ORDER BY `rank` ASC"; -$dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN."/templets/sys_payment.htm"); -$dlist->SetSource($sql); -$dlist->display(); +表单]解析类 +/*数组结构应该为: + array( + [name]=>array( + [title]=>'当前表单项的名称', + [type]=>'text|select', + [description]=>'表单内容的介绍说明' + [iterm]=>'1:使用标准双接口,使用担保交易接口', //如果含有":",则前面为value值,后面为显示内容 + [value]=>'使用担保交易接口', + ), + ... + ) + 使用方法: + 将上述的格式传入到数组中去,然后进行解析: + 1.声明类,并创建数组 + $af = new Array2form($config); + + 2.设置一个表单模板(可选,如果不设置载入默认) + $af->SetDefaultTpl($templets); $templets:为一个底册模板文件 + 表单模板格式为: +

~title~:~form~~description~

+ + 3.获取特定项目表单 + $af->GetIterm('alipay', 1) //1.表示获取一个默认模板下的完整表单,2.仅获取一个表单项 + + 4.获取所有表单内容 + $af->GetAll() //获取表单所有解析后的内容 + +*/ +class Array2form +{ + var $FormArray = array(); + var $ArrFromTPL = ''; + + function __construct($formarray = array()) + { + if (count($formarray) > 1) { + $this->FormArray = $formarray; + //var_dump($this->FormArray); + $this->SetDefaultTpl(); + } + } + + //析构函数,兼容PHP4 + /* + function Array2form($formarray = array()) + { + $this->__construct($formarray); + } + */ + + //获取一个特定项目的表单 + function GetIterm($itermid = '', $itermtype = 1) + { + $reval = $reval_form = $reval_title = $reval_des = $myformItem = ''; + if (is_array($this->FormArray)) { + foreach ($this->FormArray as $key => $val) { + if ($key == $itermid) { + $reval_title = $val['title']; + $reval_des = $val['description']; + $reval_form = $this->GetForm($key, $val, $val['type']); + //进行模板标签替换 + if ($itermtype == 1) + $reval = preg_replace( + array("/~title~/", "/~form~/", "/~description~/"), + array($reval_title, $reval_form, $reval_des), + $this->ArrFromTPL + ); + else return $reval_form; + } + } + } else { + return FALSE; + } + return empty($reval) ? '' : $reval; + } + + function GetForm($key, $formarry = array(), $formtype = 'text') + { + switch ($formtype) { + case 'text': + //生成文本编辑框 + $valstr = (empty($formarry['value'])) ? "value=''" : "value='{$formarry['value']}'"; + $reval_form = ""; + break; + case 'select': + //生成选择框 + $reval_title = $formarry['title']; + $items = explode(',', $formarry['iterm']); + $reval_form = "\r\n"; + break; + } + return $reval_form; + } + + + //获取所有的表单内容 + function GetAll() + { + $reval = empty($reval) ? '' : $reval; + if (is_array($this->FormArray)) { + foreach ($this->FormArray as $key => $val) { + $reval .= $this->GetIterm($key); + } + return $reval; + } else { + return FALSE; + } + } + + //获取一个特定项目的表单 + function SetDefaultTpl($tplname = '') + { + if (empty($tplname)) { + $this->ArrFromTPL = '

~title~:~form~~description~

'; + } else { + if (file_exists($tplname)) $this->ArrFromTPL = file_get_contents($tplname); + else $this->ArrFromTPL = $tplname; + } + } +} +$tplstring = " + + ~title~: + ~form~ ~description~ + +"; + +//安装支付接口 +if ($dopost == 'install') { + $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); + if (is_array($row)) { + if ($cfg_soft_lang == 'utf-8') { + $config_row = AutoCharset(unserialize(utf82gb($row['config']))); + } else if ($cfg_soft_lang == 'gb2312') { + $config_row = unserialize($row['config']); + } + //print_r($config_row);exit; + $af = new Array2form($config_row); + $af->SetDefaultTpl($tplstring); + $reval = $af->GetAll(); + } + include DedeInclude('templets/sys_payment_install.htm'); + exit; +} +//配置支付接口 +else if ($dopost == 'config') { + if ($pay_name == "" || $pay_desc == "" || $pay_fee == "") { + ShowMsg("您有未填写的项目!", "-1"); + exit(); + } + $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); + if ($cfg_soft_lang == 'utf-8') { + $config = AutoCharset(unserialize(utf82gb($row['config']))); + } else if ($cfg_soft_lang == 'gb2312') { + $config = unserialize($row['config']); + } + $payments = "'code' => '".$row['code']."',"; + foreach ($config as $key => $v) { + $config[$key]['value'] = ${$key}; + $payments .= "'".$key."' => '".$config[$key]['value']."',"; + } + $payments = substr($payments, 0, -1); + $payment = "\$payment=array(".$payments.")"; + $configstr = "<"."?php\r\n".$payment."\r\n?".">\r\n"; + if (!empty($payment)) { + $m_file = DEDEDATA."/payment/".$row['code'].".php"; + $fp = fopen($m_file, "w") or die("写入文件 $safeconfigfile 失败,请检查权限!"); + fwrite($fp, $configstr); + fclose($fp); + } + if ($cfg_soft_lang == 'utf-8') { + $config = AutoCharset($config, 'utf-8', 'gb2312'); + $config = serialize($config); + $config = gb2utf8($config); + } else { + $config = serialize($config); + } + + $query = "UPDATE `#@__payment` SET name = '$pay_name',fee='$pay_fee',description='$pay_desc',config='$config',enabled='1' WHERE id='$pid'"; + $dsql->ExecuteNoneQuery($query); + if ($pm == 'edit') $msg = "保存修改成功"; + else $msg = "安装成功!"; + ShowMsg($msg, "sys_payment.php"); + exit(); +} + +//删除支付接口 +else if ($dopost == 'uninstall') { + $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); + if ($cfg_soft_lang == 'utf-8') { + $config = AutoCharset(unserialize(utf82gb($row['config']))); + } else if ($cfg_soft_lang == 'gb2312') { + $config = unserialize($row['config']); + } + foreach ($config as $key => $v) $config[$key]['value'] = ""; + if ($cfg_soft_lang == 'utf-8') { + $config = AutoCharset($config, 'utf-8', 'gb2312'); + $config = serialize($config); + $config = gb2utf8($config); + } else { + $config = serialize($config); + } + $query = "UPDATE `#@__payment` SET fee='',config='$config',enabled='0' WHERE id='$pid'"; + $dsql->ExecuteNoneQuery($query); + //同时需要删除对应的缓存 + $m_file = DEDEDATA."/payment/".$row['code'].".php"; + @unlink($m_file); + ShowMsg("删除成功!", "sys_payment.php"); + exit(); +} +$sql = "SELECT * FROM `#@__payment` ORDER BY rank ASC"; +$dlist = new DataListCP(); +$dlist->SetTemplet(DEDEADMIN."/templets/sys_payment.htm"); +$dlist->SetSource($sql); +$dlist->display(); diff --git a/src/dede/sys_repair.php b/src/admin/sys_repair.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/sys_repair.php rename to src/admin/sys_repair.php index 4d5f9fb9..c8eea271 --- a/src/dede/sys_repair.php +++ b/src/admin/sys_repair.php @@ -1,216 +1,215 @@ -<<点击此返回>>", "javascript:;"); -//exit(); -if (empty($dopost)) { - $win = new OxWindow(); - $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); - $win->mainTitle = "系统修复工具"; - $wecome_info = "系统主页 >> 系统错误修复工具"; - $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); - $msg = " - - - - -
-
- 由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理。

- 本工具目前主要执行下面动作:
- 1、修复/优化数据表;
- 2、更新系统缓存;
- 3、检测系统变量一致性。
- 4、检测微表与主表数据一致性。
-
-
- 点击此开始进行常规检测>> -


-
- "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow('hand', ''); - $win->Display(); - exit(); -} -/*------------------- -数据结构常规检测 -function 1_test_db() { } ---------------------*/ else if ($dopost == 1) { - $win = new OxWindow(); - $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); - $win->mainTitle = "系统修复工具"; - $wecome_info = "系统错误修复工具 >> 检测数据结构"; - $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); - $msg = " - - - - -
- 已完成数据结构完整性检测 -
-
- 如果您系统有下面几种问题之一,请检测微表正确性:
- 1、无法获得主键,因此无法进行后续操作
- 2、更新数据库archives表时出错
- 3、列表显示数据目与实际文档数不一致
-
- 点击此检测微表正确性>> -


-
- "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow('hand', ''); - $win->Display(); - exit(); -} -/*------------------- -检测微表正确性并尝试修复 -function 2_test_arctiny() { } ---------------------*/ else if ($dopost == 2) { - $msg = ''; - - $allarcnum = 0; - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__archives` "); - $allarcnum = $arcnum = $row['dd']; - $msg .= "·#@__archives 表总记录数: {$arcnum}
"; - - $shtables = array(); - $dsql->Execute('me', " SELECT addtable FROM `#@__channeltype` WHERE id < -1 "); - while ($row = $dsql->GetArray('me')) { - $addtable = strtolower(trim(str_replace('#@__', $cfg_dbprefix, $row['addtable']))); - if (empty($addtable)) { - continue; - } else { - if (!isset($shtables[$addtable])) { - $shtables[$addtable] = 1; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd FROM `$addtable` "); - $msg .= "·{$addtable} 表总记录数: {$row['dd']}
"; - $allarcnum += $row['dd']; - } - } - } - $msg .= "※总有效记录数: {$allarcnum}
"; - $errall = "完成修正或无错误返回>>"; - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); - $msg .= "※微统计表记录数: {$row['dd']}
"; - if ($row['dd'] == $allarcnum) { - $msg .= "

两者记录一致,无需修正


"; - } else { - $sql = " TRUNCATE TABLE `#@__arctiny`"; - $dsql->ExecuteNoneQuery($sql); - $msg .= "两者记录不一致,尝试进行简单修正...
"; - //导入普通模型微数据 - $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) - SELECT id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid FROM `#@__archives` "; - $dsql->ExecuteNoneQuery($sql); - //导入单表模型微数据 - foreach ($shtables as $tb => $v) { - $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) - SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` "; - $rs = $dsql->ExecuteNoneQuery($sql); - $doarray[$tb] = 1; - } - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); - if ($row['dd'] == $allarcnum) { - $msg .= "

修正记录成功


"; - } else { - $msg .= "

修正记录失败,建议进行高级综合检测


"; - $errall = " 进行高级结合性检测>> "; - } - } - UpDateCatCache(); - $win = new OxWindow(); - $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); - $win->mainTitle = "系统修复工具"; - $wecome_info = "系统错误修复工具 >> 检测微表正确性"; - $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); - $msg = " - - - - -
- {$msg} -
-
- {$errall} -
- "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow('hand', ''); - $win->Display(); - exit(); -} -/*------------------- -高级方式修复微表(会删除不合法主键的内容) -function 3_re_arctiny() { } ---------------------*/ else if ($dopost == 3) { - $errnum = 0; - $sql = " TRUNCATE TABLE `#@__arctiny`"; - $dsql->ExecuteNoneQuery($sql); - - $sql = "SELECT arc.id, arc.typeid, arc.typeid2, arc.arcrank, arc.channel, arc.senddate, arc.sortrank, - arc.mid, ch.addtable FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel "; - $dsql->Execute('me', $sql); - while ($row = $dsql->GetArray('me')) { - $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) - VALUES('{$row['id']}','{$row['typeid']}','{$row['typeid2']}','{$row['arcrank']}', - '{$row['channel']}','{$row['senddate']}','{$row['sortrank']}','{$row['mid']}'); "; - $rs = $dsql->ExecuteNoneQuery($sql); - if (!$rs) { - $addtable = trim($addtable); - $errnum++; - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='{$row['id']}' "); - if (!empty($addtable)) $dsql->ExecuteNoneQuery("DELETE FROM `$addtable` WHERE id='{$row['id']}' "); - } - } - //导入单表模型微数据 - $dsql->SetQuery("SELECT id,addtable FROM `#@__channeltype` WHERE id < -1 "); - $dsql->Execute(); - $doarray = array(); - while ($row = $dsql->GetArray()) { - $tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']); - if (empty($tb) || isset($doarray[$tb])) { - continue; - } else { - $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) - SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` "; - $rs = $dsql->ExecuteNoneQuery($sql); - $doarray[$tb] = 1; - } - } - $win = new OxWindow(); - $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); - $win->mainTitle = "系统修复工具"; - $wecome_info = "系统错误修复工具 >> 高级综合检测修复"; - $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); - $msg = " - - - - -
- 完成所有修复操作,移除错误记录 {$errnum} 条 -
-
- 完成修正或无错误返回>> -
- "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow('hand', ''); - $win->Display(); - exit(); -} +<<点击此返回>>", "javascript:;"); +//exit(); +if (empty($dopost)) { + $win = new OxWindow(); + $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); + $win->mainTitle = "系统修复工具"; + $wecome_info = "系统主页 >> 系统错误修复工具"; + $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); + $msg = " + + + + +
+
+ 由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理。

+ 本工具目前主要执行下面动作:
+ 1、修复/优化数据表;
+ 2、更新系统缓存;
+ 3、检测系统变量一致性。
+ 4、检测微表与主表数据一致性。
+
+
+ 点击此开始进行常规检测>> +


+
+ "; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow('hand', ''); + $win->Display(); + exit(); +} +/*------------------- +数据结构常规检测 +function 1_test_db() { } +--------------------*/ else if ($dopost == 1) { + $win = new OxWindow(); + $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); + $win->mainTitle = "系统修复工具"; + $wecome_info = "系统错误修复工具 >> 检测数据结构"; + $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); + $msg = " + + + + +
+ 已完成数据结构完整性检测 +
+
+ 如果您系统有下面几种问题之一,请检测微表正确性:
+ 1、无法获得主键,因此无法进行后续操作
+ 2、更新数据库archives表时出错
+ 3、列表显示数据目与实际文档数不一致
+
+ 点击此检测微表正确性>> +


+
+ "; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow('hand', ''); + $win->Display(); + exit(); +} +/*------------------- +检测微表正确性并尝试修复 +function 2_test_arctiny() { } +--------------------*/ else if ($dopost == 2) { + $msg = ''; + + $allarcnum = 0; + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__archives` "); + $allarcnum = $arcnum = $row['dd']; + $msg .= "·#@__archives 表总记录数: {$arcnum}
"; + + $shtables = array(); + $dsql->Execute('me', " SELECT addtable FROM `#@__channeltype` WHERE id < -1 "); + while ($row = $dsql->GetArray('me')) { + $addtable = strtolower(trim(str_replace('#@__', $cfg_dbprefix, $row['addtable']))); + if (empty($addtable)) { + continue; + } else { + if (!isset($shtables[$addtable])) { + $shtables[$addtable] = 1; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd FROM `$addtable` "); + $msg .= "·{$addtable} 表总记录数: {$row['dd']}
"; + $allarcnum += $row['dd']; + } + } + } + $msg .= "※总有效记录数: {$allarcnum}
"; + $errall = "完成修正或无错误返回>>"; + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); + $msg .= "※微统计表记录数: {$row['dd']}
"; + if ($row['dd'] == $allarcnum) { + $msg .= "

两者记录一致,无需修正


"; + } else { + $sql = " TRUNCATE TABLE `#@__arctiny`"; + $dsql->ExecuteNoneQuery($sql); + $msg .= "两者记录不一致,尝试进行简单修正...
"; + //导入普通模型微数据 + $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) + SELECT id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid FROM `#@__archives` "; + $dsql->ExecuteNoneQuery($sql); + //导入单表模型微数据 + foreach ($shtables as $tb => $v) { + $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) + SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` "; + $rs = $dsql->ExecuteNoneQuery($sql); + $doarray[$tb] = 1; + } + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); + if ($row['dd'] == $allarcnum) { + $msg .= "

修正记录成功


"; + } else { + $msg .= "

修正记录失败,建议进行高级综合检测


"; + $errall = " 进行高级结合性检测>> "; + } + } + UpDateCatCache(); + $win = new OxWindow(); + $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); + $win->mainTitle = "系统修复工具"; + $wecome_info = "系统错误修复工具 >> 检测微表正确性"; + $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); + $msg = " + + + + +
+ {$msg} +
+
+ {$errall} +
+ "; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow('hand', ''); + $win->Display(); + exit(); +} +/*------------------- +高级方式修复微表(会删除不合法主键的内容) +function 3_re_arctiny() { } +--------------------*/ else if ($dopost == 3) { + $errnum = 0; + $sql = " TRUNCATE TABLE `#@__arctiny`"; + $dsql->ExecuteNoneQuery($sql); + + $sql = "SELECT arc.id, arc.typeid, arc.typeid2, arc.arcrank, arc.channel, arc.senddate, arc.sortrank, + arc.mid, ch.addtable FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel "; + $dsql->Execute('me', $sql); + while ($row = $dsql->GetArray('me')) { + $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) + VALUES('{$row['id']}','{$row['typeid']}','{$row['typeid2']}','{$row['arcrank']}', + '{$row['channel']}','{$row['senddate']}','{$row['sortrank']}','{$row['mid']}'); "; + $rs = $dsql->ExecuteNoneQuery($sql); + if (!$rs) { + $addtable = trim($addtable); + $errnum++; + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='{$row['id']}' "); + if (!empty($addtable)) $dsql->ExecuteNoneQuery("DELETE FROM `$addtable` WHERE id='{$row['id']}' "); + } + } + //导入单表模型微数据 + $dsql->SetQuery("SELECT id,addtable FROM `#@__channeltype` WHERE id < -1 "); + $dsql->Execute(); + $doarray = array(); + while ($row = $dsql->GetArray()) { + $tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']); + if (empty($tb) || isset($doarray[$tb])) { + continue; + } else { + $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) + SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` "; + $rs = $dsql->ExecuteNoneQuery($sql); + $doarray[$tb] = 1; + } + } + $win = new OxWindow(); + $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); + $win->mainTitle = "系统修复工具"; + $wecome_info = "系统错误修复工具 >> 高级综合检测修复"; + $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); + $msg = " + + + + +
+ 完成所有修复操作,移除错误记录 {$errnum} 条 +
+
+ 完成修正或无错误返回>> +
+ "; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow('hand', ''); + $win->Display(); + exit(); +} diff --git a/src/dede/sys_safetest.php b/src/admin/sys_safetest.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/sys_safetest.php rename to src/admin/sys_safetest.php index 15cdd737..3ade9fa5 --- a/src/dede/sys_safetest.php +++ b/src/admin/sys_safetest.php @@ -1,141 +1,140 @@ -OpenUrl($fileHashURL); -$filelist = $del->GetJSON(); -$offFiles = array(); -foreach ($filelist as $key => $ff) { - $offFiles[$ff->filename] = $ff->hash; -} - -$alter = ""; - -if (count($offFiles) == 0) { - $alter = ' - '; -} - -function TestOneFile($f) -{ - global $message, $info, $offFiles; - $str = ''; - - //排除safefile和data/tplcache目录 - if (preg_match("#data/tplcache|.svn|data/cache#", $f)) return -1; - - $fp = fopen($f, 'r'); - while (!feof($fp)) { - $str .= fgets($fp, 1024); - } - fclose($fp); - - if (preg_match("#(".$info.")[ \r\n\t]{0,}([\[\(])#i", $str)) { - $trfile = preg_replace("#^".DEDEROOT."#", '', $f); - $oldTrfile = $trfile; - $trfile = substr(str_replace("/", "\\", $trfile), 1); - - $localFilehash = md5_file($f); - $remoteFilehash = isset($offFiles[$trfile]) ? $offFiles[$trfile] : ''; - if ($localFilehash === $remoteFilehash) { - return 0; - } - - $message .= "
-
可疑文件:{$trfile}
- 更改记录 - 删除 - 查看源码 -

\r\n"; - return 1; - } - return 0; -} - -function TestSafe($tdir) -{ - global $filetype; - $dh = dir($tdir); - while ($fname = $dh->read()) { - $fnamef = $tdir.'/'.$fname; - if (@is_dir($fnamef) && $fname != '.' && $fname != '..') { - TestSafe($fnamef); - } - if (preg_match("#\.(".$filetype.")#i", $fnamef)) { - TestOneFile($fnamef); - } - } -} - -//检测 -if ($action == 'test') { - $message = ''; - - AjaxHead(); - TestSafe(DEDEROOT); - if ($message == '') $message = "没发现可疑文件"; - echo $message; - exit(); -} else if ($action == 'viewdiff') { - $filename = isset($filename) ? $filename : ""; - if (empty($filename)) { - ShowMsg("没有选择对应的文件", "-1"); - exit; - } - - $baseFile = "https://cdn.dedebiz.com/release/{$cfg_version_detail}$filename"; - $del = new DedeHttpDown(); - $del->OpenUrl($baseFile); - $base = $del->GetHTML(); - - $file = "$cfg_basedir/$filename"; - $new = ""; - if (is_file($file)) { - $fp = fopen($file, "r"); - $new = fread($fp, filesize($file)); - fclose($fp); - } - - include(dirname(__FILE__).'/templets/sys_safetest_viewdiff.htm'); - - exit(); -} -//清空模板缓存 -else if ($action == 'clear') { - global $cfg_tplcache_dir; - $message = ''; - $d = DEDEROOT.$cfg_tplcache_dir; - AjaxHead(); - sleep(1); - if (preg_match("#data\/#", $cfg_tplcache_dir) && file_exists($d) && is_dir($d)) { - $dh = dir($d); - while ($filename = $dh->read()) { - if ($filename == '.' || $filename == '..' || $filename == 'index.html') continue; - @unlink($d.'/'.$filename); - } - } - $message = "成功清空模板缓存"; - echo $message; - exit(); -} - -include(dirname(__FILE__).'/templets/sys_safetest.htm'); +OpenUrl($fileHashURL); +$filelist = $del->GetJSON(); +$offFiles = array(); +foreach ($filelist as $key => $ff) { + $offFiles[$ff->filename] = $ff->hash; +} + +$alter = ""; + +if (count($offFiles) == 0) { + $alter = ' + '; +} + +function TestOneFile($f) +{ + global $message, $info, $offFiles; + $str = ''; + + //排除safefile和data/tplcache目录 + if (preg_match("#data/tplcache|.svn|data/cache#", $f)) return -1; + + $fp = fopen($f, 'r'); + while (!feof($fp)) { + $str .= fgets($fp, 1024); + } + fclose($fp); + + if (preg_match("#(".$info.")[ \r\n\t]{0,}([\[\(])#i", $str)) { + $trfile = preg_replace("#^".DEDEROOT."#", '', $f); + $oldTrfile = $trfile; + $trfile = substr(str_replace("/", "\\", $trfile), 1); + + $localFilehash = md5_file($f); + $remoteFilehash = isset($offFiles[$trfile]) ? $offFiles[$trfile] : ''; + if ($localFilehash === $remoteFilehash) { + return 0; + } + + $message .= "
+
可疑文件:{$trfile}
+ 修改记录 + 删除 + 查看源码 +

\r\n"; + return 1; + } + return 0; +} + +function TestSafe($tdir) +{ + global $filetype; + $dh = dir($tdir); + while ($fname = $dh->read()) { + $fnamef = $tdir.'/'.$fname; + if (@is_dir($fnamef) && $fname != '.' && $fname != '..') { + TestSafe($fnamef); + } + if (preg_match("#\.(".$filetype.")#i", $fnamef)) { + TestOneFile($fnamef); + } + } +} + +//检测 +if ($action == 'test') { + $message = ''; + + AjaxHead(); + TestSafe(DEDEROOT); + if ($message == '') $message = "没发现可疑文件"; + echo $message; + exit(); +} else if ($action == 'viewdiff') { + $filename = isset($filename) ? $filename : ""; + if (empty($filename)) { + ShowMsg("没有选择对应的文件", "-1"); + exit; + } + + $baseFile = "https://cdn.dedebiz.com/release/{$cfg_version_detail}$filename"; + $del = new DedeHttpDown(); + $del->OpenUrl($baseFile); + $base = $del->GetHTML(); + + $file = "$cfg_basedir/$filename"; + $new = ""; + if (is_file($file)) { + $fp = fopen($file, "r"); + $new = fread($fp, filesize($file)); + fclose($fp); + } + + include(dirname(__FILE__).'/templets/sys_safetest_viewdiff.htm'); + + exit(); +} +//清空模板缓存 +else if ($action == 'clear') { + global $cfg_tplcache_dir; + $message = ''; + $d = DEDEROOT.$cfg_tplcache_dir; + AjaxHead(); + sleep(1); + if (preg_match("#data\/#", $cfg_tplcache_dir) && file_exists($d) && is_dir($d)) { + $dh = dir($d); + while ($filename = $dh->read()) { + if ($filename == '.' || $filename == '..' || $filename == 'index.html') continue; + @unlink($d.'/'.$filename); + } + } + $message = "成功清空模板缓存"; + echo $message; + exit(); +} + +include(dirname(__FILE__).'/templets/sys_safetest.htm'); ?> \ No newline at end of file diff --git a/src/dede/sys_sql_query.php b/src/admin/sys_sql_query.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/sys_sql_query.php rename to src/admin/sys_sql_query.php index 9821eed8..71e968d0 --- a/src/dede/sys_sql_query.php +++ b/src/admin/sys_sql_query.php @@ -1,5 +1,4 @@ "; foreach ($row as $k => $v) { - echo "{$k}:{$v}
\r\n"; + echo "{$k}:{$v}
\r\n"; } } exit(); @@ -129,7 +128,7 @@ else if ($dopost == "query") { if ($errCode == "") { $i++; } else { - $nerrCode .= "执行: $q 出错,错误提示:".$errCode."
"; + $nerrCode .= "执行: $q 出错,错误提示:".$errCode."
"; } } echo "成功执行{$i}个SQL语句

"; diff --git a/src/dede/tag_test.php b/src/admin/tag_test.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/tag_test.php rename to src/admin/tag_test.php index a9fd6bae..0b0d5e91 --- a/src/dede/tag_test.php +++ b/src/admin/tag_test.php @@ -1,15 +1,14 @@ -SetParameter("tag", $tag); - $dlist->SetParameter("orderway", $orderway); - $dlist->SetParameter("orderby", $orderby); - $dlist->pageSize = 20; - $dlist->SetTemplet(DEDEADMIN."/templets/tags_main.htm"); - $dlist->SetSource($query); - $dlist->Display(); - exit(); -} -/* -function update() -*/ else if ($action == 'update') { - $tid = (empty($tid) ? 0 : intval($tid)); - $count = (empty($count) ? 0 : intval($count)); - if (empty($tid)) { - ShowMsg('没有选择要删除的tag!', '-1'); - exit(); - } - $query = "UPDATE `#@__tagindex` SET `count`='$count' WHERE id='$tid' "; - $dsql->ExecuteNoneQuery($query); - ShowMsg("成功保存标签的点击信息!", 'tags_main.php'); - exit(); -} -/* -function delete() -*/ else if ($action == 'delete') { - if (@is_array($ids)) { - $stringids = implode(',', $ids); - } else if (!empty($ids)) { - $stringids = $ids; - } else { - ShowMsg('没有选择要删除的tag', '-1'); - exit(); - } - $query = "DELETE FROM `#@__tagindex` WHERE id IN ($stringids)"; - if ($dsql->ExecuteNoneQuery($query)) { - $query = "DELETE FROM `#@__taglist` WHERE tid IN ($stringids)"; - $dsql->ExecuteNoneQuery($query); - ShowMsg("删除tags[ $stringids ]成功", 'tags_main.php'); - } else { - ShowMsg("删除tags[ $stringids ]失败", 'tags_main.php'); - } - exit(); -} else if ($action == 'get_one') { - $tid = (empty($tid) ? 0 : intval($tid)); - $row = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id = $tid"); - echo json_encode($row); - exit; -} else if ($action == 'set_one') { - $tid = (empty($tid) ? 0 : intval($tid)); - $title = empty($title) ? "" : HtmlReplace($title, 0); - $kw = empty($kw) ? "" : HtmlReplace($kw, 0); - $des = empty($des) ? "" : HtmlReplace($des, 0); - $dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET title='{$title}',keywords='{$kw}',`description`='{$des}' WHERE id = {$tid}"); - echo json_encode(array('code' => 200, 'result' => true)); -} -/* -function fetch() -*/ else if ($action == 'fetch') { - $wheresql = ''; - $start = isset($start) && is_numeric($start) ? $start : 0; - $where = array(); - if (isset($startaid) && is_numeric($startaid) && $startaid > 0) { - $where[] = " id>=$startaid "; - } else { - $startaid = 0; - } - if (isset($endaid) && is_numeric($endaid) && $endaid > 0) { - $where[] = " id<=$endaid "; - } else { - $endaid = 0; - } - if (!empty($where)) { - $wheresql = " WHERE arcrank>-1 AND ".implode(' AND ', $where); - } - $query = "SELECT id as aid,arcrank,typeid,keywords FROM `#@__archives` $wheresql LIMIT $start, 100"; - $dsql->SetQuery($query); - $dsql->Execute(); - $complete = true; - $now = time(); - while ($row = $dsql->GetArray()) { - $aid = $row['aid']; - $typeid = $row['typeid']; - $arcrank = $row['arcrank']; - $row['keywords'] = trim($row['keywords']); - if ($row['keywords'] != '' && !preg_match("#,#", $row['keywords'])) { - $keyarr = explode(' ', $row['keywords']); - } else { - $keyarr = explode(',', $row['keywords']); - } - foreach ($keyarr as $keyword) { - $keyword = trim($keyword); - if ($keyword != '' && strlen($keyword) < 13) { - $keyword = addslashes($keyword); - $row = $dsql->GetOne("SELECT id,total FROM `#@__tagindex` WHERE tag LIKE '$keyword'"); - if (is_array($row)) { - $tid = $row['id']; - $trow = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__taglist` WHERE tag LIKE '$keyword'"); - if (intval($trow['dd']) != $row['total']) { - - $query = "UPDATE `#@__tagindex` SET `total`=".$trow['dd'].",uptime=$now WHERE id='$tid' "; - $dsql->ExecuteNoneQuery($query); - } - } else { - $query = " INSERT INTO `#@__tagindex`(`tag`,`count`,`total`,`weekcc`,`monthcc`,`weekup`,`monthup`,`addtime`,`uptime`) VALUES('$keyword','0','1','0','0','$timestamp','$timestamp','$timestamp','$now');"; - $dsql->ExecuteNoneQuery($query); - $tid = $dsql->GetLastID(); - } - $query = "REPLACE INTO `#@__taglist`(`tid`,`aid`,`typeid`,`arcrank`,`tag`) VALUES ('$tid', '$aid', '$typeid','$arcrank','$keyword'); "; - $dsql->ExecuteNoneQuery($query); - } - } - $complete = FALSE; - } - if ($complete) { - ShowMsg("tags获取完成", 'tags_main.php'); - exit(); - } - $start = $start + 100; - $goto = "tags_main.php?action=fetch&startaid=$startaid&endaid=$endaid&start=$start"; - ShowMsg('继续获取tags ...', $goto, 0, 500); - exit(); -} +SetParameter("tag", $tag); + $dlist->SetParameter("orderway", $orderway); + $dlist->SetParameter("orderby", $orderby); + $dlist->pageSize = 20; + $dlist->SetTemplet(DEDEADMIN."/templets/tags_main.htm"); + $dlist->SetSource($query); + $dlist->Display(); + exit(); +} +/* +function update() +*/ else if ($action == 'update') { + $tid = (empty($tid) ? 0 : intval($tid)); + $count = (empty($count) ? 0 : intval($count)); + if (empty($tid)) { + ShowMsg('没有选择要删除的tag!', '-1'); + exit(); + } + $query = "UPDATE `#@__tagindex` SET `count`='$count' WHERE id='$tid' "; + $dsql->ExecuteNoneQuery($query); + ShowMsg("成功保存标签的点击信息!", 'tags_main.php'); + exit(); +} +/* +function delete() +*/ else if ($action == 'delete') { + if (@is_array($ids)) { + $stringids = implode(',', $ids); + } else if (!empty($ids)) { + $stringids = $ids; + } else { + ShowMsg('没有选择要删除的tag', '-1'); + exit(); + } + $query = "DELETE FROM `#@__tagindex` WHERE id IN ($stringids)"; + if ($dsql->ExecuteNoneQuery($query)) { + $query = "DELETE FROM `#@__taglist` WHERE tid IN ($stringids)"; + $dsql->ExecuteNoneQuery($query); + ShowMsg("删除tags[ $stringids ]成功", 'tags_main.php'); + } else { + ShowMsg("删除tags[ $stringids ]失败", 'tags_main.php'); + } + exit(); +} else if ($action == 'get_one') { + $tid = (empty($tid) ? 0 : intval($tid)); + $row = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id = $tid"); + echo json_encode($row); + exit; +} else if ($action == 'set_one') { + $tid = (empty($tid) ? 0 : intval($tid)); + $title = empty($title) ? "" : HtmlReplace($title, 0); + $kw = empty($kw) ? "" : HtmlReplace($kw, 0); + $des = empty($des) ? "" : HtmlReplace($des, 0); + $dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET title='{$title}',keywords='{$kw}',`description`='{$des}' WHERE id = {$tid}"); + echo json_encode(array('code' => 200, 'result' => true)); +} +/* +function fetch() +*/ else if ($action == 'fetch') { + $wheresql = ''; + $start = isset($start) && is_numeric($start) ? $start : 0; + $where = array(); + if (isset($startaid) && is_numeric($startaid) && $startaid > 0) { + $where[] = " id>=$startaid "; + } else { + $startaid = 0; + } + if (isset($endaid) && is_numeric($endaid) && $endaid > 0) { + $where[] = " id<=$endaid "; + } else { + $endaid = 0; + } + if (!empty($where)) { + $wheresql = " WHERE arcrank>-1 AND ".implode(' AND ', $where); + } + $query = "SELECT id as aid,arcrank,typeid,keywords FROM `#@__archives` $wheresql LIMIT $start, 100"; + $dsql->SetQuery($query); + $dsql->Execute(); + $complete = true; + $now = time(); + while ($row = $dsql->GetArray()) { + $aid = $row['aid']; + $typeid = $row['typeid']; + $arcrank = $row['arcrank']; + $row['keywords'] = trim($row['keywords']); + if ($row['keywords'] != '' && !preg_match("#,#", $row['keywords'])) { + $keyarr = explode(' ', $row['keywords']); + } else { + $keyarr = explode(',', $row['keywords']); + } + foreach ($keyarr as $keyword) { + $keyword = trim($keyword); + if ($keyword != '' && strlen($keyword) < 13) { + $keyword = addslashes($keyword); + $row = $dsql->GetOne("SELECT id,total FROM `#@__tagindex` WHERE tag LIKE '$keyword'"); + if (is_array($row)) { + $tid = $row['id']; + $trow = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__taglist` WHERE tag LIKE '$keyword'"); + if (intval($trow['dd']) != $row['total']) { + + $query = "UPDATE `#@__tagindex` SET `total`=".$trow['dd'].",uptime=$now WHERE id='$tid' "; + $dsql->ExecuteNoneQuery($query); + } + } else { + $query = " INSERT INTO `#@__tagindex`(`tag`,`count`,`total`,`weekcc`,`monthcc`,`weekup`,`monthup`,`addtime`,`uptime`) VALUES('$keyword','0','1','0','0','$timestamp','$timestamp','$timestamp','$now');"; + $dsql->ExecuteNoneQuery($query); + $tid = $dsql->GetLastID(); + } + $query = "REPLACE INTO `#@__taglist`(`tid`,`aid`,`typeid`,`arcrank`,`tag`) VALUES ('$tid', '$aid', '$typeid','$arcrank','$keyword'); "; + $dsql->ExecuteNoneQuery($query); + } + } + $complete = FALSE; + } + if ($complete) { + ShowMsg("tags获取完成", 'tags_main.php'); + exit(); + } + $start = $start + 100; + $goto = "tags_main.php?action=fetch&startaid=$startaid&endaid=$endaid&start=$start"; + ShowMsg('继续获取tags ...', $goto, 0, 500); + exit(); +} diff --git a/src/dede/task_do.php b/src/admin/task_do.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/task_do.php rename to src/admin/task_do.php index e595ba6c..0ba52bf0 --- a/src/dede/task_do.php +++ b/src/admin/task_do.php @@ -1,161 +1,160 @@ - $v) { - if ($k == 'nextdo') { - $nextdo = ''; - $nextdos = explode(',', $GLOBALS[$k]); - if (isset($nextdos[1])) { - for ($i = 1; $i < count($nextdos); $i++) { - if (trim($nextdos[$i]) == '') continue; - $nextdo .= ($nextdo == '' ? $nextdos[$i] : ','.$nextdos[$i]); - } - } - //如果系统有多重任务, 把下一任务和任务列表参数提交给程序处理 - if (in_array('morejob', $notallowArr)) { - $reurl .= "&doposttmp=".$nextdos[0]; - if ($nextdo != '') $reurl .= "&nextdotmp=$nextdo"; - } else { - $reurl .= "&dopost=".$nextdos[0]; - if ($nextdo != '') $reurl .= "&nextdo=$nextdo"; - } - } else if (in_array($k, $notallowArr)) { - continue; - } else { - $reurl .= "&{$k}=".urlencode($GLOBALS[$k]); - } - } - return $reurl; -} -/****************************** -//更新上一篇和下一篇 -function makeprenext() { } - ******************************/ -if ($dopost == 'makeprenext') { - require_once(DEDEINC.'/arc.archives.class.php'); - $aid = intval($aid); - $preRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id<$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id DESC"); - $nextRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id>$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id ASC"); - if (is_array($preRow)) { - $envs['aid'] = $preRow['id']; - $arc = new Archives($preRow['id']); - $arc->MakeHtml(); - } - if (is_array($nextRow)) { - $envs['aid'] = $nextRow['id']; - $arc = new Archives($nextRow['id']); - $arc->MakeHtml(); - } - if (empty($nextdo)) { - ShowMsg("完成上下篇文档更新任务完成所有更新任务", "close::tgtable"); - exit(); - } else { - $jumpurl = GetNextUrl(); - ShowMsg("完成下篇文档更新任务 继续执行其它任务...", $jumpurl, 0, 500); - exit(); - } -} -/****************************** -//更新主页的任务 -function makeindex() { } - ******************************/ -if ($dopost == 'makeindex') { - require_once(DEDEINC.'/arc.partview.class.php'); - $envs = $_sys_globals = array(); - $envs['aid'] = 0; - $pv = new PartView(); - $row = $pv->dsql->GetOne('SELECT * FROM `#@__homepageset`'); - $templet = str_replace("{style}", $cfg_df_style, $row['templet']); - $homeFile = dirname(__FILE__).'/'.$row['position']; - $homeFile = str_replace("//", "/", str_replace("\\", "/", $homeFile)); - $fp = fopen($homeFile, 'w') or die("无法更新网站主页到:$homeFile 位置"); - fclose($fp); - $tpl = $cfg_basedir.$cfg_templets_dir.'/'.$templet; - if (!file_exists($tpl)) { - $tpl = $cfg_basedir.$cfg_templets_dir.'/default/index.htm'; - if (!file_exists($tpl)) exit("无法找到主页模板:$tpl "); - } - $GLOBALS['_arclistEnv'] = 'index'; - $pv->SetTemplet($tpl); - $pv->SaveToHtml($homeFile); - $pv->Close(); - if (empty($nextdo)) { - ShowMsg("完成主页更新任务完成所有更新任务", "close::tgtable"); - exit(); - } else { - $jumpurl = GetNextUrl(); - ShowMsg("完成主页更新 现在跳转到其它更新任务...", $jumpurl, 0, 500); - exit(); - } -} -/****************************** -//更新所有关连的栏目 -function makeparenttype() { } -******************************/ -else if ($dopost == 'makeparenttype') { - require_once(DEDEDATA."/cache/inc_catalog_base.inc"); - require_once(DEDEINC.'/arc.listview.class.php'); - $notallowArr = array('dopost', 'f', 'del', 'curpage', 'morejob'); - - $jumpurl = GetNextUrl($notallowArr); - - if (empty($typeid)) { - ShowMsg("完成栏目更新任务完成所有更新任务", "close::tgtable"); - exit(); - } - $topids = explode(',', GetTopids($typeid)); - if (empty($curpage)) $curpage = 0; - $tid = $topids[$curpage]; - - if (isset($cfg_Cs[$tid]) && $cfg_Cs[$tid][1] > 0) { - require_once(DEDEINC."/arc.listview.class.php"); - $lv = new ListView($tid); - $lv->CountRecord(); - $lv->MakeHtml(); - $lv->Close(); - } else { - require_once(DEDEINC."/arc.sglistview.class.php"); - $lv = new SgListView($tid); - $lv->CountRecord(); - $lv->MakeHtml(); - $lv->Close(); - } - - if ($curpage >= count($topids) - 1) { - if (!empty($doposttmp)) { - $jumpurl = preg_replace("#doposttmp|nextdotmp#", 'del', $jumpurl); - $jumpurl .= "&dopost={$doposttmp}&nextdo={$nextdotmp}"; - ShowMsg("完成栏目:{$tid} 更新
完成栏目更新任务,继续执行后续任务...", $jumpurl, 0, 500); - exit(); - } else { - ShowMsg("完成栏目:{$tid} 更新
完成栏目更新任务,完成所有更新任务", "close::tgtable"); - exit(); - } - } else { - $curpage++; - $jumpurl .= "&curpage={$curpage}&dopost=makeparenttype"; - ShowMsg("完成栏目:{$tid} 更新,继续更新其它栏目...", $jumpurl, 0, 500); - exit(); - } -} + $v) { + if ($k == 'nextdo') { + $nextdo = ''; + $nextdos = explode(',', $GLOBALS[$k]); + if (isset($nextdos[1])) { + for ($i = 1; $i < count($nextdos); $i++) { + if (trim($nextdos[$i]) == '') continue; + $nextdo .= ($nextdo == '' ? $nextdos[$i] : ','.$nextdos[$i]); + } + } + //如果系统有多重任务, 把下一任务和任务列表参数提交给程序处理 + if (in_array('morejob', $notallowArr)) { + $reurl .= "&doposttmp=".$nextdos[0]; + if ($nextdo != '') $reurl .= "&nextdotmp=$nextdo"; + } else { + $reurl .= "&dopost=".$nextdos[0]; + if ($nextdo != '') $reurl .= "&nextdo=$nextdo"; + } + } else if (in_array($k, $notallowArr)) { + continue; + } else { + $reurl .= "&{$k}=".urlencode($GLOBALS[$k]); + } + } + return $reurl; +} +/****************************** +//更新上一篇和下一篇 +function makeprenext() { } + ******************************/ +if ($dopost == 'makeprenext') { + require_once(DEDEINC.'/arc.archives.class.php'); + $aid = intval($aid); + $preRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id<$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id DESC"); + $nextRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id>$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id ASC"); + if (is_array($preRow)) { + $envs['aid'] = $preRow['id']; + $arc = new Archives($preRow['id']); + $arc->MakeHtml(); + } + if (is_array($nextRow)) { + $envs['aid'] = $nextRow['id']; + $arc = new Archives($nextRow['id']); + $arc->MakeHtml(); + } + if (empty($nextdo)) { + ShowMsg("完成上下篇文档更新任务完成所有更新任务", "close::tgtable"); + exit(); + } else { + $jumpurl = GetNextUrl(); + ShowMsg("完成下篇文档更新任务 继续执行其它任务...", $jumpurl, 0, 500); + exit(); + } +} +/****************************** +//更新主页的任务 +function makeindex() { } + ******************************/ +if ($dopost == 'makeindex') { + require_once(DEDEINC.'/arc.partview.class.php'); + $envs = $_sys_globals = array(); + $envs['aid'] = 0; + $pv = new PartView(); + $row = $pv->dsql->GetOne('SELECT * FROM `#@__homepageset`'); + $templet = str_replace("{style}", $cfg_df_style, $row['templet']); + $homeFile = dirname(__FILE__).'/'.$row['position']; + $homeFile = str_replace("//", "/", str_replace("\\", "/", $homeFile)); + $fp = fopen($homeFile, 'w') or die("无法更新网站主页到:$homeFile 位置"); + fclose($fp); + $tpl = $cfg_basedir.$cfg_templets_dir.'/'.$templet; + if (!file_exists($tpl)) { + $tpl = $cfg_basedir.$cfg_templets_dir.'/default/index.htm'; + if (!file_exists($tpl)) exit("无法找到主页模板:$tpl "); + } + $GLOBALS['_arclistEnv'] = 'index'; + $pv->SetTemplet($tpl); + $pv->SaveToHtml($homeFile); + $pv->Close(); + if (empty($nextdo)) { + ShowMsg("完成主页更新任务完成所有更新任务", "close::tgtable"); + exit(); + } else { + $jumpurl = GetNextUrl(); + ShowMsg("完成主页更新 现在跳转到其它更新任务...", $jumpurl, 0, 500); + exit(); + } +} +/****************************** +//更新所有关连的栏目 +function makeparenttype() { } +******************************/ +else if ($dopost == 'makeparenttype') { + require_once(DEDEDATA."/cache/inc_catalog_base.inc"); + require_once(DEDEINC.'/arc.listview.class.php'); + $notallowArr = array('dopost', 'f', 'del', 'curpage', 'morejob'); + + $jumpurl = GetNextUrl($notallowArr); + + if (empty($typeid)) { + ShowMsg("完成栏目更新任务完成所有更新任务", "close::tgtable"); + exit(); + } + $topids = explode(',', GetTopids($typeid)); + if (empty($curpage)) $curpage = 0; + $tid = $topids[$curpage]; + + if (isset($cfg_Cs[$tid]) && $cfg_Cs[$tid][1] > 0) { + require_once(DEDEINC."/arc.listview.class.php"); + $lv = new ListView($tid); + $lv->CountRecord(); + $lv->MakeHtml(); + $lv->Close(); + } else { + require_once(DEDEINC."/arc.sglistview.class.php"); + $lv = new SgListView($tid); + $lv->CountRecord(); + $lv->MakeHtml(); + $lv->Close(); + } + + if ($curpage >= count($topids) - 1) { + if (!empty($doposttmp)) { + $jumpurl = preg_replace("#doposttmp|nextdotmp#", 'del', $jumpurl); + $jumpurl .= "&dopost={$doposttmp}&nextdo={$nextdotmp}"; + ShowMsg("完成栏目:{$tid} 更新
完成栏目更新任务,继续执行后续任务...", $jumpurl, 0, 500); + exit(); + } else { + ShowMsg("完成栏目:{$tid} 更新
完成栏目更新任务,完成所有更新任务", "close::tgtable"); + exit(); + } + } else { + $curpage++; + $jumpurl .= "&curpage={$curpage}&dopost=makeparenttype"; + ShowMsg("完成栏目:{$tid} 更新,继续更新其它栏目...", $jumpurl, 0, 500); + exit(); + } +} diff --git a/src/dede/templets/action_search.htm b/src/admin/templets/action_search.htm old mode 100755 new mode 100644 similarity index 63% rename from src/dede/templets/action_search.htm rename to src/admin/templets/action_search.htm index 3b3c91ca..9b56867e --- a/src/dede/templets/action_search.htm +++ b/src/admin/templets/action_search.htm @@ -1,53 +1,48 @@ - - - - - 操作搜索 - - - - - - - - - - - - - - - - - - - -
当前位置 > 搜索结果
""的搜索结果
- - - - - - - - -
=> -
- - - - - - -
' - target="main">
-
-
- -
 
- - - - - + + + + + 操作搜索 + + + + + + + + + + + + + + + + + + +
当前位置 > 搜索结果
""的搜索结果
+ + + + + + + + +
=>
+ + + + + + +

+
+ +
+ + + + \ No newline at end of file diff --git a/src/dede/templets/ad_add.htm b/src/admin/templets/ad_add.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/ad_add.htm rename to src/admin/templets/ad_add.htm index a39c21ad..ed80f164 --- a/src/dede/templets/ad_add.htm +++ b/src/admin/templets/ad_add.htm @@ -27,7 +27,7 @@ "linkedCalendars": false, "timePicker": true, "timePicker24Hour": true, - // "timePickerSeconds": true, + //"timePickerSeconds": true, "showCustomRangeLabel": false, ranges: { '今日': [moment(), moment()], @@ -84,7 +84,7 @@
- @@ -95,22 +95,22 @@ - + - + - + - + - + - + - + + +
广告管理 >> 增加广告位置
广告代码的调用方法:{dede:myad name='广告位标识'/} 广告代码的调用方法:{dede:myad name='广告位标识'/}
广告位标识:广告位标识: (使用英文或数字表示的简洁标识)
广告分类:广告分类:
广告投放范围:广告投放范围: GetOptionArray(0,0,0); @@ -123,18 +123,18 @@ (如果在所选栏目找不到指定标识的广告内容,系统会自动搜索父栏目)
广告位名称:广告位名称:
时间限制:时间限制:
投放时间:投放时间: diff --git a/src/dede/templets/ad_edit.htm b/src/admin/templets/ad_edit.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/ad_edit.htm rename to src/admin/templets/ad_edit.htm index d1e36689..1886ede1 --- a/src/dede/templets/ad_edit.htm +++ b/src/admin/templets/ad_edit.htm @@ -2,7 +2,7 @@ - 更改广告 + 修改广告 @@ -19,7 +19,7 @@ "linkedCalendars": false, "timePicker": true, "timePicker24Hour": true, - // "timePickerSeconds": true, + //"timePickerSeconds": true, "showCustomRangeLabel": false, ranges: { '今日': [moment(), moment()], @@ -47,8 +47,8 @@ - + - + - + - + - + - + - + - -
 广告管理 >> 更改广告  广告管理 >> 修改广告
@@ -58,11 +58,11 @@
广告位标识:广告位标识:
广告分类:广告分类:
广告投放范围:广告投放范围: GetOptionArray($row['typeid'],0,0); @@ -84,12 +84,12 @@ (如果在所选栏目找不到指定标识的广告内容,系统会自动搜索父栏目)
广告位名称:广告位名称:
时间限制:时间限制:
投放时间:投放时间: diff --git a/src/dede/templets/ad_main.htm b/src/admin/templets/ad_main.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/ad_main.htm rename to src/admin/templets/ad_main.htm index 4d1e0bb1..3e8ff9aa --- a/src/dede/templets/ad_main.htm +++ b/src/admin/templets/ad_main.htm @@ -1,86 +1,86 @@ -{dede:config.pagesize value='20' /} - - - - - 广告管理 - - - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - -
- 广告管理  增加一个新广告 - 广告分类管理
- - - - - - - -
- - - - - - - - -
请选择分类: 关键字: - -
-
-
编号分类广告名称投放范围是否限时结束时间管理
{dede:field.aid /}{dede:field.clsname function='TestType(@me,1)'/}{dede:field.adname /}{dede:field.typename function='TestType(@me)'/}{dede:field.timeset function='TimeSetValue(@me)'/}{dede:field.endtime function='GetDateMk(@me)'/} - 代码 - 更改 - 删除 -
- {dede:pagelist listsize=5/} -
-
- - +{dede:config.pagesize value='20' /} + + + + + 广告管理 + + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + +
+ 广告管理  增加一个新广告 + 广告分类管理
+ + + + + + + +
+ + + + + + + + +
请选择分类: 关键字: + +
+
+
编号分类广告名称投放范围是否限时结束时间管理
{dede:field.aid /}{dede:field.clsname function='TestType(@me,1)'/}{dede:field.adname /}{dede:field.typename function='TestType(@me)'/}{dede:field.timeset function='TimeSetValue(@me)'/}{dede:field.endtime function='GetDateMk(@me)'/} + 代码 + 修改 + 删除 +
+ {dede:pagelist listsize=5/} +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/adtype_main.htm b/src/admin/templets/adtype_main.htm old mode 100755 new mode 100644 similarity index 80% rename from src/dede/templets/adtype_main.htm rename to src/admin/templets/adtype_main.htm index 4c425546..918e8a28 --- a/src/dede/templets/adtype_main.htm +++ b/src/admin/templets/adtype_main.htm @@ -1,51 +1,51 @@ - - - - -广告分类管理 - - - - - - - - - - - - - - SetQuery("Select * From #@__myadtype"); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - -
广告分类管理 [广告管理]
类型ID广告分类状态
id; ?> - 保留
新增一个广告类型:
- 新增
- + + + + +广告分类管理 + + + + + + + + + + + + + + SetQuery("Select * From #@__myadtype"); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + +
广告分类管理 [广告管理]
类型ID广告分类状态
id; ?> + 保留
新增一个广告类型:
+ 新增
+ \ No newline at end of file diff --git a/src/dede/templets/album_add.htm b/src/admin/templets/album_add.htm old mode 100755 new mode 100644 similarity index 58% rename from src/dede/templets/album_add.htm rename to src/admin/templets/album_add.htm index 9a5c370f..1930238c --- a/src/dede/templets/album_add.htm +++ b/src/admin/templets/album_add.htm @@ -1,563 +1,498 @@ - - - - - 增加图片集 - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
 图集列表 - >> 发布新图集栏目管理 
- - - - -
- - - - - -
 常规内容 高级参数 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 图集标题:  简略标题:
-
- - - - - -
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') - echo " "; - else - echo " "; - } - ?> -
-
- - - - - - - -
 Tag标签: - (','号分开,单个标签小于12字节) - 权重:(越小越靠前)
-
- - - - - - -
 缩 略 图: - - - - -
- - - - - - 选择图片 - - - -
- -
-
- -
-
- - - - - -
 图集主栏目: - - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -   - 选择副栏目"; - } - ?> -
-
 图集选项:
- - - - - -
 表现方式: - -    - -    - -
-
- - - - - -
 上传方式: - - - -
-
- - - - - -
 手工上传: - - - 选择本地图片(支持多选) - - -
-
- - - - -
-
-
-
-
- - - - - -
 图集内容:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
  - - - - - -
- - - -
-
-
-
- - - + + + + + 增加图片集 + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
 图集列表 >> 发布图集栏目管理
+ + + + +
+ + + + + +
常规内容高级参数
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 图集标题:  简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + + +
+
+
+ + + + + +
 图集主栏目: + + getUserChannel(),$channelid); + echo ""; + ?> + + 快捷选择 + 选择副栏目"; + } + ?> +
+
 图集选项:
+ + + + + +
 表现方式: + +    + +    + +
+
+ + + + + +
 上传方式: + + + +
+
+ + + + + +
 手工上传:选择本地图片(支持多选)
+
+ + + + +
+
+
+
+
+ + + + + +
 图集内容:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/album_edit.htm b/src/admin/templets/album_edit.htm old mode 100755 new mode 100644 similarity index 58% rename from src/dede/templets/album_edit.htm rename to src/admin/templets/album_edit.htm index e5af70de..045521f1 --- a/src/dede/templets/album_edit.htm +++ b/src/admin/templets/album_edit.htm @@ -1,520 +1,526 @@ - - - - -修改图片集 - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
 &dopost=listArchives">图集列表 >> 更改图集栏目管理 
- - - - -
- - - - -
 常规内容 图集图片 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
 图集标题: 简略标题:
- - - - -
 自定义属性:SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; - else $jumpclick = ''; - if(preg_match("#".$trow->att."#", $arcRow['flag'])) - echo " "; - else - echo " "; - } - ?>
- - - - -
 跳转网址:" />
- - - - - - -
 Tag标签: - (','号分开,单个标签小于12字节) 权重: - (越小越靠前)
- - - - - -
 缩 略 图:
"> - - - - 选择图片 - - - " - style="height: 80px">
- - - - - - -
 图片来源:">作者:">
- - - - -
 图集主栏目:getUserChannel(),$channelid); - echo "'; - ?> - 快捷选择 -
- - - - -
 图集副栏目: - ' style='width:200px;' /> - 选择副栏目
- - - - -
 图集内容:
 高级属性:
- - - - - - - - -
-  评论选项: - - -   - 浏览次数:' style='width:100px;' />
-
- - - - - - -
 文档排序:标题颜色:"> -
- - - - - - -
 阅读权限:发布选项: -
- - - - - - -
 发布时间:"; - ?> - 消费金币:" size="10">
- - - - -
 关键字:" />
- - - - -
 图集内容摘要:
- - - - - -
 自定义文件名:" /> - (不包括后缀名如.html等) 
- - - - - - - - - '> - - - '> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
  - - - - -
-
- - + + + + +修改图片集 + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
 图集列表 >> 修改图集栏目管理
+ + + + +
+ + + + + +
常规内容图集图片
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
 图集标题: 简略标题:
+ + + + +
 自定义属性: + SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; + else $jumpclick = ''; + if(preg_match("#".$trow->att."#", $arcRow['flag'])) + echo " "; + else + echo " "; + } + ?>
+ + + + + +
 跳转网址:" />
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + 上传图片 + + +
+ + + + + + +
 图片来源:">作者:">
+
+ + + + +
 图集主栏目:getUserChannel(),$channelid); + echo "'; + ?> + 快捷选择 +
+
+ + + + +
 图集副栏目: + ' style='width:200px;' /> + 选择副栏目 +
+
+ + + + +
 图集内容:
+
 高级属性:
+ + + + + + + +
 评论选项: + +   + 浏览次数:' style='width:100px;' />
+
+ + + + + + +
 文档排序:标题颜色: + "> + +
+
+ + + + + + +
 阅读权限:发布选项: +
+
+ + + + + + + +
 发布时间:"; + ?> + 消费金币:" size="10">
+
+ + + + + +
 关键字:" />
+
+ + + + + +
 内容摘要:
+
+ + + + + + +
 自定义文件名:" />(不包括后缀名如.html等)
+
+ + + + + + + + + '> + + + '> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/archives_add.htm b/src/admin/templets/archives_add.htm old mode 100755 new mode 100644 similarity index 59% rename from src/dede/templets/archives_add.htm rename to src/admin/templets/archives_add.htm index e9987ccd..df1c60d2 --- a/src/dede/templets/archives_add.htm +++ b/src/admin/templets/archives_add.htm @@ -1,443 +1,376 @@ - - - - - 发布文档 - - - - - - - - - - - - - - - - - - - - - - - - -
 文档列表 - >> 发布文档栏目管理 
- - - - - -
- - - - - - -
 常规信息 高级参数 
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - '> - - - 0) - { - echo "\r\n"; - echo "\r\n"; - } - else - { - ?> - - - - - - - - - - - - - -
- - - - - - - -
  - -  简略标题: - -
-
- - - - - -
 自定义属性: - SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') - echo ""; - else - echo " "; - } - ?> -
-
- - - - - - - -
 Tag标签: - (','号分开,单个标签小于12字节) - 权重:(越小越靠前)
-
- - - - - - -
 缩 略 图: - - - - -
- - - - - - 选择图片 - - - -
-
- - -
-
- - - - - -
 文档主栏目: - - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -   - 选择副栏目"; - } - ?> -
-
- - - - - -
 附加选项: - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
  - - - - - -
- - - -
-
-
-
- - + + + + + 增加商品 + + + + + + + + + + + + + + + + + + + + + + +
 文档列表 >> 发布商品栏目管理
+ + + + +
+ + + + + + +
常规信息高级参数 
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + '> + + + 0) + { + echo "\r\n"; + echo "\r\n"; + } else { + ?> + + + + + + + + + + + + + +
+ + + + + + + +
  简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') + echo ""; + else + echo " "; + } + ?> +
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + +
+
+
+ + + + + +
 文档主栏目: + + getUserChannel(),$channelid); + echo ""; + ?> + + 快捷选择 + 选择副栏目"; + } + ?> +
+
+ + + + + +
 附加选项: + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ \ No newline at end of file diff --git a/src/admin/templets/archives_edit.htm b/src/admin/templets/archives_edit.htm new file mode 100644 index 00000000..d24dbf41 --- /dev/null +++ b/src/admin/templets/archives_edit.htm @@ -0,0 +1,363 @@ + + + + + 修改商品 + + + + + + + + + + + + + + + + + + + + + + +
 文档列表 >> 修改文档栏目管理
+ + + + +
+ + + + + +
常规信息高级参数
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + '> + + + 0) + { + echo "\r\n"; + echo "\r\n"; + } + else + { + ?> + + + + + + + + + + + + + + +
+ + + + + + + +
   简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; + else $jumpclick = ''; + if(preg_match("#".$trow->att."#", $arcRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + +
 跳转网址:
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + 上传图片 + + + + +
+
+ + + + + +
 文档主栏目: + getUserChannel(),$channelid); + echo ""; + ?> + 快捷选择 +
+
+ + + + + +
 文档副栏目: + + ' style='width:200px;' /> + 选择副栏目 +
+
+ +
+ + + + + +
 附加选项: + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/archives_sg_add.htm b/src/admin/templets/archives_sg_add.htm old mode 100755 new mode 100644 similarity index 50% rename from src/dede/templets/archives_sg_add.htm rename to src/admin/templets/archives_sg_add.htm index ab4c8477..4a2ba546 --- a/src/dede/templets/archives_sg_add.htm +++ b/src/admin/templets/archives_sg_add.htm @@ -1,218 +1,184 @@ - - - - -发布文档 - - - - - - - - - - - - - - - - - - - - - - - - -
  - 文档列表 >> 发布文档  栏目管理  
- - - - - -
- - - - - - -
 常规信息  
-
- -
- - - - - - - - - - - - - '> - - - - - - 0) - { - echo "\r\n"; - } - else - { - ?> - - - - - - - -
- - - - - -
  -
- - - - - -
 自定义属性: - SetQuery("Select * From `#@__arcatt` where att<>'j' And att<>'p' order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - echo " "; - } - ?> -
-
- - - - - - -
 缩 略 图: - - - - -
- - - - - - 选择图片 - - - -
-
- -
- - - - - - - -
 浏览权限: - -
-
- - - - - -
 文档主栏目: - - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -  栏目管理 -  增加大栏目 -
- - - - - -
- - - - - -
  - - - - -
- - - -
-
- + + + + +增加分类 + + + + + + + + + + + + + + + + + + + + + + +
 文档列表 >> 发布分类栏目管理
+ + + + +
+ + + + + + +
常规信息
+
+
+ + + + + + + + + + + + + + + + + + 0) + { + echo "\r\n"; + } else { + ?> + + + + + + + +
+ + + + + +
 
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` where att<>'j' And att<>'p' order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + echo " "; + } + ?> +
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + +
+
+
+ + + + + + + +
 浏览权限: + +
+
+ + + + + +
 文档主栏目: + + getUserChannel(),$channelid); + echo ""; + ?> + 快捷选择 + 栏目管理 + 增加大栏目 +
+
+ + + + +
+ + +
+
+ \ No newline at end of file diff --git a/src/dede/templets/archives_sg_edit.htm b/src/admin/templets/archives_sg_edit.htm old mode 100755 new mode 100644 similarity index 51% rename from src/dede/templets/archives_sg_edit.htm rename to src/admin/templets/archives_sg_edit.htm index 1020225b..15e61187 --- a/src/dede/templets/archives_sg_edit.htm +++ b/src/admin/templets/archives_sg_edit.htm @@ -1,210 +1,175 @@ - - - - -更改文档 - - - - - - - - - - - - - - - - - - - - - - - -
-  文档列表 >> 更改文档  栏目管理
- - - - - -
- - - - - -
 常规信息 
-
-
- - - - - - - - - - - - - - - - - '> - - - 0) - { - echo "\r\n"; - } - else - { - ?> - - - - - - - - -
- - - - -
  
- - - - - -
 自定义属性: - SetQuery("SELECT * FROM `#@__arcatt` WHERE att<>'j' AND att<>'p' ORDER BY sortid ASC"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if(preg_match("#".$trow->att."#", $addRow['flag'])) - echo " "; - else - echo " "; - } - ?> -
- - - - - - - -
 浏览权限: -
-
- - - - - - -
-  缩 略 图:
-  
- "> - - - - 选择图片 - - - - - " - style="height: 80px"> -
- - - - -
 文档主栏目: - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -
- -
- - - - - -
- - - - - -
  - - - - -
- -
-
- + + + + +修改分类 + + + + + + + + + + + + + + + + + + + + + + +
 文档列表 >> 修改分类  栏目管理
+ + + + +
+ + + + + +
常规信息
+
+
+ + + + + + + + + + + + + + + + '> + + + 0) + { + echo "\r\n"; + } else { + ?> + + + + + + + +
+ + + + + +
 
+
+ + + + + +
 自定义属性: + SetQuery("SELECT * FROM `#@__arcatt` WHERE att<>'j' AND att<>'p' ORDER BY sortid ASC"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if(preg_match("#".$trow->att."#", $addRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
+ + + + + + + +
 浏览权限: +
+
+ + + + + + +
 缩略图: + + + 上传图片 + + +
+
+ + + + +
 文档主栏目: + getUserChannel(),$channelid); + echo ""; + ?> + 快捷选择 +
+ +
+ + + + +
+ + +
+
+ \ No newline at end of file diff --git a/src/dede/templets/article_add.htm b/src/admin/templets/article_add.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/article_add.htm rename to src/admin/templets/article_add.htm index 75029002..7c7a0ec9 --- a/src/dede/templets/article_add.htm +++ b/src/admin/templets/article_add.htm @@ -1,448 +1,441 @@ - - - - -增加文章 - - - - - - - - - - - - - - - - - - - - - - - -
文章列表 >> 发布文章栏目管理
- - - - -
- - - - - -
常规信息单页采集
-
- - - - - - - - -
- - - - - - -
采集单个网页: - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
文章标题:简略标题:
-
- - - - - -
自定义属性: - SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') - echo " "; - else - echo " "; - } - ?> -
-
- - - - - - - -
Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
-
- - - - - - -
缩略图: - - - - -
- - - - - - 选择图片 - - - -
-
-
- - - - - - - -
文章来源: - - - 作者: - - -
-
- - - - - -
文章主栏目: - - getUserChannel(),$channelid); - echo ""; - ?> - - 快捷选择 - 选择副栏目"; - } - ?> -
-
- - - - - - -
关键字: - - - -
-
-
- - - - - - -
内容摘要:
-
-
文章内容:
-
-
-
- - - - - -
附加选项: - - - [设置] - - -
-
- - - - - -
分页方式: - - - 大小: K(分页符为:#p#分页标题#e#) -
-
- -
- - - - - -
- - - - -
高级参数↑
-
- - - - - - - - - - - - - - - - -
- - - - - - - -
评论选项: - - - 浏览次数: - -
-
- - - - - - - -
文章排序: - 标题颜色: - - -
-
- - - - - - - -
阅读权限: 消费金币:
-
- - - - - - - -
发布时间: - "; - ?> - 发布选项: - - -
-
- - - - - - -
自定义文件名:(不包括后缀名如.html等) - - 随机选择模板: - - "; - } - ?> -
-
- - - - -
- - -
-
- - - + + + + +增加文章 + + + + + + + + + + + + + + + + + + + + + + + +
文章列表 >> 发布文章栏目管理
+ + + + +
+ + + + + +
常规信息单页采集
+
+ + + + + + + + +
+ + + + + + +
采集单个网页: + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 文章标题: 简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + +
+
+
+ + + + + + + +
 文章来源: + + +  作者: + + +
+
+ + + + + +
 文章主栏目: + + getUserChannel(),$channelid); + echo ""; + ?> + + 快捷选择 + 选择副栏目"; + } + ?> +
+
+ + + + + + +
 关键字: + + + +
+
+
+ + + + + + +
 内容摘要:
+
+
文章内容:
+
+
+
+ + + + + +
 附加选项: + + + [设置] + + +
+
+ + + + + +
 分页方式: + + + 大小: K(分页符为:#p#分页标题#e#) +
+
+ +
+ + + + + +
+ + + + +
高级参数↑
+
+ + + + + + + + + + + + + + + + +
+ + + + + + + +
 评论选项: + + + 浏览次数: + +
+
+ + + + + + + +
 文章排序: + 标题颜色: + + +
+
+ + + + + + + +
 阅读权限: 消费金币:
+
+ + + + + + + +
 发布时间: + "; + ?> +  发布选项: + + +
+
+ + + + + + +
 自定义文件名:(不包括后缀名如.html等) + + 随机选择模板: + + "; + } + ?> +
+
+ + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/article_coonepage_rule.htm b/src/admin/templets/article_coonepage_rule.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/article_coonepage_rule.htm rename to src/admin/templets/article_coonepage_rule.htm index 5337513b..4494d4a5 --- a/src/dede/templets/article_coonepage_rule.htm +++ b/src/admin/templets/article_coonepage_rule.htm @@ -1,211 +1,209 @@ - - - - - - 单页采集规则管理 - - - - - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - {/dede:datalist} - - - - - - - -
-
单页采集规则管理:
- -
ID选择网址编码网站名称操作
- - - 编辑 - 删除 -
-   - 全选 - 取消 -  删除  -
- {dede:pagelist listsize=5/} -
- -
- 请稍候,正在载入... -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
网站名称:
原内容编码: - - -
用作文章来源: - -
网站网址:
 使用不带http及任何附加目录的网址
- 如:news.dedebiz.com
采集规则:仅针对文章内容,格式:前面HTML{@body}后面HMTL
 
  -
-
-
- - - + + + + + 单页采集规则管理 + + + + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + {/dede:datalist} + + + + + + + +
+
单页采集规则管理:
+ +
ID选择网址编码网站名称操作
+ + + 编辑 + 删除 +
+   + 全选 + 取消 +  删除  +
+ {dede:pagelist listsize=5/} +
+ +
+ 请稍候,正在载入... +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
网站名称:
原内容编码: + + +
用作文章来源: + +
网站网址:
 使用不带http及任何附加目录的网址
+ 如:news.dedebiz.com
采集规则:仅针对文章内容,格式:前面HTML{@body}后面HMTL
 
  +
+
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/article_description_main.htm b/src/admin/templets/article_description_main.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/article_description_main.htm rename to src/admin/templets/article_description_main.htm index 9d48ea1a..c5447ffc --- a/src/dede/templets/article_description_main.htm +++ b/src/admin/templets/article_description_main.htm @@ -1,108 +1,108 @@ - - - - - 文档自动摘要、自动分页 - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
文档自动摘要、自动分页: 
-
-   用于自动更新您系统没有填写摘要的文档的摘要信息或更新没分页的文档的自动分页标识(文档使用了自动分页后会降低HTML生成速度,并且在没人工干扰的情况下可能导致分页内容的HTML错误,请小心使用此功能)。
- - - - - - - - - - - - - - - - - - - - - -
频道ID: - - (可在“频道模型管理”处获得)摘要大小: - - (最大250字节)
数据表: - - 分析字段: -
最小值: - - (字节,内容大于该值才分析)每批处理: - - 条记录
开始ID: - - 结束ID: -  
操 作: - -  (自动分页大小: - - K,修改系统参数
-
- -
- - - - - -
结果: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 文档自动摘要、自动分页 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
文档自动摘要、自动分页: 
+
+   用于自动更新您系统没有填写摘要的文档的摘要信息或更新没分页的文档的自动分页标识(文档使用了自动分页后会降低HTML生成速度,并且在没人工干扰的情况下可能导致分页内容的HTML错误,请小心使用此功能)。
+ + + + + + + + + + + + + + + + + + + + + +
频道ID: + + (可在“频道模型管理”处获得)摘要大小: + + (最大250字节)
数据表: + + 分析字段: +
最小值: + + (字节,内容大于该值才分析)每批处理: + + 条记录
开始ID: + + 结束ID: +  
操 作: + +  (自动分页大小: + + K,修改系统参数
+
+ +
+ + + + + +
结果: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/article_edit.htm b/src/admin/templets/article_edit.htm old mode 100755 new mode 100644 similarity index 88% rename from src/dede/templets/article_edit.htm rename to src/admin/templets/article_edit.htm index 8993fa73..c697cbbd --- a/src/dede/templets/article_edit.htm +++ b/src/admin/templets/article_edit.htm @@ -2,7 +2,7 @@ -更改文章 +修改文章 @@ -41,7 +41,7 @@ table{border-collapse:separate} - +
文章列表 >> 更改文章文章列表 >> 修改文章 栏目管理
@@ -50,8 +50,8 @@ table{border-collapse:separate} - - + +
常规信息高级参数常规信息高级参数
@@ -62,8 +62,8 @@ table{border-collapse:separate} - - + +
常规信息高级参数常规信息高级参数
@@ -79,7 +79,7 @@ table{border-collapse:separate} - + @@ -91,7 +91,7 @@ table{border-collapse:separate} - + \r\n"; @@ -146,7 +146,7 @@ class TypeUnit echo " "; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo " 
文章标题: 文章标题: 简略标题: - + @@ -143,19 +143,13 @@ table{border-collapse:separate} + +
自定义属性: 自定义属性: SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); @@ -121,7 +121,7 @@ table{border-collapse:separate} - +
跳转网址: 跳转网址: ">
@@ -131,10 +131,10 @@ table{border-collapse:separate}
- + - +
Tag标签: Tag标签: (','号分开,单个标签小于12字节) 权重:(越小越靠前)(越小越靠前)
- + - -
缩略图: 缩略图: - - - 选择图片 - - - + 上传图片 + + @@ -168,7 +162,7 @@ table{border-collapse:separate} - + @@ -185,7 +179,7 @@ table{border-collapse:separate} diff --git a/src/dede/templets/sys_admin_user_edit.htm b/src/admin/templets/sys_admin_user_edit.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/sys_admin_user_edit.htm rename to src/admin/templets/sys_admin_user_edit.htm index 93a2f487..24f1c154 --- a/src/dede/templets/sys_admin_user_edit.htm +++ b/src/admin/templets/sys_admin_user_edit.htm @@ -2,7 +2,7 @@ - 管理员帐号--更改帐号 + 管理员帐号--修改帐号 @@ -14,7 +14,7 @@ diff --git a/src/dede/templets/sys_admin_user_tj.htm b/src/admin/templets/sys_admin_user_tj.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/sys_admin_user_tj.htm rename to src/admin/templets/sys_admin_user_tj.htm index 64c0bfab..31b13247 --- a/src/dede/templets/sys_admin_user_tj.htm +++ b/src/admin/templets/sys_admin_user_tj.htm @@ -1,51 +1,51 @@ - - - - -管理员帐号--绩效统计 - - - - - - - - - -
文章来源: 文章来源: - + + +
文章主栏目: 文章主栏目: getUserChannel(),$channelid); @@ -207,7 +201,7 @@ table{border-collapse:separate} - + - + - -
文章副栏目: 文章副栏目: @@ -228,13 +222,13 @@ table{border-collapse:separate}
文章内容: 文章内容:
- + - - + - + - + - + - + diff --git a/src/dede/templets/mytag_edit.htm b/src/admin/templets/mytag_edit.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/mytag_edit.htm rename to src/admin/templets/mytag_edit.htm index f052b6aa..313e9043 --- a/src/dede/templets/mytag_edit.htm +++ b/src/admin/templets/mytag_edit.htm @@ -2,13 +2,13 @@ -更改标记 +修改标记
附加选项: 附加选项: @@ -254,7 +248,7 @@ table{border-collapse:separate} - + + +
评论选项: 评论选项: @@ -269,7 +263,7 @@ table{border-collapse:separate} - + + +
文章排序: 文章排序: - + - - -
阅读权限: 阅读权限:
+ - + +
更新时间: 更新时间: "; @@ -340,7 +334,7 @@ table{border-collapse:separate} - +
关键字: 关键字:
@@ -350,7 +344,7 @@ table{border-collapse:separate}
- +
文章摘要: 文章摘要:
@@ -360,7 +354,7 @@ table{border-collapse:separate}
- + -
自定义文件名: 自定义文件名: (不包括后缀名如.html等) - - - - 关键字管理 - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - - - -
关键词维护
- 搜索: - -   - -   - -
-
- - - - - - - - - - -
新增关键字:链接网址:频率:
-
选择关键字链接网址频率管理
- - - - {dede:field.keyword/} - - - - - - - - -   - -
-   - -   - -
- {dede:pagelist listsize=3/} -
-
- - + + + + + 关键字管理 + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + + + +
关键词维护
+ 搜索: + +   + +   + +
+
+ + + + + + + + + + +
新增关键字:链接网址:频率:
+
选择关键字链接网址频率管理
+ + + + {dede:field.keyword/} + + + + + + + + +   + +
+   + +   + +
+ {dede:pagelist listsize=3/} +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/article_keywords_make.htm b/src/admin/templets/article_keywords_make.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/article_keywords_make.htm rename to src/admin/templets/article_keywords_make.htm index 55168fbe..5cc417d0 --- a/src/dede/templets/article_keywords_make.htm +++ b/src/admin/templets/article_keywords_make.htm @@ -1,61 +1,61 @@ - - - - -关键字维护 - - - - - - - - - - - - - - - - - - - - - -
- - - - -
关键字维护: - -
本向导帮助自动分析您系统内的关键字,并统计关键字的数量,对其进行排序,您可以清理掉错误的关键字或无意义的关键字,以提高文档关连和搜索的准确性,本分析器是直接在内存中对关键字进行分析排序后加入到数据库的,因此本操作比较占用内存,如果您的文档数量很大并且使用的又是虚拟主机,可能无法完成本操作。
-   本程序只分析文章频道的关键字数据,其它频道或自定义频道请自行手工指定内容的关系字。
-   如果您的文章是采集回来的,请先用“自动获取关键字”的功能对未有关键字的文章进行分词索引,然后再检测关键字。
- 检测已有的关键字 -   - 自动获取关键字 -
- - - - - -
结果: - [增大] [缩小] -
- -
-
- + + + + +关键字维护 + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
关键字维护: + +
本向导帮助自动分析您系统内的关键字,并统计关键字的数量,对其进行排序,您可以清理掉错误的关键字或无意义的关键字,以提高文档关连和搜索的准确性,本分析器是直接在内存中对关键字进行分析排序后加入到数据库的,因此本操作比较占用内存,如果您的文档数量很大并且使用的又是虚拟主机,可能无法完成本操作。
+   本程序只分析文章频道的关键字数据,其它频道或自定义频道请自行手工指定内容的关系字。
+   如果您的文章是采集回来的,请先用“自动获取关键字”的功能对未有关键字的文章进行分词索引,然后再检测关键字。
+ 检测已有的关键字 +   + 自动获取关键字 +
+ + + + + +
结果: + [增大] [缩小] +
+ +
+
+ \ No newline at end of file diff --git a/src/dede/templets/article_keywords_select.htm b/src/admin/templets/article_keywords_select.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/article_keywords_select.htm rename to src/admin/templets/article_keywords_select.htm index d7451e0e..621d0a96 --- a/src/dede/templets/article_keywords_select.htm +++ b/src/admin/templets/article_keywords_select.htm @@ -1,109 +1,109 @@ - - - - -关键字管理 - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
选择关键字 - - -
- {dede:datalist} - {dede:field.keyword/} - {/dede:datalist} -
- - - - - - -
已选的关键字:
-
- {dede:pagelist listsize=3/} -
-
-
- + + + + +关键字管理 + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
选择关键字 + + +
+ {dede:datalist} + {dede:field.keyword/} + {/dede:datalist} +
+ + + + + + +
已选的关键字:
+
+ {dede:pagelist listsize=3/} +
+
+
+ \ No newline at end of file diff --git a/src/dede/templets/article_result_same.htm b/src/admin/templets/article_result_same.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/article_result_same.htm rename to src/admin/templets/article_result_same.htm index 80388f4c..0aa7b16c --- a/src/dede/templets/article_result_same.htm +++ b/src/admin/templets/article_result_same.htm @@ -1,135 +1,135 @@ - - - - -重复文档检测 - - - - - - - - - - - - - - - - - - - - - GetArray()) - { - if($row['dd']==1 ) break; - ?> - - - - - - - - - - -
- ·重复文档列表: -
选择 重复数量 文档标题
- - - - - -
-   - -   - -   - -   - (共有 篇重复标题的文档) -
- + + + + +重复文档检测 + + + + + + + + + + + + + + + + + + + + + GetArray()) + { + if($row['dd']==1 ) break; + ?> + + + + + + + + + + +
+ ·重复文档列表: +
选择 重复数量 文档标题
+ + + + + +
+   + +   + +   + +   + (共有 篇重复标题的文档) +
+ \ No newline at end of file diff --git a/src/dede/templets/article_test_same.htm b/src/admin/templets/article_test_same.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/article_test_same.htm rename to src/admin/templets/article_test_same.htm index 25c7e99b..0fed411b --- a/src/dede/templets/article_test_same.htm +++ b/src/admin/templets/article_test_same.htm @@ -1,87 +1,87 @@ - - - - - 重复文档检测 - - - - - - -
-
-
批量管理
-
- - - - - - - - - - - - - - - - - - - -
- - - - - -
 重复文档检测: 
-
- - - - - - - - - - - - - -
频道类型: - -
删除选项: - - -
每排列出记录: - 条
-
- -
-   结果: -
-
- -
-
- - + + + + + 重复文档检测 + + + + + + +
+
+
批量管理
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + + +
 重复文档检测: 
+
+ + + + + + + + + + + + + +
频道类型: + +
删除选项: + + +
每排列出记录: + 条
+
+ +
+   结果: +
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/baidunews.htm b/src/admin/templets/baidunews.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/templets/baidunews.htm rename to src/admin/templets/baidunews.htm index cc131b29..a8bc4a3c --- a/src/dede/templets/baidunews.htm +++ b/src/admin/templets/baidunews.htm @@ -1,58 +1,58 @@ - - - - - 百度新闻地图 - - - - - - -
-
-
辅助插件
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
- 百度新闻地图 -
-

《互联网新闻开放协议》是百度新闻搜索制定的搜索引擎新闻源收录标准,网站可将发布的新闻内容制作成遵循此开放协议的XML格式的网页(独立于原有的新闻发布形式)供搜索引擎索引。

-

详情参见

-

配置的相关参数在 【系统设置 -> 其他选项】中调整

-

只适用于文章频道,数据表为V6默认的

-
 设置:
 文件名:  - -
- -
 状态:
- - -
- - + + + + + 点卡生成向导 + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
点卡生成向导: + + +
+
+ + + + + + + + + + + + + + + + + + + +
点卡类型: + + 生成数量: + +
点卡前缀: + + 密码长度: +
密码类型: + + 密码组数: +
+
+ +
+ + + + + +
结果: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/cards_manmage.htm b/src/admin/templets/cards_manmage.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/cards_manmage.htm rename to src/admin/templets/cards_manmage.htm index b11bd014..9400448f --- a/src/dede/templets/cards_manmage.htm +++ b/src/admin/templets/cards_manmage.htm @@ -1,104 +1,104 @@ - - - - - 点卡业务记录 - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - - -
点卡业务管理: - - - - - - - -
-
选择卡号点卡类型生成日期使用日期状态使用会员
{dede:field.cardid/}{dede:field.mtime function='GetDateMk(@me)'/}{dede:field.utime function='GetUseDate(@me)'/}{dede:field.isexp function='GetSta(@me)'/}{dede:field.uid function='GetMemberID(@me)'/}
  - - -     
- {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} -
- - + + + + + 点卡业务记录 + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + + +
点卡业务管理: + + + + + + + +
+
选择卡号点卡类型生成日期使用日期状态使用会员
{dede:field.cardid/}{dede:field.mtime function='GetDateMk(@me)'/}{dede:field.utime function='GetUseDate(@me)'/}{dede:field.isexp function='GetSta(@me)'/}{dede:field.uid function='GetMemberID(@me)'/}
  + + +     
+ {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} +
+ + \ No newline at end of file diff --git a/src/dede/templets/cards_type.htm b/src/admin/templets/cards_type.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/cards_type.htm rename to src/admin/templets/cards_type.htm index 0d7202fb..32dbff0c --- a/src/dede/templets/cards_type.htm +++ b/src/admin/templets/cards_type.htm @@ -1,86 +1,86 @@ - - - - - 点卡产品分类 - - - - - - - - - - - - - - - - - - - SetQuery("Select * From #@__moneycard_type"); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - - - - - -
 点卡产品分类:
产品名称点数(金币数)价格状态
- - - - - - (元) - - - 保留 -
- 新增一个点卡产品类型:
- - - - - - (元) - - - 新增
- -
- - + + + + + 点卡产品分类 + + + + + + + + + + + + + + + + + + + SetQuery("Select * From #@__moneycard_type"); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + + + + + +
 点卡产品分类:
产品名称点数(金币数)价格状态
+ + + + + + (元) + + + 保留 +
+ 新增一个点卡产品类型:
+ + + + + + (元) + + + 新增
+ +
+ + \ No newline at end of file diff --git a/src/admin/templets/catalog_add.htm b/src/admin/templets/catalog_add.htm new file mode 100644 index 00000000..2de11708 --- /dev/null +++ b/src/admin/templets/catalog_add.htm @@ -0,0 +1,519 @@ + + + + +栏目管理 + + + + + + + + + + + + + + + + +
+ + + + +
栏目管理>>增加栏目
+
+ + + + + + + 0) + { + echo " "; + echo " "; + echo " "; + } + ?> + + + +
+ + + + +
+ + + + + + +
常规选项高级选项栏目内容
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '> + + + +
是否支持投稿: + + +
是否隐藏栏目: + + +
内容模型: + +
中文名称:
中文概况:
英文名称:
英文概况:
栏目大图: + + +
栏目小图: + + +
排列顺序:(由低 -> 高)
浏览权限: + (仅限制栏目里的文档浏览权限)
上级目录: + + +
文件保存目录: + + + + + +
+
目录相对位置: + + + + + + + + +
栏目列表选项: + + + + + + +
默认页的名称:
栏目属性: + +
+ +
+ + +
栏目交叉:帮助
仅适用[最终列表栏目]
+ + + + + + +
+ +
绑定小分类:
仅适用[分类信息模型]
+ 按 Ctrl 多选,不选系统将调用全部分类,在“联动类别管理”中管理 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 返回 +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/catalog_add_quick.htm b/src/admin/templets/catalog_add_quick.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/catalog_add_quick.htm rename to src/admin/templets/catalog_add_quick.htm index 31636726..29168d74 --- a/src/dede/templets/catalog_add_quick.htm +++ b/src/admin/templets/catalog_add_quick.htm @@ -1,314 +1,314 @@ - - - - - 栏目管理--快速创建栏目 - - - - - - - - - - -
- - - - - - - - - -
- - - - -
 栏目管理 >> 批量增加栏目
-
- - - - - - - -
- - - - -
- - - - -
 常规选项 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
公用参数:
是否支持投稿: - -   -
目录保存位置: - - - - - - -
隶属栏目: - - (默认为顶级栏目) -
内容模型:   -
栏目列表选项: - - -
默认页的名称:
文章命名规则: - 帮助
列表命名规则: - 帮助
栏目填写:
- - - - - - - - - - - - - - - - - - - - - - - -
排序顶级栏目名称子栏目(用"目录名称1,目录名称2..."这样表示多个栏目) -
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-     返回
-
-
- - + + + + + 栏目管理--快速创建栏目 + + + + + + + + + + +
+ + + + + + + + + +
+ + + + +
 栏目管理 >> 批量增加栏目
+
+ + + + + + + +
+ + + + +
+ + + + +
 常规选项 
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
公用参数:
是否支持投稿: + +   +
目录保存位置: + + + + + + +
隶属栏目: + + (默认为顶级栏目) +
内容模型:   +
栏目列表选项: + + +
默认页的名称:
文章命名规则: + 帮助
列表命名规则: + 帮助
栏目填写:
+ + + + + + + + + + + + + + + + + + + + + + + +
排序顶级栏目名称子栏目(用"目录名称1,目录名称2..."这样表示多个栏目) +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+     返回
+
+
+ + \ No newline at end of file diff --git a/src/admin/templets/catalog_edit.htm b/src/admin/templets/catalog_edit.htm new file mode 100644 index 00000000..4a5d7de7 --- /dev/null +++ b/src/admin/templets/catalog_edit.htm @@ -0,0 +1,449 @@ + + + + +栏目管理 + + + + + + + + + + + + + + + + + +
+ + + + +
栏目管理>>修改栏目
+
+ + + + + + + + + +
+ + + + +
+ + + + + + +
常规选项高级选项栏目内容
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '> + + + +
是否支持投稿: + + +
是否隐藏栏目: + + +
内容模型: + +
中文名称:
中文概况:
英文名称:
英文概况:
栏目大图: + + +
栏目小图: + + +
排列顺序: (由低 -> 高)
浏览权限: (仅限制栏目里的文档浏览权限) +
文件保存目录:
栏目列表选项: + + + +
默认页的名称:
栏目属性: +
+
+ +
栏目交叉:帮助
仅适用[最终列表栏目]
+ + + +
+ +
绑定小分类:
仅适用[分类信息模型]
+ 按 Ctrl 多选,不选系统将调用全部分类,在“联动类别管理”中管理 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 返回 +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/catalog_main.htm b/src/admin/templets/catalog_main.htm old mode 100755 new mode 100644 similarity index 95% rename from src/dede/templets/catalog_main.htm rename to src/admin/templets/catalog_main.htm index 5a063ead..0fc0d298 --- a/src/dede/templets/catalog_main.htm +++ b/src/admin/templets/catalog_main.htm @@ -1,166 +1,166 @@ - - - - -栏目管理 - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 网站栏目管理 - - - 增加顶级栏目 - 批量增加栏目 - 更新栏目缓存 - 更新栏目 - -
- - - - - -
提示:可使用右键菜单进行操作 - - 展开全部 - - 普通模式 - -
-
-0) $opendir=$userChannel; -$tu = new TypeUnit(); -$tu->ListAllType($userChannel,$opendir); -?> -
- - - - -
- + + + + +栏目管理 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 网站栏目管理 + + + 增加顶级栏目 + 批量增加栏目 + 更新栏目缓存 + 更新栏目 + +
+ + + + + +
提示:可使用右键菜单进行操作 + + 展开全部 + + 普通模式 + +
+
+0) $opendir=$userChannel; +$tu = new TypeUnit(); +$tu->ListAllType($userChannel,$opendir); +?> +
+ + + + +
+ \ No newline at end of file diff --git a/src/dede/templets/catalog_menu.htm b/src/admin/templets/catalog_menu.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/catalog_menu.htm rename to src/admin/templets/catalog_menu.htm index 277fb20c..d903c246 --- a/src/dede/templets/catalog_menu.htm +++ b/src/admin/templets/catalog_menu.htm @@ -1,201 +1,201 @@ - - - - -类别管理 - - - - - - - - - -
- - - - - - - - - - - -
-
-
-
-
-
- - -
- - - -
- - 站点目录树
-ListAllType($userChannel,$opendir); -?> -
- + + + + +类别管理 + + + + + + + + + +
+ + + + + + + + + + + +
+
+
+
+
+
+ + +
+ + + +
+ + 站点目录树
+ListAllType($userChannel,$opendir); +?> +
+ \ No newline at end of file diff --git a/src/dede/templets/catalog_menu2.htm b/src/admin/templets/catalog_menu2.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/catalog_menu2.htm rename to src/admin/templets/catalog_menu2.htm index 3a5cb465..35d739bf --- a/src/dede/templets/catalog_menu2.htm +++ b/src/admin/templets/catalog_menu2.htm @@ -1,150 +1,150 @@ - - - - -类别管理 - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
- - -
- - - -
站点目录树
- ListAllType($userChannel,$opendir); - ?> -
- + + + + +类别管理 + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ + +
+ + + +
站点目录树
+ ListAllType($userChannel,$opendir); + ?> +
+ \ No newline at end of file diff --git a/src/dede/templets/content_att.htm b/src/admin/templets/content_att.htm old mode 100755 new mode 100644 similarity index 86% rename from src/dede/templets/content_att.htm rename to src/admin/templets/content_att.htm index c8b25fab..d6e39a53 --- a/src/dede/templets/content_att.htm +++ b/src/admin/templets/content_att.htm @@ -1,70 +1,70 @@ - - - - - 自定义属性管理 - - - - - - - - - - - - - - - - - - - - - SetQuery(" Select * From `#@__arcatt` order by sortid asc "); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - -
文档自定义属性管理 -
-   自定义属性的意义和使用说明:
-   在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist - 标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,例如,我希望在最顶部的地方显示我想要的文档,在以往的版本中是无法做到的,但使用自定义属性之后,只要给arclist 标记加上 - att='自定义属性的ID' 的属性,然后在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档。
-   注意事项:这个版本中att对应的字段是SET类型字段,因此为了数据安全起见不允许用户增加其它类型,但调用时允许使用组合条件,如:att='c,p'表示推荐图片新闻。
ID排序属性名称
- att; ?> - - - - -
 
- -
- - + + + + + 自定义属性管理 + + + + + + + + + + + + + + + + + + + + + SetQuery(" Select * From `#@__arcatt` order by sortid asc "); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + +
文档自定义属性管理 +
+   自定义属性的意义和使用说明:
+   在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist + 标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,例如,我希望在最顶部的地方显示我想要的文档,在以往的版本中是无法做到的,但使用自定义属性之后,只要给arclist 标记加上 + att='自定义属性的ID' 的属性,然后在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档。
+   注意事项:这个版本中att对应的字段是SET类型字段,因此为了数据安全起见不允许用户增加其它类型,但调用时允许使用组合条件,如:att='c,p'表示推荐图片新闻。
ID排序属性名称
+ att; ?> + + + + +
 
+ +
+ + \ No newline at end of file diff --git a/src/dede/templets/content_batch_up.htm b/src/admin/templets/content_batch_up.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/content_batch_up.htm rename to src/admin/templets/content_batch_up.htm index 02d2c328..acf0dc3a --- a/src/dede/templets/content_batch_up.htm +++ b/src/admin/templets/content_batch_up.htm @@ -1,213 +1,213 @@ - - - - - 文档批量管理 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
文档批量管理: 
-
选定栏目: - GetOptionArray(0,$admin_catalogs,0,1); - echo ""; - ?> -
起始ID:开始: - - 结束: -
档案发布时间: - - - - - - - - -
-
用户的登录id: - (网址uid=后面跟的id)
操作: - - - -
移动选项: - 新位置:"; - echo ""; - echo "
"; - echo "标题关键字:"; - ?> -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - - - - -
错误文档修正: 
-
- - - -
- -
- - + + + + + 文档批量管理 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
文档批量管理: 
+
选定栏目: + GetOptionArray(0,$admin_catalogs,0,1); + echo ""; + ?> +
起始ID:开始: + + 结束: +
档案发布时间: + + + + + + + + +
+
用户的登录id: + (网址uid=后面跟的id)
操作: + + + +
移动选项: + 新位置:"; + echo ""; + echo "
"; + echo "标题关键字:"; + ?> +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + + + + +
错误文档修正: 
+
+ + + +
+ +
+ + \ No newline at end of file diff --git a/src/dede/templets/content_i_list.htm b/src/admin/templets/content_i_list.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/content_i_list.htm rename to src/admin/templets/content_i_list.htm index 72cbee9c..9cf9424e --- a/src/dede/templets/content_i_list.htm +++ b/src/admin/templets/content_i_list.htm @@ -1,172 +1,170 @@ - - - - - - 文档管理 - - - - - - - - - - - - - - - - - - - -
- - {dede:if $adminid == $mid } - - {else} - - {/dede:if} - {dede:global.CheckUserSend/} - - - - -
- - - - - - - - - - - - - - -
- {dede:global.positionname/}文档列表  (使用鼠标右键进行常用操作) -
文档图片文档标题类目权限发布人HTML点击
- -
- {dede:datalist} - - - - - - - - - - -
- 文档图片 - - - 编辑属性 - - {dede:field.title/}{dede:field.flag function='IsCommendArchives(@me)'/} - -
-   发布时间:{dede:field.senddate function='GetDateTimeMk(@me)' /} -
- {dede:field.typeid function='GetTypename(@me)'/} -
- ID: {dede:field.id/} -
{dede:field.arcrank function='GetRankName(@me)' /}{dede:field.mid function=GetMemberName(@me)/}{dede:field.ismake function='IsHtmlArchives(@me)' /}{dede:field.click/}
- {/dede:datalist} -
- - - - - - - - -
-   - 全选 - 取消 -  查看  -  更改  -  更新  -  审核  -  推荐  -  移动  -  删除  -  增加属性  -  删除属性  -
- {dede:pagelist listsize=5/} -
- -
- - - - -
- - - - - - - - - -
请选择类目: - - - 关键字: - - - - - - -
-
-
-
- - - + + + + + 文档管理 + + + + + + + + + + + + + + + + + + + +
+ + {dede:if $adminid == $mid } + + {else} + + {/dede:if} + {dede:global.CheckUserSend/} + + + + +
+ + + + + + + + + + + + + + +
+ {dede:global.positionname/}文档列表  (使用鼠标右键进行常用操作) +
文档图片文档标题类目权限发布人HTML点击
+ +
+ {dede:datalist} + + + + + + + + + + +
+ 文档图片 + + + 编辑属性 + + {dede:field.title/}{dede:field.flag function='IsCommendArchives(@me)'/} + +
+   发布时间:{dede:field.senddate function='GetDateTimeMk(@me)' /} +
+ {dede:field.typeid function='GetTypename(@me)'/} +
+ ID: {dede:field.id/} +
{dede:field.arcrank function='GetRankName(@me)' /}{dede:field.mid function=GetMemberName(@me)/}{dede:field.ismake function='IsHtmlArchives(@me)' /}{dede:field.click/}
+ {/dede:datalist} +
+ + + + + + + + +
+   + 全选 + 取消 +  查看  +  修改  +  更新  +  审核  +  推荐  +  移动  +  删除  +  增加属性  +  删除属性  +
+ {dede:pagelist listsize=5/} +
+ +
+ + + + +
+ + + + + + + + + +
请选择类目: + + + 关键字: + + + + + + +
+
+
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/content_list.htm b/src/admin/templets/content_list.htm old mode 100755 new mode 100644 similarity index 98% rename from src/dede/templets/content_list.htm rename to src/admin/templets/content_list.htm index 1b463bc0..c08ad18d --- a/src/dede/templets/content_list.htm +++ b/src/admin/templets/content_list.htm @@ -1,136 +1,136 @@ - - - - -文档管理 - - - - - - - - - - - - - - - - - -
- - {dede:if $adminid==$mid} - - {else} - - {/dede:if} - {dede:global.CheckUserSend/} - - - - -
-
- - - - - -
- - - - - - - - - -
- - 关键字: - - - -
-
-
-
- - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - - {/dede:datalist} - - - - - - -
{dede:global.positionname/}文档列表(使用鼠标右键弹出菜单)
ID选择文章标题更新时间类目点击HTML权限发布人操作
{dede:field.id/} - - {dede:field.title/} - - {dede:field.flag function='IsCommendArchives(@me)'/} - {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}{dede:field.ismake function="IsHtmlArchives(@me)"/}{dede:field.arcrank function="GetRankName(@me)"/}{dede:field.mid function=GetMemberName(@me)/} - - - -
- 全选 - 取消 - 更新 - 审核 - 推荐 - 移动 - 删除 - 自动关键字"; ?> - 增加属性 - 删除属性 -
{dede:pagelist listsize='6'/}
-
- + + + + +文档管理 + + + + + + + + + + + + + + + + + +
+ + {dede:if $adminid==$mid} + + {else} + + {/dede:if} + {dede:global.CheckUserSend/} + + + + +
+
+ + + + + +
+ + + + + + + + + +
+ + 关键字: + + + +
+
+
+
+ + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + + {/dede:datalist} + + + + + + +
{dede:global.positionname/}文档列表(使用鼠标右键弹出菜单)
ID选择文章标题更新时间类目点击HTML权限发布人操作
{dede:field.id/} + + {dede:field.title/} + + {dede:field.flag function='IsCommendArchives(@me)'/} + {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}{dede:field.ismake function="IsHtmlArchives(@me)"/}{dede:field.arcrank function="GetRankName(@me)"/}{dede:field.mid function=GetMemberName(@me)/} + + + +
+ 全选 + 取消 + 更新 + 审核 + 推荐 + 移动 + 删除 + 自动关键字"; ?> + 增加属性 + 删除属性 +
{dede:pagelist listsize='6'/}
+
+ \ No newline at end of file diff --git a/src/dede/templets/content_s_list.htm b/src/admin/templets/content_s_list.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/content_s_list.htm rename to src/admin/templets/content_s_list.htm index ed60ec76..3ceee5f2 --- a/src/dede/templets/content_s_list.htm +++ b/src/admin/templets/content_s_list.htm @@ -1,219 +1,217 @@ - - - - - - 专题管理 - - - - - - - - - - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - {/dede:datalist} - - - - - - - -
- 文章列表 - (在文章标题处使用鼠标右键进行常用操作) -
ID选择文章标题更新时间类目点击HTML权限属性
{dede:field.id/} - - {dede:field.title/} - - {dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}
-   - 全选 - 取消 -  查看  -  更改  -  更新  -  审核  -  推荐  -  删除  -
- {dede:pagelist listsize=5/} -
-
- - - - - - - - - - - - -
请选择类目: - - - 关键字: - - - - -
-
- - + + + + + 专题管理 + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+
+ + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ 文章列表 + (在文章标题处使用鼠标右键进行常用操作) +
ID选择文章标题更新时间类目点击HTML权限属性
{dede:field.id/} + + {dede:field.title/} + + {dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}
+   + 全选 + 取消 +  查看  +  修改  +  更新  +  审核  +  推荐  +  删除  +
+ {dede:pagelist listsize=5/} +
+
+ + + + + + + + + + + + +
请选择类目: + + + 关键字: + + + + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/content_select_list.htm b/src/admin/templets/content_select_list.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/content_select_list.htm rename to src/admin/templets/content_select_list.htm index 44cce0fe..71ed6992 --- a/src/dede/templets/content_select_list.htm +++ b/src/admin/templets/content_select_list.htm @@ -1,136 +1,134 @@ - - - - - - 选择文章 - - - - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - {/dede:datalist} - - - - - - - -
- §文章列表 -
ID选择文章标题更新时间类目点击HTML权限属性
{dede:field.id/} - {dede:field.title/} - {dede:field.senddate function="GetDateMk(@me)" /}{dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}{dede:field.ismake function="IsHtmlArchives(@me)" /}{dede:field.arcrank function="GetRankName(@me)" /}{dede:field.flag function="IsCommendArchives(@me)" /}
-   - 全选 -   - 取消 -   - 把选定值加到列表 -
- {dede:pagelist listsize=5/} -
- - - - - - - -
- - - - - - - - -
请选择类目: - - - 关键字: - - - - -
-
- - + + + + + 选择文章 + + + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ §文章列表 +
ID选择文章标题更新时间类目点击HTML权限属性
{dede:field.id/} + {dede:field.title/} + {dede:field.senddate function="GetDateMk(@me)" /}{dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}{dede:field.ismake function="IsHtmlArchives(@me)" /}{dede:field.arcrank function="GetRankName(@me)" /}{dede:field.flag function="IsCommendArchives(@me)" /}
+   + 全选 +   + 取消 +   + 把选定值加到列表 +
+ {dede:pagelist listsize=5/} +
+ + + + + + + +
+ + + + + + + + +
请选择类目: + + + 关键字: + + + + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/content_sg_list.htm b/src/admin/templets/content_sg_list.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/content_sg_list.htm rename to src/admin/templets/content_sg_list.htm index d72e5235..c5ddabff --- a/src/dede/templets/content_sg_list.htm +++ b/src/admin/templets/content_sg_list.htm @@ -1,318 +1,316 @@ - - - - - - 文档管理 - - - - - - - - - - - - - - - - - -
- - {dede:if $adminid==$mid } - - {else} - - {/dede:if} - - - - -
- - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - {/dede:datalist} - - - - - - - -
- {dede:global.positionname/}文档列表  (使用鼠标右键进行常用操作) -
ID选择文章标题更新时间类目权限点击发布人操作
{dede:field.id/} - - - {dede:field.title/}{dede:field.flag function='IsCommendArchives(@me)'/} - - {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typename/}{dede:field.arcrank function="GetRankName(@me)"/}{dede:field.click/}{dede:field.mid function=GetMemberName(@me)/} - - -
-   - 全选 - 取消 -  更新  -  审核  -  推荐  -  移动  -  删除  - - 把选定值加到列表 - -
- {dede:pagelist listsize=3/} -
- - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
请选择类目: - - - 关键字: - - - - -
-
-
-
- - + + + + + 文档管理 + + + + + + + + + + + + + + + + + +
+ + {dede:if $adminid==$mid } + + {else} + + {/dede:if} + + + + +
+ + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ {dede:global.positionname/}文档列表  (使用鼠标右键进行常用操作) +
ID选择文章标题更新时间类目权限点击发布人操作
{dede:field.id/} + + + {dede:field.title/}{dede:field.flag function='IsCommendArchives(@me)'/} + + {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typename/}{dede:field.arcrank function="GetRankName(@me)"/}{dede:field.click/}{dede:field.mid function=GetMemberName(@me)/} + + +
+   + 全选 + 取消 +  更新  +  审核  +  推荐  +  移动  +  删除  + + 把选定值加到列表 + +
+ {dede:pagelist listsize=3/} +
+ + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + +
请选择类目: + + + 关键字: + + + + +
+
+
+
+ + \ No newline at end of file diff --git a/src/dede/templets/content_tj.htm b/src/admin/templets/content_tj.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/content_tj.htm rename to src/admin/templets/content_tj.htm index d8bf69d4..c4db9c97 --- a/src/dede/templets/content_tj.htm +++ b/src/admin/templets/content_tj.htm @@ -1,80 +1,80 @@ - - - - -文档信息统计 - - - - - - - - - - - - - - - -
- 文档信息统计: -
- - -
- - - - - - - - - -
综合信息统计: - - - - - - - - - - - - -
 文档总数: [
 评论总数: [
 会员总数: [
频道信息统计: - - - -
- - - - - - Execute("aaa","Select channel,count(channel) as dd From `#@__archives` group by channel"); - while($row = $dsql->GetArray("aaa")) $arcs[$row['channel']] = $row['dd']; - $dsql->Execute("me","Select id,typename From `#@__channeltype`"); - while($row = $dsql->GetObject()){ - ?> - - - - - -
频道名称文档总数
typename?> - [id]) ? $arcs[$row->id] : 0 ); ?>] -
- - - - -
- + + + + +文档信息统计 + + + + + + + + + + + + + + + +
+ 文档信息统计: +
+ + +
+ + + + + + + + + +
综合信息统计: + + + + + + + + + + + + +
 文档总数: [
 评论总数: [
 会员总数: [
频道信息统计: + + + +
+ + + + + + Execute("aaa","Select channel,count(channel) as dd From `#@__archives` group by channel"); + while($row = $dsql->GetArray("aaa")) $arcs[$row['channel']] = $row['dd']; + $dsql->Execute("me","Select id,typename From `#@__channeltype`"); + while($row = $dsql->GetObject()){ + ?> + + + + + +
频道名称文档总数
typename?> + [id]) ? $arcs[$row->id] : 0 ); ?>] +
+ + + + +
+ \ No newline at end of file diff --git a/src/dede/templets/desktop.ini b/src/admin/templets/desktop.ini similarity index 100% rename from src/dede/templets/desktop.ini rename to src/admin/templets/desktop.ini diff --git a/src/dede/templets/diy_add.htm b/src/admin/templets/diy_add.htm old mode 100755 new mode 100644 similarity index 79% rename from src/dede/templets/diy_add.htm rename to src/admin/templets/diy_add.htm index 5846afbb..61ef90ef --- a/src/dede/templets/diy_add.htm +++ b/src/admin/templets/diy_add.htm @@ -1,130 +1,130 @@ - - - - - 新增频道 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-  自定义表单管理 > 新增自定义表单: -
- diyid:
- 数字,创建后不可更改,并具有唯一性。推荐使用默认值 -
- - * 帮助 -
- 自定义表单名称:
- 自定义表单的中文名称,在后台管理,前台发布等均使用此名字。 -
- - *帮助 -
数据表:
- 必须由英文、数字、下划线组成,用于保存自定义表单数据,不能和已有表名重复,创建后不可修改表名。
- - *帮助 -
字段配置:建立自定义表单后在“更改”自定义表单的地方添加字段即可。
列表模板:
内容模板:
发布模板:
前台列表和内容页公开?: - - - -
- - - - - - -
  - - - -
-
- - + + + + + 新增频道 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+  自定义表单管理 > 新增自定义表单: +
+ diyid:
+ 数字,创建后不可修改,并具有唯一性。推荐使用默认值 +
+ + * 帮助 +
+ 自定义表单名称:
+ 自定义表单的中文名称,在后台管理,前台发布等均使用此名字。 +
+ + *帮助 +
数据表:
+ 必须由英文、数字、下划线组成,用于保存自定义表单数据,不能和已有表名重复,创建后不可修改表名。
+ + *帮助 +
字段配置:建立自定义表单后在“修改”自定义表单的地方添加字段即可。
列表模板:
内容模板:
发布模板:
前台列表和内容页公开?: + + + +
+ + + + + + +
  + + + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/diy_edit.htm b/src/admin/templets/diy_edit.htm old mode 100755 new mode 100644 similarity index 85% rename from src/dede/templets/diy_edit.htm rename to src/admin/templets/diy_edit.htm index 36ffc84b..7d99acbd --- a/src/dede/templets/diy_edit.htm +++ b/src/admin/templets/diy_edit.htm @@ -1,213 +1,213 @@ - - - - - 修改自定义表单 - - - - - - - - - - - - -
-
-
自定义表单管理
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 自定义表单管理 > 修改自定义表单: - (修改表名不会创建新表,如果您不懂手工处理这些表,请不要更改) -
自定义表单 diyid:
- 数字,创建后不可更改,并具有唯一性。
- - * 帮助
自定义表单名称:
- 自定义表单的中文名称,在后台管理,前台发布等均使用此名字。
- - *帮助 -
数据表:
- 自定义表单数据表创建后不可修改表名
- - *帮助 -
模型字段配置:
- 信息索引类字段系统已经加入,
- 您只需要增加其它个性化字段即可。
- -
- - - - - - - - - SetNameSpace("field","<",">"); -$dtp->LoadSource($fieldset); -if(is_array($dtp->CTags)){ -foreach($dtp->CTags as $ctag) -{ -?> - - - - - - - -
表单提示文字数据字段名数据类型表单类型维护
- GetAtt('itemname'); - if($itname=='') echo "没指定"; - else echo $itname; - ?> - - GetTagName()?> - - GetAtt('type'); - if(isset($fieldtypes[$ft])) echo $fieldtypes[$ft]; - else echo "系统专用类型"; - ?> - - GetAtt('autofield'); - if($ft==''||$ft==0) echo "固化表单"; - else echo "自动表单"; - ?> - - 修改 - 删除 -
-
列表模板: - -
内容模板: - -
发布模板: - -
前台列表和内容页公开?: - - - -
- - - - - - -
  - - - -
-
- - + + + + + 修改自定义表单 + + + + + + + + + + + + +
+
+
自定义表单管理
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 自定义表单管理 > 修改自定义表单: + (修改表名不会创建新表,如果您不懂手工处理这些表,请不要修改) +
自定义表单 diyid:
+ 数字,创建后不可修改,并具有唯一性。
+ + * 帮助
自定义表单名称:
+ 自定义表单的中文名称,在后台管理,前台发布等均使用此名字。
+ + *帮助 +
数据表:
+ 自定义表单数据表创建后不可修改表名
+ + *帮助 +
模型字段配置:
+ 信息索引类字段系统已经加入,
+ 您只需要增加其它个性化字段即可。
+ +
+ + + + + + + + + SetNameSpace("field","<",">"); +$dtp->LoadSource($fieldset); +if(is_array($dtp->CTags)){ +foreach($dtp->CTags as $ctag) +{ +?> + + + + + + + +
表单提示文字数据字段名数据类型表单类型维护
+ GetAtt('itemname'); + if($itname=='') echo "没指定"; + else echo $itname; + ?> + + GetTagName()?> + + GetAtt('type'); + if(isset($fieldtypes[$ft])) echo $fieldtypes[$ft]; + else echo "系统专用类型"; + ?> + + GetAtt('autofield'); + if($ft==''||$ft==0) echo "固化表单"; + else echo "自动表单"; + ?> + + 修改 + 删除 +
+
列表模板: + +
内容模板: + +
发布模板: + +
前台列表和内容页公开?: + + + +
+ + + + + + +
  + + + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/diy_edit_content.htm b/src/admin/templets/diy_edit_content.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/diy_edit_content.htm rename to src/admin/templets/diy_edit_content.htm index 973fba14..7b1a95c2 --- a/src/dede/templets/diy_edit_content.htm +++ b/src/admin/templets/diy_edit_content.htm @@ -1,72 +1,72 @@ - - - - -编辑评论 - - - - - - - - - - - - - - - -
-  表单管理 >> 编辑评论:
-
- - - - - $fielddata) - { - $allowhtml = array('htmltext'); - if($row[$field]=='') continue; - if($fielddata[1]=='img') - { - $row[$field] = " 浏览原图删除原图\r\n"; - } - else if($fielddata[1]=='addon') - { - $row[$field] = " 浏览原附件删除原附件"; - } - else - { - if(!in_array($fielddata[1],$allowhtml)){ - $row[$field] = dede_htmlspecialchars($row[$field]); - $row[$field] = ""; - } - } - echo ''; - $formfields .= $formfields == ''? $field.','.$fielddata[1] : ';'.$field.','.$fielddata[1]; - } - echo ""; - ?> - - - - - -
'.$fielddata[0].':'.''.$row[$field].'
- - - - -
-
-
- + + + + +编辑评论 + + + + + + + + + + + + + + + +
+  表单管理 >> 编辑评论:
+
+ + + + + $fielddata) + { + $allowhtml = array('htmltext'); + if($row[$field]=='') continue; + if($fielddata[1]=='img') + { + $row[$field] = " 浏览原图删除原图\r\n"; + } + else if($fielddata[1]=='addon') + { + $row[$field] = " 浏览原附件删除原附件"; + } + else + { + if(!in_array($fielddata[1],$allowhtml)){ + $row[$field] = dede_htmlspecialchars($row[$field]); + $row[$field] = ""; + } + } + echo ''; + $formfields .= $formfields == ''? $field.','.$fielddata[1] : ';'.$field.','.$fielddata[1]; + } + echo ""; + ?> + + + + + +
'.$fielddata[0].':'.''.$row[$field].'
+ + + + +
+
+
+ \ No newline at end of file diff --git a/src/dede/templets/diy_field_add.htm b/src/admin/templets/diy_field_add.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/diy_field_add.htm rename to src/admin/templets/diy_field_add.htm index b6e0dffe..c5aed47e --- a/src/dede/templets/diy_field_add.htm +++ b/src/admin/templets/diy_field_add.htm @@ -1,202 +1,202 @@ - - - - -增加字段 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
 自定义表单管理 >> 增加新字段: - -
所有填写的内容不允许包含双引号["],否则配置将无法写入。
表单提示文字:
- 发布内容时显示的提示文字
- - *
字段名称:
- - 只能用英文字母或数字,数据表的真实字段名,如果数据类型是联动类型,该项应该填写联动类型的[组名称]。 - -
- - * -
- 内容是否需要分页符:
- 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段! -
- - -   - -
- 数据类型: - -
-
-
-
-
-
-
-
-
-
-
-
-
- - -
- -
默认值:
- - 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”)。 - -
- -
最大长度:
- - 文本数据必须填写,大于255为text类型 - -
- -
自定义表单HTML: - ◆自定义表单HTML模板中用~name~表示提示文字,~form~表示表单元素。 -
- -
- - - - - - -
  - - - -
-
- + + + + +增加字段 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
 自定义表单管理 >> 增加新字段: + +
所有填写的内容不允许包含双引号["],否则配置将无法写入。
表单提示文字:
+ 发布内容时显示的提示文字
+ + *
字段名称:
+ + 只能用英文字母或数字,数据表的真实字段名,如果数据类型是联动类型,该项应该填写联动类型的[组名称]。 + +
+ + * +
+ 内容是否需要分页符:
+ 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段! +
+ + +   + +
+ 数据类型: + +
+
+
+
+
+
+
+
+
+
+
+
+
+ + +
+ +
默认值:
+ + 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”)。 + +
+ +
最大长度:
+ + 文本数据必须填写,大于255为text类型 + +
+ +
自定义表单HTML: + 自定义表单HTML模板中用~name~表示提示文字,~form~表示表单元素。 +
+ +
+ + + + + + +
  + + + +
+
+ \ No newline at end of file diff --git a/src/dede/templets/diy_field_edit.htm b/src/admin/templets/diy_field_edit.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/diy_field_edit.htm rename to src/admin/templets/diy_field_edit.htm index 810e5444..63fea5a7 --- a/src/dede/templets/diy_field_edit.htm +++ b/src/admin/templets/diy_field_edit.htm @@ -1,180 +1,180 @@ - - - - -更改字段 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
自定义表单管理 >> 修改字段: - -
表单提示文字:
- 发布内容时显示的提示文字
- - *(发布内容时显示的项名字)
字段名称:
- 只能用英文字母或数字,数据表的真实字段名
-
数据类型: - - -
内容是否需要分页符:
- 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!
- - -
默认值:
- 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称。
最大长度:
- 文本数据必须填写,大于255为text类型
-
自定义表单HTML: - ◆自定义表单HTML用~name~表示提示文字,~form~表示表单元素

- - - - - - -
  - - - -
- + + + + +修改字段 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
自定义表单管理 >> 修改字段: + +
表单提示文字:
+ 发布内容时显示的提示文字
+ + *(发布内容时显示的项名字)
字段名称:
+ 只能用英文字母或数字,数据表的真实字段名
+
数据类型: + + +
内容是否需要分页符:
+ 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!
+ + +
默认值:
+ 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称。
最大长度:
+ 文本数据必须填写,大于255为text类型
+
自定义表单HTML: + 自定义表单HTML用~name~表示提示文字,~form~表示表单元素

+ + + + + + +
  + + + +
+ \ No newline at end of file diff --git a/src/dede/templets/diy_list.htm b/src/admin/templets/diy_list.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/templets/diy_list.htm rename to src/admin/templets/diy_list.htm index c07e365b..8d903e65 --- a/src/dede/templets/diy_list.htm +++ b/src/admin/templets/diy_list.htm @@ -1,83 +1,83 @@ - - - - -<?php echo $diy->name; ?> - - - - - - -
-
-
name; ?>列表
-
-
- - - - - - {dede:datalist} - '; - foreach($fieldlist as $field=>$fielddata) - { - if($fields[$field]=='') continue; - if($fielddata[1]=='img'){ - $fields[$field] = "图片附件\r\n"; - } - else if($fielddata[1]=='addon'){ - $fields[$field] = "其它附件"; - } else { - if(!in_array($fielddata[1],$allowhtml)){ - $fields[$field] = dede_htmlspecialchars($fields[$field]); - } - } - echo ''; - } - } else { - echo ''; - } - ?> - {/dede:datalist} - - - - - - -
- - -
'.$fields['id'].' '.$fields['sta'].'
'.$fielddata[0].''.$fields[$field].'
暂无记录
{dede:pagelist listsize='6'/}
- -   -  审核 -  删除 - -
-
- - + + + + +<?php echo $diy->name; ?> + + + + + + +
+
+
name; ?>列表
+
+
+ + + + + + {dede:datalist} + '; + foreach($fieldlist as $field=>$fielddata) + { + if($fields[$field]=='') continue; + if($fielddata[1]=='img'){ + $fields[$field] = "图片附件\r\n"; + } + else if($fielddata[1]=='addon'){ + $fields[$field] = "其它附件"; + } else { + if(!in_array($fielddata[1],$allowhtml)){ + $fields[$field] = dede_htmlspecialchars($fields[$field]); + } + } + echo ''; + } + } else { + echo ''; + } + ?> + {/dede:datalist} + + + + + + +
+ + +
'.$fields['id'].' '.$fields['sta'].'
'.$fielddata[0].''.$fields[$field].'
暂无记录
{dede:pagelist listsize='6'/}
+ +   +  审核 +  删除 + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/diy_main.htm b/src/admin/templets/diy_main.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/diy_main.htm rename to src/admin/templets/diy_main.htm index a9d752fc..1cee50e8 --- a/src/dede/templets/diy_main.htm +++ b/src/admin/templets/diy_main.htm @@ -1,58 +1,57 @@ -{dede:page pagesize='40'/} - - - - -自定义表单管理 - - - - - - -
-
-
自定义表单管理
-
- - - - -
- - - - - -
增加新的自定义表单
-
- - - - - - - - {dede:datalist} - - - - - - - {/dede:datalist} -
diyid名称表名管理
{dede:field.diyid/}{dede:field.name/}{dede:field.table/} -  更改 -  删除 -  导出 -  预览 -
- - - - -
{dede:pagelist listsize='6'/}
- +{dede:page pagesize='40'/} + + + +自定义表单管理 + + + + + + +
+
+
自定义表单管理
+
+ + + + +
+ + + + + +
增加新的自定义表单
+
+ + + + + + + + {dede:datalist} + + + + + + + {/dede:datalist} +
diyid名称表名管理
{dede:field.diyid/}{dede:field.name/}{dede:field.table/} +  修改 +  删除 +  导出 +  预览 +
+ + + + +
{dede:pagelist listsize='6'/}
+ \ No newline at end of file diff --git a/src/dede/templets/diy_post.htm b/src/admin/templets/diy_post.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/diy_post.htm rename to src/admin/templets/diy_post.htm index acc698f6..ca1c12d9 --- a/src/dede/templets/diy_post.htm +++ b/src/admin/templets/diy_post.htm @@ -1,55 +1,55 @@ - - - - -<?php echo $diy->name;?> - - - - - - -
-
-
- 自定义表单管理 > name; ?> > 发布内容 -
-
-
- - - - - - - -
- -
- - - - -
- -  - -
-
- - + + + + +<?php echo $diy->name;?> + + + + + + +
+
+
+ 自定义表单管理 > name; ?> > 发布内容 +
+
+
+ + + + + + + +
+ +
+ + + + +
+ +  + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/erradd.htm b/src/admin/templets/erradd.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/erradd.htm rename to src/admin/templets/erradd.htm index 3420b648..38e226da --- a/src/dede/templets/erradd.htm +++ b/src/admin/templets/erradd.htm @@ -1,106 +1,104 @@ -{dede:config.pagesize value='20'/} - - - - - - 挑错管理 - - - - - - - -
- - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - - - - -
- 文章错误管理 
选择编号挑错人文章名称出错类型挑错时间错误内容修改建议
{dede:field.id /}{dede:field.mid function='username(@me)'/}{dede:field.title /} - {dede:field.type function='typename(@me)'/}{dede:field.sendtime function='GetDateMk(@me)'/}{dede:field.errtxt /}{dede:field.oktxt /}
- 全选 - 取消 -  删除  -
- {dede:pagelist listsize=5/} -
-
- - +{dede:config.pagesize value='20'/} + + + + + 挑错管理 + + + + + + + +
+ + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + + + + +
+ 文章错误管理 
选择编号挑错人文章名称出错类型挑错时间错误内容修改建议
{dede:field.id /}{dede:field.mid function='username(@me)'/}{dede:field.title /} + {dede:field.type function='typename(@me)'/}{dede:field.sendtime function='GetDateMk(@me)'/}{dede:field.errtxt /}{dede:field.oktxt /}
+ 全选 + 取消 +  删除  +
+ {dede:pagelist listsize=5/} +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/feedback_edit.htm b/src/admin/templets/feedback_edit.htm old mode 100755 new mode 100644 similarity index 80% rename from src/dede/templets/feedback_edit.htm rename to src/admin/templets/feedback_edit.htm index a84c316b..28b65129 --- a/src/dede/templets/feedback_edit.htm +++ b/src/admin/templets/feedback_edit.htm @@ -1,86 +1,85 @@ - - - - - 编辑评论 - - - - - - - - - - - - - - -
评论管理 >> 编辑评论: -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
评论所属文章: - -
评论人: - -
评论发布时间: - -
IP地址: - -
评论内容:更改的评论内容HTML代码不会被屏蔽,可用HTML语法编辑。
  -
管理员回复:回复内容的HTML代码会被屏蔽。
  -
- -   - -
-
-
- - + + + + + 编辑评论 + + + + + + + + + + + + + +
评论管理 >> 编辑评论: +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
评论所属文章: + +
评论人: + +
评论发布时间: + +
IP地址: + +
评论内容:修改的评论内容HTML代码不会被屏蔽,可用HTML语法编辑。
  +
管理员回复:回复内容的HTML代码会被屏蔽。
  +
+ +   + +
+
+
+ + \ No newline at end of file diff --git a/src/dede/templets/feedback_main.htm b/src/admin/templets/feedback_main.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/feedback_main.htm rename to src/admin/templets/feedback_main.htm index 734986b2..a26a6bd4 --- a/src/dede/templets/feedback_main.htm +++ b/src/admin/templets/feedback_main.htm @@ -1,185 +1,183 @@ - - - - - - 评论管理 - - - - - - - - - - - - - - - - - - - -
- -
-
- 关键字: - - - -
-
-
- - {dede:datalist} - - - - {/dede:datalist} - - - - - - -
- - - - - - - - - - - - -
-  选择 - - 用户:{dede:field.username/} - - 文档:{dede:field.arctitle - function="RemoveXSS(@me)"/} (浏览) - 0) { ?>({dede:field.replycount/}条回复) - - - IP地址:{dede:field.ip/} - - 时间:{dede:field.dtime function="GetDateTimeMK(@me)" /} - - 编辑 - 更新文档 -
- - - - -
- {dede:field.ischeck function="IsCheck(@me)" /} - {dede:field.msg function='cn_substr(Text2Html(@me), 150)'/} -
-
-
- {dede:pagelist listsize='5' /} -
- - - - - -
- - - - - - - -
-
-
- - - + + + + + 评论管理 + + + + + + + + + + + + + + + + + + + +
+ +
+
+ 关键字: + + + +
+
+
+ + {dede:datalist} + + + + {/dede:datalist} + + + + + + +
+ + + + + + + + + + + + +
+  选择 + + 用户:{dede:field.username/} + + 文档:{dede:field.arctitle + function="RemoveXSS(@me)"/} (浏览) + 0) { ?>({dede:field.replycount/}条回复) + + + IP地址:{dede:field.ip/} + + 时间:{dede:field.dtime function="GetDateTimeMK(@me)" /} + + 编辑 + 更新文档 +
+ + + + +
+ {dede:field.ischeck function="IsCheck(@me)" /} + {dede:field.msg function='cn_substr(Text2Html(@me), 150)'/} +
+
+
+ {dede:pagelist listsize='5' /} +
+ + + + + +
+ + + + + + + +
+
+
+ + + diff --git a/src/dede/templets/file_edit.htm b/src/admin/templets/file_edit.htm old mode 100755 new mode 100644 similarity index 72% rename from src/dede/templets/file_edit.htm rename to src/admin/templets/file_edit.htm index 7952c7fc..0b36c526 --- a/src/dede/templets/file_edit.htm +++ b/src/admin/templets/file_edit.htm @@ -1,7 +1,5 @@ - + - 文件管理器 @@ -29,33 +27,26 @@ - - +
- +
-  ◇文件管理 - >> 修改/新建文件 - 文件管理 >> 修改/新建文件
- - +
@@ -67,18 +58,15 @@ - +
- 修改/新建文件: + 修改/新建文件:
工作目录 - + (空白表示根目录 ,不允许用 “..” 形式的路径)
- {dede:global name='contentView'/} - {dede:global name='contentView'/}
- +   - +   - +
@@ -91,5 +79,4 @@ }); - \ No newline at end of file diff --git a/src/dede/templets/file_manage_main.htm b/src/admin/templets/file_manage_main.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/file_manage_main.htm rename to src/admin/templets/file_manage_main.htm index b03e8ac6..1801dfa1 --- a/src/dede/templets/file_manage_main.htm +++ b/src/admin/templets/file_manage_main.htm @@ -1,331 +1,330 @@ - - - - - 文件管理器 - - - - - - - - - - - - - - - read()) !== false) -{ - if($file!="." && $file!=".." && !is_dir("$inpath/$file")) - { - @$filesize = filesize("$inpath/$file"); - @$filesize=$filesize/1024; - @$filetime = filemtime("$inpath/$file"); - @$filetime = MyDate("Y-m-d H:i:s",$filetime); - if($filesize<0.1) - { - @list($ty1,$ty2)=explode(".",$filesize); - $filesize=$ty1.".".substr($ty2,0,2); - } - else - { - @list($ty1,$ty2)=explode(".",$filesize); - $filesize=$ty1.".".substr($ty2,0,1); - } - } - if($file == ".") - { - continue; - } - else if($file == "..") - { - if($activepath == "") - { - continue; - } - $tmp = preg_replace("#[\/][^\/]*$#i","",$activepath); - $line = "\n - - - "; - $dirs[] = $line; - } - else if(is_dir("$inpath/$file")) - { - if(preg_match("#^_(.*)$#i",$file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录 - if(preg_match("#^\.(.*)$#i",$file)) continue; - $line = "\n - - - - - - "; - $dirs[] = $line; - } - else if(preg_match("#\.(gif|png)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(jpg)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(swf|fla|fly)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(zip|rar|tar.gz)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(exe)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(mp3|wma)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(wmv|api)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(rm|rmvb)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(txt|inc|pl|cgi|asp|xml|xsl|aspx|cfm)#",$file)) - { - $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(htm|html)#i",$file)) - { - $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(php)#i",$file)) - { - $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(js)#i",$file)) - { - $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(css)#i",$file)) - { - $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); - $line = "\n - - - - - "; - $files[] = $line; - } - else - { - $line = "\n - - - - - "; - $files[] = $line; - } -} -$dh->close(); -foreach ($dirs as $dir) -{ - echo $dir; -} -foreach ($files as $file) -{ - echo $file; -} -?> - - - -
文件名文件大小最后修改时间操作
- 上级目录 - - 当前目录:$activepath   - -
- $file   - 改名 - 删除 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
$file$filesize KB$filetime - 改名 - 删除 - 移动 -
- 根目录 - 新建文件 - 新建目录 - 文件上传 - 空间检查 -   
- - - + + + + + 文件管理器 + + + + + + + + + + + + + + read()) !== false) +{ + if($file!="." && $file!=".." && !is_dir("$inpath/$file")) + { + @$filesize = filesize("$inpath/$file"); + @$filesize=$filesize/1024; + @$filetime = filemtime("$inpath/$file"); + @$filetime = MyDate("Y-m-d H:i:s",$filetime); + if($filesize<0.1) + { + @list($ty1,$ty2)=explode(".",$filesize); + $filesize=$ty1.".".substr($ty2,0,2); + } + else + { + @list($ty1,$ty2)=explode(".",$filesize); + $filesize=$ty1.".".substr($ty2,0,1); + } + } + if($file == ".") + { + continue; + } + else if($file == "..") + { + if($activepath == "") + { + continue; + } + $tmp = preg_replace("#[\/][^\/]*$#i","",$activepath); + $line = "\n + + + "; + $dirs[] = $line; + } + else if(is_dir("$inpath/$file")) + { + if(preg_match("#^_(.*)$#i",$file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录 + if(preg_match("#^\.(.*)$#i",$file)) continue; + $line = "\n + + + + + + "; + $dirs[] = $line; + } + else if(preg_match("#\.(gif|png)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(jpg)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(swf|fla|fly)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(zip|rar|tar.gz)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(exe)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(mp3|wma)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(wmv|api)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(rm|rmvb)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(txt|inc|pl|cgi|asp|xml|xsl|aspx|cfm)#",$file)) + { + $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(htm|html)#i",$file)) + { + $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(php)#i",$file)) + { + $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(js)#i",$file)) + { + $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(css)#i",$file)) + { + $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); + $line = "\n + + + + + "; + $files[] = $line; + } + else + { + $line = "\n + + + + + "; + $files[] = $line; + } +} +$dh->close(); +foreach ($dirs as $dir) +{ + echo $dir; +} +foreach ($files as $file) +{ + echo $file; +} +?> + + + +
文件名文件大小最后修改时间操作
+ 上级目录 + + 当前目录:$activepath   + +
+ $file   + 改名 + 删除 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
$file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ 根目录 + 新建文件 + 新建目录 + 文件上传 + 空间检查 +   
+ + + \ No newline at end of file diff --git a/src/dede/templets/file_upload.htm b/src/admin/templets/file_upload.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/file_upload.htm rename to src/admin/templets/file_upload.htm index 9403e984..3e9edc6c --- a/src/dede/templets/file_upload.htm +++ b/src/admin/templets/file_upload.htm @@ -1,61 +1,61 @@ - - - - -文件上传 - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -[返回目录{dede:global name='activepath'/}] -
  -
文件1:
-
-     - -  - -
- -
- + + + + +文件上传 + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + +
+ +[返回目录{dede:global name='activepath'/}] +
  +
文件1:
+
+     + +  + +
+
+
+ \ No newline at end of file diff --git a/src/dede/templets/freelist_add.htm b/src/admin/templets/freelist_add.htm old mode 100755 new mode 100644 similarity index 84% rename from src/dede/templets/freelist_add.htm rename to src/admin/templets/freelist_add.htm index 64b858b6..8a0401b0 --- a/src/dede/templets/freelist_add.htm +++ b/src/admin/templets/freelist_add.htm @@ -1,354 +1,344 @@ - - - - - 新增自由列表 - - - - - - - - - - - - - - - -
-
-
频道管理
-
-
- - - - - - - - - - - - -
- 自自由列表管理 - >> 增加一个列表: -
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google - Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度。
自由列表标题:
列表HTML存放目录: - {listdir}变量的值
目录默认页名称: -
命名规则:
列表模板: -
最大列出页数: - -
 以下选项用于模板里的 <meta name="keywords|description" - content=""> 描述
关键字:
列表描述:
-
列表样式:(这里是定义自由列表模板里的{dede:freelist - /}标记的样式和属性)
- - - - - - - -
- - - - - - - -
-
限定栏目: - \r\n"; - echo "\r\n"; - $dsql->SetQuery("Select ID,typename, channeltype From #@__arctype"); - $dsql->Execute(); - while($lrow = $dsql->GetObject()){ - $disable = ''; - if($lrow->channeltype < -1) - { - $disable = 'disabled'; - } - echo "\r\n"; - } - echo ""; - ?>
限定频道: - \r\n"; - echo "\r\n"; - $dsql->SetQuery("Select ID,typename From #@__channeltype where ID>0"); - $dsql->Execute(); - while($row = $dsql->GetObject()) - { - echo "\r\n"; - } - echo ""; - ?> -  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
附加属性: - \r\n"; - echo "\r\n"; - $dsql->SetQuery("Select * From #@__arcatt"); - $dsql->Execute(); - while($row = $dsql->GetObject()) - { - echo "\r\n"; - } - echo ""; - ?> - 文档发布时间: - - 天以内 (0 表示不限)
每页记录数: - -  显示列数: - - 标题长度: - - (1 字节 = 0.5个中文字)
高级筛选: - - -  关键字: - - (","逗号分开)
排列顺序: - -   - -
循环内的单行记录样式(InnerText):[底层变量field参考]
- -
  - -
-
 
-
- - - + + + + + 新增自由列表 + + + + + + + + + + + + + + + +
+
+
频道管理
+
+
+ + + + + + + + + + + + +
+ 自自由列表管理 + >> 增加一个列表: +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度。
自由列表标题:
列表HTML存放目录: + {listdir}变量的值
目录默认页名称: +
命名规则:
列表模板: +
最大列出页数: + +
 以下选项用于模板里的 <meta name="keywords|description" + content=""> 描述
关键字:
列表描述:
+
列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)
+ + + + + + + +
+ + + + + + + +
+
限定栏目: + \r\n"; + echo "\r\n"; + $dsql->SetQuery("Select ID,typename, channeltype From #@__arctype"); + $dsql->Execute(); + while($lrow = $dsql->GetObject()){ + $disable = ''; + if($lrow->channeltype < -1) + { + $disable = 'disabled'; + } + echo "\r\n"; + } + echo ""; + ?>
限定频道: + \r\n"; + echo "\r\n"; + $dsql->SetQuery("Select ID,typename From #@__channeltype where ID>0"); + $dsql->Execute(); + while($row = $dsql->GetObject()) + { + echo "\r\n"; + } + echo ""; + ?> +  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
附加属性: + \r\n"; + echo "\r\n"; + $dsql->SetQuery("Select * From #@__arcatt"); + $dsql->Execute(); + while($row = $dsql->GetObject()) + { + echo "\r\n"; + } + echo ""; + ?> + 文档发布时间: + + 天以内 (0 表示不限)
每页记录数: + +  显示列数: + + 标题长度: + + (1 字节 = 0.5个中文字)
高级筛选: + + +  关键字: + + (","逗号分开)
排列顺序: + +   + +
循环内的单行记录样式(InnerText):[底层变量field参考]
+ +
  + +
+
 
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/freelist_edit.htm b/src/admin/templets/freelist_edit.htm old mode 100755 new mode 100644 similarity index 85% rename from src/dede/templets/freelist_edit.htm rename to src/admin/templets/freelist_edit.htm index 6fd098ec..b8badfeb --- a/src/dede/templets/freelist_edit.htm +++ b/src/admin/templets/freelist_edit.htm @@ -1,326 +1,320 @@ - - - - - 更改自由列表 - - - - - - - - - - - - - - - - -
-
-
频道管理
-
-
- - - - - - - - - - - - - - -
- - - - - -
- 自自由列表管理 - >> 更改自由列表: -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google - Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度。
自由列表标题:
列表HTML存放目录: - {listdir}变量的值
目录默认页名称: - -
命名规则:
列表模板: -
最大列出页数: - -
 以下选项用于模板里的 <meta name="keywords|description" - content=""> 描述
关键字:
列表描述:
-
- 列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)
- 限定栏目: - GetAtt('typeid'); - echo ""; - ?>
限定频道: - GetAtt('channel'); - echo ""; - ?> -  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
附加属性: - GetAtt('att'); - echo ""; - ?> - 文档发布时间: - - 天以内 (0 表示不限)
每页记录数: - -  显示列数: - - 标题长度: - - (1 字节 = 0.5个中文字)
- GetAtt('type'); - if($setype=='') $setype = 'X'; - ?> - 高级筛选: - - -  关键字: - - (","逗号分开) -
排列顺序: - GetAtt('orderby'); - $sorta = "sortrank,置顶权限值;pubdate,发布时间;senddate,录入时间;click,点击量;id,文档ID,lastpost,最后评论时间;postnum,评论总数;rand,随机获取"; - $sortas = explode(';',$sorta); - foreach($sortas as $v) - { - $vs = explode(',',$v); - $vs[0] = trim($vs[0]); - $sortarrs[$vs[0]] = $vs[1]; - } - ?> - -   - -
循环内的单行记录样式(InnerText):[底层变量field参考]
- -
  - -
-
 
-
- - - + + + + + 修改自由列表 + + + + + + + + + + + + + + + + +
+
+
频道管理
+
+
+ + + + + + + + + + + + + + +
+ + + + + +
+ 自自由列表管理 + >> 修改自由列表: +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google + Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度。
自由列表标题:
列表HTML存放目录: + {listdir}变量的值
目录默认页名称: + +
命名规则:
列表模板: +
最大列出页数: + +
 以下选项用于模板里的 <meta name="keywords|description" + content=""> 描述
关键字:
列表描述:
+
+ 列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)
+ 限定栏目: + GetAtt('typeid'); + echo ""; + ?>
限定频道: + GetAtt('channel'); + echo ""; + ?> +  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
附加属性: + GetAtt('att'); + echo ""; + ?> + 文档发布时间: + + 天以内 (0 表示不限)
每页记录数: + +  显示列数: + + 标题长度: + + (1 字节 = 0.5个中文字)
+ GetAtt('type'); + if($setype=='') $setype = 'X'; + ?> + 高级筛选: + + +  关键字: + + (","逗号分开) +
排列顺序: + GetAtt('orderby'); + $sorta = "sortrank,置顶权限值;pubdate,发布时间;senddate,录入时间;click,点击量;id,文档ID,lastpost,最后评论时间;postnum,评论总数;rand,随机获取"; + $sortas = explode(';',$sorta); + foreach($sortas as $v) + { + $vs = explode(',',$v); + $vs[0] = trim($vs[0]); + $sortarrs[$vs[0]] = $vs[1]; + } + ?> + +   + +
循环内的单行记录样式(InnerText):[底层变量field参考]
+ +
  + +
+
 
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/freelist_main.htm b/src/admin/templets/freelist_main.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/freelist_main.htm rename to src/admin/templets/freelist_main.htm index 64905d69..53f623f7 --- a/src/dede/templets/freelist_main.htm +++ b/src/admin/templets/freelist_main.htm @@ -1,157 +1,155 @@ - - - - - - 自由列表管理 - - - - - - - - - - -
-
-
频道管理
-
- - - - - -
- - - - - - -
自由列表管理  - 增加列表 -   
-
-
- -
-
- - - - -
- - - - - - - - - -
- - - - - -   - - - -
- -
- - + + + + + 自由列表管理 + + + + + + + + + + +
+
+
频道管理
+
+ + + + + +
+ + + + + + +
自由列表管理  + 增加列表 +   
+
+
+ +
+
+ + + + +
+ + + + + + + + + +
+ + + + + +   + + + +
+ +
+ + \ No newline at end of file diff --git a/src/dede/templets/friendlink_add.htm b/src/admin/templets/friendlink_add.htm old mode 100755 new mode 100644 similarity index 84% rename from src/dede/templets/friendlink_add.htm rename to src/admin/templets/friendlink_add.htm index 3f3958c4..d7d0b9b2 --- a/src/dede/templets/friendlink_add.htm +++ b/src/admin/templets/friendlink_add.htm @@ -1,118 +1,118 @@ - - - - -友情链接管理 - - - - - - - - - - - - - - - - -
友情链接管理>>增加链接
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
网址: - -
网站名称: - -
排列位置: - - (由小到大排列) -
网站Logo: - - (88*31 gif或jpg) -
上传Logo: - -
网站简况:
站长Email: - -
网站类型: - -
链接位置: - - -
  - - -
-
-
- + + + + +友情链接管理 + + + + + + + + + + + + + + + + +
友情链接管理>>增加链接
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
网址: + +
网站名称: + +
排列位置: + + (由小到大排列) +
网站Logo: + + (88*31 gif或jpg) +
上传Logo: + +
网站简况:
站长Email: + +
网站类型: + +
链接位置: + + +
  + + +
+
+
+ \ No newline at end of file diff --git a/src/dede/templets/friendlink_edit.htm b/src/admin/templets/friendlink_edit.htm old mode 100755 new mode 100644 similarity index 84% rename from src/dede/templets/friendlink_edit.htm rename to src/admin/templets/friendlink_edit.htm index 5328cbbf..44757e1e --- a/src/dede/templets/friendlink_edit.htm +++ b/src/admin/templets/friendlink_edit.htm @@ -1,106 +1,106 @@ - - - - - 友情链接更改 - - - - - - - - - - - - - -
- 友情链接管理 >> 链接更改
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
网址: - -
排列位置: - - (由小到大排列) -
网站名称:
网站Logo: - - (88*31 gif或jpg) -
上传Logo:
网站简况:
站长Email:
链接位置: - - - -
网站类型: - -
  -   - -
-
-
- - + + + + + 友情链接修改 + + + + + + + + + + + + + +
+ 友情链接管理 >> 链接修改
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
网址: + +
排列位置: + + (由小到大排列) +
网站名称:
网站Logo: + + (88*31 gif或jpg) +
上传Logo:
网站简况:
站长Email:
链接位置: + + + +
网站类型: + +
  +   + +
+
+
+ + \ No newline at end of file diff --git a/src/dede/templets/friendlink_main.htm b/src/admin/templets/friendlink_main.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/friendlink_main.htm rename to src/admin/templets/friendlink_main.htm index b784b950..8a6ac1a2 --- a/src/dede/templets/friendlink_main.htm +++ b/src/admin/templets/friendlink_main.htm @@ -1,131 +1,131 @@ -{dede:config.pagesize value="20"/} - - - - - 友情链接管理 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - - - - - -
-
- 友情链接管理 -
- -
-
- - - - - - - -
关键字: - - - -
-
-
选择网站名称网站Logo站长Email时间状态顺序管理
{dede:field.webname function='dede_htmlspecialchars(@me)'/}
地址:{dede:field.url/}
{dede:field.logo function="GetPic(@me)"/}{dede:field.email/}{dede:field.dtime function="MyDate('Y-m-d',@me)"/}{dede:field.ischeck function="GetSta(@me)"/}{dede:field.sortrank/} - 更改 - 删除 -
-   - 全选 - 取消 - 批量删除 - -
- {dede:pagelist listsize=6/} -
-
- - +{dede:config.pagesize value="20"/} + + + + + 友情链接管理 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+
+ 友情链接管理 +
+ +
+
+ + + + + + + +
关键字: + + + +
+
+
选择网站名称网站Logo站长Email时间状态顺序管理
{dede:field.webname function='dede_htmlspecialchars(@me)'/}
地址:{dede:field.url/}
{dede:field.logo function="GetPic(@me)"/}{dede:field.email/}{dede:field.dtime function="MyDate('Y-m-d',@me)"/}{dede:field.ischeck function="GetSta(@me)"/}{dede:field.sortrank/} + 修改 + 删除 +
+   + 全选 + 取消 + 批量删除 + +
+ {dede:pagelist listsize=6/} +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/friendlink_type.htm b/src/admin/templets/friendlink_type.htm old mode 100755 new mode 100644 similarity index 86% rename from src/dede/templets/friendlink_type.htm rename to src/admin/templets/friendlink_type.htm index d2b2de25..6d48e364 --- a/src/dede/templets/friendlink_type.htm +++ b/src/admin/templets/friendlink_type.htm @@ -1,70 +1,70 @@ - - - - - 网站类型管理 - - - - - - - - - - - - - - - - - SetQuery("Select * From #@__flinktype"); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - - - - -
- 友情链接管理  - 增加链接 - 网站类型管理 - 外部申请表单
类型ID网站名称状态
id; ?> - -
新增一个网站类型:
- -
-
- - + + + + + 网站类型管理 + + + + + + + + + + + + + + + + + SetQuery("Select * From #@__flinktype"); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + + + + +
+ 友情链接管理  + 增加链接 + 网站类型管理 + 外部申请表单
类型ID网站名称状态
id; ?> + +
新增一个网站类型:
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/imagecut.htm b/src/admin/templets/imagecut.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/imagecut.htm rename to src/admin/templets/imagecut.htm index 06dd3798..45a8b0e1 --- a/src/dede/templets/imagecut.htm +++ b/src/admin/templets/imagecut.htm @@ -1,198 +1,198 @@ - - - - -图片裁剪 Image Cropper - - - - - - - - - -
-
- - - - -
- -
-
-
-
- 预览 -
-

-   - -

-
-
- left - top - 宽 - 高 - 改变比例 -
- -
- + + + + +图片裁剪 Image Cropper + + + + + + + + + +
+
+ + + + +
+ +
+
+
+
+ 预览 +
+

+   + +

+
+
+ left + top + 宽 + 高 + 改变比例 +
+ +
+ \ No newline at end of file diff --git a/src/dede/templets/index2.htm b/src/admin/templets/index2.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/index2.htm rename to src/admin/templets/index2.htm index f212f78f..151fb0d8 --- a/src/dede/templets/index2.htm +++ b/src/admin/templets/index2.htm @@ -1,112 +1,112 @@ - - - - - -<?php echo $cfg_webname; ?>后台管理 - - - - - - -
- -
-
- -
-
-
-
-
- -
- -
-
- -
-
-
- -
-
-
- - - 代码托管 - 帮助中心 -
-
-
-
-
-
- -
-
-
- -
-
-
-
    - SetNameSpace('menu','<','>'); - $dtp->LoadTemplet($myIcoFile); - if(is_array($dtp->CTags)) - { - foreach($dtp->CTags as $ctag) - { - $title = $ctag->GetAtt('title'); - $ico = $ctag->GetAtt('ico'); - $link = $ctag->GetAtt('link'); - echo "
  • {$title}
  • \r\n"; - } - } - ?> -
-
- - + + + + + +<?php echo $cfg_webname; ?>后台管理 + + + + + + +
+ +
+
+ +
+
+
+
+
+ +
+ +
+
+ +
+
+
+ +
+
+
+ + + 代码托管 + 帮助中心 +
+
+
+
+
+
+ +
+
+
+ +
+
+
+
    + SetNameSpace('menu','<','>'); + $dtp->LoadTemplet($myIcoFile); + if(is_array($dtp->CTags)) + { + foreach($dtp->CTags as $ctag) + { + $title = $ctag->GetAtt('title'); + $ico = $ctag->GetAtt('ico'); + $link = $ctag->GetAtt('link'); + echo "
  • {$title}
  • \r\n"; + } + } + ?> +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/index_body.htm b/src/admin/templets/index_body.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/index_body.htm rename to src/admin/templets/index_body.htm index f06ea35e..9aa4d658 --- a/src/dede/templets/index_body.htm +++ b/src/admin/templets/index_body.htm @@ -1,366 +1,360 @@ - - - - -系统概况 - - - - - - - - - - - - - - - -
-
欢迎使用国内流行的内容管理系统多端全媒体解决方案 --
-
-
-
-
-
更新消息
-
-
- "; - echo "安全操作:备份还原病毒扫描错误修复
"; - echo ""; - ?> -
-
-
-
-
-
-
版本授权
-
正在载入中...
-
-
-
-
-
快捷操作新增管理
-
- -
-
-
-
-
-
基本信息
-
- - - - - - - - -
- 您的级别: - getUserType()==10) { - echo "总管理员"; - } else if($cuserLogin->getUserType()==5) { - echo "频道总编"; - } else { - echo "信息采集员或其它管理员"; - } - ?> - 查看更多
-
-
-
-
-
-
信息统计
-
-
正在载入中...
-
-
-
-
-
-
最新文档
-
- -2 ORDER BY arc.id DESC LIMIT 0, 5"; - $arcArr = array(); - $dsql->Execute('m', $query); - while($row = $dsql->GetArray('m')) - { - $arcArr[] = $row; - } - ?> - - 1) - { - foreach($arcArr as $row) - { - if(trim($row['editcon'])=='') { - $row['editcon'] = 'archives_edit.php'; - } - $linkstr = "{$row['title']}"; - if($row['arcrank']==-1) $linkstr .= "未审核"; - ?> - - - - - - - - -
暂无新增内容
-
-
-
-
-
- - - + + + + +系统概况 + + + + + + + + + + + + + + + +
+
欢迎使用国内流行的内容管理系统多端全媒体解决方案 --
+
+
+
+
+
更新消息
+
+
+ "; + echo "安全操作:备份还原病毒扫描错误修复
"; + echo ""; + ?> +
+
+
+
+
+
+
版本授权
+
正在载入中...
+
+
+
+
+
快捷操作新增管理
+
+ +
+
+
+
+
+
基本信息
+
+ + + + + + + + +
您的级别: + getUserType()==10) { + echo "总管理员"; + } else if($cuserLogin->getUserType()==5) { + echo "频道总编"; + } else { + echo "信息采集员或其它管理员"; + } + ?> + 查看更多
+
+
+
+
+
+
信息统计
+
+
正在载入中...
+
+
+
+
+
+
最新文档
+
+ -2 ORDER BY arc.id DESC LIMIT 0, 5"; + $arcArr = array(); + $dsql->Execute('m', $query); + while($row = $dsql->GetArray('m')) + { + $arcArr[] = $row; + } + ?> + + 1) + { + foreach($arcArr as $row) + { + if(trim($row['editcon'])=='') { + $row['editcon'] = 'archives_edit.php'; + } + $linkstr = "{$row['title']}"; + if($row['arcrank']==-1) $linkstr .= "未审核"; + ?> + + + + + + + + +
暂无新增内容
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/index_menu2.htm b/src/admin/templets/index_menu2.htm similarity index 89% rename from src/dede/templets/index_menu2.htm rename to src/admin/templets/index_menu2.htm index f391cc5d..5925a94a 100644 --- a/src/dede/templets/index_menu2.htm +++ b/src/admin/templets/index_menu2.htm @@ -11,7 +11,7 @@ echo ""; ?> - - - -
-
核心
-
模块
-
生成
+
运维
+
插件
+
更新
会员
getUserType()>=10){ diff --git a/src/dede/templets/index_top2.htm b/src/admin/templets/index_top2.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/index_top2.htm rename to src/admin/templets/index_top2.htm index a4f5e76d..d4c977ff --- a/src/dede/templets/index_top2.htm +++ b/src/admin/templets/index_top2.htm @@ -1,151 +1,151 @@ - - - - -DedeBIZ - - - - - - - - - - -
DedeBIZ logo -
-
-
缩小左框架
-
显示/隐藏左框架
-
增大左框架
-
- 主菜单 | - 内容发布 | - 系统主页 | - 网站主页 | - 会员中心 | - 注销 -
-
-
-
- 您好:getUserName(); ?> ,欢迎使用DedeBIZV6 -
-
- + + + + +DedeBIZ + + + + + + + + + + +
DedeBIZ logo +
+
+
缩小左框架
+
显示/隐藏左框架
+
增大左框架
+
+ 主菜单 | + 内容发布 | + 系统主页 | + 网站主页 | + 会员中心 | + 注销 +
+
+
+
+ 您好:getUserName(); ?> ,欢迎使用DedeBIZV6 +
+
+ \ No newline at end of file diff --git a/src/dede/templets/log_list.htm b/src/admin/templets/log_list.htm old mode 100755 new mode 100644 similarity index 95% rename from src/dede/templets/log_list.htm rename to src/admin/templets/log_list.htm index ecbe710a..5eb06116 --- a/src/dede/templets/log_list.htm +++ b/src/admin/templets/log_list.htm @@ -1,142 +1,142 @@ - - - - - 采集内容管理 - - - - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - -
管理系统日志: 
-
- - - - - - -
- 管理员: - - IP地址: - - 时间: - -   - -
-
选择管理员访问文件方式访问IP时间Query参数
- - - {dede:field.userid/} - - - - {dede:field.method/} - - {dede:field.cip/} - - {dede:field.dtime function="MyDate('y/m/d H:i:s',@me)" /} - - -
-   -   -   -
- {dede:pagelist listsize='5' /} -
- - + + + + + 采集内容管理 + + + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + +
管理系统日志: 
+
+ + + + + + +
+ 管理员: + + IP地址: + + 时间: + +   + +
+
选择管理员访问文件方式访问IP时间Query参数
+ + + {dede:field.userid/} + + + + {dede:field.method/} + + {dede:field.cip/} + + {dede:field.dtime function="MyDate('y/m/d H:i:s',@me)" /} + + +
+   +   +   +
+ {dede:pagelist listsize='5' /} +
+ + \ No newline at end of file diff --git a/src/dede/templets/login.htm b/src/admin/templets/login.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/login.htm rename to src/admin/templets/login.htm index ce59a3ec..b3af32bd --- a/src/dede/templets/login.htm +++ b/src/admin/templets/login.htm @@ -1,76 +1,75 @@ - - - - - - - - - -<?php echo $cfg_webname; ?>后台登录 - - - -
-
-
-
- -
-
- -
-
-
-
-
- - -
- - - + + + + + + + + + +<?php echo $cfg_webname; ?>后台登录 + + + +
+
+
+
+ +
+
+ +
+
+
+
+
+ + +
+ \ No newline at end of file diff --git a/src/dede/templets/mail_file_manage.htm b/src/admin/templets/mail_file_manage.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/mail_file_manage.htm rename to src/admin/templets/mail_file_manage.htm index 0dd280ef..b11dae6d --- a/src/dede/templets/mail_file_manage.htm +++ b/src/admin/templets/mail_file_manage.htm @@ -1,75 +1,75 @@ - - - - -邮件列表文件管理 - - - - - - - - - - - - - - -read()) !== false) -{ - if($file!="." && $file!=".." && !is_dir("$inpath/$file")) - { - @$filesize = filesize("$inpath/$file"); - @$filesize=$filesize/1024; - @$filetime = filemtime("$inpath/$file"); - @$filetime = MyDate("Y-m-d H:i:s",$filetime); - if($filesize<0.1) - { - @list($ty1,$ty2)=explode(".",$filesize); - $filesize=$ty1.".".substr($ty2,0,2); - } - else - { - @list($ty1,$ty2)=explode(".",$filesize); - $filesize=$ty1.".".substr($ty2,0,1); - } - } - - if(!is_dir("$inpath/$file")) - { - $line = "\n - - - - - "; - $files[] = $line; - } -} -$dh->close(); -foreach ($files as $file) -{ - echo $file; -} -?> - - - -
-
邮件列表管理
-
文件名文件大小创建时间操作
$file$filesize KB$filetime - [删除] -
 
- + + + + +邮件列表文件管理 + + + + + + + + + + + + + + +read()) !== false) +{ + if($file!="." && $file!=".." && !is_dir("$inpath/$file")) + { + @$filesize = filesize("$inpath/$file"); + @$filesize=$filesize/1024; + @$filetime = filemtime("$inpath/$file"); + @$filetime = MyDate("Y-m-d H:i:s",$filetime); + if($filesize<0.1) + { + @list($ty1,$ty2)=explode(".",$filesize); + $filesize=$ty1.".".substr($ty2,0,2); + } + else + { + @list($ty1,$ty2)=explode(".",$filesize); + $filesize=$ty1.".".substr($ty2,0,1); + } + } + + if(!is_dir("$inpath/$file")) + { + $line = "\n + + + + + "; + $files[] = $line; + } +} +$dh->close(); +foreach ($files as $file) +{ + echo $file; +} +?> + + + +
+
邮件列表管理
+
文件名文件大小创建时间操作
$file$filesize KB$filetime + [删除] +
 
+ \ No newline at end of file diff --git a/src/dede/templets/mail_getfile.htm b/src/admin/templets/mail_getfile.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/mail_getfile.htm rename to src/admin/templets/mail_getfile.htm index 120ed898..cda3780a --- a/src/dede/templets/mail_getfile.htm +++ b/src/admin/templets/mail_getfile.htm @@ -1,50 +1,50 @@ - - - - -发送邮件 - - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
发送邮件
-
- - - - - - - - - - - - - - -
条件:开始MID - -- 结束MID(获取全部可以不填写)
保存邮件列表的文件名: -.TXT (只能是英文,字母,下划线组成)
 
-
-
 
- + + + + +发送邮件 + + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
发送邮件
+
+ + + + + + + + + + + + + + +
条件:开始MID + -- 结束MID(获取全部可以不填写)
保存邮件列表的文件名: +.TXT (只能是英文,字母,下划线组成)
 
+
+
 
+ \ No newline at end of file diff --git a/src/dede/templets/mail_send.htm b/src/admin/templets/mail_send.htm old mode 100755 new mode 100644 similarity index 88% rename from src/dede/templets/mail_send.htm rename to src/admin/templets/mail_send.htm index d0053fcf..7a94349e --- a/src/dede/templets/mail_send.htm +++ b/src/admin/templets/mail_send.htm @@ -1,98 +1,98 @@ - - - - -发送邮件 - - - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
发送邮件
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
发送到: - 单人 - 多人 - 邮件群发 -
E-Mail地址: - 填写用户的E-Mail地址
邮件标题: - 标题少于70个字符内
-
-
 
 
-
-
 
- + + + + +发送邮件 + + + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
发送邮件
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
发送到: + 单人 + 多人 + 邮件群发 +
E-Mail地址: + 填写用户的E-Mail地址
邮件标题: + 标题少于70个字符内
+
+
 
 
+
+
 
+ \ No newline at end of file diff --git a/src/dede/templets/mail_title_add.htm b/src/admin/templets/mail_title_add.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/mail_title_add.htm rename to src/admin/templets/mail_title_add.htm index 133f085e..8cf5e2bd --- a/src/dede/templets/mail_title_add.htm +++ b/src/admin/templets/mail_title_add.htm @@ -1,71 +1,71 @@ - - - - -发送邮件 - - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
增加期刊
-
- - - - - - - - - - - - - - - - - - - - - - - - -
期刊号:
订阅分类: - -
邮件标题: - 标题少于70个字符内
- -  
 
-
-
 
- + + + + +发送邮件 + + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
增加期刊
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
期刊号:
订阅分类: + +
邮件标题: + 标题少于70个字符内
+ +  
 
+
+
 
+ \ No newline at end of file diff --git a/src/dede/templets/mail_title_edit.htm b/src/admin/templets/mail_title_edit.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/mail_title_edit.htm rename to src/admin/templets/mail_title_edit.htm index afa0f0ff..29e1cc2e --- a/src/dede/templets/mail_title_edit.htm +++ b/src/admin/templets/mail_title_edit.htm @@ -1,71 +1,71 @@ - - - - -发送邮件 - - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
编辑期刊
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
期刊号:
订阅分类: - -
邮件标题: - 标题少于70个字符内
-
-
 
 
-
-
 
- + + + + +发送邮件 + + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
编辑期刊
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
期刊号:
订阅分类: + +
邮件标题: + 标题少于70个字符内
+
+
 
 
+
+
 
+ \ No newline at end of file diff --git a/src/dede/templets/mail_title_main.htm b/src/admin/templets/mail_title_main.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/mail_title_main.htm rename to src/admin/templets/mail_title_main.htm index 021e2d60..92a6c65b --- a/src/dede/templets/mail_title_main.htm +++ b/src/admin/templets/mail_title_main.htm @@ -1,47 +1,47 @@ - - - - -发送邮件 - - - -
-
-
邮件订阅
-
- - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - -
-
期刊管理
- -
ID期刊号期刊名称所属分类添加时间发送时间编辑人操作
{dede:field.id/}{dede:field.period/}{dede:field.title/}{dede:field.typename/}{dede:field.addtime function='GetDateTimeMk(@me)'/}{dede:field.sendtime function='GetSendTimeMk(@me)'/}{dede:field.writer/}编辑 | 删除
 
- + + + + +发送邮件 + + + +
+
+
邮件订阅
+
+ + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + +
+
期刊管理
+ +
ID期刊号期刊名称所属分类添加时间发送时间编辑人操作
{dede:field.id/}{dede:field.period/}{dede:field.title/}{dede:field.typename/}{dede:field.addtime function='GetDateTimeMk(@me)'/}{dede:field.sendtime function='GetSendTimeMk(@me)'/}{dede:field.writer/}编辑 | 删除
 
+ \ No newline at end of file diff --git a/src/dede/templets/mail_title_send.htm b/src/admin/templets/mail_title_send.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/mail_title_send.htm rename to src/admin/templets/mail_title_send.htm index 86925a9d..a0db6cbc --- a/src/dede/templets/mail_title_send.htm +++ b/src/admin/templets/mail_title_send.htm @@ -1,50 +1,50 @@ - - - - -发送邮件 - - - -
-
-
邮件订阅
-
- - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - - {/dede:datalist} - - - -
-
群发期刊
- -
ID期刊号期刊名称所属分类订阅数添加时间发送时间状态发送次数操作
{dede:field.id/}{dede:field.period/}{dede:field.title/}{dede:field.typename/}{dede:field.typeid function='GetCount(@me)'/}{dede:field.addtime function='GetDateTimeMk(@me)'/}{dede:field.sendtime function='GetSendTimeMk(@me)'/}{dede:field.state function='GetState(@me)'/}{dede:field.count/}开始发送
 
- + + + + +发送邮件 + + + +
+
+
邮件订阅
+
+ + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + + {/dede:datalist} + + + +
+
群发期刊
+ +
ID期刊号期刊名称所属分类订阅数添加时间发送时间状态发送次数操作
{dede:field.id/}{dede:field.period/}{dede:field.title/}{dede:field.typename/}{dede:field.typeid function='GetCount(@me)'/}{dede:field.addtime function='GetDateTimeMk(@me)'/}{dede:field.sendtime function='GetSendTimeMk(@me)'/}{dede:field.state function='GetState(@me)'/}{dede:field.count/}开始发送
 
+ \ No newline at end of file diff --git a/src/dede/templets/mail_type_add.htm b/src/admin/templets/mail_type_add.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/mail_type_add.htm rename to src/admin/templets/mail_type_add.htm index 69c9eb9a..df6ef5a5 --- a/src/dede/templets/mail_type_add.htm +++ b/src/admin/templets/mail_type_add.htm @@ -1,44 +1,44 @@ - - - - -发送邮件 - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
添加分类
-
- - - - - - - - - - - - - - - -
分类名称:
分类描述: 
 
-
-
 
- + + + + +发送邮件 + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
添加分类
+
+ + + + + + + + + + + + + + + +
分类名称:
分类描述: 
 
+
+
 
+ \ No newline at end of file diff --git a/src/dede/templets/mail_type_edit.htm b/src/admin/templets/mail_type_edit.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/mail_type_edit.htm rename to src/admin/templets/mail_type_edit.htm index 2746ab81..c8c99f2c --- a/src/dede/templets/mail_type_edit.htm +++ b/src/admin/templets/mail_type_edit.htm @@ -1,46 +1,46 @@ - - - - -发送邮件 - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
编辑分类
-
- - - - - - - - - - - - - - - - - -
分类名称:
分类描述: 
 
-
-
 
- + + + + +发送邮件 + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
编辑分类
+
+ + + + + + + + + + + + + + + + + +
分类名称:
分类描述: 
 
+
+
 
+ \ No newline at end of file diff --git a/src/dede/templets/mail_type_main.htm b/src/admin/templets/mail_type_main.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/mail_type_main.htm rename to src/admin/templets/mail_type_main.htm index 67442901..fa168bb4 --- a/src/dede/templets/mail_type_main.htm +++ b/src/admin/templets/mail_type_main.htm @@ -1,39 +1,39 @@ - - - - -发送邮件 - - - -
-
-
邮件订阅
-
- - - - - - - - - - - {dede:datalist} - - - - - - - {/dede:datalist} - - - -
-
分类管理
- -
ID分类名称分类描述操作
{dede:field.id/}{dede:field.typename/}{dede:field.description/}编辑 | 删除
 
- + + + + +发送邮件 + + + +
+
+
邮件订阅
+
+ + + + + + + + + + + {dede:datalist} + + + + + + + {/dede:datalist} + + + +
+
分类管理
+ +
ID分类名称分类描述操作
{dede:field.id/}{dede:field.typename/}{dede:field.description/}编辑 | 删除
 
+ \ No newline at end of file diff --git a/src/dede/templets/makehtml_all.htm b/src/admin/templets/makehtml_all.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/templets/makehtml_all.htm rename to src/admin/templets/makehtml_all.htm index 52f0f19e..5806adfb --- a/src/dede/templets/makehtml_all.htm +++ b/src/admin/templets/makehtml_all.htm @@ -1,114 +1,114 @@ - - - - -一键更新 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 一键更新网站:
 更新选项: - - - -
 起始时间:
 进行状态: - - - 增大  - 缩小 - -
-
- -
- + + + + +一键更新 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 一键更新网站:
 更新选项: + + + +
 起始时间:
 进行状态: + + + 增大  + 缩小 + +
+
+ +
+ \ No newline at end of file diff --git a/src/dede/templets/makehtml_archives.htm b/src/admin/templets/makehtml_archives.htm old mode 100755 new mode 100644 similarity index 85% rename from src/dede/templets/makehtml_archives.htm rename to src/admin/templets/makehtml_archives.htm index ab823f12..40600177 --- a/src/dede/templets/makehtml_archives.htm +++ b/src/admin/templets/makehtml_archives.htm @@ -1,96 +1,96 @@ - - - - - 生成HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新文档HTML: - 更新栏目HTML -
-
选择栏目: - GetOptionArray($cid,$admin_catalogs,0); - echo ""; - ?> -
起始ID: - (空或0表示从头开始)
结束ID: - (空或0表示直到结束ID)
每页生成: - 个文件
- -   -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 生成HTML + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新文档HTML: + 更新栏目HTML +
+
选择栏目: + GetOptionArray($cid,$admin_catalogs,0); + echo ""; + ?> +
起始ID: + (空或0表示从头开始)
结束ID: + (空或0表示直到结束ID)
每页生成: + 个文件
+ +   +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/makehtml_freelist.htm b/src/admin/templets/makehtml_freelist.htm old mode 100755 new mode 100644 similarity index 85% rename from src/dede/templets/makehtml_freelist.htm rename to src/admin/templets/makehtml_freelist.htm index cd0dc782..0de68415 --- a/src/dede/templets/makehtml_freelist.htm +++ b/src/admin/templets/makehtml_freelist.htm @@ -1,90 +1,90 @@ - - - - - 生成HTML - - - - - - -
-
-
HTML更新
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新自由列表HTML: -
-
  起始ID: -    - > - (空或0表示从头开始) -
  结束ID: -    - > - (空或0表示直到结束ID) -
  每批生成:    - - 个文件
- -  
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
- -
- - + + + + + 生成HTML + + + + + + +
+
+
HTML更新
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新自由列表HTML: +
+
  起始ID: +    + > + (空或0表示从头开始) +
  结束ID: +    + > + (空或0表示直到结束ID) +
  每批生成:    + + 个文件
+ +  
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/src/dede/templets/makehtml_homepage.htm b/src/admin/templets/makehtml_homepage.htm old mode 100755 new mode 100644 similarity index 57% rename from src/dede/templets/makehtml_homepage.htm rename to src/admin/templets/makehtml_homepage.htm index 4c7245f1..4024d6da --- a/src/dede/templets/makehtml_homepage.htm +++ b/src/admin/templets/makehtml_homepage.htm @@ -1,177 +1,153 @@ - - - - - 主页更新向导 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $data = $client->AdminPWDExists(); - $data = json_decode($data->data); - $rs = (array)($data->result); - - if($rs["admin_pwd_exists"] == "false") {?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
主页更新向导: 
-
选择主页模板: - - -
- 默认的情况下,生成的主页文件放在CMS的安装目录,如果您的CMS不是安装在网站根目录的,又想把主页创建到网站根目录,那么请用相对路径来表示“主页位置”。
- 例:您的CMS安装在 - http://www.abc.com/DedeBIZ/ 目录,您想生成的主页为 http://www.abc.com/index.html,那么主页位置就应该用: - “../index.html”。
主页位置: - -
相关选项: - - -
首页模式: - -
- 首页防篡改(主页位置更改请重新启动DedeBIZ商业组件) -
设置DedeBIZ操作密码: - - 设定后所有的DedeBIZ涉及安全操作输入当前操作密码 -
重复DedeBIZ操作密码: - -
DedeBIZ操作密码: - -
首页状态: - - -
- 尚未开启DedeBIZ商业组件 如何启动组件 -
   - - -   -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 首页更新向导 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $data = $client->AdminPWDExists(); + $data = json_decode($data->data); + $rs = (array)($data->result); + if($rs["admin_pwd_exists"] == "false") { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
首页更新向导: 
+
选择首页模板: + + +
默认的情况下,生成的首页文件放在CMS的安装目录,如果您的CMS不是安装在网站根目录的,又想把首页创建到网站根目录,那么请用相对路径来表示“首页位置”。 +
例:您的CMS安装在 http://www.abc.com/DedeBIZ/ 目录,您想生成的首页为 http://www.abc.com/index.html,那么首页位置就应该用:“../index.html”。
首页位置:
相关选项: + + +
首页模式: + +
首页防篡改(首页位置修改请重新启动商业组件)
设置操作密码:设定后所有的DedeBIZ涉及安全操作输入当前操作密码
重复操作密码: + +
操作密码: + +
首页状态: + + +
尚未开启DedeBIZ商业组件 如何启动组件 +
+ + +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ \ No newline at end of file diff --git a/src/dede/templets/makehtml_js.htm b/src/admin/templets/makehtml_js.htm old mode 100755 new mode 100644 similarity index 86% rename from src/dede/templets/makehtml_js.htm rename to src/admin/templets/makehtml_js.htm index ffaaa62c..94db2971 --- a/src/dede/templets/makehtml_js.htm +++ b/src/admin/templets/makehtml_js.htm @@ -1,111 +1,111 @@ - - - - - 生成HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
获取栏目JS文件:栏目管理 -
-
选择栏目: - GetOptionArray($cid,$admin_catalogs,0,1); - echo ""; - ?> -
JS文件: - - - -
模板文件: - -
更新选项: - - -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 生成HTML + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
获取栏目JS文件:栏目管理 +
+
选择栏目: + GetOptionArray($cid,$admin_catalogs,0,1); + echo ""; + ?> +
JS文件: + + + +
模板文件: + +
更新选项: + + +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/makehtml_list.htm b/src/admin/templets/makehtml_list.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/makehtml_list.htm rename to src/admin/templets/makehtml_list.htm index 214add23..3253c297 --- a/src/dede/templets/makehtml_list.htm +++ b/src/admin/templets/makehtml_list.htm @@ -1,91 +1,91 @@ - - - - - 更新栏目HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新栏目HTML: - 更新文档HTML - 栏目管理 -
-
选择栏目: - GetOptionArray($cid,$admin_catalogs,0,1); - echo ""; - ?> -
每次最大创建页数: - 个文件
是否更新子栏目: - - -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 更新栏目HTML + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新栏目HTML: + 更新文档HTML + 栏目管理 +
+
选择栏目: + GetOptionArray($cid,$admin_catalogs,0,1); + echo ""; + ?> +
每次最大创建页数: + 个文件
是否更新子栏目: + + +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/makehtml_map_guide.htm b/src/admin/templets/makehtml_map_guide.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/makehtml_map_guide.htm rename to src/admin/templets/makehtml_map_guide.htm index a69051d4..fb729368 --- a/src/dede/templets/makehtml_map_guide.htm +++ b/src/admin/templets/makehtml_map_guide.htm @@ -1,69 +1,69 @@ - - - - - 更新网站地图 - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新网站地图:
-
地图类型: - -   - -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 更新网站地图 + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新网站地图:
+
地图类型: + +   + +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/makehtml_rss.htm b/src/admin/templets/makehtml_rss.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/makehtml_rss.htm rename to src/admin/templets/makehtml_rss.htm index 17b2a2c1..7c5ec2ef --- a/src/dede/templets/makehtml_rss.htm +++ b/src/admin/templets/makehtml_rss.htm @@ -1,65 +1,65 @@ - - - - - 更新RSS文件 - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新RSS文件:
-
单个类目最大记录数: - 条 -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 更新RSS文件 + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新RSS文件:
+
单个类目最大记录数: + 条 +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/makehtml_spec.htm b/src/admin/templets/makehtml_spec.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/makehtml_spec.htm rename to src/admin/templets/makehtml_spec.htm index 9a74f4bc..c5d1a86d --- a/src/dede/templets/makehtml_spec.htm +++ b/src/admin/templets/makehtml_spec.htm @@ -1,67 +1,67 @@ - - - - - 生成专题列表HTML - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
生成专题列表HTML: 
-
- 说明:为了安全起见,专题目录建议设置仅可读写权限,发布专题后需要手动更新,默认文件为 -
- -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 生成专题列表HTML + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
生成专题列表HTML: 
+
+ 说明:为了安全起见,专题目录建议设置仅可读写权限,发布专题后需要手动更新,默认文件为 +
+ +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/makehtml_taglist.htm b/src/admin/templets/makehtml_taglist.htm similarity index 89% rename from src/dede/templets/makehtml_taglist.htm rename to src/admin/templets/makehtml_taglist.htm index 747c5a11..570bf0d6 100644 --- a/src/dede/templets/makehtml_taglist.htm +++ b/src/admin/templets/makehtml_taglist.htm @@ -1,5 +1,4 @@ - 更新Tag HTML @@ -13,7 +12,7 @@ class="table maintable table-bordered mt-3">
+ @@ -28,7 +27,7 @@ - - + - - + - - + +
更新Tag HTML 选择Tag: GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); // 取一个平均 + $dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); //取一个平均 $dd['tt'] = ($dd['tt'] > 5)? $dd['tt'] : 0; $sql="select * from #@__tagindex where total > {$dd['tt']} order by tag asc"; $dsql->Execute('al',$sql); @@ -44,14 +43,14 @@
每次最大创建页数:每次最大创建页数: 个文件
说明: + 说明: 仅更新文档数多于的关键词
更新所有Tag将会智能更新在[Tag标签管理]中重新获取更新的内容
Tag首页模板文件://tag.htm
@@ -60,7 +59,7 @@
+ @@ -68,7 +67,7 @@
+ diff --git a/src/dede/templets/makeremote_all.htm b/src/admin/templets/makeremote_all.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/makeremote_all.htm rename to src/admin/templets/makeremote_all.htm index 9f7ce4ca..86cce74e --- a/src/dede/templets/makeremote_all.htm +++ b/src/admin/templets/makeremote_all.htm @@ -1,102 +1,102 @@ - - - - -远程服务器同步 - - - - - - - -
进行状态:
- - - - - - - - - - - - - - - $value) - { - $bgcolor = ($key % 2 == 0)? '#E6F3CD' : '#FFFFFF'; - ?> - - - - - - - - - - - - - - - - - - - - - -
- - - - -
远程服务器同步向导: [更新同步目录]
- 选择项目(站点根目录)项目说明选择服务器状态
[系统]' : '' ;?>
功能说明:本功能主要用于本地服务器文件同远程服务器进行同步,这里我们有几个是系统文件夹(Html生成、文件上传、专题)是必须要同远程服务器同步的,当然也有可选文件夹,用户可以在系统根目录\data\config.file.inc.php文件中进行修改(修改方法已在文件中说明)。
-      -
- - - - -
进行状态: - [增大] [缩小]
- -
- + + + + +远程服务器同步 + + + + + + + + + + + + + + + + + + + + + + + $value) + { + $bgcolor = ($key % 2 == 0)? '#E6F3CD' : '#FFFFFF'; + ?> + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
远程服务器同步向导: [更新同步目录]
+ 选择项目(站点根目录)项目说明选择服务器状态
[系统]' : '' ;?>
功能说明:本功能主要用于本地服务器文件同远程服务器进行同步,这里我们有几个是系统文件夹(Html生成、文件上传、专题)是必须要同远程服务器同步的,当然也有可选文件夹,用户可以在系统根目录\data\config.file.inc.php文件中进行修改(修改方法已在文件中说明)。
+      +
+ + + + +
进行状态: + [增大] [缩小]
+ +
+ \ No newline at end of file diff --git a/src/dede/templets/media_add.htm b/src/admin/templets/media_add.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/media_add.htm rename to src/admin/templets/media_add.htm index 914a1c2a..fd850d12 --- a/src/dede/templets/media_add.htm +++ b/src/admin/templets/media_add.htm @@ -49,7 +49,7 @@ - - - @@ -90,7 +88,7 @@ - - - -
+ @@ -74,7 +74,7 @@ - - @@ -99,7 +99,7 @@ - - +
媒体类型: +
说明标题: +
附加参数:宽: + 宽: (像素) 高: diff --git a/src/dede/templets/media_edit.htm b/src/admin/templets/media_edit.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/media_edit.htm rename to src/admin/templets/media_edit.htm index d53f376a..c46cb797 --- a/src/dede/templets/media_edit.htm +++ b/src/admin/templets/media_edit.htm @@ -1,10 +1,8 @@ - + - - 更改文件 + 修改文件 @@ -38,7 +36,7 @@
更改媒体:修改媒体: 附件/媒体数据管理
@@ -61,7 +59,7 @@
媒体类型: + @@ -78,7 +76,7 @@
说明标题: +
附加参数: + 宽: @@ -132,8 +130,8 @@ if($myrow['mediatype']==1)
- 更改文件: + + 修改文件: diff --git a/src/dede/templets/media_main.htm b/src/admin/templets/media_main.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/media_main.htm rename to src/admin/templets/media_main.htm index 390b8970..417cf9d2 --- a/src/dede/templets/media_main.htm +++ b/src/admin/templets/media_main.htm @@ -1,162 +1,162 @@ - - - - - 附件数据管理 - - - - - - - - -
- - 单击关闭预览 - -
- - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - -
附件数据管理 - 上传新文件 -
-
- - - - - - - - - - - -
 关键字: - - - - - - -
-
选择文件标题文件大小上传会员上传时间文件类型管理
- - - - {dede:field.title/} - - {dede:field.filesize function='GetFileSize(@me)'/}{dede:field.adminname function="UploadAdmin(@me,$fields['membername'])"/}{dede:field.uptime function="MyDate('Y-m-d H:i',@me)"/}{dede:field.mediatype function="MediaType(@me,$fields['url'])"/} - 更改 - 删除 -
-   -   -   -
- {dede:pagelist listsize=5/} -
-
- - + + + + + 附件数据管理 + + + + + + + + +
+ + 单击关闭预览 + +
+ + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + +
附件数据管理 + 上传新文件 +
+
+ + + + + + + + + + + +
 关键字: + + + + + + +
+
选择文件标题文件大小上传会员上传时间文件类型管理
+ + + + {dede:field.title/} + + {dede:field.filesize function='GetFileSize(@me)'/}{dede:field.adminname function="UploadAdmin(@me,$fields['membername'])"/}{dede:field.uptime function="MyDate('Y-m-d H:i',@me)"/}{dede:field.mediatype function="MediaType(@me,$fields['url'])"/} + 修改 + 删除 +
+   +   +   +
+ {dede:pagelist listsize=5/} +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/member_main.htm b/src/admin/templets/member_main.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/member_main.htm rename to src/admin/templets/member_main.htm index 84350245..137ee04f --- a/src/dede/templets/member_main.htm +++ b/src/admin/templets/member_main.htm @@ -1,163 +1,162 @@ -{dede:config.pagesize value="20"/} - - - - - 网站会员管理 - - - - - - - - - - - - - -
-
- - - - - - - - - - -
关键字: 排序: - - - - - - -
-
-
-
- - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - {/dede:datalist} - - - - - - -
- - - - - -
注册会员列表 - 所有会员 | - 被禁言用户 | - 被推荐 | - 普通   -
-
选择mid登录名email/昵称性别会员等级会员属性最后登录操作
{dede:field.mid/} - (禁言)"; - if($fields['spacesta']==-1) echo "(未审核)"; - if(!empty($fields['face'])) { - echo "
浏览会员空间"; - } - ?> -
- {dede:field.email/} -
- 昵称:{dede:field.uname/} -
- {dede:field.sex /} - - {dede:field.rank function="GetMemberName(@me,'限制会员')"/} - - {dede:field.mtype /}用户 {dede:field.matt function="GetMAtt(@me)" /} -
- 金币:{dede:field.money /} 积分:{dede:field.scores /} -
- {dede:field.logintime function="MyDate('y-m-d H:i',@me)" /} -
- 【{dede:field.loginip /}】 -
- 修改 - 删除 - 文档 - 提升 -
-   - - - - (如果已经整合了论坛的用户请不要使用批量删除功能)
- {dede:pagelist listsize='6' /} -
-
- - +{dede:config.pagesize value="20"/} + + + + + 网站会员管理 + + + + + + + + + + + + +
+
+ + + + + + + + + + +
关键字: 排序: + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + {/dede:datalist} + + + + + + +
+ + + + + +
注册会员列表 + 所有会员 | + 被禁言用户 | + 被推荐 | + 普通   +
+
选择mid登录名email/昵称性别会员等级会员属性最后登录操作
{dede:field.mid/} + (禁言)"; + if($fields['spacesta']==-1) echo "(未审核)"; + if(!empty($fields['face'])) { + echo "
浏览会员空间"; + } + ?> +
+ {dede:field.email/} +
+ 昵称:{dede:field.uname/} +
+ {dede:field.sex /} + + {dede:field.rank function="GetMemberName(@me,'限制会员')"/} + + {dede:field.mtype /}用户 {dede:field.matt function="GetMAtt(@me)" /} +
+ 金币:{dede:field.money /} 积分:{dede:field.scores /} +
+ {dede:field.logintime function="MyDate('y-m-d H:i',@me)" /} +
+ 【{dede:field.loginip /}】 +
+ 修改 + 删除 + 文档 + 提升 +
+   + + + + (如果已经整合了论坛的用户请不要使用批量删除功能)
+ {dede:pagelist listsize='6' /} +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/member_operations.htm b/src/admin/templets/member_operations.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/member_operations.htm rename to src/admin/templets/member_operations.htm index d3f71242..b3d96f03 --- a/src/dede/templets/member_operations.htm +++ b/src/admin/templets/member_operations.htm @@ -1,156 +1,156 @@ - - - - - 业务管理 - - - - - - - - - - - -
-
- - - - - - -
输入订单号: - -
-
-
- - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - - -
会员消费管理: - - - - - - -
-
选择订单号产品名称产品类型生成日期金额状态会员
- ' class='np'> - - - - - - - - ({dede:field.mtime function="floorTime(time()-@me,@me)"/}) - - - - - - -
-   - - - - -
- {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} -
- - + + + + + 业务管理 + + + + + + + + + + + +
+
+ + + + + + +
输入订单号: + +
+
+
+ + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + + +
会员消费管理: + + + + + + +
+
选择订单号产品名称产品类型生成日期金额状态会员
+ ' class='np'> + + + + + + + + ({dede:field.mtime function="floorTime(time()-@me,@me)"/}) + + + + + + +
+   + + + + +
+ {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} +
+ + \ No newline at end of file diff --git a/src/dede/templets/member_pm.htm b/src/admin/templets/member_pm.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/member_pm.htm rename to src/admin/templets/member_pm.htm index 35e5e328..c5a9f80e --- a/src/dede/templets/member_pm.htm +++ b/src/admin/templets/member_pm.htm @@ -1,111 +1,111 @@ -{dede:page pagesize="20"/} - - - - - 用户短信管理 - - - - - - - -
-
-
短信管理
-
- - - - -
-
- - - - - - - - - -
 关键字: - -  用户: - - - -
-
-
- - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - -
- - - - - - -
短信列表 群发短信 单独短信
-
发送时间标题已读?{dede:global name='postuser'/}内容文件夹操作
{dede:field.sendtime function='GetDateMk(@me)'/}{dede:field.subject function='dede_htmlspecialchars(@me)'/}
{dede:field.hasview function='IsReader(@me)'/}{dede:field.floginid/}{dede:field.message function='cn_substr(HtmlReplace(@me),60)'/}{dede:field.folder function='GetFolders(@me)'/} - - - - -
删除
-
{dede:pagelist listsize=6/}
- - - +{dede:page pagesize="20"/} + + + + + 用户短信管理 + + + + + + + +
+
+
短信管理
+
+ + + + +
+
+ + + + + + + + + +
 关键字: + +  用户: + + + +
+
+
+ + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + +
+ + + + + + +
短信列表 群发短信 单独短信
+
发送时间标题已读?{dede:global name='postuser'/}内容文件夹操作
{dede:field.sendtime function='GetDateMk(@me)'/}{dede:field.subject function='dede_htmlspecialchars(@me)'/}
{dede:field.hasview function='IsReader(@me)'/}{dede:field.floginid/}{dede:field.message function='cn_substr(HtmlReplace(@me),60)'/}{dede:field.folder function='GetFolders(@me)'/} + + + + +
删除
+
{dede:pagelist listsize=6/}
+ + + \ No newline at end of file diff --git a/src/dede/templets/member_pmall.htm b/src/admin/templets/member_pmall.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/member_pmall.htm rename to src/admin/templets/member_pmall.htm index d164161d..9be57c7a --- a/src/dede/templets/member_pmall.htm +++ b/src/admin/templets/member_pmall.htm @@ -1,76 +1,76 @@ - - - - -用户短信管理 - - - - -
-
-
短信管理
-
- - - - -
-
- - - - - - - - - -
 关键字: -  用户: -
-
-
- - - - - - - - - - -
- 短信列表 群发短信 单独短信 -
-
- - - - - - - - - - - - - - - -
标题: - 标题少于70个字符内
- 1000个字符以内
 
-
-
 
- + + + + +用户短信管理 + + + + +
+
+
短信管理
+
+ + + + +
+
+ + + + + + + + + +
 关键字: +  用户: +
+
+
+ + + + + + + + + + +
+ 短信列表 群发短信 单独短信 +
+
+ + + + + + + + + + + + + + + +
标题: + 标题少于70个字符内
+ 1000个字符以内
 
+
+
 
+ \ No newline at end of file diff --git a/src/dede/templets/member_pmone.htm b/src/admin/templets/member_pmone.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/member_pmone.htm rename to src/admin/templets/member_pmone.htm index bc73965f..9ab7af25 --- a/src/dede/templets/member_pmone.htm +++ b/src/admin/templets/member_pmone.htm @@ -1,81 +1,81 @@ - - - - -用户短信管理 - - - - -
-
-
短信管理
-
- - - - -
-
- - - - - - - - - -
 关键字: -  用户: -
-
-
- - - - - - - - - - -
- 短信列表 群发短信 单独短信 -
-
- - - - - - - - - - - - - - - - - - - -
发送到:" size="28" maxlength="20" style="width:250px;height:16px;margin-top:5px;margin-left:10px;"/> - 填写用户的登录id(网址uid=后面跟的id)
标题: - 标题少于70个字符内
- 1000个字符以内
 
-
-
 
- + + + + +用户短信管理 + + + + +
+
+
短信管理
+
+ + + + +
+
+ + + + + + + + + +
 关键字: +  用户: +
+
+
+ + + + + + + + + + +
+ 短信列表 群发短信 单独短信 +
+
+ + + + + + + + + + + + + + + + + + + +
发送到:" size="28" maxlength="20" style="width:250px;height:16px;margin-top:5px;margin-left:10px;"/> + 填写用户的登录id(网址uid=后面跟的id)
标题: + 标题少于70个字符内
+ 1000个字符以内
 
+
+
 
+ \ No newline at end of file diff --git a/src/dede/templets/member_rank.htm b/src/admin/templets/member_rank.htm old mode 100755 new mode 100644 similarity index 86% rename from src/dede/templets/member_rank.htm rename to src/admin/templets/member_rank.htm index bbf2fda3..07438631 --- a/src/dede/templets/member_rank.htm +++ b/src/admin/templets/member_rank.htm @@ -1,90 +1,90 @@ - - - - - 会员权限管理 - - - - - - -
- - - - - - - - - - - - - - - - - GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
会员管理 > 会员级别设置:
级别名称和级别值:(注册会员这个级别不能删除,否则会员系统将会无法正常使用某些功能)
级别名称会员等级值默认金币默认积分类型状态
- id<=5) { echo "系统"; } - else { echo "用户"; } - ?>id == 3) echo 'disabled="disabled"';?> class="np" value="1" checked='checked' /> - 正在使用
新增一个级别:(由于会员升级是以级别值由低向高升级的,因此增加组别时需注意此值的设置, - 如果您增加新的会员组的级别值低于10,将自动被视为普通的注册会员。)
级别名称 级别值(待审为0,注册会员为10) 默认金币 默认积分 操作设置  
- 增加等级  
 
-
- - + + + + + 会员权限管理 + + + + + + +
+ + + + + + + + + + + + + + + + + GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
会员管理 > 会员级别设置:
级别名称和级别值:(注册会员这个级别不能删除,否则会员系统将会无法正常使用某些功能)
级别名称会员等级值默认金币默认积分类型状态
+ id<=5) { echo "系统"; } + else { echo "用户"; } + ?>id == 3) echo 'disabled="disabled"';?> class="np" value="1" checked='checked' /> + 正在使用
新增一个级别:(由于会员升级是以级别值由低向高升级的,因此增加组别时需注意此值的设置, + 如果您增加新的会员组的级别值低于10,将自动被视为普通的注册会员。)
级别名称 级别值(待审为0,注册会员为10) 默认金币 默认积分 操作设置  
+ 增加等级  
 
+
+ + \ No newline at end of file diff --git a/src/dede/templets/member_scores.htm b/src/admin/templets/member_scores.htm old mode 100755 new mode 100644 similarity index 95% rename from src/dede/templets/member_scores.htm rename to src/admin/templets/member_scores.htm index f7256c41..a06289e1 --- a/src/dede/templets/member_scores.htm +++ b/src/admin/templets/member_scores.htm @@ -1,99 +1,99 @@ - - - - - 会员管理--积分头衔设置 - - - - - - - - -
-
-
积分头衔设置
-
-
- - - - - -
- 会员管理 > 积分头衔设置: -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - 删?积分大于星星数级别头衔是否默认
- - - - - - -
新增: -
- - - - -
- -
-
- - - + + + + + 会员管理--积分头衔设置 + + + + + + + + +
+
+
积分头衔设置
+
+
+ + + + + +
+ 会员管理 > 积分头衔设置: +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + 删?积分大于星星数级别头衔是否默认
+ + + + + + +
新增: +
+ + + + +
+ +
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/member_toadmin.htm b/src/admin/templets/member_toadmin.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/member_toadmin.htm rename to src/admin/templets/member_toadmin.htm index d8520d9a..a71f5304 --- a/src/dede/templets/member_toadmin.htm +++ b/src/admin/templets/member_toadmin.htm @@ -1,127 +1,127 @@ - - - - - 提升为管理员 - - - - - - - - - - - - - - - - - - -
会员管理 >> 提升为管理员
已经是管理员了,不要再提升了"; - }else{ - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
用户名:".$row['userid'].""; - if($row['face']!='') { - echo "
"; - } - ?>
用户笔名: -  (发布文章后显示责任编辑的名字) -
用户密码: -  (留空则不修改,只能用'0-9a-zA-Z.@_-!'以内范围的字符)
用户类型:
负责频道: - (按 Ctrl 可以进行多选)
真实姓名: -  
电子邮箱: -  
安全验证串: - -   - (复制本代码: )
  -    -
- -
- - + + + + + 提升为管理员 + + + + + + + + + + + + + + + + + + +
会员管理 >> 提升为管理员
已经是管理员了,不要再提升了"; + }else{ + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
用户名:".$row['userid'].""; + if($row['face']!='') { + echo "
"; + } + ?>
用户笔名: +  (发布文章后显示责任编辑的名字) +
用户密码: +  (留空则不修改,只能用'0-9a-zA-Z.@_-!'以内范围的字符)
用户类型:
负责频道: + (按 Ctrl 可以进行多选)
真实姓名: +  
电子邮箱: +  
安全验证串: + +   + (复制本代码: )
  +    +
+ +
+ + \ No newline at end of file diff --git a/src/dede/templets/member_type.htm b/src/admin/templets/member_type.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/member_type.htm rename to src/admin/templets/member_type.htm index 734c974e..7b3d03ca --- a/src/dede/templets/member_type.htm +++ b/src/admin/templets/member_type.htm @@ -1,131 +1,131 @@ - - - - - 会员类型管理 - - - - - - - - - - - - - - - - - - - - SetQuery("Select * From #@__member_type"); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
会员产品分类: - - -
-
产品名称会员级别产品价格会员期限(天)状态
- - - - - - (元) - - - - - 保留 -
 新增一个会员产品类型:
- - - - - - (元) - - - - - 新增 -
 
- -
- - + + + + + 会员类型管理 + + + + + + + + + + + + + + + + + + + + SetQuery("Select * From #@__member_type"); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
会员产品分类: + + +
+
产品名称会员级别产品价格会员期限(天)状态
+ + + + + + (元) + + + + + 保留 +
 新增一个会员产品类型:
+ + + + + + (元) + + + + + 新增 +
 
+ +
+ + \ No newline at end of file diff --git a/src/dede/templets/member_view.htm b/src/admin/templets/member_view.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/member_view.htm rename to src/admin/templets/member_view.htm index 443d5fec..11060686 --- a/src/dede/templets/member_view.htm +++ b/src/admin/templets/member_view.htm @@ -1,211 +1,211 @@ - - - - -查看会员 - - - - - - - - - - - - - - - - - -
会员管理 >> 查看会员
- 当前用户是网站管理员关连的帐号,请小心操作"; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0)? $mhasDay : '该会员已经到期';?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
用户名: - ".$row['userid'].""; - if($row['face']!='') { - echo "
"; - } - ?> -
密 码: - - (不修改留空) -
注册时间: - -  IP: - -
最近登录时间: - -  IP: - -
用户类型: - -
电子邮箱: - -
昵 称: - -
性 别: -   - - -
金币 : - - 积分:
等级:SetQuery("Select `rank`,membername From `#@__arcrank` where `rank`>0"); - $dsql->Execute('n'); - $MemberTypes[0] = "限制会员"; - while($nrow = $dsql->GetObject('n')){ - $MemberTypes[$nrow->rank] = $nrow->membername; - } - $options = "\r\n"; - echo $options; - ?>
升级时间: - " id="uptime" name="uptime"> - (如果您要升级会员,必须设置此时间为当前时间)
会员天数: - (如果您要升级会员,会员天数必须大于0)
会员剩余天数:
推荐级别: - - - (0为普通,1为推荐,10为管理员[不能在前台登录] - {非管理员ID是严格使用10属性的,要新建管理在 系统帐号 的地方增加}) -
资料状况: - -
空间信息: - GetOne("Select * From `#@__member_tj` where mid='{$row['mid']}' "); - echo "文章:{$nrow['article']} 图集:{$nrow['album']} 文档:{$nrow['archives']} 收藏:{$nrow['stow']}"; - echo "
空间访问:{$nrow['homecount']} 页面访问:{$nrow['pagecount']} 留言:{$nrow['feedback']} 好友:{$nrow['friend']} "; - ?> -
特殊操作: - &jumpurl=../member/edit_fullinfo.php' target='_blank'>查看/修改详细资料 -  |  - ' target='_blank'>登录到此用户控制面板 -  |  - ' target='_blank'>浏览此用户的空间 -
  - -    - -
-
- + + + + +查看会员 + + + + + + + + + + + + + + + + + +
会员管理 >> 查看会员
+ 当前用户是网站管理员关连的帐号,请小心操作"; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0)? $mhasDay : '该会员已经到期';?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
用户名: + ".$row['userid'].""; + if($row['face']!='') { + echo "
"; + } + ?> +
密 码: + + (不修改留空) +
注册时间: + +  IP: + +
最近登录时间: + +  IP: + +
用户类型: + +
电子邮箱: + +
昵 称: + +
性 别: +   + + +
金币 : + + 积分:
等级:SetQuery("Select rank,membername From `#@__arcrank` where rank>0"); + $dsql->Execute('n'); + $MemberTypes[0] = "限制会员"; + while($nrow = $dsql->GetObject('n')){ + $MemberTypes[$nrow->rank] = $nrow->membername; + } + $options = "\r\n"; + echo $options; + ?>
升级时间: + " id="uptime" name="uptime"> + (如果您要升级会员,必须设置此时间为当前时间)
会员天数: + (如果您要升级会员,会员天数必须大于0)
会员剩余天数:
推荐级别: + + + (0为普通,1为推荐,10为管理员[不能在前台登录] + {非管理员ID是严格使用10属性的,要新建管理在 系统帐号 的地方增加}) +
资料状况: + +
空间信息: + GetOne("Select * From `#@__member_tj` where mid='{$row['mid']}' "); + echo "文章:{$nrow['article']} 图集:{$nrow['album']} 文档:{$nrow['archives']} 收藏:{$nrow['stow']}"; + echo "
空间访问:{$nrow['homecount']} 页面访问:{$nrow['pagecount']} 留言:{$nrow['feedback']} 好友:{$nrow['friend']} "; + ?> +
特殊操作: + &jumpurl=../member/edit_fullinfo.php' target='_blank'>查看/修改详细资料 +  |  + ' target='_blank'>登录到此用户控制面板 +  |  + ' target='_blank'>浏览此用户的空间 +
  + +    + +
+
+ \ No newline at end of file diff --git a/src/dede/templets/module_edit.htm b/src/admin/templets/module_edit.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/module_edit.htm rename to src/admin/templets/module_edit.htm index e3736349..64951ca4 --- a/src/dede/templets/module_edit.htm +++ b/src/admin/templets/module_edit.htm @@ -1,244 +1,244 @@ - - - - - - - - -模块打包 - - - - -
-
-
模块管理
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 模块管理 - > 模块修改: - -
模块名称: - -
开发者ID: - 如何获取开发者ID? -
语言编码: - -
封装类型: - - - - -
模块识别码: - - (不可改) -
发布时间: - -
是否涉及会员系统: - - -
'> - 导航使用名称: - -
-导航使用网址: - -(用相对于会员中心的网址,如:../ask) -
-
后台管理菜单: - -
- (普通插件或模板、补丁类不要填写,模块菜单格式请参考inc/inc_menu_module.php) -
使用说明文件: - - - - - - - -
- 使用协议或说明: -
如果需要带HTML格式,请编译后点击修改时使用HTML -
- -
-
安装程序: - -
-
' id='autosetupinput'> - -
-
' id='autosetupct'> - - - - - - - -
- 请使用MySQL4.0版本格式的SQL语句: -
- MySQL4.1/5.x版本请把创建表语句 ENGINE=MyISAM DEFAULT CHARSET=* ,改为 TYPE=MyISAM ,SQL语句允许换行,但必须用 ";换行" 表示一条SQL语句结束 -
- 如果SQL中包含有模块网址的,用 _ROOTURL_ 表示,如:_ROOTURL_/ask/index.php -
- -
-
- -
删除程序: - -
-
' id='autodelinput'> - -
-
' id='autodelct'> - - - - - - - -
- 卸载时执行的SQL语句: -
- (SQL允许换行,但必须用 ";换行" 表示一条SQL语句结束) -
- -
-
- -
模块文件选项: - - -
文件列表:

每行指定一个文件或目录,路径为相对于本目录,本目录的文件则直接用文件名即可,对于整个打包的目录,不需要指定子目录里的文件。
- 如:
- 如果已经指定了: ../book 则不需要再指定目录里的 ../book/index.php 等文件或目录,系统会自动索引整个目录,
- 对于不需要索引整个目录的,请不要指定这个目录,否则可能会把不必要的文件也放进模块中。
- -

-
开发者私钥: -

- 开发者认证后获取的私钥 -
- -

-
- - - - - -
  - -
- + + + + + + + + +模块打包 + + + + +
+
+
模块管理
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 模块管理 + > 模块修改: + +
模块名称: + +
开发者ID: + 如何获取开发者ID? +
语言编码: + +
封装类型: + + + + +
模块识别码: + + (不可改) +
发布时间: + +
是否涉及会员系统: + + +
'> + 导航使用名称: + +
+导航使用网址: + +(用相对于会员中心的网址,如:../ask) +
+
后台管理菜单: + +
+ (普通插件或模板、补丁类不要填写,模块菜单格式请参考inc/inc_menu_module.php) +
使用说明文件: + + + + + + + +
+ 使用协议或说明: +
如果需要带HTML格式,请编译后点击修改时使用HTML +
+ +
+
安装程序: + +
+
' id='autosetupinput'> + +
+
' id='autosetupct'> + + + + + + + +
+ 请使用MySQL4.0版本格式的SQL语句: +
+ MySQL4.1/5.x版本请把创建表语句 ENGINE=MyISAM DEFAULT CHARSET=* ,改为 TYPE=MyISAM ,SQL语句允许换行,但必须用 ";换行" 表示一条SQL语句结束 +
+ 如果SQL中包含有模块网址的,用 _ROOTURL_ 表示,如:_ROOTURL_/ask/index.php +
+ +
+
+ +
删除程序: + +
+
' id='autodelinput'> + +
+
' id='autodelct'> + + + + + + + +
+ 卸载时执行的SQL语句: +
+ (SQL允许换行,但必须用 ";换行" 表示一条SQL语句结束) +
+ +
+
+ +
模块文件选项: + + +
文件列表:

每行指定一个文件或目录,路径为相对于本目录,本目录的文件则直接用文件名即可,对于整个打包的目录,不需要指定子目录里的文件。
+ 如:
+ 如果已经指定了: ../book 则不需要再指定目录里的 ../book/index.php 等文件或目录,系统会自动索引整个目录,
+ 对于不需要索引整个目录的,请不要指定这个目录,否则可能会把不必要的文件也放进模块中。
+ +

+
开发者私钥: +

+ 开发者认证后获取的私钥 +
+ +

+
+ + + + + +
  + +
+ \ No newline at end of file diff --git a/src/dede/templets/module_help.htm b/src/admin/templets/module_help.htm old mode 100755 new mode 100644 similarity index 94% rename from src/dede/templets/module_help.htm rename to src/admin/templets/module_help.htm index 72909a79..99ebebb8 --- a/src/dede/templets/module_help.htm +++ b/src/admin/templets/module_help.htm @@ -1,104 +1,103 @@ - - - - - - - 模块打包 - - - - - -
-
-
模块管理
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 模块管理 - > DedeBIZ模块开发指南:
- - - - - - - - - - - - - - - - -
目录
1、Dede模块开发介绍
2、如何对我开发的模块进行打包?
3、开发模块安装程序和卸载的注意事项。
4、DedeBIZV6的后台管理程序的开发注意事项。
-
1、Dede模块开发介绍
 
2、如何对我开发的模块进行打包?
 
3、开发模块安装程序和卸载程序的注意事项。
 
4、DedeBIZ的后台管理程序的开发注意事项。
 
 
- - + + + + + + + 模块打包 + + + + +
+
+
模块管理
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 模块管理 + > DedeBIZ模块开发指南:
+ + + + + + + + + + + + + + + + +
目录
1、Dede模块开发介绍
2、如何对我开发的模块进行打包?
3、开发模块安装程序和卸载的注意事项。
4、DedeBIZV6的后台管理程序的开发注意事项。
+
1、Dede模块开发介绍
 
2、如何对我开发的模块进行打包?
 
3、开发模块安装程序和卸载程序的注意事项。
 
4、DedeBIZ的后台管理程序的开发注意事项。
 
 
+ + \ No newline at end of file diff --git a/src/dede/templets/module_main.htm b/src/admin/templets/module_main.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/module_main.htm rename to src/admin/templets/module_main.htm index 26f7aa9b..9ba14426 --- a/src/dede/templets/module_main.htm +++ b/src/admin/templets/module_main.htm @@ -1,110 +1,110 @@ - - - - - 模块管理 - - - - - - - - - -
-
-
模块管理
- -
-
从DedeBIZV6开始,启动了DedeBIZ商业开发者计划,为了保障系统及技术服务安全,请认准DedeBIZ商业认证开发者。
- - - - - - - - - - - - - - - 0) - foreach($modules as $k=>$v) - { - ?> - - - - - - - - - - - - - -
-
模块管理 > 模块列表:
-
- 全部 | - 模块 | - 模板 | - 小插件 | - 补丁 -
-
模块名称发布时间编码类型模块状态管理
- ".$v['lang'].""; - else echo $v['lang']; - ?> - - 卸载"; - } else { - echo "未安装 安装"; - } - } else { - echo "
未下载 下载
"; - } - ?> -
-
' - > - '>开发者信息 -
- - -
-
-
 
- + + + + + 模块管理 + + + + + + + + + +
+
+
模块管理
+ +
+
从DedeBIZV6开始,启动了DedeBIZ商业开发者计划,为了保障系统及技术服务安全,请认准DedeBIZ商业认证开发者。
+ + + + + + + + + + + + + + + 0) + foreach($modules as $k=>$v) + { + ?> + + + + + + + + + + + + + +
+
模块管理 > 模块列表:
+
+ 全部 | + 模块 | + 模板 | + 小插件 | + 补丁 +
+
模块名称发布时间编码类型模块状态管理
+ ".$v['lang'].""; + else echo $v['lang']; + ?> + + 卸载"; + } else { + echo "未安装 安装"; + } + } else { + echo "
未下载 下载
"; + } + ?> +
+
' + > + '>开发者信息 +
+ + +
+
+
 
+ \ No newline at end of file diff --git a/src/dede/templets/module_make.htm b/src/admin/templets/module_make.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/module_make.htm rename to src/admin/templets/module_make.htm index 0caa4d30..a7154633 --- a/src/dede/templets/module_make.htm +++ b/src/admin/templets/module_make.htm @@ -1,251 +1,251 @@ - - - - - - - - - 模块打包 - - - - - -
-
-
模块管理
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
模块管理 - > 模块打包:
模块名称: -
语言编码: - - (不同编码模块可以使用,但不能在此打包) - -
封装类型: - - - - -
开发者ID: - 如何获取开发者ID? -
发布时间: -
是否涉及会员系统: - - - - -
后台管理菜单: - -
- (普通插件或模板、补丁类不要填写,模块菜单格式请参考inc/inc_menu_module.php) -
使用说明文件: - -
-
- -
- -
安装程序: - -
-
- -
- - -
删除程序: - -
-
- -
- - -
文件列表: -

- 每行指定一个文件或目录,路径为相对于本目录,本目录的文件则直接用文件名即可,对于整个打包的目录,不需要指定子目录里的文件。
- 如:如果已经指定了: ../book 则不需要再指定目录里的 ../book/index.php 等文件或目录,系统会自动索引整个目录,
- 对于不需要索引整个目录的,请不要指定这个目录,否则可能会把不必要的文件也放进模块中。
- -

-
开发者私钥: -

- 开发者认证后获取的私钥 -
- -

-
- - - - - - - -
  - - - -
-
- - + + + + + + + + + 模块打包 + + + + + +
+
+
模块管理
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块管理 + > 模块打包:
模块名称: +
语言编码: + + (不同编码模块可以使用,但不能在此打包) + +
封装类型: + + + + +
开发者ID: + 如何获取开发者ID? +
发布时间: +
是否涉及会员系统: + + + + +
后台管理菜单: + +
+ (普通插件或模板、补丁类不要填写,模块菜单格式请参考inc/inc_menu_module.php) +
使用说明文件: + +
+
+ +
+ +
安装程序: + +
+
+ +
+ + +
删除程序: + +
+
+ +
+ + +
文件列表: +

+ 每行指定一个文件或目录,路径为相对于本目录,本目录的文件则直接用文件名即可,对于整个打包的目录,不需要指定子目录里的文件。
+ 如:如果已经指定了: ../book 则不需要再指定目录里的 ../book/index.php 等文件或目录,系统会自动索引整个目录,
+ 对于不需要索引整个目录的,请不要指定这个目录,否则可能会把不必要的文件也放进模块中。
+ +

+
开发者私钥: +

+ 开发者认证后获取的私钥 +
+ +

+
+ + + + + + + +
  + + + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/module_upload.htm b/src/admin/templets/module_upload.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/module_upload.htm rename to src/admin/templets/module_upload.htm index 4f4f2a1c..831442a7 --- a/src/dede/templets/module_upload.htm +++ b/src/admin/templets/module_upload.htm @@ -1,54 +1,54 @@ - - - - -模块打包 - - - -
-
-
模块管理
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
模块管理 - > 模块打包:
插件名称 -
作者
主程序文件
目标框架
文件列表文件用","分开,路径相对于管理目录(当前目录)
-
- - - - - -
 
- + + + + +模块打包 + + + +
+
+
模块管理
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块管理 + > 模块打包:
插件名称 +
作者
主程序文件
目标框架
文件列表文件用","分开,路径相对于管理目录(当前目录)
+
+ + + + + +
 
+ \ No newline at end of file diff --git a/src/dede/templets/mychannel_add.htm b/src/admin/templets/mychannel_add.htm old mode 100755 new mode 100644 similarity index 95% rename from src/dede/templets/mychannel_add.htm rename to src/admin/templets/mychannel_add.htm index a5d20b14..9843d9d6 --- a/src/dede/templets/mychannel_add.htm +++ b/src/admin/templets/mychannel_add.htm @@ -1,291 +1,291 @@ - - - - - 新增频道 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 内容模型管理 - > 新增内容模型: -
- 频道ID
- 数字,创建后不可更改,并具有唯一性。 -
- * -
- 名字标识
- 与文档的模板相关连,建议由英文、数字或下划线组成,因为部份Unix系统无法识别中文文件,频道默认文档模板是 - “default/article_名字标识.htm”,列表模板、封面模板类推。 -
- * -
- 频道名称
- 频道的中文名称,在后台管理,前台发布等均使用此名字。 -
- * -
- 附加表
- 频道除主表以外其它自定义类型数据存放数据的表,如果您不使用主表关连的各种特性(推荐、会员权限等),也可以使用完全以附加表作为存储数据。 -
- - 必须由英文、数字、下划线组成 * - -
- 模型性质
- 如果为系统模型将禁止删除,此选项不可更改,对于独立模型,系统强制创建字段aid,typeid,senddate,title, mid, - channel,独立模型的文档内容必须点击栏目进入列表才能管理。
- - - -
- 是否支持会员投稿 - - - -
- 会员许可投稿级别 - - -
- 许可投稿会员组 - - SetQuery("Select * from `#@__member_model`"); - $dsql->Execute(); - while($row3 = $dsql->GetObject()) - { - echo "\r\n"; - } - ?> - -
- 会员稿件默认状态 - - - -
- 投稿标题使用名称 - -
- 投稿是否使用摘要
- 如果不使用主表(独立模型),缩略图设置同。
- - -
- 投稿是否使用缩图 - - - -
- 默认栏目ID
- 与投稿是唯一性结合可以用模型设计自定义表单 -
-
- 投稿具有唯一性
- 如果投稿是唯一的(会员只能在这个模型对应的栏目中发布单篇文档),其作用相当于自定义表单 -
- - -
- 档案发布程序 - - - * -
- 档案修改程序 - - - * -
- 档案管理程序 - - - * -
- 前台会员发布程序 - - -
- 前台会员修改程序 - - -
- 前台会员管理程序 - - -
- - - - - - -
  - - - -
-
- - + + + + + 新增频道 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 内容模型管理 + > 新增内容模型: +
+ 频道ID
+ 数字,创建后不可修改,并具有唯一性。 +
+ * +
+ 名字标识
+ 与文档的模板相关连,建议由英文、数字或下划线组成,因为部份Unix系统无法识别中文文件,频道默认文档模板是 + “default/article_名字标识.htm”,列表模板、封面模板类推。 +
+ * +
+ 频道名称
+ 频道的中文名称,在后台管理,前台发布等均使用此名字。 +
+ * +
+ 附加表
+ 频道除主表以外其它自定义类型数据存放数据的表,如果您不使用主表关连的各种特性(推荐、会员权限等),也可以使用完全以附加表作为存储数据。 +
+ + 必须由英文、数字、下划线组成 * + +
+ 模型性质
+ 如果为系统模型将禁止删除,此选项不可修改,对于独立模型,系统强制创建字段aid,typeid,senddate,title, mid, + channel,独立模型的文档内容必须点击栏目进入列表才能管理。
+ + + +
+ 是否支持会员投稿 + + + +
+ 会员许可投稿级别 + + +
+ 许可投稿会员组 + + SetQuery("Select * from `#@__member_model`"); + $dsql->Execute(); + while($row3 = $dsql->GetObject()) + { + echo "\r\n"; + } + ?> + +
+ 会员稿件默认状态 + + + +
+ 投稿标题使用名称 + +
+ 投稿是否使用摘要
+ 如果不使用主表(独立模型),缩略图设置同。
+ + +
+ 投稿是否使用缩图 + + + +
+ 默认栏目ID
+ 与投稿是唯一性结合可以用模型设计自定义表单 +
+
+ 投稿具有唯一性
+ 如果投稿是唯一的(会员只能在这个模型对应的栏目中发布单篇文档),其作用相当于自定义表单 +
+ + +
+ 档案发布程序 + + + * +
+ 档案修改程序 + + + * +
+ 档案管理程序 + + + * +
+ 前台会员发布程序 + + +
+ 前台会员修改程序 + + +
+ 前台会员管理程序 + + +
+ + + + + + +
  + + + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/mychannel_edit.htm b/src/admin/templets/mychannel_edit.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/mychannel_edit.htm rename to src/admin/templets/mychannel_edit.htm index 0f4bf40e..e2424ffd --- a/src/dede/templets/mychannel_edit.htm +++ b/src/admin/templets/mychannel_edit.htm @@ -1,422 +1,422 @@ - - - - - 更改内容模型 - - - - - - - -
- - - '> - - - - -
- 内容模型管理 - > 更改内容模型: -
- - - - - -
- - - - - -
 基本设置 字段管理 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 您目前所展开的是系统模型,系统模型一般对发布程序和管理程序已经固化,如果您胡乱更改系统模型将会导致使用这种内容类型的频道可能崩溃。
模型性质
- 如果为系统模型将禁止删除,此选项不可更改,对于独立模型,系统强制创建字段aid、栏目ID、发布时间、文档标题。
- -
频道ID
- 数字,创建后不可更改,并具有唯一性。
-
名字标识
- 与文档的模板相关连,建议由英文、数字或下划线组成,因为部份Unix系统无法识别中文文件,频道默认文档模板是 - “default/article_名字标识.htm”,列表模板、封面模板类推。
-
频道名称
- 频道的中文名称,在后台管理,前台发布等均使用此名字。
附加表
- 频道除主表以外其它自定义类型数据存放数据的表,如果您不使用主表关连的各种特性(推荐、会员权限等),也可以使用完全以附加表作为存储数据。 -
- ( #@__ 是表示数据表前缀)
是否支持会员投稿 - -
会员许可投稿级别 -
许可投稿会员组 - SetQuery("Select * from `#@__member_model`"); - $dsql->Execute(); - while($row3 = $dsql->GetObject()) - { - echo " \r\n"; - } - ?> -
会员稿件默认状态 - - -
档案发布程序
档案修改程序
档案管理程序
前台会员发布程序
前台会员修改程序
前台会员管理程序
列表附加字段
- 用","分开,可以在列表模板{dede:list}{/dede:list}中用[field:name /]调用
-
投稿标题使用名称 -
- 投稿是否使用摘要 -
- 如果不使用主表(独立模型),缩略图设置同。 -
- -
投稿是否使用缩图 - -
默认栏目ID
- 与投稿是唯一性结合可以用模型设计自定义表单
-
投稿具有唯一性
- 如果投稿是唯一的(会员只能在这个模型对应的栏目中发布单篇文档),其作用相当于自定义表单
- -
- - - - - - - - - - - - - - - - - - -
- - - - - - -
 
-
-
- ShowItem2();"; -} -?> - - + + + + + 修改内容模型 + + + + + + + +
+ + + '> + + + + +
+ 内容模型管理 + > 修改内容模型: +
+ + + + + +
+ + + + + +
 基本设置 字段管理 
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 您目前所展开的是系统模型,系统模型一般对发布程序和管理程序已经固化,如果您胡乱修改系统模型将会导致使用这种内容类型的频道可能崩溃。
模型性质
+ 如果为系统模型将禁止删除,此选项不可修改,对于独立模型,系统强制创建字段aid、栏目ID、发布时间、文档标题。
+ +
频道ID
+ 数字,创建后不可修改,并具有唯一性。
+
名字标识
+ 与文档的模板相关连,建议由英文、数字或下划线组成,因为部份Unix系统无法识别中文文件,频道默认文档模板是 + “default/article_名字标识.htm”,列表模板、封面模板类推。
+
频道名称
+ 频道的中文名称,在后台管理,前台发布等均使用此名字。
附加表
+ 频道除主表以外其它自定义类型数据存放数据的表,如果您不使用主表关连的各种特性(推荐、会员权限等),也可以使用完全以附加表作为存储数据。 +
+ ( #@__ 是表示数据表前缀)
是否支持会员投稿 + +
会员许可投稿级别 +
许可投稿会员组 + SetQuery("Select * from `#@__member_model`"); + $dsql->Execute(); + while($row3 = $dsql->GetObject()) + { + echo " \r\n"; + } + ?> +
会员稿件默认状态 + + +
档案发布程序
档案修改程序
档案管理程序
前台会员发布程序
前台会员修改程序
前台会员管理程序
列表附加字段
+ 用","分开,可以在列表模板{dede:list}{/dede:list}中用[field:name /]调用
+
投稿标题使用名称 +
+ 投稿是否使用摘要 +
+ 如果不使用主表(独立模型),缩略图设置同。 +
+ +
投稿是否使用缩图 + +
默认栏目ID
+ 与投稿是唯一性结合可以用模型设计自定义表单
+
投稿具有唯一性
+ 如果投稿是唯一的(会员只能在这个模型对应的栏目中发布单篇文档),其作用相当于自定义表单
+ +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + +
 
+
+
+ ShowItem2();"; +} +?> + + \ No newline at end of file diff --git a/src/dede/templets/mychannel_field_add.htm b/src/admin/templets/mychannel_field_add.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/mychannel_field_add.htm rename to src/admin/templets/mychannel_field_add.htm index 753d2fe0..510ef2dd --- a/src/dede/templets/mychannel_field_add.htm +++ b/src/admin/templets/mychannel_field_add.htm @@ -1,284 +1,284 @@ - - - - -增加字段 - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- 频道管理 >> 增加新字段: - - - -
-
- -
表单提示文字:
- 发布内容时显示的提示文字
- - *
字段名称:
- - 只能用英文字母或数字,数据表的真实字段名,如果数据类型是联动类型,该项应该填写联动类型的[组名称]。 - -
- - * -
字段类型: - - -
- 前台参数: - -
- -
- 内容是否需要分页符:
- 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段! -
- - -   - -
- 数据类型: - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
默认值:
- - 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”)。 - -
- -
最大长度:
- - 文本数据必须填写,大于255为text类型 - -
- -
自定义表单HTML: - ◆自定义表单HTML模板中用~name~表示提示文字,~form~表示表单元素。 -
- -
- - - - - - -
  - - - -
-
-
- + + + + +增加字段 + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ 频道管理 >> 增加新字段: + + + +
+
+ +
表单提示文字:
+ 发布内容时显示的提示文字
+ + *
字段名称:
+ + 只能用英文字母或数字,数据表的真实字段名,如果数据类型是联动类型,该项应该填写联动类型的[组名称]。 + +
+ + * +
字段类型: + + +
+ 前台参数: + +
+ +
+ 内容是否需要分页符:
+ 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段! +
+ + +   + +
+ 数据类型: + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
默认值:
+ + 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”)。 + +
+ +
最大长度:
+ + 文本数据必须填写,大于255为text类型 + +
+ +
自定义表单HTML: + 自定义表单HTML模板中用~name~表示提示文字,~form~表示表单元素。 +
+ +
+ + + + + + +
  + + + +
+
+
+ \ No newline at end of file diff --git a/src/dede/templets/mychannel_field_edit.htm b/src/admin/templets/mychannel_field_edit.htm old mode 100755 new mode 100644 similarity index 95% rename from src/dede/templets/mychannel_field_edit.htm rename to src/admin/templets/mychannel_field_edit.htm index 18a70a09..2b1589fd --- a/src/dede/templets/mychannel_field_edit.htm +++ b/src/admin/templets/mychannel_field_edit.htm @@ -1,279 +1,279 @@ - - - - - 更改字段 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- 频道管理 >> 查看/修改字段: - - - -
-
- 您当前操作的字段属于系统模型字段:修改系统模型有风险,请不要随便改动系统模型的字段相关的属性。
表单提示文字:
- 发布内容时显示的提示文字
- - *(发布内容时显示的项名字)
字段名称:
- 只能用英文字母或数字,数据表的真实字段名
-
字段类型: - -
前台参数: - -
-
数据类型: -
内容模型:
- - 选择关联内容对应的内容模型 - -
- - -
内容是否需要分页符:
- 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!
- -   -
默认值:
- - 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称。
最大长度:
- 文本数据必须填写,大于255为text类型
-
自定义表单HTML: - ◆自定义表单HTML用~name~表示提示文字,~form~表示表单元素

- - - - - - -
  - -
-
- - + + + + + 修改字段 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ 频道管理 >> 查看/修改字段: + + + +
+
+ 您当前操作的字段属于系统模型字段:修改系统模型有风险,请不要随便改动系统模型的字段相关的属性。
表单提示文字:
+ 发布内容时显示的提示文字
+ + *(发布内容时显示的项名字)
字段名称:
+ 只能用英文字母或数字,数据表的真实字段名
+
字段类型: + +
前台参数: + +
+
数据类型: +
内容模型:
+ + 选择关联内容对应的内容模型 + +
+ + +
内容是否需要分页符:
+ 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!
+ +   +
默认值:
+ + 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称。
最大长度:
+ 文本数据必须填写,大于255为text类型
+
自定义表单HTML: + 自定义表单HTML用~name~表示提示文字,~form~表示表单元素

+ + + + + + +
  + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/mychannel_main.htm b/src/admin/templets/mychannel_main.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/mychannel_main.htm rename to src/admin/templets/mychannel_main.htm index 5fe2a7b4..3833c3c2 --- a/src/dede/templets/mychannel_main.htm +++ b/src/admin/templets/mychannel_main.htm @@ -1,87 +1,87 @@ -{dede:config name='pagesize' value='30' /} - - - - - 内容模型管理 - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - -
- - - - - -
内容模型管理 - 增加新模型 - 导入模型 - 联动类别管理 -
-
id号频道名称识别id附加表状态模型管理
{dede:field.id /} - {dede:field.typename /} - {dede:field.nid /}{dede:field.addtable function="str_replace('#@__',$cfg_dbprefix,@me)" /}{dede:field.isshow function="GetSta(@me,$fields['id'])" /}{dede:field.issystem function='IsSystem(@me)'/} - 复制 - 模板 - 导出 - 更改 - 自定义搜索 - 删除 -
- {dede:pagelist listsize="5"/} -
- 图标说明: - 复制 复制 - 模板 模板 - 导出 导出 - 更改 修改 - 自定义搜索 自定义搜索 - 删除 删除 -
-
- - +{dede:config name='pagesize' value='30' /} + + + + + 内容模型管理 + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + +
+ + + + + +
内容模型管理 + 增加新模型 + 导入模型 + 联动类别管理 +
+
id号频道名称识别id附加表状态模型管理
{dede:field.id /} + {dede:field.typename /} + {dede:field.nid /}{dede:field.addtable function="str_replace('#@__',$cfg_dbprefix,@me)" /}{dede:field.isshow function="GetSta(@me,$fields['id'])" /}{dede:field.issystem function='IsSystem(@me)'/} + 复制 + 模板 + 导出 + 修改 + 自定义搜索 + 删除 +
+ {dede:pagelist listsize="5"/} +
+ 图标说明: + 复制 复制 + 模板 模板 + 导出 导出 + 修改 修改 + 自定义搜索 自定义搜索 + 删除 删除 +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/mychannel_modifysearch.htm b/src/admin/templets/mychannel_modifysearch.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/mychannel_modifysearch.htm rename to src/admin/templets/mychannel_modifysearch.htm index d1837e9f..4433a374 --- a/src/dede/templets/mychannel_modifysearch.htm +++ b/src/admin/templets/mychannel_modifysearch.htm @@ -1,132 +1,132 @@ - - - - - 修改频道 - - - - - - - - - -
-
-
自定义搜索管理
-
- - - - '> - '> - - - - - - - - - - - - - - = 0) { - ?> - - - - - - - - - - - - - - - - - - - - - - - -
- - 内容模型管理 > 自定义搜索管理: - (自定义搜索在方便搜索的同时在一定程度上降低了效率,请根据需求定义搜索) -
频道ID:
- -
频道名称:
- -
主表可供自定义搜索的字段
- 标题、关键字、摘要为默认选项,不用选择
- -
附件表可供自定义搜索的字段:
- 这里的字段是程序依据字段类型自动选择生成的。
- -
自定义搜索结果页模板
-
- -
- - - - - - -
  - - - -
-
- - - - - -
  进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 修改频道 + + + + + + + + + +
+
+
自定义搜索管理
+
+ + + + '> + '> + + + + + + + + + + + + + + = 0) { + ?> + + + + + + + + + + + + + + + + + + + + + + + +
+ + 内容模型管理 > 自定义搜索管理: + (自定义搜索在方便搜索的同时在一定程度上降低了效率,请根据需求定义搜索) +
频道ID:
+ +
频道名称:
+ +
主表可供自定义搜索的字段
+ 标题、关键字、摘要为默认选项,不用选择
+ +
附件表可供自定义搜索的字段:
+ 这里的字段是程序依据字段类型自动选择生成的。
+ +
自定义搜索结果页模板
+
+ +
+ + + + + + +
  + + + +
+
+ + + + + +
  进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/mynews_add.htm b/src/admin/templets/mynews_add.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/mynews_add.htm rename to src/admin/templets/mynews_add.htm index 9224e0b4..4d1a4d5f --- a/src/dede/templets/mynews_add.htm +++ b/src/admin/templets/mynews_add.htm @@ -1,98 +1,98 @@ - - - - -站内新闻发布 - - - - - - - - - - - - - - -
- - - - - -
 站内新闻管理->增加消息 返回管理页 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  说明:站内新闻是为了方便站长发布站点公告而设置的一种小功能,由于要读取包括text字段的信息,应定期删除太旧的信息,否则可能会让模板解析速度变慢。如果没有选择显示频道,则在这个频道中使用这个标记时会被“所有位置...”的标记内容代替。
  站内新闻调用代码: {dede:mynews row='条数' titlelen='标题长度'}Innertext{/dede:mynews},Innertext支持的字段为:[field:title - /],[field:writer /],[field:senddate /](时间),[field:body /]。
标 题: -
显示频道: - -
发言人: - -
日期: -
信息内容: - -
  - -
 
-
- + + + + +站内新闻发布 + + + + + + + + + + + + + + +
+ + + + + +
 站内新闻管理->增加消息 返回管理页 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  说明:站内新闻是为了方便站长发布站点公告而设置的一种小功能,由于要读取包括text字段的信息,应定期删除太旧的信息,否则可能会让模板解析速度变慢。如果没有选择显示频道,则在这个频道中使用这个标记时会被“所有位置...”的标记内容代替。
  站内新闻调用代码: {dede:mynews row='条数' titlelen='标题长度'}Innertext{/dede:mynews},Innertext支持的字段为:[field:title + /],[field:writer /],[field:senddate /](时间),[field:body /]。
标 题: +
显示频道: + +
发言人: + +
日期: +
信息内容: + +
  + +
 
+
+ \ No newline at end of file diff --git a/src/dede/templets/mynews_edit.htm b/src/admin/templets/mynews_edit.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/mynews_edit.htm rename to src/admin/templets/mynews_edit.htm index 7fc7a8c5..73b2fec3 --- a/src/dede/templets/mynews_edit.htm +++ b/src/admin/templets/mynews_edit.htm @@ -1,95 +1,95 @@ - - - - -站内新闻发布 - - - - - - - - - - - - - - - -
- - - - - -
 站内新闻管理->增加消息 返回管理页 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  说明:站内新闻是为了方便站长发布站点公告而设置的一种小功能,由于要读取包括text字段的信息,应定期删除太旧的信息,否则可能会让模板解析速度变慢。如果没有选择显示频道,则在这个频道中使用这个标记时会被“所有位置...”的标记内容代替。
  站内新闻调用代码: {dede:mynews row='条数' titlelen='标题长度'}Innertext{/dede:mynews},Innertext支持的字段为:[field:title - /],[field:writer /],[field:senddate /](时间),[field:body /]。
标 题: -
显示频道: - -
发言人:
日期:
信息内容: - -
   
 
-
- + + + + +站内新闻发布 + + + + + + + + + + + + + + + +
+ + + + + +
 站内新闻管理->增加消息 返回管理页 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  说明:站内新闻是为了方便站长发布站点公告而设置的一种小功能,由于要读取包括text字段的信息,应定期删除太旧的信息,否则可能会让模板解析速度变慢。如果没有选择显示频道,则在这个频道中使用这个标记时会被“所有位置...”的标记内容代替。
  站内新闻调用代码: {dede:mynews row='条数' titlelen='标题长度'}Innertext{/dede:mynews},Innertext支持的字段为:[field:title + /],[field:writer /],[field:senddate /](时间),[field:body /]。
标 题: +
显示频道: + +
发言人:
日期:
信息内容: + +
   
 
+
+ \ No newline at end of file diff --git a/src/dede/templets/mynews_main.htm b/src/admin/templets/mynews_main.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/mynews_main.htm rename to src/admin/templets/mynews_main.htm index a933fc98..4622ddf3 --- a/src/dede/templets/mynews_main.htm +++ b/src/admin/templets/mynews_main.htm @@ -1,51 +1,51 @@ -{dede:config.pagesize value="20"/} - - - - -站内新闻管理 - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - {/dede:datalist} - - - -
- - - - - -
 站内新闻管理 - [新增一则站内新闻] -
-
新闻ID新闻标题所属频道更新时间发布人操作
{dede:field.aid/}{dede:field.title /}{dede:field.typename /}{dede:field.senddate function="GetDateMk(@me)" /}{dede:field.writer /} - [修改] - [删除] -
- {dede:pagelist listsize=6/} -
- +{dede:config.pagesize value="20"/} + + + + +站内新闻管理 + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + {/dede:datalist} + + + +
+ + + + + +
 站内新闻管理 + [新增一则站内新闻] +
+
新闻ID新闻标题所属频道更新时间发布人操作
{dede:field.aid/}{dede:field.title /}{dede:field.typename /}{dede:field.senddate function="GetDateMk(@me)" /}{dede:field.writer /} + [修改] + [删除] +
+ {dede:pagelist listsize=6/} +
+ \ No newline at end of file diff --git a/src/dede/templets/mytag_add.htm b/src/admin/templets/mytag_add.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/mytag_add.htm rename to src/admin/templets/mytag_add.htm index 426a9f4a..35357b37 --- a/src/dede/templets/mytag_add.htm +++ b/src/admin/templets/mytag_add.htm @@ -29,7 +29,7 @@ "linkedCalendars": false, "timePicker": true, "timePicker24Hour": true, - // "timePickerSeconds": true, + //"timePickerSeconds": true, "showCustomRangeLabel": false, ranges: { '今日': [moment(), moment()], @@ -68,7 +68,7 @@
自定义标记的调用方法:
+
自定义标记的调用方法:
{dede:mytag name='标记名称' ismake='是否含板块代码(yes 或 no)' typeid='栏目ID'/}
1、name 标记名称,该项是必须的属性,以下 2、3是可选属性;
@@ -76,7 +76,7 @@ 3、typeid 表示所属栏目的ID,默认为 0 ,表示所有栏目通用的显示内容,在列表和文档模板中,typeid默认是这个列表或文档本身的栏目ID。
所属栏目:所属栏目:
标记名称:标记名称:
时间限制:时间限制: @@ -102,13 +102,13 @@
开始时间:开始时间:
结束时间:结束时间:
- + - + - + - + - + - + @@ -65,7 +65,7 @@ - +
自定义标记管理>>更改标记自定义标记管理>>修改标记
@@ -18,7 +18,7 @@
所属栏目:所属栏目:
标记名称:标记名称:
时间限制:时间限制: > 永不过期 > 在设内时间内有效
开始时间:开始时间:
结束时间:结束时间:
 
diff --git a/src/dede/templets/mytag_main.htm b/src/admin/templets/mytag_main.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/mytag_main.htm rename to src/admin/templets/mytag_main.htm index 1a59f91d..99ea593f --- a/src/dede/templets/mytag_main.htm +++ b/src/admin/templets/mytag_main.htm @@ -12,13 +12,13 @@ - - + @@ -27,7 +27,7 @@ {dede:datalist} - @@ -35,7 +35,7 @@ diff --git a/src/dede/templets/mytag_tag_guide.htm b/src/admin/templets/mytag_tag_guide.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/mytag_tag_guide.htm rename to src/admin/templets/mytag_tag_guide.htm index ba5e6e95..1a86f107 --- a/src/dede/templets/mytag_tag_guide.htm +++ b/src/admin/templets/mytag_tag_guide.htm @@ -1,236 +1,236 @@ - - - - - 智能标记向导 - - - - - - - - - - - - -
- - -
+ 自定义标记管理  增加一个标记  智能标记向导
编号 标记名称 所属栏目管理
{dede:field.aid /} {dede:field.tagname /}{dede:field.timeset function='TimeSetValue(@me)'/} {dede:field.endtime function='GetDateMk(@me)'/} - 更改 | + 修改 | 删除 | JS调用
- - - - - - -
[field:imglink/]
[field:textlink/]
- - - - - - - - - - - - - - - - - - -
自定义标记管理 >> 智能标记生成向导:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
列表样式:
- - - - - - - -
- - - -
-
调用栏目: - GetOptionArray(0,$admin_catalogs,0,1); - echo ""; - ?>
限定频道: - \r\n"; - echo "\r\n"; - $tl->dsql->SetQuery("Select id,typename From #@__channeltype where id>0"); - $tl->dsql->Execute(); - while($row = $tl->dsql->GetObject()) - { - echo "\r\n"; - } - echo ""; - ?> - 附加属性: - \r\n"; - echo "\r\n"; - $tl->dsql->SetQuery("Select * From #@__arcatt"); - $tl->dsql->Execute(); - while($row = $tl->dsql->GetObject()) - { - echo "\r\n"; - } - echo ""; - ?>
调用记录条数: - -  显示列数: - -  标题长度: - - (1 字节 = 0.5个中文字)
高级筛选: - - -  关键字: - - (","逗号分开)
排列顺序: - -   - -
文档发布时间: - - 天以内 (0 表示不限)
提取特定文档:    - -
单条记录样式(InnerText):
-
- - 支持字段:id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl, -
- stime(pubdate 的"0000-00-00"格式),textlink,typelink,imglink,image - 普通字段直接用[field:字段名/]表示。
- ·Pubdate发布时间的调用参数 [field:pubdate function=MyDate('Y-m-d H:i:s',@me)/]
-
- -   -
-
输出结果:
-
- -
-
- - - - + + + + + 智能标记向导 + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
自定义标记管理 >> 智能标记生成向导:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表样式:
+ + + + + + + +
+ + + +
+
调用栏目: + GetOptionArray(0,$admin_catalogs,0,1); + echo ""; + ?>
限定频道: + \r\n"; + echo "\r\n"; + $tl->dsql->SetQuery("Select id,typename From #@__channeltype where id>0"); + $tl->dsql->Execute(); + while($row = $tl->dsql->GetObject()) + { + echo "\r\n"; + } + echo ""; + ?> + 附加属性: + \r\n"; + echo "\r\n"; + $tl->dsql->SetQuery("Select * From #@__arcatt"); + $tl->dsql->Execute(); + while($row = $tl->dsql->GetObject()) + { + echo "\r\n"; + } + echo ""; + ?>
调用记录条数: + +  显示列数: + +  标题长度: + + (1 字节 = 0.5个中文字)
高级筛选: + + +  关键字: + + (","逗号分开)
排列顺序: + +   + +
文档发布时间: + + 天以内 (0 表示不限)
提取特定文档:    + +
单条记录样式(InnerText):
+
+ + 支持字段:id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl, +
+ stime(pubdate 的"0000-00-00"格式),textlink,typelink,imglink,image + 普通字段直接用[field:字段名/]表示。
+ ·Pubdate发布时间的调用参数 [field:pubdate function=MyDate('Y-m-d H:i:s',@me)/]
+
+ +   +
+
输出结果:
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/mytag_tag_guide_ok.htm b/src/admin/templets/mytag_tag_guide_ok.htm old mode 100755 new mode 100644 similarity index 100% rename from src/dede/templets/mytag_tag_guide_ok.htm rename to src/admin/templets/mytag_tag_guide_ok.htm diff --git a/src/dede/templets/pic_view.htm b/src/admin/templets/pic_view.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/pic_view.htm rename to src/admin/templets/pic_view.htm index 6acfe948..f1aadba4 --- a/src/dede/templets/pic_view.htm +++ b/src/admin/templets/pic_view.htm @@ -1,58 +1,58 @@ - - - - -图片浏览器 - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - -
 
- - - - - -
- - + + + + +图片浏览器 + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + +
 
+ + + + + +
+ + diff --git a/src/dede/templets/plus_edit.htm b/src/admin/templets/plus_edit.htm old mode 100755 new mode 100644 similarity index 88% rename from src/dede/templets/plus_edit.htm rename to src/admin/templets/plus_edit.htm index 084b80c1..67da9a85 --- a/src/dede/templets/plus_edit.htm +++ b/src/admin/templets/plus_edit.htm @@ -1,61 +1,61 @@ - - - - -修改插件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
插件管理 - > 修改插件:
插件名称 - '> -
作者 - -
菜单配置 - -
文件列表文件用","分开,路径相对于管理目录(当前目录)
-
- - - - - - -
 
-
- + + + + +修改插件 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
插件管理 + > 修改插件:
插件名称 + '> +
作者 + +
菜单配置 + +
文件列表文件用","分开,路径相对于管理目录(当前目录)
+
+ + + + + + +
 
+
+ \ No newline at end of file diff --git a/src/dede/templets/plus_main.htm b/src/admin/templets/plus_main.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/plus_main.htm rename to src/admin/templets/plus_main.htm index 6fc75dc6..2d7f6eed --- a/src/dede/templets/plus_main.htm +++ b/src/admin/templets/plus_main.htm @@ -1,52 +1,52 @@ -{dede:config.pagesize value="50"/} - - - - - 插件管理 - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - {/dede:datalist} - - - -
- - - - - -
插件管理 - [安装新插件] -
-
ID号插件名称插件作者管理
{dede:field.aid /}{dede:field.plusname /}{dede:field.writer /}{dede:field.isshow function="GetSta(@me,$fields['aid'],$fields['plusname'])"/}
- {dede:pagelist listsize=6/} -
-
- - +{dede:config.pagesize value="50"/} + + + + + 插件管理 + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + {/dede:datalist} + + + +
+ + + + + +
插件管理 + [安装新插件] +
+
ID号插件名称插件作者管理
{dede:field.aid /}{dede:field.plusname /}{dede:field.writer /}{dede:field.isshow function="GetSta(@me,$fields['aid'],$fields['plusname'])"/}
+ {dede:pagelist listsize=6/} +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/public_guide.htm b/src/admin/templets/public_guide.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/public_guide.htm rename to src/admin/templets/public_guide.htm index 24278e0e..ed2a8029 --- a/src/dede/templets/public_guide.htm +++ b/src/admin/templets/public_guide.htm @@ -1,117 +1,117 @@ - - - - -内容发布向导 - - - - - - - - - - - - - - -
 内容发布向导:
- - - - -
- - - - -
内容发布说明:
- 1、必须先建立与频道内容模型关连的栏目才能发布内容(栏目管理);
- 2、如果您设置了某频道为默认发布表单,以后将不再显示此向导,而是直接显示您所选的频道的发布表单,如果想要发布其它频道的内容,可以从左边的目录树中选择,如果以后您想要修改默认发布表单,请点击目录树上方的“发布向导”图标;
- - - - - - - - - - GetArray()){ - $i++; - $row['mancon'] = ($row['mancon']=='' ? 'content_list.php?channelid='.$row['id'] : $row['mancon'].'?channelid='.$row['id']); - $checkbox = ($row['isdefault']==0 ? '' : ' checked'); - if($checkbox!=''){ - echo "\r\n"; - } - $catnum = GetCatalogs($dsql,$row['id']); - ?> - - - - - - - - - -
选择频道ID频道内容模型附加表栏目数操作选项
/> - 管理栏目 - 0){ - ?> - 管理内容 - 发布内容 - - | - 管理内容 - | - 发布内容 - -
- - - - -
- -    - -
-
 
- - + + + + +内容发布向导 + + + + + + + + + + + + + + +
 内容发布向导:
+ + + + +
+ + + + +
内容发布说明:
+ 1、必须先建立与频道内容模型关连的栏目才能发布内容(栏目管理);
+ 2、如果您设置了某频道为默认发布表单,以后将不再显示此向导,而是直接显示您所选的频道的发布表单,如果想要发布其它频道的内容,可以从左边的目录树中选择,如果以后您想要修改默认发布表单,请点击目录树上方的“发布向导”图标;
+ + + + + + + + + + GetArray()){ + $i++; + $row['mancon'] = ($row['mancon']=='' ? 'content_list.php?channelid='.$row['id'] : $row['mancon'].'?channelid='.$row['id']); + $checkbox = ($row['isdefault']==0 ? '' : ' checked'); + if($checkbox!=''){ + echo "\r\n"; + } + $catnum = GetCatalogs($dsql,$row['id']); + ?> + + + + + + + + + +
选择频道ID频道内容模型附加表栏目数操作选项
/> + 管理栏目 + 0){ + ?> + 管理内容 + 发布内容 + + | + 管理内容 + | + 发布内容 + +
+ + + + +
+ +    + +
+
 
+ + diff --git a/src/dede/templets/recycling.htm b/src/admin/templets/recycling.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/recycling.htm rename to src/admin/templets/recycling.htm index 99c78900..1180d96c --- a/src/dede/templets/recycling.htm +++ b/src/admin/templets/recycling.htm @@ -1,120 +1,118 @@ - - - - - - 文档管理 - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - - -
- 文档回收站   -
ID选择文章标题更新时间类目点击操作
{dede:field.id/} - {dede:field.title/} - {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typename/}{dede:field.click/}还原 | 删除
-   - 全选 - 取消 -  还原  -  删除 
- {dede:pagelist listsize=3/}
- - + + + + + 文档管理 + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ 文档回收站   +
ID选择文章标题更新时间类目点击操作
{dede:field.id/} + {dede:field.title/} + {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typename/}{dede:field.click/}还原 | 删除
+   + 全选 + 取消 +  还原  +  删除 
+ {dede:pagelist listsize=3/}
+ + \ No newline at end of file diff --git a/src/dede/templets/search_keywords_main.htm b/src/admin/templets/search_keywords_main.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/templets/search_keywords_main.htm rename to src/admin/templets/search_keywords_main.htm index f5d5e752..4e30ff06 --- a/src/dede/templets/search_keywords_main.htm +++ b/src/admin/templets/search_keywords_main.htm @@ -1,136 +1,136 @@ - - - - -搜索关键字管理 - - - - - - - - - - - - -
- - - - - -
搜索关键词维护
- - - - - - - -
- - -
-
- + + + + +搜索关键字管理 + + + + + + + + + + + + +
+ + + + + +
搜索关键词维护
+ + + + + + + +
+ + +
+
+ \ No newline at end of file diff --git a/src/dede/templets/shops_delivery.htm b/src/admin/templets/shops_delivery.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/shops_delivery.htm rename to src/admin/templets/shops_delivery.htm index a0412f76..08c6d0bb --- a/src/dede/templets/shops_delivery.htm +++ b/src/admin/templets/shops_delivery.htm @@ -1,121 +1,121 @@ - - - - - 配送方式配置 - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - -
- 增加一个配送方式 -
-   名称: - -  *此处填写配送方式名称
-   手续费: - - - 元 -  *发货时所用的手续费,若要收取,请填写(精确到小数位两位) -
-   简要说明: - - -  最多100个文字内,简要说明一下。 -
- - - - - -
- - - -
-
-
-
- - - - - - - - - - - -
-  已有配送方式列表 -
- - - - - - - - -
- - - - 手续费: - - 元 -
-
-
- -
-
-
- - + + + + + 配送方式配置 + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+ 增加一个配送方式 +
+   名称: + +  *此处填写配送方式名称
+   手续费: + + + 元 +  *发货时所用的手续费,若要收取,请填写(精确到小数位两位) +
+   简要说明: + + +  最多100个文字内,简要说明一下。 +
+ + + + + +
+ + + +
+
+
+
+ + + + + + + + + + + +
+  已有配送方式列表 +
+ + + + + + + + +
+ + + + 手续费: + + 元 +
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/src/dede/templets/shops_operations.htm b/src/admin/templets/shops_operations.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/shops_operations.htm rename to src/admin/templets/shops_operations.htm index 1ef76bfe..43c69210 --- a/src/dede/templets/shops_operations.htm +++ b/src/admin/templets/shops_operations.htm @@ -1,181 +1,181 @@ - - - - - 订单管理 - - - - - - - - - - - -
-
- - - - - - -
输入订单号: - -
-
-
- - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - - -
订单列表: - - - - - - - -
-
选择订单号收货人数量生成日期订单价配送费总计支付方式状态用户
- ' class='np'> - - - - - - 详情 - - - ({dede:field.stime function="floorTime(time()-@me,@me)"/}) - - - - - - - - - - - - -
  - - - - - -
- {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} -
- - + + + + + 订单管理 + + + + + + + + + + + +
+
+ + + + + + +
输入订单号: + +
+
+
+ + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + + +
订单列表: + + + + + + + +
+
选择订单号收货人数量生成日期订单价配送费总计支付方式状态用户
+ ' class='np'> + + + + + + 详情 + + + ({dede:field.stime function="floorTime(time()-@me,@me)"/}) + + + + + + + + + + + + +
  + + + + + +
+ {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} +
+ + \ No newline at end of file diff --git a/src/admin/templets/shops_operations_cart.htm b/src/admin/templets/shops_operations_cart.htm new file mode 100644 index 00000000..634a6640 --- /dev/null +++ b/src/admin/templets/shops_operations_cart.htm @@ -0,0 +1,85 @@ + + + + +<?php echo $oid;?> + + + + + + + + +{dede:datalist} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{/dede:datalist} + + + +
订单信息
订单号: {dede:field.oid/}
商品名称: {dede:field.title/}
单价(元/单位): {dede:field.uprice/}
数量: {dede:field.cartcount/}
支付方式: 
配送: {dede:field.dname/} 费用:{dede:field.dprice/}元
购买时间: {dede:field.stime function=GetDateTimeMk(@me)/}
收货人: 
地址: 
邮编: 
联系电话: 
邮箱: 
留言: 
合计(元): {dede:field.priceCount/}元
+
+ +
+ +
+ 订单总计: {dede:field.priceCount/}元, {dede:pagelist listsize=3/} +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/shops_operations_userinfo.htm b/src/admin/templets/shops_operations_userinfo.htm old mode 100755 new mode 100644 similarity index 53% rename from src/dede/templets/shops_operations_userinfo.htm rename to src/admin/templets/shops_operations_userinfo.htm index 60bdcb89..1f504e5e --- a/src/dede/templets/shops_operations_userinfo.htm +++ b/src/admin/templets/shops_operations_userinfo.htm @@ -1,45 +1,45 @@ - - - - -<?php echo $rows['oid'];?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
订单号: 
配送: 方式: 费用:
收货人: 
地址: 
邮编: 
电话: 
E-Mail: 
留言: 
- - + + + + +<?php echo $rows['oid'];?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
订单号: 
配送: 方式: 费用:
收货人: 
地址: 
邮编: 
电话: 
E-Mail: 
留言: 
+ + \ No newline at end of file diff --git a/src/dede/templets/soft_add.htm b/src/admin/templets/soft_add.htm old mode 100755 new mode 100644 similarity index 61% rename from src/dede/templets/soft_add.htm rename to src/admin/templets/soft_add.htm index b39b7da7..24f6d21b --- a/src/dede/templets/soft_add.htm +++ b/src/admin/templets/soft_add.htm @@ -1,653 +1,590 @@ - - - - - 增加软件集 - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
 软件列表>>发布新软件 -   栏目管理 - 下载频道参数设定 
- - - - - - -
- - - - - -
 常规信息 高级参数
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 软件名称:  简略标题:
-
- - - - - -
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') - echo " "; - else - echo " "; - } - ?>
-
- - - - - - - -
 Tag标签: - - (','号分开,单个标签小于12字节)权重:(越小越靠前)
-
- - - - - - -
 缩 略 图: - - - - -
- - - - - - 选择图片 - - - -
-
- -
-
- - - - - - - - -
 软件来源: - 软件作者: 
-
- - - - - -
 软件主栏目: - - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -   - 选择副栏目"; - } - ?> -
-
- - - - - - - -
 文件类型: - 软件等级:
-
- - - - - - - - - -
 软件类型: - 界面语言: 授权方式: -
-
- - - - - -
 运行环境: - -
-
- - - - - - - -
 官方网址: - 演示地址: -
-
- - - - - -
 软件大小: - -
-
 下载限制:
- - - - - - - - - - -
 需会员权限: - 需消费金币: -
  (如果设定了下载限制,软件频道设置中“附件下载方式:”必须选择“链接到跳转页面”)
-
 本地软件选择:
- - - - - -
 本地地址: - - - 服务器名称: - -
-
 预设的镜像服务器:
- (服务器地址 + 软件地址 = 软件真实地址 [软件频道设置])
- - : - - + - - - -
- startNum = $startNum;\r\n"; - ?> -
 手动指定地址:
- - - - - -
其它地址: - - -   - - (最多为30个链接) -
- -
 软件详细介绍:
- - - - - -
 附加选项: - - - 设置 -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
  - - - - - -
-
-
-
- - - + + + + + 增加软件集 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
 软件列表 >> 发布软件栏目管理下载频道参数设定
+ + + + +
+ + + + + +
常规信息高级参数
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 软件名称: 简略标题:
+
+ + + + + +
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') + echo " "; + else + echo " "; + } + ?>
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + +
+
+
+ + + + + + + + +
 软件来源:软件作者:
+
+ + + + + +
 软件主栏目: + + getUserChannel(),$channelid); + echo ""; + ?> + + 快捷选择 + 选择副栏目"; + } + ?> +
+
+ + + + + + + +
 文件类型: + + 软件等级: +
+
+ + + + + + + + + +
 软件类型: + + 界面语言: 授权方式: + +
+
+ + + + + +
 运行环境:
+
+ + + + + + + +
 官方网址:演示地址:
+
+ + + + + +
 软件大小: + + + +
+
 下载限制:
+ + + + + + + + + + +
 需会员权限: + + 需消费金币: 个
(如果设定了下载限制,软件频道设置 中“附件下载方式:”必须选择“链接到跳转页面”)
+
 本地软件选择:
+ + + + + +
 本地地址: + + + 服务器名称: + +
+
 预设的镜像服务器:
(服务器地址 + 软件地址 = 软件真实地址)
+ + : + + + + + + +
+ startNum = $startNum;\r\n"; + ?> +
 手动指定地址:
+ + + + + +
 其它地址: + + +   + (最多为30个链接) +
+ +
 软件详细介绍:
+ + + + + +
 附加选项: + + 设置 +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/soft_config.htm b/src/admin/templets/soft_config.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/soft_config.htm rename to src/admin/templets/soft_config.htm index b2069f65..13642344 --- a/src/dede/templets/soft_config.htm +++ b/src/admin/templets/soft_config.htm @@ -1,160 +1,160 @@ - - - - - 软件频道设置 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
软件频道设置: 
-
链接显示方式: - - -
附件下载方式: - - -
是否启用镜像站点: - -
启用镜像站点后是否保留本地下载: - -
镜像处理方式: - - -
不管是全局,还是具体某软件设置了下面的参数,附件下载方式都必须链接到中转页,否则无效 -
下载默认等级: - -
下载默认金币: - -
参数限制方式: - - -
- 镜像服务器列表:
服务器网址: - - 服务器名称: - - 服务器类型: - - -
下载说明:
-      - -
- - + + + + + 软件频道设置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
软件频道设置: 
+
链接显示方式: + + +
附件下载方式: + + +
是否启用镜像站点: + +
启用镜像站点后是否保留本地下载: + +
镜像处理方式: + + +
不管是全局,还是具体某软件设置了下面的参数,附件下载方式都必须链接到中转页,否则无效 +
下载默认等级: + +
下载默认金币: + +
参数限制方式: + + +
+ 镜像服务器列表:
服务器网址: + + 服务器名称: + + 服务器类型: + + +
下载说明:
+      + +
+ + \ No newline at end of file diff --git a/src/dede/templets/soft_edit.htm b/src/admin/templets/soft_edit.htm old mode 100755 new mode 100644 similarity index 55% rename from src/dede/templets/soft_edit.htm rename to src/admin/templets/soft_edit.htm index fddd76a3..840df937 --- a/src/dede/templets/soft_edit.htm +++ b/src/admin/templets/soft_edit.htm @@ -1,602 +1,524 @@ - - - - - 编辑软件 - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
 &dopost=listArchives">&dopost=listArchives">软件列表>>更改软件 -   栏目管理 
- - - - -
- - - - - -
 常规参数 高级参数 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 文章标题:  简略标题:
-
- - - - - -
 自定义属性: - SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; - else $jumpclick = ''; - if(preg_match("#".$trow->att."#",$arcRow['flag'])) - echo " "; - else - echo " "; - } - ?>
-
- - - - - -
 跳转网址: - " />
-
- - - - - - - -
 Tag标签: - (','号分开,单个标签小于12字节) 权重: - (越小越靠前)
-
- - - - - - -
-  缩 略 图: - - "> - - - - 选择图片 - - - - - " - style="height: 80px"> -
-
- - - - - - - - -
 软件来源: "> 软件作者:">  
-
- - - - - -
 文章主栏目: - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -
-
- - - - - -
 软件副栏目: - - ' style='width:200px;' /> - 选择副栏目
-
- - - - - - - -
 文件类型: - 软件等级:
-
- - - - - - - - - -
 软件类型: - 界面语言: 授权方式: -
-
- - - - - - - -
 运行环境: - -  软件大小: - " /> -
-
- - - - - - - -
 官方网址: - " - style='width:200px' /> - 程序演示: - " - style='width:200px' /> -
-
 下载限制:
- - - - - - - - - - -
 需会员权限: - - 需消费金币: - 个 -
  (如果设定了下载限制,软件频道设置中“附件下载方式:”必须选择“链接到跳转页面”)
-
 软件链接列表:
- - - - - -
 其它地址: - - -   - - (最多为30个链接) -
-
- - -
 软件详细介绍:
- - - - - -
 附加选项: - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
  - - - - - -
- - - -
-
-
-
- - - - + + + + + 修改软件 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
 &dopost=listArchives">软件列表 >> 修改软件  栏目管理
+ + + + +
+ + + + + +
常规参数高级参数
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 文章标题:  简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; + else $jumpclick = ''; + if(preg_match("#".$trow->att."#",$arcRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + +
 跳转网址:
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + 上传图片 + + + + +
+
+ + + + + + + + +
 软件来源: 软件作者:
+
+ + + + + +
 文章主栏目: + getUserChannel(),$channelid); + echo ""; + ?> + 快捷选择 +
+
+ + + + + +
 软件副栏目: + + ' style='width:200px;' /> + 选择副栏目
+
+ + + + + + + +
 文件类型: + 软件等级: +
+
+ + + + + + + + + +
 软件类型: + + 界面语言: 授权方式: + +
+
+ + + + + + + +
 运行环境: 软件大小:" />
+
+ + + + + + + +
 官方网址:程序演示:
+
 下载限制:
+ + + + + + + + + + +
 需会员权限: + + 需消费金币: 个
(如果设定了下载限制,软件频道设置 中“附件下载方式:”必须选择“链接到跳转页面”)
+
 软件链接列表:
+ + + + + +
 其它地址: + + +   + (最多为30个链接) +
+
+ + +
 软件详细介绍:
+ + + + + +
 附加选项: + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/spec_add.htm b/src/admin/templets/spec_add.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/spec_add.htm rename to src/admin/templets/spec_add.htm index 82dd00ac..167736bd --- a/src/dede/templets/spec_add.htm +++ b/src/admin/templets/spec_add.htm @@ -1,460 +1,460 @@ - - - - - 专题发布向导 - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
 专题列表 - >> 发布专题 更新HTML 
- - - - -
- - - - - -
 常规参数 专题文档 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 专题名称: 简略标题:
-
- - - - - -
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att!='j') - { - echo " "; - } - } - ?>
-
- - - - - - -
 缩 略 图: - - - - -
- - - - - 选择图片 - - - -
-
-
- - - - - - - -
 责任编辑:发布选项: - -
-
- - - - - - - - -
 内容排序:标题颜色:
-
- - - - - -
 主分类:getUserChannel(), 0); - echo ""; - ?> - 快捷选择 -
-
- - - - - - -
 关键字: /> - 自动获取,手动填写用","分开
-
-
- - - - - - -
 专题简介: 
-
- - - - - -
 发布时间:"; - ?> -
-
- - - - - - - - -
-  评论选项: - - - -   - 浏览次数:' - style='width:100px;' />
-
- - - - - -
 专题模板: -
-
- - - - - -
 自定义文件名: - (不包括后缀名如.html等)
-
- - - - - - - - - - - - -
- - - - - -
  - - - - - -
-
-
-
- - - + + + + + 专题发布向导 + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
 专题列表 + >> 发布专题 更新HTML 
+ + + + +
+ + + + + +
 常规参数 专题文档 
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 专题名称: 简略标题:
+
+ + + + + +
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att!='j') + { + echo " "; + } + } + ?>
+
+ + + + + + +
 缩略图: + + + + +
+ + + + + 选择图片 + + + +
+
+
+ + + + + + + +
 责任编辑:发布选项: + +
+
+ + + + + + + + +
 内容排序:标题颜色:
+
+ + + + + +
 主分类:getUserChannel(), 0); + echo ""; + ?> + 快捷选择 +
+
+ + + + + + +
 关键字: /> + 自动获取,手动填写用","分开
+
+
+ + + + + + +
 专题简介: 
+
+ + + + + +
 发布时间:"; + ?> +
+
+ + + + + + + + +
+  评论选项: + + + +   + 浏览次数:' + style='width:100px;' />
+
+ + + + + +
 专题模板: +
+
+ + + + + +
 自定义文件名: + (不包括后缀名如.html等)
+
+ + + + + + + + + + + + +
+ + + + + +
  + + + + + +
+
+
+
+ + + \ No newline at end of file diff --git a/src/dede/templets/spec_edit.htm b/src/admin/templets/spec_edit.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/spec_edit.htm rename to src/admin/templets/spec_edit.htm index fec4e697..5843c257 --- a/src/dede/templets/spec_edit.htm +++ b/src/admin/templets/spec_edit.htm @@ -1,586 +1,586 @@ - - - - - 更改专题 - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
 专题列表 - >> 修改专题更新HTML 
- - - - -
- - - - - -
 常规参数 专题文档 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 专题名称: - -  简略标题: - -
-
- - - - - -
 自定义属性: - SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') continue; - if(preg_match("#".$trow->att."#", $arcRow['flag'])) - echo " "; - else - echo " "; - } - ?> -
-
- - - - - - -
-  缩 略 图: - - "> - - - - 选择图片 - - - - - " - style="height: 80px"> -
-
- - - - - -
 专题模板: - " /> - -
-
- - - - - - - -
 责任编辑: - " /> - 发布选项: - -
-
- - - - - - - - -
 内容排序: - 标题颜色: - " /> - - -
-
- - - - - - -
 主 分 类: - getUserChannel(),0); - echo ""; - ?> - 快捷选择 -  
-
- - - - - -
 关键字: " /> -
-
- - - - - -
 专题说明: -
-
- - - - - - - -
 评论选项: - -   - - 浏览次数: - ' style='width:100px;' /> -
-
- - - - - -
 发布时间: - "; - ?> -
-
- - - - - - -
 更新时间: - - "; - ?> -  
-
- - - - - - -
 自定义文件名: - " />(不包括后缀名如.html等) -  
-
- -
- - - - - - - - - - - - -
- - - - - -
  - - - - - -
-
-
- -
- - + + + + + 修改专题 + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
 专题列表 + >> 修改专题更新HTML 
+ + + + +
+ + + + + +
 常规参数 专题文档 
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 专题名称: + +  简略标题: + +
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') continue; + if(preg_match("#".$trow->att."#", $arcRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + + +
+  缩略图: + + "> + + + + 选择图片 + + + + + " + style="height: 80px"> +
+
+ + + + + +
 专题模板: + " /> + +
+
+ + + + + + + +
 责任编辑: + " /> + 发布选项: + +
+
+ + + + + + + + +
 内容排序: + 标题颜色: + " /> + + +
+
+ + + + + + +
 主 分 类: + getUserChannel(),0); + echo ""; + ?> + 快捷选择 +  
+
+ + + + + +
 关键字: " /> +
+
+ + + + + +
 专题说明: +
+
+ + + + + + + +
 评论选项: + +   + + 浏览次数: + ' style='width:100px;' /> +
+
+ + + + + +
 发布时间: + "; + ?> +
+
+ + + + + + +
 更新时间: + + "; + ?> +  
+
+ + + + + + +
 自定义文件名: + " />(不包括后缀名如.html等) +  
+
+ +
+ + + + + + + + + + + + +
+ + + + + +
  + + + + + +
+
+
+ +
+ + \ No newline at end of file diff --git a/src/dede/templets/stepselect_main.htm b/src/admin/templets/stepselect_main.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/stepselect_main.htm rename to src/admin/templets/stepselect_main.htm index f6338156..e086f694 --- a/src/dede/templets/stepselect_main.htm +++ b/src/admin/templets/stepselect_main.htm @@ -1,427 +1,425 @@ -{dede:config.pagesize value="30"/} - - - - - - 联动枚举管理 - - - - - - - - - - - - -
-
-
- - - - - - - -
-
·联动枚举组管理
- -
- - - - - - - - - - -
请选择组别: - - - - - - - -
- 灰色字的为系统内置枚举,您是不能对它进行删除修改操作的,但可以添加或修改它的元素。
-
- GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='{$egroup}' "); - $dsql->Execute('out',"SELECT evalue,ename FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}' ORDER BY disorder ASC,evalue ASC"); - $options = ''; - - while($row1 = $dsql->GetArray('out')) - { - if(!preg_match("#\.#", $row1['evalue'])) - { - $row1['ename'] = ($row1['evalue'] % 500 == 0)? $row1['ename'] : '└─'.$row1['ename']; - if($topvalue != $row1['evalue']) $options .= "\r\n"; - else $options .= "\r\n"; - } - } - - // 如果添加3级之类 - if($topvalue % 500 != 0) $arr['issign'] = 2; -?> - - - - - - - -
-
-  · - > - 子分类管理 -
-
- 把默认省市地区表导入 "; - } - ?> -
-
-
- - - -
-  隶属分类: - -
-
-  分类名称: -
-
- -
-
-   如果没选择隶属分类则表示增加的是顶级分类,用半角逗号","分开可以一次增加多个分类。 -
-
-
- - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - - - - - -
-
-  ·枚举组列表 - > - > 子分类列表 -
-
-
选择编号枚举名类别组名枚举类型枚举值组内排序操作
{dede:field.id /} - 500 && $fields['evalue']%500 != 0) $fields['ename'] = " └─".$fields['ename']; - } else { - $fields['ename'] = " └───".$fields['ename']; - } - ?> - - {dede:field.egroup /} - 500 && $fields['evalue']%500 != 0) echo '二级选择'; - else echo '一级选择'; - } else { - echo "三级选择"; - } - ?>{dede:field.evalue /} - - 更新 - 删除 - ".$egroups[$fields['egroup']].""; - } - ?> -
-   - 全选/反选 -   - 删除所选 -
- {dede:pagelist listsize=6/} -
- - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - -
-
-  ·枚举组列表 -
-
-
选择编号组类别名级数系统缓存组名操作
{dede:field.id /} {dede:field.itemname /} - - {dede:field.issystem function="@me==1 ? '是' : '否'" /} {dede:field.egroup /} - 更新缓存 - 查看子分类 -
- {dede:pagelist listsize=6/} -
- - - +{dede:config.pagesize value="30"/} + + + + + 联动枚举管理 + + + + + + + + + + + + +
+
+
+ + + + + + + +
+
·联动枚举组管理
+ +
+ + + + + + + + + + +
请选择组别: + + + + + + + +
+ 灰色字的为系统内置枚举,您是不能对它进行删除修改操作的,但可以添加或修改它的元素。
+
+ GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='{$egroup}' "); + $dsql->Execute('out',"SELECT evalue,ename FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}' ORDER BY disorder ASC,evalue ASC"); + $options = ''; + + while($row1 = $dsql->GetArray('out')) + { + if(!preg_match("#\.#", $row1['evalue'])) + { + $row1['ename'] = ($row1['evalue'] % 500 == 0)? $row1['ename'] : '└─'.$row1['ename']; + if($topvalue != $row1['evalue']) $options .= "\r\n"; + else $options .= "\r\n"; + } + } + + //如果添加3级之类 + if($topvalue % 500 != 0) $arr['issign'] = 2; +?> + + + + + + + +
+
+  · + > + 子分类管理 +
+
+ 把默认省市地区表导入 "; + } + ?> +
+
+
+ + + +
+  隶属分类: + +
+
+  分类名称: +
+
+ +
+
+   如果没选择隶属分类则表示增加的是顶级分类,用半角逗号","分开可以一次增加多个分类。 +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+
+  ·枚举组列表 + > + > 子分类列表 +
+
+
选择编号枚举名类别组名枚举类型枚举值组内排序操作
{dede:field.id /} + 500 && $fields['evalue']%500 != 0) $fields['ename'] = " └─".$fields['ename']; + } else { + $fields['ename'] = " └───".$fields['ename']; + } + ?> + + {dede:field.egroup /} + 500 && $fields['evalue']%500 != 0) echo '二级选择'; + else echo '一级选择'; + } else { + echo "三级选择"; + } + ?>{dede:field.evalue /} + + 更新 + 删除 + ".$egroups[$fields['egroup']].""; + } + ?> +
+   + 全选/反选 +   + 删除所选 +
+ {dede:pagelist listsize=6/} +
+ + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + +
+
+  ·枚举组列表 +
+
+
选择编号组类别名级数系统缓存组名操作
{dede:field.id /} {dede:field.itemname /} + + {dede:field.issystem function="@me==1 ? '是' : '否'" /} {dede:field.egroup /} + 更新缓存 + 查看子分类 +
+ {dede:pagelist listsize=6/} +
+ + + \ No newline at end of file diff --git a/src/dede/templets/stepselect_showajax.htm b/src/admin/templets/stepselect_showajax.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/templets/stepselect_showajax.htm rename to src/admin/templets/stepselect_showajax.htm index 572f7d10..927eba1c --- a/src/dede/templets/stepselect_showajax.htm +++ b/src/admin/templets/stepselect_showajax.htm @@ -1,97 +1,97 @@ -GetOne("Select * from `#@__stepselect` where id='$id' "); -$sbjs = " onsubmit=\"alert('该分类是系统内置枚举,不允许修改'); return false;\" "; -if($arr['issystem']==0) $sbjs = ''; -?> - -
修改类别
- -
-
> - - -
类 别 名:
-
缓存组名:
-
缓存组名必须为英文或数字组合!
-
-
- - -
新增类别
- -
-
- -
类 别 名:
-
缓存组名:
-
缓存组名必须为英文或数字组合!
-
-
-GetOne("Select * from `#@__stepselect` where id='$id' "); -$dsql->Execute('out',"Select evalue,ename from `#@__sys_enum` where egroup='{$arr['egroup']}' And (evalue mod 500)=0 order by disorder asc,evalue asc"); -$options = ''; -if($arr['issign']==0) -{ - while($row1 = $dsql->GetArray('out')) $options .= "\r\n"; -} -?> - -
添加枚举
- -
-
- - - -
-隶属枚举: -
-
 枚举名:
-
 排序值:
-
如果不指定,默认以枚举添加先后来排序。
-
-
-GetOne("Select * from `#@__stepselect` where id='$id' "); - $dsql->Execute('out',"Select * From `#@__sys_enum` where egroup like '{$arr['egroup']}' order by disorder asc, evalue asc"); - $options = ''; - while($row1 = $dsql->GetArray('out')) - { - if($row1['evalue']%500==0 || $arr['issign']==1) - { - $options .= "\r\n"; - } - else - { - $options .= "\r\n"; - } - } -?> - -
预览联动表单
- -
-
-
-类别关系: - -
-
-这里仅显示数据关系,实际应用中,二级联动生成的表单是支持级连的,并非全部列出。 -
-
-GetOne("Select * from `#@__stepselect` where id='$id' "); +$sbjs = " onsubmit=\"alert('该分类是系统内置枚举,不允许修改'); return false;\" "; +if($arr['issystem']==0) $sbjs = ''; +?> + +
修改类别
+ +
+
> + + +
类 别 名:
+
缓存组名:
+
缓存组名必须为英文或数字组合!
+
+
+ + +
新增类别
+ +
+
+ +
类 别 名:
+
缓存组名:
+
缓存组名必须为英文或数字组合!
+
+
+GetOne("Select * from `#@__stepselect` where id='$id' "); +$dsql->Execute('out',"Select evalue,ename from `#@__sys_enum` where egroup='{$arr['egroup']}' And (evalue mod 500)=0 order by disorder asc,evalue asc"); +$options = ''; +if($arr['issign']==0) +{ + while($row1 = $dsql->GetArray('out')) $options .= "\r\n"; +} +?> + +
添加枚举
+ +
+
+ + + +
+隶属枚举: +
+
 枚举名:
+
 排序值:
+
如果不指定,默认以枚举添加先后来排序。
+
+
+GetOne("Select * from `#@__stepselect` where id='$id' "); + $dsql->Execute('out',"Select * From `#@__sys_enum` where egroup like '{$arr['egroup']}' order by disorder asc, evalue asc"); + $options = ''; + while($row1 = $dsql->GetArray('out')) + { + if($row1['evalue']%500==0 || $arr['issign']==1) + { + $options .= "\r\n"; + } + else + { + $options .= "\r\n"; + } + } +?> + +
预览联动表单
+ +
+
+
+类别关系: + +
+
+这里仅显示数据关系,实际应用中,二级联动生成的表单是支持级连的,并非全部列出。 +
+
+ \ No newline at end of file diff --git a/src/dede/templets/sys_admin_user.htm b/src/admin/templets/sys_admin_user.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/sys_admin_user.htm rename to src/admin/templets/sys_admin_user.htm index 3452252d..4faec844 --- a/src/dede/templets/sys_admin_user.htm +++ b/src/admin/templets/sys_admin_user.htm @@ -1,68 +1,68 @@ -{dede:config.pagesize value="20"/} - - - - - 管理员帐号 - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - -
- - - - - -
管理员帐号 - 编辑绩效统计 - 增加管理员 - 用户组管理 - -
-
-
登录ID笔名级别频道管理项
{dede:field.userid /}{dede:field.uname /}
{dede:field.usertype function="GetUserType(@me)"/}{dede:field.typename function="GetChannel(@me)"/} - 更改 - 删除 - 文档  -
- 登录时间:{dede:field.logintime function="GetDateTimeMk(@me)" /} 登录IP:{dede:field.loginip/} -
- {dede:pagelist listsize='7' /} -
- - +{dede:config.pagesize value="20"/} + + + + + 管理员帐号 + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + +
+ + + + + +
管理员帐号 + 编辑绩效统计 + 增加管理员 + 用户组管理 + +
+
+
登录ID笔名级别频道管理项
{dede:field.userid /}{dede:field.uname /}
{dede:field.usertype function="GetUserType(@me)"/}{dede:field.typename function="GetChannel(@me)"/} + 修改 + 删除 + 文档  +
+ 登录时间:{dede:field.logintime function="GetDateTimeMk(@me)" /} 登录IP:{dede:field.loginip/} +
+ {dede:pagelist listsize='7' /} +
+ + \ No newline at end of file diff --git a/src/dede/templets/sys_admin_user_add.htm b/src/admin/templets/sys_admin_user_add.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/sys_admin_user_add.htm rename to src/admin/templets/sys_admin_user_add.htm index affa4c67..7abfc328 --- a/src/dede/templets/sys_admin_user_add.htm +++ b/src/admin/templets/sys_admin_user_add.htm @@ -71,7 +71,7 @@   - (复制本代码: ) + (复制本代码: )
- +
更改帐号 修改帐号 管理帐号
@@ -50,7 +50,7 @@
  - (复制本代码: ) + (复制本代码: )
- - - - - - -
- 管理员帐号 > 编辑绩效统计 -
- Execute('me', 'Select * From `#@__admin` order by id asc'); - while( $arr = $dsql->GetArray('me') ) - { - echo "

请稍后,正在载入中...

\r\n\r\n"; - } - ?> -
- + + + + +管理员帐号--绩效统计 + + + + + + + + + + + + + + + + +
+ 管理员帐号 > 编辑绩效统计 +
+ Execute('me', 'Select * From `#@__admin` order by id asc'); + while( $arr = $dsql->GetArray('me') ) + { + echo "

请稍后,正在载入中...

\r\n\r\n"; + } + ?> +
+ \ No newline at end of file diff --git a/src/dede/templets/sys_cache_up.htm b/src/admin/templets/sys_cache_up.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/sys_cache_up.htm rename to src/admin/templets/sys_cache_up.htm index b0363d1c..4addd8b1 --- a/src/dede/templets/sys_cache_up.htm +++ b/src/admin/templets/sys_cache_up.htm @@ -1,75 +1,75 @@ - - - - - 更新系统缓存 - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新系统缓存: 
-
- 本程序作默认会执行下面的操作: -
- 1、更新栏目缓存 - 2、更新枚举缓存 - 3、清理arclist调用缓存 - 4、清理过期会员访问历史 - 5、删除过期短信 -
- -
- (该项操作很占资源,如果没有出现页码不正确、无法解析文档等情况,不要执行本操作) -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 更新系统缓存 + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新系统缓存: 
+
+ 本程序作默认会执行下面的操作: +
+ 1、更新栏目缓存 + 2、更新枚举缓存 + 3、清理arclist调用缓存 + 4、清理过期会员访问历史 + 5、删除过期短信 +
+ +
+ (该项操作很占资源,如果没有出现页码不正确、无法解析文档等情况,不要执行本操作) +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/sys_data.htm b/src/admin/templets/sys_data.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/sys_data.htm rename to src/admin/templets/sys_data.htm index d86f1e61..aefc9bb2 --- a/src/dede/templets/sys_data.htm +++ b/src/admin/templets/sys_data.htm @@ -1,285 +1,285 @@ - - - - - 数据库维护 - - - - - - - - - - - - - - - - - - - - - - - - - - - - \r\n"; - ?> - - - - - - - - - - \r\n"; - } - echo "\r\n"; - } - ?> - - - - - - - - - - - - - - \r\n"; - ?> - - - - - - - - - - \r\n"; - } - echo "\r\n"; - } - ?> - - - - - - - - - - - - - - - - -
- - - - - -
数据库管理 - 数据还原 - SQL命令行工具 -
-
DedeBIZV6默认系统表:
选择表名记录数操作选择表名记录数操作
- - - - - - - 优化 - 修复 - 结构 - - - - - - - - 优化 - 修复 - 结构 -
其它数据表:
选择表名记录数操作选择表名记录数操作
- - - - - - - 优化 - 修复 - 结构 - - - - - - - - 优化 - 修复 - 结构 -
-   - -   - -   - -
数据备份选项:
- - - - - - - -
当前数据库版本:
- 分卷大小: - - K , - - - - 完成后压缩成ZIP - - -
-
进行状态:
- -
- - + + + + + 数据库维护 + + + + + + + + + + + + + + + + + + + + + + + + + + + + \r\n"; + ?> + + + + + + + + + + \r\n"; + } + echo "\r\n"; + } + ?> + + + + + + + + + + + + + + \r\n"; + ?> + + + + + + + + + + \r\n"; + } + echo "\r\n"; + } + ?> + + + + + + + + + + + + + + + + +
+ + + + + +
数据库管理 + 数据还原 + SQL命令行工具 +
+
DedeBIZV6默认系统表:
选择表名记录数操作选择表名记录数操作
+ + + + + + + 优化 + 修复 + 结构 + + + + + + + + 优化 + 修复 + 结构 +
其它数据表:
选择表名记录数操作选择表名记录数操作
+ + + + + + + 优化 + 修复 + 结构 + + + + + + + + 优化 + 修复 + 结构 +
+   + +   + +   + +
数据备份选项:
+ + + + + + + +
当前数据库版本:
+ 分卷大小: + + K , + + + + 完成后压缩成ZIP + + +
+
进行状态:
+ +
+ + \ No newline at end of file diff --git a/src/dede/templets/sys_data_replace.htm b/src/admin/templets/sys_data_replace.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/sys_data_replace.htm rename to src/admin/templets/sys_data_replace.htm index c8ea83a0..03652d82 --- a/src/dede/templets/sys_data_replace.htm +++ b/src/admin/templets/sys_data_replace.htm @@ -1,172 +1,171 @@ - - - - - 数据批量替换 - - - - - - - - - - - -
-
-
批量管理
-
- - - - - - - - - - - - - - - - - - - -
- 数据库内容替换: -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
 选择数据表与字段: - - - - - - - - - - -
- SetQuery("Show Tables"); - $dsql->Execute('t'); - if($dsql->GetError()!=''){ - echo "找不到您所指定的数据库 $dbname
"; - echo $qbutton; - } - echo "\r\n"; - $dsql->Close(); - ?>
要替换的字段: - -
-
 替换方式: - - 主键字段: - - (正则模式必须指定) -
 被替换内容:
 替换为:
 替换条件: - (空完全替换)
 安全确认码: - - - - - -
- - - -
-
-
- -
- - - - - -
结果: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 数据批量替换 + + + + + + + + + + +
+
+
批量管理
+
+ + + + + + + + + + + + + + + + + + + +
+ 数据库内容替换: +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
 选择数据表与字段: + + + + + + + + + + +
+ SetQuery("Show Tables"); + $dsql->Execute('t'); + if($dsql->GetError()!=''){ + echo "找不到您所指定的数据库 $dbname
"; + echo $qbutton; + } + echo "\r\n"; + $dsql->Close(); + ?>
要替换的字段: + +
+
 替换方式: + + 主键字段: + + (正则模式必须指定) +
 被替换内容:
 替换为:
 替换条件: + (空完全替换)
 安全确认码: + + + + + +
+ + + +
+
+
+ +
+ + + + + +
结果: + + [增大] [缩小] +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/sys_data_revert.htm b/src/admin/templets/sys_data_revert.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/sys_data_revert.htm rename to src/admin/templets/sys_data_revert.htm index e51546c8..a399121c --- a/src/dede/templets/sys_data_revert.htm +++ b/src/admin/templets/sys_data_revert.htm @@ -1,145 +1,145 @@ - - - - - 数据库维护--数据还原 - - - - - - - - - - - - - - - - - - \r\n"; - $mtd = " - \r\n"; - echo $mtd; - if(isset($filelists[$i+1])) - { - $i++; - $mtd = " - \r\n"; - echo $mtd; - }else{ - echo "\r\n"; - } - echo "\r\n"; - } - ?> - - - - - - - - - - - - - - - - - - - -
- - - - - -
数据还原 - 数据备份 - SQL命令行工具 -
-
- 发现的备份文件: - -
- - {$filelists[$i]} - - {$filelists[$i]}
-   - -   - -   - -
- 附加参数: -
- -
-   - -
进行状态:
- -
- - + + + + + 数据库维护--数据还原 + + + + + + + + + + + + + + + + + + \r\n"; + $mtd = " + \r\n"; + echo $mtd; + if(isset($filelists[$i+1])) + { + $i++; + $mtd = " + \r\n"; + echo $mtd; + }else{ + echo "\r\n"; + } + echo "\r\n"; + } + ?> + + + + + + + + + + + + + + + + + + + +
+ + + + + +
数据还原 + 数据备份 + SQL命令行工具 +
+
+ 发现的备份文件: + +
+ + {$filelists[$i]} + + {$filelists[$i]}
+   + +   + +   + +
+ 附加参数: +
+ +
+   + +
进行状态:
+ +
+ + \ No newline at end of file diff --git a/src/dede/templets/sys_group.htm b/src/admin/templets/sys_group.htm old mode 100755 new mode 100644 similarity index 85% rename from src/dede/templets/sys_group.htm rename to src/admin/templets/sys_group.htm index ae881a5f..30be68dd --- a/src/dede/templets/sys_group.htm +++ b/src/admin/templets/sys_group.htm @@ -1,64 +1,64 @@ - - - - - 系统用户组管理 - - - - - - - - - - - - - - - - - - SetQuery("Select `rank`,`typename`,`system` From #@__admintype"); - $dsql->Execute(); - while($row = $dsql->GetObject()) - { - ?> - - - - - - - - - - -
- - - - - -
系统用户组管理 - 增加一个用户组 - 管理系统用户 - -
-
Rank组名称管理
- rank?> - - typename?> - - 权限设定 - 组用户 - system==0){ ?>[删除组] -
 
- - + + + + + 系统用户组管理 + + + + + + + + + + + + + + + + + + SetQuery("Select rank,typename,system From #@__admintype"); + $dsql->Execute(); + while($row = $dsql->GetObject()) + { + ?> + + + + + + + + + + +
+ + + + + +
系统用户组管理 + 增加一个用户组 + 管理系统用户 + +
+
Rank组名称管理
+ rank?> + + typename?> + + 权限设定 + 组用户 + system==0){ ?>[删除组] +
 
+ + \ No newline at end of file diff --git a/src/dede/templets/sys_group_add.htm b/src/admin/templets/sys_group_add.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/sys_group_add.htm rename to src/admin/templets/sys_group_add.htm index 8fd14267..f580a054 --- a/src/dede/templets/sys_group_add.htm +++ b/src/admin/templets/sys_group_add.htm @@ -1,105 +1,105 @@ - - - - - 组权限设置 - - - - - - - - - - - - - - - - -
系统用户组管理>>增加用户组:
- - - - - - - - - - >#", $line)) - { - if($start>0) echo " \r\n"; - $start++; - $lhead = " - - - - - - - - - - - - - - -
组名称: -
级别值: - (数字,系统已占用的级别值: - SetQuery("Select rank From #@__admintype"); - $dsql->Execute(); - while($row = $dsql->GetObject()) echo ''.$row->rank.'、'; - ?> - ,级别值必须小于10,超过或等于10所有权限设置将无效(超级管理员),如果10个组不能完全满足您的要求,允许使用小数)
{$start}、".str_replace('>>','',$line)."
- "; - echo $lhead; - } - else if(preg_match("#^>#", $line)) - { - $ls = explode('>',$line); - $tag = $ls[1]; - $tagname = str_replace('[br]', '
', $ls[2]); - if(!preg_match("#
#", $tagname) ) $tagname .= "($tag)"; - else $tagname = str_replace('
', "($tag)
", $tagname); - echo " \r\n"; - $k++; - } - } - $start++; - ?> -
、插件权限
- SetQuery('Select plusname From #@__plus'); - $dsql->Execute(); - while($row=$dsql->GetObject()){ - echo " \r\n"; - $k++; - $l++; - if($l%6==0) echo "
"; - } - ?> -
  - -
-
- - + + + + + 组权限设置 + + + + + + + + + + + + + + + + +
系统用户组管理>>增加用户组:
+ + + + + + + + + + >#", $line)) + { + if($start>0) echo " \r\n"; + $start++; + $lhead = " + + + + + + + + + + + + + + +
组名称: +
级别值: + (数字,系统已占用的级别值: + SetQuery("Select rank From #@__admintype"); + $dsql->Execute(); + while($row = $dsql->GetObject()) echo ''.$row->rank.'、'; + ?> + ,级别值必须小于10,超过或等于10所有权限设置将无效(超级管理员),如果10个组不能完全满足您的要求,允许使用小数)
{$start}、".str_replace('>>','',$line)."
+ "; + echo $lhead; + } + else if(preg_match("#^>#", $line)) + { + $ls = explode('>',$line); + $tag = $ls[1]; + $tagname = str_replace('[br]', '
', $ls[2]); + if(!preg_match("#
#", $tagname) ) $tagname .= "($tag)"; + else $tagname = str_replace('
', "($tag)
", $tagname); + echo " \r\n"; + $k++; + } + } + $start++; + ?> +
、插件权限
+ SetQuery('Select plusname From #@__plus'); + $dsql->Execute(); + while($row=$dsql->GetObject()){ + echo " \r\n"; + $k++; + $l++; + if($l%6==0) echo "
"; + } + ?> +
  + +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/sys_group_edit.htm b/src/admin/templets/sys_group_edit.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/sys_group_edit.htm rename to src/admin/templets/sys_group_edit.htm index 5b9ee127..a8bc9c8b --- a/src/dede/templets/sys_group_edit.htm +++ b/src/admin/templets/sys_group_edit.htm @@ -1,103 +1,103 @@ - - - - - 组权限设置 - - - - - - -
- - - - - - - - - - -
系统用户组管理>>更改用户组:
- - - - - - - - - - >#", $line)) - { - if($start>0) echo " \r\n"; - $start++; - $lhead = " - - - - - - - - - - - - - - -
组名称: -
级别值: - - -
{$start}、".str_replace('>>','',$line)."
- "; - echo $lhead; - } - else if(preg_match("#^>#", $line)) - { - $ls = explode('>',$line); - $tag = $ls[1]; - $tagname = str_replace('[br]','
',$ls[2]); - if(!preg_match("#
#", $tagname) ) $tagname .= "($tag)"; - else $tagname = str_replace('
', "($tag)
", $tagname); - echo " \r\n"; - $k++; - } - } - $start++; - ?> -
、插件权限
- SetQuery('SELECT plusname FROM #@__plus'); - $dsql->Execute(); - while($row=$dsql->GetObject()){ - echo " plusname}")."> {$row->plusname}\r\n"; - $k++; - $l++; - if($l % 6 == 0) echo "
"; - } - ?> -
  - -
-
-
- - + + + + + 组权限设置 + + + + + + +
+ + + + + + + + + + +
系统用户组管理>>修改用户组:
+ + + + + + + + + + >#", $line)) + { + if($start>0) echo " \r\n"; + $start++; + $lhead = " + + + + + + + + + + + + + + +
组名称: +
级别值: + + +
{$start}、".str_replace('>>','',$line)."
+ "; + echo $lhead; + } + else if(preg_match("#^>#", $line)) + { + $ls = explode('>',$line); + $tag = $ls[1]; + $tagname = str_replace('[br]','
',$ls[2]); + if(!preg_match("#
#", $tagname) ) $tagname .= "($tag)"; + else $tagname = str_replace('
', "($tag)
", $tagname); + echo " \r\n"; + $k++; + } + } + $start++; + ?> +
、插件权限
+ SetQuery('SELECT plusname FROM #@__plus'); + $dsql->Execute(); + while($row=$dsql->GetObject()){ + echo " plusname}")."> {$row->plusname}\r\n"; + $k++; + $l++; + if($l % 6 == 0) echo "
"; + } + ?> +
  + +
+
+
+ + \ No newline at end of file diff --git a/src/dede/templets/sys_info.htm b/src/admin/templets/sys_info.htm old mode 100755 new mode 100644 similarity index 100% rename from src/dede/templets/sys_info.htm rename to src/admin/templets/sys_info.htm diff --git a/src/dede/templets/sys_info_mark.htm b/src/admin/templets/sys_info_mark.htm old mode 100755 new mode 100644 similarity index 88% rename from src/dede/templets/sys_info_mark.htm rename to src/admin/templets/sys_info_mark.htm index 4140e263..25a76380 --- a/src/dede/templets/sys_info_mark.htm +++ b/src/admin/templets/sys_info_mark.htm @@ -1,172 +1,172 @@ - - - - - 系统配置参数 - 图片水印设置 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- DedeBIZV6系统配置参数 - 图片水印设置
上传的图片是否使用图片水印功能:
- - 开启 - -
采集的图片是否使用图片水印功能: - - -
选择水印的文件类型: - -   - -   - -
添加水印的图片大小控制(设置为0为不限): 宽: - - 高: - -
水印图片文件名(如果不存在,则使用文字水印):dede
上传新图片: - -
-
水印图片文字:(请查看data\mark\simhei.ttf字体库是否存在)
水印图片文字字体大小: -
水印图片文字颜色(默认#FF0000为红色): -
设置 JPEG 类型的图片附件添加水印后质量参数,范围为 0~100 的整数,数值越大结果图片效果越好,但尺寸也越大。 - -
设置 GIF 类型水印图片与原始图片的融合度,水印透明度(0—100,值越小越透明):
水印位置: - - - - - - - - - - - - - - - - - -
- - -
- - -
- - -
-
- - - - - -
  - -    -
-
- - + + + + + 系统配置参数 - 图片水印设置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ DedeBIZV6系统配置参数 - 图片水印设置
上传的图片是否使用图片水印功能:
+ + 开启 + +
采集的图片是否使用图片水印功能: + + +
选择水印的文件类型: + +   + +   + +
添加水印的图片大小控制(设置为0为不限): 宽: + + 高: + +
水印图片文件名(如果不存在,则使用文字水印):dede
上传新图片: + +
+
水印图片文字:(请查看data\mark\simhei.ttf字体库是否存在)
水印图片文字字体大小: +
水印图片文字颜色(默认#FF0000为红色): +
设置 JPEG 类型的图片附件添加水印后质量参数,范围为 0~100 的整数,数值越大结果图片效果越好,但尺寸也越大。 + +
设置 GIF 类型水印图片与原始图片的融合度,水印透明度(0—100,值越小越透明):
水印位置: + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+
+ + + + + +
  + +    +
+
+ + \ No newline at end of file diff --git a/src/dede/templets/sys_info_pay.htm b/src/admin/templets/sys_info_pay.htm old mode 100755 new mode 100644 similarity index 91% rename from src/dede/templets/sys_info_pay.htm rename to src/admin/templets/sys_info_pay.htm index 8172526e..d115ee2a --- a/src/dede/templets/sys_info_pay.htm +++ b/src/admin/templets/sys_info_pay.htm @@ -1,188 +1,188 @@ - - - - -支付接口配置 - - - - - -
-
- - $val){ - if(!isset(${'payment_'.$value}[$k])) $payment_temp = ''; - else $payment_temp = ${'payment_'.$value}[$k]; - echo ''."\n"; - } -} -?> - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 支付接口配置参数 -
-  
-  接口类型: -
- $val) { ?> -
  • -> -
  • - -
    -
    -  商户号: - -  此处填写您的支付帐号、客户号或客户id等,此帐号在支付服务提供商处取得
    -  邮箱: -  使用支付宝接口时,需填写支付宝账号邮箱
    -  私钥: - -
    -  签约商家请填写“交易安全校验码(key)”;未签约商家不用填写此项.(该项只支持数字和英文字母)
    -  支持交易货币: - - 人民币 *现只支持人民币,根据支付接口与银行卡决定,默认为人民币.
    -  支付手续费: - - 以百分比计算,手续费将计算在产品价格内.如果3% 则填0.03
    -  支付接口申请地址: - 点击申请 -
    - -

    - 财付通是腾讯公司为促进中国电子商务的发展需要,满足互联网用户价值需求,针对网上交易安全而精心推出的一系列服务。 -

    -
    - - - - - - - - -
     如果该配置无效要手动更改,可打开/data/sys_pay.cache.php文件进行手工配置。 -
    - - - - -
     
    -
    -
    - + + + + +支付接口配置 + + + + + +
    +
    + + $val){ + if(!isset(${'payment_'.$value}[$k])) $payment_temp = ''; + else $payment_temp = ${'payment_'.$value}[$k]; + echo ''."\n"; + } +} +?> + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     支付接口配置参数 +
    +  
    +  接口类型: +
    + $val) { ?> +
  • +> +
  • + +
    +
    +  商户号: + +  此处填写您的支付帐号、客户号或客户id等,此帐号在支付服务提供商处取得
    +  邮箱: +  使用支付宝接口时,需填写支付宝账号邮箱
    +  私钥: + +
    +  签约商家请填写“交易安全校验码(key)”;未签约商家不用填写此项.(该项只支持数字和英文字母)
    +  支持交易货币: + + 人民币 *现只支持人民币,根据支付接口与银行卡决定,默认为人民币.
    +  支付手续费: + + 以百分比计算,手续费将计算在产品价格内.如果3% 则填0.03
    +  支付接口申请地址: + 点击申请 +
    + +

    + 财付通是腾讯公司为促进中国电子商务的发展需要,满足互联网用户价值需求,针对网上交易安全而精心推出的一系列服务。 +

    +
    + + + + + + + + +
     如果该配置无效要手动修改,可打开/data/sys_pay.cache.php文件进行手工配置。 +
    + + + + +
     
    +
    +
    + \ No newline at end of file diff --git a/src/dede/templets/sys_passport.htm b/src/admin/templets/sys_passport.htm old mode 100755 new mode 100644 similarity index 81% rename from src/dede/templets/sys_passport.htm rename to src/admin/templets/sys_passport.htm index 0457c838..907f3f7a --- a/src/dede/templets/sys_passport.htm +++ b/src/admin/templets/sys_passport.htm @@ -1,71 +1,71 @@ - - - - -通行证设置 - - - - - - - - - - -
     通行证设置:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    参数说明参数值
    是否使用通行证: - > -是 -> -否
    通行证加密码: - - -
    登录通行证网址: -
    退出通行证网址:
    注册通行证帐号网址: - -
    - - - - - -
     
    -
    -
    -
    - + + + + +通行证设置 + + + + + + + + + + +
     通行证设置:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    参数说明参数值
    是否使用通行证: + > +是 +> +否
    通行证加密码: + + +
    登录通行证网址: +
    退出通行证网址:
    注册通行证帐号网址: + +
    + + + + + +
     
    +
    +
    +
    + \ No newline at end of file diff --git a/src/dede/templets/sys_payment.htm b/src/admin/templets/sys_payment.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/sys_payment.htm rename to src/admin/templets/sys_payment.htm index 9fd4559e..b3903d23 --- a/src/dede/templets/sys_payment.htm +++ b/src/admin/templets/sys_payment.htm @@ -1,73 +1,73 @@ - - - - - 支付接口配置 - - - - - - - - -
    - - - - - - - - - - - {dede:datalist} - - - - - - - {/dede:datalist} - - - -
    - - - - - -
    支付接口列表 [查看更多接口] -
    -
    支付方式描述排序管理
    {dede:field.name /}{dede:field.description /}{dede:field.rank /} - - [安装] - - [更改] - [删除] - -
    {dede:pagelist listsize=5/}
    -
    - - - + + + + + 支付接口配置 + + + + + + + + +
    + + + + + + + + + + + {dede:datalist} + + + + + + + {/dede:datalist} + + + +
    + + + + + +
    支付接口列表 [查看更多接口] +
    +
    支付方式描述排序管理
    {dede:field.name /}{dede:field.description /}{dede:field.rank /} + + [安装] + + [修改] + [删除] + +
    {dede:pagelist listsize=5/}
    +
    + + + \ No newline at end of file diff --git a/src/dede/templets/sys_payment_install.htm b/src/admin/templets/sys_payment_install.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/sys_payment_install.htm rename to src/admin/templets/sys_payment_install.htm index 46620eae..eed24a68 --- a/src/dede/templets/sys_payment_install.htm +++ b/src/admin/templets/sys_payment_install.htm @@ -1,69 +1,69 @@ - - - - - 安装支付接口 - - - - - - - -
    - - - - - - - -
     支付接口列表 >> - 安装支付接口
    - - - '> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    支付名称:
    支付描述:
    手续费:
    货到付款:
    在线支付:
      - -
    -
    -
    - - + + + + + 安装支付接口 + + + + + + + +
    + + + + + + + +
     支付接口列表 >> + 安装支付接口
    + + + '> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    支付名称:
    支付描述:
    手续费:
    货到付款:
    在线支付:
      + +
    +
    +
    + + \ No newline at end of file diff --git a/src/dede/templets/sys_safetest.htm b/src/admin/templets/sys_safetest.htm old mode 100755 new mode 100644 similarity index 95% rename from src/dede/templets/sys_safetest.htm rename to src/admin/templets/sys_safetest.htm index 103c2fc6..3123ecc7 --- a/src/dede/templets/sys_safetest.htm +++ b/src/admin/templets/sys_safetest.htm @@ -1,93 +1,93 @@ - - - - - 木马自检程序 - - - - - - - - - - - - - - - -
    -
    -
    用户安全中心
    -
    - - - - - - - - - - - - - - - - - - - - -
    - 木马自检程序 -
    - 安全建议: -
    - 1、有条件的用户把中 data、templets、uploads、html、special、images、install目录设置为不允许执行脚本,其它目录禁止写入,系统将更安全;
    - 2、本检测程以开发模式为标准,如果您的网站目录包含其它系统,此检测程序可能会产生错误判断;
    - 3、检测程序会跳过对模板缓存目录的检测,为了安全起见,检测完成后建议清空模板缓存。 -
    -

    文件类型: - -  要检查的文件类型

    -

    代码特征: - -  特征代码

    -
    - -   - -
    检测结果:(结果仅供参考,请务必查看源码后才删除非法文件)
    -
    - - + + + + + 木马自检程序 + + + + + + + + + + + + + + + +
    +
    +
    用户安全中心
    +
    + + + + + + + + + + + + + + + + + + + + +
    + 木马自检程序 +
    + 安全建议: +
    + 1、有条件的用户把中 data、templets、uploads、html、special、images、install目录设置为不允许执行脚本,其它目录禁止写入,系统将更安全;
    + 2、本检测程以开发模式为标准,如果您的网站目录包含其它系统,此检测程序可能会产生错误判断;
    + 3、检测程序会跳过对模板缓存目录的检测,为了安全起见,检测完成后建议清空模板缓存。 +
    +

    文件类型: + +  要检查的文件类型

    +

    代码特征: + +  特征代码

    +
    + +   + +
    检测结果:(结果仅供参考,请务必查看源码后才删除非法文件)
    +
    + + \ No newline at end of file diff --git a/src/dede/templets/sys_safetest_viewdiff.htm b/src/admin/templets/sys_safetest_viewdiff.htm similarity index 99% rename from src/dede/templets/sys_safetest_viewdiff.htm rename to src/admin/templets/sys_safetest_viewdiff.htm index 3c6f4ab3..1b904aa9 100644 --- a/src/dede/templets/sys_safetest_viewdiff.htm +++ b/src/admin/templets/sys_safetest_viewdiff.htm @@ -1,6 +1,5 @@ - @@ -80,7 +79,6 @@ - diff --git a/src/dede/templets/sys_sql_query.htm b/src/admin/templets/sys_sql_query.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/templets/sys_sql_query.htm rename to src/admin/templets/sys_sql_query.htm index 93876052..1022e576 --- a/src/dede/templets/sys_sql_query.htm +++ b/src/admin/templets/sys_sql_query.htm @@ -34,7 +34,7 @@
    系统的表信息:系统的表信息: @@ -91,7 +91,7 @@ while($row = $dsql->GetArray('t',MYSQL_BOTH)) - - + +
    运行SQL命令行: + 运行SQL命令行:
    + @@ -62,8 +62,8 @@ - - + - - - -
    全局标记测试:
    环境变量:  + 环境变量: 
    +
    + diff --git a/src/dede/templets/tags_main.htm b/src/admin/templets/tags_main.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/tags_main.htm rename to src/admin/templets/tags_main.htm index 818802ab..b63bc9ea --- a/src/dede/templets/tags_main.htm +++ b/src/admin/templets/tags_main.htm @@ -1,225 +1,222 @@ - - - - - - tags管理 - - - - - - - - - - - - -
    -
    -
    进行状态:
    - - - - - - -
    提取Tag
    - 开始id: - - 结束id: - -   - - (tag以文档关键词为准) -
    - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - - - - - - -
    - - - - - - - - -
    Tag维护
    - 搜索: - - -   更新Tag HTML -
    -
    标签点击 - 文档数 - 添加时间 - 更新时间操作
    - - - {dede:field.tag - /} - - ' - id='count' size='5' /> - - - - - - - - , "");' - class="btn btn-success btn-sm">关键词描述 - );' - class="btn btn-success btn-sm">更新 - ' - class="btn btn-success btn-sm">生成HTML - );' - class="btn btn-success btn-sm">删 -
    - - - {dede:pagelist /} -
    - -
    - - - + + + + + tags管理 + + + + + + + + + + + +
    +
    + + + + + + + +
    提取Tag
    + 开始id: + + 结束id: + +   + + (tag以文档关键词为准) +
    +
    + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + + + + + + +
    + + + + + + + + +
    Tag维护
    + 搜索: + + +   更新Tag HTML +
    +
    标签点击 + 文档数 + 添加时间 + 更新时间操作
    + + + {dede:field.tag + /} + + ' + id='count' size='5' /> + + + + + + + + , "");' + class="btn btn-success btn-sm">关键词描述 + );' + class="btn btn-success btn-sm">更新 + ' + class="btn btn-success btn-sm">生成HTML + );' + class="btn btn-success btn-sm">删 +
    + + + {dede:pagelist /} +
    + +
    +
    + + \ No newline at end of file diff --git a/src/dede/templets/templets_default.htm b/src/admin/templets/templets_default.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/templets/templets_default.htm rename to src/admin/templets/templets_default.htm index 932b07cc..c1015595 --- a/src/dede/templets/templets_default.htm +++ b/src/admin/templets/templets_default.htm @@ -1,87 +1,87 @@ - - - - -模板管理器 - - - - - - - - - - - -
    - 模板管理 -
    - - - - - - - - - - - - - - - - - - - - - -
    文件名文件描述修改时间操作
    - - 当前位置: - - - - 默认模板目录 - 插件模板目录 - -
    - - - - -
    - 新建模板 - 上传模板 -
    - + + + + +模板管理器 + + + + + + + + + + + +
    + 模板管理 +
    + + + + + + + + + + + + + + + + + + + + + +
    文件名文件描述修改时间操作
    + + 当前位置: + + + + 默认模板目录 + 插件模板目录 + +
    + + + + +
    + 新建模板 + 上传模板 +
    + \ No newline at end of file diff --git a/src/dede/templets/templets_one.htm b/src/admin/templets/templets_one.htm old mode 100755 new mode 100644 similarity index 90% rename from src/dede/templets/templets_one.htm rename to src/admin/templets/templets_one.htm index 3e84ad7b..e0c3d319 --- a/src/dede/templets/templets_one.htm +++ b/src/admin/templets/templets_one.htm @@ -1,107 +1,106 @@ -{dede:config.pagesize value="20"/} - - - - - - 单独页面管理 - - - - - - - - - - -
    -
    -
      -
    • 关键字:
    • -
    • -
    • 标识:
    • -
    • \r\n"; - $dsql->Execute("s","Select likeid From `#@__sgpage` group by likeid "); - echo "\r\n"; - while($arr = $dsql->GetArray('s')) - { - if($likeid==$arr['likeid']) echo "\r\n"; - else echo "\r\n"; - } - echo "\r\n"; - ?>
    • -
    • -
    -
    -
    - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - -
    -
    - ◆单独页面管理 -
    - -
    选择编号页面名称需编译标识修改时间管理
    {dede:field.aid /}{dede:field.title /}{dede:field.ismake function='GetIsMake(@me)'/}{dede:field.likeid /}{dede:field.uptime function='GetDateMk(@me)'/} - 更改 - 预览 - 删除 -
    - {dede:pagelist listsize=6/} -
    -
    - - +{dede:config.pagesize value="20"/} + + + + + 单独页面管理 + + + + + + + + + + +
    +
    +
      +
    • 关键字:
    • +
    • +
    • 标识:
    • +
    • \r\n"; + $dsql->Execute("s","Select likeid From `#@__sgpage` group by likeid "); + echo "\r\n"; + while($arr = $dsql->GetArray('s')) + { + if($likeid==$arr['likeid']) echo "\r\n"; + else echo "\r\n"; + } + echo "\r\n"; + ?>
    • +
    • +
    +
    +
    + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + +
    +
    + 单独页面管理 +
    + +
    选择编号页面名称需编译标识修改时间管理
    {dede:field.aid /}{dede:field.title /}{dede:field.ismake function='GetIsMake(@me)'/}{dede:field.likeid /}{dede:field.uptime function='GetDateMk(@me)'/} + 修改 + 预览 + 删除 +
    + {dede:pagelist listsize=6/} +
    +
    + + \ No newline at end of file diff --git a/src/dede/templets/templets_one_add.htm b/src/admin/templets/templets_one_add.htm old mode 100755 new mode 100644 similarity index 87% rename from src/dede/templets/templets_one_add.htm rename to src/admin/templets/templets_one_add.htm index 2de97065..dd5e2f64 --- a/src/dede/templets/templets_one_add.htm +++ b/src/admin/templets/templets_one_add.htm @@ -1,128 +1,128 @@ - - - - - 增加自定义页面 - - - - - - - - - - - - - - - - - -
    - 单独页面管理>>增加新页面 -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - 单独页面管理仅适用于页面较少的情况(建议小于500个页面),大量文档的用文章模型进行管理。 -
    页面标题: - -
    页面关键字: - (用","分开{dede:field name='keywords'/})
    页面摘要信息: - (100字左右{dede:field name='description'/})
    关联标识: - - \r\n"; - $dsql->Execute('s',"Select likeid From `#@__sgpage` group by likeid "); - echo "\r\n"; - while($arr = $dsql->GetArray('s')) - { - echo "\r\n"; - } - echo "\r\n"; - ?> -
    - (通过这个标识来识别类同页面,模板中用{dede:likesgpage id='标识'/}调用有相同标识的页面) -
    文件名: - " size="30"> - (相对于CMS安装目录) -
    模板文件名:
    是否编译内容: - -
    - -
    - -
      - -      - -
    -
    - - + + + + + 增加自定义页面 + + + + + + + + + + + + + + + + + +
    + 单独页面管理>>增加新页面 +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + 单独页面管理仅适用于页面较少的情况(建议小于500个页面),大量文档的用文章模型进行管理。 +
    页面标题: + +
    页面关键字: + (用","分开{dede:field name='keywords'/})
    页面摘要信息: + (100字左右{dede:field name='description'/})
    关联标识: + + \r\n"; + $dsql->Execute('s',"Select likeid From `#@__sgpage` group by likeid "); + echo "\r\n"; + while($arr = $dsql->GetArray('s')) + { + echo "\r\n"; + } + echo "\r\n"; + ?> +
    + (通过这个标识来识别类同页面,模板中用{dede:likesgpage id='标识'/}调用有相同标识的页面) +
    文件名: + " size="30"> + (相对于CMS安装目录) +
    模板文件名:
    是否编译内容: + +
    + +
    + +
      + +      + +
    +
    + + \ No newline at end of file diff --git a/src/dede/templets/templets_one_edit.htm b/src/admin/templets/templets_one_edit.htm old mode 100755 new mode 100644 similarity index 86% rename from src/dede/templets/templets_one_edit.htm rename to src/admin/templets/templets_one_edit.htm index 3aa1b315..22ab27d2 --- a/src/dede/templets/templets_one_edit.htm +++ b/src/admin/templets/templets_one_edit.htm @@ -1,120 +1,120 @@ - - - - -更改自定义页面 - - - - - - - - - - - - - - - - -
    - 单独页面管理>>更新页面 -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    页面标题: -
    页面关键字: -(用","分开)
    页面摘要信息: -(100字左右)
    关联标识: - - - \r\n"; - $dsql->Execute('s',"Select likeid From `#@__sgpage` group by likeid "); - echo "\r\n"; - while($arr = $dsql->GetArray('s')) - { - if($arr['likeid']!=$row['likeid']) echo "\r\n"; - } - echo "\r\n"; - ?> -
    模板文件名: - -
    文件名: - - - (相对于CMS安装目录) -
    是否编译内容: - -
    - -
    - -
        -
    -
    - + + + + +修改自定义页面 + + + + + + + + + + + + + + + + +
    + 单独页面管理>>更新页面 +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    页面标题: +
    页面关键字: +(用","分开)
    页面摘要信息: +(100字左右)
    关联标识: + + + \r\n"; + $dsql->Execute('s',"Select likeid From `#@__sgpage` group by likeid "); + echo "\r\n"; + while($arr = $dsql->GetArray('s')) + { + if($arr['likeid']!=$row['likeid']) echo "\r\n"; + } + echo "\r\n"; + ?> +
    模板文件名: + +
    文件名: + + + (相对于CMS安装目录) +
    是否编译内容: + +
    + +
    + +
        +
    +
    + \ No newline at end of file diff --git a/src/dede/templets/templets_tagsource.htm b/src/admin/templets/templets_tagsource.htm old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets/templets_tagsource.htm rename to src/admin/templets/templets_tagsource.htm index 496a3553..2cde2274 --- a/src/dede/templets/templets_tagsource.htm +++ b/src/admin/templets/templets_tagsource.htm @@ -1,84 +1,84 @@ - - - - - 标签源码碎片管理 - - - - - - - - - - - -
    - 标签源码碎片管理 -
    - - - - - - - - - - - read()) - { - if(!preg_match("#\.php$#", $filename)) continue; - $filetime = filemtime($libdir.'/'.$filename); - $filetime = MyDate("Y-m-d H:i",$filetime); - $fileinfo = GetHelpInfo(str_replace('.lib.php','',$filename)); - ?> - - - - - - - - - - -
    标签文件名标签说明修改时间操作
    -
    - - 当前位置:标签源码碎片管理(文件存放在 ../include/taglib 文件夹) - -
    - -
    - - - - - - - 编辑 -
    - -
    - - + + + + + 标签源码碎片管理 + + + + + + + + + + + +
    + 标签源码碎片管理 +
    + + + + + + + + + + + read()) + { + if(!preg_match("#\.php$#", $filename)) continue; + $filetime = filemtime($libdir.'/'.$filename); + $filetime = MyDate("Y-m-d H:i",$filetime); + $fileinfo = GetHelpInfo(str_replace('.lib.php','',$filename)); + ?> + + + + + + + + + + +
    标签文件名标签说明修改时间操作
    +
    + + 当前位置:标签源码碎片管理(文件存放在 ../include/taglib 文件夹) + +
    + +
    + + + + + + + 编辑 +
    + +
    + + \ No newline at end of file diff --git a/src/dede/templets/tpl_edit.htm b/src/admin/templets/tpl_edit.htm old mode 100755 new mode 100644 similarity index 60% rename from src/dede/templets/tpl_edit.htm rename to src/admin/templets/tpl_edit.htm index e23d780b..739fe96a --- a/src/dede/templets/tpl_edit.htm +++ b/src/admin/templets/tpl_edit.htm @@ -1,7 +1,5 @@ - + - 文件编辑 @@ -9,21 +7,8 @@ @@ -62,15 +47,11 @@ } - - +
    -   ◇模板管理 >> - 修改/新建模板 - 模板管理 >>修改/新建模板
    @@ -80,15 +61,12 @@ - + @@ -96,51 +74,43 @@ -
    - 修改/新建模板: + 修改/新建模板:
    文件名称 - - (不允许用 “..” 形式的路径) - (不允许用 “..” 形式的路径)
    参考标签:
    '.$tag.' '; -//} -//echo ' 隐藏全部
    '; -foreach ($helps as $key => $help) -{ - echo ''."\r\n"; - -} -?> + foreach ($helps as $key => $help) + { + echo ''."\r\n"; + } + ?>
    $help) -{ - echo '
    标签名称:'.$key.'
    功能说明:'.trim($help[0]).'
    使用实例:

    参数说明:
    '."\r\n"; - $parameters = explode("\n", $help[2]); - foreach($parameters as $parameter) - { - $parameter = trim($parameter); - if($parameter == '') continue; - else echo $parameter,'
    '; - } - echo '
    '."\r\n"; -} -?> + foreach ($helps as $key => $help) + { + echo '
    标签名称:'.$key.'
    功能说明:'.trim($help[0]).'
    使用实例:

    参数说明:
    '."\r\n"; + $parameters = explode("\n", $help[2]); + foreach($parameters as $parameter) + { + $parameter = trim($parameter); + if($parameter == '') continue; + else echo $parameter,'
    '; + } + echo '
    '."\r\n"; + } + ?>
    - +
    - + +     - +
    @@ -153,5 +123,4 @@ foreach ($helps as $key => $help) }); - \ No newline at end of file diff --git a/src/dede/templets/tpl_edit_tag.htm b/src/admin/templets/tpl_edit_tag.htm old mode 100755 new mode 100644 similarity index 89% rename from src/dede/templets/tpl_edit_tag.htm rename to src/admin/templets/tpl_edit_tag.htm index d0b892c5..0ebd0042 --- a/src/dede/templets/tpl_edit_tag.htm +++ b/src/admin/templets/tpl_edit_tag.htm @@ -48,8 +48,7 @@ function Post() - +
      ◇标签源码碎片管理 >> - 标签源码碎片管理 >>
    @@ -59,7 +58,7 @@ function Post() @@ -83,7 +82,7 @@ function Post() -
    - (修改源码如果出现语法错误,可能导致标签无法使用,请修改前先作好数据备份) + (修改源码如果出现语法错误,可能导致标签无法使用,请修改前先作好数据备份)
    +   diff --git a/src/dede/templets/tpl_newfile.htm b/src/admin/templets/tpl_newfile.htm old mode 100755 new mode 100644 similarity index 66% rename from src/dede/templets/tpl_newfile.htm rename to src/admin/templets/tpl_newfile.htm index 1e902f52..f3710de6 --- a/src/dede/templets/tpl_newfile.htm +++ b/src/admin/templets/tpl_newfile.htm @@ -1,61 +1,51 @@ - - - - - 文件编辑 - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - -
    工作目录:     - (空白表示根目录 ,不允许用 “..” 形式的路径)
    文件名称: -     - -
    文件内容:    - -
    -
    -
    - -   - -   - -

    -
    - - + + + + + 文件编辑 + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    工作目录:     (空白表示根目录 ,不允许用 “..” 形式的路径)
    文件名称:
    文件内容:
    +
    + +   + +   + +
    + \ No newline at end of file diff --git a/src/dede/templets/update_guide_getfiles.htm b/src/admin/templets/update_guide_getfiles.htm old mode 100755 new mode 100644 similarity index 81% rename from src/dede/templets/update_guide_getfiles.htm rename to src/admin/templets/update_guide_getfiles.htm index 616df5db..6a1aeb53 --- a/src/dede/templets/update_guide_getfiles.htm +++ b/src/admin/templets/update_guide_getfiles.htm @@ -1,56 +1,56 @@ - - - - -自动更新程序--下载更新文件 - - - - - - - - - - - - - - - - - -
    -
    - 自动更新程序--下载更新文件 -
    - -
    - 下载的文件临时存放在文件夹(../data/)内,如果某些基础类有重要的改动导致更新中途中错,您可以从这文件夹提取文件手工更新。 -
    - - - - - -
    进行状态: - - [增大] [缩小] -
    -
    -
    - -
    -
    - - + + + + +自动更新程序--下载更新文件 + + + + + + + + + + + + + + + + + +
    +
    + 自动更新程序--下载更新文件 +
    + +
    + 下载的文件临时存放在文件夹(../data/)内,如果某些基础类有重要的改动导致更新中途中错,您可以从这文件夹提取文件手工更新。 +
    + + + + + +
    进行状态: + + [增大] [缩小] +
    +
    +
    + +
    +
    + + diff --git a/src/dede/templets/update_guide_getlist.htm b/src/admin/templets/update_guide_getlist.htm old mode 100755 new mode 100644 similarity index 92% rename from src/dede/templets/update_guide_getlist.htm rename to src/admin/templets/update_guide_getlist.htm index e5796c94..826a5df2 --- a/src/dede/templets/update_guide_getlist.htm +++ b/src/admin/templets/update_guide_getlist.htm @@ -1,32 +1,32 @@ - - - - -自动更新程序--待下载文件列表 - - - - - - - - - - - - - -
    -
    - 自动更新程序--待下载文件列表 -
    - -
    - -
    - + + + + +自动更新程序--待下载文件列表 + + + + + + + + + + + + + +
    +
    + 自动更新程序--待下载文件列表 +
    + +
    + +
    + \ No newline at end of file diff --git a/src/dede/templets/vote_add.htm b/src/admin/templets/vote_add.htm old mode 100755 new mode 100644 similarity index 95% rename from src/dede/templets/vote_add.htm rename to src/admin/templets/vote_add.htm index 40c5c732..7fcf2d23 --- a/src/dede/templets/vote_add.htm +++ b/src/admin/templets/vote_add.htm @@ -1,173 +1,173 @@ - - - - - 增加投票 - - - - - - - - - - - - - - - - - - - - - - - -
    投票管理>>增加投票  
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    投票名称:
    开始时间:
    结束时间:
    是否允许游客投票: - -
    是否允许查看投票: - -
    投票时间间隔: - (N天后可再次投票,0 表示此IP地址只能投一次)
    是否多选: - -
    投 票 项: - -
    -
    - 选项1: - -
    -
    是否启用: - -
      - - -
     
    -
    - - + + + + + 增加投票 + + + + + + + + + + + + + + + + + + + + + + + +
    投票管理>>增加投票  
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    投票名称:
    开始时间:
    结束时间:
    是否允许游客投票: + +
    是否允许查看投票: + +
    投票时间间隔: + (N天后可再次投票,0 表示此IP地址只能投一次)
    是否多选: + +
    投 票 项: + +
    +
    + 选项1: + +
    +
    是否启用: + +
      + + +
     
    +
    + + \ No newline at end of file diff --git a/src/dede/templets/vote_edit.htm b/src/admin/templets/vote_edit.htm old mode 100755 new mode 100644 similarity index 95% rename from src/dede/templets/vote_edit.htm rename to src/admin/templets/vote_edit.htm index ff677d97..084dfbfd --- a/src/dede/templets/vote_edit.htm +++ b/src/admin/templets/vote_edit.htm @@ -1,143 +1,143 @@ - - - - - 投票管理 - - - - - - - - - - - - - - - - - - - - -
    投票管理>>增加投票  
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    投票名称: -
    投票总人数:
    开始时间:
    结束时间:
    是否允许游客投票:   -
    是否允许查看投票:   -
    投票时间间隔: - (N天后可再次投票,0 表示此IP地址只能投一次)
    是否多选: -
    投 票 项:
    - (请按相同的形式来增加或修改节点,其中属性:id不能重复)
    -
    是否启用: -   -
      - - -
     
    -
    -
    - - + + + + + 投票管理 + + + + + + + + + + + + + + + + + + + + +
    投票管理>>增加投票  
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    投票名称: +
    投票总人数:
    开始时间:
    结束时间:
    是否允许游客投票:   +
    是否允许查看投票:   +
    投票时间间隔: + (N天后可再次投票,0 表示此IP地址只能投一次)
    是否多选: +
    投 票 项:
    + (请按相同的形式来增加或修改节点,其中属性:id不能重复)
    +
    是否启用: +   +
      + + +
     
    +
    +
    + + \ No newline at end of file diff --git a/src/dede/templets/vote_getcode.htm b/src/admin/templets/vote_getcode.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/templets/vote_getcode.htm rename to src/admin/templets/vote_getcode.htm index a7db37d7..e11b97b6 --- a/src/dede/templets/vote_getcode.htm +++ b/src/admin/templets/vote_getcode.htm @@ -1,76 +1,76 @@ - - - - - 获取代码 - - - - - - - - - - - - - -
    投票管理>>获取代码 -
    - - - - - - - - - - - - - - - - - - - -
    在封面或主页模板中使用的标记:
    - - - - - - - - - - - - -
    - - - -
    - -
    -
    在封面或主页模板中使用的JS:
    - -
    默认生成的表单HTML:
    - -
    -
    - - + + + + + 获取代码 + + + + + + + + + + + + + +
    投票管理>>获取代码 +
    + + + + + + + + + + + + + + + + + + + +
    在封面或主页模板中使用的标记:
    + + + + + + + + + + + + +
    + + + +
    + +
    +
    在封面或主页模板中使用的JS:
    + +
    默认生成的表单HTML:
    + +
    +
    + + \ No newline at end of file diff --git a/src/dede/templets/vote_main.htm b/src/admin/templets/vote_main.htm old mode 100755 new mode 100644 similarity index 81% rename from src/dede/templets/vote_main.htm rename to src/admin/templets/vote_main.htm index 58b81b52..a6933659 --- a/src/dede/templets/vote_main.htm +++ b/src/admin/templets/vote_main.htm @@ -1,56 +1,56 @@ -{dede:config.pagesize value='20'/} - - - - - 投票管理 - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - -
    - 投票管理 增加一组投票 -
    投票ID投票名称开始时间结束时间投票总数状态管理
    {dede:field.aid /} - - {dede:field.votename /} - - {dede:field.starttime function="GetDateMk(@me)" /}{dede:field.endtime function="GetDateMk(@me)" /}{dede:field.totalcount /} - 未启用";}else{echo "启用";} ?> - - 代码 - 更改 - 删除 -
    {dede:pagelist listsize='6'/}
    - - +{dede:config.pagesize value='20'/} + + + + + 投票管理 + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + +
    + 投票管理 增加一组投票 +
    投票ID投票名称开始时间结束时间投票总数状态管理
    {dede:field.aid /} + + {dede:field.votename /} + + {dede:field.starttime function="GetDateMk(@me)" /}{dede:field.endtime function="GetDateMk(@me)" /}{dede:field.totalcount /} + 未启用";}else{echo "启用";} ?> + + 代码 + 修改 + 删除 +
    {dede:pagelist listsize='6'/}
    + + \ No newline at end of file diff --git a/src/dede/templets/winmode.htm b/src/admin/templets/winmode.htm old mode 100755 new mode 100644 similarity index 85% rename from src/dede/templets/winmode.htm rename to src/admin/templets/winmode.htm index 4c198b9d..f6c8665d --- a/src/dede/templets/winmode.htm +++ b/src/admin/templets/winmode.htm @@ -1,50 +1,50 @@ - - - - - {dede:wintitle/} - - - - - - - - - - - - - - - - - - - - - - - -
    - Power by DedeBIZV6 OX -
    - - - - -
    -  {dede:wecome_info/} -
    -
    - {dede:winform/} -
    -

    - {dede:lang_cms_powerby/} -
    -
    -

    - - + + + + + {dede:wintitle/} + + + + + + + + + + + + + + + + + + + + + + + +
    + Power by DedeBIZV6 OX +
    + + + + +
    +  {dede:wecome_info/} +
    +
    + {dede:winform/} +
    +

    + {dede:lang_cms_powerby/} +
    +
    +

    + + \ No newline at end of file diff --git a/src/dede/templets/winmodesmall.htm b/src/admin/templets/winmodesmall.htm old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets/winmodesmall.htm rename to src/admin/templets/winmodesmall.htm index d34d5761..435ba2bf --- a/src/dede/templets/winmodesmall.htm +++ b/src/admin/templets/winmodesmall.htm @@ -1,11 +1,11 @@ - - - - -{dede:wintitle/} - - - -{dede:winform/} - + + + + +{dede:wintitle/} + + + +{dede:winform/} + \ No newline at end of file diff --git a/src/dede/templets_main.php b/src/admin/templets_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets_main.php rename to src/admin/templets_main.php index 07a99966..cdf3e257 --- a/src/dede/templets_main.php +++ b/src/admin/templets_main.php @@ -1,45 +1,44 @@ -SetTemplet(DEDEADMIN."/templets/templets_one.htm"); -$dlist->SetSource($sql); -$dlist->display(); - -function GetIsMake($im) -{ - return $im == 1 ? '需编译' : '不编译'; -} +SetTemplet(DEDEADMIN."/templets/templets_one.htm"); +$dlist->SetSource($sql); +$dlist->display(); + +function GetIsMake($im) +{ + return $im == 1 ? '需编译' : '不编译'; +} diff --git a/src/dede/templets_one_add.php b/src/admin/templets_one_add.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/templets_one_add.php rename to src/admin/templets_one_add.php index 1475a542..c9ba2c16 --- a/src/dede/templets_one_add.php +++ b/src/admin/templets_one_add.php @@ -1,44 +1,43 @@ -GetOne("SELECT filename FROM `#@__sgpage` WHERE likeid='$likeid' AND filename LIKE '$filename' "); - if (is_array($row)) { - ShowMsg("已经存在相同的文件名,请更改为其它文件名", "-1"); - exit(); - } - $inQuery = "INSERT INTO `#@__sgpage`(title,keywords,description,template,likeid,ismake,filename,uptime,body) - VALUES('$title','$keywords','$description','$template','$likeid','$ismake','$filename','$uptime','$body'); "; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("增加页面失败,请检内容是否有问题", "-1"); - exit(); - } - $id = $dsql->GetLastID(); - include_once(DEDEINC."/arc.sgpage.class.php"); - $sg = new sgpage($id); - $sg->SaveToHtml(); - ShowMsg("成功增加一个页面", "templets_one.php"); - exit(); -} -$row = $dsql->GetOne("SELECT MAX(aid) AS aid FROM `#@__sgpage` "); -$nowid = is_array($row) ? $row['aid'] + 1 : ''; -include_once(DEDEADMIN."/templets/templets_one_add.htm"); +GetOne("SELECT filename FROM `#@__sgpage` WHERE likeid='$likeid' AND filename LIKE '$filename' "); + if (is_array($row)) { + ShowMsg("已经存在相同的文件名,请修改为其它文件名", "-1"); + exit(); + } + $inQuery = "INSERT INTO `#@__sgpage`(title,keywords,description,template,likeid,ismake,filename,uptime,body) + VALUES('$title','$keywords','$description','$template','$likeid','$ismake','$filename','$uptime','$body'); "; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("增加页面失败,请检内容是否有问题", "-1"); + exit(); + } + $id = $dsql->GetLastID(); + include_once(DEDEINC."/arc.sgpage.class.php"); + $sg = new sgpage($id); + $sg->SaveToHtml(); + ShowMsg("成功增加一个页面", "templets_one.php"); + exit(); +} +$row = $dsql->GetOne("SELECT MAX(aid) AS aid FROM `#@__sgpage` "); +$nowid = is_array($row) ? $row['aid'] + 1 : ''; +include_once(DEDEADMIN."/templets/templets_one_add.htm"); diff --git a/src/dede/templets_one_edit.php b/src/admin/templets_one_edit.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/templets_one_edit.php rename to src/admin/templets_one_edit.php index f2fe2453..96024587 --- a/src/dede/templets_one_edit.php +++ b/src/admin/templets_one_edit.php @@ -1,110 +1,109 @@ -ExecuteNoneQuery($inQuery)) { - ShowMsg("更新页面数据时失败,请检查长相是否有问题", "-1"); - exit(); - } - $sg = new sgpage($aid); - $sg->SaveToHtml(); - ShowMsg("成功修改一个页面", "templets_one.php"); - exit(); -} else if ($dopost == "delete") { - $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'"); - $filename = preg_replace("#\/{1,}#", "/", $cfg_basedir.$cfg_cmspath."/".$row['filename']); - $dsql->ExecuteNoneQuery(" DELETE FROM `#@__sgpage` WHERE aid='$aid' "); - if (is_file($filename)) { - unlink($filename); - } - ShowMsg("成功删除一个页面", "templets_one.php"); - exit(); -} else if ($dopost == "make") { - include_once(DEDEINC."/arc.sgpage.class.php"); - $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'"); - $fileurl = $cfg_cmsurl.'/'.preg_replace("#\/{1,}#", "/", $row['filename']); - $sg = new sgpage($aid); - $sg->SaveToHtml(); - ShowMsg("成功更新一个页面", $fileurl); - exit(); -} else if ($dopost == "mkall") { - include_once(DEDEINC."/arc.sgpage.class.php"); - $dsql->Execute("ex", "SELECT aid FROM `#@__sgpage` "); - $i = 0; - while ($row = $dsql->GetArray("ex")) { - $sg = new sgpage($row['aid']); - $sg->SaveToHtml(); - $i++; - } - ShowMsg("成功更新 $i 个页面", '-1'); - exit(); -} else if ($dopost == "mksel") { - if (empty($ids)) { - $ids = ''; - } - include_once(DEDEINC."/arc.sgpage.class.php"); - $i = 0; - if ($ids == 0) { - ShowMsg('您没有选择需要更新的文档', '-1'); - exit(); - } else if (is_array($ids)) { - foreach ($ids as $aid) { - $sg = new sgpage($aid); - $sg->SaveToHtml(); - $i++; - } - ShowMsg("成功更新 $i 个页面", '-1'); - exit(); - } -} else if ($dopost == "view") { - if (empty($aid)) { - ShowMsg('错误的ID', 'javascript:;'); - exit(); - } - include_once(DEDEINC."/arc.sgpage.class.php"); - $sg = new sgpage($aid); - $sg->display(); - exit(); -} -$row = $dsql->GetOne("SELECT * FROM `#@__sgpage` WHERE aid='$aid' "); -include(DEDEADMIN."/templets/templets_one_edit.htm"); +ExecuteNoneQuery($inQuery)) { + ShowMsg("更新页面数据时失败,请检查长相是否有问题", "-1"); + exit(); + } + $sg = new sgpage($aid); + $sg->SaveToHtml(); + ShowMsg("成功修改一个页面", "templets_one.php"); + exit(); +} else if ($dopost == "delete") { + $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'"); + $filename = preg_replace("#\/{1,}#", "/", $cfg_basedir.$cfg_cmspath."/".$row['filename']); + $dsql->ExecuteNoneQuery(" DELETE FROM `#@__sgpage` WHERE aid='$aid' "); + if (is_file($filename)) { + unlink($filename); + } + ShowMsg("成功删除一个页面", "templets_one.php"); + exit(); +} else if ($dopost == "make") { + include_once(DEDEINC."/arc.sgpage.class.php"); + $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'"); + $fileurl = $cfg_cmsurl.'/'.preg_replace("#\/{1,}#", "/", $row['filename']); + $sg = new sgpage($aid); + $sg->SaveToHtml(); + ShowMsg("成功更新一个页面", $fileurl); + exit(); +} else if ($dopost == "mkall") { + include_once(DEDEINC."/arc.sgpage.class.php"); + $dsql->Execute("ex", "SELECT aid FROM `#@__sgpage` "); + $i = 0; + while ($row = $dsql->GetArray("ex")) { + $sg = new sgpage($row['aid']); + $sg->SaveToHtml(); + $i++; + } + ShowMsg("成功更新 $i 个页面", '-1'); + exit(); +} else if ($dopost == "mksel") { + if (empty($ids)) { + $ids = ''; + } + include_once(DEDEINC."/arc.sgpage.class.php"); + $i = 0; + if ($ids == 0) { + ShowMsg('您没有选择需要更新的文档', '-1'); + exit(); + } else if (is_array($ids)) { + foreach ($ids as $aid) { + $sg = new sgpage($aid); + $sg->SaveToHtml(); + $i++; + } + ShowMsg("成功更新 $i 个页面", '-1'); + exit(); + } +} else if ($dopost == "view") { + if (empty($aid)) { + ShowMsg('错误的ID', 'javascript:;'); + exit(); + } + include_once(DEDEINC."/arc.sgpage.class.php"); + $sg = new sgpage($aid); + $sg->display(); + exit(); +} +$row = $dsql->GetOne("SELECT * FROM `#@__sgpage` WHERE aid='$aid' "); +include(DEDEADMIN."/templets/templets_one_edit.htm"); diff --git a/src/dede/templets_tagsource.php b/src/admin/templets_tagsource.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/templets_tagsource.php rename to src/admin/templets_tagsource.php index e2fa2eed..16927a89 --- a/src/dede/templets_tagsource.php +++ b/src/admin/templets_tagsource.php @@ -1,32 +1,31 @@ - - - - - - 系统运行目录权限检测 - - - - - - - '; - $reval = false; - if (empty($rootDir)) $rootDir = DEDEROOT; - if (TestWriteable($d)) { - @file_put_contents($d.'/'.$filename, $testStr); - $remoteUrl = $siteuRL.'/'.str_replace($rootDir, '', str_replace("\\", '/', realpath($d))).'/'.$filename; - $tempStr = @PostHost($remoteUrl); - - $reval = (md5($d) == trim($tempStr)) ? true : false; - unlink($d.'/'.$filename); - return $reval; - } else { - return -1; - } - } - } - - - if (!function_exists('PostHost')) { - function PostHost($host, $data = '', $method = 'GET', $showagent = null, $port = null, $timeout = 30) - { - $parse = @parse_url($host); - if (empty($parse)) return false; - if ((int)$port > 0) { - $parse['port'] = $port; - } elseif (!@$parse['port']) { - $parse['port'] = '80'; - } - $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://").$parse['host']; - if (!$fp = @fsockopen($parse['host'], $parse['port'], $errnum, $errstr, $timeout)) { - return false; - } - $method = strtoupper($method); - $wlength = $wdata = $responseText = ''; - $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path'])."?".@$parse['query']; - if ($method == 'GET') { - $separator = @$parse['query'] ? '&' : ''; - substr($data, 0, 1) == '&' && $data = substr($data, 1); - $parse['path'] .= $separator.$data; - } elseif ($method == 'POST') { - $wlength = "Content-length: ".strlen($data)."\r\n"; - $wdata = $data; - } - $write = "$method $parse[path] HTTP/1.0\r\nHost: $parse[host]\r\nContent-type: application/x-www-form-urlencoded\r\n{$wlength}Connection: close\r\n\r\n$wdata"; - @fwrite($fp, $write); - while ($data = @fread($fp, 4096)) { - $responseText .= $data; - } - @fclose($fp); - empty($showagent) && $responseText = trim(stristr($responseText, "\r\n\r\n"), "\r\n"); - return $responseText; - } - } - - $allPath = array(); - $needDir = "$cfg_medias_dir| - $cfg_image_dir| - $ddcfg_image_dir| - $cfg_user_dir| - $cfg_soft_dir| - $cfg_other_medias| - $cfg_medias_dir/flink| - $cfg_cmspath/data| - $cfg_cmspath/data/$cfg_backup_dir| - $cfg_cmspath/data/textdata| - $cfg_cmspath/data/sessions| - $cfg_cmspath/data/tplcache| - $cfg_cmspath/data/admin| - $cfg_cmspath/data/enums| - $cfg_cmspath/data/mark| - $cfg_cmspath/data/module| - $cfg_cmspath/data/rss| - $cfg_special| - $cfg_cmspath$cfg_arcdir"; - $needDir = explode('|', $needDir); - foreach ($needDir as $key => $val) { - $allPath[trim($val)] = array( - 'read' => true, // 读取 - 'write' => true, // 写入 - 'execute' => false // 执行 - ); - } - - - // 所有栏目目录 - $sql = "SELECT typedir FROM #@__arctype ORDER BY id DESC"; - $dsql->SetQuery($sql); - $dsql->Execute('al', $sql); - while ($row = $dsql->GetArray('al')) { - $typedir = str_replace($cfg_basehost, '', $row['typedir']); - if (preg_match("/^http:|^ftp:/i", $row['typedir'])) continue; - $typedir = str_replace("{cmspath}", $cfg_cmspath, $row['typedir']); - $allPath[trim($typedir)] = array( - 'read' => true, // 读取 - 'write' => true, // 写入 - 'execute' => false // 执行 - ); - } - - // 只允许读取,不允许写入的目录 - $needDir = array( - 'include', - 'member', - 'plus', - ); - // 获取子目录 - function GetSondir($d, &$dirname = array()) - { - $dh = dir($d); - while ($filename = $dh->read()) { - if ( - substr($filename, 0, 1) == '.' || is_file($d.'/'.$filename) || - preg_match("#^(svn|bak-)#i", $filename) - ) { - continue; - } - if (is_dir($d.'/'.$filename)) { - $dirname[] = $d.'/'.$filename; - GetSondir($d.'/'.$filename, $dirname); - } - } - $dh->close(); - return $dirname; - } - - //获取所有文件列表 - function preg_ls($path = ".", $rec = FALSE, $pat = "/.*/", $ignoredir = '') - { - while (substr($path, -1, 1) == "/") { - $path = substr($path, 0, -1); - } - if (!is_dir($path)) { - $path = dirname($path); - } - if ($rec !== TRUE) { - $rec = FALSE; - } - $d = dir($path); - $ret = array(); - while (FALSE !== ($e = $d->read())) { - if (($e == ".") || ($e == "..")) { - continue; - } - if ($rec && is_dir($path."/".$e) && ($ignoredir == '' || strpos($ignoredir, $e) === FALSE)) { - $ret = array_merge($ret, preg_ls($path."/".$e, $rec, $pat, $ignoredir)); - continue; - } - if (!preg_match($pat, $e)) { - continue; - } - $ret[] = $path."/".$e; - } - return (empty($ret) && preg_match($pat, basename($path))) ? array($path."/") : $ret; - } - - foreach ($needDir as $key => $val) { - $allPath[trim('/'.$val)] = array( - 'read' => true, // 读取 - 'write' => false, // 写入 - 'execute' => true // 执行 - ); - $sonDir = GetSondir(DEDEROOT.'/'.$val); - foreach ($sonDir as $kk => $vv) { - $vv = trim(str_replace(DEDEROOT, '', $vv)); - $allPath[$vv] = array( - 'read' => true, // 读取 - 'write' => false, // 写入 - 'execute' => true // 执行 - ); - } - } - - // 不需要执行的 - $needDir = array( - '/images', - '/templets' - ); - foreach ($needDir as $key => $val) { - $allPath[trim('/'.$val)] = array( - 'read' => true, // 读取 - 'write' => false, // 写入 - 'execute' => false // 执行 - ); - $sonDir = GetSondir(DEDEROOT.'/'.$val); - foreach ($sonDir as $kk => $vv) { - $vv = trim(str_replace(DEDEROOT.'/', '', $vv)); - $allPath[$vv] = array( - 'read' => true, // 读取 - 'write' => false, // 写入 - 'execute' => false // 执行 - ); - } - } - - // 所有js建议只读 - $jsDir = array( - '/images', - '/templets', - '/include' - ); - foreach ($jsDir as $k => $v) { - $jsfiles = preg_ls(DEDEROOT.$v, TRUE, "/.*\.(js)$/i"); - foreach ($jsfiles as $k => $v) { - $vv = trim(str_replace(DEDEROOT.'/', '/', $v)); - $allPath[$vv] = array( - 'read' => true, // 读取 - 'write' => false, // 写入 - 'execute' => false // 执行 - ); - } - } - ?> -
    -
    -
    系统运行目录权限检测返回主页帮助说明
    -
    -
    说明:本程序用于检测DedeBIZ站点所涉及的目录权限,并且提供一个全面的检测说明,您可以根据检测报告来配置站点以保证站点更为安全。
    -
    - - - - - - - - - -
    目录执行读取写入
    -
    -
    -
    - - - -
    -
    -
    -
    -
    -
    -
    - + + + + + + 系统运行目录权限检测 + + + + + + + '; + $reval = false; + if (empty($rootDir)) $rootDir = DEDEROOT; + if (TestWriteable($d)) { + @file_put_contents($d.'/'.$filename, $testStr); + $remoteUrl = $siteuRL.'/'.str_replace($rootDir, '', str_replace("\\", '/', realpath($d))).'/'.$filename; + $tempStr = @PostHost($remoteUrl); + + $reval = (md5($d) == trim($tempStr)) ? true : false; + unlink($d.'/'.$filename); + return $reval; + } else { + return -1; + } + } + } + + + if (!function_exists('PostHost')) { + function PostHost($host, $data = '', $method = 'GET', $showagent = null, $port = null, $timeout = 30) + { + $parse = @parse_url($host); + if (empty($parse)) return false; + if ((int)$port > 0) { + $parse['port'] = $port; + } elseif (!@$parse['port']) { + $parse['port'] = '80'; + } + $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://").$parse['host']; + if (!$fp = @fsockopen($parse['host'], $parse['port'], $errnum, $errstr, $timeout)) { + return false; + } + $method = strtoupper($method); + $wlength = $wdata = $responseText = ''; + $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path'])."?".@$parse['query']; + if ($method == 'GET') { + $separator = @$parse['query'] ? '&' : ''; + substr($data, 0, 1) == '&' && $data = substr($data, 1); + $parse['path'] .= $separator.$data; + } elseif ($method == 'POST') { + $wlength = "Content-length: ".strlen($data)."\r\n"; + $wdata = $data; + } + $write = "$method $parse[path] HTTP/1.0\r\nHost: $parse[host]\r\nContent-type: application/x-www-form-urlencoded\r\n{$wlength}Connection: close\r\n\r\n$wdata"; + @fwrite($fp, $write); + while ($data = @fread($fp, 4096)) { + $responseText .= $data; + } + @fclose($fp); + empty($showagent) && $responseText = trim(stristr($responseText, "\r\n\r\n"), "\r\n"); + return $responseText; + } + } + + $allPath = array(); + $needDir = "$cfg_medias_dir| + $cfg_image_dir| + $ddcfg_image_dir| + $cfg_user_dir| + $cfg_soft_dir| + $cfg_other_medias| + $cfg_medias_dir/flink| + $cfg_cmspath/data| + $cfg_cmspath/data/$cfg_backup_dir| + $cfg_cmspath/data/textdata| + $cfg_cmspath/data/sessions| + $cfg_cmspath/data/tplcache| + $cfg_cmspath/data/admin| + $cfg_cmspath/data/enums| + $cfg_cmspath/data/mark| + $cfg_cmspath/data/module| + $cfg_cmspath/data/rss| + $cfg_special| + $cfg_cmspath$cfg_arcdir"; + $needDir = explode('|', $needDir); + foreach ($needDir as $key => $val) { + $allPath[trim($val)] = array( + 'read' => true, //读取 + 'write' => true, //写入 + 'execute' => false //执行 + ); + } + + + //所有栏目目录 + $sql = "SELECT typedir FROM #@__arctype ORDER BY id DESC"; + $dsql->SetQuery($sql); + $dsql->Execute('al', $sql); + while ($row = $dsql->GetArray('al')) { + $typedir = str_replace($cfg_basehost, '', $row['typedir']); + if (preg_match("/^http:|^ftp:/i", $row['typedir'])) continue; + $typedir = str_replace("{cmspath}", $cfg_cmspath, $row['typedir']); + $allPath[trim($typedir)] = array( + 'read' => true, //读取 + 'write' => true, //写入 + 'execute' => false //执行 + ); + } + + //只允许读取,不允许写入的目录 + $needDir = array( + 'include', + 'member', + 'plus', + ); + //获取子目录 + function GetSondir($d, &$dirname = array()) + { + $dh = dir($d); + while ($filename = $dh->read()) { + if ( + substr($filename, 0, 1) == '.' || is_file($d.'/'.$filename) || + preg_match("#^(svn|bak-)#i", $filename) + ) { + continue; + } + if (is_dir($d.'/'.$filename)) { + $dirname[] = $d.'/'.$filename; + GetSondir($d.'/'.$filename, $dirname); + } + } + $dh->close(); + return $dirname; + } + + //获取所有文件列表 + function preg_ls($path = ".", $rec = FALSE, $pat = "/.*/", $ignoredir = '') + { + while (substr($path, -1, 1) == "/") { + $path = substr($path, 0, -1); + } + if (!is_dir($path)) { + $path = dirname($path); + } + if ($rec !== TRUE) { + $rec = FALSE; + } + $d = dir($path); + $ret = array(); + while (FALSE !== ($e = $d->read())) { + if (($e == ".") || ($e == "..")) { + continue; + } + if ($rec && is_dir($path."/".$e) && ($ignoredir == '' || strpos($ignoredir, $e) === FALSE)) { + $ret = array_merge($ret, preg_ls($path."/".$e, $rec, $pat, $ignoredir)); + continue; + } + if (!preg_match($pat, $e)) { + continue; + } + $ret[] = $path."/".$e; + } + return (empty($ret) && preg_match($pat, basename($path))) ? array($path."/") : $ret; + } + + foreach ($needDir as $key => $val) { + $allPath[trim('/'.$val)] = array( + 'read' => true, //读取 + 'write' => false, //写入 + 'execute' => true //执行 + ); + $sonDir = GetSondir(DEDEROOT.'/'.$val); + foreach ($sonDir as $kk => $vv) { + $vv = trim(str_replace(DEDEROOT, '', $vv)); + $allPath[$vv] = array( + 'read' => true, //读取 + 'write' => false, //写入 + 'execute' => true //执行 + ); + } + } + + //不需要执行的 + $needDir = array( + '/images', + '/templets' + ); + foreach ($needDir as $key => $val) { + $allPath[trim('/'.$val)] = array( + 'read' => true, //读取 + 'write' => false, //写入 + 'execute' => false //执行 + ); + $sonDir = GetSondir(DEDEROOT.'/'.$val); + foreach ($sonDir as $kk => $vv) { + $vv = trim(str_replace(DEDEROOT.'/', '', $vv)); + $allPath[$vv] = array( + 'read' => true, //读取 + 'write' => false, //写入 + 'execute' => false //执行 + ); + } + } + + //所有js建议只读 + $jsDir = array( + '/images', + '/templets', + '/include' + ); + foreach ($jsDir as $k => $v) { + $jsfiles = preg_ls(DEDEROOT.$v, TRUE, "/.*\.(js)$/i"); + foreach ($jsfiles as $k => $v) { + $vv = trim(str_replace(DEDEROOT.'/', '/', $v)); + $allPath[$vv] = array( + 'read' => true, //读取 + 'write' => false, //写入 + 'execute' => false //执行 + ); + } + } + ?> +
    +
    +
    系统运行目录权限检测返回主页帮助说明
    +
    +
    说明:本程序用于检测DedeBIZ站点所涉及的目录权限,并且提供一个全面的检测说明,您可以根据检测报告来配置站点以保证站点更为安全。
    +
    + + + + + + + + + +
    目录执行读取写入
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/src/dede/tpl.php b/src/admin/tpl.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/tpl.php rename to src/admin/tpl.php index 93589b68..12ca4be1 --- a/src/dede/tpl.php +++ b/src/admin/tpl.php @@ -1,5 +1,4 @@ ".${"voteitem".$i}."\r\n"; - } - } - $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable) - VALUES('$votename','$starttime','$endtime','0','$ismore','$voteitems','$isallow','$view','$spec','$isenable'); "; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("增加投票失败,请检查数据是否非法", "-1"); - exit(); - } - $aid = $dsql->GetLastID(); - $vt = new DedeVote($aid); - $vote_content = $vt->GetVoteForm(); - $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 - $vote_content = 'document.write("'.$vote_content.'");'; - - $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; - file_put_contents($vote_file, $vote_content); - ShowMsg("成功增加一组投票", "vote_main.php"); - exit(); -} else if ($dopost == "save" && $isarc == 1) { - $starttime = GetMkTime($starttime); - $endtime = GetMkTime($endtime); - $voteitems = ""; - - $j = 0; - for ($i = 1; $i <= 15; $i++) { - if (!empty(${"voteitem".$i})) { - $j++; - $voteitems .= "".${"voteitem".$i}."\r\n"; - } - } - $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable) - VALUES('$votename','$starttime','$endtime','0','$ismore','$voteitems','$isallow','$view','$spec','$isenable'); "; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("增加投票失败,请检查数据是否非法", "-1"); - exit(); - } - $aid = $dsql->GetLastID(); - $vt = new DedeVote($aid); - $vote_content = $vt->GetVoteForm(); - $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 - $vote_content = 'document.write("'.$vote_content.'");'; - - $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; - file_put_contents($vote_file, $vote_content); - ShowMsg("成功增加一组投票", "vote_main.php?issel=1&aid=".$aid); - exit(); -} -$startDay = time(); -$endDay = AddDay($startDay, 30); -$startDay = GetDateTimeMk($startDay); -$endDay = GetDateTimeMk($endDay); -include DedeInclude('templets/vote_add.htm'); +".${"voteitem".$i}."\r\n"; + } + } + $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable) + VALUES('$votename','$starttime','$endtime','0','$ismore','$voteitems','$isallow','$view','$spec','$isenable'); "; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("增加投票失败,请检查数据是否非法", "-1"); + exit(); + } + $aid = $dsql->GetLastID(); + $vt = new DedeVote($aid); + $vote_content = $vt->GetVoteForm(); + $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 + $vote_content = 'document.write("'.$vote_content.'");'; + + $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; + file_put_contents($vote_file, $vote_content); + ShowMsg("成功增加一组投票", "vote_main.php"); + exit(); +} else if ($dopost == "save" && $isarc == 1) { + $starttime = GetMkTime($starttime); + $endtime = GetMkTime($endtime); + $voteitems = ""; + + $j = 0; + for ($i = 1; $i <= 15; $i++) { + if (!empty(${"voteitem".$i})) { + $j++; + $voteitems .= "".${"voteitem".$i}."\r\n"; + } + } + $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable) + VALUES('$votename','$starttime','$endtime','0','$ismore','$voteitems','$isallow','$view','$spec','$isenable'); "; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("增加投票失败,请检查数据是否非法", "-1"); + exit(); + } + $aid = $dsql->GetLastID(); + $vt = new DedeVote($aid); + $vote_content = $vt->GetVoteForm(); + $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 + $vote_content = 'document.write("'.$vote_content.'");'; + + $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; + file_put_contents($vote_file, $vote_content); + ShowMsg("成功增加一组投票", "vote_main.php?issel=1&aid=".$aid); + exit(); +} +$startDay = time(); +$endDay = AddDay($startDay, 30); +$startDay = GetDateTimeMk($startDay); +$endDay = GetDateTimeMk($endDay); +include DedeInclude('templets/vote_add.htm'); diff --git a/src/dede/vote_edit.php b/src/admin/vote_edit.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/vote_edit.php rename to src/admin/vote_edit.php index 855129b2..8192c761 --- a/src/dede/vote_edit.php +++ b/src/admin/vote_edit.php @@ -1,64 +1,63 @@ -ExecuteNoneQuery("DELETE FROM `#@__vote` WHERE aid='$aid'")) { - if ($dsql->ExecuteNoneQuery("DELETE FROM `#@__vote_member` WHERE voteid='$aid'")) { - ShowMsg('成功删除一组投票!', $ENV_GOBACK_URL); - exit; - } - } else { - ShowMsg('指定删除投票不存在!', $ENV_GOBACK_URL); - exit; - } -} else if ($dopost == "saveedit") { - CheckCSRF(); - $starttime = GetMkTime($starttime); - $endtime = GetMkTime($endtime); - $query = "UPDATE `#@__vote` SET votename='$votename', - starttime='$starttime', - endtime='$endtime', - totalcount='$totalcount', - ismore='$ismore', - votenote='$votenote', - isallow='$isallow', - view='$view', - spec='$spec', - isenable='$isenable' - WHERE aid='$aid' - "; - if ($dsql->ExecuteNoneQuery($query)) { - $vt = new DedeVote($aid); - $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; - $vote_content = $vt->GetVoteForm(); - $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 - $vote_content = 'document.write("'.$vote_content.'");'; - file_put_contents($vote_file, $vote_content); - ShowMsg('成功更改一组投票!', $ENV_GOBACK_URL); - } else { - ShowMsg('更改一组投票失败!', $ENV_GOBACK_URL); - } -} else { - $row = $dsql->GetOne("SELECT * FROM #@__vote WHERE aid='$aid'"); - if (!is_array($row)) { - ShowMsg('指定投票不存在', '-1'); - exit(); - } - include DedeInclude('templets/vote_edit.htm'); -} +ExecuteNoneQuery("DELETE FROM `#@__vote` WHERE aid='$aid'")) { + if ($dsql->ExecuteNoneQuery("DELETE FROM `#@__vote_member` WHERE voteid='$aid'")) { + ShowMsg('成功删除一组投票!', $ENV_GOBACK_URL); + exit; + } + } else { + ShowMsg('指定删除投票不存在!', $ENV_GOBACK_URL); + exit; + } +} else if ($dopost == "saveedit") { + CheckCSRF(); + $starttime = GetMkTime($starttime); + $endtime = GetMkTime($endtime); + $query = "UPDATE `#@__vote` SET votename='$votename', + starttime='$starttime', + endtime='$endtime', + totalcount='$totalcount', + ismore='$ismore', + votenote='$votenote', + isallow='$isallow', + view='$view', + spec='$spec', + isenable='$isenable' + WHERE aid='$aid' + "; + if ($dsql->ExecuteNoneQuery($query)) { + $vt = new DedeVote($aid); + $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; + $vote_content = $vt->GetVoteForm(); + $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 + $vote_content = 'document.write("'.$vote_content.'");'; + file_put_contents($vote_file, $vote_content); + ShowMsg('成功修改一组投票!', $ENV_GOBACK_URL); + } else { + ShowMsg('修改一组投票失败!', $ENV_GOBACK_URL); + } +} else { + $row = $dsql->GetOne("SELECT * FROM #@__vote WHERE aid='$aid'"); + if (!is_array($row)) { + ShowMsg('指定投票不存在', '-1'); + exit(); + } + include DedeInclude('templets/vote_edit.htm'); +} diff --git a/src/dede/vote_getcode.php b/src/admin/vote_getcode.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/vote_getcode.php rename to src/admin/vote_getcode.php index c9accd49..30fc7ecd --- a/src/dede/vote_getcode.php +++ b/src/admin/vote_getcode.php @@ -1,15 +1,14 @@ -SetParameter('issel', $issel); - $dlist->SetTemplet(DEDEADMIN."/templets/vote_select.htm"); -} else { - $dlist->SetTemplet(DEDEADMIN."/templets/vote_main.htm"); -} -$dlist->SetSource($sql); -$dlist->display(); +SetParameter('issel', $issel); + $dlist->SetTemplet(DEDEADMIN."/templets/vote_select.htm"); +} else { + $dlist->SetTemplet(DEDEADMIN."/templets/vote_main.htm"); +} +$dlist->SetSource($sql); +$dlist->display(); diff --git a/src/data/admin/ver.txt b/src/data/admin/ver.txt index 5d5cc26b..39699c2b 100755 --- a/src/data/admin/ver.txt +++ b/src/data/admin/ver.txt @@ -1 +1 @@ -20201030 \ No newline at end of file +20220225 \ No newline at end of file diff --git a/src/data/admin/verifies.txt b/src/data/admin/verifies.txt index e2983bed..39699c2b 100755 --- a/src/data/admin/verifies.txt +++ b/src/data/admin/verifies.txt @@ -1 +1 @@ -20201022 \ No newline at end of file +20220225 \ No newline at end of file diff --git a/src/data/admin/writer.txt b/src/data/admin/writer.txt index 99dc1179..34705696 100755 --- a/src/data/admin/writer.txt +++ b/src/data/admin/writer.txt @@ -1 +1 @@ -秩名,网络,消息 \ No newline at end of file +天涯,叙述 \ No newline at end of file diff --git a/src/data/safe/inc_safe_config.php b/src/data/safe/inc_safe_config.php index 343c1c45..20965ad1 100755 --- a/src/data/safe/inc_safe_config.php +++ b/src/data/safe/inc_safe_config.php @@ -10,5 +10,4 @@ $safe_faq_reg = '0'; $safe_faq_send = '0'; $safe_faq_msg = '1'; $safe_faqs = 'a:4:{i:1;a:2:{s:8:"question";s:37:"您最喜欢的网建程序是什么?";s:6:"answer";s:7:"DedeCMS";}i:2;a:2:{s:8:"question";s:6:"1+11=?";s:6:"answer";s:2:"12";}i:3;a:2:{s:8:"question";s:59:"中国哪项体育运动最让人听着伤心,看着揪心?";s:6:"answer";s:6:"足球";}i:4;a:2:{s:8:"question";s:29:"";s:6:"answer";s:24:"织梦内容管理系统";}}'; - -?> +?> \ No newline at end of file diff --git a/src/data/safequestions.php b/src/data/safequestions.php index 05c41bdd..6bda2cd7 100755 --- a/src/data/safequestions.php +++ b/src/data/safequestions.php @@ -16,8 +16,6 @@ $safequestions[7] = '您最喜欢的歌曲是什么?'; //end**************************** - - //以下不要修改 function GetSafequestion($selid=0,$formname='safequestion') { diff --git a/src/data/smiley.data.php b/src/data/smiley.data.php index 86c6b6a0..cadbe4eb 100755 --- a/src/data/smiley.data.php +++ b/src/data/smiley.data.php @@ -1,5 +1,5 @@ array('1.gif', '24', '24', '高兴'), diff --git a/src/data/tag/sql.inc.php b/src/data/tag/sql.inc.php index cd5ac1f0..0902c95f 100755 --- a/src/data/tag/sql.inc.php +++ b/src/data/tag/sql.inc.php @@ -1,7 +1,7 @@ - - - - 图片浏览器 - - - - - - - -
    - 关闭预览 -
    - - - - - - -
    - - - - - - - - - - - read()) { - //计算文件大小和创建时间 - if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { - $filesize = filesize("$inpath/$file"); - $filesize = $filesize / 1024; - if ($filesize != "") - if ($filesize < 0.1) { - @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1.".".substr($ty2, 0, 2); - } else { - @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1.".".substr($ty2, 0, 1); - } - $filetime = filemtime("$inpath/$file"); - $filetime = MyDate("Y-m-d H:i", $filetime); - } - if ($file == ".") continue; - else if ($file == "..") { - if ($activepath == "") continue; - $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); - $line = "\n - - - "; - echo $line; - } else if (is_dir("$inpath/$file")) { - if (preg_match("#^_(.*)$#i", $file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录 - if (preg_match("#^\.(.*)$#i", $file)) continue; - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) { - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $line = "\n - - - - - "; - echo "$line"; - } else if (preg_match("#\.(jpg)#i", $file)) { - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $line = "\n - - - - - "; - echo "$line"; - } - } //End Loop - $dh->close(); - ?> - - - -
    预览选择图片文件大小修改时间
    点击V预览图片,点击图片名选择图片,显示图片后点击该图片关闭预览
    - 上级目录当前目录:$activepath
    - $file
    - $file$filesize KB$filetime
    $file$filesize KB$filetime
    - - - " : ''; - echo $noeditor; ?> - - - - - - - - - - -
    - 上传: - - - 宽: - 高: - -
    -
    -
    - - \ No newline at end of file diff --git a/src/dede/dialog/select_media.php b/src/dede/dialog/select_media.php deleted file mode 100755 index 2b70e393..00000000 --- a/src/dede/dialog/select_media.php +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - 媒体文件管理器 - - - - - - - - - - - - - - - read()) { - //-----计算文件大小和创建时间 - if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { - $filesize = filesize("$inpath/$file"); - $filesize = $filesize / 1024; - if ($filesize != "") - if ($filesize < 0.1) { - @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1.".".substr($ty2, 0, 2); - } else { - @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1.".".substr($ty2, 0, 1); - } - $filetime = filemtime("$inpath/$file"); - $filetime = MyDate("Y-m-d H:i:s", $filetime); - } - - //------判断文件类型并作处理 - if ($file == ".") continue; - else if ($file == "..") { - if ($activepath == "") continue; - $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); - $line = "\n - - - \r\n"; - echo $line; - } else if (is_dir("$inpath/$file")) { - if (preg_match("#^_(.*)$#i", $file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录 - if (preg_match("#^\.(.*)$#i", $file)) continue; - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(swf|fly|fla|flv)#i", $file)) { - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(wmv|avi)#i", $file)) { - - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(rm|rmvb)#i", $file)) { - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(mp3|wma)#", $file)) { - - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - - $line = "\n - - - - "; - echo "$line"; - } - } //End Loop - $dh->close(); - ?> - - - - -
    点击名称选择文件文件大小最后修改时间
    上级目录 当前目录:$activepath
    - $file - --
    - $file - $filesize KB$filetime
    - $file - $filesize KB$filetime
    - $file - $filesize KB$filetime
    - $file - $filesize KB$filetime
    - - - - - - - - - - - -
    -  上 传:   -
    - -
    - - - - \ No newline at end of file diff --git a/src/dede/images/biz.gif b/src/dede/images/biz.gif deleted file mode 100755 index b11a0eae..00000000 Binary files a/src/dede/images/biz.gif and /dev/null differ diff --git a/src/dede/images/btn_fullscan.gif b/src/dede/images/btn_fullscan.gif deleted file mode 100755 index 4ea412e7..00000000 Binary files a/src/dede/images/btn_fullscan.gif and /dev/null differ diff --git a/src/dede/images/btn_scan.gif b/src/dede/images/btn_scan.gif deleted file mode 100755 index 3542afab..00000000 Binary files a/src/dede/images/btn_scan.gif and /dev/null differ diff --git a/src/dede/images/dfpic.gif b/src/dede/images/dfpic.gif deleted file mode 100755 index 7124bce6..00000000 Binary files a/src/dede/images/dfpic.gif and /dev/null differ diff --git a/src/dede/images/ico_spider.gif b/src/dede/images/ico_spider.gif deleted file mode 100755 index 2469f6e3..00000000 Binary files a/src/dede/images/ico_spider.gif and /dev/null differ diff --git a/src/dede/images/login-bg.jpg b/src/dede/images/login-bg.jpg deleted file mode 100755 index 7b8d507e..00000000 Binary files a/src/dede/images/login-bg.jpg and /dev/null differ diff --git a/src/dede/images/style1/admin_top_bg.jpg b/src/dede/images/style1/admin_top_bg.jpg deleted file mode 100755 index 97d26a04..00000000 Binary files a/src/dede/images/style1/admin_top_bg.jpg and /dev/null differ diff --git a/src/dede/images/style1/admin_top_logo.gif b/src/dede/images/style1/admin_top_logo.gif deleted file mode 100755 index 76dce1aa..00000000 Binary files a/src/dede/images/style1/admin_top_logo.gif and /dev/null differ diff --git a/src/dede/images/style1/dlgtitle.gif b/src/dede/images/style1/dlgtitle.gif deleted file mode 100755 index a54ae9f2..00000000 Binary files a/src/dede/images/style1/dlgtitle.gif and /dev/null differ diff --git a/src/dede/images/style1/style.css b/src/dede/images/style1/style.css deleted file mode 100755 index e69de29b..00000000 diff --git a/src/dede/images/style2/admin_top_bg.gif b/src/dede/images/style2/admin_top_bg.gif deleted file mode 100755 index 72874046..00000000 Binary files a/src/dede/images/style2/admin_top_bg.gif and /dev/null differ diff --git a/src/dede/images/style2/admin_top_logo.gif b/src/dede/images/style2/admin_top_logo.gif deleted file mode 100755 index c0425f02..00000000 Binary files a/src/dede/images/style2/admin_top_logo.gif and /dev/null differ diff --git a/src/dede/images/style2/dlgtitle.gif b/src/dede/images/style2/dlgtitle.gif deleted file mode 100755 index a861ad0c..00000000 Binary files a/src/dede/images/style2/dlgtitle.gif and /dev/null differ diff --git a/src/dede/images/style2/leftbg2.gif b/src/dede/images/style2/leftbg2.gif deleted file mode 100755 index 25ee9a5f..00000000 Binary files a/src/dede/images/style2/leftbg2.gif and /dev/null differ diff --git a/src/dede/images/style2/style.css b/src/dede/images/style2/style.css deleted file mode 100755 index d9a69f17..00000000 --- a/src/dede/images/style2/style.css +++ /dev/null @@ -1,63 +0,0 @@ -.top { - height:47px; - width:100%; - background-image: linear-gradient(135deg, #6561FE 0%, #1C6F93 100%); - overflow:hidden; - clear:both; -} -.top .top_link ul li.welcome { - border-right: medium none; - color: #FFF; - padding-right: 6px; -} -.top .top_link ul li a { - color: #FFF; - padding-left: 11px; - padding-right: 11px; - text-decoration: none; -} -.dbox dt.lside { - background-color:rgb(198, 222, 242); - border-bottom: 1px solid #8EBCDE; -} -.dbox { - border: 1px solid #8EBCDE; - margin-left: 1%; - margin-top: 8px; - width: 98%; -} -.dbox dt { - color: #3B5995; - cursor: move; - font-weight: bold; - height: 28px; - line-height: 28px; -} -a b { - color: #3B5995; -} -b, strong { - color: #3B5995; -} -.topnav { - background: url("admin_top_bg.gif") repeat-x scroll left -37px transparent; - clear: both; - height: 29px; - overflow: hidden; - width: 100%; -} -a.mmac div { - background: url("leftbg2.gif") no-repeat scroll 0 0 transparent; - color: #325304; - font-weight: bold; - height: 37px !important; - padding: 6px 4px 4px 10px; - word-wrap: break-word; -} -a.mm:hover div { - background:url(leftbg2.gif) no-repeat; - color:#4F7632; -} -dl.bitem dt b, dl.bitem2 dt b { - color: #594C36; -} \ No newline at end of file diff --git a/src/dede/images/style3/admin_top_bg.gif b/src/dede/images/style3/admin_top_bg.gif deleted file mode 100755 index 2fe670e7..00000000 Binary files a/src/dede/images/style3/admin_top_bg.gif and /dev/null differ diff --git a/src/dede/images/style3/admin_top_logo.gif b/src/dede/images/style3/admin_top_logo.gif deleted file mode 100755 index aa490649..00000000 Binary files a/src/dede/images/style3/admin_top_logo.gif and /dev/null differ diff --git a/src/dede/images/style3/dlgtitle.gif b/src/dede/images/style3/dlgtitle.gif deleted file mode 100755 index 78221e7b..00000000 Binary files a/src/dede/images/style3/dlgtitle.gif and /dev/null differ diff --git a/src/dede/images/style3/leftbg2.gif b/src/dede/images/style3/leftbg2.gif deleted file mode 100755 index 2720f1ab..00000000 Binary files a/src/dede/images/style3/leftbg2.gif and /dev/null differ diff --git a/src/dede/images/style3/style.css b/src/dede/images/style3/style.css deleted file mode 100755 index 7227d89b..00000000 --- a/src/dede/images/style3/style.css +++ /dev/null @@ -1,63 +0,0 @@ -.top { - height:47px; - width:100%; - background-image: linear-gradient(135deg, #856404 0%, #8B7859 100%); - overflow:hidden; - clear:both; -} -.top .top_link ul li.welcome { - border-right: medium none; - color: #FFF; - padding-right: 6px; -} -.top .top_link ul li a { - color: #FFF; - padding-left: 11px; - padding-right: 11px; - text-decoration: none; -} -.dbox dt.lside { - background: rgb(207, 194, 176); - border-bottom: 1px solid #B1A27B; -} -.dbox { - border: 1px solid #B1A27B; - margin-left: 1%; - margin-top: 8px; - width: 98%; -} -.dbox dt { - color: #594C36; - cursor: move; - font-weight: bold; - height: 28px; - line-height: 28px; -} -a b { - color: #594C36; -} -b, strong { - color: #594C36; -} -.topnav { - background: url("admin_top_bg.gif") repeat-x scroll left -37px transparent; - clear: both; - height: 29px; - overflow: hidden; - width: 100%; -} -a.mmac div { - background: url("leftbg2.gif") no-repeat scroll 0 0 transparent; - color: #325304; - font-weight: bold; - height: 37px !important; - padding: 6px 4px 4px 10px; - word-wrap: break-word; -} -a.mm:hover div { - background:url(leftbg2.gif) no-repeat; - color:#4F7632; -} -dl.bitem dt b, dl.bitem2 dt b { - color: #594C36; -} \ No newline at end of file diff --git a/src/dede/images/style4/admin_top_bg.gif b/src/dede/images/style4/admin_top_bg.gif deleted file mode 100755 index e371dbb6..00000000 Binary files a/src/dede/images/style4/admin_top_bg.gif and /dev/null differ diff --git a/src/dede/images/style4/admin_top_logo.gif b/src/dede/images/style4/admin_top_logo.gif deleted file mode 100755 index 924c7eba..00000000 Binary files a/src/dede/images/style4/admin_top_logo.gif and /dev/null differ diff --git a/src/dede/images/style4/dlgtitle.gif b/src/dede/images/style4/dlgtitle.gif deleted file mode 100755 index 783b5b78..00000000 Binary files a/src/dede/images/style4/dlgtitle.gif and /dev/null differ diff --git a/src/dede/images/style4/leftbg2.gif b/src/dede/images/style4/leftbg2.gif deleted file mode 100755 index c0a00e06..00000000 Binary files a/src/dede/images/style4/leftbg2.gif and /dev/null differ diff --git a/src/dede/images/style4/style.css b/src/dede/images/style4/style.css deleted file mode 100755 index 265d383d..00000000 --- a/src/dede/images/style4/style.css +++ /dev/null @@ -1,66 +0,0 @@ -.top { - height:47px; - width:100%; - background-image: linear-gradient(135deg, #E2E3E5 0%, #83888C 100%); - overflow:hidden; - clear:both; -} -.top .top_link ul li.welcome { - border-right: medium none; - color: #424B51; - padding-right: 6px; -} -.top .top_link ul li a { - color: #424B51; - padding-left: 11px; - padding-right: 11px; - text-decoration: none; -} -.top_version{ - color: #333 !important; -} -.dbox dt.lside { - background: rgb(231, 236, 239); - border-bottom: 1px solid #D3DBDE; -} -.dbox { - border: 1px solid #D3DBDE; - margin-left: 1%; - margin-top: 8px; - width: 98%; -} -.dbox dt { - color: #424B51; - cursor: move; - font-weight: bold; - height: 28px; - line-height: 28px; -} -a b { - color: #424B51; -} -b, strong { - color: #424B51; -} -.topnav { - background: url("admin_top_bg.gif") repeat-x scroll left -37px transparent; - clear: both; - height: 29px; - overflow: hidden; - width: 100%; -} -a.mmac div { - background: url("leftbg2.gif") no-repeat scroll 0 0 transparent; - color: #325304; - font-weight: bold; - height: 37px !important; - padding: 6px 4px 4px 10px; - word-wrap: break-word; -} -a.mm:hover div { - background:url(leftbg2.gif) no-repeat; - color:#424B51; -} -dl.bitem dt b, dl.bitem2 dt b { - color: #424B51; -} \ No newline at end of file diff --git a/src/dede/templets/archives_edit.htm b/src/dede/templets/archives_edit.htm deleted file mode 100755 index 8521bf13..00000000 --- a/src/dede/templets/archives_edit.htm +++ /dev/null @@ -1,434 +0,0 @@ - - - - - 更改文档 - - - - - - - - - - - - - - - - - - - - - - - -
     文档列表 - >> 更改文档栏目管理 
    - - - - -
    - - - - - -
     常规信息 高级参数
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - '> - - - 0) - { - echo "\r\n"; - echo "\r\n"; - } - else - { - ?> - - - - - - - - - - - - - - -
    - - - - - - - -
       简略标题:
    -
    - - - - - -
     自定义属性: - SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; - else $jumpclick = ''; - if(preg_match("#".$trow->att."#", $arcRow['flag'])) - echo " "; - else - echo " "; - } - ?> -
    -
    - - - - - -
     跳转网址: - -
    -
    - - - - - - - -
     Tag标签: - (','号分开,单个标签小于12字节) - 权重: - (越小越靠前)
    -
    - - - - - - -
    -  缩 略 图:
    -  
    - "> - - - - 选择图片 - - - - - " - style="height: 80px"> -
    -
    - - - - - -
     文档主栏目: - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -
    -
    - - - - - -
     文档副栏目: - - ' style='width:200px;' /> - 选择副栏目 -
    -
    - -
    - - - - - -
     附加选项: - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
      - - - - - -
    - -
    -
    -
    -
    - - - diff --git a/src/dede/templets/catalog_add.htm b/src/dede/templets/catalog_add.htm deleted file mode 100755 index b4c259e4..00000000 --- a/src/dede/templets/catalog_add.htm +++ /dev/null @@ -1,588 +0,0 @@ - - - - - 栏目管理 - - - - - - - - - - - - - - - -
    - - - - -
     栏目管理 >> 增加栏目
    -
    - - - - - - - - - - 0) - { - echo " \r\n"; - echo " \r\n"; - echo " \r\n"; - } -?> - - - -
    - - - - -
    - - - - - - -
     常规选项 高级选项 栏目内容 
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '> - - - -
    是否支持投稿: - - -
    是否隐藏栏目: - - -
    - 内容模型: - - - -
    - 栏目名称: -
    排列顺序: - (由低 -> 高)
    浏览权限: - - (仅限制栏目里的文档浏览权限)
    上级目录: - - -
    文件保存目录: - - - - - -
    - - - - -
    -
    目录相对位置: - - - - - - - - -
    栏目列表选项: - - - - - - -
    默认页的名称: - -
    栏目属性: - -
    - -
    - - -
    栏目交叉: 帮助
    仅适用[最终列表栏目]
    - - - - - - -
    - -
    绑定小分类:
    仅适用[分类信息模型]
    - - 按 Ctrl 多选,不选系统将调用全部分类,在“联动类别管理”中管理 -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -     - 返回 -
    -
    - - - \ No newline at end of file diff --git a/src/dede/templets/catalog_edit.htm b/src/dede/templets/catalog_edit.htm deleted file mode 100755 index 06f24ab7..00000000 --- a/src/dede/templets/catalog_edit.htm +++ /dev/null @@ -1,519 +0,0 @@ - - - - - 栏目管理 - - - - - - - - - - - - - - - - -
    - - - - -
     栏目管理>> 修改栏目
    -
    - - - - - - - - - - - - -
    - - - - - -
    - - - - - - -
     常规选项 高级选项 栏目内容 
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '> - - - -
    是否支持投稿:
    是否隐藏栏目:
    - 内容模型: -
    - 栏目名称: -
    排列顺序: - (由低 -> 高)
    浏览权限: - (仅限制栏目里的文档浏览权限)
    文件保存目录: -
    栏目列表选项: - -
    默认页的名称:
    栏目属性: -
    -
    - -
    栏目交叉:帮助
    仅适用[最终列表栏目]
    - - - -
    - -
    绑定小分类:
    仅适用[分类信息模型]
    - - 按 Ctrl 多选,不选系统将调用全部分类,在“联动类别管理”中管理 -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -     - 返回 -
    -
    - - - \ No newline at end of file diff --git a/src/dede/templets/shops_operations_cart.htm b/src/dede/templets/shops_operations_cart.htm deleted file mode 100755 index f03743e7..00000000 --- a/src/dede/templets/shops_operations_cart.htm +++ /dev/null @@ -1,85 +0,0 @@ - - - - -<?php echo $oid;?> - - - - - - - - -{dede:datalist} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{/dede:datalist} - - - -
    订单信息
    订单号: {dede:field.oid/}
    商品名称: {dede:field.title/}
    单价(元/单位): {dede:field.uprice/}
    数量: {dede:field.cartcount/}
    支付方式: 
    配送: {dede:field.dname/} 费用:{dede:field.dprice/}元
    购买时间: {dede:field.stime function=GetDateTimeMk(@me)/}
    收货人: 
    地址: 
    邮编: 
    联系电话: 
    邮箱: 
    留言: 
    合计(元): {dede:field.priceCount/}元
    -
    - -
    - -
    - 订单总计: {dede:field.priceCount/}元, {dede:pagelist listsize=3/} -
    -
    - - \ No newline at end of file diff --git a/src/include/arc.archives.class.php b/src/include/arc.archives.class.php index 93c3d313..c1ffc6fb 100755 --- a/src/include/arc.archives.class.php +++ b/src/include/arc.archives.class.php @@ -1,5 +1,5 @@ ChannelUnit = new ChannelUnit($arr['channel'], $aid); $this->TypeLink = new TypeLink($arr['typeid']); if ($this->ChannelUnit->ChannelInfos['issystem'] != -1) { - // 如果当前文档不是系统模型,为单表模型 + //如果当前文档不是系统模型,为单表模型 $query = "SELECT arc.*,tp.reid,tp.typedir,ch.addtable FROM `#@__archives` arc LEFT JOIN #@__arctype tp on tp.id=arc.typeid @@ -244,7 +244,7 @@ class Archives //模板里直接使用{dede:field name='image'/}获取缩略图 $this->Fields['image'] = (!preg_match('/jpg|gif|png/i', $this->Fields['picname']) ? '' : ""); } - // 处理投票选项 + //处理投票选项 if (isset($this->Fields['voteid']) && !empty($this->Fields['voteid'])) { $this->Fields['vote'] = ''; $voteid = $this->Fields['voteid']; diff --git a/src/include/arc.freelist.class.php b/src/include/arc.freelist.class.php index 855ce22f..48d1f099 100755 --- a/src/include/arc.freelist.class.php +++ b/src/include/arc.freelist.class.php @@ -1,4 +1,4 @@ -".$row['title'].""; + $row['title'] = "".$row['title'].""; } if (preg_match("#c#", $row['flag'])) { $row['title'] = "".$row['title'].""; diff --git a/src/include/arc.listview.class.php b/src/include/arc.listview.class.php index 9202d3ab..86ed666c 100755 --- a/src/include/arc.listview.class.php +++ b/src/include/arc.listview.class.php @@ -1,4 +1,4 @@ -upPageType = $uppage; $this->remoteDir = ''; $this->TotalResult = is_numeric($this->TotalResult) ? $this->TotalResult : ""; - if (!is_array($this->TypeLink->TypeInfos)) { $this->IsError = true; } @@ -77,15 +75,21 @@ class ListView $this->Fields['id'] = $typeid; $this->Fields['position'] = $this->TypeLink->GetPositionLink(true); $this->Fields['title'] = preg_replace("/[<>]/", " / ", $this->TypeLink->GetPositionLink(false)); - + //添加联动多筛选 + if (isset($_REQUEST['tid'])) + { + foreach($_GET as $key => $value) { + if ($key!="tid" && $key!="TotalResult" && $key!="PageNo") { + $this->Fields[string_filter($key)] = string_filter(urldecode($value)); + } + } + } //设置一些全局参数的值 foreach ($GLOBALS['PubFields'] as $k => $v) $this->Fields[$k] = $v; $this->Fields['rsslink'] = $GLOBALS['cfg_cmsurl']."/data/rss/".$this->TypeID.".xml"; - //设置环境变量 SetSysEnv($this->TypeID, $this->Fields['typename'], 0, '', 'list'); $this->Fields['typeid'] = $this->TypeID; - //获得交叉栏目ID if ($this->TypeLink->TypeInfos['cross'] > 0 && $this->TypeLink->TypeInfos['ispart'] == 0) { $selquery = ''; @@ -105,21 +109,17 @@ class ListView } } } - } //!error - + }//!error } - //php4构造函数 function ListView($typeid, $uppage = 0) { $this->__construct($typeid, $uppage); } - //关闭相关资源 function Close() { } - /** * 统计列表里的记录 * @@ -129,16 +129,54 @@ class ListView */ function CountRecord() { - global $cfg_list_son, $cfg_need_typeid2, $cfg_cross_sectypeid; - if (empty($cfg_need_typeid2)) $cfg_need_typeid2 = 'N'; - - //统计数据库记录 + global $cfg_list_son,$cfg_need_typeid2,$cfg_cross_sectypeid; + if(empty($cfg_need_typeid2)) $cfg_need_typeid2 = 'N'; + //获得附加表的相关信息 + $addtable = $this->ChannelUnit->ChannelInfos['addtable']; + if($addtable!="") + { + $addJoin = " LEFT JOIN `$addtable` ON arc.id = ".$addtable.'.aid '; + $addField = ''; + $fields = explode(',',$this->ChannelUnit->ChannelInfos['listfields']); + foreach($fields as $k=>$v) + { + $nfields[$v] = $k; + } + if(is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields)) + { + foreach($this->ChannelUnit->ChannelFields as $k=>$arr) + { + if(isset($nfields[$k])) + { + if(!empty($arr['rename'])) { + $addField .= ','.$addtable.'.'.$k.' as '.$arr['rename']; + } + else { + $addField .= ','.$addtable.'.'.$k; + } + } + } + } + if (isset($_REQUEST['tid'])) + { + foreach($_GET as $key => $value) { + $value1 = explode("|", $value); + foreach ($value1 as $valuea) + { + $filtersql .= ($key!="tid" && $key!="TotalResult" && $key!="PageNo") ? " AND find_in_set('".string_filter(urldecode($valuea))."', ".$addtable.".".string_filter($key).")" : ''; + } + } + } + } else { + $addField = ''; + $addJoin = ''; + } + //统计数据库记录 $this->TotalResult = -1; if (isset($GLOBALS['TotalResult'])) $this->TotalResult = $GLOBALS['TotalResult']; if (isset($GLOBALS['PageNo'])) $this->PageNo = $GLOBALS['PageNo']; else $this->PageNo = 1; $this->addSql = " arc.arcrank > -1 "; - $typeid2like = " '%,{$this->TypeID},%' "; if ($cfg_list_son == 'N') { @@ -180,8 +218,9 @@ class ListView } } } - if ($this->TotalResult == -1) { - $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc WHERE ".$this->addSql; + if($this->TotalResult==-1) + { + $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc $addJoin WHERE ".$this->addSql.$filtersql; $row = $this->dsql->GetOne($cquery); if (is_array($row)) { $this->TotalResult = $row['dd']; @@ -189,7 +228,6 @@ class ListView $this->TotalResult = 0; } } - //初始化列表模板,并统计页面总数 $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist']; $tempfile = str_replace("{tid}", $this->TypeID, $tempfile); @@ -203,7 +241,6 @@ class ListView $tempfile = str_replace('.htm', '_m.htm', $tempfile); } } - if (!file_exists($tempfile) || !is_file($tempfile)) { echo "模板文件不存在,无法解析文档"; exit(); @@ -224,7 +261,6 @@ class ListView } $this->TotalPage = ceil($this->TotalResult / $this->PageSize); } - /** * 列表创建HTML * @@ -239,19 +275,16 @@ class ListView if (empty($startpage)) { $startpage = 1; } - //创建封面模板文件 if ($this->TypeLink->TypeInfos['isdefault'] == -1) { echo '这个类目是动态类目'; return '../plus/list.php?tid='.$this->TypeLink->TypeInfos['id']; } - //单独页面 else if ($this->TypeLink->TypeInfos['ispart'] > 0) { $reurl = $this->MakePartTemplets(); return $reurl; } - if (empty($this->TotalResult)) $this->CountRecord(); //初步给固定值的标记赋值 $this->ParseTempletsFirst(); @@ -304,7 +337,6 @@ class ListView } return $murl; } - /** * 显示列表 * @@ -340,7 +372,6 @@ class ListView $this->ParseDMFields($this->PageNo, 0); $this->dtp->Display(); } - /** * 创建单独模板页面 * @@ -384,7 +415,6 @@ class ListView } return $this->GetTrueUrl($makeUrl); } - /** * 显示单独模板页面 * @@ -432,7 +462,6 @@ class ListView } } } - /** * 获得站点的真实根路径 * @@ -444,7 +473,6 @@ class ListView $truepath = $GLOBALS["cfg_basedir"]; return $truepath; } - /** * 获得真实连接路径 * @@ -462,7 +490,6 @@ class ListView } return $nurl; } - /** * 解析模板,对固定的标记进行初始给值 * @@ -479,7 +506,6 @@ class ListView $GLOBALS['envs']['cross'] = 1; MakeOneTag($this->dtp, $this); } - /** * 解析模板,对内容里的变动进行赋值 * @@ -538,7 +564,6 @@ class ListView } } } - /** * 获得要创建的文件名称规则 * @@ -561,7 +586,6 @@ class ListView return $namerule2; } } - /** * 获得一个单列的文档列表 * @@ -597,9 +621,7 @@ class ListView $orderWay = 'desc' ) { global $cfg_list_son, $cfg_digg_update; - $typeid = $this->TypeID; - if ($row == '') $row = 10; if ($limitstart == '') $limitstart = 0; if ($titlelen == '') $titlelen = 100; @@ -608,25 +630,21 @@ class ListView if ($imgheight == '') $imgheight = 120; if ($listtype == '') $listtype = 'all'; if ($orderWay == '') $orderWay = 'desc'; - if ($orderby == '') { $orderby = 'default'; } else { $orderby = strtolower($orderby); } - $tablewidth = str_replace('%', '', $tablewidth); if ($tablewidth == '') $tablewidth = 100; if ($col == '') $col = 1; $colWidth = ceil(100 / $col); $tablewidth = $tablewidth.'%'; $colWidth = $colWidth.'%'; - $innertext = trim($innertext); if ($innertext == '') { $innertext = GetSysTemplets('list_fulllist.htm'); } - //排序方式 $ordersql = ''; if ($orderby == "senddate" || $orderby == "id") { @@ -638,32 +656,46 @@ class ListView } else { $ordersql = " ORDER BY arc.sortrank $orderWay"; } - - //获得附加表的相关信息 - $addtable = $this->ChannelUnit->ChannelInfos['addtable']; - if ($addtable != "") { - $addJoin = " LEFT JOIN `$addtable` ON arc.id = ".$addtable.'.aid '; - $addField = ''; - $fields = explode(',', $this->ChannelUnit->ChannelInfos['listfields']); - foreach ($fields as $k => $v) { - $nfields[$v] = $k; - } - if (is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields)) { - foreach ($this->ChannelUnit->ChannelFields as $k => $arr) { - if (isset($nfields[$k])) { - if (!empty($arr['rename'])) { - $addField .= ','.$addtable.'.'.$k.' as '.$arr['rename']; - } else { - $addField .= ','.$addtable.'.'.$k; - } - } - } - } - } else { - $addField = ''; - $addJoin = ''; - } - + //获得附加表的相关信息 + $addtable = $this->ChannelUnit->ChannelInfos['addtable']; + if($addtable!="") + { + $addJoin = " LEFT JOIN `$addtable` ON arc.id = ".$addtable.'.aid '; + $addField = ''; + $fields = explode(',',$this->ChannelUnit->ChannelInfos['listfields']); + foreach($fields as $k=>$v) + { + $nfields[$v] = $k; + } + if(is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields)) + { + foreach($this->ChannelUnit->ChannelFields as $k=>$arr) + { + if(isset($nfields[$k])) + { + if(!empty($arr['rename'])) { + $addField .= ','.$addtable.'.'.$k.' as '.$arr['rename']; + } + else { + $addField .= ','.$addtable.'.'.$k; + } + } + } + } + if (isset($_REQUEST['tid'])) + { + foreach($_GET as $key => $value) { + $value1 = explode("|", $value); + foreach ($value1 as $valuea) + { + $filtersql .= ($key!="tid" && $key!="TotalResult" && $key!="PageNo") ? " AND find_in_set('".string_filter(urldecode($valuea))."', ".$addtable.".".string_filter($key).")" : ''; + } + } + } + } else { + $addField = ''; + $addJoin = ''; + } //如果不用默认的sortrank或id排序,使用联合查询(数据量大时非常缓慢) if (preg_match('/hot|click|lastpost/', $orderby)) { $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname, @@ -672,13 +704,13 @@ class ListView FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id $addJoin - WHERE {$this->addSql} $ordersql LIMIT $limitstart,$row"; + WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row"; } //普通情况先从arctiny表查出ID,然后按ID查询(速度非常快) else { $t1 = ExecTime(); $ids = array(); - $query = "SELECT id FROM `#@__arctiny` arc WHERE {$this->addSql} $ordersql LIMIT $limitstart,$row "; + $query = "SELECT id FROM `#@__arctiny` arc $addJoin WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row "; $this->dsql->SetQuery($query); $this->dsql->Execute(); while ($arr = $this->dsql->GetArray()) { @@ -697,12 +729,10 @@ class ListView } $t2 = ExecTime(); //echo $t2-$t1; - } $this->dsql->SetQuery($query); $this->dsql->Execute('al'); $t2 = ExecTime(); - //echo $t2-$t1; $artlist = ''; $this->dtp2->LoadSource($innertext); @@ -715,14 +745,12 @@ class ListView if ($row = $this->dsql->GetArray("al")) { $GLOBALS['autoindex']++; $ids[$row['id']] = $row['id']; - //处理一些特殊字段 $row['infos'] = cn_substr($row['description'], $infolen); $row['id'] = $row['id']; if ($row['corank'] > 0 && $row['arcrank'] == 0) { $row['arcrank'] = $row['corank']; } - $row['filename'] = $row['arcurl'] = GetFileUrl( $row['id'], $row['typeid'], @@ -763,7 +791,7 @@ class ListView $row['fulltitle'] = $row['title']; $row['title'] = cn_substr($row['title'], $titlelen); if ($row['color'] != '') { - $row['title'] = "".$row['title'].""; + $row['title'] = "".$row['title'].""; } if (preg_match('/c/', $row['flag'])) { $row['title'] = "".$row['title'].""; @@ -772,7 +800,6 @@ class ListView $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; $row['memberurl'] = $GLOBALS['cfg_memberurl']; $row['templeturl'] = $GLOBALS['cfg_templeturl']; - //编译附加表里的数据 foreach ($row as $k => $v) { $row[strtolower($k)] = $v; @@ -797,23 +824,18 @@ class ListView } } $artlist .= $this->dtp2->GetResult(); - } //if hasRow - - } //Loop Col - + }//if hasRow + }//Loop Col if ($col > 1) { $i += $col - 1; $artlist .= " \r\n"; } - } //Loop Line - + }//Loop Line $t3 = ExecTime(); - //echo ($t3-$t2); $this->dsql->FreeResult('al'); return $artlist; } - /** * 获取静态的分页列表 * @@ -832,7 +854,6 @@ class ListView } $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1".$this->TotalResult."条记录
  • \r\n"; } if ($this->TotalResult == 0) { @@ -841,7 +862,6 @@ class ListView $purl = $this->GetCurUrl(); $maininfo = "
  • {$totalpage}".$this->TotalResult."
  • \r\n"; $tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); - //获得上一页和主页的链接 if ($this->PageNo != 1) { $prepage .= "
  • 上一页
  • \r\n"; @@ -849,7 +869,6 @@ class ListView } else { $indexpage = "
  • 首页
  • \r\n"; } - //下一页,未页的链接 if ($this->PageNo != $totalpage && $totalpage > 1) { $nextpage .= "
  • 下一页
  • \r\n"; @@ -857,10 +876,8 @@ class ListView } else { $endpage = "
  • 末页
  • \r\n"; } - //option链接 $optionlist = ''; - $optionlen = strlen($totalpage); $optionlen = $optionlen * 12 + 18; if ($optionlen < 36) $optionlen = 36; @@ -874,7 +891,6 @@ class ListView } } $optionlist .= "\r\n"; - //获得数字链接 $listdd = ""; $total_list = $list_len * 2 + 1; @@ -905,10 +921,8 @@ class ListView if (preg_match('/end/i', $listitem)) $plist .= $endpage; if (preg_match('/option/i', $listitem)) $plist .= $optionlist; if (preg_match('/info/i', $listitem)) $plist .= $maininfo; - return $plist; } - /** * 获取动态的分页列表 * @@ -936,20 +950,17 @@ class ListView $maininfo = "
  • {$totalpage}".$this->TotalResult."
  • \r\n"; $purl = $this->GetCurUrl(); - // 如果开启为静态,则对规则进行替换 + //如果开启为静态,则对规则进行替换 if ($cfg_rewrite == 'Y') { $nowurls = preg_replace("/\-/", ".php?", $purl); $nowurls = explode("?", $nowurls); $purl = $nowurls[0]; } - $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; $purl .= '?'.$geturl; - $optionlist = ''; //$hidenform = "\r\n"; //$hidenform .= "\r\n"; - //获得上一页和下一页的链接 if ($this->PageNo != 1) { $prepage .= "
  • 上一页
  • \r\n"; @@ -963,8 +974,6 @@ class ListView } else { $endpage = "
  • 末页
  • \r\n"; } - - //获得数字链接 $listdd = ""; $total_list = $list_len * 2 + 1; @@ -987,7 +996,6 @@ class ListView $listdd .= "
  • ".$j."
  • \r\n"; } } - $plist = ''; if (preg_match('/index/i', $listitem)) $plist .= $indexpage; if (preg_match('/pre/i', $listitem)) $plist .= $prepage; @@ -996,7 +1004,6 @@ class ListView if (preg_match('/end/i', $listitem)) $plist .= $endpage; if (preg_match('/option/i', $listitem)) $plist .= $optionlist; if (preg_match('/info/i', $listitem)) $plist .= $maininfo; - if ($cfg_rewrite == 'Y') { $plist = str_replace('.php?tid=', '-', $plist); $plist = str_replace('&TotalResult=', '-', $plist); @@ -1004,7 +1011,6 @@ class ListView } return $plist; } - /** * 获得当前的页面文件的url * diff --git a/src/include/arc.partview.class.php b/src/include/arc.partview.class.php index 7e67542d..c2036260 100755 --- a/src/include/arc.partview.class.php +++ b/src/include/arc.partview.class.php @@ -1,4 +1,4 @@ -dtp2 = new DedeTagParse(); $this->dtp2->SetNameSpace("field", "[", "]"); $this->TypeLink = new TypeLink($typeid); - // 通过分词获取关键词 + //通过分词获取关键词 $this->Keywords = $this->GetKeywords($keyword); //设置一些全局参数的值 @@ -185,7 +185,7 @@ class SearchView } $keywords = preg_replace("/[ ]{1,}/", " ", $keywords); $client->Close(); - // var_dump($keywords);exit; + //var_dump($keywords);exit; } else { $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); $sp->SetSource($keyword, $cfg_soft_lang, $cfg_soft_lang); @@ -202,7 +202,7 @@ class SearchView $keywords .= ' '.$key; } $keywords = preg_replace("/[ ]{1,}/", " ", $keywords); - // var_dump($keywords);exit(); + //var_dump($keywords);exit(); unset($sp); } } else { @@ -326,10 +326,10 @@ class SearchView if (ord($k[0]) > 0x80 && strlen($k) < 2) { continue; } - // 这里不区分大小写进行关键词替换 - $fstr = str_ireplace($k, "$k", $fstr); - // 速度更快,效率更高 - //$fstr = str_replace($k, "$k", $fstr); + //这里不区分大小写进行关键词替换 + $fstr = str_ireplace($k, "$k", $fstr); + //速度更快,效率更高 + //$fstr = str_replace($k, "$k", $fstr); } return $fstr; } @@ -738,8 +738,8 @@ class SearchView } } $plist = ""; - // $plist = "\r\n"; - // $plist .= "\r\n"; + //$plist = "
    \r\n"; + //$plist .= "\r\n"; $plist .= "$hidenform"; $plist .= "
      "; $plist .= $infos; @@ -748,11 +748,11 @@ class SearchView $plist .= $listdd; $plist .= $nextpage; $plist .= $endpage; - // if($totalpage>$total_list) - // { - // $plist.="
    \r\n"; - // $plist.="\r\n"; - // } + //if($totalpage>$total_list) + //{ + // $plist.="\r\n"; + // $plist.="\r\n"; + //} $plist .= "\r\n"; return $plist; } diff --git a/src/include/arc.sglistview.class.php b/src/include/arc.sglistview.class.php index e29f506c..a8228e98 100755 --- a/src/include/arc.sglistview.class.php +++ b/src/include/arc.sglistview.class.php @@ -1,4 +1,4 @@ -TagInfos['tag_pinyin'])) { $this->TagInfos['tag_pinyin'] = $this->TagPinyinExists($this->Tag) ? GetPinyin($this->Tag).$this->TagInfos['id'] : GetPinyin($this->Tag); $this->dsql->ExecNoneQuery("UPDATE `#@__tagindex` SET tag_pinyin = '{$this->TagInfos['tag_pinyin']}' WHERE tag LIKE '{$this->Tag}'"); @@ -264,7 +264,7 @@ class TagList if ($list_len == "") { $list_len = 3; } - // var_dump($ismake); + //var_dump($ismake); if ($ismake == 0) { $this->dtp->Assign($tagid, $this->GetPageListDM($list_len, $listitem)); } else { @@ -403,7 +403,7 @@ class TagList $row['fulltitle'] = $row['title']; $row['title'] = cn_substr($row['title'], $titlelen); if ($row['color'] != '') { - $row['title'] = "".$row['title'].""; + $row['title'] = "".$row['title'].""; } if (preg_match('/c/', $row['flag'])) { $row['title'] = "".$row['title'].""; @@ -544,10 +544,10 @@ class TagList return "
  • 共0页/".$this->TotalResult."条
  • "; } $maininfo = "
  • 共{$totalpage}页/".$this->TotalResult."条
  • \r\n"; - // $purl = $this->GetCurUrl(); + //$purl = $this->GetCurUrl(); $purl = "/a/tags/".GetPinyin($this->Tag); - // var_dump($purl); + //var_dump($purl); //获得上一页和下一页的链接 if ($this->PageNo != 1) { @@ -613,7 +613,7 @@ class TagList return $truepath; } - // 生成静态Tag + //生成静态Tag function MakeHtml($startpage = 1, $makepagesize = 0) { global $cfg_dir_purview, $envs; diff --git a/src/include/archives.func.php b/src/include/archives.func.php index 71bb14b8..412ae37e 100755 --- a/src/include/archives.func.php +++ b/src/include/archives.func.php @@ -1,7 +1,8 @@ - \ No newline at end of file diff --git a/src/include/code/datalist.utf-8.inc b/src/include/code/datalist.utf-8.inc index 6d109ee2..68475e23 100755 --- a/src/include/code/datalist.utf-8.inc +++ b/src/include/code/datalist.utf-8.inc @@ -3,7 +3,7 @@ $lang_pre_page = '上页'; $lang_next_page = '下页'; $lang_index_page = '首页'; $lang_end_page = '末页'; -$lang_record_number = '条记录'; +$lang_record_number = '篇'; $lang_page = '页'; $lang_total = '共'; ?> \ No newline at end of file diff --git a/src/include/common.func.php b/src/include/common.func.php index fc06961b..6810b9dc 100755 --- a/src/include/common.func.php +++ b/src/include/common.func.php @@ -183,8 +183,8 @@ function ShowMsg($msg, $gourl, $onlymsg = 0, $limittime = 0) { global $cfg_soft_lang, $cfg_cmsurl; if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..'; - $htmlhead = "提示信息"; - $htmlhead .= "".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."
    "; $litime = ($limittime == 0 ? 1000 : $limittime); $func = ''; @@ -203,17 +203,17 @@ function ShowMsg($msg, $gourl, $onlymsg = 0, $limittime = 0) } $func .= "var pgo=0;function JumpUrl(){if (pgo==0){location='$gourl'; pgo=1;}}"; $rmsg = $func; - $rmsg .= "document.write(\"\");"; - $rmsg .= "document.write(\"
    "; - $rmsg .= "

    提示信息

    \");"; - $rmsg .= "document.write(\"
    \");"; + $rmsg .= "document.write(\"\");"; + $rmsg .= "document.write(\"
    "; + $rmsg .= "

    提示信息

    \");"; + $rmsg .= "document.write(\"
    \");"; $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");"; $rmsg .= "document.write(\""; if($onlymsg==0) { if( $gourl != 'javascript:;' && $gourl != '') { - $rmsg .= "\");"; + $rmsg .= "\");"; $rmsg .= "setTimeout('JumpUrl()',$litime);"; } else { $rmsg .= "
    \");"; @@ -250,7 +250,7 @@ function IndexSub($idx, $num) { return intval($idx) - intval($num) == 0 ? '0 ' : intval($idx) - intval($num); } -// 用来返回index的active +//用来返回index的active function IndexActive($idx) { if ($idx == 1) { @@ -259,8 +259,8 @@ function IndexActive($idx) return ''; } } -// 自定义函数接口 -// 这里主要兼容早期的用户扩展,v5.7之后我们建议使用小助手helper进行扩展 +//自定义函数接口 +//这里主要兼容早期的用户扩展,v5.7之后我们建议使用小助手helper进行扩展 if (file_exists(DEDEINC.'/extend.func.php')) { require_once(DEDEINC.'/extend.func.php'); } \ No newline at end of file diff --git a/src/include/customfields.func.php b/src/include/customfields.func.php index 2dbdd38c..13ddd84c 100755 --- a/src/include/customfields.func.php +++ b/src/include/customfields.func.php @@ -25,7 +25,6 @@ function GetFormItem($ctag, $admintype = 'admin') if ($innertext != '') { $formitem = $innertext; } - if ($fieldType == 'select') { $myformItem = ''; $items = explode(',', $ctag->GetAtt("default")); @@ -93,10 +92,10 @@ function GetFormItem($ctag, $admintype = 'admin') $innertext = GetEditor($fieldname, $dfvalue, 350, 'Member', 'string'); } } else if ($fieldType == "multitext") { - $innertext = "\r\n"; + $innertext = "\r\n"; } else if ($fieldType == "datetime") { $nowtime = GetDateTimeMk(time()); - $innertext = ""; + $innertext = ""; } else if ($fieldType == 'img' || $fieldType == 'imgfile') { if ($admintype == 'diy') { $innertext = "\r\n"; @@ -121,12 +120,11 @@ function GetFormItem($ctag, $admintype = 'admin') } else if ($fieldType == 'relation') { $dfvalue = ($ctag->GetAtt('default') != '' ? $ctag->GetAtt('default') : ''); $channel = ($ctag->GetAtt('channel') == "") ? "1" : $ctag->GetAtt('channel'); - $innertext = "
    + $innertext = "
    \r\n"; if ($ctag->GetAtt('automake') == 1) { $innertext .= ""; } - $innertext .= << if(typeof SelectArcList === "undefined") { @@ -140,14 +138,13 @@ if(typeof SelectArcList === "undefined") { EOT; } else { $dfvalue = ($ctag->GetAtt('default') != '' ? $ctag->GetAtt('default') : ''); - $innertext = " + $innertext = " \r\n"; } $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace("~form~", $innertext, $formitem); return $formitem; } - /** * 处理不同类型的数据 * @@ -217,7 +214,6 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $a } $ipath = $ipath.'/'.$tpath; $filename = "{$ipath}/{$aid}-".cn_substr(md5($cfg_cookie_encode), 0, 16).".txt"; - //会员投稿内容安全处理 if ($admintype == 'member' || $admintype == 'diy') { $dvalue = HtmlReplace($dvalue, -1); @@ -283,7 +279,6 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $a return $dvalue; } } - /** * 获得带值的表单(编辑时用) * @@ -348,7 +343,6 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') } $innertext = $myformItem; } - //checkbox else if ($ftype == 'checkbox') { $myformItem = ''; @@ -368,7 +362,6 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') } $innertext = $myformItem; } - //文本数据的特殊处理 else if ($ftype == "textdata") { if (is_file($cfg_basedir.$fvalue)) { @@ -395,10 +388,10 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') } $innertext = $myformItem; } else if ($ftype == "multitext") { - $innertext = "\r\n"; + $innertext = "\r\n"; } else if ($ftype == "datetime") { $nowtime = GetDateTimeMk($fvalue); - $innertext = ""; + $innertext = ""; } else if ($ftype == "img") { $ndtp = new DedeTagParse(); $ndtp->LoadSource($fvalue); @@ -420,7 +413,7 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') $innertext = " (填写数值)\r\n"; } else if ($ftype == "relation") { $channel = ($ctag->GetAtt('channel') == "") ? "1" : $ctag->GetAtt('channel'); - $innertext = "
    + $innertext = "
    \r\n"; if ($ctag->GetAtt('automake') == 1) { $innertext .= ""; @@ -437,9 +430,9 @@ if(typeof SelectArcList === "undefined") { EOT; } else { - $innertext = "\r\n"; + $innertext = "\r\n"; } $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace('~form~', $innertext, $formitem); return $formitem; -} +} \ No newline at end of file diff --git a/src/include/datalistcp.class.php b/src/include/datalistcp.class.php index a5127966..06b7a90e 100755 --- a/src/include/datalistcp.class.php +++ b/src/include/datalistcp.class.php @@ -1,4 +1,5 @@ -SourceString); - // 这里是获得Tag的名称,可视情况是否需要 - // 如果不在这个里解析,则在解析整个Tag时解析 - // 属性中不应该存在tagname这个名称 + //这里是获得Tag的名称,可视情况是否需要 + //如果不在这个里解析,则在解析整个Tag时解析 + //属性中不应该存在tagname这个名称 for ($i = 0; $i < $strLen; $i++) { $d = substr($this->SourceString, $i, 1); if ($d == ' ') { @@ -176,7 +176,7 @@ class DedeAttParse } else if ($startdd == 0) { switch ($d) { case ' ': - // continue; + //continue; break; case '\'': $ddtag = '\''; diff --git a/src/include/dedebiz.class.php b/src/include/dedebiz.class.php index 352082df..cbeb640f 100644 --- a/src/include/dedebiz.class.php +++ b/src/include/dedebiz.class.php @@ -1,4 +1,4 @@ -MakeSign($req); $str = json_encode($req); $length = strlen($str); @@ -72,7 +72,7 @@ class DedeBizClient return $this->CheckSign($msg); } - // 用户获取当前服务器状态信息 + //用户获取当前服务器状态信息 function SystemInfo() { $req = array( @@ -81,7 +81,7 @@ class DedeBizClient return $this->request($req); } - // 检测是否连接 + //检测是否连接 function Ping($i) { $req = array( @@ -93,7 +93,7 @@ class DedeBizClient return $this->request($req); } - // 发送邮件 + //发送邮件 function MailSend($to, $subject, $title, $content="", $quote="", $link_url="", $link_title="") { $req = array( @@ -111,7 +111,7 @@ class DedeBizClient return $this->request($req); } - // 获取一个管理员信息 + //获取一个管理员信息 function AdminGetOne() { $req = array( @@ -123,7 +123,7 @@ class DedeBizClient return $this->request($req); } - // 检查管理员密码是否存在 + //检查管理员密码是否存在 function AdminPWDExists() { $req = array( @@ -135,7 +135,7 @@ class DedeBizClient return $this->request($req); } - // 创建DedeBIZ授权密码 + //创建DedeBIZ授权密码 function AdminPWDCreate($pwd) { $req = array( @@ -147,7 +147,7 @@ class DedeBizClient return $this->request($req); } - // 设置首页锁定状态 + //设置首页锁定状态 function AdminSetIndexLockState($pwd, $state) { $req = array( @@ -160,8 +160,8 @@ class DedeBizClient return $this->request($req); } - // 缓存 - // $key:键 $val:值 $d:缓存时间 + //缓存 + //$key:键 $val:值 $d:缓存时间 function CacheSet($key, $val, $duration) { $req = array( @@ -175,8 +175,8 @@ class DedeBizClient return $this->request($req); } - // 获取缓存内容 - // $key:键 + //获取缓存内容 + //$key:键 function CacheGet($key) { $req = array( @@ -188,8 +188,8 @@ class DedeBizClient return $this->request($req); } - // 删除缓存内容 - // $key:键 + //删除缓存内容 + //$key:键 function CacheDel($key) { $req = array( @@ -201,8 +201,8 @@ class DedeBizClient return $this->request($req); } - // 获取分词结果 - // $key:键 + //获取分词结果 + //$key:键 function Spliteword($body) { $req = array( @@ -214,8 +214,8 @@ class DedeBizClient return $this->request($req); } - // 获取分词结果 - // $body:内容 $sep:分隔符 + //获取分词结果 + //$body:内容 $sep:分隔符 function Pinyin($body, $sep) { $req = array( @@ -228,7 +228,7 @@ class DedeBizClient return $this->request($req); } - // 拼接规则就是method+ + //拼接规则就是method+ function MakeSign(&$req) { if (empty($req['timestamp'])) { @@ -249,7 +249,7 @@ class DedeBizClient $req['sign'] = hash("sha256", $pstr); } - // 校验返回数据是否正确 + //校验返回数据是否正确 function CheckSign(&$msg) { $rsp = json_decode($msg); @@ -264,11 +264,11 @@ class DedeBizClient } } - // 关闭通信接口 - // 一次页面操作后一定记得要关闭连接,否则会占用系统资源 + //关闭通信接口 + //一次页面操作后一定记得要关闭连接,否则会占用系统资源 function Close() { - // 这里避免重复释放 + //这里避免重复释放 if (strtolower(get_resource_type($this->socket)) === "socket") { socket_close($this->socket); } diff --git a/src/include/dedehttpdown.class.php b/src/include/dedehttpdown.class.php index c120c0cc..eee8486d 100755 --- a/src/include/dedehttpdown.class.php +++ b/src/include/dedehttpdown.class.php @@ -1,4 +1,4 @@ -m_ch, CURLOPT_FOLLOWLOCATION, 1); if ($requestType == "POST") { curl_setopt($this->m_ch, CURLOPT_POST, 1); - // $content = is_array($post) ? http_build_query($post) : $post; - // curl_setopt($this->m_ch, CURLOPT_POSTFIELDS, urldecode($content)); + //$content = is_array($post) ? http_build_query($post) : $post; + //curl_setopt($this->m_ch, CURLOPT_POSTFIELDS, urldecode($content)); } if (!empty($this->m_cookies)) { curl_setopt($this->m_ch, CURLOPT_COOKIE, $this->m_cookies); diff --git a/src/include/dedemodule.class.php b/src/include/dedemodule.class.php index 7ad3ae27..0a0e86a7 100755 --- a/src/include/dedemodule.class.php +++ b/src/include/dedemodule.class.php @@ -1,4 +1,4 @@ -#i", $line)) $start = TRUE; } else { if (preg_match("#<\/{$ntype}#i", $line)) break; diff --git a/src/include/dedesqli.class.php b/src/include/dedesqli.class.php index a3dc4557..50fb5a24 100755 --- a/src/include/dedesqli.class.php +++ b/src/include/dedesqli.class.php @@ -1,4 +1,5 @@ -linkID) { - $this->DisplayError("DedeBIZ错误警告:连接数据库失败,可能数据库密码不对或数据库服务器出错"); + $this->DisplayError("DedeBIZ错误警告:连接数据库失败,可能数据库密码不对或数据库服务器出错"); exit(); } $this->isInit = TRUE; @@ -336,7 +337,7 @@ class DedeSqli } if ($this->result[$id] === FALSE) { - $this->DisplayError(mysqli_error($this->linkID)."
    Error sql: ".$this->queryString.""); + $this->DisplayError(mysqli_error($this->linkID)."
    Error sql: ".$this->queryString.""); } } @@ -349,11 +350,11 @@ class DedeSqli function GetOne($sql = '', $acctype = MYSQLI_ASSOC) { global $dsqli; - // $t1 = ExecTime(); + //$t1 = ExecTime(); if (!$dsqli->isInit) { $this->Init($this->pconnect); } - // echo ExecTime() - $t1; + //echo ExecTime() - $t1; if ($dsqli->isClose) { $this->Open(FALSE); $dsqli->isClose = FALSE; @@ -388,10 +389,10 @@ class DedeSqli } //返回当前的一条记录并把游标移向下一记录 - // MYSQLI_ASSOC、MYSQLI_NUM、MYSQLI_BOTH + //MYSQLI_ASSOC、MYSQLI_NUM、MYSQLI_BOTH function GetArray($id = "me", $acctype = MYSQLI_ASSOC) { - // var_dump($this->result); + //var_dump($this->result); if ($this->result[$id] === 0) { return FALSE; } else { @@ -408,7 +409,7 @@ class DedeSqli } } - // 检测是否存在某数据表 + //检测是否存在某数据表 function IsTable($tbname) { global $dsqli; @@ -543,7 +544,7 @@ EOT; $emsg .= "

    DedeBIZ Error Warning!

    \r\n"; $emsg .= ""; $emsg .= "
    \r\n"; - $emsg .= "

    Error page: ".$this->GetCurUrl()."
    \r\n"; + $emsg .= "

    Error page: ".$this->GetCurUrl()."
    \r\n"; $emsg .= "
    Error infos: {$msg}
    \r\n"; $emsg .= "
    \r\n"; @@ -601,7 +602,7 @@ if (!function_exists('CheckSql')) { //$notallow2 = "--|/\*"; if (preg_match("/".$notallow1."/i", $db_string)) { fputs(fopen($log_file, 'a+'), "$userIP||$getUrl||$db_string||SelectBreak\r\n"); - exit("Safe Alert: Request Error step 1 !"); + exit("Safe Alert: Request Error step 1 !"); } } @@ -672,7 +673,7 @@ if (!function_exists('CheckSql')) { } if (!empty($fail)) { fputs(fopen($log_file, 'a+'), "$userIP||$getUrl||$db_string||$error\r\n"); - exit("Safe Alert: Request Error step 2!"); + exit("Safe Alert: Request Error step 2!"); } else { return $db_string; } diff --git a/src/include/dedesqlite.class.php b/src/include/dedesqlite.class.php index 643727b0..7a3203b9 100755 --- a/src/include/dedesqlite.class.php +++ b/src/include/dedesqlite.class.php @@ -1,4 +1,5 @@ -linkID) { - $this->DisplayError("DedeBIZ错误警告:连接数据库失败,可能数据库密码不对或数据库服务器出错"); + $this->DisplayError("DedeBIZ错误警告:连接数据库失败,可能数据库密码不对或数据库服务器出错"); exit(); } $this->isInit = TRUE; @@ -333,7 +334,7 @@ class DedeSqlite } //返回当前的一条记录并把游标移向下一记录 - // SQLITE3_ASSOC、SQLITE3_NUM、SQLITE3_BOTH + //SQLITE3_ASSOC、SQLITE3_NUM、SQLITE3_BOTH function GetArray($id = "me", $acctype = SQLITE3_ASSOC) { switch ($acctype) { @@ -378,7 +379,7 @@ class DedeSqlite return array_shift($this->_fixObject[$id]); } - // 检测是否存在某数据表 + //检测是否存在某数据表 function IsTable($tbname) { global $dsqlite; @@ -688,7 +689,7 @@ if (!function_exists('CheckSql')) { } if (!empty($fail)) { fputs(fopen($log_file, 'a+'), "$userIP||$getUrl||$db_string||$error\r\n"); - exit("Safe Alert: Request Error step 2!"); + exit("Safe Alert: Request Error step 2!"); } else { return $db_string; } diff --git a/src/include/dedetag.class.php b/src/include/dedetag.class.php index 5f04fc4e..f36131a7 100755 --- a/src/include/dedetag.class.php +++ b/src/include/dedetag.class.php @@ -1,4 +1,4 @@ -SetDefault(); } - // ------------------------------------------------------------------------ + //------------------------------------------------------------------------ /** * CheckDisabledFunctions @@ -202,7 +202,7 @@ class DedeTagParse { global $cfg_disable_funs; $cfg_disable_funs = isset($cfg_disable_funs) ? $cfg_disable_funs : 'phpinfo,eval,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,file_put_contents,fsockopen,fopen,fwrite'; - // 模板引擎增加disable_functions + //模板引擎增加disable_functions if (defined('DEDEDISFUN')) { $tokens = token_get_all_nl('"); $disabled_functions = explode(',', $cfg_disable_funs); @@ -362,13 +362,13 @@ class DedeTagParse } } - // 仅用于兼容旧版本 + //仅用于兼容旧版本 function LoadTemplet($filename) { $this->LoadTemplate($filename); } - // 仅用于兼容旧版本 + //仅用于兼容旧版本 function LoadFile($filename) { $this->LoadTemplate($filename); @@ -981,7 +981,7 @@ class DedeAttribute return $this->GetAtt("tagname"); } - // 获得属性个数 + //获得属性个数 function GetCount() { return $this->Count + 1; @@ -1032,7 +1032,7 @@ class DedeAttributeParse $strLen = strlen($this->sourceString); $this->cAttributes->Items = array(); - // 获得Tag的名称,解析到 cAtt->GetAtt('tagname') 中 + //获得Tag的名称,解析到 cAtt->GetAtt('tagname') 中 for ($i = 0; $i < $strLen; $i++) { if ($this->sourceString[$i] == ' ') { $this->cAttributes->Count++; @@ -1116,5 +1116,5 @@ class DedeAttributeParse $this->cAttributes->Items[$tmpatt] = trim($tmpvalue); } //print_r($this->cAttributes->Items); - } // end func + } //end func } diff --git a/src/include/dedetemplate.class.php b/src/include/dedetemplate.class.php index 4e017c75..ad81bc85 100755 --- a/src/include/dedetemplate.class.php +++ b/src/include/dedetemplate.class.php @@ -1,4 +1,4 @@ -GetAtt('function') != '') { $cTag->tagValue = $this->CompilerFunction($cTag->GetAtt('function'), $cTag->tagValue); } - // 增加默认空值处理 + //增加默认空值处理 if ($cTag->GetAtt('default') != '') { $cTag->tagValue = '<'.'?php echo empty('.$cTag->tagValue.')? \''.addslashes($cTag->GetAtt('default')).'\':'.$cTag->tagValue.'; ?'.'>'; } else { @@ -1212,7 +1212,7 @@ class TagAttributeParse $strLen = strlen($this->sourceString); $this->cAttributes->items = array(); - // 获得Tag的名称,解析到 cAtt->GetAtt('tagname') 中 + //获得Tag的名称,解析到 cAtt->GetAtt('tagname') 中 for ($i = 0; $i < $strLen; $i++) { if ($this->sourceString[$i] == ' ') { $this->cAttributes->count++; @@ -1308,7 +1308,7 @@ class TagAttributeParse $this->cAttributes->items[$tmpatt] = trim($tmpvalue); } //print_r($this->cAttributes->items); - } // end func + } //end func } //End Class diff --git a/src/include/dedevote.class.php b/src/include/dedevote.class.php index 7d742ed0..b4b36faf 100755 --- a/src/include/dedevote.class.php +++ b/src/include/dedevote.class.php @@ -1,4 +1,4 @@ - $v) { - // JS中将3级类目存放到第二个key中去 + //JS中将3级类目存放到第二个key中去 if (preg_match("#([0-9]{1,})\.([0-9]{1,})#", $k, $matchs)) { $valKey = $matchs[1] + $matchs[2] / 1000; $jsCode .= "em_{$egroup}s[{$valKey}]='$v';\r\n"; diff --git a/src/include/extend.func.php b/src/include/extend.func.php index 6fd199e6..0ad9d948 100755 --- a/src/include/extend.func.php +++ b/src/include/extend.func.php @@ -1 +1,114 @@ GetOne("SELECT c.addtable FROM #@__archives AS a LEFT JOIN #@__channeltype AS c ON a.channel=c.id where a.id='$imgid'"); + $addtable = trim($row['addtable']); + $row = $dsql->GetOne("Select imgurls From `$addtable` where aid='$imgid'"); + $ChannelUnit = new ChannelUnit(2,$imgid); + $lit_imglist = $ChannelUnit->GetlitImgLinks($row['imgurls']); + return $lit_imglist; +} +//字符过滤函数,用于安全 +function string_filter($str,$stype="inject") { + if ($stype=="inject") { + $str = str_replace ( + array ("select", "insert", "update", "delete", "alter", "cas", "union", "into", "load_file", "outfile", "create", "join", "where", "like", "drop", "modify", "rename", "'", "/*", "*", "../", "./"), + array ("","","","","","","","","","","","","","","","","","","","","",""), + $str); + } else if ($stype=="xss") { + $farr = array ("/\s+/" , "/<(\/?)(script|META|STYLE|HTML|HEAD|BODY|STYLE |i?frame|b|strong|style|html|img|P|o:p|iframe|u|em|strike|BR|div|a|TABLE|TBODY|object|tr|td|st1:chsdate|FONT|span|MARQUEE|body|title|\r\n|link|meta|\?|\%)([^>]*?)>/isU", "/(<[^>]*)on[a-zA-Z]+\s*=([^>]*>)/isU",); + $tarr = array (" ","","\\1\\2",); + $str = preg_replace ($farr, $tarr, $str); + $str = str_replace ( + array( "<", ">", "'", "\"", ";", "/*", "*", "../", "./"), + array("<",">","","","","","","",""), + $str); + } + return $str; +} +//载入自定义表单,用于发布 +function AddFilter($channelid, $type=1, $fieldsnamef=array(), $defaulttid=0, $loadtype='autofield') +{ + global $tid,$dsql,$id; + $tid = $defaulttid ? $defaulttid : $tid; + if ($id!="") + { + $tidsq = $dsql->GetOne(" Select typeid From `#@__archives` where id='$id' "); + $tid = $tidsq["typeid"]; + } + $nofilter = (isset($_REQUEST['TotalResult']) ? "&TotalResult=".$_REQUEST['TotalResult'] : '').(isset($_REQUEST['PageNo']) ? "&PageNo=".$_REQUEST['PageNo'] : ''); + $filterarr = string_filter(stripos($_SERVER['REQUEST_URI'], "list.php?tid=") ? str_replace($nofilter, '', $_SERVER['REQUEST_URI']) : $GLOBALS['cfg_cmsurl']."/plus/list.php?tid=".$tid); + $cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' "); + $fieldset=$cInfos['fieldset']; + $dtp = new DedeTagParse(); + $dtp->SetNameSpace('field','<','>'); + $dtp->LoadSource($fieldset); + $dede_addonfields = ''; + if(is_array($dtp->CTags)) + { + foreach($dtp->CTags as $tida=>$ctag) + { + $fieldsname = $fieldsnamef ? explode(",", $fieldsnamef) : explode(",", $ctag->GetName()); + if(($loadtype!='autofield' || ($loadtype=='autofield' && $ctag->GetAtt('autofield')==1)) && in_array($ctag->GetName(), $fieldsname) ) + { + $href1 = explode($ctag->GetName().'=', $filterarr); + $href2 = explode('&', $href1[1]); + $fields_value = $href2[0]; + $fields_value1 = explode('|', $fields_value); + $dede_addonfields .= ''.$ctag->GetAtt('itemname').':'; + switch ($type) { + case 1: + $dede_addonfields .= (preg_match("/&".$ctag->GetName()."=/is",$filterarr,$regm) ? 'GetName()."=".$fields_value,"",$filterarr).'" style="display:inline-block;padding:.25rem .5rem;line-height:1.5;color:#fff;background:#008e38;border-color:#008e38;border-radius:.2rem">全部' : '全部').' '; + $addonfields_items = explode(",",$ctag->GetAtt('default')); + for ($i=0; $iGetName().'=') ? str_replace("=".$fields_value,"=".$fields_value."|".urlencode($addonfields_items[$i]),$filterarr) : $filterarr.'&'.$ctag->GetName().'='.urlencode($addonfields_items[$i]); + $is_select = in_array(urlencode($addonfields_items[$i]), $fields_value1) ? 1 : 0; + $fields_value2 = ""; + for ($j=0; $jGetName()."=".$fields_value,$ctag->GetName()."=".$fields_value, "&".$ctag->GetName()."=&"), array("&".$ctag->GetName()."=".$fields_value2,$ctag->GetName()."=".$fields_value2, "&"), $filterarr); + $href3 = !end(explode("=", $href3)) ? str_replace("&".end(explode("&", $href3)), "", $href3) : $href3; + + $dede_addonfields .= ($fields_value!=urlencode($addonfields_items[$i]) && $is_select!=1 ? ''.$addonfields_items[$i].'' : ''.$addonfields_items[$i].'×')." "; + } + $dede_addonfields .= '

    '; + break; + case 2: + $dede_addonfields .= (preg_match("/&".$ctag->GetName()."=/is",$filterarr,$regm) ? 'GetName()."=".$fields_value,"",$filterarr).'">全部' : '全部').' '; + $addonfields_items = explode(",",$ctag->GetAtt('default')); + for ($i=0; $iGetName().'=') ? str_replace("=".$fields_value,"=".$fields_value."|".urlencode($addonfields_items[$i]),$filterarr) : $filterarr.'&'.$ctag->GetName().'='.urlencode($addonfields_items[$i]); + $is_select = in_array(urlencode($addonfields_items[$i]), $fields_value1) ? 1 : 0; + $fields_value2 = ""; + for ($j=0; $jGetName()."=".$fields_value,$ctag->GetName()."=".$fields_value, "&".$ctag->GetName()."=&"), array("&".$ctag->GetName()."=".$fields_value2,$ctag->GetName()."=".$fields_value2, "&"), $filterarr); + $href3 = !end(explode("=", $href3)) ? str_replace("&".end(explode("&", $href3)), "", $href3) : $href3; + + $dede_addonfields .= ($fields_value!=urlencode($addonfields_items[$i]) && $is_select!=1 ? ' '.$addonfields_items[$i].'' : ' '.$addonfields_items[$i].'')." "; + } + $dede_addonfields .= '

    '; + break; + } + } + } + } + echo $dede_addonfields; +} \ No newline at end of file diff --git a/src/include/filter.inc.php b/src/include/filter.inc.php index d05077e1..4f025961 100755 --- a/src/include/filter.inc.php +++ b/src/include/filter.inc.php @@ -1,4 +1,4 @@ - $value) { $svar[$key] = addslashes($svar[$key]); diff --git a/src/include/helpers/cache.helper.php b/src/include/helpers/cache.helper.php index d6fbf4e8..1e29e734 100755 --- a/src/include/helpers/cache.helper.php +++ b/src/include/helpers/cache.helper.php @@ -1,4 +1,4 @@ -$rnstr "; } else { - $rnstr = " $rnstr "; + $rnstr = " $rnstr "; } $reString .= $rnstr.$body[$i]; $prepos = $i; diff --git a/src/include/helpers/file.helper.php b/src/include/helpers/file.helper.php index 853d1987..e60409fd 100755 --- a/src/include/helpers/file.helper.php +++ b/src/include/helpers/file.helper.php @@ -118,7 +118,7 @@ if (!function_exists('MkdirAll')) { } /** - * 更改所有模式 + * 修改所有模式 * * @access public * @param string $truepath 文件路径 diff --git a/src/include/helpers/filter.helper.php b/src/include/helpers/filter.helper.php index ed52fd43..0bc230e5 100755 --- a/src/include/helpers/filter.helper.php +++ b/src/include/helpers/filter.helper.php @@ -63,8 +63,8 @@ if (!function_exists('RemoveXSS')) { $search .= '1234567890!@#$%^&*()'; $search .= '~`";:?+/={}[]-_|\'\\'; for ($i = 0; $i < strlen($search); $i++) { - $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ; - $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ; + $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); //with a ; + $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); //with a ; } $ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base'); diff --git a/src/include/helpers/image.helper.php b/src/include/helpers/image.helper.php index 4b14aa0a..94b49822 100755 --- a/src/include/helpers/image.helper.php +++ b/src/include/helpers/image.helper.php @@ -1,4 +1,4 @@ - $val) { if (!is_NULL($val)) { @@ -279,7 +279,7 @@ if (!function_exists('json_encode')) { } } } - if (strlen($json) > 1) { // 加上判断 防止空数组 + if (strlen($json) > 1) { //加上判断 防止空数组 $json = substr($json, 0, -1); } $json .= $assoc ? '}' : ']'; @@ -298,15 +298,15 @@ if (!function_exists('json_encode')) { if (!function_exists('json_decode')) { function json_decode($json, $assoc = FALSE) { - // 目前不支持二维数组或对象 + //目前不支持二维数组或对象 $begin = substr($json, 0, 1); if (!in_array($begin, array('{', '['))) - // 不是对象或者数组直接返回 + //不是对象或者数组直接返回 return $json; $parse = substr($json, 1, -1); $data = explode(',', $parse); if ($flag = $begin == '{') { - // 转换成PHP对象 + //转换成PHP对象 $result = new stdClass(); foreach ($data as $val) { $item = explode(':', $val); @@ -316,7 +316,7 @@ if (!function_exists('json_decode')) { if ($assoc) $result = get_object_vars($result); } else { - // 转换成PHP数组 + //转换成PHP数组 $result = array(); foreach ($data as $val) $result[] = json_decode($val, $assoc); diff --git a/src/include/image.class.php b/src/include/image.class.php index 23fd750a..12e983b6 100755 --- a/src/include/image.class.php +++ b/src/include/image.class.php @@ -21,13 +21,13 @@ class image var $thumbstatus; var $watermarkstatus; - // 析构函数,兼容PHP4 + //析构函数,兼容PHP4 function image($targetfile, $cfg_thumb, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $cfg_watermarktype, $photo_marktrans, $trueMarkimg, $attach = array()) { $this->__construct($targetfile, $cfg_thumb, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $cfg_watermarktype, $photo_marktrans, $trueMarkimg, $attach); } - // 析构函数 + //析构函数 function __construct($targetfile, $cfg_thumb, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $cfg_watermarktype, $photo_marktrans, $trueMarkimg, $attach = array()) { $this->thumbstatus = $cfg_thumb; diff --git a/src/include/image.func.php b/src/include/image.func.php index 9010290a..543b68be 100755 --- a/src/include/image.func.php +++ b/src/include/image.func.php @@ -1,4 +1,4 @@ - @@ -190,9 +190,9 @@ EOT; } } else { /* - // ------------------------------------------------------------------------ - // 当前版本,暂时取消dedehtml编辑器的支持 - // ------------------------------------------------------------------------ + //------------------------------------------------------------------------ + //当前版本,暂时取消dedehtml编辑器的支持 + //------------------------------------------------------------------------ require_once(DEDEINC.'/htmledit/dede_editor.php'); $ded = new DedeEditor($fname); $ded->BasePath = $GLOBALS['cfg_cmspath'].'/include/htmledit/' ; diff --git a/src/include/inc/inc_fun_funString.php b/src/include/inc/inc_fun_funString.php index 90342c24..86e77aea 100755 --- a/src/include/inc/inc_fun_funString.php +++ b/src/include/inc/inc_fun_funString.php @@ -1,7 +1,7 @@ debug = FALSE; diff --git a/src/include/memberlogin.class.php b/src/include/memberlogin.class.php index eb04d86d..a044829a 100755 --- a/src/include/memberlogin.class.php +++ b/src/include/memberlogin.class.php @@ -1,4 +1,4 @@ -GetOne("Select id From `#@__admin` where userid='".$this->M_LoginID."'"); if (!is_array($rs)) { - if ($this->M_Rank > 10 && $this->M_HasDay > 0) $sta .= " 剩余天数: ".$this->M_HasDay." 天 "; - elseif ($this->M_Rank > 10) $sta .= " 会员升级已经到期 "; + if ($this->M_Rank > 10 && $this->M_HasDay > 0) $sta .= " 剩余天数: ".$this->M_HasDay." 天 "; + elseif ($this->M_Rank > 10) $sta .= " 会员升级已经到期 "; } } $sta .= " 拥有金币:{$this->M_Money} 个, 积分:{$this->M_Scores} 分。"; diff --git a/src/include/oxwindow.class.php b/src/include/oxwindow.class.php index 4705c424..c582cf3a 100755 --- a/src/include/oxwindow.class.php +++ b/src/include/oxwindow.class.php @@ -1,5 +1,5 @@ 返回主页 会员中心"; } else if ( $ordertype=="member" ) { $oldinf = $this->success_mem($order_sn,$pname,$product,$pid); - return $msg = "".$oldinf."
    返回主页 会员中心"; + return $msg = "".$oldinf."
    返回主页 会员中心"; } } else { $this->log_result ("verify_failed"); @@ -236,7 +236,7 @@ class Alipay } else { $cardid = $row['cardid']; $sql1=" UPDATE #@__moneycard_record SET uid='".$this->mid."',isexp='1',utime='".time()."' WHERE cardid='$cardid' "; - $oldinf='您的充值密码是:'.$cardid.''; + $oldinf='您的充值密码是:'.$cardid.''; } //更新交易状态为已关闭 $sql2=" UPDATE #@__member_operation SET sta=2,oldinfo='$oldinf' WHERE buyid='$order_sn'"; diff --git a/src/include/payment/bank.php b/src/include/payment/bank.php index abd6d0ce..61033917 100755 --- a/src/include/payment/bank.php +++ b/src/include/payment/bank.php @@ -1,5 +1,5 @@ 返回主页 会员中心"; } else if ($ordertype=="member") { $oldinf = $this->success_mem($r6_Order,$pname,$product,$pid); - return $msg = "".$oldinf."
    返回主页 会员中心"; + return $msg = "".$oldinf."
    返回主页 会员中心"; } } else if ( $r9_BType == "2" ){ #如果需要应答机制则必须回写流,以success开头,大小写不敏感. @@ -302,10 +302,10 @@ class yeepay function HmacMd5($data,$key,$lang='utf-8') { - // RFC 2104 HMAC implementation for php. - // Creates an md5 HMAC. - // Eliminates the need to install mhash to compute a HMAC - // Hacked by Lance Rushing(NOTE: Hacked means written) + //RFC 2104 HMAC implementation for php. + //Creates an md5 HMAC. + //Eliminates the need to install mhash to compute a HMAC + //Hacked by Lance Rushing(NOTE: Hacked means written) //需要配置环境支持iconv,否则中文参数不能正常处理 if($GLOBALS['cfg_soft_lang'] != 'utf-8' || $lang!='utf-8') @@ -313,7 +313,7 @@ class yeepay $key = gb2utf8($key); $data = gb2utf8($data); } - $b = 64; // byte length for md5 + $b = 64; //byte length for md5 if (strlen($key) > $b) { $key = pack("H*",md5($key)); } @@ -368,7 +368,7 @@ class yeepay } else { $cardid = $row['cardid']; $sql1=" UPDATE #@__moneycard_record SET uid='".$this->mid."',isexp='1',utime='".time()."' WHERE cardid='$cardid' "; - $oldinf='您的充值密码是:'.$cardid.''; + $oldinf='您的充值密码是:'.$cardid.''; } //更新交易状态为已关闭 $sql2=" UPDATE #@__member_operation SET sta=2,oldinfo='$oldinf' WHERE buyid='$order_sn'"; diff --git a/src/include/qrcode.class.php b/src/include/qrcode.class.php index cc230f07..2c8da510 100755 --- a/src/include/qrcode.class.php +++ b/src/include/qrcode.class.php @@ -1,4 +1,5 @@ quality = (isset($config['quality'])) ? $config['quality'] : $this->quality; $this->size = (isset($config['size'])) ? $config['size'] : $this->size; - // use cache - more disk reads but less CPU power, masks and format templates are stored there + //use cache - more disk reads but less CPU power, masks and format templates are stored there if (!defined('QR_CACHEABLE')) define('QR_CACHEABLE', $this->cacheable); - // used when QR_CACHEABLE === true + //used when QR_CACHEABLE === true if (!defined('QR_CACHE_DIR')) define('QR_CACHE_DIR', $this->cachedir); - // default error logs dir + //default error logs dir if (!defined('QR_LOG_DIR')) define('QR_LOG_DIR', $this->errorlog); - // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code + //if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code if ($this->quality) { if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', true); } else { @@ -44,13 +45,13 @@ class DedeQrcode if (!defined('QR_DEFAULT_MASK')) define('QR_DEFAULT_MASK', $this->quality); } - // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly + //if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly if (!defined('QR_FIND_FROM_RANDOM')) define('QR_FIND_FROM_RANDOM', false); - // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images + //maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images if (!defined('QR_PNG_MAXIMUM_SIZE')) define('QR_PNG_MAXIMUM_SIZE', $this->size); - // call original library + //call original library require_once dirname(__FILE__)."/qrcode/qrconst.php"; require_once dirname(__FILE__)."/qrcode/qrtools.php"; require_once dirname(__FILE__)."/qrcode/qrspec.php"; diff --git a/src/include/qrcode/phpqrcode.php b/src/include/qrcode/phpqrcode.php index ea8c08f9..9aa2ac7f 100755 --- a/src/include/qrcode/phpqrcode.php +++ b/src/include/qrcode/phpqrcode.php @@ -74,7 +74,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - // Encoding modes + //Encoding modes define('QR_MODE_NUL', -1); define('QR_MODE_NUM', 0); @@ -83,14 +83,14 @@ define('QR_MODE_KANJI', 3); define('QR_MODE_STRUCTURE', 4); - // Levels of error correction. + //Levels of error correction. define('QR_ECLEVEL_L', 0); define('QR_ECLEVEL_M', 1); define('QR_ECLEVEL_Q', 2); define('QR_ECLEVEL_H', 3); - // Supported output formats + //Supported output formats define('QR_FORMAT_TEXT', 0); define('QR_FORMAT_PNG', 1); @@ -114,15 +114,15 @@ * Config file, tuned-up for merged verion */ - define('QR_CACHEABLE', false); // use cache - more disk reads but less CPU power, masks and format templates are stored there - define('QR_CACHE_DIR', false); // used when QR_CACHEABLE === true - define('QR_LOG_DIR', false); // default error logs dir + define('QR_CACHEABLE', false); //use cache - more disk reads but less CPU power, masks and format templates are stored there + define('QR_CACHE_DIR', false); //used when QR_CACHEABLE === true + define('QR_LOG_DIR', false); //default error logs dir - define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code - define('QR_FIND_FROM_RANDOM', 2); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly - define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false + define('QR_FIND_BEST_MASK', true); //if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code + define('QR_FIND_FROM_RANDOM', 2); //if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly + define('QR_DEFAULT_MASK', 2); //when QR_FIND_BEST_MASK === false - define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images + define('QR_PNG_MAXIMUM_SIZE', 1024); //maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images @@ -355,11 +355,11 @@ public static $capacity = array( array( 0, 0, 0, array( 0, 0, 0, 0)), - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 + array( 21, 26, 0, array( 7, 10, 13, 17)), //1 array( 25, 44, 7, array( 10, 16, 22, 28)), array( 29, 70, 7, array( 15, 26, 36, 44)), array( 33, 100, 7, array( 20, 36, 52, 64)), - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 + array( 37, 134, 7, array( 26, 48, 72, 88)), //5 array( 41, 172, 7, array( 36, 64, 96, 112)), array( 45, 196, 0, array( 40, 72, 108, 130)), array( 49, 242, 0, array( 48, 88, 132, 156)), @@ -478,23 +478,23 @@ $words = (1 << $bits) - 1; if($mode == QR_MODE_KANJI) { - $words *= 2; // the number of bytes is required + $words *= 2; //the number of bytes is required } return $words; } - // Error correction code ----------------------------------------------- - // Table of the error correction code (Reed-Solomon block) - // See Table 12-16 (pp.30-36), JIS X0510:2004. + //Error correction code ----------------------------------------------- + //Table of the error correction code (Reed-Solomon block) + //See Table 12-16 (pp.30-36), JIS X0510:2004. public static $eccTable = array( array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), //1 array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 + array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), //5 array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), @@ -533,7 +533,7 @@ ); //---------------------------------------------------------------------- - // CACHEABLE!!! + //CACHEABLE!!! public static function getEccSpec($version, $level, array &$spec) { @@ -561,19 +561,19 @@ } } - // Alignment pattern --------------------------------------------------- + //Alignment pattern --------------------------------------------------- - // Positions of alignment patterns. - // This array includes only the second and the third position of the - // alignment patterns. Rest of them can be calculated from the distance - // between them. + //Positions of alignment patterns. + //This array includes only the second and the third position of the + //alignment patterns. Rest of them can be calculated from the distance + //between them. - // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + //See Table 1 in Appendix E (pp.71) of JIS X0510:2004. public static $alignmentPattern = array( array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 + array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), //1- 5 + array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), //6-10 array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 @@ -645,12 +645,12 @@ } } - // Version information pattern ----------------------------------------- + //Version information pattern ----------------------------------------- - // Version information pattern (BCH coded). - // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. + //Version information pattern (BCH coded). + //See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - // size: [QRSPEC_VERSION_MAX - 6] + //size: [QRSPEC_VERSION_MAX - 6] public static $versionPattern = array( 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, @@ -669,8 +669,8 @@ return self::$versionPattern[$version -7]; } - // Format information -------------------------------------------------- - // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) + //Format information -------------------------------------------------- + //See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) public static $formatInfo = array( array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), @@ -690,8 +690,8 @@ return self::$formatInfo[$level][$mask]; } - // Frame --------------------------------------------------------------- - // Cache of initial frames. + //Frame --------------------------------------------------------------- + //Cache of initial frames. public static $frames = array(); @@ -725,12 +725,12 @@ $frameLine = str_repeat ("\0", $width); $frame = array_fill(0, $width, $frameLine); - // Finder pattern + //Finder pattern self::putFinderPattern($frame, 0, 0); self::putFinderPattern($frame, $width - 7, 0); self::putFinderPattern($frame, 0, $width - 7); - // Separator + //Separator $yOffset = $width - 7; for($y=0; $y<7; $y++) { @@ -746,7 +746,7 @@ QRstr::set($frame, $width-8, 7, $setPattern); QRstr::set($frame, 0, $width - 8, $setPattern); - // Format info + //Format info $setPattern = str_repeat("\x84", 9); QRstr::set($frame, 0, 8, $setPattern); QRstr::set($frame, $width - 8, 8, $setPattern, 8); @@ -758,17 +758,17 @@ $frame[$yOffset][8] = "\x84"; } - // Timing pattern + //Timing pattern for($i=1; $i<$width-15; $i++) { $frame[6][7+$i] = chr(0x90 | ($i & 1)); $frame[7+$i][6] = chr(0x90 | ($i & 1)); } - // Alignment pattern + //Alignment pattern self::putAlignmentPattern($version, $frame, $width); - // Version information + //Version information if($version >= 7) { $vinf = self::getVersionPattern($version); @@ -790,7 +790,7 @@ } } - // and a little bit... + //and a little bit... $frame[$width - 8][8] = "\x81"; return $frame; @@ -2041,16 +2041,16 @@ if($mode == QR_MODE_8) { $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + + QRinput::estimateBitsMode8(1) //+ 4 + l8 + - QRinput::estimateBitsMode8($run + 1); //- 4 - l8 if($dif > 0) { return $this->eat8(); } } if($mode == QR_MODE_AN) { $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsModeAn(1) // + 4 + la - - QRinput::estimateBitsModeAn($run + 1);// - 4 - la + + QRinput::estimateBitsModeAn(1) //+ 4 + la + - QRinput::estimateBitsModeAn($run + 1);//- 4 - la if($dif > 0) { return $this->eatAn(); } @@ -2078,9 +2078,9 @@ $q++; } - $dif = QRinput::estimateBitsModeAn($p) // + 4 + la + $dif = QRinput::estimateBitsModeAn($p) //+ 4 + la + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsModeAn($q); // - 4 - la + - QRinput::estimateBitsModeAn($q); //- 4 - la if($dif < 0) { break; @@ -2096,8 +2096,8 @@ if(!self::isalnumat($this->dataStr, $p)) { $dif = QRinput::estimateBitsModeAn($run) + 4 + $la - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + + QRinput::estimateBitsMode8(1) //+ 4 + l8 + - QRinput::estimateBitsMode8($run + 1); //- 4 - l8 if($dif > 0) { return $this->eat8(); } @@ -2146,9 +2146,9 @@ while(self::isdigitat($this->dataStr, $q)) { $q++; } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + $dif = QRinput::estimateBitsMode8($p) //+ 4 + l8 + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsMode8($q); // - 4 - l8 + - QRinput::estimateBitsMode8($q); //- 4 - l8 if($dif < 0) { break; } else { @@ -2159,9 +2159,9 @@ while(self::isalnumat($this->dataStr, $q)) { $q++; } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + $dif = QRinput::estimateBitsMode8($p) //+ 4 + l8 + QRinput::estimateBitsModeAn($q - $p) + 4 + $la - - QRinput::estimateBitsMode8($q); // - 4 - l8 + - QRinput::estimateBitsMode8($q); //- 4 - l8 if($dif < 0) { break; } else { @@ -2285,16 +2285,16 @@ class QRrsItem { - public $mm; // Bits per symbol - public $nn; // Symbols per block (= (1< 8) return $rs; if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; - if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! - if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding + if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; //Can't have more roots than symbol values! + if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; //Too much padding $rs = new QRrsItem(); $rs->mm = $symsize; @@ -2332,13 +2332,13 @@ $rs->alpha_to = array_fill(0, $rs->nn+1, 0); $rs->index_of = array_fill(0, $rs->nn+1, 0); - // PHP style macro replacement ;) + //PHP style macro replacement ;) $NN =& $rs->nn; $A0 =& $NN; - // Generate Galois field lookup tables - $rs->index_of[0] = $A0; // log(zero) = -inf - $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 + //Generate Galois field lookup tables + $rs->index_of[0] = $A0; //log(zero) = -inf + $rs->alpha_to[$A0] = 0; //alpha**-inf = 0 $sr = 1; for($i=0; $i<$rs->nn; $i++) { @@ -2352,7 +2352,7 @@ } if($sr != 1){ - // field generator polynomial is not primitive! + //field generator polynomial is not primitive! $rs = NULL; return $rs; } @@ -2367,7 +2367,7 @@ /* Find prim-th root of 1, used in decoding */ for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) - ; // intentional empty-body loop! + ; //intentional empty-body loop! $rs->iprim = (int)($iprim / $prim); $rs->genpoly[0] = 1; @@ -2375,7 +2375,7 @@ for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { $rs->genpoly[$i+1] = 1; - // Multiply rs->genpoly[] by @**(root + x) + //Multiply rs->genpoly[] by @**(root + x) for ($j = $i; $j > 0; $j--) { if ($rs->genpoly[$j] != 0) { $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; @@ -2383,11 +2383,11 @@ $rs->genpoly[$j] = $rs->genpoly[$j-1]; } } - // rs->genpoly[0] can never be zero + //rs->genpoly[0] can never be zero $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; } - // convert rs->genpoly[] to index form for quicker encoding + //convert rs->genpoly[] to index form for quicker encoding for ($i = 0; $i <= $nroots; $i++) $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; @@ -2415,10 +2415,10 @@ $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; if($feedback != $A0) { - // feedback term is non-zero + //feedback term is non-zero - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() + //This line is unnecessary when GENPOLY[NROOTS] is unity, as it must + //always be for the polynomials constructed by init_rs() $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); for($j=1;$j<$NROOTS;$j++) { @@ -2426,7 +2426,7 @@ } } - // Shift + //Shift array_shift($parity); if($feedback != $A0) { array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); @@ -2990,7 +2990,7 @@ return NULL; } - // inteleaved data and ecc codes + //inteleaved data and ecc codes for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { $code = $raw->getCode(); $bit = 0x80; @@ -3005,7 +3005,7 @@ unset($raw); - // remainder bits + //remainder bits $j = QRspec::getRemainder($version); for($i=0; $i<$j; $i++) { $addr = $filler->next(); @@ -3016,7 +3016,7 @@ unset($filler); - // masking + //masking $maskObj = new QRmask(); if($mask < 0) { @@ -3210,7 +3210,7 @@ public $size = 3; public $margin = 4; - public $structured = 0; // not supported yet + public $structured = 0; //not supported yet public $level = QR_ECLEVEL_L; public $hint = QR_MODE_8; diff --git a/src/include/qrcode/qrconfig.php b/src/include/qrcode/qrconfig.php index 62e7f974..b438abe1 100755 --- a/src/include/qrcode/qrconfig.php +++ b/src/include/qrcode/qrconfig.php @@ -5,13 +5,13 @@ * Config file, feel free to modify */ - define('QR_CACHEABLE', true); // use cache - more disk reads but less CPU power, masks and format templates are stored there - define('QR_CACHE_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR); // used when QR_CACHEABLE === true - define('QR_LOG_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR); // default error logs dir + define('QR_CACHEABLE', true); //use cache - more disk reads but less CPU power, masks and format templates are stored there + define('QR_CACHE_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR); //used when QR_CACHEABLE === true + define('QR_LOG_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR); //default error logs dir - define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code - define('QR_FIND_FROM_RANDOM', false); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly - define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false + define('QR_FIND_BEST_MASK', true); //if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code + define('QR_FIND_FROM_RANDOM', false); //if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly + define('QR_DEFAULT_MASK', 2); //when QR_FIND_BEST_MASK === false - define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images + define('QR_PNG_MAXIMUM_SIZE', 1024); //maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images \ No newline at end of file diff --git a/src/include/qrcode/qrconst.php b/src/include/qrcode/qrconst.php index 60f93af1..08f22bd9 100755 --- a/src/include/qrcode/qrconst.php +++ b/src/include/qrcode/qrconst.php @@ -26,7 +26,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - // Encoding modes + //Encoding modes define('QR_MODE_NUL', -1); define('QR_MODE_NUM', 0); @@ -35,14 +35,14 @@ define('QR_MODE_KANJI', 3); define('QR_MODE_STRUCTURE', 4); - // Levels of error correction. + //Levels of error correction. define('QR_ECLEVEL_L', 0); define('QR_ECLEVEL_M', 1); define('QR_ECLEVEL_Q', 2); define('QR_ECLEVEL_H', 3); - // Supported output formats + //Supported output formats define('QR_FORMAT_TEXT', 0); define('QR_FORMAT_PNG', 1); diff --git a/src/include/qrcode/qrencode.php b/src/include/qrcode/qrencode.php index fc909fa7..646ab100 100755 --- a/src/include/qrcode/qrencode.php +++ b/src/include/qrcode/qrencode.php @@ -182,7 +182,7 @@ return NULL; } - // inteleaved data and ecc codes + //inteleaved data and ecc codes for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { $code = $raw->getCode(); $bit = 0x80; @@ -197,7 +197,7 @@ unset($raw); - // remainder bits + //remainder bits $j = QRspec::getRemainder($version); for($i=0; $i<$j; $i++) { $addr = $filler->next(); @@ -208,7 +208,7 @@ unset($filler); - // masking + //masking $maskObj = new QRmask(); if($mask < 0) { @@ -402,7 +402,7 @@ public $size = 3; public $margin = 4; - public $structured = 0; // not supported yet + public $structured = 0; //not supported yet public $level = QR_ECLEVEL_L; public $hint = QR_MODE_8; diff --git a/src/include/qrcode/qrlib.php b/src/include/qrcode/qrlib.php index 43059b9d..3431dfc5 100755 --- a/src/include/qrcode/qrlib.php +++ b/src/include/qrcode/qrlib.php @@ -27,7 +27,7 @@ $QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR; - // Required libs + //Required libs include $QR_BASEDIR."qrconst.php"; include $QR_BASEDIR."qrconfig.php"; diff --git a/src/include/qrcode/qrrscode.php b/src/include/qrcode/qrrscode.php index d7a97d9a..3ebe7b0f 100755 --- a/src/include/qrcode/qrrscode.php +++ b/src/include/qrcode/qrrscode.php @@ -30,16 +30,16 @@ class QRrsItem { - public $mm; // Bits per symbol - public $nn; // Symbols per block (= (1< 8) return $rs; if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; - if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! - if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding + if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; //Can't have more roots than symbol values! + if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; //Too much padding $rs = new QRrsItem(); $rs->mm = $symsize; @@ -77,13 +77,13 @@ $rs->alpha_to = array_fill(0, $rs->nn+1, 0); $rs->index_of = array_fill(0, $rs->nn+1, 0); - // PHP style macro replacement ;) + //PHP style macro replacement ;) $NN =& $rs->nn; $A0 =& $NN; - // Generate Galois field lookup tables - $rs->index_of[0] = $A0; // log(zero) = -inf - $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 + //Generate Galois field lookup tables + $rs->index_of[0] = $A0; //log(zero) = -inf + $rs->alpha_to[$A0] = 0; //alpha**-inf = 0 $sr = 1; for($i=0; $i<$rs->nn; $i++) { @@ -97,7 +97,7 @@ } if($sr != 1){ - // field generator polynomial is not primitive! + //field generator polynomial is not primitive! $rs = NULL; return $rs; } @@ -112,7 +112,7 @@ /* Find prim-th root of 1, used in decoding */ for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) - ; // intentional empty-body loop! + ; //intentional empty-body loop! $rs->iprim = (int)($iprim / $prim); $rs->genpoly[0] = 1; @@ -120,7 +120,7 @@ for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { $rs->genpoly[$i+1] = 1; - // Multiply rs->genpoly[] by @**(root + x) + //Multiply rs->genpoly[] by @**(root + x) for ($j = $i; $j > 0; $j--) { if ($rs->genpoly[$j] != 0) { $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; @@ -128,11 +128,11 @@ $rs->genpoly[$j] = $rs->genpoly[$j-1]; } } - // rs->genpoly[0] can never be zero + //rs->genpoly[0] can never be zero $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; } - // convert rs->genpoly[] to index form for quicker encoding + //convert rs->genpoly[] to index form for quicker encoding for ($i = 0; $i <= $nroots; $i++) $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; @@ -160,10 +160,10 @@ $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; if($feedback != $A0) { - // feedback term is non-zero + //feedback term is non-zero - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() + //This line is unnecessary when GENPOLY[NROOTS] is unity, as it must + //always be for the polynomials constructed by init_rs() $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); for($j=1;$j<$NROOTS;$j++) { @@ -171,7 +171,7 @@ } } - // Shift + //Shift array_shift($parity); if($feedback != $A0) { array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); diff --git a/src/include/qrcode/qrspec.php b/src/include/qrcode/qrspec.php index 5a0c4b3c..6077b781 100755 --- a/src/include/qrcode/qrspec.php +++ b/src/include/qrcode/qrspec.php @@ -43,11 +43,11 @@ public static $capacity = array( array( 0, 0, 0, array( 0, 0, 0, 0)), - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 + array( 21, 26, 0, array( 7, 10, 13, 17)), //1 array( 25, 44, 7, array( 10, 16, 22, 28)), array( 29, 70, 7, array( 15, 26, 36, 44)), array( 33, 100, 7, array( 20, 36, 52, 64)), - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 + array( 37, 134, 7, array( 26, 48, 72, 88)), //5 array( 41, 172, 7, array( 36, 64, 96, 112)), array( 45, 196, 0, array( 40, 72, 108, 130)), array( 49, 242, 0, array( 48, 88, 132, 156)), @@ -166,23 +166,23 @@ $words = (1 << $bits) - 1; if($mode == QR_MODE_KANJI) { - $words *= 2; // the number of bytes is required + $words *= 2; //the number of bytes is required } return $words; } - // Error correction code ----------------------------------------------- - // Table of the error correction code (Reed-Solomon block) - // See Table 12-16 (pp.30-36), JIS X0510:2004. + //Error correction code ----------------------------------------------- + //Table of the error correction code (Reed-Solomon block) + //See Table 12-16 (pp.30-36), JIS X0510:2004. public static $eccTable = array( array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), //1 array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 + array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), //5 array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), @@ -221,7 +221,7 @@ ); //---------------------------------------------------------------------- - // CACHEABLE!!! + //CACHEABLE!!! public static function getEccSpec($version, $level, array &$spec) { @@ -249,19 +249,19 @@ } } - // Alignment pattern --------------------------------------------------- + //Alignment pattern --------------------------------------------------- - // Positions of alignment patterns. - // This array includes only the second and the third position of the - // alignment patterns. Rest of them can be calculated from the distance - // between them. + //Positions of alignment patterns. + //This array includes only the second and the third position of the + //alignment patterns. Rest of them can be calculated from the distance + //between them. - // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + //See Table 1 in Appendix E (pp.71) of JIS X0510:2004. public static $alignmentPattern = array( array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 + array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), //1- 5 + array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), //6-10 array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 @@ -333,12 +333,12 @@ } } - // Version information pattern ----------------------------------------- + //Version information pattern ----------------------------------------- - // Version information pattern (BCH coded). - // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. + //Version information pattern (BCH coded). + //See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - // size: [QRSPEC_VERSION_MAX - 6] + //size: [QRSPEC_VERSION_MAX - 6] public static $versionPattern = array( 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, @@ -357,8 +357,8 @@ return self::$versionPattern[$version -7]; } - // Format information -------------------------------------------------- - // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) + //Format information -------------------------------------------------- + //See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) public static $formatInfo = array( array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), @@ -378,8 +378,8 @@ return self::$formatInfo[$level][$mask]; } - // Frame --------------------------------------------------------------- - // Cache of initial frames. + //Frame --------------------------------------------------------------- + //Cache of initial frames. public static $frames = array(); @@ -413,12 +413,12 @@ $frameLine = str_repeat ("\0", $width); $frame = array_fill(0, $width, $frameLine); - // Finder pattern + //Finder pattern self::putFinderPattern($frame, 0, 0); self::putFinderPattern($frame, $width - 7, 0); self::putFinderPattern($frame, 0, $width - 7); - // Separator + //Separator $yOffset = $width - 7; for($y=0; $y<7; $y++) { @@ -434,7 +434,7 @@ QRstr::set($frame, $width-8, 7, $setPattern); QRstr::set($frame, 0, $width - 8, $setPattern); - // Format info + //Format info $setPattern = str_repeat("\x84", 9); QRstr::set($frame, 0, 8, $setPattern); QRstr::set($frame, $width - 8, 8, $setPattern, 8); @@ -446,17 +446,17 @@ $frame[$yOffset][8] = "\x84"; } - // Timing pattern + //Timing pattern for($i=1; $i<$width-15; $i++) { $frame[6][7+$i] = chr(0x90 | ($i & 1)); $frame[7+$i][6] = chr(0x90 | ($i & 1)); } - // Alignment pattern + //Alignment pattern self::putAlignmentPattern($version, $frame, $width); - // Version information + //Version information if($version >= 7) { $vinf = self::getVersionPattern($version); @@ -478,7 +478,7 @@ } } - // and a little bit... + //and a little bit... $frame[$width - 8][8] = "\x81"; return $frame; diff --git a/src/include/qrcode/qrsplit.php b/src/include/qrcode/qrsplit.php index 8099c416..31d900aa 100755 --- a/src/include/qrcode/qrsplit.php +++ b/src/include/qrcode/qrsplit.php @@ -104,16 +104,16 @@ if($mode == QR_MODE_8) { $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + + QRinput::estimateBitsMode8(1) //+ 4 + l8 + - QRinput::estimateBitsMode8($run + 1); //- 4 - l8 if($dif > 0) { return $this->eat8(); } } if($mode == QR_MODE_AN) { $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsModeAn(1) // + 4 + la - - QRinput::estimateBitsModeAn($run + 1);// - 4 - la + + QRinput::estimateBitsModeAn(1) //+ 4 + la + - QRinput::estimateBitsModeAn($run + 1);//- 4 - la if($dif > 0) { return $this->eatAn(); } @@ -141,9 +141,9 @@ $q++; } - $dif = QRinput::estimateBitsModeAn($p) // + 4 + la + $dif = QRinput::estimateBitsModeAn($p) //+ 4 + la + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsModeAn($q); // - 4 - la + - QRinput::estimateBitsModeAn($q); //- 4 - la if($dif < 0) { break; @@ -159,8 +159,8 @@ if(!self::isalnumat($this->dataStr, $p)) { $dif = QRinput::estimateBitsModeAn($run) + 4 + $la - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + + QRinput::estimateBitsMode8(1) //+ 4 + l8 + - QRinput::estimateBitsMode8($run + 1); //- 4 - l8 if($dif > 0) { return $this->eat8(); } @@ -209,9 +209,9 @@ while(self::isdigitat($this->dataStr, $q)) { $q++; } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + $dif = QRinput::estimateBitsMode8($p) //+ 4 + l8 + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsMode8($q); // - 4 - l8 + - QRinput::estimateBitsMode8($q); //- 4 - l8 if($dif < 0) { break; } else { @@ -222,9 +222,9 @@ while(self::isalnumat($this->dataStr, $q)) { $q++; } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + $dif = QRinput::estimateBitsMode8($p) //+ 4 + l8 + QRinput::estimateBitsModeAn($q - $p) + 4 + $la - - QRinput::estimateBitsMode8($q); // - 4 - l8 + - QRinput::estimateBitsMode8($q); //- 4 - l8 if($dif < 0) { break; } else { diff --git a/src/include/request.class.php b/src/include/request.class.php index 07dd1ef2..c160321f 100755 --- a/src/include/request.class.php +++ b/src/include/request.class.php @@ -1,5 +1,5 @@ Fields['id']}"; if ($type === "next") { $asql = "WHERE id>{$refObj->Fields['id']}"; @@ -39,7 +39,7 @@ function lib_arccontent(&$ctag, &$refObj) } if (!empty($aid)) { - // 指定ID获取内容 + //指定ID获取内容 $row = $dsql->GetOne("SELECT id,channel FROM `#@__arctiny` WHERE id={$aid} AND arcrank>-1"); $channel = new ChannelUnit($row['channel'], $aid); $fields = $dsql->GetOne("SELECT * FROM `{$channel->ChannelInfos['addtable']}` WHERE aid = {$row['id']}"); diff --git a/src/include/taglib/arclist.lib.php b/src/include/taglib/arclist.lib.php index 8d3fafa4..c071d994 100755 --- a/src/include/taglib/arclist.lib.php +++ b/src/include/taglib/arclist.lib.php @@ -1,4 +1,5 @@ -GetTagName(); $channelid = $ctag->GetAtt('channelid'); - //增加对分页内容的处理 $pagesize = $ctag->GetAtt('pagesize'); if ($pagesize == '') { @@ -36,9 +34,8 @@ function lib_arclist(&$ctag, &$refObj) } else { $tagid = $ctag->GetAtt('tagid'); } - // arclist是否需要weight排序,默认为"N",如果需要排序则设置为"Y" + //arclist是否需要weight排序,默认为"N",如果需要排序则设置为"Y" $isweight = $ctag->GetAtt('isweight'); - if ($tagname == 'imglist' || $tagname == 'imginfolist') { $listtype = 'image'; } else if ($tagname == 'specart') { @@ -51,69 +48,36 @@ function lib_arclist(&$ctag, &$refObj) } else { $listtype = $ctag->GetAtt('type'); } - //排序 if ($ctag->GetAtt('sort') != '') $orderby = $ctag->GetAtt('sort'); else if ($tagname == 'hotart') $orderby = 'click'; else $orderby = $ctag->GetAtt('orderby'); - //对相应的标记使用不同的默认innertext if (trim($ctag->GetInnerText()) != '') $innertext = $ctag->GetInnerText(); else if ($tagname == 'imglist') $innertext = GetSysTemplets('part_imglist.htm'); else if ($tagname == 'imginfolist') $innertext = GetSysTemplets('part_imginfolist.htm'); else $innertext = GetSysTemplets("part_arclist.htm"); - //兼容titlelength if ($ctag->GetAtt('titlelength') != '') $titlelen = $ctag->GetAtt('titlelength'); else $titlelen = $ctag->GetAtt('titlelen'); - //兼容infolength if ($ctag->GetAtt('infolength') != '') $infolen = $ctag->GetAtt('infolength'); else $infolen = $ctag->GetAtt('infolen'); - $typeid = trim($ctag->GetAtt('typeid')); if (empty($typeid)) { $typeid = (isset($refObj->Fields['typeid']) ? $refObj->Fields['typeid'] : $envs['typeid']); } - if ($listtype == 'autolist') { $typeid = lib_GetAutoChannelID($ctag->GetAtt('partsort'), $typeid); } - if ($ctag->GetAtt('att') == '') { $flag = $ctag->GetAtt('flag'); } else { $flag = $ctag->GetAtt('att'); } - - return lib_arclistDone( - $refObj, - $ctag, - $typeid, - $ctag->GetAtt('row'), - $ctag->GetAtt('col'), - $titlelen, - $infolen, - $ctag->GetAtt('imgwidth'), - $ctag->GetAtt('imgheight'), - $listtype, - $orderby, - $ctag->GetAtt('keyword'), - $innertext, - $envs['aid'], - $ctag->GetAtt('idlist'), - $channelid, - $ctag->GetAtt('limit'), - $flag, - $ctag->GetAtt('orderway'), - $ctag->GetAtt('subday'), - $ctag->GetAtt('noflag'), - $tagid, - $pagesize, - $isweight + return lib_arclistDone ($refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen, $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby, $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid, $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'), $tagid,$pagesize,$isweight,$ctag->GetAtt('notypeid') ); } - /** * arclist解析函数 * @@ -143,32 +107,8 @@ function lib_arclist(&$ctag, &$refObj) * @param string $isweight 是否需要对检索出来的内容按照weight排序 * @return string */ -function lib_arclistDone( - &$refObj, - &$ctag, - $typeid = 0, - $row = 10, - $col = 1, - $titlelen = 30, - $infolen = 160, - $imgwidth = 120, - $imgheight = 90, - $listtype = 'all', - $orderby = 'default', - $keyword = '', - $innertext = '', - $arcid = 0, - $idlist = '', - $channelid = 0, - $limit = '', - $att = '', - $order = 'desc', - $subday = 0, - $noflag = '', - $tagid = '', - $pagesize = 0, - $isweight = 'N' -) { +function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160, $imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='', $innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='', $order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0, $isweight='N',$notypeid=0) +{ global $dsql, $PubFields, $cfg_keyword_like, $cfg_index_cache, $_arclistEnv, $envs, $cfg_cache_type, $cfg_digg_update; $row = AttDef($row, 10); $titlelen = AttDef($titlelen, 30); @@ -186,7 +126,6 @@ function lib_arclistDone( $orderby = strtolower($orderby); $keyword = trim($keyword); $innertext = trim($innertext); - $tablewidth = $ctag->GetAtt('tablewidth'); $writer = $ctag->GetAtt('writer'); if ($tablewidth == "") $tablewidth = 100; @@ -194,36 +133,14 @@ function lib_arclistDone( $colWidth = ceil(100 / $col); $tablewidth = $tablewidth."%"; $colWidth = $colWidth."%"; - //记录属性,以便分页样式统一调用 - $attarray = compact( - "row", - "titlelen", - 'infolen', - 'imgwidth', - 'imgheight', - 'listtype', - 'arcid', - 'channelid', - 'orderby', - 'orderWay', - 'subday', - 'pagesize', - 'orderby', - 'keyword', - 'tablewidth', - 'col', - 'colWidth' - ); - + $attarray = compact('row', 'titlelen', 'infolen', 'imgwidth', 'imgheight', 'listtype', 'arcid', 'channelid', 'orderby', 'orderWay', 'subday', 'pagesize', 'orderby', 'keyword', 'tablewidth', 'col', 'colWidth'); if ($innertext == '') $innertext = GetSysTemplets('part_arclist.htm'); if (@$ctag->GetAtt('getall') == 1) $getall = 1; else $getall = 0; - if ($att == '0') $att = ''; if ($att == '3') $att = 'f'; if ($att == '1') $att = 'h'; - $orwheres = array(); $maintable = '#@__archives'; //按不同情况设定SQL条件 排序方式 @@ -231,12 +148,10 @@ function lib_arclistDone( if ($orderby == 'near' && $cfg_keyword_like == 'N') { $keyword = ''; } - if ($writer == 'this') { $wmid = isset($refObj->Fields['mid']) ? $refObj->Fields['mid'] : 0; $orwheres[] = " arc.mid = '$wmid' "; } - //时间限制(用于调用最近热门文章、热门评论之类),这里的时间只能计算到天,否则缓存功能将无效 if ($subday > 0) { $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); @@ -255,7 +170,6 @@ function lib_arclistDone( $flags = explode(',', $att); for ($i = 0; isset($flags[$i]); $i++) $orwheres[] = " FIND_IN_SET('{$flags[$i]}', arc.flag)>0 "; } - if (!empty($typeid) && $typeid != 'top') { //指定了多个栏目时,不再获取子类的id if (preg_match('#,#', $typeid)) { @@ -299,7 +213,6 @@ function lib_arclistDone( else $orwheres[] = ' arc.typeid IN ('.GetSonIds($typeid).','.$CrossID.')'; } } - //频道ID if (preg_match('#spec#i', $listtype)) $channelid == -1; @@ -316,13 +229,14 @@ function lib_arclistDone( } } } - - $orwheres[] = ' arc.arcrank > -1 '; - + $orwheres[] = 'arc.arcrank > -1'; + if(!empty($notypeid)) + { + $orwheres[] = "and arc.typeid NOT IN (".GetSonIds($notypeid).")"; + } //由于这个条件会导致缓存功能失去意义,因此取消 //if($arcid!=0) $orwheres[] = " arc.id<>'$arcid' "; } - //文档排序的方式 $ordersql = ''; if ($orderby == 'hot' || $orderby == 'click') $ordersql = " ORDER BY arc.click $orderWay"; @@ -331,12 +245,11 @@ function lib_arclistDone( else if ($orderby == 'near') $ordersql = " ORDER BY ABS(arc.id - ".$arcid.")"; else if ($orderby == 'lastpost') $ordersql = " ORDER BY arc.lastpost $orderWay"; else if ($orderby == 'scores') $ordersql = " ORDER BY arc.scores $orderWay"; - //功能:增加按好评数和差评数调用 + //增加按好评数和差评数调用 else if ($orderby == 'goodpost') $ordersql = " order by arc.goodpost $orderWay"; else if ($orderby == 'badpost') $ordersql = " order by arc.badpost $orderWay"; else if ($orderby == 'rand') $ordersql = " ORDER BY rand()"; else $ordersql = " ORDER BY arc.sortrank $orderWay"; - //limit条件 $limit = trim(preg_replace('#limit#is', '', $limit)); if ($limit != '') { @@ -344,7 +257,6 @@ function lib_arclistDone( $limitarr = explode(',', $limit); $line = isset($limitarr[1]) ? $limitarr[1] : $line; } else $limitsql = " LIMIT 0,$line "; - $orwhere = ''; if (isset($orwheres[0])) { $orwhere = join(' And ', $orwheres); @@ -352,7 +264,6 @@ function lib_arclistDone( $orwhere = preg_replace("#And[ ]{1,}And#is", 'And ', $orwhere); } if ($orwhere != '') $orwhere = " WHERE $orwhere "; - //获取附加表信息 $addfield = trim($ctag->GetAtt('addfields')); $addfieldsSql = ''; @@ -367,20 +278,17 @@ function lib_arclistDone( $addfieldsSqlJoin = " LEFT JOIN `$addtable` addf ON addf.aid = arc.id "; } } - $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule, tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath $addfieldsSql FROM `$maintable` arc LEFT JOIN `#@__arctype` tp on arc.typeid=tp.id $addfieldsSqlJoin $orwhere $ordersql $limitsql"; - //统一hash $taghash = md5(serialize($ctag).$typeid); $needSaveCache = true; //进行tagid的默认处理 if ($pagesize > 0) $tagid = AttDef($tagid, 'tag'.$taghash); - if ($idlist != '' || $GLOBALS['_arclistEnv'] == 'index' || $cfg_index_cache == 0) { $needSaveCache = false; } else { @@ -394,7 +302,6 @@ function lib_arclistDone( return $idlist; } } - //指定了id或使用缓存中的id if ($idlist != '') { $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart, @@ -404,7 +311,6 @@ function lib_arclistDone( $addfieldsSqlJoin WHERE arc.id in($idlist) $ordersql "; } - $dsql->SetQuery($query); $dsql->Execute('al'); //$row = $dsql->GetArray("al"); @@ -417,7 +323,6 @@ function lib_arclistDone( $GLOBALS['autoindex'] = 0; $ids = array(); $orderWeight = array(); - for ($i = 0; $i < $line; $i++) { if ($col > 1) $artlist .= "
    \r\n"; for ($j = 0; $j < $col; $j++) { @@ -427,11 +332,9 @@ function lib_arclistDone( //处理一些特殊字段 $row['info'] = $row['infos'] = cn_substr($row['description'], $infolen); $row['id'] = $row['id']; - if ($row['corank'] > 0 && $row['arcrank'] == 0) { $row['arcrank'] = $row['corank']; } - $row['filename'] = $row['arcurl'] = GetFileUrl( $row['id'], $row['typeid'], @@ -447,7 +350,6 @@ function lib_arclistDone( $row['siteurl'], $row['sitepath'] ); - $row['typeurl'] = GetTypeUrl( $row['typeid'], $row['typedir'], @@ -459,7 +361,6 @@ function lib_arclistDone( $row['siteurl'], $row['sitepath'] ); - if ($row['litpic'] == '-' || $row['litpic'] == '') { $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif'; } @@ -473,15 +374,13 @@ function lib_arclistDone( $row['imglink'] = "".$row['image'].""; $row['fulltitle'] = $row['title']; $row['title'] = cn_substr($row['title'], $titlelen); - if ($row['color'] != '') $row['title'] = "".$row['title'].""; + if ($row['color'] != '') $row['title'] = "".$row['title'].""; if (preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title'].""; //$row['title'] = "".$row['title'].""; $row['textlink'] = "".$row['title'].""; - $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; $row['memberurl'] = $GLOBALS['cfg_memberurl']; $row['templeturl'] = $GLOBALS['cfg_templeturl']; - if (is_array($dtp2->CTags)) { foreach ($dtp2->CTags as $k => $ctag) { if ($ctag->GetName() == 'array') { @@ -513,13 +412,12 @@ function lib_arclistDone( 'weight' => $row['weight'], 'arclist' => $liststr ); - } //if hasRow + }//if hasRow else { $artlist .= ''; } - - // 进行判断,如果启用排序则内容输出为重新排序后的内容 - // var_dump($isweight=='y' && count($orderWeight) == $line); + //进行判断,如果启用排序则内容输出为重新排序后的内容 + //var_dump($isweight=='y' && count($orderWeight) == $line); $isweight = strtolower($isweight); if ($isweight == 'y') { $artlist = ''; @@ -530,14 +428,13 @@ function lib_arclistDone( } } if ($col > 1) $artlist .= " \r\n"; - } //Loop Col + }//Loop Col if ($col > 1) $i += $col - 1; if ($col > 1) $artlist .= " \r\n"; - } //loop line + }//loop line if ($col > 1) $artlist .= "
    \r\n"; $dsql->FreeResult("al"); $idsstr = join(',', $ids); - //分页特殊处理 if ($pagesize > 0) { $artlist .= " \r\n"; @@ -551,22 +448,10 @@ function lib_arclistDone( "; $dsql->ExecuteNoneQuery($query); } else { - $query = "UPDATE `#@__arcmulti` - SET - uptime='$uptime', - innertext='$innertext', - pagesize='$pagesize', - arcids='$idsstr', - ordersql='$ordersql', - addfieldsSql='$addfieldsSql', - addfieldsSqlJoin='$addfieldsSqlJoin', - attstr='$attstr' - WHERE tagid='$tagid' - "; + $query = "UPDATE `#@__arcmulti` SET uptime='$uptime', innertext='$innertext', pagesize='$pagesize', arcids='$idsstr', ordersql='$ordersql', addfieldsSql='$addfieldsSql', addfieldsSqlJoin='$addfieldsSqlJoin', attstr='$attstr' WHERE tagid='$tagid'"; $dsql->ExecuteNoneQuery($query); } } - //保存ID缓存 if ($needSaveCache) { if ($idsstr == '') $idsstr = '0'; @@ -579,7 +464,6 @@ function lib_arclistDone( } return $artlist; } - /** * 查询缓存 * @@ -602,7 +486,6 @@ function GetArclistCache($md5hash) return $arr['cachedata']; } } - /** * 获取自动频道ID * @@ -620,15 +503,13 @@ function lib_GetAutoChannelID($sortid, $topid) if (!is_array($row)) return 0; else return $row['id']; } - /** * 对查询结果集进行排序 * * @access public * @param array $list 查询结果 * @param string $field 排序的字段名 - * @param array $sortby 排序类型 - * asc正向排序 desc逆向排序 nat自然排序 + * @param array $sortby 排序类型 asc正向排序 desc逆向排序 nat自然排序 * @return array */ function list_sort_by($list, $field, $sortby = 'asc') @@ -638,13 +519,13 @@ function list_sort_by($list, $field, $sortby = 'asc') foreach ($list as $i => $data) $refer[$i] = &$data[$field]; switch ($sortby) { - case 'asc': // 正向排序 + case 'asc'://正向排序 asort($refer); break; - case 'desc': // 逆向排序 + case 'desc'://逆向排序 arsort($refer); break; - case 'nat': // 自然排序 + case 'nat'://自然排序 natcasesort($refer); break; } @@ -653,4 +534,4 @@ function list_sort_by($list, $field, $sortby = 'asc') return $resultSet; } return false; -} +} \ No newline at end of file diff --git a/src/include/taglib/arclistsg.lib.php b/src/include/taglib/arclistsg.lib.php index ea52fb86..f75e93f7 100755 --- a/src/include/taglib/arclistsg.lib.php +++ b/src/include/taglib/arclistsg.lib.php @@ -18,7 +18,6 @@ * @param object $refObj 引用对象 * @return string 成功后返回解析后的标签内容 */ - function lib_arclistsg(&$ctag, &$refObj) { global $dsql, $PubFields, $cfg_keyword_like, $cfg_index_cache, $_arclistEnv, $envs, $_sys_globals; diff --git a/src/include/taglib/arcpagelist.lib.php b/src/include/taglib/arcpagelist.lib.php index f0946bf5..2a042faf 100755 --- a/src/include/taglib/arcpagelist.lib.php +++ b/src/include/taglib/arcpagelist.lib.php @@ -1,4 +1,4 @@ -Clear(); return "无链接信息"; } - // 去除链接信息 + //去除链接信息 if (!empty($row['sites'])) { $sertype_arr = array(); $row['sites'] = preg_replace("#[\r\n]{1,}#", "\n", $row['sites']); diff --git a/src/include/taglib/channel/specialtopic.lib.php b/src/include/taglib/channel/specialtopic.lib.php index 07c1103f..25d0ebc6 100755 --- a/src/include/taglib/channel/specialtopic.lib.php +++ b/src/include/taglib/channel/specialtopic.lib.php @@ -1,4 +1,4 @@ -CAttribute->Items, $attlist); extract($ctag->CAttribute->Items, EXTR_SKIP); $innertext = trim($ctag->GetInnerText()); @@ -42,6 +42,10 @@ function lib_channelartlist(&$ctag, &$refObj) $tpsql = " id IN($typeid) AND ispart<>2 AND ishidden<>1 "; } } + //否定指定栏目 + if($notypeid!=0) { + $tpsql = $tpsql."and not(id in($notypeid))"; + } $dsql->SetQuery("SELECT * FROM `#@__arctype` WHERE $tpsql ORDER BY sortrank ASC LIMIT $totalnum"); $dsql->Execute(); while ($row = $dsql->GetArray()) { diff --git a/src/include/taglib/demotag.lib.php b/src/include/taglib/demotag.lib.php index 9b7b4080..54f99ba0 100755 --- a/src/include/taglib/demotag.lib.php +++ b/src/include/taglib/demotag.lib.php @@ -1,6 +1,6 @@ ".$row['image'].""; $row['fulltitle'] = $row['title']; $row['title'] = cn_substr($row['title'], $titlelen); - if ($row['color'] != '') $row['title'] = "".$row['title'].""; + if ($row['color'] != '') $row['title'] = "".$row['title'].""; if (preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title'].""; $row['textlink'] = "".$row['title'].""; $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; diff --git a/src/include/taglib/likepage.lib.php b/src/include/taglib/likepage.lib.php index 5f71ce52..418a81b6 100755 --- a/src/include/taglib/likepage.lib.php +++ b/src/include/taglib/likepage.lib.php @@ -11,7 +11,7 @@ */ -if (!defined('DEDEINC')) exit('Request Error!'); +if (!defined('DEDEINC')) exit('dedebiz'); require_once(dirname(__FILE__).'/likesgpage.lib.php'); function lib_likepage(&$ctag, &$refObj) diff --git a/src/include/taglib/likesgpage.lib.php b/src/include/taglib/likesgpage.lib.php index 7502b19a..0dd1770e 100755 --- a/src/include/taglib/likesgpage.lib.php +++ b/src/include/taglib/likesgpage.lib.php @@ -1,4 +1,4 @@ -".$row['image'].""; $row['fulltitle'] = $row['title']; $row['title'] = cn_substr($row['title'], $titlelen); - if (isset($row['color']) && $row['color'] != '') $row['title'] = "".$row['title'].""; + if (isset($row['color']) && $row['color'] != '') $row['title'] = "".$row['title'].""; if (preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title'].""; $row['textlink'] = "".$row['title'].""; $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; diff --git a/src/include/taglib/softmsg.lib.php b/src/include/taglib/softmsg.lib.php index 7e15bf07..cbe0e116 100755 --- a/src/include/taglib/softmsg.lib.php +++ b/src/include/taglib/softmsg.lib.php @@ -1,6 +1,6 @@ GetVersion()); $mysqlver = $mysqlver[0].'.'.$mysqlver[1]; - // 设定数据库编码及长连接 + //设定数据库编码及长连接 if ($mysqlver > 4.0) { @mysql_query("SET NAMES '".$config['dblanguage']."', character_set_client=binary, sql_mode='', interactive_timeout=3600 ;", $linkid); } @@ -64,14 +64,14 @@ function lib_sql(&$ctag, &$refObj) $prefix = "#@__"; $sql = str_replace($prefix, $config['dbprefix'], $sql); - // 校验SQL字符串并获取数组返回 + //校验SQL字符串并获取数组返回 $sql = CheckSql($sql); $rs = @mysql_query($sql, $linkid); while ($row = mysql_fetch_array($rs, MYSQL_ASSOC)) { $sqlCt++; $GLOBALS['autoindex']++; - // 根据程序判断编码类型,并进行转码,这里主要就是gbk和utf-8 + //根据程序判断编码类型,并进行转码,这里主要就是gbk和utf-8 if (substr($cfg_soft_lang, 0, 2) != substr($config['dblanguage'], 0, 2)) { $row = AutoCharset($row, $config['dblanguage'], $cfg_soft_lang); } diff --git a/src/include/taglib/tag.lib.php b/src/include/taglib/tag.lib.php index 47eaf6bf..0f9580ca 100755 --- a/src/include/taglib/tag.lib.php +++ b/src/include/taglib/tag.lib.php @@ -25,7 +25,7 @@ function lib_tag(&$ctag, &$refObj) $ltype = $sort; $num = $row; - $dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); // 取一个平均 + $dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); //取一个平均 $addsql = "WHERE 1=1 AND total >= {$dd['tt']}"; if ($getall == 0 && isset($refObj->Fields['tags']) && !empty($refObj->Fields['aid'])) { diff --git a/src/include/taglib/type.lib.php b/src/include/taglib/type.lib.php index 06dd7aee..d6318028 100755 --- a/src/include/taglib/type.lib.php +++ b/src/include/taglib/type.lib.php @@ -1,5 +1,5 @@ 2 AND id in({$admin_catalog}) AND reid=0 $ctsql"; + $query = "SELECT id,typename,ispart FROM `#@__arctype` WHERE id in({$admin_catalog}) AND reid=0 $ctsql"; } } else { - $query = "SELECT id,typename,ispart FROM `#@__arctype` WHERE ispart<>2 AND reid=0 $ctsql ORDER BY sortrank ASC"; + $query = "SELECT id,typename,ispart FROM `#@__arctype` WHERE reid=0 $ctsql ORDER BY sortrank ASC"; } $this->dsql->SetQuery($query); diff --git a/src/include/typeunit.class.admin.php b/src/include/typeunit.class.admin.php index 4177e238..a51fb943 100755 --- a/src/include/typeunit.class.admin.php +++ b/src/include/typeunit.class.admin.php @@ -1,4 +1,4 @@ -id; $rank = $row->sortrank; if ($row->ishidden == '1') { - $nss = "[隐]"; + $nss = "[隐]"; } else { $nss = ''; } @@ -132,7 +132,7 @@ class TypeUnit echo " "; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo " 
    \r\n"; @@ -158,7 +158,7 @@ class TypeUnit echo "
    {$nss}".$typeName."[ID:".$id."] "; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo " 
    \r\n"; @@ -205,7 +205,7 @@ class TypeUnit } $rank = $row->sortrank; if ($row->ishidden == '1') { - $nss = "[隐]"; + $nss = "[隐]"; } else { $nss = ''; } @@ -221,7 +221,7 @@ class TypeUnit echo " "; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo "  \r\n"; @@ -236,7 +236,7 @@ class TypeUnit echo ""; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo "  \r\n"; @@ -250,7 +250,7 @@ class TypeUnit echo "$step {$nss}".$typeName."[ID:".$id."] "; echo ""; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo "  \r\n"; diff --git a/src/include/typeunit.class.menu.php b/src/include/typeunit.class.menu.php index 66c50805..7ab003cf 100755 --- a/src/include/typeunit.class.menu.php +++ b/src/include/typeunit.class.menu.php @@ -1,4 +1,4 @@ - $_value) { foreach ($keyarr as $k) { if (!isset($_FILES[$_key][$k])) { - exit('Request Error!'); + exit('dedebiz'); } } if (preg_match('#^(cfg_|GLOBALS)#', $_key)) { diff --git a/src/include/userlogin.class.php b/src/include/userlogin.class.php index 27a637a5..93e200a0 100755 --- a/src/include/userlogin.class.php +++ b/src/include/userlogin.class.php @@ -1,4 +1,4 @@ -=')) { - mysqli_report(MYSQLI_REPORT_OFF); -} -require_once(DEDEROOT.'/install/install.inc.php'); -require_once(DEDEINC.'/zip.class.php'); -foreach(Array('_GET','_POST','_COOKIE') as $_request) -{ - foreach($$_request as $_k => $_v) ${$_k} = RunMagicQuotes($_v); -} -require_once(DEDEINC.'/common.func.php'); -if(file_exists(INSLOCKFILE)) -{ - exit(" 程序已运行安装,如果您确定要重新安装,请先从FTP中删除 install/install_lock.txt"); -} -if(empty($step)) -{ - $step = 1; -} -/*------------------------ -使用协议书 -function _1_Agreement() -------------------------*/ -if($step==1) -{ - $arrMsg = array(); - if (!extension_loaded("openssl")) { - $arrMsg[] = "OpenSSL未开启,将无法完成DedeBIZ商业支持"; - } - if (!extension_loaded("sockets")) { - $arrMsg[] = "Sockets未开启,将无法安装DedeBIZ商业组件"; - } - if (!function_exists('mysqli_connect')) { - $arrMsg[] = "MySQL不支持,将无法使用本系统"; - } - if (!extension_loaded("gd")) { - $arrMsg[] = "GD未开启,将无法使用验证码、二维码、图片水印等功能"; - } - if(!empty($_SERVER['REQUEST_URI'])) - $scriptName = $_SERVER['REQUEST_URI']; - else - $scriptName = $_SERVER['PHP_SELF']; - $basepath = preg_replace("#\/install(.*)$#i", '', $scriptName); - if(!empty($_SERVER['HTTP_HOST'])) - $baseurl = 'http://'.$_SERVER['HTTP_HOST']; - else - $baseurl = "http://".$_SERVER['SERVER_NAME']; - $chars='abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; - $rnd_cookieEncode=''; - $length = rand(28,32); - $max = strlen($chars) - 1; - for($i = 0; $i < $length; $i++) { - $rnd_cookieEncode .= $chars[mt_rand(0, $max)]; - } - $module_local = DEDEDATA.'/module/'; - include('./templates/step-1.html'); - exit(); -} -/*------------------------ -普通安装 -function _2_Setup() -------------------------*/ -else if($step==2) -{ - $dbtype = empty($dbtype)? "mysql" : $dbtype; - $dblang = "utf8"; - if (!in_array($dbtype,array("mysql", "sqlite"))) { - die("当前数据库类型不支持"); - } - if(!empty($_SERVER['HTTP_HOST'])) - $dfbaseurl = 'http://'.$_SERVER['HTTP_HOST']; - else - $dfbaseurl = "http://".$_SERVER['SERVER_NAME']; - $dfbasepath = preg_replace("#\/install(.*)$#i", '', $scriptName); - $dbhost = empty($dbhost)? "localhost" : $dbhost; - $dbuser = empty($dbuser)? "root" : $dbuser; - $dbuser = empty($dbuser)? "root" : $dbuser; - $dbprefix = empty($dbprefix)? "dede_" : $dbprefix; - $dbname = empty($dbname)? $dfDbname : $dbname; - $adminuser = empty($adminuser)? "admin" : $adminuser; - $adminpwd = empty($adminpwd)? "admin" : $adminpwd; - $webname = empty($webname)? "我的网站" : $webname; - $baseurl = empty($baseurl)? $dfbaseurl : $baseurl; - $cmspath = empty($cmspath)? $dfbasepath : $cmspath; - if ( $dbtype == 'sqlite' ) - { - $db = new SQLite3(DEDEDATA.'/'.$dbname.'.db'); - } else { - $dbtype = 'mysql'; - $conn = mysql_connect($dbhost,$dbuser,$dbpwd) or die(""); - mysql_query("CREATE DATABASE IF NOT EXISTS `".$dbname."`;",$conn); - mysql_select_db($dbname, $conn) or die(""); - //获得数据库版本信息 - $rs = mysql_query("SELECT VERSION();",$conn); - $row = mysql_fetch_array($rs); - $mysqlVersions = explode('.',trim($row[0])); - $mysqlVersion = $mysqlVersions[0].".".$mysqlVersions[1]; - mysql_query("SET NAMES '$dblang',character_set_client=binary,sql_mode='';",$conn); - } - $fp = fopen(dirname(__FILE__)."/common.inc.php","r"); - $configStr1 = fread($fp,filesize(dirname(__FILE__)."/common.inc.php")); - fclose($fp); - $fp = fopen(dirname(__FILE__)."/config.cache.inc.php","r"); - $configStr2 = fread($fp,filesize(dirname(__FILE__)."/config.cache.inc.php")); - fclose($fp); - //common.inc.php - $configStr1 = str_replace("~dbtype~",$dbtype,$configStr1); - $configStr1 = str_replace("~dbhost~",$dbhost,$configStr1); - $configStr1 = str_replace("~dbname~",$dbname,$configStr1); - $configStr1 = str_replace("~dbuser~",$dbuser,$configStr1); - $configStr1 = str_replace("~dbpwd~",$dbpwd,$configStr1); - $configStr1 = str_replace("~dbprefix~",$dbprefix,$configStr1); - $configStr1 = str_replace("~dblang~",$dblang,$configStr1); - @chmod(DEDEDATA,0777); - $fp = fopen(DEDEDATA."/common.inc.php","w") or die(""); - fwrite($fp,$configStr1); - fclose($fp); - //config.cache.inc.php - $cmspath = trim(preg_replace("#\/{1,}#", '/', $cmspath)); - if($cmspath!='' && !preg_match("#^\/#", $cmspath)) $cmspath = '/'.$cmspath; - if($cmspath=='') $indexUrl = '/'; - else $indexUrl = $cmspath; - $configStr2 = str_replace("~baseurl~",$baseurl,$configStr2); - $configStr2 = str_replace("~basepath~",$cmspath,$configStr2); - $configStr2 = str_replace("~indexurl~",$indexUrl,$configStr2); - $configStr2 = str_replace("~cookieEncode~",$cookieencode,$configStr2); - $configStr2 = str_replace("~webname~",$webname,$configStr2); - $configStr2 = str_replace("~adminmail~",$adminmail,$configStr2); - $fp = fopen(DEDEDATA.'/config.cache.inc.php','w'); - fwrite($fp,$configStr2); - fclose($fp); - $fp = fopen(DEDEDATA.'/config.cache.bak.php','w'); - fwrite($fp,$configStr2); - fclose($fp); - if($mysqlVersion >= 4.1) - { - $sql4tmp = "ENGINE=MyISAM DEFAULT CHARSET=".$dblang; - } - //创建数据表 - $query = ''; - $fp = fopen(dirname(__FILE__).'/sql-dftables.txt','r'); - while(!feof($fp)) - { - $line = rtrim(fgets($fp,1024)); - if(preg_match("#;$#", $line)) - { - $query .= $line."\n"; - $query = str_replace('#@__',$dbprefix,$query); - if ( $dbtype == 'sqlite' ) - { - $query = preg_replace('/character set (.*?) /i','',$query); - $query = str_replace('unsigned','',$query); - $query = str_replace('TYPE=MyISAM','',$query); - $query = preg_replace ('/TINYINT\(([\d]+)\)/i','INTEGER',$query); - $query = preg_replace ('/mediumint\(([\d]+)\)/i','INTEGER',$query); - $query = preg_replace ('/smallint\(([\d]+)\)/i','INTEGER',$query); - $query = preg_replace('/int\(([\d]+)\)/i','INTEGER',$query); - $query = preg_replace('/auto_increment/i','PRIMARY KEY AUTOINCREMENT',$query); - $query = preg_replace('/, KEY(.*?)MyISAM;/','',$query); - $query = preg_replace('/, KEY(.*?);/',');',$query); - $query = preg_replace('/, UNIQUE KEY(.*?);/',');',$query); - $query = preg_replace('/set\(([^\)]*?)\)/','varchar',$query); - $query = preg_replace('/enum\(([^\)]*?)\)/','varchar',$query); - if ( preg_match("/PRIMARY KEY AUTOINCREMENT/",$query) ) - { - $query = preg_replace('/,([\t\s ]+)PRIMARY KEY \(`([0-9a-zA-Z]+)`\)/i','',$query); - $query = str_replace(', PRIMARY KEY (`id`)','',$query); - } - $db->exec($query); - } else { - if($mysqlVersion < 4.1) - { - $rs = mysql_query($query,$conn); - } else { - if(preg_match('#CREATE#i', $query)) - { - $rs = mysql_query(preg_replace("#TYPE=MyISAM#i",$sql4tmp,$query),$conn); - } - else - { - $rs = mysql_query($query,$conn); - } - } - } - $query=''; - } else if(!preg_match("#^(\/\/|--)#", $line)) - { - $query .= $line; - } - } - fclose($fp); - //导入默认数据 - $query = ''; - $fp = fopen(dirname(__FILE__).'/sql-dfdata.txt','r'); - while(!feof($fp)) - { - $line = rtrim(fgets($fp, 1024)); - if(preg_match("#;$#", $line)) - { - if ( $dbtype == 'sqlite' ) - { - $query .= $line; - $query = str_replace('#@__',$dbprefix,$query); - $query = str_replace("\'","\"",$query); - $db->exec($query); - } else { - $query .= $line; - $query = str_replace('#@__',$dbprefix,$query); - if($mysqlVersion < 4.1) $rs = mysql_query($query,$conn); - else $rs = mysql_query(str_replace('#~lang~#',$dblang,$query),$conn); - } - - $query=''; - } else if(!preg_match("#^(\/\/|--)#", $line)) - { - $query .= $line; - } - } - fclose($fp); - //更新配置 - $cquery = "UPDATE `{$dbprefix}sysconfig` SET value='{$baseurl}' WHERE varname='cfg_basehost';"; - $dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); - $cquery = "UPDATE `{$dbprefix}sysconfig` SET value='{$cmspath}' WHERE varname='cfg_cmspath';"; - $dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); - $cquery = "UPDATE `{$dbprefix}sysconfig` SET value='{$indexUrl}' WHERE varname='cfg_indexurl';"; - $dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); - $cquery = "UPDATE `{$dbprefix}sysconfig` SET value='{$cookieencode}' WHERE varname='cfg_cookie_encode';"; - $dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); - $cquery = "UPDATE `{$dbprefix}sysconfig` SET value='{$webname}' WHERE varname='cfg_webname';"; - $dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); - $cquery = "UPDATE `{$dbprefix}sysconfig` SET value='{$adminmail}' WHERE varname='cfg_adminemail';"; - $dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); - //增加管理员帐号 - $adminquery = "INSERT INTO `{$dbprefix}admin` VALUES (1, 10, '$adminuser', '".substr(md5($adminpwd),5,20)."', 'admin', '', '', 0, '".time()."', '127.0.0.1');"; - $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); - //关连前台会员帐号 - $adminquery = "INSERT INTO `{$dbprefix}member` (`mid`,`mtype`,`userid`,`pwd`,`uname`,`sex`,`rank`,`money`,`email`,`scores` ,`matt` ,`face`,`safequestion`,`safeanswer` ,`jointime` ,`joinip` ,`logintime` ,`loginip` ) - VALUES ('1','个人','$adminuser','".md5($adminpwd)."','$adminuser','男','100','0','','10000','10','','0','','".time()."','','0',''); "; - $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); - $adminquery = "INSERT INTO `{$dbprefix}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 ('1', '1', '男', '{$adminuser}', '', '', '', '', '0', '0','1980-01-01', '1', '0', '0', '160', '0', '0', '0', '0', '0', '0','0', '0', '', '', '', '','0'); "; - $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); - $adminquery = "INSERT INTO `{$dbprefix}member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`) - VALUES ('1','0','0','0','0','0','0','0','0'); "; - $dbtype == 'sqlite'? $db->exec($adminquery): mysql_query($adminquery,$conn); - $adminquery = "INSERT INTO `{$dbprefix}member_space`(`mid` ,`pagesize` ,`matt` ,`spacename` ,`spacelogo` ,`spacestyle`, `sign` ,`spacenews`) - VALUES('1','10','0','{$adminuser}的空间','','person','',''); "; - $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); - //锁定安装程序 - $fp = fopen(INSLOCKFILE,'w'); - fwrite($fp,'ok'); - fclose($fp); - header('Location:../dede/index.php'); - exit(); -} -/*------------------------ -检测数据库是否有效 -function _10_TestDbPwd() -------------------------*/ -else if($step==10) -{ - header("Pragma:no-cache\r\n"); - header("Cache-Control:no-cache\r\n"); - header("Expires:0\r\n"); - $conn = @mysql_connect($dbhost,$dbuser,$dbpwd); - $info = ""; - if($conn) - { - if(empty($dbname)){ - $info = "信息正确"; - } else { - $info = mysql_select_db($dbname,$conn)? "数据库已经存在,系统将覆盖数据库": "数据库不存在,系统将自动创建"; - } - $result = array( - "code" => 200, - "data" => $info, - ); - echo json_encode($result); - } else { - $result = array( - "code" => -1, - "data" => "数据库连接失败", - ); - echo json_encode($result); - } - @mysql_close($conn); - exit(); -} \ No newline at end of file diff --git a/src/install/install.inc.php b/src/install/install.inc.php index 7f938e21..5cab17e2 100755 --- a/src/install/install.inc.php +++ b/src/install/install.inc.php @@ -15,7 +15,6 @@ function RunMagicQuotes(&$str) $str = addslashes($str); return $str; } - function gdversion() { //没启用php.ini函数的情况下如果有GD默认视作2.0以上版本 @@ -35,7 +34,6 @@ function gdversion() return $gdversion_h; } } - function GetBackAlert($msg, $isstop = 0) { global $s_lang; @@ -45,8 +43,6 @@ function GetBackAlert($msg, $isstop = 0) $msg = "\r\n".$msg; return $msg; } - - function TestWrite($d) { $tfile = '_dedet.txt'; @@ -60,7 +56,6 @@ function TestWrite($d) else return false; } } - function ReWriteConfigAuto() { global $dsql; @@ -82,7 +77,6 @@ function ReWriteConfigAuto() fwrite($fp, "?".">"); fclose($fp); } - //更新栏目缓存 function UpDateCatCache() { @@ -101,7 +95,6 @@ function UpDateCatCache() fwrite($fp1, "{$phph}>"); fclose($fp1); } - function IsDownLoad($url) { if (file_exists($url.'.xml')) { @@ -109,4 +102,4 @@ function IsDownLoad($url) } else { return false; } -} +} \ No newline at end of file diff --git a/src/install/sql-dfdata.txt b/src/install/sql-dfdata.txt index 63926917..cd643e46 100755 --- a/src/install/sql-dfdata.txt +++ b/src/install/sql-dfdata.txt @@ -518,7 +518,6 @@ INSERT INTO `#@__flink` (`sortrank`, `url`, `webname`, `msg`, `email`, `logo`, ` INSERT INTO `#@__flink` (`sortrank`, `url`, `webname`, `msg`, `email`, `logo`, `dtime`, `typeid`, `ischeck`) VALUES (1, 'https://www.dedebiz.com/auth', '授权中心', '', '', '', 1227772703, 1, 2); INSERT INTO `#@__flink` (`sortrank`, `url`, `webname`, `msg`, `email`, `logo`, `dtime`, `typeid`, `ischeck`) VALUES (3, 'https://www.dedebiz.com/git', '代码托管', '', '', '', 1603767210, 1, 1); - INSERT INTO `#@__flinktype` VALUES('1','综合网站'), ('2','娱乐类'), ('3','教育类'), @@ -563,7 +562,7 @@ INSERT INTO `#@__shops_delivery` VALUES('1','送货上门','10.21','送货上门 INSERT INTO `#@__member_stowtype` VALUES('sys','系统收藏','archives_do.php'), ('book','小说收藏','/book/book.php?bid'); -INSERT INTO `#@__payment` VALUES('3','alipay','支付宝','2','支付宝网站(www.alipay.com) 是国内先进的网上支付平台。
    DedeCMS联合支付宝推出支付宝接口。
    立即在线申请','1','a:4:{s:14:"alipay_account";a:4:{s:5:"title";s:14:"支付宝用户账号";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:20:"yuan12345xin@163.com";}s:10:"alipay_key";a:4:{s:5:"title";s:14:"交易安全校验码";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:6:"dsfsdf";}s:14:"alipay_partner";a:4:{s:5:"title";s:12:"合作者身份ID";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:1:"1";}s:17:"alipay_pay_method";a:5:{s:5:"title";s:14:"支付宝账号类型";s:11:"description";s:52:"请选择您最后一次跟支付宝签订的协议里面说明的接口类型";s:4:"type";s:6:"select";s:5:"iterm";s:58:"0:使用标准双接口,1:使用担保交易接口,2:使用即时到帐交易接口";s:5:"value";s:1:"1";}}','1','0','1'), +INSERT INTO `#@__payment` VALUES('3','alipay','支付宝','2','支付宝网站(www.alipay.com) 是国内先进的网上支付平台。
    DedeCMS联合支付宝推出支付宝接口。
    立即在线申请','1','a:4:{s:14:"alipay_account";a:4:{s:5:"title";s:14:"支付宝用户账号";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:20:"yuan12345xin@163.com";}s:10:"alipay_key";a:4:{s:5:"title";s:14:"交易安全校验码";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:6:"dsfsdf";}s:14:"alipay_partner";a:4:{s:5:"title";s:12:"合作者身份ID";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:1:"1";}s:17:"alipay_pay_method";a:5:{s:5:"title";s:14:"支付宝账号类型";s:11:"description";s:52:"请选择您最后一次跟支付宝签订的协议里面说明的接口类型";s:4:"type";s:6:"select";s:5:"iterm";s:58:"0:使用标准双接口,1:使用担保交易接口,2:使用即时到帐交易接口";s:5:"value";s:1:"1";}}','1','0','1'), ('2','bank','银行汇款/转帐','0','银行名称\t\n收款人信息:全称 ××× ;帐号或地址 ××× ;开户行 ×××。\t\n注意事项:办理电汇时,请在电汇单“汇款用途”一栏处注明您的订单号。','4','a:0:{}','1','1','0'), ('1','cod','货到付款','0','开通城市:×××\t\n货到付款区域:×××','3','a:0:{}','1','1','0'), ('6','yeepay','YeePay易宝','12','YeePay易宝(北京通融通信息技术有限公司)是专业从事多元化电子支付业务一站式服务的领跑者。在立足于网上支付的同时,YeePay易宝不断创新,将互联网、手机、固定电话整合在一个平台上,继短信支付、手机充值之后,首家推出了YeePay易宝电话支付业务,真正实现了离线支付,为更多传统行业搭建了电子支付的高速公路。YeePay易宝融合世界先进的电子支付文化,聚合众多金融、电信、IT、互联网等领域内的巨擘,旨在通过创新的支付机制,推动中国电子商务新进程。YeePay易宝致力于成为世界一流的电子支付应用和服务提供商,专注于金融增值服务和移动增值服务两大领域,创新并推广多元化、低成本的、安全有效的支付服务。','2','a:2:{s:10:"yp_account";a:4:{s:5:"title";s:8:"商户编号";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:2:"aa";}s:6:"yp_key";a:4:{s:5:"title";s:8:"商户密钥";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:3:"dsa";}}','1','0','1'); @@ -1455,24 +1454,24 @@ INSERT INTO `#@__sys_enum` VALUES('139','cms制作','503','vocation','503','0'), ('19284','南明区','12501.1','nativeplace','12501','2'), ('19283','贵阳市','12501','nativeplace','12501','1'), ('19282','贵州省','12500','nativeplace','12500','0'), -('19281','雷波县','12021.17','nativeplace','12021','2'), -('19280','美姑县','12021.16','nativeplace','12021','2'), -('19279','甘洛县','12021.15','nativeplace','12021','2'), -('19278','越西县','12021.14','nativeplace','12021','2'), -('19277','冕宁县','12021.13','nativeplace','12021','2'), -('19276','喜德县','12021.12','nativeplace','12021','2'), -('19275','昭觉县','12021.11','nativeplace','12021','2'), -('19274','金阳县','12021.10','nativeplace','12021','2'), -('19273','布拖县','12021.9','nativeplace','12022','2'), -('19272','普格县','12021.8','nativeplace','12022','2'), -('19271','宁南县','12021.7','nativeplace','12022','2'), -('19270','会东县','12021.6','nativeplace','12022','2'), -('19269','会理县','12021.5','nativeplace','12022','2'), -('19268','德昌县','12021.4','nativeplace','12021','2'), -('19267','盐源县','12021.3','nativeplace','12021','2'), -('19266','木里藏族自治县','12021.2','nativeplace','12021','2'), -('19265','西昌市','12021.1','nativeplace','12021','2'), -('19264','凉山彝族自治州','12021','nativeplace','12021','1'), +('19281','雷波县','12022.17','nativeplace','12022','2'), +('19280','美姑县','12022.16','nativeplace','12022','2'), +('19279','甘洛县','12022.15','nativeplace','12022','2'), +('19278','越西县','12022.14','nativeplace','12022','2'), +('19277','冕宁县','12022.13','nativeplace','12022','2'), +('19276','喜德县','12022.12','nativeplace','12022','2'), +('19275','昭觉县','12022.11','nativeplace','12022','2'), +('19274','金阳县','12022.10','nativeplace','12022','2'), +('19273','布拖县','12022.9','nativeplace','12022','2'), +('19272','普格县','12022.8','nativeplace','12022','2'), +('19271','宁南县','12022.7','nativeplace','12022','2'), +('19270','会东县','12022.6','nativeplace','12022','2'), +('19269','会理县','12022.5','nativeplace','12022','2'), +('19268','德昌县','12022.4','nativeplace','12022','2'), +('19267','盐源县','12022.3','nativeplace','12022','2'), +('19266','木里藏族自治县','12022.2','nativeplace','12022','2'), +('19265','西昌市','12022.1','nativeplace','12022','2'), +('19264','凉山彝族自治州','12022','nativeplace','12022','1'), ('19263','得荣县','12020.18','nativeplace','12020','2'), ('19262','稻城县','12020.17','nativeplace','12020','2'), ('19261','乡城县','12020.16','nativeplace','12020','2'), @@ -1482,11 +1481,11 @@ INSERT INTO `#@__sys_enum` VALUES('139','cms制作','503','vocation','503','0'), ('19257','石渠县','12020.12','nativeplace','12020','2'), ('19256','白玉县','12020.11','nativeplace','12020','2'), ('19255','德格县','12020.10','nativeplace','12020','2'), -('19254','新龙县','12020.9','nativeplace','12021','2'), -('19253','甘孜县','12020.8','nativeplace','12021','2'), -('19252','炉霍县','12020.7','nativeplace','12021','2'), -('19251','道孚县','12020.6','nativeplace','12021','2'), -('19250','雅江县','12020.5','nativeplace','12021','2'), +('19254','新龙县','12020.9','nativeplace','12022','2'), +('19253','甘孜县','12020.8','nativeplace','12022','2'), +('19252','炉霍县','12020.7','nativeplace','12022','2'), +('19251','道孚县','12020.6','nativeplace','12022','2'), +('19250','雅江县','12020.5','nativeplace','12022','2'), ('19249','九龙县','12020.4','nativeplace','12020','2'), ('19248','丹巴县','12020.3','nativeplace','12020','2'), ('19247','泸定县','12020.2','nativeplace','12020','2'), @@ -3950,7 +3949,7 @@ INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','str ('4','cfg_indexurl','网页主页链接','1','string','/'), ('5','cfg_backup_dir','数据备份目录(在data目录内)','2','string','backupdata'), ('6','cfg_indexname','主页链接名','1','string','首页'), -('7','cfg_webname','网站名称','1','string','我的网站'), +('7','cfg_webname','网站名称','1','string','某某公司'), ('8','cfg_adminemail','网站发信EMAIL','2','string','support@dedebiz.com'), ('9','cfg_html_editor','Html编辑器(ckeditor,需要fck的用户可以去官网下载)','2','string','ckeditor'), ('10','cfg_arcdir','文档HTML默认保存路径','1','string','/a'), @@ -3971,7 +3970,7 @@ INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','str ('25','cfg_multi_site','(是/否)支持多站点,开启此项后附件、栏目连接、arclist内容启用绝对网址','2','bool','N'), ('58','cfg_rm_remote','远程图片本地化','7','bool','Y'), ('27','cfg_dede_log','(是/否)开启管理日志','2','bool','N'), -('28','cfg_powerby','网站版权信息','1','bstring','Copyright © 2021 DedeBIZ 版权所有'), +('28','cfg_powerby','网站版权信息','1','bstring','Copyright © 2022 DedeBIZ 版权所有'), ('722','cfg_jump_once','跳转网址是否直接跳转?(否则显示中转页)','7','bool','Y'), ('723','cfg_task_pwd','系统计划任务客户端许可密码
    (需要客户端,通常不会太重要)','7','string',''), ('29','cfg_arcsptitle','(是/否)开启分页标题,开启会影响HTML生成速度','6','bool','N'), @@ -4105,7 +4104,6 @@ INSERT INTO `#@__sys_module` VALUES (1, '0cce60bc0238aa03804682c801584991', '百 (5, 'acb8b88eb4a6d4bfc375c18534f9439e', '投票模块', '', '', 0, ''), (6, '572606600345b1a4bb8c810bbae434cc', '挑错管理', '', '', 0, ''); - INSERT INTO `#@__plus` VALUES (27, '友情链接模块', '', '', 'DedeBIZ', 1, ''), (24, '文件管理器', '', '', 'DedeBIZ', 1, ''), (23, '百度新闻', '', '', 'DedeBIZ', 1, 'baidunews.php'), @@ -4114,5 +4112,5 @@ INSERT INTO `#@__plus` VALUES (27, '友情链接模块', '', '', 'DedeBIZ', 1, ''); INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_disable_funs', '模板引擎禁用PHP函数', 7, 'bstring', 'phpinfo,eval,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,file_put_contents'); -INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_disable_tags', '模板引擎禁用标签', 7, 'bstring', 'php'); -ALTER TABLE `#@__arctiny` ADD INDEX `idx_typeid_arcrank_sortrank` (`typeid`, `arcrank`, `sortrank`); +INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_disable_tags', '模板引擎禁用标签', 7, 'bstring', ''); +ALTER TABLE `#@__arctiny` ADD INDEX `idx_typeid_arcrank_sortrank` (`typeid`, `arcrank`, `sortrank`); \ No newline at end of file diff --git a/src/install/sql-dftables.txt b/src/install/sql-dftables.txt index c88077b8..daeccaa4 100755 --- a/src/install/sql-dftables.txt +++ b/src/install/sql-dftables.txt @@ -254,6 +254,11 @@ CREATE TABLE `#@__arctype` ( `topid` smallint(5) unsigned NOT NULL default '0', `sortrank` smallint(5) unsigned NOT NULL default '50', `typename` char(30) NOT NULL default '', + `namegk` char(200) NOT NULL default '', + `enname` char(200) NOT NULL default '', + `ennamegk` char(200) NOT NULL default '', + `litpic` char(255) NOT NULL default '', + `litimg` char(255) NOT NULL default '', `typedir` char(60) NOT NULL default '', `isdefault` smallint(6) NOT NULL default '0', `defaultname` char(15) NOT NULL default 'index.html', diff --git a/src/install/style.css b/src/install/style.css deleted file mode 100755 index 426be8d5..00000000 --- a/src/install/style.css +++ /dev/null @@ -1,279 +0,0 @@ -@import "tablebox.css"; - * { - padding:0px; - margin:0px; - font-size:13px -} -body { - font-family:Verdana,Arial,Helvetica,sans-serif; - font-size:12px; - background:url(images/top-bg.png) left top repeat-x; - background-color:#FFF -} -ul { - list-style:none -} -a { - color:#06C -} -a:hover { - color:#669900; - text-decoration:none -} -input,button,select { - vertical-align:middle -} -select { - height:calc(1.5em + .75rem + 2px); - padding:.375rem .75rem; - font-weight:400; - color:#495057; - background-color:#fff; - background-clip:padding-box; - border:1px solid #ced4da; - border-radius:.25rem; - transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out -} -input[type="button"],input[type="submit"],input[type="reset"] { - border:none; - border-right:1px solid #ACACAC; - border-bottom:1px solid #ACACAC; - background-color:#F1F8B4; - padding:2px; - padding-right:5px; - padding-left:5px; - cursor:pointer -} -input[type="text"],input[type="password"] { - font-size:1rem; - font-weight:400; - color:#495057; - background-color:#fff; - background-clip:padding-box; - border:1px solid #ced4da; - border-radius:.25rem; - height:calc(1.5em + .75rem + 2px); - padding:.375rem .75rem; - transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out; - line-height:18px; - vertical-align:middle -} -.fc-690 { - color:#FF760A -} -.fs-14 { - font-size:14px -} -.top { - width:960px; - height:72px; - overflow:hidden; - margin:0px auto -} -.top .top-logo { - width:280px; - height:72px; - float:left; - padding-left:10px; - background:url(images/top-logo.png) 10px 0px no-repeat; - overflow:hidden -} -.top .top-logo h1 { - font-size:0px; - line-height:1000% -} -.top .top-link { - height:25px; - padding:12px 12px 0px 0px; - overflow:hidden -} -.top .top-link ul { - height:15px; - float:right; - overflow:hidden -} -.top .top-link ul li { - float:left; - padding-left:10px; - padding-right:10px; - border-left:1px solid #E8F5E3; - margin-left:-1px; - line-height:14px -} -.top .top-link ul li a { - text-decoration:none; - color:#555 -} -.top .top-version { - height:40px; - float:right; - padding:13px 13px 0px 0px -} -.top .top-version h2 { - color:#FF760A; - font-size:22px; - font-style:italic; - cursor:default -} -.main { - width:900px; - margin:14px auto 0px -} -.main .pleft { - width:168px; - float:left; - cursor:default; - padding-top:6px -} -.main .pright { - width:720px; - float:right -} -.pr-title { - width:720px; - height:22px; - margin:8px auto 0px; - background:url(images/boxtitle_bg.gif) 0px 20px repeat-x; - overflow:hidden -} -.pr-title h3 { - width:158px; - height:22px; - line-height:22px; - overflow:hidden; - display:block; - font-size:12px; - padding-top:1px; - text-indent:10px; - background:url(images/boxtitle_bg.gif) 0px -2px no-repeat; - letter-spacing:2px; - color:#FF760A; - font-weight:bold -} -.t1 { - width:162px -} -.t1 dt { - width:162px; - height:25px; - line-height:25px; - background:url(images/leftbox-tbg.png) no-repeat; - font-weight:bold; - color:#FF760A; - text-indent:10px; - letter-spacing:2px -} -.t1 dd { - width:160px; - background-color:#FFFAF7; - border:1px solid #FFCABF -} -.t1 dd ul { - width:158px; - border:1px solid #FFF; - overflow:hidden; - padding:10px 0px; - background:url(images/step-ico-bg.png) 20px 21px no-repeat -} -.t1 dd ul li { - height:40px; - line-height:36px; - text-indent:52px; - display:block; - color:#888; - font-size:14px -} -.t1 dd ul li.succeed { - color:#FF760A; - background:url(images/ico-step-succeed.png) 23px 14px no-repeat -} -.t1 dd ul li.now { - color:#FF9900; - font-weight:bold; - background:url(images/ico-step-now.png) 23px 14px no-repeat -} -.install-msg { - padding:10px 20px; - color:#777; - line-height:31px; - font-size:14px; - overflow:hidden; - clear:both -} -.pr-agreement { - padding:16px; - line-height:21px; - color:#666; - height:300px; - overflow-y:scroll -} -.pr-agreement strong { - display:block; - color:#333; - line-height:27px; - margin-top:6px -} -.pr-agreement p { - text-indent:30px -} -.btn-box { - margin-top:15px; - border-top:1px solid #DDD; - padding:10px 6px; - vertical-align:middle -} -.btn-next { - width:104px; - height:34px; - border:none; - background:url(images/but_next.gif) no-repeat; - cursor:pointer; - margin-left:10px; - overflow:hidden; - font-size:0px; - line-height:100px -} -.btn-back { - width:104px; - height:34px; - border:none; - background:url(images/but_back.gif) no-repeat; - cursor:pointer; - overflow:hidden; - font-size:0px; - line-height:100px -} -#readpact { - *margin-top:-4px; - margin-right:4px -} -.over-link { - padding:0px 40px; - line-height:41px; - overflow:hidden; - clear:both -} -.waitpage { - top:0; - left:0; - filter:Alpha(opacity=70); - -moz-opacity:0.7; - position:absolute; - z-index:10000; - background:url(images/loading1.gif) #ababab no-repeat center 200px; - width:100%; - height:2500px; - display:none -} -.divpre { - filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale) -} -.modulesel { - width:120px; - margin-right:8px; - float:left -} -.pr-agreement h2 { - font-size:14px; - font-weight:bolder -} \ No newline at end of file diff --git a/src/install/tablebox.css b/src/install/tablebox.css deleted file mode 100755 index 50390de8..00000000 --- a/src/install/tablebox.css +++ /dev/null @@ -1,138 +0,0 @@ -input { - vertical-align:middle; - margin-right:3px; - font-size:12px -} -textarea { - vertical-align:top; - font-size:12px; - line-height:156%; - border:1px solid #AAA; - padding:3px; - letter-spacing:1px; - word-break:break-all; - overflow-y:auto -} -.input-txt { - padding:4px 8px 4px 6px; - border:1px solid #AAA; - font-size:12px; - color:#000; - width:200px -} -.textipt_on { - border:1px solid #F90 -} -hr { - height:1px; - line-height:1px; - overflow:hidden; - border-width:1px 0px 0px 0px; - border-top:1px solid #FFCABF -} -hr:empty { - margin:8px 0px 7px 0px !important; - margin:0px -} -small { - font-size:12px -} -.moncolor td { - background:#FFCABF -} -.twbox { - width:706px; - border:1px solid #FFCABF; - font-size:12px; - overflow:hidden; - margin:8px auto -} -.twbox thead tr td { - background:url(body_title_bg.gif) -1px -1px repeat-x; - height:31px; - line-height:31px; - text-indent:10px -} -.twbox thead tr td strong { - letter-spacing:2px; - margin-right:14px; - color:#FFF; - font-size:14px -} -.twbox thead tr td span { - color:#CDA -} -.twbox thead tr td p { - height:31px; - display:inline; - float:right; - margin:-31px 10px 0 0; - overflow:hidden -} -.twbox thead tr td p * { - float:right -} -.twbox thead tr td a.thlink { - color:#FFF -} -.twbox thead tr td a.thlink:hover { - color:#FFFF00; - text-decoration:none -} -.twbox tbody { - overflow:hidden; - text-align:left -} -.twbox tbody tr th { - background:#FFFAF7; - color:#FF760A; - line-height:21px; - height:21px; - text-indent:30px; - font-weight:normal; - border-bottom:1px solid #FFCABF; - letter-spacing:2px -} -.twbox tbody tr td { - padding:7px; - border-bottom:1px solid #F2F2F2; - color:#333; - vertical-align:top -} -.twbox tbody tr td p { - line-height:21px -} -.twbox tbody tr td p strong img { - vertical-align:middle -} -.twbox tbody tr td img { - vertical-align:top; - margin:0px 10px 5px 0px -} -.twbox tbody tr td small { - color:#888 -} -.twbox tfoot tr td { - padding:10px; - line-height:25px; - text-align:center -} -.twbox tfoot tr td p { - line-height:21px; - margin-bottom:10px -} -input.but { - height:26px; - padding-left:6px; - padding-right:6px; - line-height:26px; - font-weight:bold; - letter-spacing:1px; - color:#FFF; - background-color:#FC3 -} -.onetd { - width:120px; - text-align:right; - line-height:25px -} \ No newline at end of file diff --git a/src/install/templates/step-1.html b/src/install/templates/step-1.html index 9fab8c4d..ed43b1cd 100755 --- a/src/install/templates/step-1.html +++ b/src/install/templates/step-1.html @@ -1,17 +1,18 @@ - - + + - - 安装程序 - DedeBIZ - DedeBIZ技术支持 + + 安装程序 + -
    +
    DedeBIZ安装程序
    diff --git a/src/install/v57sp2_to_v6.txt b/src/install/v57sp2_to_v6.txt index 73f81e48..26448f0a 100644 --- a/src/install/v57sp2_to_v6.txt +++ b/src/install/v57sp2_to_v6.txt @@ -1,4 +1,4 @@ --- 6.0.0 +-- 6.0.4 ALTER TABLE `#@__tagindex` ADD COLUMN `uptime` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `addtime`, diff --git a/src/member/album_add.php b/src/member/album_add.php index 34cdfe8f..09d15f7e 100755 --- a/src/member/album_add.php +++ b/src/member/album_add.php @@ -121,7 +121,7 @@ function _SaveArticle(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != $inadd_f) { ShowMsg("提交表单同系统配置不相符,请重新提交", "-1"); @@ -187,7 +187,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank'    查看图集    - 更改图集 + 修改图集    已发布图集管理 "; diff --git a/src/member/album_edit.php b/src/member/album_edit.php index 833761cf..7383e567 100755 --- a/src/member/album_edit.php +++ b/src/member/album_edit.php @@ -116,7 +116,7 @@ function _Save(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != $inadd_m) { ShowMsg("提交表单同系统配置不相符,请重新提交", "-1"); @@ -173,16 +173,16 @@ function _Save(){ } $msg = "  请选择您的后续操作: 发布新图集    -查看更改 +查看修改    查看图集    管理图集 "; - $wintitle = "成功更改图集"; - $wecome_info = "图集管理::更改图集"; + $wintitle = "成功修改图集"; + $wecome_info = "图集管理::修改图集"; $win = new OxWindow(); - $win->AddTitle("成功更改图集:"); + $win->AddTitle("成功修改图集:"); $win->AddMsgItem($msg); $winform = $win->GetWindow("hand", " ", false); $win->Display(); diff --git a/src/member/archives_add.php b/src/member/archives_add.php index 7443e47e..f0c9ce0d 100755 --- a/src/member/archives_add.php +++ b/src/member/archives_add.php @@ -80,7 +80,7 @@ function _SaveArticle(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != $inadd_f) { ShowMsg("提交表单同系统配置不相符,请重新提交", "-1"); @@ -149,7 +149,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank'    查看内容    - 更改内容 + 修改内容    已发布内容管理 "; diff --git a/src/member/archives_edit.php b/src/member/archives_edit.php index 049b2a26..04994aef 100755 --- a/src/member/archives_edit.php +++ b/src/member/archives_edit.php @@ -76,7 +76,7 @@ function _SaveArticle(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != $inadd_m) { ShowMsg("提交表单同系统配置不相符,请重新提交", "-1"); @@ -123,16 +123,16 @@ function _SaveArticle(){ } $msg = "  请选择您的后续操作: 发布新内容    - 查看更改 + 查看修改    查看内容    管理内容 "; - $wintitle = "成功更改内容"; - $wecome_info = "内容管理::更改内容"; + $wintitle = "成功修改内容"; + $wecome_info = "内容管理::修改内容"; $win = new OxWindow(); - $win->AddTitle("成功更改内容:"); + $win->AddTitle("成功修改内容:"); $win->AddMsgItem($msg); $winform = $win->GetWindow("hand", " ", false); $win->Display(); diff --git a/src/member/archives_sg_add.php b/src/member/archives_sg_add.php index 81776b59..dbe78b0f 100755 --- a/src/member/archives_sg_add.php +++ b/src/member/archives_sg_add.php @@ -62,7 +62,7 @@ function _SaveArticle(){ } } } - // 校验CSRF + //校验CSRF CheckCSRF(); $flag = ''; @@ -139,7 +139,7 @@ function _SaveArticle(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != str_replace('`', '', $inadd_f)) { ShowMsg("提交表单同系统配置不相符,请重新提交", "-1"); @@ -186,7 +186,7 @@ function _SaveArticle(){ }    查看内容    - 更改内容 + 修改内容    已发布内容管理 "; diff --git a/src/member/archives_sg_edit.php b/src/member/archives_sg_edit.php index bef6e8eb..e6f83e85 100755 --- a/src/member/archives_sg_edit.php +++ b/src/member/archives_sg_edit.php @@ -75,7 +75,7 @@ function _SaveArticle(){ } exit(); } - // 校验CSRF + //校验CSRF CheckCSRF(); //文档的默认状态 @@ -117,7 +117,7 @@ function _SaveArticle(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != $inadd_m) { ShowMsg("提交表单同系统配置不相符,请重新提交", "-1"); @@ -143,16 +143,16 @@ function _SaveArticle(){ } $msg = "请选择您的后续操作: 发布新内容    - 查看更改 + 查看修改    查看内容    管理内容 "; - $wintitle = "成功更改内容"; - $wecome_info = "内容管理::更改内容"; + $wintitle = "成功修改内容"; + $wecome_info = "内容管理::修改内容"; $win = new OxWindow(); - $win->AddTitle("成功更改内容:"); + $win->AddTitle("成功修改内容:"); $win->AddMsgItem($msg); $winform = $win->GetWindow("hand", " ", false); $win->Display(); diff --git a/src/member/article_add.php b/src/member/article_add.php index 090fcfbe..5521ffd2 100755 --- a/src/member/article_add.php +++ b/src/member/article_add.php @@ -71,7 +71,7 @@ function _SaveArticle(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != $inadd_f) { ShowMsg("提交表单同系统配置不相符,请重新提交", "-1"); @@ -137,7 +137,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank'    查看文章    - 更改文章 + 修改文章    已发布文章管理"; $wintitle = "成功发布文章"; diff --git a/src/member/article_edit.php b/src/member/article_edit.php index 7c974795..6bbd6c5f 100755 --- a/src/member/article_edit.php +++ b/src/member/article_edit.php @@ -69,7 +69,7 @@ function _SaveArticle(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != $inadd_m) { @@ -113,16 +113,16 @@ function _SaveArticle(){ } $msg = "  请选择您的后续操作: 发布新文章    - 查看更改 + 查看修改    查看文章    管理文章 "; - $wintitle = "成功更改文章"; - $wecome_info = "文章管理::更改文章"; + $wintitle = "成功修改文章"; + $wecome_info = "文章管理::修改文章"; $win = new OxWindow(); - $win->AddTitle("成功更改文章:"); + $win->AddTitle("成功修改文章:"); $win->AddMsgItem($msg); $winform = $win->GetWindow("hand", " ", false); $win->Display(); diff --git a/src/member/config.php b/src/member/config.php index b4b76a6d..27dfccdf 100755 --- a/src/member/config.php +++ b/src/member/config.php @@ -27,8 +27,8 @@ function XSSClean($val) $search .= '1234567890!@#$%^&*()'; $search .= '~`";:?+/={}[]-_|\'\\'; for ($i = 0; $i < strlen($search); $i++) { - $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ; - $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ; + $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); //with a ; + $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); //with a ; } $val = str_replace("`", "‘", $val); @@ -78,7 +78,7 @@ require_once(DEDEINC.'/filter.inc.php'); require_once(DEDEINC.'/memberlogin.class.php'); require_once(DEDEINC.'/dedetemplate.class.php'); -// 检查CSRF +//检查CSRF function CheckCSRF() { $cc_csrf_token_check = GetCookie("dede_csrf_token"); @@ -94,7 +94,7 @@ function CheckCSRF() DropCookie("dede_csrf_token"); } -// 生成CSRF校验token,在比较重要的表单中应该要加上这个token校验 +//生成CSRF校验token,在比较重要的表单中应该要加上这个token校验 $cc_csrf_token = GetCookie("dede_csrf_token"); if (!isset($GLOBALS['csrf_token']) || $GLOBALS['csrf_token'] === null) { if ( @@ -112,7 +112,7 @@ if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') { } -//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行更改这个选项 +//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行修改这个选项 $dedeNowurl = $s_scriptName = ''; $dedeNowurl = GetCurUrl(); $dedeNowurls = explode('?', $dedeNowurl); @@ -170,14 +170,14 @@ function CheckRank($rank = 0, $money = 0) exit(); } else { if ($cfg_mb_spacesta == '-10') { - // var_dump($cfg_ml->fields); + //var_dump($cfg_ml->fields); //如果启用注册邮件验证 if ($cfg_ml->fields['spacesta'] == '-10') { if (empty($cfg_ml->fields['email'])) { ShowMsg("邮箱地址为空,请设置一个可用的邮箱地址", "edit_email.php", 0, 5000); exit; } - $msg = "您尚未进行邮件验证,请到邮箱查阅...
    重新发送邮件验证 点击此处"; + $msg = "您尚未进行邮件验证,请到邮箱查阅...
    重新发送邮件验证 点击此处"; ShowMsg($msg, "-1", 0, 5000); exit; } diff --git a/src/member/edit_baseinfo.php b/src/member/edit_baseinfo.php index 386492fe..ea51ac31 100755 --- a/src/member/edit_baseinfo.php +++ b/src/member/edit_baseinfo.php @@ -18,7 +18,7 @@ $face = $row['face']; if ($dopost == 'save') { $svali = GetCkVdValue(); - // 校验CSRF + //校验CSRF CheckCSRF(); if (strtolower($vdcode) != $svali || $svali == '') { @@ -96,7 +96,7 @@ if ($dopost == 'save') { $query2 = "UPDATE `#@__admin` SET pwd='$pwd2' where id='".$cfg_ml->M_ID."' "; $dsql->ExecuteNoneQuery($query2); } - // 清除会员缓存 + //清除会员缓存 $cfg_ml->DelCache($cfg_ml->M_ID); ShowMsg('成功更新您的基本资料', 'edit_baseinfo.php', 0, 5000); exit(); diff --git a/src/member/edit_email.php b/src/member/edit_email.php index 2c95e436..b1dd377f 100644 --- a/src/member/edit_email.php +++ b/src/member/edit_email.php @@ -18,7 +18,7 @@ if ($dopost == 'save') { ShowMsg('Email已经设置,无需重复提交', '-1'); exit(); } - // 校验CSRF + //校验CSRF CheckCSRF(); if (!CheckEmail($email)) { ShowMsg('Email格式不正确', '-1'); @@ -28,7 +28,7 @@ if ($dopost == 'save') { $query = "UPDATE `#@__member` SET `email` = '$email' WHERE mid='{$cfg_ml->M_ID}' "; $dsql->ExecuteNoneQuery($query); - // 清除缓存 + //清除缓存 $cfg_ml->DelCache($cfg_ml->M_ID); ShowMsg('成功更新邮箱信息', $backurl); exit(); diff --git a/src/member/edit_face.php b/src/member/edit_face.php index 08fa804f..0a4f952f 100755 --- a/src/member/edit_face.php +++ b/src/member/edit_face.php @@ -17,13 +17,13 @@ if (!isset($backurl)) { $backurl = 'edit_face.php'; } if ($dopost == 'save') { - // 校验CSRF + //校验CSRF CheckCSRF(); $face = HtmlReplace($faceurl, -1); $query = "UPDATE `#@__member` SET `face` = '$face' WHERE mid='{$cfg_ml->M_ID}' "; $dsql->ExecuteNoneQuery($query); - // 清除缓存 + //清除缓存 $cfg_ml->DelCache($cfg_ml->M_ID); ShowMsg('成功更新头像信息', $backurl); exit(); diff --git a/src/member/inc/archives_check.php b/src/member/inc/archives_check.php index 60784b5c..907d5c64 100755 --- a/src/member/inc/archives_check.php +++ b/src/member/inc/archives_check.php @@ -21,7 +21,7 @@ if (strtolower($vdcode) != $svali || $svali == '') { exit(); } -// 校验CSRF +//校验CSRF CheckCSRF(); $flag = ''; diff --git a/src/member/inc/archives_check_edit.php b/src/member/inc/archives_check_edit.php index d0bab487..43a4eb4a 100755 --- a/src/member/inc/archives_check_edit.php +++ b/src/member/inc/archives_check_edit.php @@ -28,7 +28,7 @@ if ($typeid == 0) { exit(); } -// 校验CSRF +//校验CSRF CheckCSRF(); $query = "SELECT tp.ispart,tp.channeltype,tp.issend,ch.issend as cissend,ch.sendrank,ch.arcsta,ch.addtable,ch.fieldset,ch.usertype diff --git a/src/member/inc/config_pay_alipay.php b/src/member/inc/config_pay_alipay.php index 4c4afd89..f8530998 100755 --- a/src/member/inc/config_pay_alipay.php +++ b/src/member/inc/config_pay_alipay.php @@ -23,11 +23,11 @@ $parameter = array( "body" => $pname, //商品描述,必填 "out_trade_no" => $buyid, //商品外部交易号,必填,每次测试都须修改 "logistics_fee" => '0.00', //物流配送费用 - "logistics_payment" => 'BUYER_PAY', // 物流配送费用付款方式:SELLER_PAY(卖家支付)、BUYER_PAY(买家支付)、BUYER_PAY_AFTER_RECEIVE(货到付款) - "logistics_type" => 'EXPRESS', // 物流配送方式:POST(平邮)、EMS(EMS)、EXPRESS(其他快递) + "logistics_payment" => 'BUYER_PAY', //物流配送费用付款方式:SELLER_PAY(卖家支付)、BUYER_PAY(买家支付)、BUYER_PAY_AFTER_RECEIVE(货到付款) + "logistics_type" => 'EXPRESS', //物流配送方式:POST(平邮)、EMS(EMS)、EXPRESS(其他快递) "price" => sprintf("%01.2f", $price), //商品单价,必填 - "payment_type" => "1", // 默认为1,不需要修改 + "payment_type" => "1", //默认为1,不需要修改 "quantity" => "1", //商品数量,必填 "show_url" => $show_url, //商品相关网站 "seller_email" => $seller_email //卖家邮箱,必填 diff --git a/src/member/inc/config_pay_cbpayment.php b/src/member/inc/config_pay_cbpayment.php index a4047cc5..b149ee50 100755 --- a/src/member/inc/config_pay_cbpayment.php +++ b/src/member/inc/config_pay_cbpayment.php @@ -14,18 +14,18 @@ $v_md5info = strtoupper(md5($text)); //md5函数加 $remark1 = trim($ptype);//备注字段1 $remark2 = trim($pname);//备注字段2 -$v_rcvname = '站长'; // 收货人 -$v_rcvaddr = '深圳'; // 收货地址 -$v_rcvtel = '0755-83791960'; // 收货人电话 -$v_rcvpost = '100080'; // 收货人邮编 -$v_rcvmobile = '13838384381'; // 收货人手机号 +$v_rcvname = '站长'; //收货人 +$v_rcvaddr = '深圳'; //收货地址 +$v_rcvtel = '0755-83791960'; //收货人电话 +$v_rcvpost = '100080'; //收货人邮编 +$v_rcvmobile = '13838384381'; //收货人手机号 -$v_ordername = $cfg_ml->M_UserName; // 订货人姓名 -$v_orderaddr = '深圳'; // 订货人地址 -$v_ordertel = '0755-83791960'; // 订货人电话 -$v_orderpost = 518000; // 订货人邮编 -$v_orderemail = 'service@nps.cn'; // 订货人邮件 -$v_ordermobile = 13838384581; // 订货人手机号 +$v_ordername = $cfg_ml->M_UserName; //订货人姓名 +$v_orderaddr = '深圳'; //订货人地址 +$v_ordertel = '0755-83791960'; //订货人电话 +$v_orderpost = 518000; //订货人邮编 +$v_orderemail = 'service@nps.cn'; //订货人邮件 +$v_ordermobile = 13838384581; //订货人手机号 $strRequestUrl = $v_post_url.'?v_mid='.$v_mid.'&v_oid='.$v_oid.'&v_amount='.$v_amount.'&v_moneytype='.$v_moneytype .'&v_url='.$v_url.'&v_md5info='.$v_md5info.'&remark1='.$remark1.'&remark2='.$remark2; diff --git a/src/member/inc/config_pay_nps.php b/src/member/inc/config_pay_nps.php index 89a71fff..befc2c74 100755 --- a/src/member/inc/config_pay_nps.php +++ b/src/member/inc/config_pay_nps.php @@ -6,7 +6,7 @@ include_once DEDEMEMBER.'/paycenter/nps/nps_config.inc.php'; if($payment_exp[1] < 0.01) $payment_exp[1] = 0; $piice_ex = $price*$payment_exp[1]; $price = $price+$piice_ex; -// 公共函数定义 +//公共函数定义 function HexToStr($hex) { $string=""; diff --git a/src/member/inc/inc_archives_functions.php b/src/member/inc/inc_archives_functions.php index 009eed99..3d2e1a57 100755 --- a/src/member/inc/inc_archives_functions.php +++ b/src/member/inc/inc_archives_functions.php @@ -213,7 +213,7 @@ function PrintAutoFieldsAdd(&$fieldset, $loadtype = 'all', $isprint = TRUE) echo ""; echo ""; - // 增加一个返回 + //增加一个返回 return $addonfieldsname; } diff --git a/src/member/inc/inc_list_functions.php b/src/member/inc/inc_list_functions.php index e30e2f7a..c632025e 100755 --- a/src/member/inc/inc_list_functions.php +++ b/src/member/inc/inc_list_functions.php @@ -40,7 +40,7 @@ function IsCommendArchives($iscommend) function GetCommendTitle($title, $iscommend) { if (preg_match('/c/', $iscommend)) { - $title = "$title(推荐)"; + $title = "$title(推荐)"; } return "$title"; } @@ -91,7 +91,7 @@ function IsHtmlArchives($ismake) } else if ($ismake == -1) { return "仅动态"; } else { - return "未生成"; + return "未生成"; } } @@ -127,7 +127,7 @@ function GetRankName($arcrank) function IsPicArchives($picname) { if ($picname != "") { - return "(图)"; + return "(图)"; } else { return ""; } diff --git a/src/member/index_do.php b/src/member/index_do.php index 92e2fec6..18044a43 100755 --- a/src/member/index_do.php +++ b/src/member/index_do.php @@ -74,7 +74,7 @@ if ($fmdo == 'sendMail') { exit(); } $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET spacesta=0 WHERE mid='{$mid}' "); - // 清除会员缓存 + //清除会员缓存 $cfg_ml->DelCache($mid); ShowMsg('操作成功,请重新登录系统', 'login.php'); exit(); @@ -100,9 +100,9 @@ else if ($fmdo == 'user') { $msg = CheckUserID($uid, $msgtitle, false); } if ($msg == 'ok') { - $msg = "√{$msgtitle}可以使用"; + $msg = "√{$msgtitle}可以使用"; } else { - $msg = "×{$msg}"; + $msg = "×{$msg}"; } echo $msg; exit(); @@ -113,16 +113,16 @@ else if ($fmdo == 'user') { AjaxHead(); if ($cfg_md_mailtest == 'N') { - $msg = "√可以使用"; + $msg = "√可以使用"; } else { if (!CheckEmail($email)) { - $msg = "×Email格式有误"; + $msg = "×Email格式有误"; } else { $row = $dsql->GetOne("SELECT mid FROM `#@__member` WHERE email LIKE '$email' LIMIT 1"); if (!is_array($row)) { - $msg = "√可以使用"; + $msg = "√可以使用"; } else { - $msg = "×Email已经被另一个帐号占用"; + $msg = "×Email已经被另一个帐号占用"; } } } @@ -167,7 +167,7 @@ else if ($fmdo == 'user') { //修改积分与金币值 $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET `scores`=$litmitscores, money= money + $money WHERE mid='".$cfg_ml->M_ID."' "); - // 清除会员缓存 + //清除会员缓存 $cfg_ml->DelCache($cfg_ml->M_ID); ShowMsg('成功兑换指定量的金币', 'operation.php'); exit(); @@ -218,7 +218,7 @@ else if ($fmdo == 'login') { ShowMsg("管理员帐号不允许从前台登录", "index.php", 0, 2000); exit(); } else { - // 清除会员缓存 + //清除会员缓存 $cfg_ml->DelCache($cfg_ml->M_ID); if (empty($gourl) || preg_match("#action|_do#i", $gourl)) { ShowMsg("成功登录,5秒钟后转向系统主页...", "index.php", 0, 2000); diff --git a/src/member/reg_new.php b/src/member/reg_new.php index 41fa75fe..abd58b95 100755 --- a/src/member/reg_new.php +++ b/src/member/reg_new.php @@ -32,15 +32,15 @@ if ($step == 1) { } } - // $faqkey = isset($faqkey) && is_numeric($faqkey) ? $faqkey : 0; - // if($safe_faq_reg == '1') - // { - // if($safefaqs[$faqkey]['answer'] != $rsafeanswer || $rsafeanswer=='') - // { - // ShowMsg('验证问题答案错误', '-1'); - // exit(); - // } - // } + //$faqkey = isset($faqkey) && is_numeric($faqkey) ? $faqkey : 0; + //if($safe_faq_reg == '1') + //{ + // if($safefaqs[$faqkey]['answer'] != $rsafeanswer || $rsafeanswer=='') + // { + // ShowMsg('验证问题答案错误', '-1'); + // exit(); + // } + //} $userid = $uname = trim($userid); $pwd = trim($userpwd); diff --git a/src/member/resetpassword.php b/src/member/resetpassword.php index 262fd9c7..0334c5a7 100755 --- a/src/member/resetpassword.php +++ b/src/member/resetpassword.php @@ -108,7 +108,7 @@ if ($dopost == "") { $db->executenonequery($sql); $sql = "UPDATE `#@__member` SET `pwd` = '$pwdok' WHERE `mid` = '$id';"; if ($db->executenonequery($sql)) { - showmsg('更改密码成功,请牢记新密码', 'login.php'); + showmsg('修改密码成功,请牢记新密码', 'login.php'); exit; } } diff --git a/src/member/soft_add.php b/src/member/soft_add.php index 2168fff4..1b4ca575 100755 --- a/src/member/soft_add.php +++ b/src/member/soft_add.php @@ -101,7 +101,7 @@ function _SaveArticle(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != $inadd_f) { ShowMsg("提交表单同系统配置不相符,请重新提交", "-1"); @@ -200,7 +200,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank'    查看软件    - 更改软件 + 修改软件    已发布软件管理 "; diff --git a/src/member/soft_edit.php b/src/member/soft_edit.php index 6c9618c3..e6ae6f4a 100755 --- a/src/member/soft_edit.php +++ b/src/member/soft_edit.php @@ -136,7 +136,7 @@ function _SaveArticle(){ } } } - // 这里对前台提交的附加数据进行一次校验 + //这里对前台提交的附加数据进行一次校验 $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'], 'autofield', FALSE); if ($fontiterm != $inadd_f) { ShowMsg("提交表单同系统配置不相符,请重新提交", "-1"); @@ -144,7 +144,7 @@ function _SaveArticle(){ } } } - //更改主档案表 + //修改主档案表 $upQuery = "UPDATE `#@__archives` set ismake='$ismake', arcrank='$arcrank', @@ -215,16 +215,16 @@ function _SaveArticle(){ } $msg = "  请选择您的后续操作: 发布新软件    - 查看更改 + 查看修改    查看软件    管理软件 "; - $wintitle = "成功更改软件"; - $wecome_info = "软件管理::更改软件"; + $wintitle = "成功修改软件"; + $wecome_info = "软件管理::修改软件"; $win = new OxWindow(); - $win->AddTitle("成功更改软件:"); + $win->AddTitle("成功修改软件:"); $win->AddMsgItem($msg); $winform = $win->GetWindow("hand", " ", FALSE); $win->Display(); diff --git a/src/member/templets/album_add.htm b/src/member/templets/album_add.htm index cabebb4e..e47dd641 100755 --- a/src/member/templets/album_add.htm +++ b/src/member/templets/album_add.htm @@ -1,7 +1,5 @@ - - - - + + @@ -13,7 +11,6 @@ 新建<?php echo $cInfos['typename']; ?> - 会员中心 - <?php echo $cfg_webname; ?> - diff --git a/src/member/templets/album_edit.htm b/src/member/templets/album_edit.htm index 69ae4e0d..70581216 100755 --- a/src/member/templets/album_edit.htm +++ b/src/member/templets/album_edit.htm @@ -1,7 +1,5 @@ - - - - + + @@ -13,7 +11,6 @@ 修改图集:<?php echo $row['title']?> - 会员中心 - <?php echo $cfg_webname; ?> - @@ -128,10 +125,10 @@ - + - diff --git a/src/member/templets/archives_add.htm b/src/member/templets/archives_add.htm index a2b553bc..ece489a5 100755 --- a/src/member/templets/archives_add.htm +++ b/src/member/templets/archives_add.htm @@ -1,6 +1,5 @@ - - - + + @@ -11,7 +10,6 @@ 发表<?php echo $cInfos['typename']; ?> - 会员中心 - <?php echo $cfg_webname; ?> - diff --git a/src/member/templets/archives_edit.htm b/src/member/templets/archives_edit.htm index fdeaa72c..c4f13d60 100755 --- a/src/member/templets/archives_edit.htm +++ b/src/member/templets/archives_edit.htm @@ -1,7 +1,5 @@ - - - - + + @@ -12,7 +10,6 @@ 修改<?php echo $cInfos['typename']; ?> - 会员中心 - <?php echo $cfg_webname; ?> - diff --git a/src/member/templets/archives_sg_add.htm b/src/member/templets/archives_sg_add.htm index 0375d65c..66b57bad 100755 --- a/src/member/templets/archives_sg_add.htm +++ b/src/member/templets/archives_sg_add.htm @@ -1,6 +1,5 @@ - - - + + @@ -11,7 +10,6 @@ 发表<?php echo $cInfos['typename']; ?> - 会员中心 - <?php echo $cfg_webname; ?> - diff --git a/src/member/templets/archives_sg_edit.htm b/src/member/templets/archives_sg_edit.htm index df88d586..d5d1aa2b 100755 --- a/src/member/templets/archives_sg_edit.htm +++ b/src/member/templets/archives_sg_edit.htm @@ -1,7 +1,5 @@ - - - - + + @@ -12,7 +10,6 @@ 修改<?php echo $cInfos['typename']; ?> - 会员中心 - <?php echo $cfg_webname; ?> - diff --git a/src/member/templets/article_add.htm b/src/member/templets/article_add.htm index 34acb22d..984e1a1e 100755 --- a/src/member/templets/article_add.htm +++ b/src/member/templets/article_add.htm @@ -1,6 +1,5 @@ - - - + + @@ -11,7 +10,6 @@ 发表<?php echo $cInfos['typename']; ?> - 会员中心 - <?php echo $cfg_webname; ?> - diff --git a/src/member/templets/article_edit.htm b/src/member/templets/article_edit.htm index cca30977..7e4ca82f 100755 --- a/src/member/templets/article_edit.htm +++ b/src/member/templets/article_edit.htm @@ -1,7 +1,5 @@ - - - - + + @@ -12,7 +10,6 @@ 修改文章:<?php echo $row['title']?> - 会员中心 - <?php echo $cfg_webname; ?> - diff --git a/src/member/templets/buy.htm b/src/member/templets/buy.htm index 830f4694..7bc6bade 100755 --- a/src/member/templets/buy.htm +++ b/src/member/templets/buy.htm @@ -1,6 +1,5 @@ - - - + + @@ -11,10 +10,8 @@ 钱包积分 - 会员中心 - <?php echo $cfg_webname; ?> - -
    diff --git a/src/member/templets/buy_action_payment.htm b/src/member/templets/buy_action_payment.htm index 95a68a93..b664a2e6 100755 --- a/src/member/templets/buy_action_payment.htm +++ b/src/member/templets/buy_action_payment.htm @@ -1,6 +1,5 @@ - - - + + @@ -11,10 +10,8 @@ 订单确认 - 会员中心 -<?php echo $cfg_webname; ?> - -
    diff --git a/src/member/templets/content_list.htm b/src/member/templets/content_list.htm index 85aeaa8a..bab20b42 100755 --- a/src/member/templets/content_list.htm +++ b/src/member/templets/content_list.htm @@ -1,6 +1,5 @@ - - - + + @@ -22,7 +21,6 @@ } -
    @@ -30,7 +28,7 @@
    @@ -81,8 +79,8 @@
    diff --git a/src/member/templets/content_sg_list.htm b/src/member/templets/content_sg_list.htm index 88b51389..a23acb33 100755 --- a/src/member/templets/content_sg_list.htm +++ b/src/member/templets/content_sg_list.htm @@ -1,6 +1,5 @@ - - - + + @@ -22,16 +21,14 @@ } - -
    @@ -81,8 +78,8 @@
    diff --git a/src/member/templets/edit_baseinfo.htm b/src/member/templets/edit_baseinfo.htm index 0a9ab9a5..69b9c26a 100755 --- a/src/member/templets/edit_baseinfo.htm +++ b/src/member/templets/edit_baseinfo.htm @@ -1,6 +1,5 @@ - - - + + @@ -9,9 +8,8 @@ - 更改帐号基本资料 - 会员中心 - <?php echo $cfg_webname; ?> + 修改帐号基本资料 - 会员中心 - <?php echo $cfg_webname; ?> - @@ -20,8 +18,8 @@
    diff --git a/src/member/templets/edit_email.htm b/src/member/templets/edit_email.htm index e30802f7..dfb376db 100644 --- a/src/member/templets/edit_email.htm +++ b/src/member/templets/edit_email.htm @@ -1,6 +1,5 @@ - - - + + @@ -11,7 +10,6 @@ 验证邮箱 - 会员中心 - <?php echo $cfg_webname; ?> - @@ -21,8 +19,8 @@
    diff --git a/src/member/templets/edit_face.htm b/src/member/templets/edit_face.htm index a72da552..b401d143 100755 --- a/src/member/templets/edit_face.htm +++ b/src/member/templets/edit_face.htm @@ -1,6 +1,5 @@ - - - + + @@ -11,7 +10,6 @@ 头像设置 - 会员中心 - <?php echo $cfg_webname; ?> - @@ -21,8 +19,8 @@
    diff --git a/src/member/templets/footer.htm b/src/member/templets/footer.htm index 8e0aa69c..206d8b84 100644 --- a/src/member/templets/footer.htm +++ b/src/member/templets/footer.htm @@ -1,7 +1,7 @@
    @@ -20,7 +20,7 @@ 消息管理 - 会员中心 - <?php echo $cfg_webname; ?> - @@ -41,8 +39,8 @@
    diff --git a/src/member/templets/reg-new.htm b/src/member/templets/reg-new.htm index 2b8ad72a..80fde365 100755 --- a/src/member/templets/reg-new.htm +++ b/src/member/templets/reg-new.htm @@ -1,6 +1,5 @@ - - - + + @@ -11,7 +10,6 @@ <?php echo $cfg_webname; ?>- 会员注册 - @@ -67,7 +65,7 @@ - diff --git a/src/member/templets/resetpassword2.htm b/src/member/templets/resetpassword2.htm index 50429a59..71ba157f 100755 --- a/src/member/templets/resetpassword2.htm +++ b/src/member/templets/resetpassword2.htm @@ -1,7 +1,5 @@ - - - - + + @@ -12,7 +10,6 @@ 密码帮手——找回密码第二步 - diff --git a/src/member/templets/resetpassword3.htm b/src/member/templets/resetpassword3.htm index bba2ed44..ec3cb6a3 100755 --- a/src/member/templets/resetpassword3.htm +++ b/src/member/templets/resetpassword3.htm @@ -1,6 +1,5 @@ - - - + + @@ -11,7 +10,6 @@ 密码帮手——找回密码第三步 - diff --git a/src/member/templets/shops_action_payment.htm b/src/member/templets/shops_action_payment.htm index dcd824a7..39d64422 100755 --- a/src/member/templets/shops_action_payment.htm +++ b/src/member/templets/shops_action_payment.htm @@ -1,6 +1,5 @@ - - - + + diff --git a/src/member/templets/shops_orders.htm b/src/member/templets/shops_orders.htm index 7d33f787..3270a68b 100755 --- a/src/member/templets/shops_orders.htm +++ b/src/member/templets/shops_orders.htm @@ -1,8 +1,6 @@ - - - - + + @@ -12,9 +10,7 @@ 商城订单 - 会员中心 - <?php echo $cfg_webname; ?> - - @@ -24,7 +20,7 @@
    diff --git a/src/member/templets/shops_products.htm b/src/member/templets/shops_products.htm index 079f6324..5161345a 100755 --- a/src/member/templets/shops_products.htm +++ b/src/member/templets/shops_products.htm @@ -1,7 +1,5 @@ - - - - + + @@ -11,9 +9,7 @@ 我购买的商品 - 会员中心 - <?php echo $cfg_webname; ?> - - @@ -23,7 +19,7 @@
    diff --git a/src/member/templets/soft_add.htm b/src/member/templets/soft_add.htm index 8625d78b..fcaec175 100755 --- a/src/member/templets/soft_add.htm +++ b/src/member/templets/soft_add.htm @@ -1,6 +1,5 @@ - - - + + @@ -33,7 +32,6 @@ } - diff --git a/src/member/templets/soft_edit.htm b/src/member/templets/soft_edit.htm index 84474c59..2b00e16c 100755 --- a/src/member/templets/soft_edit.htm +++ b/src/member/templets/soft_edit.htm @@ -1,6 +1,5 @@ - - - + + @@ -33,7 +32,6 @@ } - diff --git a/src/plus/arcmulti.php b/src/plus/arcmulti.php index 126f6056..8d8e141e 100755 --- a/src/plus/arcmulti.php +++ b/src/plus/arcmulti.php @@ -79,7 +79,7 @@ if($tagid !='') $row['imglink'] = "".$row['image'].""; $row['fulltitle'] = $row['title']; $row['title'] = cn_substr($row['title'],$titlelen); - if($row['color']!='') $row['title'] = "".$row['title'].""; + if($row['color']!='') $row['title'] = "".$row['title'].""; if(preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title'].""; //$row['title'] = "".$row['title'].""; diff --git a/src/plus/count.php b/src/plus/count.php index 45b7a0af..4e788bf6 100755 --- a/src/plus/count.php +++ b/src/plus/count.php @@ -1,5 +1,4 @@ 200, "data" => array( @@ -100,7 +100,7 @@ if ($formurl == 'caicai') { ); $digg = json_encode($result); } else { - // 兼容之前的老版本 + //兼容之前的老版本 $digg = '
    顶一下
    ('.$row['goodpost'].')
    diff --git a/src/plus/disdls.php b/src/plus/disdls.php index 898de7ce..241e7605 100755 --- a/src/plus/disdls.php +++ b/src/plus/disdls.php @@ -1,5 +1,4 @@ ".$memberTypes[$needRank]." 才能下载,您目前是:".$memberTypes[$cfg_ml->M_Rank]." "; + $moremsg = "这个软件需要 ".$memberTypes[$needRank]." 才能下载,您目前是:".$memberTypes[$cfg_ml->M_Rank]." "; include_once(DEDETEMPLATE.'/plus/view_msg.htm'); exit(); } @@ -202,7 +202,7 @@ function getSoft_new() //没有足够的金币 if ($needMoney > $cfg_ml->M_Money || $cfg_ml->M_Money == '') { $msgtitle = "您没有权限下载软件:{$arctitle}"; - $moremsg = "这个软件需要 ".$needMoney." 金币 才能下载,您目前拥有金币:".$cfg_ml->M_Money." 个 "; + $moremsg = "这个软件需要 ".$needMoney." 金币 才能下载,您目前拥有金币:".$cfg_ml->M_Money." 个 "; include_once(DEDETEMPLATE.'/plus/view_msg.htm'); exit(0); } diff --git a/src/plus/feedback.php b/src/plus/feedback.php index adbb7a8a..411974d3 100755 --- a/src/plus/feedback.php +++ b/src/plus/feedback.php @@ -36,7 +36,7 @@ $good = isset($good) ? intval($good) : 0; $cfg_formmember = isset($cfg_formmember) ? true : false; $ischeck = $cfg_feedbackcheck == 'Y' ? 0 : 1; $aid = isset($aid) ? intval($aid) : 0; -$fid = isset($fid) ? intval($fid) : 0; // 用来标记回复评论的变量 +$fid = isset($fid) ? intval($fid) : 0; //用来标记回复评论的变量 if (empty($aid) && empty($fid)) { echo json_encode(array( @@ -76,7 +76,7 @@ if ($action == '' || $action == 'show') { $where_sql .= " AND fb.aid={$aid}"; } - // 调用20条热评 + //调用20条热评 $querystring = "SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores,mb.sex FROM `#@__feedback` fb LEFT JOIN `#@__member` mb on mb.mid = fb.mid $where_sql AND fb.ischeck='1' ORDER BY fb.good DESC"; @@ -118,7 +118,7 @@ function __SendFeedback(){ } if (!$cfg_ml->IsLogin()) { if ($feedbacktype === 'good') { - // 未登录点good不进行数据库记录 + //未登录点good不进行数据库记录 echo json_encode(array( "code" => 200, "msg" => "", @@ -128,7 +128,7 @@ function __SendFeedback(){ } } $svali = GetCkVdValue(); if (strtolower($validate) != $svali || $svali == '') { - // ResetVdValue(); + //ResetVdValue(); echo json_encode(array( "code" => -1, "msg" => "验证码错误", diff --git a/src/plus/list.php b/src/plus/list.php index 828519ae..603d5c4b 100755 --- a/src/plus/list.php +++ b/src/plus/list.php @@ -56,7 +56,7 @@ if ($tinfos['issystem'] == -1) { } $memberTypes[0] = "游客或没权限会员"; $msgtitle = "您没有权限浏览栏目:{$lv->Fields['typename']} "; - $moremsg = "这个栏目需要 ".$memberTypes[$lv->Fields['corank']]." 才能访问,您目前是:".$memberTypes[$cfg_ml->M_Rank]." "; + $moremsg = "这个栏目需要 ".$memberTypes[$lv->Fields['corank']]." 才能访问,您目前是:".$memberTypes[$cfg_ml->M_Rank]." "; include_once(DEDETEMPLATE.'/plus/view_msg_catalog.htm'); exit(); } diff --git a/src/plus/vdimgck.php b/src/plus/vdimgck.php index 9055812b..d6941a90 100755 --- a/src/plus/vdimgck.php +++ b/src/plus/vdimgck.php @@ -15,7 +15,7 @@ require_once(DEDEDATA.'/config.cache.inc.php'); $config = array( 'font_size' => 20, 'img_height' => $safe_wheight, - 'word_type' => (int)$safe_codetype, // 1:数字 2:英文 3:单词 + 'word_type' => (int)$safe_codetype, //1:数字 2:英文 3:单词 'img_width' => $safe_wwidth, 'use_boder' => TRUE, 'font_file' => DEDEINC.'/data/fonts/'.mt_rand(1, 6).'.ttf', @@ -27,7 +27,7 @@ $enkey = substr(md5(substr($cfg_cookie_encode, 0, 5)), 0, 10); $sessSavePath = DEDEDATA."/sessions_{$enkey}"; if (!is_dir($sessSavePath)) mkdir($sessSavePath); -// Session保存路径 +//Session保存路径 if (is_writeable($sessSavePath) && is_readable($sessSavePath)) { session_save_path($sessSavePath); @@ -35,7 +35,7 @@ if (is_writeable($sessSavePath) && is_readable($sessSavePath)) { if (!empty($cfg_domain_cookie)) session_set_cookie_params(0, '/', $cfg_domain_cookie); if (!echo_validate_image($config)) { - // 如果不成功则初始化一个默认验证码 + //如果不成功则初始化一个默认验证码 @session_start(); $_SESSION['securimage_code_value'] = strtolower('abcd'); if (function_exists('imagecreatefromjpeg')) { @@ -112,30 +112,30 @@ function echo_validate_image($config = array()) $rndcodelen = strlen($rndstring); - // //背景横线 - // $lineColor1 = imagecolorallocate($im, 0xda, 0xd9, 0xd1); - // for ($j = 3; $j <= $img_height - 3; $j = $j + 3) { - // imageline($im, 2, $j, $img_width - 2, $j, $lineColor1); - // } + ////背景横线 + //$lineColor1 = imagecolorallocate($im, 0xda, 0xd9, 0xd1); + //for ($j = 3; $j <= $img_height - 3; $j = $j + 3) { + // imageline($im, 2, $j, $img_width - 2, $j, $lineColor1); + //} - // //背景竖线 - // $lineColor2 = imagecolorallocate($im, 0xda, 0xd9, 0xd1); - // for ($j = 2; $j < 100; $j = $j + 6) { - // imageline($im, $j, 0, $j + 8, $img_height, $lineColor2); - // } + ////背景竖线 + //$lineColor2 = imagecolorallocate($im, 0xda, 0xd9, 0xd1); + //for ($j = 2; $j < 100; $j = $j + 6) { + // imageline($im, $j, 0, $j + 8, $img_height, $lineColor2); + //} - // 增加一些噪线 + //增加一些噪线 for ($i = 0; $i < 5; $i++) { $red = mt_rand(50, 255); $green = mt_rand(50, 255); $blue = mt_rand(50, 255); $tcol = imagecolorallocate($im, $red, $green, $blue); - if (mt_rand(0, 1)) { // Horizontal + if (mt_rand(0, 1)) { //Horizontal $Xa = mt_rand(0, $img_width / 2); $Ya = mt_rand(0, $img_height); $Xb = mt_rand($img_width / 2, $img_width); $Yb = mt_rand(0, $img_height); - } else { // Vertical + } else { //Vertical $Xa = mt_rand(0, $img_width); $Ya = mt_rand(0, $img_height / 2); $Xb = mt_rand(0, $img_width); diff --git a/src/plus/view.php b/src/plus/view.php index 9786ccd4..1fa681bd 100755 --- a/src/plus/view.php +++ b/src/plus/view.php @@ -1,5 +1,4 @@ 0 || $needRank > 1) { } $memberTypes[0] = "游客或没权限会员"; $msgtitle = "您没有权限浏览文档:{$arctitle} "; - $moremsg = "这篇文档需要 ".$memberTypes[$needRank]." 才能访问,您目前是:".$memberTypes[$cfg_ml->M_Rank]." "; + $moremsg = "这篇文档需要 ".$memberTypes[$needRank]." 才能访问,您目前是:".$memberTypes[$cfg_ml->M_Rank]." "; include_once(DEDETEMPLATE.'/plus/view_msg.htm'); exit(); } @@ -77,7 +76,7 @@ if ($needMoney > 0 || $needRank > 1) { if (!is_array($row)) { if ($cfg_ml->M_Money == '' || $needMoney > $cfg_ml->M_Money) { $msgtitle = "您没有权限浏览文档:{$arctitle} "; - $moremsg = "这篇文档需要 ".$needMoney." 金币 才能访问,您目前拥有金币:".$cfg_ml->M_Money." 个 "; + $moremsg = "这篇文档需要 ".$needMoney." 金币 才能访问,您目前拥有金币:".$cfg_ml->M_Money." 个 "; include_once(DEDETEMPLATE.'/plus/view_msg.htm'); $arc->Close(); exit(); @@ -101,7 +100,7 @@ if ($needMoney > 0 || $needRank > 1) { } $msgtitle = "扣金币购买阅读"; - $moremsg = "阅读该文档内容需要付费
    这篇文档需要 ".$needMoney." 金币 才能访问,您目前拥有金币 ".$cfg_ml->M_Money."
    确认阅读请点 [确认付点阅读]"; + $moremsg = "阅读该文档内容需要付费
    这篇文档需要 ".$needMoney." 金币 才能访问,您目前拥有金币 ".$cfg_ml->M_Money."
    确认阅读请点 [确认付点阅读]"; include_once($cfg_basedir.$cfg_templets_dir."/plus/view_msg.htm"); $arc->Close(); exit(); diff --git a/src/static/ckeditor/CHANGES.md b/src/static/ckeditor/CHANGES.md index 1699df0b..019712e5 100755 --- a/src/static/ckeditor/CHANGES.md +++ b/src/static/ckeditor/CHANGES.md @@ -159,7 +159,7 @@ Fixed Issues: API Changes: * [#1496](https://github.com/ckeditor/ckeditor4/issues/1496): The [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) plugin exposes the [`CKEDITOR.ui.balloonToolbar.reposition()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonToolbar.html#reposition) and [`CKEDITOR.ui.balloonToolbarView.reposition()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonToolbarView.html#reposition) methods. -* [#2021](https://github.com/ckeditor/ckeditor4/issues/2021): Added new [`CKEDITOR.dom.documentFragment.find()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_documentFragment.html#method-find) and [`CKEDITOR.dom.documentFragment.findOne()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_documentFragment.html#method-findOne) methods. +* [#2022](https://github.com/ckeditor/ckeditor4/issues/2022): Added new [`CKEDITOR.dom.documentFragment.find()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_documentFragment.html#method-find) and [`CKEDITOR.dom.documentFragment.findOne()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_documentFragment.html#method-findOne) methods. * [#2700](https://github.com/ckeditor/ckeditor4/issues/2700): Added the [`CKEDITOR.tools.array.find()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-find) method. * [#3123](https://github.com/ckeditor/ckeditor4/issues/3123): Added the [`CKEDITOR.tools.object.keys()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys) method. * [#3123](https://github.com/ckeditor/ckeditor4/issues/3123): Added the [`CKEDITOR.tools.object.entries()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-entries) method. diff --git a/src/static/css/jquery.fileupload.css b/src/static/css/jquery.fileupload.css index 8ae3b09d..04982eec 100644 --- a/src/static/css/jquery.fileupload.css +++ b/src/static/css/jquery.fileupload.css @@ -1,37 +1 @@ -@charset "UTF-8"; -/* - * jQuery File Upload Plugin CSS - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -.fileinput-button { - position: relative; - overflow: hidden; - display: inline-block; -} -.fileinput-button input { - position: absolute; - top: 0; - right: 0; - margin: 0; - opacity: 0; - -ms-filter: 'alpha(opacity=0)'; - font-size: 200px !important; - direction: ltr; - cursor: pointer; -} - -/* Fixes for IE < 8 */ -@media screen\9 { - .fileinput-button input { - filter: alpha(opacity=0); - font-size: 100%; - height: 100%; - } -} +.fileinput-button{position:relative;overflow:hidden;display:inline-block}.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;direction:ltr;cursor:pointer}@media screen\9{.fileinput-button input{filter:alpha(opacity=0);font-size:100%;height:100%}} \ No newline at end of file diff --git a/src/static/enums.js b/src/static/enums.js index cfa6ad58..c3d89bcc 100755 --- a/src/static/enums.js +++ b/src/static/enums.js @@ -60,7 +60,7 @@ function ChangeSon() var oj = document.createElement('select'); oj.name = emname + '_sec'; oj.id = emname + '_sec'; - oj.className = "form-control mt-2"; + oj.className = "form-control"; oj.onchange = ChangeSec; } var v = this.options[this.selectedIndex].value; @@ -130,7 +130,7 @@ function selNextSon() var oj = document.createElement('select'); oj.name = emname + '_son'; oj.id = emname + '_son'; - oj.className = "form-control mt-2"; + oj.className = "form-control"; oj.onchange = ChangeSon; } var v = this.options[this.selectedIndex].value; @@ -177,7 +177,7 @@ function MakeTopSelect(emname, selvalue) var selObj = document.createElement("select"); selObj.name = emname + '_top'; selObj.id = emname + '_top'; - selObj.className = "form-control mt-2"; + selObj.className = "form-control"; selObj.onchange = selNextSon; var selarr = eval('em_'+emname+'s'); // alert(selarr[1002.2]); @@ -233,7 +233,7 @@ function MakeTopSelect(emname, selvalue) selObj = document.createElement("select"); selObj.name = emname + '_son'; selObj.id = emname + '_son'; - selObj.className = "form-control mt-2"; + selObj.className = "form-control"; selObj.onchange = ChangeSon; aOption = document.createElement('OPTION'); aOption.text = '请选择..'; @@ -275,7 +275,7 @@ function MakeTopSelect(emname, selvalue) selObj.onchange = ChangeSec; aOption = document.createElement('OPTION'); aOption.text = '请选择..'; - selObj.className = "form-control mt-2"; + selObj.className = "form-control"; aOption.value = 0; selObj.options.add(aOption); diff --git a/src/static/img/admin-logo.png b/src/static/img/admin-logo.png index 8e231818..01a0e993 100644 Binary files a/src/static/img/admin-logo.png and b/src/static/img/admin-logo.png differ diff --git a/src/static/img/avatar.png b/src/static/img/avatar.png index e8bcdddb..51371900 100644 Binary files a/src/static/img/avatar.png and b/src/static/img/avatar.png differ diff --git a/src/static/img/base.css b/src/static/img/base.css index 01336b19..6cf54d58 100755 --- a/src/static/img/base.css +++ b/src/static/img/base.css @@ -1 +1 @@ -*{font-size:12px;letter-spacing:.4px}body{font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;line-height:1.5}form,h1,h2,h3,ul,ol,div{margin:0;padding:0}td{line-height:1.5}td,th,div{word-break:break-all;word-wrap:break-word}b,strong{font-weight:400}li,dd{margin:0;padding:0;list-style-type:none}select{height:calc(1.5em + .75rem + 2px);padding:.25rem .5rem;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s}input{padding:.25rem .5rem;height:calc(1.5em + .75rem + 2px);line-height:18px;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}input[type=radio],input[type=checkbox]{height:auto;box-shadow:none;outline:none}input[type=button],input[type=submit],input[type=reset]{padding:.25rem .5rem;height:auto;line-height:1.5;color:#fff;background:#28a745;border-radius:.2rem;transition:all .6s;border:0}input:focus,textarea:focus{border-color:#28a745;box-shadow:0 0 2px #28a745;outline:none}textarea{padding:.25rem .5rem;line-height:18px;font-family:Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}label{display:inline-block;margin:10px 0}img{margin-right:6px;border-radius:.2rem;vertical-align:baseline}h1,h2,h3{font-size:18px;color:#424b51}a:link{color:#424b51;text-decoration:none}a:hover{opacity:.8}a:visited{color:#666}.m1{border-left:1px solid #DFDFDB;border-top:1px solid #DFDFDB;border-bottom:1px solid #808080}.m2{border-left:1px solid #DFDFDB;border-bottom:1px solid #808080;border-top:1px solid #DFDFDB;border-right:1px solid #DFDFDB}.m3{border-left:1px solid #DFDFDB;border-top:1px solid #DFDFDB;border-right:1px solid #DFDFDB}.article{FONT-SIZE:10pt;LINE-HEIGHT:160%;table-layout:fixed;word-break:break-all}.bn{color:#fff;line-height:50%}.contents{color:#F7F6F8}.nb{border:1px solid #ccc}.coolbg{border-right:2px solid #ACACAC;border-bottom:2px solid #ACACAC;background-color:#E6E6E6}.ctfield{padding:2px;line-height:150%}.nndiv{width:170px;height:20px;margin:0;padding:0;word-break:break-all;overflow:hidden}.maintable{width:98%!important}a.btn{color:white!important} \ No newline at end of file +*{font-size:12px;letter-spacing:.4px}body{font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;line-height:1.5}form,h1,h2,h3,ul,ol,div{margin:0;padding:0}td{line-height:1.5}td,th,div{word-break:break-all;word-wrap:break-word}b,strong{font-weight:400}li,dd{margin:0;padding:0;list-style-type:none}label{display:inline-block;margin:10px 0}input{padding:.25rem .5rem;height:calc(1.5em + .75rem + 2px);line-height:18px;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}input[type=radio],input[type=checkbox]{height:auto;box-shadow:none;outline:none}input[type=button],input[type=submit],input[type=reset]{padding:.25rem .5rem;height:auto;line-height:1.5;color:#fff;background:#28a745;border-radius:.2rem;transition:all .6s;border:0}input[type=button]:focus,input[type=submit]:focus,input[type=reset]:focus{background:#006829;border-color:#005b24;box-shadow:0 0 0 0.2rem rgba(38,159,86,.5)}input:focus,textarea:focus{border-color:#28a745;box-shadow:0 0 2px #28a745;outline:none}textarea{padding:.25rem .5rem;line-height:18px;font-family:Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}select{height:calc(1.5em + .75rem + 2px);padding:.25rem .5rem;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s}img{margin-right:6px;border-radius:.2rem;vertical-align:baseline}h1,h2,h3{font-size:18px;color:#424b51}a:link{color:#424b51;text-decoration:none}a:hover{opacity:.8}a:visited{color:#666}.m1{border-left:1px solid #DFDFDB;border-top:1px solid #DFDFDB;border-bottom:1px solid #808080}.m2{border-left:1px solid #DFDFDB;border-bottom:1px solid #808080;border-top:1px solid #DFDFDB;border-right:1px solid #DFDFDB}.m3{border-left:1px solid #DFDFDB;border-top:1px solid #DFDFDB;border-right:1px solid #DFDFDB}.article{line-height:160%;table-layout:fixed;word-break:break-all}.bn{color:#fff;line-height:50%}.contents{color:#F7F6F8}.nb{border:1px solid #ccc}.coolbg{border-right:2px solid #ACACAC;border-bottom:2px solid #ACACAC;background-color:#E6E6E6}.ctfield{padding:2px;line-height:150%}.nndiv{width:170px;height:20px;margin:0;padding:0;word-break:break-all;overflow:hidden}.maintable{width:98%!important}a.btn{color:white!important} \ No newline at end of file diff --git a/src/static/img/c-bury.png b/src/static/img/c-bury.png index defaa8bb..5929f268 100755 Binary files a/src/static/img/c-bury.png and b/src/static/img/c-bury.png differ diff --git a/src/static/img/c-digg.png b/src/static/img/c-digg.png index cb9fc4ec..0bee35c1 100755 Binary files a/src/static/img/c-digg.png and b/src/static/img/c-digg.png differ diff --git a/src/static/img/jpeg.jpg b/src/static/img/jpeg.jpg index a13b21d9..72cd93cd 100755 Binary files a/src/static/img/jpeg.jpg and b/src/static/img/jpeg.jpg differ diff --git a/src/tags.php b/src/tags.php index 7fee64b0..d4170736 100755 --- a/src/tags.php +++ b/src/tags.php @@ -19,10 +19,9 @@ if (isset($_SERVER['QUERY_STRING'])) { } else { $tag = ''; } - $tag = FilterSearch(urldecode($tag)); if ($tag != addslashes($tag)) $tag = ''; if ($tag == '') $dlist = new TagList($tag, 'tag.htm'); else $dlist = new TagList($tag, 'taglist.htm'); $dlist->Display(); -exit(); +exit(); \ No newline at end of file diff --git a/src/templets/default/advancedsearch.htm b/src/templets/default/advancedsearch.htm index b34d9b95..777832ad 100755 --- a/src/templets/default/advancedsearch.htm +++ b/src/templets/default/advancedsearch.htm @@ -167,7 +167,7 @@ $fields['typeurl'] = GetTypeUrl($fields['typeid'],MfTypedir($fields['typedir']), diff --git a/src/templets/default/article_article.htm b/src/templets/default/article_article.htm index 0a8937a0..5fe20547 100755 --- a/src/templets/default/article_article.htm +++ b/src/templets/default/article_article.htm @@ -1,5 +1,5 @@ - - + + @@ -15,7 +15,6 @@ - {dede:include filename="top.htm"/} @@ -109,9 +108,9 @@ - {dede:include filename="top.htm"/} @@ -205,9 +203,9 @@ - {dede:include filename="top.htm"/} diff --git a/src/templets/default/widget_article_digg.htm b/src/templets/default/widget_article_digg.htm index 56d60ad6..e1507f0f 100644 --- a/src/templets/default/widget_article_digg.htm +++ b/src/templets/default/widget_article_digg.htm @@ -23,7 +23,7 @@
    -
    diff --git a/src/templets/plus/qrcode.htm b/src/templets/plus/qrcode.htm index 9eef7e02..e7a7ce51 100755 --- a/src/templets/plus/qrcode.htm +++ b/src/templets/plus/qrcode.htm @@ -1,5 +1,4 @@ - + 扫描二维码 diff --git a/src/templets/plus/rssmap.htm b/src/templets/plus/rssmap.htm index e19ec620..ad65783e 100755 --- a/src/templets/plus/rssmap.htm +++ b/src/templets/plus/rssmap.htm @@ -33,7 +33,7 @@
    diff --git a/src/templets/plus/sitemap.htm b/src/templets/plus/sitemap.htm index 4ae36f5f..38ff07ce 100755 --- a/src/templets/plus/sitemap.htm +++ b/src/templets/plus/sitemap.htm @@ -32,7 +32,7 @@
    diff --git a/src/templets/plus/view_msg.htm b/src/templets/plus/view_msg.htm index 70c31828..174dd97c 100755 --- a/src/templets/plus/view_msg.htm +++ b/src/templets/plus/view_msg.htm @@ -30,7 +30,7 @@
     图片 图片
     本地上传: +  本地上传: =0) echo "已审核"; - else if($fields['arcrank']==-2) echo "被退回"; - else echo "未审核"; + else if($fields['arcrank']==-2) echo "被退回"; + else echo "未审核"; ?> =0) echo "已审核"; - else if($fields['arcrank']==-2) echo "被退回"; - else echo "未审核"; + else if($fields['arcrank']==-2) echo "被退回"; + else echo "未审核"; ?>
    - + diff --git a/src/templets/system/spec_list.htm b/src/templets/system/spec_list.htm index ecf6925e..8b377547 100755 --- a/src/templets/system/spec_list.htm +++ b/src/templets/system/spec_list.htm @@ -10,7 +10,7 @@ diff --git a/src/templets/system/tag_fieldlist.htm b/src/templets/system/tag_fieldlist.htm index 2ce99dd8..10e120d5 100755 --- a/src/templets/system/tag_fieldlist.htm +++ b/src/templets/system/tag_fieldlist.htm @@ -1,9 +1,9 @@
     错误具体提示信息: 错误具体提示信息:
    diff --git a/src/templets/plus/view_msg_catalog.htm b/src/templets/plus/view_msg_catalog.htm index 6572f73d..f184ad26 100755 --- a/src/templets/plus/view_msg_catalog.htm +++ b/src/templets/plus/view_msg_catalog.htm @@ -9,7 +9,7 @@
    -

    +

    @@ -27,7 +27,7 @@
    - + +
     错误具体提示信息: 错误具体提示信息:
    @@ -61,7 +61,7 @@ diff --git a/src/templets/plus/win_templet.htm b/src/templets/plus/win_templet.htm index abcfbfec..3a36ca11 100755 --- a/src/templets/plus/win_templet.htm +++ b/src/templets/plus/win_templet.htm @@ -11,7 +11,7 @@ - + diff --git a/src/templets/system/custom_fields_admin.htm b/src/templets/system/custom_fields_admin.htm index e987f0bc..25f1a2dc 100755 --- a/src/templets/system/custom_fields_admin.htm +++ b/src/templets/system/custom_fields_admin.htm @@ -1,6 +1,6 @@ -
     ◇{dede:wecome_info/}{dede:wecome_info/}
    {dede:winform/}
    - - +
     ~name~:
    + + - -
     ~name~: ~form~
    \ No newline at end of file +
    \ No newline at end of file diff --git a/src/templets/system/mynews.htm b/src/templets/system/mynews.htm index 024def53..856f05eb 100755 --- a/src/templets/system/mynews.htm +++ b/src/templets/system/mynews.htm @@ -4,10 +4,10 @@
    - + 发布人:[field:writer /] 时间:[field:senddate function='MyDate("Y-m-d H:i:s","@me")'/] - +
    -[field:description /]([field:stime /]) +[field:description /]([field:stime /])
    - + - +
    [field:name/][field:name/]
    [field:value/][field:value/]
     
    \ No newline at end of file