| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__) . "/actionsearch_class.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(dirname(__FILE__)."/actionsearch_class.php"); | |||
| //增加权限检查 | |||
| if (empty($dopost)) $dopost = ""; | |||
| @@ -27,7 +27,7 @@ class ActionSearch | |||
| function GetSearchstr() | |||
| { | |||
| require_once(dirname(__FILE__) . "/inc/inc_action_info.php"); | |||
| require_once(dirname(__FILE__)."/inc/inc_action_info.php"); | |||
| return is_array($actionSearch) ? $actionSearch : array(); | |||
| } | |||
| @@ -80,11 +80,11 @@ class ActionSearch | |||
| foreach ($text as $key => $value) { | |||
| if ($key == 'title' || $key == 'description') { | |||
| //仅对title,description进行数组替换 | |||
| $text[$key] = str_replace($this->keyword, '<font color="red">' . $this->keyword . '</font>', $text[$key]); | |||
| $text[$key] = str_replace($this->keyword, '<font color="red">'.$this->keyword.'</font>', $text[$key]); | |||
| } | |||
| } | |||
| } else { | |||
| $text = str_replace($this->keyword, '<font color="red">' . $this->keyword . '</font>', $text); | |||
| $text = str_replace($this->keyword, '<font color="red">'.$this->keyword.'</font>', $text); | |||
| } | |||
| return $text; | |||
| } | |||
| @@ -10,9 +10,9 @@ | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require(dirname(__FILE__) . "/config.php"); | |||
| require(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('plus_广告管理'); | |||
| require_once DEDEINC . "/typelink.class.php"; | |||
| require_once DEDEINC."/typelink.class.php"; | |||
| if (empty($dopost)) $dopost = ""; | |||
| if ($dopost == "save") { | |||
| @@ -9,9 +9,9 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require(dirname(__FILE__) . "/config.php"); | |||
| require(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('plus_广告管理'); | |||
| require_once(DEDEINC . '/typelink.class.php'); | |||
| require_once(DEDEINC.'/typelink.class.php'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| $aid = preg_replace("#[^0-9]#", '', $aid); | |||
| $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "ad_main.php" : $_COOKIE['ENV_GOBACK_URL']; | |||
| @@ -21,13 +21,13 @@ if ($dopost == 'delete') { | |||
| ShowMsg("成功删除一则广告代码!", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } else if ($dopost == "gettag") { | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| $jscode = "<script src='{$cfg_phpurl}/ad_js.php?aid=$aid' language='javascript'></script>"; | |||
| $showhtml = "<xmp style='color:#333333;background-color:#ffffff'>\r\n\r\n$jscode\r\n\r\n</xmp>"; | |||
| $showhtml .= "预览:<iframe name='testfrm' frameborder='0' src='ad_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='200'></iframe>"; | |||
| $row = $dsql->GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' "); | |||
| $showtag = '{' . "dede:myad name='{$row['tagname']}'/" . '}'; | |||
| $showtag = '{'."dede:myad name='{$row['tagname']}'/".'}'; | |||
| $info = "<b>说明:</b>如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告更改后需要重新生成。<br /> | |||
| 如果不希望重新生成所有页面,则直接调用JS代码即可。 | |||
| "; | |||
| @@ -9,9 +9,9 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(DEDEINC . '/datalistcp.class.php'); | |||
| require_once(DEDEINC . '/common.func.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| require_once(DEDEINC.'/datalistcp.class.php'); | |||
| require_once(DEDEINC.'/common.func.php'); | |||
| setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); | |||
| $clsid = isset($clsid) ? intval($clsid) : 0; | |||
| @@ -37,7 +37,7 @@ 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->SetTemplet(DEDEADMIN."/templets/ad_main.htm"); | |||
| $dlist->SetSource($sql); | |||
| $dlist->display(); | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| if (empty($dopost)) $dopost = ''; | |||
| //保存更改 | |||
| @@ -18,9 +18,9 @@ if ($dopost == "save") { | |||
| $endID = $idend; | |||
| for (; $startID <= $endID; $startID++) { | |||
| $query = ''; | |||
| $tid = ${'ID_' . $startID}; | |||
| $pname = ${'pname_' . $startID}; | |||
| if (isset(${'check_' . $startID})) { | |||
| $tid = ${'ID_'.$startID}; | |||
| $pname = ${'pname_'.$startID}; | |||
| if (isset(${'check_'.$startID})) { | |||
| if ($pname != '') { | |||
| $query = "UPDATE `#@__myadtypee` SET typename='$pname' WHERE id='$tid' "; | |||
| $dsql->ExecuteNoneQuery($query); | |||
| @@ -9,16 +9,16 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('a_New,a_AccNew'); | |||
| require_once(DEDEINC . "/customfields.func.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); | |||
| require_once(DEDEINC."/customfields.func.php"); | |||
| require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if ($dopost != 'save') { | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
| ClearMyAddon(); | |||
| $channelid = empty($channelid) ? 0 : intval($channelid); | |||
| $cid = empty($cid) ? 0 : intval($cid); | |||
| @@ -43,8 +43,8 @@ if ($dopost != 'save') { | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ else if ($dopost == 'save') { | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
| @@ -110,15 +110,15 @@ function __save(){ } | |||
| if ($litpic_b64 != "") { | |||
| $data = explode(',', $litpic_b64); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| // 加水印 | |||
| WaterImg($cfg_basedir . $fullUrl, 'up'); | |||
| WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
| $litpic = $fullUrl; | |||
| } | |||
| @@ -149,10 +149,10 @@ function __save(){ } | |||
| 处理从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); | |||
| 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']); | |||
| @@ -165,11 +165,11 @@ function __save(){ } | |||
| $i = 0; | |||
| foreach ($imgs as $imgold) { | |||
| $i++; | |||
| $savepath = $cfg_image_dir . "/" . MyDate("Y-m", $ntime); | |||
| $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; | |||
| $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); | |||
| @@ -183,12 +183,12 @@ function __save(){ } | |||
| } | |||
| $info = ''; | |||
| $imginfos = GetImageSize($imgfile, $info); | |||
| $imgurls .= "{dede:img ddimg='$litpicname' text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; | |||
| $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'); | |||
| VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid'); | |||
| "; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| $fid = $dsql->GetLastID(); | |||
| @@ -218,17 +218,17 @@ function __save(){ } | |||
| $album = $albumsArr[$i]; | |||
| $data = explode(',', $album['img']); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| $info = ''; | |||
| $imginfos = GetImageSize($cfg_basedir . $fullUrl, $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 .= "{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; | |||
| } | |||
| @@ -264,18 +264,18 @@ function __save(){ } | |||
| } | |||
| ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); | |||
| } | |||
| $inadd_f .= ',' . $vs[0]; | |||
| $inadd_v .= " ,'" . ${$vs[0]} . "' "; | |||
| $inadd_f .= ','.$vs[0]; | |||
| $inadd_v .= " ,'".${$vs[0]}."' "; | |||
| } | |||
| } | |||
| } | |||
| //处理图片文档的自定义属性 | |||
| if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
| $flag = ($flag == '' ? 'p' : $flag . ',p'); | |||
| $flag = ($flag == '' ? 'p' : $flag.',p'); | |||
| } | |||
| if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
| $flag = ($flag == '' ? 'j' : $flag . ',j'); | |||
| $flag = ($flag == '' ? 'j' : $flag.',j'); | |||
| } | |||
| //跳转网址的文档强制为动态 | |||
| @@ -288,7 +288,7 @@ function __save(){ } | |||
| if (!$dsql->ExecuteNoneQuery($query)) { | |||
| $gerr = $dsql->GetError(); | |||
| $dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); | |||
| ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||
| ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
| exit(); | |||
| } | |||
| @@ -308,7 +308,7 @@ function __save(){ } | |||
| $gerr = $dsql->GetError(); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
| ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||
| ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
| exit(); | |||
| } | |||
| @@ -316,7 +316,7 @@ function __save(){ } | |||
| InsertTags($tags, $arcID); | |||
| $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | |||
| if ($artUrl == '') { | |||
| $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; | |||
| $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
| } | |||
| ClearMyAddon($arcID, $title); | |||
| @@ -337,7 +337,7 @@ function __save(){ } | |||
| 请选择你的后续操作: | |||
| <a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布图片</a> | |||
|    | |||
| <a href='archives_do.php?aid=" . $arcID . "&dopost=editArchives' class='btn btn-success btn-sm'>更改图集</a> | |||
| <a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>更改图集</a> | |||
|    | |||
| <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> | |||
|    | |||
| @@ -345,7 +345,7 @@ function __save(){ } | |||
|    | |||
| $backurl | |||
| "; | |||
| $msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>" . GetUpdateTest(); | |||
| $msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
| $wintitle = "成功发布一个图集!"; | |||
| $wecome_info = "文章管理::发布图集"; | |||
| @@ -9,16 +9,16 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
| require_once(DEDEINC . "/customfields.func.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); | |||
| require_once(DEDEINC."/customfields.func.php"); | |||
| require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if ($dopost != 'save') { | |||
| require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| ClearMyAddon(); | |||
| $aid = intval($aid); | |||
| @@ -32,7 +32,7 @@ if ($dopost != 'save') { | |||
| ShowMsg("读取档案基本信息出错!", "-1"); | |||
| exit(); | |||
| } | |||
| $query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; | |||
| $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||
| $cInfos = $dsql->GetOne($query); | |||
| if (!is_array($cInfos)) { | |||
| ShowMsg("读取频道配置信息出错!", "javascript:;"); | |||
| @@ -59,8 +59,8 @@ if ($dopost != 'save') { | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ else if ($dopost == 'save') { | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
| @@ -123,15 +123,15 @@ function __save(){ } | |||
| if ($litpic_b64 != "") { | |||
| $data = explode(',', $litpic_b64); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| // 加水印 | |||
| WaterImg($cfg_basedir . $fullUrl, 'up'); | |||
| WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
| $litpic = $fullUrl; | |||
| } | |||
| @@ -140,10 +140,10 @@ function __save(){ } | |||
| //处理图片文档的自定义属性 | |||
| if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
| $flag = ($flag == '' ? 'p' : $flag . ',p'); | |||
| $flag = ($flag == '' ? 'p' : $flag.',p'); | |||
| } | |||
| if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
| $flag = ($flag == '' ? 'j' : $flag . ',j'); | |||
| $flag = ($flag == '' ? 'j' : $flag.',j'); | |||
| } | |||
| //跳转网址的文档强制为动态 | |||
| @@ -175,7 +175,7 @@ function __save(){ } | |||
| WHERE id='$id'; "; | |||
| if (!$dsql->ExecuteNoneQuery($query)) { | |||
| ShowMsg("更新数据库archives表时出错,请检查!" . $dsql->GetError(), "javascript:;"); | |||
| ShowMsg("更新数据库archives表时出错,请检查!".$dsql->GetError(), "javascript:;"); | |||
| exit(); | |||
| } | |||
| @@ -186,46 +186,46 @@ function __save(){ } | |||
| //检查旧的图片是否有更新,并保存 | |||
| //----------------------------------------- | |||
| for ($i = 1; $i <= 120; $i++) { | |||
| if (!isset(${'imgurl' . $i})) continue; | |||
| if (!isset(${'imgurl'.$i})) continue; | |||
| $info = ''; | |||
| $iinfo = str_replace("'", "`", stripslashes(${'imgmsg' . $i})); | |||
| $iurl = stripslashes(${'imgurl' . $i}); | |||
| $ddurl = stripslashes(${'imgddurl' . $i}); | |||
| $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; | |||
| $imgfile = $cfg_basedir.$iurl; | |||
| $litimgfile = $cfg_basedir.$ddurl; | |||
| //有上传文件的情况 | |||
| if (isset(${'imgfile' . $i}) && is_uploaded_file(${'imgfile' . $i})) { | |||
| $tmpFile = ${'imgfile' . $i}; | |||
| 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"; | |||
| $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; | |||
| $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"; | |||
| $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}); | |||
| $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"; | |||
| $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
| } | |||
| } | |||
| @@ -245,10 +245,10 @@ function __save(){ } | |||
| 从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); | |||
| 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)) { | |||
| @@ -262,30 +262,30 @@ function __save(){ } | |||
| $i = 0; | |||
| foreach ($imgs as $imgold) { | |||
| $i++; | |||
| $savepath = $cfg_image_dir . "/" . MyDate("Y-m", $ntime); | |||
| $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; | |||
| $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"; | |||
| $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'); | |||
| 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)) { | |||
| if (file_exists($cfg_basedir.$litpicname)) { | |||
| $litpic = $litpicname; | |||
| $hasone = true; | |||
| } | |||
| @@ -308,17 +308,17 @@ function __save(){ } | |||
| $album = $albumsArr[$i]; | |||
| $data = explode(',', $album['img']); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| $info = ''; | |||
| $imginfos = GetImageSize($cfg_basedir . $fullUrl, $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 .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; | |||
| } | |||
| } | |||
| @@ -346,7 +346,7 @@ function __save(){ } | |||
| } | |||
| ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); | |||
| } | |||
| $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; | |||
| $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; | |||
| } | |||
| } | |||
| } | |||
| @@ -371,7 +371,7 @@ function __save(){ } | |||
| userip = '$useip' | |||
| WHERE aid='$id'; "; | |||
| if (!$dsql->ExecuteNoneQuery($query)) { | |||
| ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!" . $dsql->GetError(), "javascript:;"); | |||
| ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!".$dsql->GetError(), "javascript:;"); | |||
| exit(); | |||
| } | |||
| } | |||
| @@ -380,7 +380,7 @@ function __save(){ } | |||
| UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
| $arcUrl = MakeArt($id, true, true, $isremote); | |||
| if ($arcUrl == '') { | |||
| $arcUrl = $cfg_phpurl . "/view.php?aid=$id"; | |||
| $arcUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
| } | |||
| ClearMyAddon($id, $title); | |||
| @@ -401,7 +401,7 @@ function __save(){ } | |||
| " 请选择你的后续操作: | |||
| <a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布图片</a> | |||
|    | |||
| <a href='archives_do.php?aid=" . $id . "&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||
| <a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||
|    | |||
| <a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> | |||
|    | |||
| @@ -10,7 +10,7 @@ | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| AjaxHead(); | |||
| $myhtml = UnicodeUrl2Gbk(stripslashes($myhtml)); | |||
| echo "<div class='coolbg61'>[<a href='#' onclick='javascript:HideObj(\"_myhtml\")'>关闭</a>]</div>\r\n"; | |||
| @@ -9,16 +9,16 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| CheckPurview('a_New,a_AccNew'); | |||
| require_once(DEDEINC . '/customfields.func.php'); | |||
| require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); | |||
| require_once(DEDEINC.'/customfields.func.php'); | |||
| require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if ($dopost != 'save') { | |||
| require_once(DEDEINC . '/dedetag.class.php'); | |||
| require_once(DEDEADMIN . '/inc/inc_catalog_options.php'); | |||
| require_once(DEDEINC.'/dedetag.class.php'); | |||
| require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); | |||
| ClearMyAddon(); | |||
| $channelid = empty($channelid) ? 0 : intval($channelid); | |||
| $cid = empty($cid) ? 0 : intval($cid); | |||
| @@ -45,8 +45,8 @@ if ($dopost != 'save') { | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ else if ($dopost == 'save') { | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
| @@ -110,15 +110,15 @@ function __save(){ } | |||
| if ($litpic_b64 != "") { | |||
| $data = explode(',', $litpic_b64); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| // 加水印 | |||
| WaterImg($cfg_basedir . $fullUrl, 'up'); | |||
| WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
| $litpic = $fullUrl; | |||
| } | |||
| @@ -144,18 +144,18 @@ function __save(){ } | |||
| if (!isset(${$vs[0]})) ${$vs[0]} = ''; | |||
| ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); | |||
| } | |||
| $inadd_f .= ',' . $vs[0]; | |||
| $inadd_v .= " ,'" . ${$vs[0]} . "' "; | |||
| $inadd_f .= ','.$vs[0]; | |||
| $inadd_v .= " ,'".${$vs[0]}."' "; | |||
| } | |||
| } | |||
| } | |||
| //处理图片文档的自定义属性 | |||
| if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
| $flag = ($flag == '' ? 'p' : $flag . ',p'); | |||
| $flag = ($flag == '' ? 'p' : $flag.',p'); | |||
| } | |||
| if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
| $flag = ($flag == '' ? 'j' : $flag . ',j'); | |||
| $flag = ($flag == '' ? 'j' : $flag.',j'); | |||
| } | |||
| //跳转网址的文档强制为动态 | |||
| @@ -169,7 +169,7 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||
| if (!$dsql->ExecuteNoneQuery($query)) { | |||
| $gerr = $dsql->GetError(); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
| ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||
| ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
| exit(); | |||
| } | |||
| @@ -183,7 +183,7 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||
| $gerr = $dsql->GetError(); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
| ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||
| ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
| exit(); | |||
| } | |||
| } | |||
| @@ -192,7 +192,7 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||
| InsertTags($tags, $arcID); | |||
| $artUrl = MakeArt($arcID, true, true, $isremote); | |||
| if ($artUrl == '') { | |||
| $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; | |||
| $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
| } | |||
| ClearMyAddon($arcID, $title); | |||
| @@ -214,13 +214,13 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||
|    | |||
| <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||
|    | |||
| <a href='archives_do.php?aid=" . $arcID . "&dopost=editArchives' class='btn btn-success btn-sm'>更改文档</a> | |||
| <a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>更改文档</a> | |||
|    | |||
| <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> | |||
|    | |||
| $backurl | |||
| "; | |||
| $msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>" . GetUpdateTest(); | |||
| $msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
| $wintitle = '成功发布文档!'; | |||
| $wecome_info = '文档管理::发布文档'; | |||
| @@ -8,11 +8,11 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(DEDEADMIN . '/inc/inc_batchup.php'); | |||
| require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); | |||
| require_once(DEDEINC . '/typelink.class.php'); | |||
| require_once(DEDEINC . '/arc.archives.class.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| require_once(DEDEADMIN.'/inc/inc_batchup.php'); | |||
| require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
| require_once(DEDEINC.'/typelink.class.php'); | |||
| require_once(DEDEINC.'/arc.archives.class.php'); | |||
| $ENV_GOBACK_URL = (empty($_COOKIE['ENV_GOBACK_URL']) ? 'content_list.php' : $_COOKIE['ENV_GOBACK_URL']); | |||
| if (empty($dopost)) { | |||
| ShowMsg('对不起,你没指定运行参数', '-1'); | |||
| @@ -106,11 +106,11 @@ else if ($dopost == "viewArchives") { | |||
| if (preg_match("#^http:#", $arcfile)) { | |||
| $arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); | |||
| } | |||
| $truefile = GetTruePath() . $arcfile; | |||
| $truefile = GetTruePath().$arcfile; | |||
| if (!file_exists($truefile)) { | |||
| MakeArt($aid, TRUE); | |||
| } | |||
| echo "<script>location.href='$arcurl" . "?" . time() . "';</script>"; | |||
| echo "<script>location.href='$arcurl"."?".time()."';</script>"; | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| @@ -180,12 +180,12 @@ else if ($dopost == "commendArchives") { | |||
| 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'); | |||
| $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'); | |||
| $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); | |||
| $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); | |||
| } | |||
| } | |||
| @@ -203,7 +203,7 @@ else if ($dopost == "makeArchives") { | |||
| ShowMsg('参数无效', $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); | |||
| require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
| $qstrs = explode('`', $qstr); | |||
| $i = 0; | |||
| foreach ($qstrs as $aid) { | |||
| @@ -219,7 +219,7 @@ function checkArchives() { } | |||
| ---------------------------*/ | |||
| else if ($dopost == "checkArchives") { | |||
| CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); | |||
| require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); | |||
| require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
| if (!empty($aid) && empty($qstr)) $qstr = $aid; | |||
| if ($qstr == '') { | |||
| ShowMsg("参数无效", $ENV_GOBACK_URL); | |||
| @@ -237,9 +237,9 @@ else if ($dopost == "checkArchives") { | |||
| $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' "); | |||
| $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 `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' "); | |||
| } | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); | |||
| $pageurl = MakeArt($aid, false); | |||
| @@ -253,7 +253,7 @@ function delArchives(){ } | |||
| ---------------------------*/ | |||
| else if ($dopost == "delArchives") { | |||
| CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | |||
| require_once(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(DEDEINC."/oxwindow.class.php"); | |||
| if (empty($fmdo)) $fmdo = ''; | |||
| if ($fmdo == 'yes') { | |||
| @@ -277,7 +277,7 @@ else if ($dopost == "delArchives") { | |||
| exit(); | |||
| } else { | |||
| $wintitle = "文档管理-删除文档"; | |||
| $wecome_info = "<a href='" . $ENV_GOBACK_URL . "'>文档管理</a>::删除文档"; | |||
| $wecome_info = "<a href='".$ENV_GOBACK_URL."'>文档管理</a>::删除文档"; | |||
| $win = new OxWindow(); | |||
| $win->Init("archives_do.php", "js/blank.js", "POST"); | |||
| $win->AddHidden("fmdo", "yes"); | |||
| @@ -295,7 +295,7 @@ function moveArchives(){ } | |||
| else if ($dopost == 'moveArchives') { | |||
| CheckPurview('sys_ArcBatch'); | |||
| if (empty($totype)) { | |||
| require_once(DEDEINC . '/typelink.class.php'); | |||
| require_once(DEDEINC.'/typelink.class.php'); | |||
| if (!empty($aid) && empty($qstr)) $qstr = $aid; | |||
| AjaxHead(); | |||
| $channelid = empty($channelid) ? 0 : $channelid; | |||
| @@ -391,7 +391,7 @@ function RbReturnArchives(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'return') { | |||
| CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | |||
| require_once(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(DEDEINC."/oxwindow.class.php"); | |||
| if (!empty($aid) && empty($qstr)) $qstr = $aid; | |||
| @@ -413,7 +413,7 @@ function RbClearArchives(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'clear') { | |||
| CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | |||
| require_once(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(DEDEINC."/oxwindow.class.php"); | |||
| if (empty($fmdo)) $fmdo = ''; | |||
| $recycle = empty($recycle) ? "" : $recycle; | |||
| @@ -440,7 +440,7 @@ else if ($dopost == 'clear') { | |||
| $dsql->Execute(); | |||
| $qstr = ''; | |||
| while ($row = $dsql->GetArray()) { | |||
| $qstr .= $row['id'] . ","; | |||
| $qstr .= $row['id'].","; | |||
| $aid = $row['id']; | |||
| } | |||
| $num = $dsql->GetTotalRow(); | |||
| @@ -468,7 +468,7 @@ function RbDelArchives(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'del') { | |||
| CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | |||
| require_once(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(DEDEINC."/oxwindow.class.php"); | |||
| if (empty($fmdo)) $fmdo = ''; | |||
| $recycle = empty($recycle) ? "" : $recycle; | |||
| if ($fmdo == 'yes') { | |||
| @@ -508,7 +508,7 @@ else if ($dopost == 'del') { | |||
| function quickEdit(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'quickEdit') { | |||
| require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||
| 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 | |||
| @@ -546,7 +546,7 @@ else if ($dopost == 'quickEdit') { | |||
| $dsql->Execute(); | |||
| while ($trow = $dsql->GetObject()) { | |||
| if ($trow->att == 'j' || $trow->att == 'p') continue; | |||
| if (preg_match("#" . $trow->att . "#", $arcRow['flag'])) | |||
| if (preg_match("#".$trow->att."#", $arcRow['flag'])) | |||
| echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' checked='checked'> {$trow->attname}{$trow->att}[{$trow->att}]</label> "; | |||
| else | |||
| echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> "; | |||
| @@ -608,7 +608,7 @@ else if ($dopost == 'quickEdit') { | |||
| function quickEditSave(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'quickEditSave') { | |||
| require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); | |||
| require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
| //权限检测 | |||
| if (!TestPurview('a_Edit')) { | |||
| if (TestPurview('a_AccEdit')) { | |||
| @@ -682,7 +682,7 @@ else if ($dopost == "makekw") { | |||
| $title = $row['title']; | |||
| $description = $row['description']; | |||
| $body = cn_substr($row['body'], 5000); | |||
| $data = $client->Spliteword($title . Html2Text($body)); | |||
| $data = $client->Spliteword($title.Html2Text($body)); | |||
| $keywords = $data->data; | |||
| $description = str_replace(' ', ' ', trim($description)); | |||
| $description = str_replace('[', ' ', $description); | |||
| @@ -695,7 +695,7 @@ else if ($dopost == "makekw") { | |||
| } | |||
| $client->Close(); | |||
| } else { | |||
| include_once(DEDEINC . '/splitword.class.php'); | |||
| include_once(DEDEINC.'/splitword.class.php'); | |||
| $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); | |||
| while ($row = $dsql->GetArray()) { | |||
| //跳过已经有关键字的内容 | |||
| @@ -713,19 +713,19 @@ else if ($dopost == "makekw") { | |||
| $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); | |||
| if (is_array($allindexs) && is_array($titleindexs)) { | |||
| foreach ($titleindexs as $k => $v) { | |||
| if (strlen($keywords . $k) >= 60) { | |||
| if (strlen($keywords.$k) >= 60) { | |||
| break; | |||
| } else { | |||
| if (strlen($k) <= 2) continue; | |||
| $keywords .= $k . ','; | |||
| $keywords .= $k.','; | |||
| } | |||
| } | |||
| foreach ($allindexs as $k => $v) { | |||
| if (strlen($keywords . $k) >= 60) { | |||
| if (strlen($keywords.$k) >= 60) { | |||
| break; | |||
| } else if (!in_array($k, $titleindexs)) { | |||
| if (strlen($k) <= 2) continue; | |||
| $keywords .= $k . ','; | |||
| $keywords .= $k.','; | |||
| } | |||
| } | |||
| } | |||
| @@ -770,12 +770,12 @@ else if ($dopost == 'attsAdd') { | |||
| 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); | |||
| $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); | |||
| $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); | |||
| $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); | |||
| } | |||
| } | |||
| @@ -815,7 +815,7 @@ function attsDel(){ } | |||
| $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); | |||
| } | |||
| $flag = $arr['flag']; | |||
| if (trim($flag) == '' || !preg_match("#" . $flagname . "#", $flag)) { | |||
| if (trim($flag) == '' || !preg_match("#".$flagname."#", $flag)) { | |||
| continue; | |||
| } else { | |||
| $flags = explode(',', $flag); | |||
| @@ -9,16 +9,16 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
| require_once(DEDEINC . "/customfields.func.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); | |||
| require_once(DEDEINC."/customfields.func.php"); | |||
| require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if ($dopost != 'save') { | |||
| require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| ClearMyAddon(); | |||
| $aid = intval($aid); | |||
| @@ -35,7 +35,7 @@ if ($dopost != 'save') { | |||
| exit(); | |||
| } | |||
| $query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; | |||
| $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||
| $cInfos = $dsql->GetOne($query); | |||
| if (!is_array($cInfos)) { | |||
| ShowMsg("读取频道配置信息出错!", "javascript:;"); | |||
| @@ -51,8 +51,8 @@ if ($dopost != 'save') { | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ else if ($dopost == 'save') { | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| 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 = ''; | |||
| @@ -111,15 +111,15 @@ function __save(){ } | |||
| if ($litpic_b64 != "") { | |||
| $data = explode(',', $litpic_b64); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| // 加水印 | |||
| WaterImg($cfg_basedir . $fullUrl, 'up'); | |||
| WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
| $litpic = $fullUrl; | |||
| } | |||
| @@ -145,17 +145,17 @@ function __save(){ } | |||
| } | |||
| ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); | |||
| } | |||
| $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; | |||
| $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; | |||
| } | |||
| } | |||
| } | |||
| //处理图片文档的自定义属性 | |||
| if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
| $flag = ($flag == '' ? 'p' : $flag . ',p'); | |||
| $flag = ($flag == '' ? 'p' : $flag.',p'); | |||
| } | |||
| if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
| $flag = ($flag == '' ? 'j' : $flag . ',j'); | |||
| $flag = ($flag == '' ? 'j' : $flag.',j'); | |||
| } | |||
| //跳转网址的文档强制为动态 | |||
| @@ -204,7 +204,7 @@ function __save(){ } | |||
| UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
| $artUrl = MakeArt($id, TRUE, TRUE, $isremote); | |||
| if ($artUrl == '') { | |||
| $artUrl = $cfg_phpurl . "/view.php?aid=$id"; | |||
| $artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
| } | |||
| ClearMyAddon($id, $title); | |||
| @@ -225,7 +225,7 @@ function __save(){ } | |||
| 请选择你的后续操作: | |||
| <a href='archives_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布新文档</a> | |||
|    | |||
| <a href='archives_do.php?aid=" . $id . "&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||
| <a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||
|    | |||
| <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||
|    | |||
| @@ -9,16 +9,16 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('a_New,a_AccNew'); | |||
| require_once(DEDEINC . "/customfields.func.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); | |||
| require_once(DEDEINC."/customfields.func.php"); | |||
| require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if ($dopost != 'save') { | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
| ClearMyAddon(); | |||
| $channelid = empty($channelid) ? 0 : intval($channelid); | |||
| $cid = empty($cid) ? 0 : intval($cid); | |||
| @@ -43,8 +43,8 @@ if ($dopost != 'save') { | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ else if ($dopost == 'save') { | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| if ($typeid == 0) { | |||
| ShowMsg("请指定文档的栏目!", "-1"); | |||
| @@ -83,15 +83,15 @@ function __save(){ } | |||
| if ($litpic_b64 != "") { | |||
| $data = explode(',', $litpic_b64); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| // 加水印 | |||
| WaterImg($cfg_basedir . $fullUrl, 'up'); | |||
| WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
| $litpic = $fullUrl; | |||
| } | |||
| //生成文档ID | |||
| @@ -124,15 +124,15 @@ function __save(){ } | |||
| } | |||
| ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); | |||
| } | |||
| $inadd_f .= ',' . $vs[0]; | |||
| $inadd_v .= " ,'" . ${$vs[0]} . "' "; | |||
| $inadd_f .= ','.$vs[0]; | |||
| $inadd_v .= " ,'".${$vs[0]}."' "; | |||
| } | |||
| } | |||
| } | |||
| //处理图片文档的自定义属性 | |||
| if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
| $flag = ($flag == '' ? 'p' : $flag . ',p'); | |||
| $flag = ($flag == '' ? 'p' : $flag.',p'); | |||
| } | |||
| //保存到附加表 | |||
| @@ -144,7 +144,7 @@ function __save(){ } | |||
| if (!$dsql->ExecuteNoneQuery($query)) { | |||
| $gerr = $dsql->GetError(); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
| ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||
| ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
| exit(); | |||
| } | |||
| } | |||
| @@ -152,7 +152,7 @@ function __save(){ } | |||
| //生成HTML | |||
| $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | |||
| if ($artUrl == '') { | |||
| $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; | |||
| $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
| } | |||
| ClearMyAddon($arcID, $title); | |||
| //返回成功信息 | |||
| @@ -162,7 +162,7 @@ function __save(){ } | |||
|    | |||
| <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||
|    | |||
| <a href='archives_do.php?aid=" . $arcID . "&dopost=editArchives' class='btn btn-success btn-sm'>更改文档</a> | |||
| <a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>更改文档</a> | |||
|    | |||
| <a href='content_sg_list.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> | |||
|    | |||
| @@ -9,16 +9,16 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
| require_once(DEDEINC . "/customfields.func.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); | |||
| require_once(DEDEINC."/customfields.func.php"); | |||
| require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if ($dopost != 'save') { | |||
| require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| ClearMyAddon(); | |||
| $aid = intval($aid); | |||
| @@ -42,8 +42,8 @@ if ($dopost != 'save') { | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ else if ($dopost == 'save') { | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| if ($typeid == 0) { | |||
| ShowMsg("请指定文档的栏目!", "-1"); | |||
| exit(); | |||
| @@ -81,15 +81,15 @@ function __save(){ } | |||
| if ($litpic_b64 != "") { | |||
| $data = explode(',', $litpic_b64); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| // 加水印 | |||
| WaterImg($cfg_basedir . $fullUrl, 'up'); | |||
| WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
| $litpic = $fullUrl; | |||
| } | |||
| //分析处理附加表数据 | |||
| @@ -114,14 +114,14 @@ function __save(){ } | |||
| } | |||
| ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); | |||
| } | |||
| $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; | |||
| $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; | |||
| } | |||
| } | |||
| } | |||
| //处理图片文档的自定义属性 | |||
| if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
| $flag = ($flag == '' ? 'p' : $flag . ',p'); | |||
| $flag = ($flag == '' ? 'p' : $flag.',p'); | |||
| } | |||
| $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
| @@ -137,7 +137,7 @@ function __save(){ } | |||
| //生成HTML | |||
| UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); | |||
| $artUrl = MakeArt($id, TRUE, TRUE, $isremote); | |||
| if ($artUrl == '') $artUrl = $cfg_phpurl . "/view.php?aid=$id"; | |||
| if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
| ClearMyAddon($id, $title); | |||
| //返回成功信息 | |||
| @@ -145,7 +145,7 @@ function __save(){ } | |||
| 请选择你的后续操作: | |||
| <a href='archives_sg_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布新文档</a> | |||
|    | |||
| <a href='archives_do.php?aid=" . $id . "&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||
| <a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||
|    | |||
| <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||
|    | |||
| @@ -9,18 +9,18 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| CheckPurview('a_New,a_AccNew'); | |||
| require_once(DEDEINC . '/customfields.func.php'); | |||
| require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); | |||
| if (file_exists(DEDEDATA . '/template.rand.php')) { | |||
| require_once(DEDEDATA . '/template.rand.php'); | |||
| require_once(DEDEINC.'/customfields.func.php'); | |||
| require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
| if (file_exists(DEDEDATA.'/template.rand.php')) { | |||
| require_once(DEDEDATA.'/template.rand.php'); | |||
| } | |||
| if (empty($dopost)) $dopost = ''; | |||
| if ($dopost != 'save') { | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
| ClearMyAddon(); | |||
| $channelid = empty($channelid) ? 0 : intval($channelid); | |||
| $cid = empty($cid) ? 0 : intval($cid); | |||
| @@ -32,7 +32,7 @@ if ($dopost != 'save') { | |||
| //采集单个网页 | |||
| if (preg_match("#^http:\/\/#", $geturl)) { | |||
| require_once(DEDEADMIN . "/inc/inc_coonepage.php"); | |||
| require_once(DEDEADMIN."/inc/inc_coonepage.php"); | |||
| $redatas = CoOnePage($geturl); | |||
| extract($redatas); | |||
| } | |||
| @@ -60,8 +60,8 @@ if ($dopost != 'save') { | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ else if ($dopost == 'save') { | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
| @@ -123,15 +123,15 @@ function __save(){ } | |||
| if ($litpic_b64 != "") { | |||
| $data = explode(',', $litpic_b64); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| // 加水印 | |||
| WaterImg($cfg_basedir . $fullUrl, 'up'); | |||
| WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
| $litpic = $fullUrl; | |||
| } | |||
| @@ -169,18 +169,18 @@ function __save(){ } | |||
| if (!isset(${$vs[0]})) ${$vs[0]} = ''; | |||
| ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); | |||
| } | |||
| $inadd_f .= ',' . $vs[0]; | |||
| $inadd_v .= " ,'" . ${$vs[0]} . "' "; | |||
| $inadd_f .= ','.$vs[0]; | |||
| $inadd_v .= " ,'".${$vs[0]}."' "; | |||
| } | |||
| } | |||
| } | |||
| //处理图片文档的自定义属性 | |||
| if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
| $flag = ($flag == '' ? 'p' : $flag . ',p'); | |||
| $flag = ($flag == '' ? 'p' : $flag.',p'); | |||
| } | |||
| if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
| $flag = ($flag == '' ? 'j' : $flag . ',j'); | |||
| $flag = ($flag == '' ? 'j' : $flag.',j'); | |||
| } | |||
| //跳转网址的文档强制为动态 | |||
| @@ -196,7 +196,7 @@ function __save(){ } | |||
| if (!$dsql->ExecuteNoneQuery($query)) { | |||
| $gerr = $dsql->GetError(); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
| ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||
| ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
| exit(); | |||
| } | |||
| @@ -216,7 +216,7 @@ function __save(){ } | |||
| $gerr = $dsql->GetError(); | |||
| $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); | |||
| $dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); | |||
| ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||
| ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
| exit(); | |||
| } | |||
| //生成HTML | |||
| @@ -225,7 +225,7 @@ function __save(){ } | |||
| if (count($_SESSION['bigfile_info']) > 0) { | |||
| foreach ($_SESSION['bigfile_info'] as $k => $v) { | |||
| if (!empty($v)) { | |||
| $pictitle = ${'picinfook' . $k}; | |||
| $pictitle = ${'picinfook'.$k}; | |||
| $titleSet = ''; | |||
| if (!empty($pictitle)) { | |||
| $picTitle = TRUE; | |||
| @@ -237,7 +237,7 @@ function __save(){ } | |||
| } | |||
| $artUrl = MakeArt($arcID, true, true, $isremote); | |||
| if ($artUrl == '') { | |||
| $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; | |||
| $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
| } | |||
| ClearMyAddon($arcID, $title); | |||
| @@ -259,13 +259,13 @@ function __save(){ } | |||
|    | |||
| <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> | |||
|    | |||
| <a href='archives_do.php?aid=" . $arcID . "&dopost=editArchives' class='btn btn-success btn-sm'>更改文章</a> | |||
| <a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>更改文章</a> | |||
|    | |||
| <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文章管理</a> | |||
|    | |||
| $backurl | |||
| "; | |||
| $msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>" . GetUpdateTest(); | |||
| $msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
| $wintitle = "成功发布文章!"; | |||
| $wecome_info = "文章管理::发布文章"; | |||
| $win = new OxWindow(); | |||
| @@ -9,14 +9,14 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC."/oxwindow.class.php"); | |||
| CheckPurview('sys_Source'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if (empty($allurls)) $allsource = ''; | |||
| else $allurls = stripslashes($allurls); | |||
| $m_file = DEDEDATA . "/admin/allowurl.txt"; | |||
| $m_file = DEDEDATA."/admin/allowurl.txt"; | |||
| //保存 | |||
| if ($dopost == 'save') { | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . "/datalistcp.class.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC."/datalistcp.class.php"); | |||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||
| if (empty($action)) $action = ''; | |||
| @@ -115,6 +115,6 @@ function _ShowLoad(){ } | |||
| $sql = ""; | |||
| $sql = "SELECT id,url,title,lang,issource FROM `#@__co_onepage` ORDER BY id DESC"; | |||
| $dlist = new DataListCP(); | |||
| $dlist->SetTemplate(DEDEADMIN . "/templets/article_coonepage_rule.htm"); | |||
| $dlist->SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm"); | |||
| $dlist->SetSource($sql); | |||
| $dlist->Display(); | |||
| @@ -11,7 +11,7 @@ | |||
| */ | |||
| @ob_start(); | |||
| @set_time_limit(3600); | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_Keyword'); | |||
| if (empty($dojob)) $dojob = ''; | |||
| if ($dojob == '') { | |||
| @@ -98,7 +98,7 @@ if ($dojob == '') { | |||
| //更新自动分页 | |||
| if ($dojob == 'page') { | |||
| require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); | |||
| require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
| $addquery = ""; | |||
| if ($sid != 0) { | |||
| @@ -119,7 +119,7 @@ if ($dojob == '') { | |||
| if ($totalnum > $startdd + $pagesize) { | |||
| $limitSql = " LIMIT $startdd,$pagesize"; | |||
| } else if (($totalnum - $startdd) > 0) { | |||
| $limitSql = " LIMIT $startdd," . ($totalnum - $startdd); | |||
| $limitSql = " LIMIT $startdd,".($totalnum - $startdd); | |||
| } else { | |||
| $limitSql = ""; | |||
| } | |||
| @@ -156,7 +156,7 @@ if ($dojob == '') { | |||
| $tjsta .= "<br/>完成处理文档总数的:$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}"; | |||
| $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 { | |||
| @@ -9,20 +9,20 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
| require_once(DEDEINC . "/customfields.func.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); | |||
| if (file_exists(DEDEDATA . '/template.rand.php')) { | |||
| require_once(DEDEDATA . '/template.rand.php'); | |||
| require_once(DEDEINC."/customfields.func.php"); | |||
| require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
| if (file_exists(DEDEDATA.'/template.rand.php')) { | |||
| require_once(DEDEDATA.'/template.rand.php'); | |||
| } | |||
| if (empty($dopost)) $dopost = ''; | |||
| $aid = isset($aid) && is_numeric($aid) ? $aid : 0; | |||
| if ($dopost != 'save') { | |||
| require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| ClearMyAddon(); | |||
| //读取归档信息 | |||
| @@ -35,7 +35,7 @@ if ($dopost != 'save') { | |||
| ShowMsg("读取档案基本信息出错!", "-1"); | |||
| exit(); | |||
| } | |||
| $query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; | |||
| $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||
| $cInfos = $dsql->GetOne($query); | |||
| if (!is_array($cInfos)) { | |||
| ShowMsg("读取频道配置信息出错!", "javascript:;"); | |||
| @@ -55,8 +55,8 @@ if ($dopost != 'save') { | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ else if ($dopost == 'save') { | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
| @@ -139,7 +139,7 @@ function __save(){ } | |||
| } | |||
| ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); | |||
| } | |||
| $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; | |||
| $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; | |||
| } | |||
| } | |||
| } | |||
| @@ -148,24 +148,24 @@ function __save(){ } | |||
| if ($litpic_b64 != "") { | |||
| $data = explode(',', $litpic_b64); | |||
| $ntime = time(); | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $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"; | |||
| $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])); | |||
| file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
| // 加水印 | |||
| WaterImg($cfg_basedir . $fullUrl, 'up'); | |||
| WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
| $litpic = $fullUrl; | |||
| } | |||
| //处理图片文档的自定义属性 | |||
| if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
| $flag = ($flag == '' ? 'p' : $flag . ',p'); | |||
| $flag = ($flag == '' ? 'p' : $flag.',p'); | |||
| } | |||
| if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
| $flag = ($flag == '' ? 'j' : $flag . ',j'); | |||
| $flag = ($flag == '' ? 'j' : $flag.',j'); | |||
| } | |||
| //跳转网址的文档强制为动态 | |||
| @@ -216,7 +216,7 @@ function __save(){ } | |||
| UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
| $artUrl = MakeArt($id, true, true, $isremote); | |||
| if ($artUrl == '') { | |||
| $artUrl = $cfg_phpurl . "/view.php?aid=$id"; | |||
| $artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
| } | |||
| ClearMyAddon($id, $title); | |||
| @@ -237,7 +237,7 @@ function __save(){ } | |||
| 请选择你的后续操作: | |||
| <a href='article_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布新文章</a> | |||
|    | |||
| <a href='archives_do.php?aid=" . $id . "&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||
| <a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||
|    | |||
| <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> | |||
|    | |||
| @@ -9,9 +9,9 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_Keyword'); | |||
| require_once(DEDEINC . "/datalistcp.class.php"); | |||
| require_once(DEDEINC."/datalistcp.class.php"); | |||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||
| if (empty($dopost)) $dopost = ''; | |||
| @@ -24,19 +24,19 @@ if ($dopost == 'saveall') { | |||
| exit(); | |||
| } | |||
| foreach ($aids as $aid) { | |||
| $rpurl = ${'rpurl_' . $aid}; | |||
| $rpurlold = ${'rpurlold_' . $aid}; | |||
| $keyword = ${'keyword_' . $aid}; | |||
| $rpurl = ${'rpurl_'.$aid}; | |||
| $rpurlold = ${'rpurlold_'.$aid}; | |||
| $keyword = ${'keyword_'.$aid}; | |||
| //删除项目 | |||
| if (!empty(${'isdel_' . $aid})) { | |||
| if (!empty(${'isdel_'.$aid})) { | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); | |||
| continue; | |||
| } | |||
| //禁用项目 | |||
| $staold = ${'staold_' . $aid}; | |||
| $sta = empty(${'isnouse_' . $aid}) ? 1 : 0; | |||
| $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); | |||
| @@ -82,7 +82,7 @@ $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->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); | |||
| $dlist->SetSource($sql); | |||
| $dlist->Display(); | |||
| @@ -11,7 +11,7 @@ | |||
| */ | |||
| @ob_start(); | |||
| @set_time_limit(3600); | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| CheckPurview('sys_Keyword'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| @@ -43,14 +43,14 @@ if ($dopost == 'analyse') { | |||
| continue; | |||
| } | |||
| if (isset($ws[$v])) { | |||
| $mykey .= $v . " "; | |||
| $mykey .= $v." "; | |||
| } else if (isset($wsnew[$v])) { | |||
| $mykey .= $v . ' '; | |||
| $mykey .= $v.' '; | |||
| $wsnew[$v]++; | |||
| } else if (isset($wserr[$v])) { | |||
| $nerr = true; | |||
| } else { | |||
| $mykey .= $v . " "; | |||
| $mykey .= $v." "; | |||
| $wsnew[$v] = 1; | |||
| } | |||
| } | |||
| @@ -68,7 +68,7 @@ if ($dopost == 'analyse') { | |||
| if (strlen($k) > 20) { | |||
| continue; | |||
| } | |||
| $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES('" . addslashes($k) . "','$v','1','')"); | |||
| $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); | |||
| $dsql->Execute(); | |||
| } | |||
| echo "完成关键字的导入!<br/>\r\n"; | |||
| @@ -84,7 +84,7 @@ if ($dopost == 'analyse') { | |||
| } | |||
| //自动获取关键字(适用于默认的文章模型) | |||
| else if ($dopost == 'fetch') { | |||
| require_once(DEDEINC . "/splitword.class.php"); | |||
| require_once(DEDEINC."/splitword.class.php"); | |||
| if (empty($startdd)) { | |||
| $startdd = 0; | |||
| } | |||
| @@ -105,7 +105,7 @@ else if ($dopost == 'fetch') { | |||
| if ($totalnum > $startdd + $pagesize) { | |||
| $limitSql = " LIMIT $startdd,$pagesize"; | |||
| } else if (($totalnum - $startdd) > 0) { | |||
| $limitSql = " LIMIT $startdd," . ($totalnum - $startdd); | |||
| $limitSql = " LIMIT $startdd,".($totalnum - $startdd); | |||
| } else { | |||
| $limitSql = ''; | |||
| } | |||
| @@ -127,7 +127,7 @@ else if ($dopost == 'fetch') { | |||
| $tjnum++; | |||
| $id = $row->id; | |||
| $keywords = ""; | |||
| $data = $client->Spliteword($row->title . Html2Text($row->body)); | |||
| $data = $client->Spliteword($row->title.Html2Text($row->body)); | |||
| $keywords = $data->data; | |||
| $keywords = addslashes($keywords); | |||
| if ($keywords == '') { | |||
| @@ -162,7 +162,7 @@ else if ($dopost == 'fetch') { | |||
| break; | |||
| } else { | |||
| if (strlen($k) <= 2) continue; | |||
| $keywords .= $k . ","; | |||
| $keywords .= $k.","; | |||
| } | |||
| } | |||
| foreach ($allindexs as $k => $v) { | |||
| @@ -170,7 +170,7 @@ else if ($dopost == 'fetch') { | |||
| break; | |||
| } else if (!in_array($k, $titleindexs)) { | |||
| if (strlen($k) <= 2) continue; | |||
| $keywords .= $k . ","; | |||
| $keywords .= $k.","; | |||
| } | |||
| } | |||
| } | |||
| @@ -194,7 +194,7 @@ else if ($dopost == 'fetch') { | |||
| $tjsta .= "<br/>完成处理文档总数的:$tjlen %,位置:{$startdd},继续执行任务..."; | |||
| if ($tjnum < $totalnum) { | |||
| $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=" . ($startdd + $pagesize) . "&pagesize=$pagesize"; | |||
| $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; | |||
| ShowMsg($tjsta, $nurl, 0, 500); | |||
| } else { | |||
| ShowMsg("完成所有任务!", "javascript:;"); | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . "/datalistcp.class.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC."/datalistcp.class.php"); | |||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||
| $f = RemoveXSS($f); | |||
| @@ -19,7 +19,7 @@ if (empty($keywords)) $keywords = ""; | |||
| $sql = "SELECT * FROM #@__keywords ORDER BY rank DESC"; | |||
| $dlist = new DataListCP(); | |||
| $dlist->SetTemplate(DEDEADMIN . "/templets/article_keywords_select.htm"); | |||
| $dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); | |||
| $dlist->pageSize = 300; | |||
| $dlist->SetParameter("f", $f); | |||
| $dlist->SetSource($sql); | |||
| @@ -7,14 +7,14 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require(dirname(__FILE__) . "/config.php"); | |||
| require(dirname(__FILE__)."/config.php"); | |||
| header("Pragma:no-cache"); | |||
| header("Cache-Control:no-cache"); | |||
| header("Expires:0"); | |||
| //来源列表 | |||
| if ($t == 'source') { | |||
| $m_file = DEDEDATA . "/admin/source.txt"; | |||
| $m_file = DEDEDATA."/admin/source.txt"; | |||
| $allsources = file($m_file); | |||
| echo "<div class='coolbg4'>[<a href=\"javascript:OpenMyWin('article_source_edit.php');ClearDivCt('mysource');\">设置</a>] "; | |||
| echo "[<a href='#' onclick='javascript:HideObj(\"mysource\");ChangeFullDiv(\"hide\");'>关闭</a>]</div>\r\n<div class='wsselect'>\r\n"; | |||
| @@ -27,7 +27,7 @@ if ($t == 'source') { | |||
| echo "</div><div class='coolbg5'> </div>"; | |||
| } else { | |||
| //作者列表 | |||
| $m_file = DEDEDATA . "/admin/writer.txt"; | |||
| $m_file = DEDEDATA."/admin/writer.txt"; | |||
| echo "<div class='coolbg4'>[<a href=\"javascript:OpenMyWin('article_writer_edit.php');ClearDivCt('mywriter');\">设置</a>] "; | |||
| echo "[<a href='#' onclick='javascript:HideObj(\"mywriter\");ChangeFullDiv(\"hide\");'>关闭</a>]</div>\r\n<div class='wsselect'>\r\n"; | |||
| if (filesize($m_file) > 0) { | |||
| @@ -9,14 +9,14 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC."/oxwindow.class.php"); | |||
| CheckPurview('sys_Source'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if (empty($allsource)) $allsource = ''; | |||
| else $allsource = stripslashes($allsource); | |||
| $m_file = DEDEDATA . "/admin/source.txt"; | |||
| $m_file = DEDEDATA."/admin/source.txt"; | |||
| //保存 | |||
| if ($dopost == 'save') { | |||
| @@ -9,15 +9,15 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| CheckPurview('sys_StringMix'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if (empty($allsource)) $allsource = ''; | |||
| else $allsource = stripslashes($allsource); | |||
| $m_file = DEDEDATA . "/downmix.data.php"; | |||
| $m_file = DEDEDATA."/downmix.data.php"; | |||
| //保存 | |||
| if ($dopost == "save") { | |||
| @@ -9,12 +9,12 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| CheckPurview('sys_StringMix'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| $templates = empty($templates) ? '' : stripslashes($templates); | |||
| $m_file = DEDEDATA . '/template.rand.php'; | |||
| $m_file = DEDEDATA.'/template.rand.php'; | |||
| //----------------------action | |||
| $okmsg = ''; | |||
| @@ -25,7 +25,7 @@ if ($dopost == 'save') { | |||
| flock($fp, 3); | |||
| fwrite($fp, $templates); | |||
| fclose($fp); | |||
| $okmsg = '成功保存配置信息 AT:(' . MyDate('H:i:s', time()) . ')'; | |||
| $okmsg = '成功保存配置信息 AT:('.MyDate('H:i:s', time()).')'; | |||
| } | |||
| //对旧文档进行随机模板处理 | |||
| else if ($dopost == 'makeold') { | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| @set_time_limit(0); | |||
| CheckPurview('sys_ArcBatch'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| @@ -29,8 +29,8 @@ if ($dopost == 'analyse') { | |||
| } | |||
| //删除选中的内容(只保留一条) | |||
| else if ($dopost == 'delsel') { | |||
| require_once(dirname(__FILE__) . "/../include/typelink.class.php"); | |||
| require_once(dirname(__FILE__) . "/inc/inc_batchup.php"); | |||
| 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}"); | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| AjaxHead(); | |||
| if (empty($t) || $cfg_check_title == 'N') exit; | |||
| @@ -9,15 +9,15 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| CheckPurview('sys_Writer'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if (empty($allwriter)) $allwriter = ''; | |||
| else $allwriter = stripslashes($allwriter); | |||
| $m_file = DEDEDATA . "/admin/writer.txt"; | |||
| $m_file = DEDEDATA."/admin/writer.txt"; | |||
| //保存 | |||
| if ($dopost == "save") { | |||
| @@ -9,12 +9,12 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| if (empty($do)) { | |||
| include DEDEADMIN . '/templets/baidunews.htm'; | |||
| include DEDEADMIN.'/templets/baidunews.htm'; | |||
| } else { | |||
| $baidunews = "<?xml version=\"1.0\" encoding=\"" . $cfg_soft_lang . "\" ?>\n"; | |||
| $baidunews = "<?xml version=\"1.0\" encoding=\"".$cfg_soft_lang."\" ?>\n"; | |||
| $baidunews .= "<document>\n"; | |||
| $baidunews .= "<webSite>$cfg_webname </webSite>\n"; | |||
| $baidunews .= "<webMaster>$cfg_adminemail </webMaster>\n"; | |||
| @@ -37,7 +37,7 @@ if (empty($do)) { | |||
| $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']; | |||
| $link = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$row1['arcurl']; | |||
| } else { | |||
| $link = $row1['arcurl']; | |||
| } | |||
| @@ -46,7 +46,7 @@ if (empty($do)) { | |||
| $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; | |||
| $image = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$image; | |||
| } | |||
| //$headlineimg = ''; | |||
| $keywords = dede_htmlspecialchars($row['keywords']); | |||
| @@ -71,7 +71,7 @@ if (empty($do)) { | |||
| } | |||
| $baidunews .= "</document>\n"; | |||
| $fp = fopen(dirname(__FILE__) . '/' . $filename, 'w'); | |||
| $fp = fopen(dirname(__FILE__).'/'.$filename, 'w'); | |||
| fwrite($fp, $baidunews); | |||
| fclose($fp); | |||
| showmsg("<a href='{$filename}' target=\"_blank\">{$filename} make success</a>", 'javascript:;'); | |||
| @@ -9,10 +9,10 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('member_Card'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if ($dopost == '') include(DEDEADMIN . "/templets/cards_make.htm"); | |||
| if ($dopost == '') include(DEDEADMIN."/templets/cards_make.htm"); | |||
| //生成点卡 | |||
| elseif ($dopost == 'make') { | |||
| @@ -30,7 +30,7 @@ elseif ($dopost == 'make') { | |||
| header("Content-Type: text/html; charset={$cfg_soft_lang}"); | |||
| for (; $startid < $endid; $startid++) { | |||
| $cardid = $snprefix . $startid . '-'; | |||
| $cardid = $snprefix.$startid.'-'; | |||
| for ($p = 0; $p < $pwdgr; $p++) { | |||
| for ($i = 0; $i < $pwdlen; $i++) { | |||
| if ($ctype == 1) { | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . '/datalistcp.class.php'); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC.'/datalistcp.class.php'); | |||
| $dopost = empty($dopost) ? "" : $dopost; | |||
| if ($dopost == "delete") { | |||
| $ids = explode('`', $aids); | |||
| @@ -19,7 +19,7 @@ if ($dopost == "delete") { | |||
| if ($dquery == "") $dquery .= "aid='$id' "; | |||
| else $dquery .= " OR aid='$id' "; | |||
| } | |||
| if ($dquery != "") $dquery = " WHERE " . $dquery; | |||
| if ($dquery != "") $dquery = " WHERE ".$dquery; | |||
| $dsql->ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); | |||
| ShowMsg("成功删除指定的记录!", "cards_manage.php"); | |||
| exit(); | |||
| @@ -37,7 +37,7 @@ if ($dopost == "delete") { | |||
| while ($rw = $dlist->dsql->GetArray('ts')) { | |||
| $TypeNames[$rw['tid']] = $rw['pname']; | |||
| } | |||
| $tplfile = DEDEADMIN . "/templets/cards_manmage.htm"; | |||
| $tplfile = DEDEADMIN."/templets/cards_manmage.htm"; | |||
| //这两句的顺序不能更换 | |||
| $dlist->SetTemplate($tplfile); //载入模板 | |||
| @@ -50,7 +50,7 @@ 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 "<a href='member_view.php?mid={$mid}'>" . $row['userid'] . "</a>"; | |||
| if (is_array($row)) return "<a href='member_view.php?mid={$mid}'>".$row['userid']."</a>"; | |||
| else return '0'; | |||
| } | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| CheckPurview('member_Type'); | |||
| if (empty($dopost)) $dopost = ""; | |||
| @@ -19,11 +19,11 @@ if ($dopost == "save") { | |||
| $endID = $idend; | |||
| for (; $startID <= $endID; $startID++) { | |||
| $query = ''; | |||
| $tid = ${'ID_' . $startID}; | |||
| $pname = ${'pname_' . $startID}; | |||
| $money = ${'money_' . $startID}; | |||
| $num = ${'num_' . $startID}; | |||
| if (isset(${'check_' . $startID})) { | |||
| $tid = ${'ID_'.$startID}; | |||
| $pname = ${'pname_'.$startID}; | |||
| $money = ${'money_'.$startID}; | |||
| $num = ${'num_'.$startID}; | |||
| if (isset(${'check_'.$startID})) { | |||
| if ($pname != '') { | |||
| $query = "UPDATE #@__moneycard_type SET pname='$pname',money='$money',num='$num' WHERE tid='$tid'"; | |||
| $dsql->ExecuteNoneQuery($query); | |||
| @@ -46,4 +46,4 @@ if ($dopost == "save") { | |||
| header("Content-Type: text/html; charset={$cfg_soft_lang}"); | |||
| echo "<script> alert('成功更新点卡产品分类表!'); </script>"; | |||
| } | |||
| require_once(DEDEADMIN . "/templets/cards_type.htm"); | |||
| require_once(DEDEADMIN."/templets/cards_type.htm"); | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . "/typelink.class.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC."/typelink.class.php"); | |||
| if (empty($listtype)) $listtype = ''; | |||
| if (empty($dopost)) $dopost = ''; | |||
| @@ -67,11 +67,11 @@ function action_savequick(){ } | |||
| } else { | |||
| continue; | |||
| } | |||
| $rank = ${'rank' . $k}; | |||
| $toptypename = trim(${'toptype' . $k}); | |||
| $sontype = trim(${'sontype' . $k}); | |||
| $rank = ${'rank'.$k}; | |||
| $toptypename = trim(${'toptype'.$k}); | |||
| $sontype = trim(${'sontype'.$k}); | |||
| $toptypedir = GetPinyin(stripslashes($toptypename)); | |||
| $toptypedir = $referpath == 'parent' ? $nextdir . '/' . $toptypedir : '/' . $toptypedir; | |||
| $toptypedir = $referpath == 'parent' ? $nextdir.'/'.$toptypedir : '/'.$toptypedir; | |||
| if (empty($toptypename)) { | |||
| continue; | |||
| } | |||
| @@ -89,7 +89,7 @@ function action_savequick(){ } | |||
| if ($v == '') { | |||
| continue; | |||
| } | |||
| $typedir = $toptypedir . '/' . GetPinyin(stripslashes($v)); | |||
| $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v)); | |||
| $sql = str_replace('~reid~', $tid, $queryTemplate); | |||
| $sql = str_replace('~topid~', $tid, $sql); | |||
| $sql = str_replace('~rank~', $k, $sql); | |||
| @@ -109,18 +109,18 @@ function action_savequick(){ } | |||
| } else { | |||
| continue; | |||
| } | |||
| $rank = ${'rank' . $k}; | |||
| $toptypename = trim(${'reltype' . $k}); | |||
| $rank = ${'rank'.$k}; | |||
| $toptypename = trim(${'reltype'.$k}); | |||
| $toptypedir = GetPinyin(stripslashes($toptypename)); | |||
| switch ($referpath) { | |||
| case 'parent': | |||
| $toptypedir = $nextdir . '/' . $toptypedir; | |||
| $toptypedir = $nextdir.'/'.$toptypedir; | |||
| break; | |||
| case 'typepath': | |||
| $toptypedir = isset($row['typedir']) ? $row['typedir'] . '/' . $toptypedir : '/' . $toptypedir; | |||
| $toptypedir = isset($row['typedir']) ? $row['typedir'].'/'.$toptypedir : '/'.$toptypedir; | |||
| break; | |||
| default: | |||
| $toptypedir = '/' . $toptypedir; | |||
| $toptypedir = '/'.$toptypedir; | |||
| break; | |||
| } | |||
| @@ -161,7 +161,7 @@ function action_save(){ } | |||
| if ($upinyin == 1 || $typedir == '') { | |||
| $typedir = GetPinyin(stripslashes($typename)); | |||
| } | |||
| $typedir = $nextdir . '/' . $typedir; | |||
| $typedir = $nextdir.'/'.$typedir; | |||
| $typedir = preg_replace("#\/{1,}#", "/", $typedir); | |||
| } | |||
| @@ -176,7 +176,7 @@ function action_save(){ } | |||
| ShowMsg("你绑定的二级域名无效,请用(http://host)的形式!", "-1"); | |||
| exit(); | |||
| } | |||
| if (preg_match("#" . $cfg_basehost . "#i", $siteurl)) { | |||
| if (preg_match("#".$cfg_basehost."#i", $siteurl)) { | |||
| ShowMsg("你绑定的二级域名与当前站点是同一个域,不需要绑定!", "-1"); | |||
| exit(); | |||
| } | |||
| @@ -9,12 +9,12 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| //检查权限许可 | |||
| CheckPurview('t_Del,t_AccDel'); | |||
| require_once(DEDEINC . '/typeunit.class.admin.php'); | |||
| require_once(DEDEINC . '/oxwindow.class.php'); | |||
| require_once(DEDEINC.'/typeunit.class.admin.php'); | |||
| require_once(DEDEINC.'/oxwindow.class.php'); | |||
| $id = trim(preg_replace("#[^0-9]#", '', $id)); | |||
| //检查栏目操作许可 | |||
| @@ -27,7 +27,7 @@ if ($dopost == 'ok') { | |||
| ShowMsg("成功删除一个栏目!", "catalog_main.php"); | |||
| exit(); | |||
| } | |||
| $dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=" . $id); | |||
| $dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); | |||
| $row = $dsql->GetOne(); | |||
| $wintitle = "删除栏目确认"; | |||
| $wecome_info = "<a href='catalog_main.php'>栏目管理</a> >> 删除栏目确认"; | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| if (empty($dopost)) { | |||
| ShowMsg("对不起,请指定栏目参数!", "catalog_main.php"); | |||
| exit(); | |||
| @@ -83,14 +83,14 @@ function listArchives(); | |||
| //浏览通用模板目录 | |||
| function viewTempletDir(); | |||
| ---------------------------*/ else if ($dopost == "viewTemplet") { | |||
| header("location:tpl.php?path=/" . $cfg_df_style); | |||
| header("location:tpl.php?path=/".$cfg_df_style); | |||
| exit(); | |||
| } | |||
| /*------------------------ | |||
| 浏览单个页面的栏目 | |||
| function ViewSgPage() | |||
| ------------------------*/ else if ($dopost == "viewSgPage") { | |||
| require_once(DEDEINC . "/arc.listview.class.php"); | |||
| require_once(DEDEINC."/arc.listview.class.php"); | |||
| $lv = new ListView($cid); | |||
| $pageurl = $lv->MakeHtml(); | |||
| ShowMsg("更新缓冲,请稍后...", $pageurl); | |||
| @@ -123,8 +123,8 @@ function upRank() | |||
| 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}';"); | |||
| if (isset(${'sortrank'.$i})) { | |||
| $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='".(${'sortrank'.$i})."' WHERE id='{$i}';"); | |||
| } | |||
| } | |||
| } | |||
| @@ -175,7 +175,7 @@ function GetJs | |||
| function GetSunListsMenu(); | |||
| -----------*/ else if ($dopost == "GetSunListsMenu") { | |||
| $userChannel = $cuserLogin->getUserChannel(); | |||
| require_once(DEDEINC . "/typeunit.class.menu.php"); | |||
| require_once(DEDEINC."/typeunit.class.menu.php"); | |||
| AjaxHead(); | |||
| PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); | |||
| $tu = new TypeUnit($userChannel); | |||
| @@ -185,7 +185,7 @@ function GetSunListsMenu(); | |||
| 获得子类的内容 | |||
| function GetSunLists(); | |||
| -----------*/ else if ($dopost == "GetSunLists") { | |||
| require_once(DEDEINC . "/typeunit.class.admin.php"); | |||
| require_once(DEDEINC."/typeunit.class.admin.php"); | |||
| AjaxHead(); | |||
| PutCookie('lastCid', $cid, 3600 * 24, "/"); | |||
| $tu = new TypeUnit(); | |||
| @@ -200,9 +200,9 @@ function GetSunLists(); | |||
| 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'); | |||
| 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' "); | |||
| @@ -258,9 +258,9 @@ function unitCatalog() { } | |||
| 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'); | |||
| 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']; | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . "/typelink.class.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC."/typelink.class.php"); | |||
| if (empty($dopost)) $dopost = ''; | |||
| $id = isset($id) ? intval($id) : 0; | |||
| @@ -71,7 +71,7 @@ if ($dopost == "save") { | |||
| if ($topid > 0 && $issend == 1) { | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | |||
| } | |||
| $slinks = " id IN (" . GetSonIds($id) . ")"; | |||
| $slinks = " id IN (".GetSonIds($id).")"; | |||
| //修改顶级栏目时强制修改下级的多站点支持属性 | |||
| if ($topid == 0 && preg_match("#,#", $slinks)) { | |||
| @@ -103,7 +103,7 @@ if ($dopost == "save") { | |||
| } //End Save Action | |||
| else if ($dopost == "savetime") { | |||
| $uptopsql = ''; | |||
| $slinks = " id IN (" . GetSonIds($id) . ")"; | |||
| $slinks = " id IN (".GetSonIds($id).")"; | |||
| //顶级栏目二级域名根目录处理 | |||
| if ($topid == 0 && $moresite == 1) { | |||
| @@ -219,9 +219,9 @@ if ($dopost == 'time') { | |||
| $dsql->Execute(); | |||
| while ($row = $dsql->GetObject()) { | |||
| if ($myrow['corank'] == $row->rank) | |||
| echo "<option value='" . $row->rank . "' selected>" . $row->membername . "</option>\r\n"; | |||
| echo "<option value='".$row->rank."' selected>".$row->membername."</option>\r\n"; | |||
| else | |||
| echo "<option value='" . $row->rank . "'>" . $row->membername . "</option>\r\n"; | |||
| echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n"; | |||
| } | |||
| ?> | |||
| </select> | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . "/typeunit.class.admin.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC."/typeunit.class.admin.php"); | |||
| $userChannel = $cuserLogin->getUserChannel(); | |||
| include DedeInclude('templets/catalog_main.htm'); | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . "/typeunit.class.menu.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC."/typeunit.class.menu.php"); | |||
| $userChannel = $cuserLogin->getUserChannel(); | |||
| if (empty($opendir)) $opendir = -1; | |||
| if ($userChannel > 0) $opendir = $userChannel; | |||
| @@ -10,15 +10,15 @@ | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| define('DEDEADMIN', str_replace("\\", '/', dirname(__FILE__))); | |||
| require_once(DEDEADMIN . '/../include/common.inc.php'); | |||
| require_once(DEDEINC . '/userlogin.class.php'); | |||
| require_once(DEDEADMIN.'/../include/common.inc.php'); | |||
| require_once(DEDEINC.'/userlogin.class.php'); | |||
| header('Cache-Control:private'); | |||
| $dsql->safeCheck = FALSE; | |||
| $dsql->SetLongLink(); | |||
| $cfg_admin_skin = 1; // 后台管理风格 | |||
| if (file_exists(DEDEDATA . '/admin/skin.txt')) { | |||
| $skin = file_get_contents(DEDEDATA . '/admin/skin.txt'); | |||
| if (file_exists(DEDEDATA.'/admin/skin.txt')) { | |||
| $skin = file_get_contents(DEDEDATA.'/admin/skin.txt'); | |||
| $cfg_admin_skin = !in_array($skin, array(1, 2, 3, 4)) ? 1 : $skin; | |||
| } | |||
| @@ -69,9 +69,9 @@ $cuserLogin = new userLogin(); | |||
| if ($cuserLogin->getUserID() == -1) { | |||
| if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { | |||
| $dirname = dirname($_SERVER['SCRIPT_NAME']); | |||
| header("location:{$dirname}/login.php?gotopage=" . urlencode($dedeNowurl)); | |||
| header("location:{$dirname}/login.php?gotopage=".urlencode($dedeNowurl)); | |||
| } else { | |||
| header("location:login.php?gotopage=" . urlencode($dedeNowurl)); | |||
| header("location:login.php?gotopage=".urlencode($dedeNowurl)); | |||
| } | |||
| exit(); | |||
| } | |||
| @@ -96,21 +96,21 @@ if ($cfg_dede_log == 'Y') { | |||
| $s_scriptNames = explode('/', $s_scriptName); | |||
| $s_scriptNames = $s_scriptNames[count($s_scriptNames) - 1]; | |||
| $s_userip = GetIP(); | |||
| if ($s_method == 'POST' || (!preg_match("#" . $s_nologfile . "#i", $s_scriptNames) && $s_query != '') || preg_match("#" . $s_needlogfile . "#i", $s_scriptNames)) { | |||
| if ($s_method == 'POST' || (!preg_match("#".$s_nologfile."#i", $s_scriptNames) && $s_query != '') || preg_match("#".$s_needlogfile."#i", $s_scriptNames)) { | |||
| $inquery = "INSERT INTO `#@__log`(adminid,filename,method,query,cip,dtime) | |||
| VALUES ('" . $cuserLogin->getUserID() . "','{$s_scriptNames}','{$s_method}','" . addslashes($s_query) . "','{$s_userip}','" . time() . "');"; | |||
| VALUES ('".$cuserLogin->getUserID()."','{$s_scriptNames}','{$s_method}','".addslashes($s_query)."','{$s_userip}','".time()."');"; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| } | |||
| } | |||
| //管理缓存、管理员频道缓存 | |||
| $cache1 = DEDEDATA . '/cache/inc_catalog_base.inc'; | |||
| $cache1 = DEDEDATA.'/cache/inc_catalog_base.inc'; | |||
| if (!file_exists($cache1)) UpDateCatCache(); | |||
| $cacheFile = DEDEDATA . '/cache/admincat_' . $cuserLogin->userID . '.inc'; | |||
| $cacheFile = DEDEDATA.'/cache/admincat_'.$cuserLogin->userID.'.inc'; | |||
| if (file_exists($cacheFile)) require_once($cacheFile); | |||
| //更新服务器 | |||
| require_once(DEDEDATA . '/admin/config_update.php'); | |||
| require_once(DEDEDATA.'/admin/config_update.php'); | |||
| if (strlen($cfg_cookie_encode) <= 10) { | |||
| $chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; | |||
| @@ -121,25 +121,25 @@ if (strlen($cfg_cookie_encode) <= 10) { | |||
| $hash .= $chars[mt_rand(0, $max)]; | |||
| } | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='{$hash}' WHERE varname='cfg_cookie_encode' "); | |||
| $configfile = DEDEDATA . '/config.cache.inc.php'; | |||
| $configfile = DEDEDATA.'/config.cache.inc.php'; | |||
| if (!is_writeable($configfile)) { | |||
| echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数!"; | |||
| exit(); | |||
| } | |||
| $fp = fopen($configfile, 'w'); | |||
| flock($fp, 3); | |||
| fwrite($fp, "<" . "?php\r\n"); | |||
| fwrite($fp, "<"."?php\r\n"); | |||
| $dsql->SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); | |||
| $dsql->Execute(); | |||
| while ($row = $dsql->GetArray()) { | |||
| if ($row['type'] == 'number') { | |||
| if ($row['value'] == '') $row['value'] = 0; | |||
| fwrite($fp, "\${$row['varname']} = " . $row['value'] . ";\r\n"); | |||
| fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n"); | |||
| } else { | |||
| fwrite($fp, "\${$row['varname']} = '" . str_replace("'", '', $row['value']) . "';\r\n"); | |||
| fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n"); | |||
| } | |||
| } | |||
| fwrite($fp, "?" . ">"); | |||
| fwrite($fp, "?".">"); | |||
| fclose($fp); | |||
| } | |||
| @@ -152,8 +152,8 @@ if (strlen($cfg_cookie_encode) <= 10) { | |||
| function UpDateCatCache() | |||
| { | |||
| global $dsql, $cache1, $cuserLogin; | |||
| $cache2 = DEDEDATA . '/cache/channelsonlist.inc'; | |||
| $cache3 = DEDEDATA . '/cache/channeltoplist.inc'; | |||
| $cache2 = DEDEDATA.'/cache/channelsonlist.inc'; | |||
| $cache3 = DEDEDATA.'/cache/channeltoplist.inc'; | |||
| $dsql->SetQuery("SELECT id,reid,channeltype,issend,typename FROM `#@__arctype`"); | |||
| $dsql->Execute(); | |||
| $fp1 = fopen($cache1, 'w'); | |||
| @@ -175,8 +175,8 @@ function UpDateCatCache() | |||
| // 清空选项缓存 | |||
| function ClearOptCache() | |||
| { | |||
| $tplCache = DEDEDATA . '/tplcache/'; | |||
| $fileArray = glob($tplCache . "inc_option_*.inc"); | |||
| $tplCache = DEDEDATA.'/tplcache/'; | |||
| $fileArray = glob($tplCache."inc_option_*.inc"); | |||
| if (count($fileArray) > 1) { | |||
| foreach ($fileArray as $key => $value) { | |||
| if (file_exists($value)) unlink($value); | |||
| @@ -197,7 +197,7 @@ function ClearOptCache() | |||
| */ | |||
| function DedeInclude($filename, $isabs = FALSE) | |||
| { | |||
| return $isabs ? $filename : DEDEADMIN . '/' . $filename; | |||
| return $isabs ? $filename : DEDEADMIN.'/'.$filename; | |||
| } | |||
| /** | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_Att'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| @@ -18,9 +18,9 @@ if ($dopost == "save") { | |||
| $startID = 1; | |||
| $endID = $idend; | |||
| for (; $startID <= $endID; $startID++) { | |||
| $att = ${'att_' . $startID}; | |||
| $attname = ${'attname_' . $startID}; | |||
| $sortid = ${'sortid_' . $startID}; | |||
| $att = ${'att_'.$startID}; | |||
| $attname = ${'attname_'.$startID}; | |||
| $sortid = ${'sortid_'.$startID}; | |||
| $query = "UPDATE `#@__arcatt` SET `attname`='$attname',`sortid`='$sortid' WHERE att='$att' "; | |||
| $dsql->ExecuteNoneQuery($query); | |||
| } | |||
| @@ -9,6 +9,6 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(DEDEINC . '/typelink.class.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| require_once(DEDEINC.'/typelink.class.php'); | |||
| include DedeInclude('templets/content_batch_up.htm'); | |||
| @@ -9,10 +9,10 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_ArcBatch'); | |||
| require_once(DEDEINC . "/typelink.class.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_batchup.php"); | |||
| require_once(DEDEINC."/typelink.class.php"); | |||
| require_once(DEDEADMIN."/inc/inc_batchup.php"); | |||
| @set_time_limit(0); | |||
| //typeid,startid,endid,seltime,starttime,endtime,action,newtypeid | |||
| @@ -29,7 +29,7 @@ if (empty($userid)) $userid = ''; | |||
| if ($action == "makehtml") { | |||
| $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | |||
| $jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; | |||
| $jumpurl .= "&stime=" . urlencode($starttime) . "&etime=" . urlencode($endtime); | |||
| $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); | |||
| header("Location: $jumpurl"); | |||
| exit(); | |||
| } | |||
| @@ -65,7 +65,7 @@ if ($action == 'check') { | |||
| } | |||
| $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | |||
| $jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; | |||
| $jumpurl .= "&stime=" . urlencode($starttime) . "&etime=" . urlencode($endtime); | |||
| $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); | |||
| $dsql->SetQuery("SELECT id,arcrank FROM `#@__arctiny` $gwhere"); | |||
| $dsql->Execute('c'); | |||
| while ($row = $dsql->GetObject('c')) { | |||
| @@ -140,7 +140,7 @@ else if ($action == 'move') { | |||
| ShowMsg("不能把数据移动到内容类型不同的栏目!", "javascript:;"); | |||
| exit(); | |||
| } | |||
| $gwhere .= " And channel='" . $typenew['channeltype'] . "' And title like '%$keyword%'"; | |||
| $gwhere .= " And channel='".$typenew['channeltype']."' And title like '%$keyword%'"; | |||
| $ch = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id={$typenew['channeltype']} "); | |||
| $addtable = $ch['addtable']; | |||
| @@ -161,7 +161,7 @@ else if ($action == 'move') { | |||
| 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); | |||
| $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); | |||
| ShowMsg("成功移动 $tdd 条记录,准备重新生成HTML...", $jumpurl); | |||
| } else { | |||
| ShowMsg("完成操作,没移动任何数据...", "javascript:;"); | |||
| @@ -10,4 +10,4 @@ | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| $s_tmplets = "templets/content_i_list.htm"; | |||
| include(dirname(__FILE__) . "/content_list.php"); | |||
| include(dirname(__FILE__)."/content_list.php"); | |||
| @@ -11,10 +11,10 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(DEDEINC . '/typelink.class.php'); | |||
| require_once(DEDEINC . '/datalistcp.class.php'); | |||
| require_once(DEDEADMIN . '/inc/inc_list_functions.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| require_once(DEDEINC.'/typelink.class.php'); | |||
| require_once(DEDEINC.'/datalistcp.class.php'); | |||
| require_once(DEDEADMIN.'/inc/inc_list_functions.php'); | |||
| $cid = isset($cid) ? intval($cid) : 0; | |||
| $channelid = isset($channelid) ? intval($channelid) : 0; | |||
| @@ -76,11 +76,11 @@ if (empty($totalresult) && empty($keyword) && empty($orderby) && empty($flag)) { | |||
| } | |||
| if (!empty($cid)) { | |||
| $tinyQuerys[] = " typeid in(" . GetSonIds($cid) . ") "; | |||
| $tinyQuerys[] = " typeid in(".GetSonIds($cid).") "; | |||
| } | |||
| if (count($tinyQuerys) > 0) { | |||
| $tinyQuery = "WHERE " . join(' AND ', $tinyQuerys); | |||
| $tinyQuery = "WHERE ".join(' AND ', $tinyQuerys); | |||
| } | |||
| // 缓存处理 | |||
| $sql = "SELECT COUNT(*) AS dd FROM `#@__arctiny` $tinyQuery "; | |||
| @@ -93,12 +93,12 @@ if ($cid == 0) { | |||
| $positionname = '所有栏目>'; | |||
| } else { | |||
| $row = $tl->dsql->GetOne("SELECT id,typename,maintable FROM `#@__channeltype` WHERE id='$channelid'"); | |||
| $positionname = $row['typename'] . " > "; | |||
| $positionname = $row['typename']." > "; | |||
| $maintable = $row['maintable']; | |||
| $channelid = $row['id']; | |||
| } | |||
| } else { | |||
| $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName()) . " > "; | |||
| $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; | |||
| } | |||
| //当选择的是单表模型栏目时,直接跳转到单表模型管理区 | |||
| @@ -115,8 +115,8 @@ if ($channelid < -1) { | |||
| // 栏目大于800则需要缓存数据 | |||
| $optHash = md5($cid . serialize($admin_catalogs) . $channelid); | |||
| $optCache = DEDEDATA . "/tplcache/inc_option_$optHash.inc"; | |||
| $optHash = md5($cid.serialize($admin_catalogs).$channelid); | |||
| $optCache = DEDEDATA."/tplcache/inc_option_$optHash.inc"; | |||
| $typeCount = 0; | |||
| if (file_exists($cache1)) require_once($cache1); | |||
| @@ -143,7 +143,7 @@ while ($frow = $dsql->GetArray('f')) { | |||
| if (!empty($userCatalogSql)) { | |||
| $whereSql .= " AND " . $userCatalogSql; | |||
| $whereSql .= " AND ".$userCatalogSql; | |||
| } | |||
| if (!empty($mid)) { | |||
| $whereSql .= " AND arc.mid = '$mid' "; | |||
| @@ -155,17 +155,17 @@ if ($flag != '') { | |||
| $whereSql .= " AND FIND_IN_SET('$flag', arc.flag) "; | |||
| } | |||
| if ($cid != 0) { | |||
| $whereSql .= ' AND arc.typeid IN (' . GetSonIds($cid) . ')'; | |||
| $whereSql .= ' AND arc.typeid IN ('.GetSonIds($cid).')'; | |||
| } | |||
| if ($arcrank != '') { | |||
| $whereSql .= " AND arc.arcrank = '$arcrank' "; | |||
| $CheckUserSend = "<button type='button' class='btn btn-success btn-sm' onClick=\"location='catalog_do.php?cid=" . $cid . "&dopost=listArchives&gurl=content_list.php';\">所有文档</button>"; | |||
| $CheckUserSend = "<button type='button' class='btn btn-success btn-sm' onClick=\"location='catalog_do.php?cid=".$cid."&dopost=listArchives&gurl=content_list.php';\">所有文档</button>"; | |||
| } else { | |||
| $CheckUserSend = "<button type='button' class='btn btn-success btn-sm' onClick=\"location='catalog_do.php?cid=" . $cid . "&dopost=listArchives&arcrank=-1&gurl=content_list.php';\">稿件审核</button>"; | |||
| $CheckUserSend = "<button type='button' class='btn btn-success btn-sm' onClick=\"location='catalog_do.php?cid=".$cid."&dopost=listArchives&arcrank=-1&gurl=content_list.php';\">稿件审核</button>"; | |||
| } | |||
| $orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby); | |||
| $orderbyField = 'arc.' . $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 | |||
| @@ -192,7 +192,7 @@ $dlist->SetParameter('f', $f); | |||
| //模板 | |||
| if (empty($s_tmplets)) $s_tmplets = 'templets/content_list.htm'; | |||
| $dlist->SetTemplate(DEDEADMIN . '/' . $s_tmplets); | |||
| $dlist->SetTemplate(DEDEADMIN.'/'.$s_tmplets); | |||
| //查询 | |||
| $dlist->SetSource($query); | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('spec_List'); | |||
| $s_tmplets = "templets/content_s_list.htm"; | |||
| $channelid = -1; | |||
| include(dirname(__FILE__) . "/content_list.php"); | |||
| include(dirname(__FILE__)."/content_list.php"); | |||
| @@ -10,4 +10,4 @@ | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| $s_tmplets = "templets/content_select_list.htm"; | |||
| include(dirname(__FILE__) . "/content_list.php"); | |||
| include(dirname(__FILE__)."/content_list.php"); | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| $cid = isset($cid) ? intval($cid) : 0; | |||
| $channelid = isset($channelid) ? intval($channelid) : 0; | |||
| $mid = isset($mid) ? intval($mid) : 0; | |||
| @@ -36,9 +36,9 @@ if (TestPurview('a_List')) { | |||
| $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"); | |||
| 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']); | |||
| @@ -49,10 +49,10 @@ if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $cha | |||
| if ($cid == 0) { | |||
| $row = $tl->dsql->GetOne("SELECT typename,addtable FROM `#@__channeltype` WHERE id='$channelid'"); | |||
| $positionname = $row['typename'] . " > "; | |||
| $positionname = $row['typename']." > "; | |||
| $listtable = $row['addtable']; | |||
| } else { | |||
| $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName()) . " > "; | |||
| $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; | |||
| } | |||
| $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); | |||
| @@ -60,7 +60,7 @@ $whereSql = $channelid == 0 ? " WHERE arc.channel < -1 " : " WHERE arc.channel = | |||
| 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 ($cid != 0) $whereSql .= " AND arc.typeid in (".GetSonIds($cid).")"; | |||
| if ($arcrank != '') { | |||
| $whereSql .= " AND arc.arcrank = '$arcrank' "; | |||
| @@ -81,7 +81,7 @@ $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->SetTemplate(DEDEADMIN."/templets/content_sg_list.htm"); | |||
| $dlist->SetSource($query); | |||
| $dlist->Display(); | |||
| $dlist->Close(); | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_ArcTj'); | |||
| $row1 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); | |||
| $row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` "); | |||
| @@ -40,12 +40,12 @@ function GetArchives($dsql, $ordertype) | |||
| $dsql->Execute('ga'); | |||
| while ($row = $dsql->GetObject('ga')) { | |||
| if (preg_match("#feedback#i", $ordertype)) { | |||
| $moreinfo = "[<a target='_blank' href='" . $GLOBALS['cfg_phpurl'] . "/feedback.php?aid={$row->id}'><u>评论:{$row->scores}</u></a>]"; | |||
| $moreinfo = "[<a target='_blank' href='".$GLOBALS['cfg_phpurl']."/feedback.php?aid={$row->id}'><u>评论:{$row->scores}</u></a>]"; | |||
| } else { | |||
| $moreinfo = "[点击:{$row->click}]"; | |||
| } | |||
| echo "·<a href='archives_do.php?aid={$row->id}&dopost=viewArchives' target='_blank'>"; | |||
| echo cn_substr($row->title, 30) . "</a>{$moreinfo}<br/>\r\n"; | |||
| echo cn_substr($row->title, 30)."</a>{$moreinfo}<br/>\r\n"; | |||
| } | |||
| } | |||
| include DedeInclude('templets/content_tj.htm'); | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/../../include/common.inc.php"); | |||
| require_once(DEDEINC . "/userlogin.class.php"); | |||
| require_once(dirname(__FILE__)."/../../include/common.inc.php"); | |||
| require_once(DEDEINC."/userlogin.class.php"); | |||
| //获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 | |||
| $dedeNowurl = ''; | |||
| @@ -27,11 +27,11 @@ $cuserLogin = new userLogin(); | |||
| if ($cuserLogin->getUserID() <= 0) { | |||
| if (empty($adminDirHand)) { | |||
| ShowMsg("<b>提示:需输入后台管理目录才能登录</b><br /><form>请输入后台管理目录名:<input type='hidden' name='gotopage' value='" . urlencode($dedeNowurl) . "' /><input type='text' name='adminDirHand' value='dede' style='width:120px;' /><input style='width:80px;' type='submit' name='sbt' value='转入登录' /></form>", "javascript:;"); | |||
| ShowMsg("<b>提示:需输入后台管理目录才能登录</b><br /><form>请输入后台管理目录名:<input type='hidden' name='gotopage' value='".urlencode($dedeNowurl)."' /><input type='text' name='adminDirHand' value='dede' style='width:120px;' /><input style='width:80px;' type='submit' name='sbt' value='转入登录' /></form>", "javascript:;"); | |||
| exit(); | |||
| } | |||
| $adminDirHand = HtmlReplace($adminDirHand, 1); | |||
| $gurl = "../../{$adminDirHand}/login.php?gotopage=" . urlencode($dedeNowurl); | |||
| $gurl = "../../{$adminDirHand}/login.php?gotopage=".urlencode($dedeNowurl); | |||
| echo "<script language='javascript'>location='$gurl';</script>"; | |||
| exit(); | |||
| } | |||
| @@ -8,8 +8,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| include(DEDEDATA . '/mark/inc_photowatermark_config.php'); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| include(DEDEDATA.'/mark/inc_photowatermark_config.php'); | |||
| if (empty($activepath)) { | |||
| $activepath = ''; | |||
| } | |||
| @@ -22,8 +22,8 @@ $activepath = preg_replace("#\/{1,}#", '/', $activepath); | |||
| if (strlen($activepath) < strlen($cfg_medias_dir)) { | |||
| $activepath = $cfg_medias_dir; | |||
| } | |||
| $inpath = $cfg_basedir . $activepath; | |||
| $activeurl = '..' . $activepath; | |||
| $inpath = $cfg_basedir.$activepath; | |||
| $activeurl = '..'.$activepath; | |||
| if (empty($f)) { | |||
| $f = 'form1.picname'; | |||
| } | |||
| @@ -36,11 +36,11 @@ if (empty($comeback)) { | |||
| } | |||
| $addparm = ''; | |||
| if (!empty($CKEditor)) { | |||
| $addparm = '&CKEditor=' . $CKEditor; | |||
| $addparm = '&CKEditor='.$CKEditor; | |||
| $f = $CKEditor; | |||
| } | |||
| if (!empty($CKEditorFuncNum)) { | |||
| $addparm .= '&CKEditorFuncNum=' . $CKEditorFuncNum; | |||
| $addparm .= '&CKEditorFuncNum='.$CKEditorFuncNum; | |||
| } | |||
| if (!empty($noeditor)) { | |||
| $addparm .= '&noeditor=yes'; | |||
| @@ -148,10 +148,10 @@ table{background:#fff} | |||
| if ($filesize != "") | |||
| if ($filesize < 0.1) { | |||
| @list($ty1, $ty2) = split("\.", $filesize); | |||
| $filesize = $ty1 . "." . substr($ty2, 0, 2); | |||
| $filesize = $ty1.".".substr($ty2, 0, 2); | |||
| } else { | |||
| @list($ty1, $ty2) = split("\.", $filesize); | |||
| $filesize = $ty1 . "." . substr($ty2, 0, 1); | |||
| $filesize = $ty1.".".substr($ty2, 0, 1); | |||
| } | |||
| $filetime = filemtime("$inpath/$file"); | |||
| $filetime = MyDate("Y-m-d H:i", $filetime); | |||
| @@ -162,7 +162,7 @@ table{background:#fff} | |||
| $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
| $line = "\n<tr> | |||
| <td class='linerow' colspan='2'> | |||
| <a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=" . urlencode($tmp) . $addparm . "'><img src='img/dir2.gif'>上级目录</a></td> | |||
| <a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode($tmp).$addparm."'><img src='img/dir2.gif'>上级目录</a></td> | |||
| <td colspan='2' class='linerow'>当前目录:$activepath</td> | |||
| </tr>"; | |||
| echo $line; | |||
| @@ -171,12 +171,12 @@ table{background:#fff} | |||
| if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
| $line = "\n<tr> | |||
| <td class='linerow' colspan='2'> | |||
| <a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=" . urlencode("$activepath/$file") . $addparm . "'><img src='img/dir.gif'>$file</a></td> | |||
| <a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode("$activepath/$file").$addparm."'><img src='img/dir.gif'>$file</a></td> | |||
| <td class='linerow'></td> | |||
| <td class='linerow'></td> | |||
| </tr>"; | |||
| echo "$line"; | |||
| } else if (preg_match("#\.(" . $cfg_imgtype . ")#i", $file)) { | |||
| } else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) { | |||
| $reurl = "$activeurl/$file"; | |||
| $reurl = preg_replace("#^\.\.#", "", $reurl); | |||
| $reurl = $reurl; | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(DEDEINC . "/image.func.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC."/image.func.php"); | |||
| if (empty($activepath)) { | |||
| @@ -27,13 +27,13 @@ if (empty($imgfile)) { | |||
| $imgfile = ''; | |||
| } | |||
| if (!is_uploaded_file($imgfile)) { | |||
| ShowMsg("你没有选择上传的文件!" . $imgfile, "-1"); | |||
| ShowMsg("你没有选择上传的文件!".$imgfile, "-1"); | |||
| exit(); | |||
| } | |||
| $CKEditorFuncNum = (isset($CKEditorFuncNum)) ? $CKEditorFuncNum : 1; | |||
| $imgfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $imgfile_name)); | |||
| if (!preg_match("#\.(" . $cfg_imgtype . ")#i", $imgfile_name)) { | |||
| if (!preg_match("#\.(".$cfg_imgtype.")#i", $imgfile_name)) { | |||
| ShowMsg("你所上传的图片类型不在许可列表,请更改系统对扩展名限定的配置!", "-1"); | |||
| exit(); | |||
| } | |||
| @@ -45,16 +45,16 @@ if (!in_array($imgfile_type, $sparr)) { | |||
| exit(); | |||
| } | |||
| $mdir = MyDate($cfg_addon_savetype, $nowtme); | |||
| if (!is_dir($cfg_basedir . $activepath . "/$mdir")) { | |||
| MkdirAll($cfg_basedir . $activepath . "/$mdir", $cfg_dir_purview); | |||
| 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; | |||
| $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; | |||
| $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); | |||
| @@ -79,13 +79,13 @@ $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() . "'); "; | |||
| VALUES ('0','$filename','".$activepath."/".$filename."','1','$imgwidthValue','$imgheightValue','0','{$imgsize}','{$nowtme}','".$cuserLogin->getUserID()."'); "; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| $fid = $dsql->GetLastID(); | |||
| AddMyAddon($fid, $activepath . '/' . $filename); | |||
| AddMyAddon($fid, $activepath.'/'.$filename); | |||
| $CKUpload = isset($CKUpload) ? $CKUpload : FALSE; | |||
| if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { | |||
| $fileurl = $activepath . '/' . $filename; | |||
| $fileurl = $activepath.'/'.$filename; | |||
| $result = array('url' => $fileurl, "uploaded" => 1, 'fileName' => $filename); | |||
| echo json_encode($result); | |||
| exit; | |||
| @@ -93,8 +93,8 @@ if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { | |||
| 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()); | |||
| 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()); | |||
| ShowMsg("成功上传一幅图片!", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."/$mdir&d=".time()); | |||
| } | |||
| exit(); | |||
| @@ -10,7 +10,7 @@ | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| if (empty($activepath)) { | |||
| $activepath = ''; | |||
| } | |||
| @@ -20,8 +20,8 @@ $activepath = preg_replace("#\/{1,}#", '/', $activepath); | |||
| if (strlen($activepath) < strlen($cfg_other_medias)) { | |||
| $activepath = $cfg_other_medias; | |||
| } | |||
| $inpath = $cfg_basedir . $activepath; | |||
| $activeurl = '..' . $activepath; | |||
| $inpath = $cfg_basedir.$activepath; | |||
| $activeurl = '..'.$activepath; | |||
| if (!is_dir($inpath)) { | |||
| die('No Exsits Path'); | |||
| } | |||
| @@ -34,10 +34,10 @@ if (empty($comeback)) { | |||
| } | |||
| $addparm = ''; | |||
| if (!empty($CKEditor)) { | |||
| $addparm = '&CKEditor=' . $CKEditor; | |||
| $addparm = '&CKEditor='.$CKEditor; | |||
| } | |||
| if (!empty($CKEditorFuncNum)) { | |||
| $addparm .= '&CKEditorFuncNum=' . $CKEditorFuncNum; | |||
| $addparm .= '&CKEditorFuncNum='.$CKEditorFuncNum; | |||
| } | |||
| if (!empty($noeditor)) { | |||
| $addparm .= '&noeditor=yes'; | |||
| @@ -96,10 +96,10 @@ if (!empty($noeditor)) { | |||
| if ($filesize != "") | |||
| if ($filesize < 0.1) { | |||
| @list($ty1, $ty2) = split("\.", $filesize); | |||
| $filesize = $ty1 . "." . substr($ty2, 0, 2); | |||
| $filesize = $ty1.".".substr($ty2, 0, 2); | |||
| } else { | |||
| @list($ty1, $ty2) = split("\.", $filesize); | |||
| $filesize = $ty1 . "." . substr($ty2, 0, 1); | |||
| $filesize = $ty1.".".substr($ty2, 0, 1); | |||
| } | |||
| $filetime = filemtime("$inpath/$file"); | |||
| $filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
| @@ -111,7 +111,7 @@ if (!empty($noeditor)) { | |||
| if ($activepath == "") continue; | |||
| $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
| $line = "\n<tr> | |||
| <td class='linerow'> <a href=select_media.php?f=$f&activepath=" . urlencode($tmp) . $addparm . "><img src=img/dir2.gif border=0 width=16 height=16 align=absmiddle>上级目录</a></td> | |||
| <td class='linerow'> <a href=select_media.php?f=$f&activepath=".urlencode($tmp).$addparm."><img src=img/dir2.gif border=0 width=16 height=16 align=absmiddle>上级目录</a></td> | |||
| <td colspan='2' class='linerow'> 当前目录:$activepath</td> | |||
| </tr>\r\n"; | |||
| echo $line; | |||
| @@ -120,7 +120,7 @@ if (!empty($noeditor)) { | |||
| if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
| $line = "\n<tr> | |||
| <td bgcolor='#F9FBF0' class='linerow'> | |||
| <a href=select_media.php?f=$f&activepath=" . urlencode("$activepath/$file") . $addparm . "><img src=img/dir.gif border=0 width=16 height=16 align=absmiddle>$file</a> | |||
| <a href=select_media.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src=img/dir.gif border=0 width=16 height=16 align=absmiddle>$file</a> | |||
| </td> | |||
| <td class='linerow'>-</td> | |||
| <td bgcolor='#F9FBF0' class='linerow'>-</td> | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| include_once(dirname(__FILE__) . '/config.php'); | |||
| $cfg_softtype = $cfg_mediatype . "|mp4"; | |||
| include_once(dirname(__FILE__).'/config.php'); | |||
| $cfg_softtype = $cfg_mediatype."|mp4"; | |||
| $cfg_soft_dir = $cfg_other_medias; | |||
| $bkurl = 'select_media.php'; | |||
| $uploadmbtype = "多媒体文件类型"; | |||
| @@ -24,4 +24,4 @@ if (empty($activepath)) { | |||
| } | |||
| } | |||
| require_once(dirname(__FILE__) . "/select_soft_post.php"); | |||
| require_once(dirname(__FILE__)."/select_soft_post.php"); | |||
| @@ -8,7 +8,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| if (empty($activepath)) { | |||
| $activepath = ''; | |||
| } | |||
| @@ -17,8 +17,8 @@ $activepath = preg_replace("#\/{1,}#", '/', $activepath); | |||
| if (strlen($activepath) < strlen($cfg_soft_dir)) { | |||
| $activepath = $cfg_soft_dir; | |||
| } | |||
| $inpath = $cfg_basedir . $activepath; | |||
| $activeurl = '..' . $activepath; | |||
| $inpath = $cfg_basedir.$activepath; | |||
| $activeurl = '..'.$activepath; | |||
| if (empty($f)) { | |||
| $f = 'form1.enclosure'; | |||
| } | |||
| @@ -30,10 +30,10 @@ if (empty($comeback)) { | |||
| } | |||
| $addparm = ''; | |||
| if (!empty($CKEditor)) { | |||
| $addparm = '&CKEditor=' . $CKEditor; | |||
| $addparm = '&CKEditor='.$CKEditor; | |||
| } | |||
| if (!empty($CKEditorFuncNum)) { | |||
| $addparm .= '&CKEditorFuncNum=' . $CKEditorFuncNum; | |||
| $addparm .= '&CKEditorFuncNum='.$CKEditorFuncNum; | |||
| } | |||
| if (!empty($noeditor)) { | |||
| $addparm .= '&noeditor=yes'; | |||
| @@ -109,10 +109,10 @@ table{background:#fff} | |||
| if ($filesize != "") | |||
| if ($filesize < 0.1) { | |||
| @list($ty1, $ty2) = split("\.", $filesize); | |||
| $filesize = $ty1 . "." . substr($ty2, 0, 2); | |||
| $filesize = $ty1.".".substr($ty2, 0, 2); | |||
| } else { | |||
| @list($ty1, $ty2) = split("\.", $filesize); | |||
| $filesize = $ty1 . "." . substr($ty2, 0, 1); | |||
| $filesize = $ty1.".".substr($ty2, 0, 1); | |||
| } | |||
| $filetime = filemtime("$inpath/$file"); | |||
| $filetime = MyDate("Y-m-d H:i", $filetime); | |||
| @@ -123,7 +123,7 @@ table{background:#fff} | |||
| if ($activepath == "") continue; | |||
| $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
| $line = "\n<tr height='28'> | |||
| <td class='linerow'><a href='select_soft.php?f=$f&activepath=" . urlencode($tmp) . $addparm . "'><img src='img/dir2.gif'>上级目录</a></td> | |||
| <td class='linerow'><a href='select_soft.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='img/dir2.gif'>上级目录</a></td> | |||
| <td colspan='2' class='linerow'>当前目录:$activepath</td> | |||
| </tr>\r\n"; | |||
| echo $line; | |||
| @@ -131,7 +131,7 @@ table{background:#fff} | |||
| if (preg_match("#^_(.*)$#i", $file)) continue; | |||
| if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
| $line = "\n<tr height='28'> | |||
| <td class='linerow'><a href=select_soft.php?f=$f&activepath=" . urlencode("$activepath/$file") . $addparm . "><img src='img/dir.gif'>$file</a></td> | |||
| <td class='linerow'><a href=select_soft.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='img/dir.gif'>$file</a></td> | |||
| <td class='linerow'></td> | |||
| <td class='linerow'></td> | |||
| </tr>"; | |||
| @@ -10,7 +10,7 @@ | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| if (!isset($cfg_basedir)) { | |||
| include_once(dirname(__FILE__) . '/config.php'); | |||
| include_once(dirname(__FILE__).'/config.php'); | |||
| } | |||
| if (empty($uploadfile)) $uploadfile = ''; | |||
| if (empty($uploadmbtype)) $uploadmbtype = '软件类型'; | |||
| @@ -31,7 +31,7 @@ $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)) { | |||
| if (!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) { | |||
| ShowMsg("你所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!", ""); | |||
| exit(); | |||
| } | |||
| @@ -39,9 +39,9 @@ if (!preg_match("#\.(" . $cfg_softtype . ")#i", $uploadfile_name)) { | |||
| $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); | |||
| $activepath = $activepath.'/'.$newdir; | |||
| if (!is_dir($cfg_basedir.$activepath)) { | |||
| MkdirAll($cfg_basedir.$activepath, $cfg_dir_purview); | |||
| CloseFtp(); | |||
| } | |||
| } | |||
| @@ -51,23 +51,23 @@ 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])) { | |||
| if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { | |||
| ShowMsg("你指定的文件名被系统禁止!", 'javascript:;'); | |||
| exit(); | |||
| } | |||
| if (!preg_match("#\.#", $filename)) $filename = $filename . '.' . $fs[count($fs) - 1]; | |||
| if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; | |||
| } else { | |||
| $filename = $cuserLogin->getUserID() . '-' . dd2char(MyDate('ymdHis', $nowtme)); | |||
| $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); | |||
| $fs = explode('.', $uploadfile_name); | |||
| if (preg_match("#" . $cfg_not_allowall . "#", $fs[count($fs) - 1])) { | |||
| if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { | |||
| ShowMsg("你上传了某些可能存在不安全因素的文件,系统拒绝操作!", 'javascript:;'); | |||
| exit(); | |||
| } | |||
| $filename = $filename . '.' . $fs[count($fs) - 1]; | |||
| $filename = $filename.'.'.$fs[count($fs) - 1]; | |||
| } | |||
| $fullfilename = $cfg_basedir . $activepath . '/' . $filename; | |||
| $fullfileurl = $activepath . '/' . $filename; | |||
| $fullfilename = $cfg_basedir.$activepath.'/'.$filename; | |||
| $fullfileurl = $activepath.'/'.$filename; | |||
| move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); | |||
| @unlink($uploadfile); | |||
| @@ -83,7 +83,7 @@ if ($uploadfile_type == 'application/x-shockwave-flash') { | |||
| $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() . "'); "; | |||
| VALUES ('0','$filename','$fullfileurl','$mediatype','0','0','0','{$uploadfile_size}','{$nowtme}','".$cuserLogin->getUserID()."'); "; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| $fid = $dsql->GetLastID(); | |||
| @@ -99,6 +99,6 @@ if ($ck == 1) { | |||
| ); | |||
| echo json_encode($arr); | |||
| } else { | |||
| ShowMsg("成功上传文件!", $bkurl . "?comeback=" . urlencode($filename) . "&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=" . urlencode($activepath) . "&d=" . time()); | |||
| ShowMsg("成功上传文件!", $bkurl."?comeback=".urlencode($filename)."&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."&d=".time()); | |||
| exit(); | |||
| } | |||
| @@ -8,7 +8,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| if (empty($activepath)) { | |||
| $activepath = ''; | |||
| } | |||
| @@ -19,8 +19,8 @@ $templetdir = $cfg_templets_dir; | |||
| if (strlen($activepath) < strlen($templetdir)) { | |||
| $activepath = $templetdir; | |||
| } | |||
| $inpath = $cfg_basedir . $activepath; | |||
| $activeurl = '..' . $activepath; | |||
| $inpath = $cfg_basedir.$activepath; | |||
| $activeurl = '..'.$activepath; | |||
| if (!is_dir($inpath)) { | |||
| die('No Exsits Path'); | |||
| } | |||
| @@ -76,10 +76,10 @@ table{background:#fff} | |||
| if ($filesize != "") | |||
| if ($filesize < 0.1) { | |||
| @list($ty1, $ty2) = split("\.", $filesize); | |||
| $filesize = $ty1 . "." . substr($ty2, 0, 2); | |||
| $filesize = $ty1.".".substr($ty2, 0, 2); | |||
| } else { | |||
| @list($ty1, $ty2) = split("\.", $filesize); | |||
| $filesize = $ty1 . "." . substr($ty2, 0, 1); | |||
| $filesize = $ty1.".".substr($ty2, 0, 1); | |||
| } | |||
| $filetime = filemtime("$inpath/$file"); | |||
| $filetime = MyDate("Y-m-d H:i", $filetime); | |||
| @@ -90,7 +90,7 @@ table{background:#fff} | |||
| if ($activepath == "") continue; | |||
| $tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); | |||
| $line = "\n<tr> | |||
| <td class='linerow'><a href='select_templets.php?f=$f&activepath=" . urlencode($tmp) . "'><img src='img/dir2.gif'>上级目录</a></td> | |||
| <td class='linerow'><a href='select_templets.php?f=$f&activepath=".urlencode($tmp)."'><img src='img/dir2.gif'>上级目录</a></td> | |||
| <td colspan='2' class='linerow'>当前目录:$activepath</td> | |||
| </tr>\r\n"; | |||
| echo $line; | |||
| @@ -98,7 +98,7 @@ table{background:#fff} | |||
| if (preg_match("#^_(.*)$#i", $file)) continue; | |||
| if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
| $line = "\n<tr> | |||
| <td class='linerow'><a href=select_templets.php?f=$f&activepath=" . urlencode("$activepath/$file") . "><img src='img/dir.gif'>$file</a></td> | |||
| <td class='linerow'><a href=select_templets.php?f=$f&activepath=".urlencode("$activepath/$file")."><img src='img/dir.gif'>$file</a></td> | |||
| <td class='linerow'></td> | |||
| <td class='linerow'></td> | |||
| </tr>"; | |||
| @@ -108,7 +108,7 @@ table{background:#fff} | |||
| else $lstyle = ""; | |||
| $reurl = "$activeurl/$file"; | |||
| $reurl = preg_replace("#\.\.#", "", $reurl); | |||
| $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||
| $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
| $line = "\n<tr> | |||
| <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/htm.gif'>$file</a></td> | |||
| <td class='linerow'>$filesize KB</td> | |||
| @@ -120,7 +120,7 @@ table{background:#fff} | |||
| else $lstyle = ""; | |||
| $reurl = "$activeurl/$file"; | |||
| $reurl = preg_replace("#\.\.#", "", $reurl); | |||
| $reurl = preg_replace("#" . $templetdir . "/#", "", $reurl); | |||
| $reurl = preg_replace("#".$templetdir."/#", "", $reurl); | |||
| $line = "\n<tr> | |||
| <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/css.gif'>$file</a></td> | |||
| <td class='linerow'>$filesize KB</td> | |||
| @@ -132,7 +132,7 @@ table{background:#fff} | |||
| else $lstyle = ""; | |||
| $reurl = "$activeurl/$file"; | |||
| $reurl = preg_replace("#\.\.#", "", $reurl); | |||
| $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||
| $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
| $line = "\n<tr> | |||
| <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/js.gif'>$file</a></td> | |||
| <td class='linerow'>$filesize KB</td> | |||
| @@ -144,7 +144,7 @@ table{background:#fff} | |||
| else $lstyle = ""; | |||
| $reurl = "$activeurl/$file"; | |||
| $reurl = preg_replace("#\.\.#", "", $reurl); | |||
| $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||
| $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
| $line = "\n<tr> | |||
| <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/jpg.gif'>$file</a></td> | |||
| <td class='linerow'>$filesize KB</td> | |||
| @@ -156,7 +156,7 @@ table{background:#fff} | |||
| else $lstyle = ""; | |||
| $reurl = "$activeurl/$file"; | |||
| $reurl = preg_replace("#\.\.#", "", $reurl); | |||
| $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||
| $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
| $line = "\n<tr> | |||
| <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/gif.gif'>$file</a></td> | |||
| <td class='linerow'>$filesize KB</td> | |||
| @@ -168,7 +168,7 @@ table{background:#fff} | |||
| else $lstyle = ""; | |||
| $reurl = "$activeurl/$file"; | |||
| $reurl = preg_replace("#\.\.#", "", $reurl); | |||
| $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||
| $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
| $line = "\n<tr> | |||
| <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/txt.gif'>$file</a></td> | |||
| <td class='linerow'>$filesize KB</td> | |||
| @@ -10,7 +10,7 @@ | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| $cfg_txttype = "htm|html|tpl|txt"; | |||
| if (empty($uploadfile)) { | |||
| $uploadfile = ""; | |||
| @@ -23,7 +23,7 @@ if (!preg_match("#^text#", $uploadfile_type)) { | |||
| ShowMsg("你上传的不是文本类型附件!", "-1"); | |||
| exit(); | |||
| } | |||
| if (!preg_match("#\.(" . $cfg_txttype . ")#i", $uploadfile_name)) { | |||
| if (!preg_match("#\.(".$cfg_txttype.")#i", $uploadfile_name)) { | |||
| ShowMsg("你所上传的模板文件类型不能被识别,只允许htm、html、tpl、txt扩展名!", "-1"); | |||
| exit(); | |||
| } | |||
| @@ -32,13 +32,13 @@ if ($filename != '') { | |||
| } else { | |||
| $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | |||
| $filename = $uploadfile_name; | |||
| if ($filename == '' || !preg_match("#\.(" . $cfg_txttype . ")#i", $filename)) { | |||
| if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { | |||
| ShowMsg("你所上传的文件存在问题,请检查文件类型是否适合!", "-1"); | |||
| exit(); | |||
| } | |||
| } | |||
| $fullfilename = $cfg_basedir . $activepath . "/" . $filename; | |||
| $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()); | |||
| ShowMsg("成功上传文件!", "select_templets.php?comeback=".urlencode($filename)."&f=$f&activepath=".urlencode($activepath)."&d=".time()); | |||
| exit(); | |||
| @@ -9,16 +9,16 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('c_New'); | |||
| $mysql_version = $dsql->GetVersion(); | |||
| $mysql_versions = explode(".", trim($mysql_version)); | |||
| $mysql_version = $mysql_versions[0] . "." . $mysql_versions[1]; | |||
| $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"); | |||
| include(DEDEADMIN."/templets/diy_add.htm"); | |||
| } else { | |||
| if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { | |||
| ShowMsg("<font color=red>'自定义表单diyid'</font>必须为数字!", "-1"); | |||
| @@ -52,7 +52,7 @@ if (empty($action)) { | |||
| 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 . "; "; | |||
| $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')"; | |||
| @@ -9,10 +9,10 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('c_Edit'); | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| require_once(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| require_once(DEDEINC."/oxwindow.class.php"); | |||
| if (empty($dopost)) $dopost = ""; | |||
| $diyid = (empty($diyid) ? 0 : intval($diyid)); | |||
| @@ -45,7 +45,7 @@ function __Delete() | |||
| $win->AddHidden("job", "yes"); | |||
| $win->AddHidden("dopost", $dopost); | |||
| $win->AddHidden("diyid", $diyid); | |||
| $win->AddTitle("!将删除所有与该自定义表单相关的文件和数据<br />你确实要删除 \"" . $row['name'] . "\" 这个自定义表单?"); | |||
| $win->AddTitle("!将删除所有与该自定义表单相关的文件和数据<br />你确实要删除 \"".$row['name']."\" 这个自定义表单?"); | |||
| $winform = $win->GetWindow("ok"); | |||
| $win->Display(); | |||
| exit(); | |||
| @@ -73,4 +73,4 @@ function __Delete() | |||
| function edit() | |||
| -----------------*/ | |||
| $row = $dsql->GetOne("Select * From #@__diyforms where diyid='$diyid'"); | |||
| include DEDEADMIN . "/templets/diy_edit.htm"; | |||
| include DEDEADMIN."/templets/diy_edit.htm"; | |||
| @@ -9,15 +9,15 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| //增加权限检查 | |||
| require_once(DEDEADMIN . '/inc/inc_admin_channel.php'); | |||
| require_once(DEDEADMIN.'/inc/inc_admin_channel.php'); | |||
| if (empty($action)) $action = ''; | |||
| $mysql_version = $dsql->GetVersion(); | |||
| $mysql_versions = explode(".", trim($mysql_version)); | |||
| $mysql_version = $mysql_versions[0] . "." . $mysql_versions[1]; | |||
| $mysql_version = $mysql_versions[0].".".$mysql_versions[1]; | |||
| /*---------------------- | |||
| function Save() | |||
| ---------------------*/ | |||
| @@ -26,7 +26,7 @@ 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"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| $dtp = new DedeTagParse(); | |||
| $dtp->SetNameSpace("field", "<", ">"); | |||
| $dtp->LoadSource($fieldset); | |||
| @@ -46,7 +46,7 @@ if ($action == 'save') { | |||
| if (!$rs) { | |||
| $gerr = $dsql->GetError(); | |||
| ShowMsg("增加字段失败,错误提示为:" . $gerr, "javascript:;"); | |||
| ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); | |||
| exit(); | |||
| } | |||
| $ok = FALSE; | |||
| @@ -61,17 +61,17 @@ if ($action == 'save') { | |||
| break; | |||
| } | |||
| } | |||
| $oksetting = $ok ? $dtp->GetResultNP() : $fieldset . "\n" . stripslashes($fieldstring); | |||
| $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); | |||
| } else { | |||
| //原来的配置为空 | |||
| $oksetting = $fieldset . "\n" . stripslashes($fieldstring); | |||
| $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:;"); | |||
| ShowMsg("保存节点配置出错!".$grr, "javascript:;"); | |||
| exit(); | |||
| } | |||
| ShowMsg("成功增加一个字段!", "diy_edit.php?diyid=$diyid"); | |||
| @@ -91,7 +91,7 @@ $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( | |||
| 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 . "; "; | |||
| $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; | |||
| } | |||
| $dsql->ExecuteNoneQuery($tabsql); | |||
| @@ -104,6 +104,6 @@ while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | |||
| } | |||
| $f = ''; | |||
| foreach ($fields as $k => $v) { | |||
| $f .= ($f == '' ? $k : ' ' . $k); | |||
| $f .= ($f == '' ? $k : ' '.$k); | |||
| } | |||
| require_once(DEDEADMIN . "/templets/diy_field_add.htm"); | |||
| require_once(DEDEADMIN."/templets/diy_field_add.htm"); | |||
| @@ -9,18 +9,18 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| //增加权限检查 | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| require_once(DEDEADMIN . "/inc/inc_admin_channel.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| require_once(DEDEADMIN."/inc/inc_admin_channel.php"); | |||
| if (empty($action)) $action = ''; | |||
| //获取模型信息 | |||
| $mysql_version = $dsql->GetVersion(); | |||
| $mysql_versions = explode(".", trim($mysql_version)); | |||
| $mysql_version = $mysql_versions[0] . "." . $mysql_versions[1]; | |||
| $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']; | |||
| @@ -32,7 +32,7 @@ foreach ($dtp->CTags as $ctag) { | |||
| } | |||
| //字段类型信息 | |||
| $ds = file(DEDEADMIN . "/inc/fieldtype.txt"); | |||
| $ds = file(DEDEADMIN."/inc/fieldtype.txt"); | |||
| foreach ($ds as $d) { | |||
| $dds = explode(',', trim($d)); | |||
| $fieldtypes[$dds[0]] = $dds[1]; | |||
| @@ -57,7 +57,7 @@ if ($action == 'save') { | |||
| 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 . "; "; | |||
| $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; | |||
| } | |||
| $dsql->ExecuteNoneQuery($tabsql); | |||
| @@ -86,10 +86,10 @@ if ($action == 'save') { | |||
| if (trim($fieldname) == trim(strtolower($ctag->GetName()))) { | |||
| if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { | |||
| $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` " . $ntabsql; | |||
| $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; | |||
| $dsql->ExecuteNoneQuery($tabsql); | |||
| } else if (!isset($fields[$fieldname])) { | |||
| $tabsql = "ALTER TABLE `$trueTable` ADD " . $ntabsql; | |||
| $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; | |||
| $dsql->ExecuteNoneQuery($tabsql); | |||
| } else { | |||
| $tabsql = ''; | |||
| @@ -120,4 +120,4 @@ function _DELETE() | |||
| ShowMsg("成功删除一个字段!", "diy_edit.php?diyid=$diyid"); | |||
| exit(); | |||
| } | |||
| require_once(DEDEADMIN . "/templets/diy_field_edit.htm"); | |||
| require_once(DEDEADMIN."/templets/diy_field_edit.htm"); | |||
| @@ -8,7 +8,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('c_New'); | |||
| $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; | |||
| $action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete','excel')) ? $action : ''; | |||
| @@ -16,17 +16,17 @@ if (empty($diyid)) { | |||
| showMsg("非法操作!", 'javascript:;'); | |||
| exit(); | |||
| } | |||
| require_once DEDEINC . '/diyform.cls.php'; | |||
| require_once DEDEINC.'/diyform.cls.php'; | |||
| $diy = new diyform($diyid); | |||
| if ($action == 'post') { | |||
| if (empty($do)) { | |||
| $postform = $diy->getForm('post', '', 'admin'); | |||
| include DEDEADMIN . '/templets/diy_post.htm'; | |||
| 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)) { | |||
| if ($dede_fieldshash != md5($dede_fields.$cfg_cookie_encode)) { | |||
| showMsg("数据校验不对,程序返回", '-1'); | |||
| exit(); | |||
| } | |||
| @@ -52,8 +52,8 @@ if ($action == 'post') { | |||
| } else { | |||
| ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); | |||
| } | |||
| $addvar .= ', `' . $fieldinfo[0] . '`'; | |||
| $addvalue .= ", '" . ${$fieldinfo[0]} . "'"; | |||
| $addvar .= ', `'.$fieldinfo[0].'`'; | |||
| $addvalue .= ", '".${$fieldinfo[0]}."'"; | |||
| } | |||
| } | |||
| } | |||
| @@ -66,13 +66,13 @@ if ($action == 'post') { | |||
| } | |||
| } | |||
| } else if ($action == 'list') { | |||
| include_once DEDEINC . '/datalistcp.class.php'; | |||
| 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->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); | |||
| $datalist->SetSource($query); | |||
| $fieldlist = $diy->getFieldList(); | |||
| $datalist->Display(); | |||
| @@ -93,7 +93,7 @@ if ($action == 'post') { | |||
| $fieldlist = $diy->getFieldList(); | |||
| $c1 = $row['ifcheck'] == 1 ? 'checked' : ''; | |||
| $c2 = $row['ifcheck'] == 0 ? 'checked' : ''; | |||
| include DEDEADMIN . '/templets/diy_edit_content.htm'; | |||
| 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"); | |||
| @@ -121,7 +121,7 @@ if ($action == 'post') { | |||
| ${$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]} . "'"; | |||
| $addsql .= !empty($addsql) ? ',`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'" : '`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'"; | |||
| } | |||
| } | |||
| } | |||
| @@ -162,8 +162,8 @@ if ($action == 'post') { | |||
| } | |||
| } 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]); | |||
| 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 { | |||
| @@ -9,14 +9,14 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('c_List'); | |||
| require_once(DEDEINC . "/datalistcp.class.php"); | |||
| require_once(DEDEINC . "/common.func.php"); | |||
| require_once(DEDEINC."/datalistcp.class.php"); | |||
| require_once(DEDEINC."/common.func.php"); | |||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||
| $sql = "Select `diyid`,`name`,`table` From #@__diyforms order by diyid asc"; | |||
| $dlist = new DataListCP(); | |||
| $dlist->SetTemplet(DEDEADMIN . "/templets/diy_main.htm"); | |||
| $dlist->SetTemplet(DEDEADMIN."/templets/diy_main.htm"); | |||
| $dlist->SetSource($sql); | |||
| $dlist->display(); | |||
| $dlist->Close(); | |||
| @@ -9,9 +9,9 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(DEDEINC . '/datalistcp.class.php'); | |||
| require_once(DEDEINC . '/common.func.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| require_once(DEDEINC.'/datalistcp.class.php'); | |||
| require_once(DEDEINC.'/common.func.php'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if (empty($fmdo)) $fmdo = ''; | |||
| @@ -77,7 +77,7 @@ if ($dopost == "delete") { | |||
| ShowMsg("成功删除指定的文档!", "erraddsave.php"); | |||
| exit(); | |||
| } else { | |||
| require_once(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(DEDEINC."/oxwindow.class.php"); | |||
| $wintitle = "删除"; | |||
| $wecome_info = "<a href='erraddsave.php'>错误管理</a>::删除错误"; | |||
| $win = new OxWindow(); | |||
| @@ -95,6 +95,6 @@ if ($dopost == "delete") { | |||
| $sql = "SELECT * FROM `#@__erradd` ORDER BY id desc"; | |||
| $dlist = new DataListCP(); | |||
| $dlist->SetTemplet(DEDEADMIN . "/templets/erradd.htm"); | |||
| $dlist->SetTemplet(DEDEADMIN."/templets/erradd.htm"); | |||
| $dlist->SetSource($sql); | |||
| $dlist->display(); | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/../include/common.inc.php'); | |||
| require_once(DEDEINC . '/userlogin.class.php'); | |||
| require_once(dirname(__FILE__).'/../include/common.inc.php'); | |||
| require_once(DEDEINC.'/userlogin.class.php'); | |||
| $cuserLogin = new userLogin(); | |||
| $cuserLogin->exitUser(); | |||
| if (empty($needclose)) { | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_Feedback'); | |||
| $id = isset($id) && is_numeric($id) ? $id : 0; | |||
| $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "feedback_main.php" : $_COOKIE['ENV_GOBACK_URL']; | |||
| @@ -24,14 +24,14 @@ if ($dopost == 'edit') { | |||
| $adminmsg = str_replace(">", ">", $adminmsg); | |||
| $adminmsg = str_replace(" ", "  ", $adminmsg); | |||
| $adminmsg = str_replace("\r\n", "<br/>\n", $adminmsg); | |||
| $msg = $msg . "<br/>\n" . "<font color=red>管理员回复: $adminmsg</font>\n"; | |||
| $msg = $msg."<br/>\n"."<font color=red>管理员回复: $adminmsg</font>\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'); | |||
| require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
| $query = "SELECT * FROM `#@__feedback` WHERE id=$id"; | |||
| $row = $dsql->GetOne($query); | |||
| MakeArt($row['aid']); | |||
| @@ -9,12 +9,12 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| //权限检查 | |||
| CheckPurview('sys_Feedback'); | |||
| require_once(DEDEINC . "/datalistcp.class.php"); | |||
| require_once(DEDEINC . "/typelink.class.php"); | |||
| require_once(DEDEINC."/datalistcp.class.php"); | |||
| require_once(DEDEINC."/typelink.class.php"); | |||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||
| function IsCheck($st) | |||
| @@ -101,7 +101,7 @@ else { | |||
| $tl = new TypeLink($typeid); | |||
| $openarray = $tl->GetOptionArray($typeid, $admin_catalogs, 0); | |||
| $addsql = ($typeid != 0 ? " And typeid IN (" . GetSonIds($typeid) . ")" : ''); | |||
| $addsql = ($typeid != 0 ? " And typeid IN (".GetSonIds($typeid).")" : ''); | |||
| $addsql .= ($aid != 0 ? " And aid=$aid " : ''); | |||
| $addsql .= ($ip != '' ? " And ip LIKE '$ip' " : ''); | |||
| @@ -117,7 +117,7 @@ else { | |||
| $dlist->SetParameter('ip', $ip); | |||
| $dlist->SetParameter('typeid', $typeid); | |||
| $dlist->SetParameter('keyword', $keyword); | |||
| $dlist->SetTemplate(DEDEADMIN . '/templets/feedback_main.htm'); | |||
| $dlist->SetTemplate(DEDEADMIN.'/templets/feedback_main.htm'); | |||
| $dlist->SetSource($querystring); | |||
| $dlist->Display(); | |||
| } | |||
| @@ -28,12 +28,12 @@ class FileManagement | |||
| //更改文件名 | |||
| function RenameFile($oldname, $newname) | |||
| { | |||
| $oldname = $this->baseDir . $this->activeDir . "/" . $oldname; | |||
| $newname = $this->baseDir . $this->activeDir . "/" . $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); | |||
| ShowMsg("成功更改一个文件名!", "file_manage_main.php?activepath=".$this->activeDir); | |||
| return 0; | |||
| } | |||
| @@ -41,14 +41,14 @@ class FileManagement | |||
| function NewDir($dirname) | |||
| { | |||
| $newdir = $dirname; | |||
| $dirname = $this->baseDir . $this->activeDir . "/" . $dirname; | |||
| if (is_writable($this->baseDir . $this->activeDir)) { | |||
| $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); | |||
| ShowMsg("成功创建一个新目录!", "file_manage_main.php?activepath=".$this->activeDir."/".$newdir); | |||
| return 1; | |||
| } else { | |||
| ShowMsg("创建新目录失败,因为这个位置不允许写入!", "file_manage_main.php?activepath=" . $this->activeDir); | |||
| ShowMsg("创建新目录失败,因为这个位置不允许写入!", "file_manage_main.php?activepath=".$this->activeDir); | |||
| return 0; | |||
| } | |||
| } | |||
| @@ -64,20 +64,20 @@ class FileManagement | |||
| function MoveFile($mfile, $mpath) | |||
| { | |||
| if ($mpath != "" && !preg_match("#\.\.#", $mpath)) { | |||
| $oldfile = $this->baseDir . $this->activeDir . "/$mfile"; | |||
| $oldfile = $this->baseDir.$this->activeDir."/$mfile"; | |||
| $mpath = str_replace("\\", "/", $mpath); | |||
| $mpath = preg_replace("#\/{1,}#", "/", $mpath); | |||
| if (!preg_match("#^/#", $mpath)) { | |||
| $mpath = $this->activeDir . "/" . $mpath; | |||
| $mpath = $this->activeDir."/".$mpath; | |||
| } | |||
| $truepath = $this->baseDir . $mpath; | |||
| $truepath = $this->baseDir.$mpath; | |||
| if (is_readable($oldfile) && is_readable($truepath) && is_writable($truepath)) { | |||
| if (is_dir($truepath)) { | |||
| copy($oldfile, $truepath . "/$mfile"); | |||
| copy($oldfile, $truepath."/$mfile"); | |||
| } else { | |||
| MkdirAll($truepath, $GLOBALS['cfg_dir_purview']); | |||
| CloseFtp(); | |||
| copy($oldfile, $truepath . "/$mfile"); | |||
| copy($oldfile, $truepath."/$mfile"); | |||
| } | |||
| unlink($oldfile); | |||
| ShowMsg("成功移动文件!", "file_manage_main.php?activepath=$mpath", 0, 1000); | |||
| @@ -127,7 +127,7 @@ class FileManagement | |||
| { | |||
| $dh = dir($indir); | |||
| while ($filename = $dh->read()) { | |||
| $truefile = $indir . '/' . $filename; | |||
| $truefile = $indir.'/'.$filename; | |||
| if ($filename == "." || $filename == "..") { | |||
| continue; | |||
| } else if (is_dir($truefile)) { | |||
| @@ -147,7 +147,7 @@ class FileManagement | |||
| */ | |||
| function DeleteFile($filename) | |||
| { | |||
| $filename = $this->baseDir . $this->activeDir . "/$filename"; | |||
| $filename = $this->baseDir.$this->activeDir."/$filename"; | |||
| if (is_file($filename)) { | |||
| @unlink($filename); | |||
| $t = "文件"; | |||
| @@ -157,11 +157,11 @@ class FileManagement | |||
| $this->RmDirFiles($filename); | |||
| } else { | |||
| // 完善用户体验,by:sumic | |||
| ShowMsg("系统禁止删除" . $t . "!", "file_manage_main.php?activepath=" . $this->activeDir); | |||
| ShowMsg("系统禁止删除".$t."!", "file_manage_main.php?activepath=".$this->activeDir); | |||
| exit; | |||
| } | |||
| } | |||
| ShowMsg("成功删除一个" . $t . "!", "file_manage_main.php?activepath=" . $this->activeDir); | |||
| ShowMsg("成功删除一个".$t."!", "file_manage_main.php?activepath=".$this->activeDir); | |||
| return 0; | |||
| } | |||
| } | |||
| @@ -191,7 +191,7 @@ class SpaceUse | |||
| if ($size > 0) { | |||
| list($t1, $t2) = explode(".", $size); | |||
| $size = $t1 . "." . substr($t2, 0, 1); | |||
| $size = $t1.".".substr($t2, 0, 1); | |||
| } | |||
| return $size; | |||
| } | |||
| @@ -201,7 +201,7 @@ class SpaceUse | |||
| $size = $size / 1024 / 1024; | |||
| if ($size > 0) { | |||
| list($t1, $t2) = explode(".", $size); | |||
| $size = $t1 . "." . substr($t2, 0, 2); | |||
| $size = $t1.".".substr($t2, 0, 2); | |||
| } | |||
| return $size; | |||
| } | |||
| @@ -9,15 +9,15 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require(dirname(__FILE__) . "/config.php"); | |||
| require(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('plus_文件管理器'); | |||
| require(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(DEDEADMIN . '/file_class.php'); | |||
| require(DEDEINC."/oxwindow.class.php"); | |||
| require_once(DEDEADMIN.'/file_class.php'); | |||
| $activepath = str_replace("..", "", $activepath); | |||
| $activepath = preg_replace("#^\/{1,}#", "/", $activepath); | |||
| if ($activepath == "/") $activepath = ""; | |||
| if ($activepath == "") $inpath = $cfg_basedir; | |||
| else $inpath = $cfg_basedir . $activepath; | |||
| else $inpath = $cfg_basedir.$activepath; | |||
| //文件管理器交互与逻辑控制文件 | |||
| $fmm = new FileManagement(); | |||
| @@ -100,16 +100,16 @@ function __upload(); | |||
| ----------------*/ else if ($fmdo == "upload") { | |||
| $j = 0; | |||
| for ($i = 1; $i <= 50; $i++) { | |||
| $upfile = "upfile" . $i; | |||
| $upfile_name = "upfile" . $i . "_name"; | |||
| $upfile = "upfile".$i; | |||
| $upfile_name = "upfile".$i."_name"; | |||
| if (!isset(${$upfile}) || !isset(${$upfile_name})) { | |||
| continue; | |||
| } | |||
| $upfile = ${$upfile}; | |||
| $upfile_name = ${$upfile_name}; | |||
| if (is_uploaded_file($upfile)) { | |||
| if (!file_exists($cfg_basedir . $activepath . "/" . $upfile_name)) { | |||
| move_uploaded_file($upfile, $cfg_basedir . $activepath . "/" . $upfile_name); | |||
| if (!file_exists($cfg_basedir.$activepath."/".$upfile_name)) { | |||
| move_uploaded_file($upfile, $cfg_basedir.$activepath."/".$upfile_name); | |||
| } | |||
| @unlink($upfile); | |||
| $j++; | |||
| @@ -129,7 +129,7 @@ else if ($fmdo == "space") { | |||
| $titleinfo = "目录 <a href='file_manage_main.php?activepath=$activepath'><b><u>$ecpath</u></b></a> 空间使用状况:<br/>"; | |||
| $wintitle = "文件管理"; | |||
| $wecome_info = "文件管理::空间大小检查 [<a href='file_manage_main.php?activepath=$activepath'>文件浏览器</a>]</a>"; | |||
| $activepath = $cfg_basedir . $activepath; | |||
| $activepath = $cfg_basedir.$activepath; | |||
| $space = new SpaceUse; | |||
| $space->checksize($activepath); | |||
| $total = $space->totalsize; | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require(dirname(__FILE__) . "/config.php"); | |||
| require(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('plus_文件管理器'); | |||
| if (!isset($activepath)) $activepath = $cfg_cmspath; | |||
| @@ -19,10 +19,10 @@ $activepath = preg_replace("#^\/{1,}#", "/", $activepath); | |||
| if ($activepath == "/") $activepath = ""; | |||
| if ($activepath == "") $inpath = $cfg_basedir; | |||
| else $inpath = $cfg_basedir . $activepath; | |||
| else $inpath = $cfg_basedir.$activepath; | |||
| $activeurl = $activepath; | |||
| if (preg_match("#" . $cfg_templets_dir . "#i", $activepath)) { | |||
| if (preg_match("#".$cfg_templets_dir."#i", $activepath)) { | |||
| $istemplets = TRUE; | |||
| } else { | |||
| $istemplets = FALSE; | |||
| @@ -9,14 +9,14 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('plus_文件管理器'); | |||
| require_once(DEDEINC . "/oxwindow.class.php"); | |||
| require_once(DEDEINC."/oxwindow.class.php"); | |||
| $activepath = str_replace("..", "", $activepath); | |||
| $activepath = preg_replace("#^\/{1,}#", "/", $activepath); | |||
| if ($activepath == "/") $activepath = ""; | |||
| if ($activepath == "") $inpath = $cfg_basedir; | |||
| else $inpath = $cfg_basedir . $activepath; | |||
| else $inpath = $cfg_basedir.$activepath; | |||
| //显示控制层 | |||
| //更改文件名 | |||
| @@ -80,7 +80,7 @@ else if ($fmdo == "del") { | |||
| $win->AddHidden("fmdo", $fmdo); | |||
| $win->AddHidden("activepath", $activepath); | |||
| $win->AddHidden("filename", $filename); | |||
| if (@is_dir($cfg_basedir . $activepath . "/$filename")) { | |||
| if (@is_dir($cfg_basedir.$activepath."/$filename")) { | |||
| $wmsg = "你确信要删除目录:$filename 吗?"; | |||
| } else { | |||
| $wmsg = "你确信要删除文件:$filename 吗?"; | |||
| @@ -120,7 +120,7 @@ else if ($fmdo == "edit") { | |||
| $GLOBALS['extension'] = 'text/html'; | |||
| } | |||
| $ctp = new DedeTagParse(); | |||
| $ctp->LoadTemplate(DEDEADMIN . "/templets/file_edit.htm"); | |||
| $ctp->LoadTemplate(DEDEADMIN."/templets/file_edit.htm"); | |||
| $ctp->display(); | |||
| } | |||
| /*编辑文件,可视化模式 | |||
| @@ -162,13 +162,13 @@ else if ($fmdo == "newfile") { | |||
| $contentView = "<textarea id='str' name='str' style='width:99%;height:400'></textarea>\r\n"; | |||
| $GLOBALS['token'] = make_hash(); | |||
| $ctp = new DedeTagParse(); | |||
| $ctp->LoadTemplate(DEDEADMIN . "/templets/file_edit.htm"); | |||
| $ctp->LoadTemplate(DEDEADMIN."/templets/file_edit.htm"); | |||
| $ctp->display(); | |||
| } | |||
| //上传文件 | |||
| else if ($fmdo == "upload") { | |||
| $ctp = new DedeTagParse(); | |||
| $ctp->LoadTemplate(DEDEADMIN . "/templets/file_upload.htm"); | |||
| $ctp->LoadTemplate(DEDEADMIN."/templets/file_upload.htm"); | |||
| $ctp->display(); | |||
| } | |||
| @@ -9,10 +9,10 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('c_FreeList'); | |||
| if (empty($dopost)) { | |||
| require_once DEDEINC . '/typelink.class.php'; | |||
| require_once DEDEINC.'/typelink.class.php'; | |||
| include DedeInclude('templets/freelist_add.htm'); | |||
| exit(); | |||
| } else if ($dopost == 'save') { | |||
| @@ -26,10 +26,10 @@ if (empty($dopost)) { | |||
| exit(); | |||
| } | |||
| if (is_array($types)) { | |||
| foreach ($types as $v) $ntype .= $v . ' '; | |||
| foreach ($types as $v) $ntype .= $v.' '; | |||
| } | |||
| if ($ntype != '') $atts .= " type='" . trim($ntype) . "' "; | |||
| if ($ntype != '') $atts .= " type='".trim($ntype)."' "; | |||
| if (!empty($typeid)) $atts .= " typeid='$typeid' "; | |||
| if (!empty($channel)) $atts .= " channel='$channel' "; | |||
| if (!empty($subday)) $atts .= " subday='$subday' "; | |||
| @@ -9,15 +9,15 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| if (empty($dopost)) { | |||
| require_once DEDEINC . '/typelink.class.php'; | |||
| require_once DEDEINC . '/dedetag.class.php'; | |||
| require_once DEDEINC.'/typelink.class.php'; | |||
| require_once DEDEINC.'/dedetag.class.php'; | |||
| $aid = isset($aid) && is_numeric($aid) ? $aid : 0; | |||
| $row = $dsql->GetOne("Select * From `#@__freelist` where aid='$aid' "); | |||
| $dtp = new DedeTagParse(); | |||
| $dtp->SetNameSpace("dede", "{", "}"); | |||
| $dtp->LoadSource("--" . $row['listtag'] . "--"); | |||
| $dtp->LoadSource("--".$row['listtag']."--"); | |||
| $ctag = $dtp->GetTag('list'); | |||
| include DedeInclude('templets/freelist_edit.htm'); | |||
| exit(); | |||
| @@ -28,10 +28,10 @@ if (empty($dopost)) { | |||
| $ntype = ''; | |||
| $edtime = time(); | |||
| if (is_array($types)) { | |||
| foreach ($types as $v) $ntype .= $v . ' '; | |||
| foreach ($types as $v) $ntype .= $v.' '; | |||
| } | |||
| if ($ntype != '') $atts .= " type='" . trim($ntype) . "' "; | |||
| if ($ntype != '') $atts .= " type='".trim($ntype)."' "; | |||
| if (!empty($typeid)) $atts .= " typeid='$typeid' "; | |||
| if (!empty($channel)) $atts .= " channel='$channel' "; | |||
| if (!empty($subday)) $atts .= " subday='$subday' "; | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require(dirname(__FILE__) . "/config.php"); | |||
| require(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('plus_友情链接模块'); | |||
| if (empty($dopost)) $dopost = ""; | |||
| @@ -17,18 +17,18 @@ if ($dopost == "add") { | |||
| $dtime = time(); | |||
| if (is_uploaded_file($logoimg)) { | |||
| $names = split("\.", $logoimg_name); | |||
| $shortname = "." . $names[count($names) - 1]; | |||
| $shortname = ".".$names[count($names) - 1]; | |||
| if (!preg_match("#(jpg|gif|png)$#", $shortname)) { | |||
| $shortname = '.gif'; | |||
| } | |||
| $filename = MyDate("ymdHis", time()) . mt_rand(1000, 9999) . $shortname; | |||
| $imgurl = $cfg_medias_dir . "/flink"; | |||
| if (!is_dir($cfg_basedir . $imgurl)) { | |||
| MkdirAll($cfg_basedir . $imgurl, $cfg_dir_purview); | |||
| $filename = MyDate("ymdHis", time()).mt_rand(1000, 9999).$shortname; | |||
| $imgurl = $cfg_medias_dir."/flink"; | |||
| if (!is_dir($cfg_basedir.$imgurl)) { | |||
| MkdirAll($cfg_basedir.$imgurl, $cfg_dir_purview); | |||
| CloseFtp(); | |||
| } | |||
| $imgurl = $imgurl . "/" . $filename; | |||
| move_uploaded_file($logoimg, $cfg_basedir . $imgurl) or die("复制文件到:" . $cfg_basedir . $imgurl . "失败"); | |||
| $imgurl = $imgurl."/".$filename; | |||
| move_uploaded_file($logoimg, $cfg_basedir.$imgurl) or die("复制文件到:".$cfg_basedir.$imgurl."失败"); | |||
| @unlink($logoimg); | |||
| } else { | |||
| $imgurl = $logo; | |||
| @@ -48,7 +48,7 @@ if ($dopost == "add") { | |||
| ShowMsg("成功增加一个链接!", $burl, 0, 500); | |||
| exit(); | |||
| } else { | |||
| ShowMsg("增加链接时出错,请向官方反馈,原因:" . $dsql->GetError(), "javascript:;"); | |||
| ShowMsg("增加链接时出错,请向官方反馈,原因:".$dsql->GetError(), "javascript:;"); | |||
| exit(); | |||
| } | |||
| } | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('plus_友情链接模块'); | |||
| $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'friendlink_main.php' : $_COOKIE['ENV_GOBACK_URL']; | |||
| if (empty($dopost)) $dopost = ""; | |||
| @@ -40,15 +40,15 @@ if ($dopost == "delete") { | |||
| exit(); | |||
| } | |||
| } else if ($dopost == "saveedit") { | |||
| require_once DEDEINC . '/request.class.php'; | |||
| 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'); | |||
| $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', ''); | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(DEDEINC . '/datalistcp.class.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| require_once(DEDEINC.'/datalistcp.class.php'); | |||
| setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); | |||
| if (empty($keyword)) $keyword = ''; | |||
| @@ -29,7 +29,7 @@ $sql = "SELECT * FROM `#@__flink` WHERE CONCAT(`url`,`webname`,`email`) LIKE '% | |||
| $dlist = new DataListCP(); | |||
| $dlist->SetParameter('keyword', $keyword); | |||
| $dlist->SetParameter('ischeck', $ischeck); | |||
| $dlist->SetTemplet(DEDEADMIN . '/templets/friendlink_main.htm'); | |||
| $dlist->SetTemplet(DEDEADMIN.'/templets/friendlink_main.htm'); | |||
| $dlist->SetSource($sql); | |||
| $dlist->display(); | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| if (empty($dopost)) $dopost = ''; | |||
| //保存更改 | |||
| @@ -18,9 +18,9 @@ if ($dopost == "save") { | |||
| $endID = $idend; | |||
| for (; $startID <= $endID; $startID++) { | |||
| $query = ''; | |||
| $tid = ${'ID_' . $startID}; | |||
| $pname = ${'pname_' . $startID}; | |||
| if (isset(${'check_' . $startID})) { | |||
| $tid = ${'ID_'.$startID}; | |||
| $pname = ${'pname_'.$startID}; | |||
| if (isset(${'check_'.$startID})) { | |||
| if ($pname != '') { | |||
| $query = "UPDATE `#@__flinktype` SET typename='$pname' WHERE id='$tid' "; | |||
| $dsql->ExecuteNoneQuery($query); | |||
| @@ -9,19 +9,19 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| $action = isset($action) ? trim($action) : ''; | |||
| if (empty($action)) { | |||
| if (!@is_file($cfg_basedir . $file)) { | |||
| if (!@is_file($cfg_basedir.$file)) { | |||
| ShowMsg("对不起,必须选择站内的图片才能进行裁剪!<br />点击'<a href='./dialog/select_images.php?f=form1.picname&imgstick=small'>站内选择</a>', 上传或选择一个图片,然后才能进行裁剪!", "./dialog/select_images.php?f=form1.picname&imgstick=small", 0, 10000); | |||
| exit(); | |||
| } | |||
| include DEDEADMIN . '/templets/imagecut.htm'; | |||
| include DEDEADMIN.'/templets/imagecut.htm'; | |||
| exit(); | |||
| } elseif ($action == 'cut') { | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| if (!@is_file($cfg_basedir . $file)) { | |||
| if (!@is_file($cfg_basedir.$file)) { | |||
| ShowMsg('对不起,请重新选择裁剪图片!', '-1'); | |||
| exit(); | |||
| } | |||
| @@ -33,13 +33,13 @@ if (empty($action)) { | |||
| ShowMsg('对不起,请选择裁剪图片的尺寸!', '-1'); | |||
| exit(); | |||
| } | |||
| $imginfo = getimagesize($cfg_basedir . $file); | |||
| $imginfo = getimagesize($cfg_basedir.$file); | |||
| $imgw = $imginfo[0]; | |||
| $imgh = $imginfo[1]; | |||
| $temp = 400 / $imgw; | |||
| $newwidth = 400; | |||
| $newheight = $imgh * $temp; | |||
| $srcFile = $cfg_basedir . $file; | |||
| $srcFile = $cfg_basedir.$file; | |||
| $thumb = imagecreatetruecolor($newwidth, $newheight); | |||
| $thumba = imagecreatetruecolor($width, $height); | |||
| @@ -65,7 +65,7 @@ if (empty($action)) { | |||
| $ddpicok = $reObjJs = ''; | |||
| if (empty($isupload)) { | |||
| $ddpicok = preg_replace("#\." . $ddn . "$#", '-lp.' . $ddn, $file); | |||
| $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 { | |||
| @@ -74,7 +74,7 @@ if (empty($action)) { | |||
| var prvObj = window.opener.parent.document.getElementById('divpicview');\r\n"; | |||
| } | |||
| $ddpicokurl = $cfg_basedir . $ddpicok; | |||
| $ddpicokurl = $cfg_basedir.$ddpicok; | |||
| switch ($imginfo['mime']) { | |||
| case 'image/jpeg': | |||
| @@ -99,7 +99,7 @@ if (empty($action)) { | |||
| //如果从其它图中剪出, 保存附件信息 | |||
| 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() . "'); "; | |||
| VALUES ('$ddpicok','$ddpicok','1','0','0','0','".filesize($ddpicokurl)."','".time()."','".$cuserLogin->getUserID()."'); "; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| $fid = $dsql->GetLastID(); | |||
| AddMyAddon($fid, $ddpicok); | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/../config.php"); | |||
| require_once(dirname(__FILE__)."/../config.php"); | |||
| $cuserLogin = new userLogin(); | |||
| //后台功能操作配置项 | |||
| $actionSearch[0] = array( | |||
| @@ -33,7 +33,7 @@ $actionSearch[0] = array( | |||
| 'title' => '我发布的文档', | |||
| 'description' => '现在登录的管理员所发表的所有内容模型中的文档', | |||
| 'purview' => 'a_List,a_AccList,a_MyList', | |||
| 'linkurl' => 'content_list.php?mid=' . $cuserLogin->userID | |||
| 'linkurl' => 'content_list.php?mid='.$cuserLogin->userID | |||
| ), | |||
| 3 => array( | |||
| 'title' => '评论管理', | |||
| @@ -69,7 +69,7 @@ function GetFormItem($ctag) | |||
| } | |||
| if ($ctag->GetAtt("type") == "htmltext" || $ctag->GetAtt("type") == "textdata") { | |||
| $formitem = ""; | |||
| $formitem .= "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"80\">" . $ctag->GetAtt('itemname') . "</td><td>"; | |||
| $formitem .= "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"80\">".$ctag->GetAtt('itemname')."</td><td>"; | |||
| $formitem .= GetEditor($fieldname, '', 350, 'Basic', 'string'); | |||
| $formitem .= "</td></tr></table>\r\n"; | |||
| return $formitem; | |||
| @@ -86,22 +86,22 @@ function GetFormItem($ctag) | |||
| $formitem = str_replace("~form~", $innertext, $formitem); | |||
| return $formitem; | |||
| } else if ($ctag->GetAtt("type") == "img") { | |||
| $innertext = "<input type='text' name='$fieldname' id='$fieldname' style='width:300'><input name='" . $fieldname . "_bt' type='button' value='浏览...' onClick=\"SelectImage('form1.$fieldname','big')\">\r\n"; | |||
| $innertext = "<input type='text' name='$fieldname' id='$fieldname' style='width:300'><input name='".$fieldname."_bt' type='button' value='浏览...' onClick=\"SelectImage('form1.$fieldname','big')\">\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 = "<input type='text' name='$fieldname' id='$fieldname' style='width:300'><input name='" . $fieldname . "_bt' type='button' value='浏览...' onClick=\"SelectMedia('form1.$fieldname')\">\r\n"; | |||
| $innertext = "<input type='text' name='$fieldname' id='$fieldname' style='width:300'><input name='".$fieldname."_bt' type='button' value='浏览...' onClick=\"SelectMedia('form1.$fieldname')\">\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 = "<input type='text' name='$fieldname' id='$fieldname' style='width:300'><input name='" . $fieldname . "_bt' type='button' value='浏览...' onClick=\"SelectSoft('form1.$fieldname')\">\r\n"; | |||
| $innertext = "<input type='text' name='$fieldname' id='$fieldname' style='width:300'><input name='".$fieldname."_bt' type='button' value='浏览...' onClick=\"SelectSoft('form1.$fieldname')\">\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 = "<input type='text' name='$fieldname' id='$fieldname' style='width:300'><input name='" . $fieldname . "_bt' type='button' value='浏览...' onClick=\"SelectMedia('form1.$fieldname')\">\r\n"; | |||
| $innertext = "<input type='text' name='$fieldname' id='$fieldname' style='width:300'><input name='".$fieldname."_bt' type='button' value='浏览...' onClick=\"SelectMedia('form1.$fieldname')\">\r\n"; | |||
| $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); | |||
| $formitem = str_replace("~form~", $innertext, $formitem); | |||
| return $formitem; | |||
| @@ -147,28 +147,28 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') | |||
| } else if ($dtype == "textdata") { | |||
| if ($job == 'edit') { | |||
| $addvarDirs = explode('/', $addvar); | |||
| $addvarDir = preg_replace("#\/" . $addvarDirs[count($addvarDirs) - 1] . "$#", "", $addvar); | |||
| $mdir = $GLOBALS['cfg_basedir'] . $addvarDir; | |||
| $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"); | |||
| $fp = fopen($GLOBALS['cfg_basedir'].$addvar, "w"); | |||
| fwrite($fp, stripslashes($dvalue)); | |||
| fclose($fp); | |||
| CloseFtp(); | |||
| return $addvar; | |||
| } else { | |||
| $ipath = $GLOBALS['cfg_cmspath'] . "/data/textdata"; | |||
| $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)) { | |||
| 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); | |||
| 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"); | |||
| $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(); | |||
| @@ -180,24 +180,24 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') | |||
| return ""; | |||
| } | |||
| $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl)); | |||
| $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}"; | |||
| $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}"; | |||
| $imgurl = "{dede:img text='' width='".$reimgs[1]."' height='".$reimgs[2]."'} ".$reimgs[0]." {/dede:img}"; | |||
| } | |||
| } else { | |||
| $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}"; | |||
| $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; | |||
| } | |||
| } else if ($iurl != "") { | |||
| //站内图片 | |||
| $imgfile = $GLOBALS['cfg_basedir'] . $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}"; | |||
| $imgurl = "{dede:img text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}"; | |||
| } | |||
| } | |||
| return addslashes($imgurl); | |||
| @@ -271,8 +271,8 @@ function GetFormItemValue($ctag, $fvalue) | |||
| //文本数据的特殊处理 | |||
| if ($ctag->GetAtt("type") == "textdata") { | |||
| if (is_file($GLOBALS['cfg_basedir'] . $fvalue)) { | |||
| $fp = fopen($GLOBALS['cfg_basedir'] . $fvalue, 'r'); | |||
| if (is_file($GLOBALS['cfg_basedir'].$fvalue)) { | |||
| $fp = fopen($GLOBALS['cfg_basedir'].$fvalue, 'r'); | |||
| $okfvalue = ""; | |||
| while (!feof($fp)) { | |||
| $okfvalue .= fgets($fp, 1024); | |||
| @@ -281,14 +281,14 @@ function GetFormItemValue($ctag, $fvalue) | |||
| } else { | |||
| $okfvalue = ""; | |||
| } | |||
| $formitem = "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"80\">" . $ctag->GetAtt('itemname') . "</td>\r\n"; | |||
| $formitem .= "<td>\r\n" . GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string') . "</td>\r\n"; | |||
| $formitem = "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"80\">".$ctag->GetAtt('itemname')."</td>\r\n"; | |||
| $formitem .= "<td>\r\n".GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')."</td>\r\n"; | |||
| $formitem .= "</tr></table>\r\n"; | |||
| $formitem .= "<input type='hidden' name='{$fieldname}_file' value='{$fvalue}'>\r\n"; | |||
| return $formitem; | |||
| } else if ($ctag->GetAtt("type") == "htmltext") { | |||
| $formitem = "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"80\">" . $ctag->GetAtt('itemname') . "</td>\r\n"; | |||
| $formitem .= "<td>\r\n" . GetEditor($fieldname, $fvalue, 350, 'Basic', 'string') . "</td>\r\n"; | |||
| $formitem = "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"80\">".$ctag->GetAtt('itemname')."</td>\r\n"; | |||
| $formitem .= "<td>\r\n".GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')."</td>\r\n"; | |||
| $formitem .= "</tr></table>\r\n"; | |||
| return $formitem; | |||
| } else if ($ctag->GetAtt("type") == "multitext") { | |||
| @@ -312,17 +312,17 @@ function GetFormItemValue($ctag, $fvalue) | |||
| } | |||
| $ntag = $ndtp->GetTag("img"); | |||
| $fvalue = trim($ntag->GetInnerText()); | |||
| $innertext = "<input type='text' name='$fieldname' value='$fvalue' id='$fieldname' style='width:300'><input name='" . $fieldname . "_bt' type='button' value='浏览...' onClick=\"SelectImage('form1.$fieldname','big')\">\r\n"; | |||
| $innertext = "<input type='text' name='$fieldname' value='$fvalue' id='$fieldname' style='width:300'><input name='".$fieldname."_bt' type='button' value='浏览...' onClick=\"SelectImage('form1.$fieldname','big')\">\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 = "<input type='text' name='$fieldname' value='$fvalue' id='$fieldname' style='width:300'><input name='" . $fieldname . "_bt' type='button' value='浏览...' onClick=\"SelectMedia('form1.$fieldname')\">\r\n"; | |||
| $innertext = "<input type='text' name='$fieldname' value='$fvalue' id='$fieldname' style='width:300'><input name='".$fieldname."_bt' type='button' value='浏览...' onClick=\"SelectMedia('form1.$fieldname')\">\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 = "<input type='text' name='$fieldname' id='$fieldname' value='$fvalue' style='width:300'><input name='" . $fieldname . "_bt' type='button' value='浏览...' onClick=\"SelectSoft('form1.$fieldname')\">\r\n"; | |||
| $innertext = "<input type='text' name='$fieldname' id='$fieldname' value='$fvalue' style='width:300'><input name='".$fieldname."_bt' type='button' value='浏览...' onClick=\"SelectSoft('form1.$fieldname')\">\r\n"; | |||
| $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); | |||
| $formitem = str_replace("~form~", $innertext, $formitem); | |||
| return $formitem; | |||
| @@ -9,14 +9,14 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(DEDEINC . '/dedehttpdown.class.php'); | |||
| require_once(DEDEINC . '/image.func.php'); | |||
| require_once(DEDEINC . '/archives.func.php'); | |||
| require_once(DEDEINC . '/arc.partview.class.php'); | |||
| require_once(DEDEINC.'/dedehttpdown.class.php'); | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/archives.func.php'); | |||
| require_once(DEDEINC.'/arc.partview.class.php'); | |||
| $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : ''; | |||
| $backurl = preg_match("#content_#", $backurl) ? "<a href='$backurl' class='btn btn-success btn-sm'>记忆的列表页</a>  " : ''; | |||
| if (!isset($_NOT_ARCHIVES)) { | |||
| require_once(DEDEINC . '/customfields.func.php'); | |||
| require_once(DEDEINC.'/customfields.func.php'); | |||
| } | |||
| /** | |||
| @@ -32,35 +32,35 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) | |||
| { | |||
| global $dsql, $cfg_multi_site, $cfg_basehost, $cfg_ddimg_width; | |||
| global $cfg_basedir, $pagestyle, $cuserLogin, $cfg_addon_savetype; | |||
| require_once(DEDEINC . '/dedecollection.func.php'); | |||
| require_once(DEDEINC.'/dedecollection.func.php'); | |||
| if (empty($cfg_ddimg_width)) $cfg_ddimg_width = 320; | |||
| $rsimg = ''; | |||
| $cfg_uploaddir = $GLOBALS['cfg_image_dir']; | |||
| $cfg_basedir = $GLOBALS['cfg_basedir']; | |||
| $basehost = 'http://' . $_SERVER['HTTP_HOST']; | |||
| $basehost = 'http://'.$_SERVER['HTTP_HOST']; | |||
| $img_array = array(); | |||
| preg_match_all("/(src)=[\"|'| ]{0,}(http:\/\/([^>]*)\.(gif|jpg|png))/isU", $body, $img_array); | |||
| $img_array = array_unique($img_array[2]); | |||
| $imgUrl = $cfg_uploaddir . '/' . MyDate($cfg_addon_savetype, time()); | |||
| $imgPath = $cfg_basedir . $imgUrl; | |||
| if (!is_dir($imgPath . '/')) { | |||
| $imgUrl = $cfg_uploaddir.'/'.MyDate($cfg_addon_savetype, time()); | |||
| $imgPath = $cfg_basedir.$imgUrl; | |||
| if (!is_dir($imgPath.'/')) { | |||
| MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); | |||
| CloseFtp(); | |||
| } | |||
| $milliSecond = 'co' . dd2char(MyDate('ymdHis', time())); | |||
| $milliSecond = 'co'.dd2char(MyDate('ymdHis', time())); | |||
| foreach ($img_array as $key => $value) { | |||
| $value = trim($value); | |||
| if ( | |||
| preg_match("#" . $basehost . "#i", $value) || !preg_match("#^http:\/\/#i", $value) | |||
| || ($cfg_basehost != $basehost && preg_match("#" . $cfg_basehost . "#i", $value)) | |||
| preg_match("#".$basehost."#i", $value) || !preg_match("#^http:\/\/#i", $value) | |||
| || ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value)) | |||
| ) { | |||
| continue; | |||
| } | |||
| $itype = substr($value, -4, 4); | |||
| if (!preg_match("#\.(gif|jpg|png)#", $itype)) $itype = ".jpg"; | |||
| $rndFileName = $imgPath . '/' . $milliSecond . '-' . $key . $itype; | |||
| $iurl = $imgUrl . '/' . $milliSecond . '-' . $key . $itype; | |||
| $rndFileName = $imgPath.'/'.$milliSecond.'-'.$key.$itype; | |||
| $iurl = $imgUrl.'/'.$milliSecond.'-'.$key.$itype; | |||
| //下载并保存文件 | |||
| $rs = DownImageKeep($value, $rfurl, $rndFileName, '', 0, 30); | |||
| @@ -68,10 +68,10 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) | |||
| $info = ''; | |||
| $imginfos = GetImageSize($rndFileName, $info); | |||
| $fsize = filesize($rndFileName); | |||
| $filename = $milliSecond . '-' . $key . $itype; | |||
| $filename = $milliSecond.'-'.$key.$itype; | |||
| //保存图片附件信息 | |||
| $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | |||
| VALUES ('0','$filename','$iurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','" . time() . "','" . $cuserLogin->getUserID() . "'); "; | |||
| VALUES ('0','$filename','$iurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','".time()."','".$cuserLogin->getUserID()."'); "; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| $fid = $dsql->GetLastID(); | |||
| AddMyAddon($fid, $iurl); | |||
| @@ -82,12 +82,12 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) | |||
| } | |||
| if (empty($firstdd) && !empty($litpicname)) { | |||
| $firstdd = $litpicname; | |||
| if (!file_exists($cfg_basedir . $firstdd)) { | |||
| if (!file_exists($cfg_basedir.$firstdd)) { | |||
| $firstdd = $iurl; | |||
| } | |||
| } | |||
| @WaterImg($rndFileName, 'down'); | |||
| $rsimg .= "{dede:img ddimg='$litpicname' text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; | |||
| $rsimg .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
| } | |||
| } | |||
| return $rsimg; | |||
| @@ -105,23 +105,23 @@ function GetCurContent($body) | |||
| global $cfg_multi_site, $cfg_basehost, $cfg_basedir, $cfg_image_dir, $arcID, $cuserLogin, $dsql; | |||
| $cfg_uploaddir = $cfg_image_dir; | |||
| $htd = new DedeHttpDown(); | |||
| $basehost = "http://" . $_SERVER["HTTP_HOST"]; | |||
| $basehost = "http://".$_SERVER["HTTP_HOST"]; | |||
| $img_array = array(); | |||
| preg_match_all("/src=[\"|'|\s]([^\"|^\'|^\s]*?)/isU", $body, $img_array); | |||
| $img_array = array_unique($img_array[1]); | |||
| $imgUrl = $cfg_uploaddir . '/' . MyDate("ymd", time()); | |||
| $imgPath = $cfg_basedir . $imgUrl; | |||
| if (!is_dir($imgPath . '/')) { | |||
| $imgUrl = $cfg_uploaddir.'/'.MyDate("ymd", time()); | |||
| $imgPath = $cfg_basedir.$imgUrl; | |||
| if (!is_dir($imgPath.'/')) { | |||
| MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); | |||
| CloseFtp(); | |||
| } | |||
| $milliSecond = MyDate('His', time()); | |||
| foreach ($img_array as $key => $value) { | |||
| if (preg_match("#" . $basehost . "#i", $value)) { | |||
| if (preg_match("#".$basehost."#i", $value)) { | |||
| continue; | |||
| } | |||
| if ($cfg_basehost != $basehost && preg_match("#" . $cfg_basehost . "#i", $value)) { | |||
| if ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value)) { | |||
| continue; | |||
| } | |||
| if (!preg_match("#^(http|https):\/\/#i", $value)) { | |||
| @@ -140,10 +140,10 @@ function GetCurContent($body) | |||
| $itype = '.jpg'; | |||
| } | |||
| } | |||
| $milliSecondN = dd2char($milliSecond . mt_rand(1000, 8000)); | |||
| $milliSecondN = dd2char($milliSecond.mt_rand(1000, 8000)); | |||
| $value = trim($value); | |||
| $rndFileName = $imgPath . '/' . $milliSecondN . '-' . $key . $itype; | |||
| $fileurl = $imgUrl . '/' . $milliSecondN . '-' . $key . $itype; | |||
| $rndFileName = $imgPath.'/'.$milliSecondN.'-'.$key.$itype; | |||
| $fileurl = $imgUrl.'/'.$milliSecondN.'-'.$key.$itype; | |||
| $rs = $htd->SaveToBin($rndFileName); | |||
| if ($rs) { | |||
| @@ -152,12 +152,12 @@ function GetCurContent($body) | |||
| $fsize = filesize($rndFileName); | |||
| //保存图片附件信息 | |||
| $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | |||
| VALUES ('{$arcID}','$rndFileName','$fileurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','" . time() . "','" . $cuserLogin->getUserID() . "'); "; | |||
| VALUES ('{$arcID}','$rndFileName','$fileurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','".time()."','".$cuserLogin->getUserID()."'); "; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| $fid = $dsql->GetLastID(); | |||
| AddMyAddon($fid, $fileurl); | |||
| if ($cfg_multi_site == 'Y') { | |||
| $fileurl = $cfg_basehost . $fileurl; | |||
| $fileurl = $cfg_basehost.$fileurl; | |||
| } | |||
| $body = str_replace($value, $fileurl, $body); | |||
| @WaterImg($rndFileName, 'down'); | |||
| @@ -187,8 +187,8 @@ function GetRemoteImage($url, $uid = 0) | |||
| if (!in_array($htd->GetHead("content-type"), $sparr)) { | |||
| return ''; | |||
| } else { | |||
| $imgUrl = $cfg_uploaddir . '/' . MyDate($cfg_addon_savetype, time()); | |||
| $imgPath = $cfg_basedir . $imgUrl; | |||
| $imgUrl = $cfg_uploaddir.'/'.MyDate($cfg_addon_savetype, time()); | |||
| $imgPath = $cfg_basedir.$imgUrl; | |||
| CreateDir($imgUrl); | |||
| $itype = $htd->GetHead("content-type"); | |||
| if ($itype == "image/gif") { | |||
| @@ -200,9 +200,9 @@ function GetRemoteImage($url, $uid = 0) | |||
| } else { | |||
| $itype = '.jpg'; | |||
| } | |||
| $rndname = dd2char($uid . '_' . MyDate('mdHis', time()) . mt_rand(1000, 9999)); | |||
| $rndtrueName = $imgPath . '/' . $rndname . $itype; | |||
| $fileurl = $imgUrl . '/' . $rndname . $itype; | |||
| $rndname = dd2char($uid.'_'.MyDate('mdHis', time()).mt_rand(1000, 9999)); | |||
| $rndtrueName = $imgPath.'/'.$rndname.$itype; | |||
| $fileurl = $imgUrl.'/'.$rndname.$itype; | |||
| $ok = $htd->SaveToBin($rndtrueName); | |||
| @WaterImg($rndtrueName, 'down'); | |||
| if ($ok) { | |||
| @@ -235,13 +235,13 @@ function GetRemoteFlash($url, $uid = 0) | |||
| if ($htd->GetHead("content-type") != $sparr) { | |||
| return ''; | |||
| } else { | |||
| $imgUrl = $cfg_uploaddir . '/' . MyDate($cfg_addon_savetype, time()); | |||
| $imgPath = $cfg_basedir . $imgUrl; | |||
| $imgUrl = $cfg_uploaddir.'/'.MyDate($cfg_addon_savetype, time()); | |||
| $imgPath = $cfg_basedir.$imgUrl; | |||
| CreateDir($imgUrl); | |||
| $itype = '.swf'; | |||
| $milliSecond = $uid . '_' . MyDate('mdHis', time()); | |||
| $rndFileName = $imgPath . '/' . $milliSecond . $itype; | |||
| $fileurl = $imgUrl . '/' . $milliSecond . $itype; | |||
| $milliSecond = $uid.'_'.MyDate('mdHis', time()); | |||
| $rndFileName = $imgPath.'/'.$milliSecond.$itype; | |||
| $fileurl = $imgUrl.'/'.$milliSecond.$itype; | |||
| $ok = $htd->SaveToBin($rndFileName); | |||
| if ($ok) { | |||
| $revalues = $fileurl; | |||
| @@ -309,7 +309,7 @@ function SpLongBody($mybody, $spsize, $sptag) | |||
| $npageBody .= $bds[$i]; | |||
| continue; | |||
| } | |||
| $bds[$i] = "<" . $bds[$i]; | |||
| $bds[$i] = "<".$bds[$i]; | |||
| if (strlen($bds[$i]) > 6) { | |||
| $tname = substr($bds[$i], 1, 5); | |||
| if (strtolower($tname) == 'table') { | |||
| @@ -327,7 +327,7 @@ function SpLongBody($mybody, $spsize, $sptag) | |||
| $npageBody .= $bds[$i]; | |||
| } | |||
| if (strlen($npageBody) > $spsize) { | |||
| $mybody .= $npageBody . $sptag; | |||
| $mybody .= $npageBody.$sptag; | |||
| $npageBody = ''; | |||
| } | |||
| } | |||
| @@ -349,7 +349,7 @@ function SpLongBody($mybody, $spsize, $sptag) | |||
| function MakeArt($aid, $mkindex = FALSE, $ismakesign = FALSE, $isremote = 0) | |||
| { | |||
| global $envs, $typeid; | |||
| require_once(DEDEINC . '/arc.archives.class.php'); | |||
| require_once(DEDEINC.'/arc.archives.class.php'); | |||
| if ($ismakesign) $envs['makesign'] = 'yes'; | |||
| $arc = new Archives($aid); | |||
| $reurl = $arc->MakeHtml($isremote); | |||
| @@ -400,25 +400,25 @@ function GetDDImage($litpic, $picname, $isremote) | |||
| ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); | |||
| exit(); | |||
| } | |||
| $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||
| $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||
| CreateDir($savepath); | |||
| $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); | |||
| $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
| if (strtolower($_FILES[$litpic]['type']) == "image/gif") { | |||
| $fullUrl = $fullUrl . ".gif"; | |||
| $fullUrl = $fullUrl.".gif"; | |||
| } else if (strtolower($_FILES[$litpic]['type']) == "image/png") { | |||
| $fullUrl = $fullUrl . ".png"; | |||
| $fullUrl = $fullUrl.".png"; | |||
| } else { | |||
| $fullUrl = $fullUrl . ".jpg"; | |||
| $fullUrl = $fullUrl.".jpg"; | |||
| } | |||
| @move_uploaded_file($_FILES[$litpic]['tmp_name'], $cfg_basedir . $fullUrl); | |||
| @move_uploaded_file($_FILES[$litpic]['tmp_name'], $cfg_basedir.$fullUrl); | |||
| $litpic = $fullUrl; | |||
| if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir . $fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); | |||
| else @ImageResize($cfg_basedir . $fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); | |||
| if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir.$fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); | |||
| else @ImageResize($cfg_basedir.$fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); | |||
| $img = $cfg_basedir . $litpic; | |||
| $img = $cfg_basedir.$litpic; | |||
| } else { | |||
| $picname = trim($picname); | |||
| @@ -431,17 +431,17 @@ function GetDDImage($litpic, $picname, $isremote) | |||
| } else { | |||
| $litpic = $ddinfos[0]; | |||
| if ($ddinfos[1] > $cfg_ddimg_width || $ddinfos[2] > $cfg_ddimg_height) { | |||
| if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir . $litpic, $cfg_ddimg_width, $cfg_ddimg_height); | |||
| else @ImageResize($cfg_basedir . $litpic, $cfg_ddimg_width, $cfg_ddimg_height); | |||
| if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir.$litpic, $cfg_ddimg_width, $cfg_ddimg_height); | |||
| else @ImageResize($cfg_basedir.$litpic, $cfg_ddimg_width, $cfg_ddimg_height); | |||
| } | |||
| } | |||
| } else { | |||
| if ($litpic == 'ddfirst' && !preg_match("#^http:\/\/#i", $picname)) { | |||
| $oldpic = $cfg_basedir . $picname; | |||
| $oldpic = $cfg_basedir.$picname; | |||
| $litpic = str_replace('.', '-lp.', $picname); | |||
| if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir . $litpic); | |||
| else @ImageResize($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir . $litpic); | |||
| if (!is_file($cfg_basedir . $litpic)) $litpic = ''; | |||
| if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir.$litpic); | |||
| else @ImageResize($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir.$litpic); | |||
| if (!is_file($cfg_basedir.$litpic)) $litpic = ''; | |||
| } else { | |||
| $litpic = $picname; | |||
| return $litpic; | |||
| @@ -513,12 +513,12 @@ function PrintAutoFieldsAdd($fieldset, $loadtype = 'all') | |||
| $loadtype != 'autofield' | |||
| || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) | |||
| ) { | |||
| $dede_addonfields .= ($dede_addonfields == "" ? $ctag->GetName() . "," . $ctag->GetAtt('type') : ";" . $ctag->GetName() . "," . $ctag->GetAtt('type')); | |||
| $dede_addonfields .= ($dede_addonfields == "" ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); | |||
| echo GetFormItemA($ctag); | |||
| } | |||
| } | |||
| } | |||
| echo "<input type='hidden' name='dede_addonfields' value=\"" . $dede_addonfields . "\">\r\n"; | |||
| echo "<input type='hidden' name='dede_addonfields' value=\"".$dede_addonfields."\">\r\n"; | |||
| } | |||
| /** | |||
| @@ -542,12 +542,12 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all') | |||
| $loadtype != 'autofield' | |||
| || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) | |||
| ) { | |||
| $dede_addonfields .= ($dede_addonfields == '' ? $ctag->GetName() . "," . $ctag->GetAtt('type') : ";" . $ctag->GetName() . "," . $ctag->GetAtt('type')); | |||
| $dede_addonfields .= ($dede_addonfields == '' ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); | |||
| echo GetFormItemValueA($ctag, $fieldValues[$ctag->GetName()]); | |||
| } | |||
| } | |||
| } | |||
| echo "<input type='hidden' name='dede_addonfields' value=\"" . $dede_addonfields . "\">\r\n"; | |||
| echo "<input type='hidden' name='dede_addonfields' value=\"".$dede_addonfields."\">\r\n"; | |||
| } | |||
| @@ -579,8 +579,8 @@ 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")); | |||
| if (file_exists(DEDEDATA."/admin/allowurl.txt")) { | |||
| $allow_urls = array_merge($allow_urls, file(DEDEDATA."/admin/allowurl.txt")); | |||
| } | |||
| $body = Replace_Links($body, $allow_urls); | |||
| } | |||
| @@ -607,11 +607,11 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||
| $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | |||
| $client->appid = $cfg_bizcore_appid; | |||
| $client->key = $cfg_bizcore_key; | |||
| $data = $client->Spliteword($subject . Html2Text($message)); | |||
| $data = $client->Spliteword($subject.Html2Text($message)); | |||
| $keywords = $data->data; | |||
| $client->Close(); | |||
| } else { | |||
| include_once(DEDEINC . '/splitword.class.php'); | |||
| include_once(DEDEINC.'/splitword.class.php'); | |||
| $keywords = ''; | |||
| $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); | |||
| $sp->SetSource($subject, $cfg_soft_lang, $cfg_soft_lang); | |||
| @@ -623,19 +623,19 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||
| if (is_array($allindexs) && is_array($titleindexs)) { | |||
| foreach ($titleindexs as $k => $v) { | |||
| if (strlen($keywords . $k) >= 60) { | |||
| if (strlen($keywords.$k) >= 60) { | |||
| break; | |||
| } else { | |||
| if (strlen($k) <= 2) continue; | |||
| $keywords .= $k . ','; | |||
| $keywords .= $k.','; | |||
| } | |||
| } | |||
| foreach ($allindexs as $k => $v) { | |||
| if (strlen($keywords . $k) >= 60) { | |||
| if (strlen($keywords.$k) >= 60) { | |||
| break; | |||
| } else if (!in_array($k, $titleindexs)) { | |||
| if (strlen($k) <= 2) continue; | |||
| $keywords .= $k . ','; | |||
| $keywords .= $k.','; | |||
| } | |||
| } | |||
| } | |||
| @@ -667,7 +667,7 @@ function Replace_Links(&$body, $allow_urls = array()) | |||
| $rparr = array(); | |||
| $tgarr = array(); | |||
| foreach ($arr[0] as $i => $v) { | |||
| if ($host_rule != '' && preg_match('#' . $host_rule . '#i', $arr[1][$i])) { | |||
| if ($host_rule != '' && preg_match('#'.$host_rule.'#i', $arr[1][$i])) { | |||
| continue; | |||
| } else { | |||
| $rparr[] = $v; | |||
| @@ -694,18 +694,18 @@ function GetImageMapDD($filename, $maxwidth) | |||
| { | |||
| global $cuserLogin, $dsql, $cfg_ddimg_height, $cfg_ddimg_full; | |||
| $ddn = substr($filename, -3); | |||
| $ddpicok = preg_replace("#\." . $ddn . "$#", "-lp." . $ddn, $filename); | |||
| $toFile = $GLOBALS['cfg_basedir'] . $ddpicok; | |||
| $ddpicok = preg_replace("#\.".$ddn."$#", "-lp.".$ddn, $filename); | |||
| $toFile = $GLOBALS['cfg_basedir'].$ddpicok; | |||
| if ($cfg_ddimg_full == 'Y') ImageResizeNew($GLOBALS['cfg_basedir'] . $filename, $maxwidth, $cfg_ddimg_height, $toFile); | |||
| else ImageResize($GLOBALS['cfg_basedir'] . $filename, $maxwidth, $cfg_ddimg_height, $toFile); | |||
| if ($cfg_ddimg_full == 'Y') ImageResizeNew($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); | |||
| else ImageResize($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); | |||
| //保存图片附件信息 | |||
| $fsize = filesize($toFile); | |||
| $ddpicoks = explode('/', $ddpicok); | |||
| $filename = $ddpicoks[count($ddpicoks) - 1]; | |||
| $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | |||
| VALUES ('0','$filename','$ddpicok','1','0','0','0','$fsize','" . time() . "','" . $cuserLogin->getUserID() . "'); "; | |||
| VALUES ('0','$filename','$ddpicok','1','0','0','0','$fsize','".time()."','".$cuserLogin->getUserID()."'); "; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| $fid = $dsql->GetLastID(); | |||
| AddMyAddon($fid, $ddpicok); | |||
| @@ -744,31 +744,31 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||
| ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); | |||
| exit(); | |||
| } | |||
| if (!empty($handurl) && !preg_match("#^http:\/\/#i", $handurl) && file_exists($cfg_basedir . $handurl)) { | |||
| if (!empty($handurl) && !preg_match("#^http:\/\/#i", $handurl) && file_exists($cfg_basedir.$handurl)) { | |||
| if (!is_object($dsql)) { | |||
| $dsql = new DedeSql(); | |||
| } | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '$handurl' "); | |||
| $fullUrl = preg_replace("#\.([a-z]*)$#i", "", $handurl); | |||
| } else { | |||
| $savepath = $cfg_image_dir . '/' . strftime("%Y-%m", $ntime); | |||
| $savepath = $cfg_image_dir.'/'.strftime("%Y-%m", $ntime); | |||
| CreateDir($savepath); | |||
| $fullUrl = $savepath . '/' . strftime("%d", $ntime) . dd2char(strftime("%H%M%S", $ntime) . '0' . $cuserLogin->getUserID() . '0' . mt_rand(1000, 9999)); | |||
| $fullUrl = $savepath.'/'.strftime("%d", $ntime).dd2char(strftime("%H%M%S", $ntime).'0'.$cuserLogin->getUserID().'0'.mt_rand(1000, 9999)); | |||
| } | |||
| if (strtolower($_FILES[$upname]['type']) == "image/gif") { | |||
| $fullUrl = $fullUrl . ".gif"; | |||
| $fullUrl = $fullUrl.".gif"; | |||
| } else if (strtolower($_FILES[$upname]['type']) == "image/png") { | |||
| $fullUrl = $fullUrl . ".png"; | |||
| $fullUrl = $fullUrl.".png"; | |||
| } else { | |||
| $fullUrl = $fullUrl . ".jpg"; | |||
| $fullUrl = $fullUrl.".jpg"; | |||
| } | |||
| //保存 | |||
| @move_uploaded_file($_FILES[$upname]['tmp_name'], $cfg_basedir . $fullUrl); | |||
| @move_uploaded_file($_FILES[$upname]['tmp_name'], $cfg_basedir.$fullUrl); | |||
| $filename = $fullUrl; | |||
| //水印 | |||
| @WaterImg($cfg_basedir . $fullUrl, 'up'); | |||
| @WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
| $isrm_up = TRUE; | |||
| } | |||
| @@ -793,7 +793,7 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||
| $filename = $handurl; | |||
| } | |||
| } | |||
| $imgfile = $cfg_basedir . $filename; | |||
| $imgfile = $cfg_basedir.$filename; | |||
| if (is_file($imgfile) && $isrm_up && $filename != '') { | |||
| $info = ""; | |||
| $imginfos = GetImageSize($imgfile, $info); | |||
| @@ -801,7 +801,7 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||
| //把新上传的图片信息保存到媒体文档管理档案中 | |||
| $inquery = " | |||
| INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | |||
| VALUES ('$title','$filename','1','" . $imginfos[0] . "','" . $imginfos[1] . "','0','" . filesize($imgfile) . "','" . time() . "','" . $cuserLogin->getUserID() . "'); | |||
| VALUES ('$title','$filename','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".time()."','".$cuserLogin->getUserID()."'); | |||
| "; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| } | |||
| @@ -823,7 +823,7 @@ function GetUpdateTest() | |||
| if ($cfg_makeindex == 'Y') $dolist .= empty($dolist) ? 'makeindex' : ',makeindex'; | |||
| if ($cfg_make_andcat == 'Y') $dolist .= empty($dolist) ? 'makeparenttype' : ',makeparenttype'; | |||
| $dolists = explode(',', $dolist); | |||
| $jumpUrl = "task_do.php?typeid={$typeid}&aid={$arcID}&dopost={$dolists[0]}&nextdo=" . preg_replace("#" . $dolists[0] . "[,]{0,1}#", '', $dolist); | |||
| $jumpUrl = "task_do.php?typeid={$typeid}&aid={$arcID}&dopost={$dolists[0]}&nextdo=".preg_replace("#".$dolists[0]."[,]{0,1}#", '', $dolist); | |||
| $revalue = "<table width='80%' style='border:1px dashed #cdcdcd;margin-left:20px;margin-bottom:15px' id='tgtable' align='left'><tr><td bgcolor='#EBF5C9'> <strong>正在进行相关内容更新,请完成前不要进行其它操作:</strong>\r\n</td></tr>\r\n"; | |||
| $revalue .= "<tr><td>\r\n<iframe name='stafrm' frameborder='0' id='stafrm' width='100%' height='200px' src='$jumpUrl'></iframe>\r\n</td></tr>\r\n"; | |||
| $revalue .= "</table>"; | |||
| @@ -96,14 +96,14 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) | |||
| $addfile = $row['url']; | |||
| $aid = $row['aid']; | |||
| $dsql->ExecuteNoneQuery("Delete From `#@__uploads` where aid = '$aid' "); | |||
| $upfile = $cfg_basedir . $addfile; | |||
| $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"; | |||
| $filenameh = DEDEDATA."/textdata/".(ceil($aid / 5000))."/{$aid}-".substr(md5($cfg_cookie_encode), 0, 16).".txt"; | |||
| if (@is_file($filenameh)) @unlink($filenameh); | |||
| } | |||
| @@ -132,14 +132,14 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) | |||
| $arcRow['filename'] | |||
| ); | |||
| if (!preg_match("#\?#", $arcurl)) { | |||
| $htmlfile = GetTruePath() . str_replace($GLOBALS['cfg_basehost'], '', $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; | |||
| $htmlfile = $fname."_{$i}.".$sname; | |||
| if (@file_exists($htmlfile)) @unlink($htmlfile); | |||
| else break; | |||
| } | |||
| @@ -33,8 +33,8 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||
| //当前选中的栏目 | |||
| if ($selid > 0) { | |||
| $row = $dsql->GetOne("SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id='$selid'"); | |||
| if ($row['ispart'] == 1) $OptionArrayList .= "<option value='" . $row['id'] . "' class='option1' selected='selected'>" . $row['typename'] . "(封面频道)</option>\r\n"; | |||
| else $OptionArrayList .= "<option value='" . $row['id'] . "' selected='selected'>" . $row['typename'] . "</option>\r\n"; | |||
| if ($row['ispart'] == 1) $OptionArrayList .= "<option value='".$row['id']."' class='option1' selected='selected'>".$row['typename']."(封面频道)</option>\r\n"; | |||
| else $OptionArrayList .= "<option value='".$row['id']."' selected='selected'>".$row['typename']."</option>\r\n"; | |||
| } | |||
| //是否限定用户管理的栏目 | |||
| @@ -48,9 +48,9 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||
| $topidstr = ''; | |||
| while ($row = $dsql->GetObject('qq')) { | |||
| if ($row->reid == 0) continue; | |||
| $topidstr .= ($topidstr == '' ? $row->reid : ',' . $row->reid); | |||
| $topidstr .= ($topidstr == '' ? $row->reid : ','.$row->reid); | |||
| } | |||
| $admin_catalog .= ',' . $topidstr; | |||
| $admin_catalog .= ','.$topidstr; | |||
| $admin_catalogs = explode(',', $admin_catalog); | |||
| $admin_catalogs = array_unique($admin_catalogs); | |||
| $admin_catalog = join(',', $admin_catalogs); | |||
| @@ -68,17 +68,17 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||
| $sonCats = ''; | |||
| LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); | |||
| if ($sonCats != '') { | |||
| if ($row->ispart == 1) $OptionArrayList .= "<option value='" . $row->id . "' class='option1'>" . $row->typename . "(封面频道)</option>\r\n"; | |||
| if ($row->ispart == 1) $OptionArrayList .= "<option value='".$row->id."' class='option1'>".$row->typename."(封面频道)</option>\r\n"; | |||
| else if ($row->ispart == 2) $OptionArrayList .= ''; | |||
| else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "<option value='" . $row->id . "' class='option2'>" . $row->typename . "(" . $channels[$row->channeltype] . ")</option>\r\n"; | |||
| else $OptionArrayList .= "<option value='" . $row->id . "' class='option3'>" . $row->typename . "</option>\r\n"; | |||
| else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "<option value='".$row->id."' class='option2'>".$row->typename."(".$channels[$row->channeltype].")</option>\r\n"; | |||
| else $OptionArrayList .= "<option value='".$row->id."' class='option3'>".$row->typename."</option>\r\n"; | |||
| $OptionArrayList .= $sonCats; | |||
| } else { | |||
| if ($row->ispart == 0 && (!empty($channeltype) && $row->channeltype == $channeltype)) { | |||
| $OptionArrayList .= "<option value='" . $row->id . "' class='option3'>" . $row->typename . "</option>\r\n"; | |||
| $OptionArrayList .= "<option value='".$row->id."' class='option3'>".$row->typename."</option>\r\n"; | |||
| } else if ($row->ispart == 0 && empty($channeltype)) { | |||
| // 专题 | |||
| $OptionArrayList .= "<option value='" . $row->id . "' class='option3'>" . $row->typename . "</option>\r\n"; | |||
| $OptionArrayList .= "<option value='".$row->id."' class='option3'>".$row->typename."</option>\r\n"; | |||
| } | |||
| } | |||
| } | |||
| @@ -88,17 +88,17 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||
| 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->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 .= "<option value='" . $row->id . "' class='option1'>$step" . $row->typename . "</option>\r\n"; | |||
| $sonCats .= "<option value='".$row->id."' class='option1'>$step".$row->typename."</option>\r\n"; | |||
| } else if (($row->channeltype == $channeltype && $row->ispart == 0) || empty($channeltype)) { | |||
| $sonCats .= "<option value='" . $row->id . "' class='option3'>$step" . $row->typename . "</option>\r\n"; | |||
| $sonCats .= "<option value='".$row->id."' class='option3'>$step".$row->typename."</option>\r\n"; | |||
| } | |||
| LogicGetOptionArray($row->id, $step . '─', $channeltype, $dsql, $sonCats); | |||
| LogicGetOptionArray($row->id, $step.'─', $channeltype, $dsql, $sonCats); | |||
| } | |||
| } | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(DEDEINC . '/charset.func.php'); | |||
| require_once(DEDEINC.'/charset.func.php'); | |||
| /** | |||
| * 获取一个页面 | |||
| @@ -24,7 +24,7 @@ function CoOnePage($gurl) | |||
| $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'] . "' "); | |||
| $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']); | |||
| @@ -10,7 +10,7 @@ | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| if (!isset($registerGlobals)) { | |||
| require_once(dirname(__FILE__) . "/../../include/common.inc.php"); | |||
| require_once(dirname(__FILE__)."/../../include/common.inc.php"); | |||
| } | |||
| // 获取栏目名称 | |||
| @@ -18,8 +18,8 @@ function GetTypename($tid) | |||
| { | |||
| global $dsql; | |||
| if (empty($tid)) return ''; | |||
| if (file_exists(DEDEDATA . '/cache/inc_catalog_base.inc')) { | |||
| require_once(DEDEDATA . '/cache/inc_catalog_base.inc'); | |||
| if (file_exists(DEDEDATA.'/cache/inc_catalog_base.inc')) { | |||
| require_once(DEDEDATA.'/cache/inc_catalog_base.inc'); | |||
| global $cfg_Cs; | |||
| if (isset($cfg_Cs[$tid])) { | |||
| return base64_decode($cfg_Cs[$tid][3]); | |||
| @@ -46,7 +46,7 @@ function IsCommendArchives($iscommend) | |||
| $sn = ''; | |||
| foreach ($arcatts as $k => $v) { | |||
| $v = cn_substr($v, 2); | |||
| $sn .= (preg_match("#" . $k . "#", $iscommend) ? ' ' . $v : ''); | |||
| $sn .= (preg_match("#".$k."#", $iscommend) ? ' '.$v : ''); | |||
| } | |||
| $sn = trim($sn); | |||
| if ($sn == '') return ''; | |||
| @@ -1,5 +1,4 @@ | |||
| <?php | |||
| /** | |||
| * 后台管理菜单项 | |||
| * | |||
| @@ -9,144 +8,122 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/../config.php"); | |||
| 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 "); | |||
| $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->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); | |||
| } | |||
| $dsql->Execute(); | |||
| $candoChannel = ''; | |||
| while ($row = $dsql->GetObject()) { | |||
| $candoChannel .= ($candoChannel == '' ? $row->channeltype : ',' . $row->channeltype); | |||
| $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"; | |||
| $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"; | |||
| $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> | |||
| "; | |||
| $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: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='病毒扫描[S]' link='sys_safetest.php' rank='sys_verify' target='main' /> | |||
| <m:item name='系统错误修复[S]' link='sys_repair.php' rank='sys_verify' target='main' /> | |||
| <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> | |||
| "; | |||
| <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' /> | |||
| $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' /> | |||
| $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: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: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='网站标签管理' 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: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='HTML更新' notshowall='1' display='none' rank='sys_MakeHtml'> | |||
| <m:item name='更新主页HTML' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> | |||
| <m:item name='更新栏目HTML' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> | |||
| <m:item name='更新文档HTML' 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='更新RSS文件' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> | |||
| <m:item name='获取JS文件' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> | |||
| <m:item name='更新专题HTML' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> | |||
| <m:item name='更新Tag HTML' link='makehtml_taglist.php' rank='sys_MakeHtml' target='main' /> | |||
| <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: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> | |||
| ----------------------------------------------- | |||
| "; | |||
| <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>"; | |||
| @@ -9,8 +9,8 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/../config.php"); | |||
| require_once(DEDEINC . "/dedetag.class.php"); | |||
| 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~'> | |||
| @@ -38,26 +38,26 @@ function GetMenus($userrank, $topos = 'main') | |||
| $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; | |||
| if ($openitem != 999 && !preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) && $openitem != 100) continue; | |||
| $m++; | |||
| echo "<!-- Item " . ($m + 1) . " Strat -->\r\n"; | |||
| 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') | |||
| 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); | |||
| $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>"; | |||
| $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'); | |||
| @@ -75,7 +75,7 @@ function GetMenus($userrank, $topos = 'main') | |||
| $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> | |||
| <a href='".$ctag2->GetAtt('linkadd')."' target='".$ctag2->GetAtt('target')."'><img src='$addico' alt='$addalt' title='$addalt'/></a> | |||
| </div> | |||
| </div>\r\n"; | |||
| } else { | |||
| @@ -86,7 +86,7 @@ function GetMenus($userrank, $topos = 'main') | |||
| } | |||
| } | |||
| echo $footTemplet; | |||
| echo "<!-- Item " . ($m + 1) . " End -->\r\n"; | |||
| echo "<!-- Item ".($m + 1)." End -->\r\n"; | |||
| } | |||
| } | |||
| } | |||
| @@ -1,5 +1,4 @@ | |||
| <?php | |||
| /** | |||
| * 菜单地图 | |||
| * | |||
| @@ -9,174 +8,150 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/../config.php"); | |||
| 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 "); | |||
| $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->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); | |||
| } | |||
| $dsql->Execute(); | |||
| $candoChannel = ''; | |||
| while ($row = $dsql->GetObject()) { | |||
| $candoChannel .= ($candoChannel == '' ? $row->channeltype : ',' . $row->channeltype); | |||
| $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"; | |||
| $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' /> | |||
| $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' /> | |||
| $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: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: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='网站标签管理' 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: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='HTML更新' notshowall='1' display='none' rank='sys_MakeHtml'> | |||
| <m:item name='更新主页HTML' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> | |||
| <m:item name='更新栏目HTML' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> | |||
| <m:item name='更新文档HTML' 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='更新RSS文件' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> | |||
| <m:item name='获取JS文件' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> | |||
| <m:item name='更新专题HTML' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> | |||
| <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: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: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='病毒扫描[S]' link='sys_safetest.php' rank='sys_verify' target='main' /> | |||
| <m:item name='系统错误修复[S]' link='sys_repair.php' rank='sys_verify' target='main' /> | |||
| <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: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> | |||
| "; | |||
| <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"; | |||
| $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: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> | |||
| "; | |||
| <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 .= "<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"; | |||
| } | |||
| $mapstring .= "</dd>\r\n</dl>\r\n"; | |||
| } | |||
| @@ -1,5 +1,4 @@ | |||
| <?php | |||
| /** | |||
| * 模块菜单 | |||
| * | |||
| @@ -9,8 +8,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/../config.php"); | |||
| require_once(dirname(__FILE__)."/../config.php"); | |||
| /* | |||
| 模块菜单一般在不要直接改此文件,直接保存在#@__sys_module表即可,格式为 | |||
| <m:top name='问答模块管理' c='6,' display='block' rank=''> | |||
| @@ -20,24 +18,21 @@ require_once(dirname(__FILE__) . "/../config.php"); | |||
| </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"; | |||
| $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"; | |||
| $plusset .= $row->menustring."\r\n"; | |||
| } | |||
| $adminMenu = ''; | |||
| if ($cuserLogin->getUserType() >= 10) { | |||
| $adminMenu = "<m:top name='模块管理' c='6,' display='block'> | |||
| @@ -46,15 +41,11 @@ if ($cuserLogin->getUserType() >= 10) { | |||
| <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:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> | |||
| $plusset | |||
| </m:top> | |||
| $moduleset | |||
| ----------------------------------------------- | |||
| "; | |||
| "; | |||
| @@ -13,18 +13,18 @@ | |||
| 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'] . '/'); | |||
| 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'; | |||
| 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'); | |||
| require(DEDEADMIN.'/inc/inc_menu_map.php'); | |||
| include(DEDEADMIN.'/templets/index2.htm'); | |||
| exit(); | |||
| @@ -9,23 +9,23 @@ | |||
| * @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'; | |||
| 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'; | |||
| 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); | |||
| $oktime = substr($upTime, 0, 4).'-'.substr($upTime, 4, 2).'-'.substr($upTime, 6, 2); | |||
| $offUrl = SpGetNewInfo(); | |||
| $dedecmsidc = DEDEDATA . '/admin/idc.txt'; | |||
| $dedecmsidc = DEDEDATA.'/admin/idc.txt'; | |||
| $fp = fopen($dedecmsidc, 'r'); | |||
| $dedeIDC = fread($fp, filesize($dedecmsidc)); | |||
| fclose($fp); | |||
| @@ -50,12 +50,12 @@ function _AddNew() { } | |||
| $ico = preg_replace("#['\"]#", '`', $ico); | |||
| $oldct .= "\r\n<menu:item ico=\"{$ico}\" link=\"{$link}\" title=\"{$title}\" />"; | |||
| $myIcoFileTrue = DEDEDATA . '/admin/quickmenu-' . $cuserLogin->getUserID() . '.txt'; | |||
| $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; | |||
| $fp = fopen($myIcoFileTrue, 'w'); | |||
| fwrite($fp, $oldct); | |||
| fclose($fp); | |||
| ShowMsg("成功增加一个项目!", "index_body.php?" . time()); | |||
| ShowMsg("成功增加一个项目!", "index_body.php?".time()); | |||
| exit(); | |||
| } | |||
| /*--------------------------- | |||
| @@ -64,12 +64,12 @@ function _EditSave() { } | |||
| ----------------------------*/ else if ($dopost == 'editsave') { | |||
| $quickmenu = stripslashes($quickmenu); | |||
| $myIcoFileTrue = DEDEDATA . '/admin/quickmenu-' . $cuserLogin->getUserID() . '.txt'; | |||
| $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; | |||
| $fp = fopen($myIcoFileTrue, 'w'); | |||
| fwrite($fp, $quickmenu); | |||
| fclose($fp); | |||
| ShowMsg("成功修改快捷操作项目!", "index_body.php?" . time()); | |||
| ShowMsg("成功修改快捷操作项目!", "index_body.php?".time()); | |||
| exit(); | |||
| } | |||
| /*--------------------------- | |||
| @@ -79,7 +79,7 @@ function _EditSave() { } | |||
| $movedata = str_replace('\\', "", $sortorder); | |||
| $movedata = json_decode($movedata, TRUE); | |||
| $movedata = serialize($movedata); | |||
| $myIcoFileTrue = DEDEDATA . '/admin/move-' . $cuserLogin->getUserID() . '.txt'; | |||
| $myIcoFileTrue = DEDEDATA.'/admin/move-'.$cuserLogin->getUserID().'.txt'; | |||
| $fp = fopen($myIcoFileTrue, 'w'); | |||
| fwrite($fp, $movedata); | |||
| fclose($fp); | |||
| @@ -214,7 +214,7 @@ function _getRightSide() { } | |||
| } 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'; | |||
| $skinconfig = DEDEDATA.'/admin/skin.txt'; | |||
| PutFile($skinconfig, $skin); | |||
| } elseif ($dopost == 'get_seo') { | |||
| // 直接采用DedeBIZ重写方法 | |||
| @@ -9,8 +9,8 @@ | |||
| * @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'); | |||
| 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'); | |||
| @@ -9,17 +9,17 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/config.php'); | |||
| require_once(dirname(__FILE__).'/config.php'); | |||
| AjaxHead(); | |||
| if ($openitem != 100) { | |||
| require(dirname(__FILE__) . '/inc/inc_menu.php'); | |||
| require(DEDEADMIN . '/inc/inc_menu_func.php'); | |||
| 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'); | |||
| require(dirname(__FILE__).'/inc/inc_menu_module.php'); | |||
| require(DEDEADMIN.'/inc/inc_menu_func.php'); | |||
| GetMenus($cuserLogin->getUserRank(), 'module'); | |||
| exit(); | |||
| } | |||
| @@ -9,14 +9,14 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require(dirname(__FILE__) . "/config.php"); | |||
| 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'); | |||
| require(DEDEADMIN.'/inc/inc_menu_module.php'); | |||
| require(DEDEADMIN.'/inc/inc_menu_func.php'); | |||
| ?> | |||
| <html> | |||
| @@ -1,7 +1,7 @@ | |||
| <?php | |||
| @set_time_limit(0); | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| AjaxHead(); | |||
| if (!function_exists('TestWriteable')) { | |||
| // 检测是否可写 | |||
| @@ -9,7 +9,7 @@ if (!function_exists('TestWriteable')) { | |||
| { | |||
| $tfile = '_write_able.txt'; | |||
| $d = preg_replace("/\/$/", '', $d); | |||
| $fp = @fopen($d . '/' . $tfile, 'w'); | |||
| $fp = @fopen($d.'/'.$tfile, 'w'); | |||
| if (!$fp) { | |||
| if ($c == false) { | |||
| @chmod($d, 0777); | |||
| @@ -17,7 +17,7 @@ if (!function_exists('TestWriteable')) { | |||
| } else return TestWriteable($d, true); | |||
| } else { | |||
| fclose($fp); | |||
| return @unlink($d . '/' . $tfile) ? true : false; | |||
| return @unlink($d.'/'.$tfile) ? true : false; | |||
| } | |||
| } | |||
| } | |||
| @@ -26,18 +26,18 @@ if (!function_exists('TestExecuteable')) { | |||
| // 检查是否具目录可执行 | |||
| function TestExecuteable($d = '.', $siteuRL = '', $rootDir = '') | |||
| { | |||
| $testStr = '<' . chr(0x3F) . 'p' . chr(hexdec(68)) . chr(112) . "\n\r"; | |||
| $filename = md5($d) . '.php'; | |||
| $testStr .= 'function test(){ echo md5(\'' . $d . '\');}' . "\n\rtest();\n\r"; | |||
| $testStr .= chr(0x3F) . '>'; | |||
| $testStr = '<'.chr(0x3F).'p'.chr(hexdec(68)).chr(112)."\n\r"; | |||
| $filename = md5($d).'.php'; | |||
| $testStr .= 'function test(){ echo md5(\''.$d.'\');}'."\n\rtest();\n\r"; | |||
| $testStr .= chr(0x3F).'>'; | |||
| $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; | |||
| @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); | |||
| unlink($d.'/'.$filename); | |||
| return $reval; | |||
| } else { | |||
| return -1; | |||
| @@ -55,19 +55,19 @@ if (!function_exists('PostHost')) { | |||
| } elseif (!@$parse['port']) { | |||
| $parse['port'] = '80'; | |||
| } | |||
| $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://") . $parse['host']; | |||
| $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']; | |||
| $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; | |||
| $parse['path'] .= $separator.$data; | |||
| } elseif ($method == 'POST') { | |||
| $wlength = "Content-length: " . strlen($data) . "\r\n"; | |||
| $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"; | |||
| @@ -109,7 +109,7 @@ if (!function_exists('IsWritable')) { | |||
| if ($isDir) { | |||
| if (is_dir($pathfile)) { | |||
| mt_srand((float)microtime() * 1000000); | |||
| $pathfile = $pathfile . 'dede_' . uniqid(mt_rand()) . '.tmp'; | |||
| $pathfile = $pathfile.'dede_'.uniqid(mt_rand()).'.tmp'; | |||
| } elseif (@mkdir($pathfile)) { | |||
| return IsWritable($pathfile); | |||
| } else { | |||
| @@ -132,7 +132,7 @@ $dirname = str_replace('index_body.php', '', strtolower($_SERVER['PHP_SELF'])); | |||
| if (preg_match("#[\\|/]dede[\\|/]#", $dirname)) { | |||
| $safeMsg[] = '默认管理目录为dede,需要立即将它更名;'; | |||
| } | |||
| if (IsWritable(DEDEDATA . '/common.inc.php')) { | |||
| if (IsWritable(DEDEDATA.'/common.inc.php')) { | |||
| $safeMsg[] = '强烈建议data/common.inc.php文件属性设置为644(Linux/Unix)或只读(NT);'; | |||
| } | |||
| $rs = TestAdminPWD(); | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require(dirname(__FILE__) . "/config.php"); | |||
| require(dirname(__FILE__)."/config.php"); | |||
| if ($cuserLogin->adminStyle == 'dedecms') { | |||
| include DedeInclude('templets/index_top1.htm'); | |||
| } else { | |||
| @@ -9,7 +9,7 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_Log'); | |||
| if (empty($dopost)) { | |||
| ShowMsg("你没指定任何参数!", "javascript:;"); | |||
| @@ -32,7 +32,7 @@ if ($dopost == "clear") { | |||
| $dquery .= " Or lid='$id' "; | |||
| } | |||
| } | |||
| if ($dquery != "") $dquery = " where " . $dquery; | |||
| if ($dquery != "") $dquery = " where ".$dquery; | |||
| $dsql->ExecuteNoneQuery("DELETE FROM #@__log $dquery"); | |||
| ShowMsg("成功删除指定的日志!", $bkurl); | |||
| exit(); | |||
| @@ -9,10 +9,10 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . "/config.php"); | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_Log'); | |||
| require_once(DEDEINC . "/datalistcp.class.php"); | |||
| require_once(DEDEINC . "/common.func.php"); | |||
| require_once(DEDEINC."/datalistcp.class.php"); | |||
| require_once(DEDEINC."/common.func.php"); | |||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||
| $sql = $where = ""; | |||
| @@ -41,6 +41,6 @@ $dlist->pageSize = 20; | |||
| $dlist->SetParameter("adminid", $adminid); | |||
| $dlist->SetParameter("cip", $cip); | |||
| $dlist->SetParameter("dtime", $dtime); | |||
| $dlist->SetTemplate(DEDEADMIN . "/templets/log_list.htm"); | |||
| $dlist->SetTemplate(DEDEADMIN."/templets/log_list.htm"); | |||
| $dlist->SetSource($sql); | |||
| $dlist->Display(); | |||
| @@ -8,15 +8,15 @@ | |||
| * @license https://www.dedebiz.com/license | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| require_once(dirname(__FILE__) . '/../include/common.inc.php'); | |||
| require_once(DEDEINC . '/userlogin.class.php'); | |||
| require_once(dirname(__FILE__).'/../include/common.inc.php'); | |||
| require_once(DEDEINC.'/userlogin.class.php'); | |||
| if (empty($dopost)) $dopost = ''; | |||
| if (empty($gotopage)) $gotopage = ''; | |||
| $gotopage = RemoveXSS($gotopage); | |||
| //检测安装目录安全性 | |||
| if (is_dir(dirname(__FILE__) . '/../install')) { | |||
| if (!file_exists(dirname(__FILE__) . '/../install/install_lock.txt')) { | |||
| $fp = fopen(dirname(__FILE__) . '/../install/install_lock.txt', 'w') or die('安装目录无写入权限,无法进行写入锁定文件,请安装完毕删除安装目录!'); | |||
| if (is_dir(dirname(__FILE__).'/../install')) { | |||
| if (!file_exists(dirname(__FILE__).'/../install/install_lock.txt')) { | |||
| $fp = fopen(dirname(__FILE__).'/../install/install_lock.txt', 'w') or die('安装目录无写入权限,无法进行写入锁定文件,请安装完毕删除安装目录!'); | |||
| fwrite($fp, 'ok'); | |||
| fclose($fp); | |||
| } | |||
| @@ -35,7 +35,7 @@ if (is_dir(dirname(__FILE__) . '/../install')) { | |||
| } | |||
| } | |||
| //更新服务器 | |||
| require_once(DEDEDATA . '/admin/config_update.php'); | |||
| require_once(DEDEDATA.'/admin/config_update.php'); | |||
| //检测后台目录是否更名 | |||
| $cururl = GetCurUrl(); | |||
| if (preg_match('/dede\/login/i', $cururl)) { | |||