@@ -1 +0,0 @@ | |||||
dedecms |
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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 = ""; | if (empty($dopost)) $dopost = ""; | ||||
@@ -27,7 +27,7 @@ class ActionSearch | |||||
function GetSearchstr() | 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(); | return is_array($actionSearch) ? $actionSearch : array(); | ||||
} | } | ||||
@@ -80,11 +80,11 @@ class ActionSearch | |||||
foreach ($text as $key => $value) { | foreach ($text as $key => $value) { | ||||
if ($key == 'title' || $key == 'description') { | if ($key == 'title' || $key == 'description') { | ||||
//仅对title,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 { | } 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; | return $text; | ||||
} | } | ||||
@@ -10,9 +10,9 @@ | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require(dirname(__FILE__) . "/config.php"); | |||||
require(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('plus_广告管理'); | CheckPurview('plus_广告管理'); | ||||
require_once DEDEINC . "/typelink.class.php"; | |||||
require_once DEDEINC."/typelink.class.php"; | |||||
if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
if ($dopost == "save") { | if ($dopost == "save") { | ||||
@@ -9,9 +9,9 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require(dirname(__FILE__) . "/config.php"); | |||||
require(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('plus_广告管理'); | CheckPurview('plus_广告管理'); | ||||
require_once(DEDEINC . '/typelink.class.php'); | |||||
require_once(DEDEINC.'/typelink.class.php'); | |||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
$aid = preg_replace("#[^0-9]#", '', $aid); | $aid = preg_replace("#[^0-9]#", '', $aid); | ||||
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "ad_main.php" : $_COOKIE['ENV_GOBACK_URL']; | $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); | ShowMsg("成功删除一则广告代码!", $ENV_GOBACK_URL); | ||||
exit(); | exit(); | ||||
} else if ($dopost == "gettag") { | } 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>"; | $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 = "<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>"; | $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' "); | $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 /> | $info = "<b>说明:</b>如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告更改后需要重新生成。<br /> | ||||
如果不希望重新生成所有页面,则直接调用JS代码即可。 | 如果不希望重新生成所有页面,则直接调用JS代码即可。 | ||||
"; | "; | ||||
@@ -9,9 +9,9 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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, '/'); | setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); | ||||
$clsid = isset($clsid) ? intval($clsid) : 0; | $clsid = isset($clsid) ? intval($clsid) : 0; | ||||
@@ -37,7 +37,7 @@ LEFT JOIN `#@__myadtype` ap on ap.id=ad.clsid | |||||
WHERE $where_sql | WHERE $where_sql | ||||
ORDER BY ad.aid desc"; | ORDER BY ad.aid desc"; | ||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->SetTemplet(DEDEADMIN . "/templets/ad_main.htm"); | |||||
$dlist->SetTemplet(DEDEADMIN."/templets/ad_main.htm"); | |||||
$dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
$dlist->display(); | $dlist->display(); | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
//保存更改 | //保存更改 | ||||
@@ -18,9 +18,9 @@ if ($dopost == "save") { | |||||
$endID = $idend; | $endID = $idend; | ||||
for (; $startID <= $endID; $startID++) { | for (; $startID <= $endID; $startID++) { | ||||
$query = ''; | $query = ''; | ||||
$tid = ${'ID_' . $startID}; | |||||
$pname = ${'pname_' . $startID}; | |||||
if (isset(${'check_' . $startID})) { | |||||
$tid = ${'ID_'.$startID}; | |||||
$pname = ${'pname_'.$startID}; | |||||
if (isset(${'check_'.$startID})) { | |||||
if ($pname != '') { | if ($pname != '') { | ||||
$query = "UPDATE `#@__myadtypee` SET typename='$pname' WHERE id='$tid' "; | $query = "UPDATE `#@__myadtypee` SET typename='$pname' WHERE id='$tid' "; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
@@ -9,16 +9,16 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('a_New,a_AccNew'); | 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 (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | 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(); | ClearMyAddon(); | ||||
$channelid = empty($channelid) ? 0 : intval($channelid); | $channelid = empty($channelid) ? 0 : intval($channelid); | ||||
$cid = empty($cid) ? 0 : intval($cid); | $cid = empty($cid) ? 0 : intval($cid); | ||||
@@ -43,8 +43,8 @@ if ($dopost != 'save') { | |||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == '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) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
@@ -110,15 +110,15 @@ function __save(){ } | |||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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; | $litpic = $fullUrl; | ||||
} | } | ||||
@@ -149,10 +149,10 @@ function __save(){ } | |||||
处理从ZIP中解压的图片 | 处理从ZIP中解压的图片 | ||||
---------------------*/ | ---------------------*/ | ||||
if ($formzip == 1) { | 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(); | $ntime = time(); | ||||
if (file_exists($zipfile)) { | if (file_exists($zipfile)) { | ||||
@mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); | @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); | ||||
@@ -165,11 +165,11 @@ function __save(){ } | |||||
$i = 0; | $i = 0; | ||||
foreach ($imgs as $imgold) { | foreach ($imgs as $imgold) { | ||||
$i++; | $i++; | ||||
$savepath = $cfg_image_dir . "/" . MyDate("Y-m", $ntime); | |||||
$savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); | |||||
CreateDir($savepath); | 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); | copy($imgold, $imgfile); | ||||
unlink($imgold); | unlink($imgold); | ||||
@@ -183,12 +183,12 @@ function __save(){ } | |||||
} | } | ||||
$info = ''; | $info = ''; | ||||
$imginfos = GetImageSize($imgfile, $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 = " | $inquery = " | ||||
INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | 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); | $dsql->ExecuteNoneQuery($inquery); | ||||
$fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
@@ -218,17 +218,17 @@ function __save(){ } | |||||
$album = $albumsArr[$i]; | $album = $albumsArr[$i]; | ||||
$data = explode(',', $album['img']); | $data = explode(',', $album['img']); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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 = ''; | $info = ''; | ||||
$imginfos = GetImageSize($cfg_basedir . $fullUrl, $info); | |||||
$imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); | |||||
$v = $fullUrl; | $v = $fullUrl; | ||||
$imginfo = !empty($album['txt']) ? $album['txt'] : ''; | $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)) { | if ($ddisfirst == 1 && $litpic == '' && !empty($fullUrl)) { | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
} | } | ||||
@@ -264,18 +264,18 @@ function __save(){ } | |||||
} | } | ||||
${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); | ${$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)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag . ',p'); | |||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||||
} | } | ||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | 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)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); | $dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); | ||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -308,7 +308,7 @@ function __save(){ } | |||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` 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(); | exit(); | ||||
} | } | ||||
@@ -316,7 +316,7 @@ function __save(){ } | |||||
InsertTags($tags, $arcID); | InsertTags($tags, $arcID); | ||||
$artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | ||||
if ($artUrl == '') { | if ($artUrl == '') { | ||||
$artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||||
} | } | ||||
ClearMyAddon($arcID, $title); | 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='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> | <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> | ||||
| | ||||
@@ -345,7 +345,7 @@ function __save(){ } | |||||
| | ||||
$backurl | $backurl | ||||
"; | "; | ||||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>" . GetUpdateTest(); | |||||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||||
$wintitle = "成功发布一个图集!"; | $wintitle = "成功发布一个图集!"; | ||||
$wecome_info = "文章管理::发布图集"; | $wecome_info = "文章管理::发布图集"; | ||||
@@ -9,16 +9,16 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | 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 (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | 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(); | ClearMyAddon(); | ||||
$aid = intval($aid); | $aid = intval($aid); | ||||
@@ -32,7 +32,7 @@ if ($dopost != 'save') { | |||||
ShowMsg("读取档案基本信息出错!", "-1"); | ShowMsg("读取档案基本信息出错!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
$query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; | |||||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||||
$cInfos = $dsql->GetOne($query); | $cInfos = $dsql->GetOne($query); | ||||
if (!is_array($cInfos)) { | if (!is_array($cInfos)) { | ||||
ShowMsg("读取频道配置信息出错!", "javascript:;"); | ShowMsg("读取频道配置信息出错!", "javascript:;"); | ||||
@@ -59,8 +59,8 @@ if ($dopost != 'save') { | |||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == '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) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
@@ -123,15 +123,15 @@ function __save(){ } | |||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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; | $litpic = $fullUrl; | ||||
} | } | ||||
@@ -140,10 +140,10 @@ function __save(){ } | |||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag . ',p'); | |||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||||
} | } | ||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | 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'; "; | WHERE id='$id'; "; | ||||
if (!$dsql->ExecuteNoneQuery($query)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
ShowMsg("更新数据库archives表时出错,请检查!" . $dsql->GetError(), "javascript:;"); | |||||
ShowMsg("更新数据库archives表时出错,请检查!".$dsql->GetError(), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -186,46 +186,46 @@ function __save(){ } | |||||
//检查旧的图片是否有更新,并保存 | //检查旧的图片是否有更新,并保存 | ||||
//----------------------------------------- | //----------------------------------------- | ||||
for ($i = 1; $i <= 120; $i++) { | for ($i = 1; $i <= 120; $i++) { | ||||
if (!isset(${'imgurl' . $i})) continue; | |||||
if (!isset(${'imgurl'.$i})) continue; | |||||
$info = ''; | $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 = ''; | 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); | $imginfos = @GetImageSize($tmpFile, $info); | ||||
if (!is_array($imginfos)) { | if (!is_array($imginfos)) { | ||||
$imginfos = @GetImageSize($imgfile, $info); | $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; | continue; | ||||
} | } | ||||
move_uploaded_file($tmpFile, $imgfile); | move_uploaded_file($tmpFile, $imgfile); | ||||
$imginfos = @GetImageSize($imgfile, $info); | $imginfos = @GetImageSize($imgfile, $info); | ||||
if ($ddurl == $iurl) { | if ($ddurl == $iurl) { | ||||
$litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | ||||
$litimgfile = $cfg_basedir . $litpicname; | |||||
$litimgfile = $cfg_basedir.$litpicname; | |||||
} else { | } else { | ||||
if ($cfg_ddimg_full == 'Y') ImageResizeNew($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); | if ($cfg_ddimg_full == 'Y') ImageResizeNew($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); | ||||
else ImageResize($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); | else ImageResize($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); | ||||
$litpicname = $ddurl; | $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信息) | //没上传图片(只修改msg信息) | ||||
else { | 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)) { | if (preg_match("#swfupload#i", $ddurl)) { | ||||
$ddurl = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | $ddurl = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | ||||
} | } | ||||
$imginfos = @GetImageSize($imgfile, $info); | $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文件中获取新图片 | 从ZIP文件中获取新图片 | ||||
---------------------*/ | ---------------------*/ | ||||
if ($formzip == 1) { | 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(); | $ntime = time(); | ||||
if (file_exists($zipfile)) { | if (file_exists($zipfile)) { | ||||
@@ -262,30 +262,30 @@ function __save(){ } | |||||
$i = 0; | $i = 0; | ||||
foreach ($imgs as $imgold) { | foreach ($imgs as $imgold) { | ||||
$i++; | $i++; | ||||
$savepath = $cfg_image_dir . "/" . MyDate("Y-m", $ntime); | |||||
$savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); | |||||
CreateDir($savepath); | 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); | copy($imgold, $imgfile); | ||||
unlink($imgold); | unlink($imgold); | ||||
if (is_file($imgfile)) { | if (is_file($imgfile)) { | ||||
$litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | ||||
$info = ''; | $info = ''; | ||||
$imginfos = GetImageSize($imgfile, $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 = " | $inquery = " | ||||
INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | 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); | $dsql->ExecuteNoneQuery($inquery); | ||||
if ( | if ( | ||||
!$hasone && $ddisfirst == 1 | !$hasone && $ddisfirst == 1 | ||||
&& $litpic == "" && !empty($litpicname) | && $litpic == "" && !empty($litpicname) | ||||
) { | ) { | ||||
if (file_exists($cfg_basedir . $litpicname)) { | |||||
if (file_exists($cfg_basedir.$litpicname)) { | |||||
$litpic = $litpicname; | $litpic = $litpicname; | ||||
$hasone = true; | $hasone = true; | ||||
} | } | ||||
@@ -308,17 +308,17 @@ function __save(){ } | |||||
$album = $albumsArr[$i]; | $album = $albumsArr[$i]; | ||||
$data = explode(',', $album['img']); | $data = explode(',', $album['img']); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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 = ''; | $info = ''; | ||||
$imginfos = GetImageSize($cfg_basedir . $fullUrl, $info); | |||||
$imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); | |||||
$v = $fullUrl; | $v = $fullUrl; | ||||
$imginfo = !empty($album['txt']) ? $album['txt'] : ''; | $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); | ${$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' | userip = '$useip' | ||||
WHERE aid='$id'; "; | WHERE aid='$id'; "; | ||||
if (!$dsql->ExecuteNoneQuery($query)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!" . $dsql->GetError(), "javascript:;"); | |||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!".$dsql->GetError(), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
@@ -380,7 +380,7 @@ function __save(){ } | |||||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | ||||
$arcUrl = MakeArt($id, true, true, $isremote); | $arcUrl = MakeArt($id, true, true, $isremote); | ||||
if ($arcUrl == '') { | if ($arcUrl == '') { | ||||
$arcUrl = $cfg_phpurl . "/view.php?aid=$id"; | |||||
$arcUrl = $cfg_phpurl."/view.php?aid=$id"; | |||||
} | } | ||||
ClearMyAddon($id, $title); | 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='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> | <a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> | ||||
| | ||||
@@ -10,7 +10,7 @@ | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
AjaxHead(); | AjaxHead(); | ||||
$myhtml = UnicodeUrl2Gbk(stripslashes($myhtml)); | $myhtml = UnicodeUrl2Gbk(stripslashes($myhtml)); | ||||
echo "<div class='coolbg61'>[<a href='#' onclick='javascript:HideObj(\"_myhtml\")'>关闭</a>]</div>\r\n"; | echo "<div class='coolbg61'>[<a href='#' onclick='javascript:HideObj(\"_myhtml\")'>关闭</a>]</div>\r\n"; | ||||
@@ -9,16 +9,16 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . '/config.php'); | |||||
require_once(dirname(__FILE__).'/config.php'); | |||||
CheckPurview('a_New,a_AccNew'); | 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 (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | 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(); | ClearMyAddon(); | ||||
$channelid = empty($channelid) ? 0 : intval($channelid); | $channelid = empty($channelid) ? 0 : intval($channelid); | ||||
$cid = empty($cid) ? 0 : intval($cid); | $cid = empty($cid) ? 0 : intval($cid); | ||||
@@ -45,8 +45,8 @@ if ($dopost != 'save') { | |||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == '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) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
@@ -110,15 +110,15 @@ function __save(){ } | |||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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; | $litpic = $fullUrl; | ||||
} | } | ||||
@@ -144,18 +144,18 @@ function __save(){ } | |||||
if (!isset(${$vs[0]})) ${$vs[0]} = ''; | if (!isset(${$vs[0]})) ${$vs[0]} = ''; | ||||
${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); | ${$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)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag . ',p'); | |||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||||
} | } | ||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | 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)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -183,7 +183,7 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` 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(); | exit(); | ||||
} | } | ||||
} | } | ||||
@@ -192,7 +192,7 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||||
InsertTags($tags, $arcID); | InsertTags($tags, $arcID); | ||||
$artUrl = MakeArt($arcID, true, true, $isremote); | $artUrl = MakeArt($arcID, true, true, $isremote); | ||||
if ($artUrl == '') { | if ($artUrl == '') { | ||||
$artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||||
} | } | ||||
ClearMyAddon($arcID, $title); | 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='$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> | <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> | ||||
| | ||||
$backurl | $backurl | ||||
"; | "; | ||||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>" . GetUpdateTest(); | |||||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||||
$wintitle = '成功发布文档!'; | $wintitle = '成功发布文档!'; | ||||
$wecome_info = '文档管理::发布文档'; | $wecome_info = '文档管理::发布文档'; | ||||
@@ -1,5 +1,4 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 文档处理 | * 文档处理 | ||||
* | * | ||||
@@ -9,19 +8,17 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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']); | $ENV_GOBACK_URL = (empty($_COOKIE['ENV_GOBACK_URL']) ? 'content_list.php' : $_COOKIE['ENV_GOBACK_URL']); | ||||
if (empty($dopost)) { | if (empty($dopost)) { | ||||
ShowMsg('对不起,你没指定运行参数!', '-1'); | |||||
ShowMsg('对不起,你没指定运行参数', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$aid = isset($aid) ? preg_replace("#[^0-9]#", '', $aid) : ''; | $aid = isset($aid) ? preg_replace("#[^0-9]#", '', $aid) : ''; | ||||
/*-------------------------- | /*-------------------------- | ||||
//编辑文档 | //编辑文档 | ||||
function editArchives(){ } | function editArchives(){ } | ||||
@@ -41,9 +38,9 @@ if ($dopost == 'editArchives') { | |||||
/*-------------------------- | /*-------------------------- | ||||
//浏览文档 | //浏览文档 | ||||
function viewArchives(){ } | function viewArchives(){ } | ||||
---------------------------*/ else if ($dopost == "viewArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "viewArchives") { | |||||
$aid = preg_replace("#[^0-9]#", '', $aid); | $aid = preg_replace("#[^0-9]#", '', $aid); | ||||
//获取主表信息 | //获取主表信息 | ||||
$query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon, | $query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon, | ||||
tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl | tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl | ||||
@@ -61,7 +58,7 @@ function viewArchives(){ } | |||||
PutCookie('DedeUserID', $arcRow['mid'], 1800); | PutCookie('DedeUserID', $arcRow['mid'], 1800); | ||||
PutCookie('DedeLoginTime', time(), 1800); | PutCookie('DedeLoginTime', time(), 1800); | ||||
if ($arcRow['ismake'] == -1 || $arcRow['corank'] != 0 || $arcRow['arcrank'] != 0 || ($arcRow['typeid'] == 0 && $arcRow['channel'] != -1) || $arcRow['money'] > 0) { | if ($arcRow['ismake'] == -1 || $arcRow['corank'] != 0 || $arcRow['arcrank'] != 0 || ($arcRow['typeid'] == 0 && $arcRow['channel'] != -1) || $arcRow['money'] > 0) { | ||||
echo "<script language='javascript'>location.href='{$cfg_phpurl}/view.php?aid={$aid}';</script>"; | |||||
echo "<script>location.href='{$cfg_phpurl}/view.php?aid={$aid}';</script>"; | |||||
exit(); | exit(); | ||||
} | } | ||||
} else { | } else { | ||||
@@ -109,46 +106,47 @@ function viewArchives(){ } | |||||
if (preg_match("#^http:#", $arcfile)) { | if (preg_match("#^http:#", $arcfile)) { | ||||
$arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); | $arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); | ||||
} | } | ||||
$truefile = GetTruePath() . $arcfile; | |||||
$truefile = GetTruePath().$arcfile; | |||||
if (!file_exists($truefile)) { | if (!file_exists($truefile)) { | ||||
MakeArt($aid, TRUE); | MakeArt($aid, TRUE); | ||||
} | } | ||||
echo "<script language='javascript'>location.href='$arcurl" . "?" . time() . "';</script>"; | |||||
echo "<script>location.href='$arcurl"."?".time()."';</script>"; | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//异步上传缩略图 | //异步上传缩略图 | ||||
function uploadLitpic(){ } | function uploadLitpic(){ } | ||||
---------------------------*/ else if ($dopost == "uploadLitpic") { | |||||
---------------------------*/ | |||||
else if ($dopost == "uploadLitpic") { | |||||
$upfile = AdminUpload('litpic', 'imagelit', 0, false); | $upfile = AdminUpload('litpic', 'imagelit', 0, false); | ||||
if ($upfile == '-1') { | if ($upfile == '-1') { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
alert('你没指定要上传的文件或文件大小超过限制!'); | |||||
alert('你没指定要上传的文件或文件大小超过限制'); | |||||
</script>"; | </script>"; | ||||
} else if ($upfile == '-2') { | } else if ($upfile == '-2') { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
alert('上传文件失败,请检查原因!'); | |||||
alert('上传文件失败,请检查原因'); | |||||
</script>"; | </script>"; | ||||
} else if ($upfile == '0') { | } else if ($upfile == '0') { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
alert('文件类型不正确!'); | |||||
alert('文件类型不正确'); | |||||
</script>"; | </script>"; | ||||
} else { | } else { | ||||
if (!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut == 'N') { | if (!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut == 'N') { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
parent.document.getElementById('picname').value = '{$upfile}'; | parent.document.getElementById('picname').value = '{$upfile}'; | ||||
if(parent.document.getElementById('divpicview')) | if(parent.document.getElementById('divpicview')) | ||||
{ | { | ||||
parent.document.getElementById('divpicview').style.width = '150px'; | parent.document.getElementById('divpicview').style.width = '150px'; | ||||
parent.document.getElementById('divpicview').innerHTML = \"<img src='{$upfile}?n' width='150' />\"; | |||||
parent.document.getElementById('divpicview').innerHTML = \"<img src='{$upfile}?n' width='150'>\"; | |||||
} | } | ||||
</script>"; | </script>"; | ||||
} else { | } else { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
window.open('imagecut.php?f=picname&isupload=yes&file={$upfile}', 'popUpImagesWin', 'scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=150, top=50'); | window.open('imagecut.php?f=picname&isupload=yes&file={$upfile}', 'popUpImagesWin', 'scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=150, top=50'); | ||||
</script>"; | </script>"; | ||||
@@ -160,13 +158,14 @@ function uploadLitpic(){ } | |||||
/*-------------------------- | /*-------------------------- | ||||
//推荐文档 | //推荐文档 | ||||
function commendArchives(){ } | function commendArchives(){ } | ||||
---------------------------*/ else if ($dopost == "commendArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "commendArchives") { | |||||
CheckPurview('a_Commend,sys_ArcBatch'); | CheckPurview('a_Commend,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) { | if (!empty($aid) && empty($qstr)) { | ||||
$qstr = $aid; | $qstr = $aid; | ||||
} | } | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | ||||
@@ -181,49 +180,49 @@ function commendArchives(){ } | |||||
if ($row['issystem'] != -1) { | if ($row['issystem'] != -1) { | ||||
$maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); | $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); | ||||
$arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); | $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}' "); | $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); | ||||
} else { | } else { | ||||
$maintable = trim($row['addtable']); | $maintable = trim($row['addtable']); | ||||
$arr = $dsql->GetOne("SELECT flag From `{$maintable}` where aid='$aid' "); | $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}' "); | $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功把所选的文档设为推荐!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功把所选的文档设为推荐", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//生成HTML | //生成HTML | ||||
function makeArchives(); | function makeArchives(); | ||||
---------------------------*/ else if ($dopost == "makeArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "makeArchives") { | |||||
CheckPurview('sys_MakeHtml,sys_ArcBatch'); | CheckPurview('sys_MakeHtml,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg('参数无效!', $ENV_GOBACK_URL); | |||||
ShowMsg('参数无效', $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); | |||||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||||
$qstrs = explode('`', $qstr); | $qstrs = explode('`', $qstr); | ||||
$i = 0; | $i = 0; | ||||
foreach ($qstrs as $aid) { | foreach ($qstrs as $aid) { | ||||
$i++; | $i++; | ||||
$pageurl = MakeArt($aid, false); | $pageurl = MakeArt($aid, false); | ||||
} | } | ||||
ShowMsg("成功更新指定 $i 个文件...", $ENV_GOBACK_URL); | |||||
ShowMsg("成功更新指定 $i 个文件", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//审核文档 | //审核文档 | ||||
function checkArchives() { } | function checkArchives() { } | ||||
---------------------------*/ else if ($dopost == "checkArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "checkArchives") { | |||||
CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); | 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 (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | ||||
@@ -238,22 +237,23 @@ function checkArchives() { } | |||||
$maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); | $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); | ||||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' "); | $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' "); | ||||
if ($row['issystem'] == -1) { | 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 { | } 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' "); | $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); | ||||
$pageurl = MakeArt($aid, false); | $pageurl = MakeArt($aid, false); | ||||
} | } | ||||
ShowMsg("成功审核指定的文档!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功审核指定的文档", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//删除文档 | //删除文档 | ||||
function delArchives(){ } | function delArchives(){ } | ||||
---------------------------*/ else if ($dopost == "delArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "delArchives") { | |||||
CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | 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 (empty($fmdo)) $fmdo = ''; | ||||
if ($fmdo == 'yes') { | if ($fmdo == 'yes') { | ||||
@@ -261,12 +261,11 @@ function delArchives(){ } | |||||
$qstr = $aid; | $qstr = $aid; | ||||
} | } | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$qstrs = explode("`", $qstr); | $qstrs = explode("`", $qstr); | ||||
$okaids = array(); | $okaids = array(); | ||||
foreach ($qstrs as $aid) { | foreach ($qstrs as $aid) { | ||||
if (!isset($okaids[$aid])) { | if (!isset($okaids[$aid])) { | ||||
DelArc($aid); | DelArc($aid); | ||||
@@ -274,11 +273,11 @@ function delArchives(){ } | |||||
$okaids[$aid] = 1; | $okaids[$aid] = 1; | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功删除指定的文档!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功删除指定的文档", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} else { | } else { | ||||
$wintitle = "文档管理-删除文档"; | $wintitle = "文档管理-删除文档"; | ||||
$wecome_info = "<a href='" . $ENV_GOBACK_URL . "'>文档管理</a>::删除文档"; | |||||
$wecome_info = "<a href='".$ENV_GOBACK_URL."'>文档管理</a>::删除文档"; | |||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->Init("archives_do.php", "js/blank.js", "POST"); | $win->Init("archives_do.php", "js/blank.js", "POST"); | ||||
$win->AddHidden("fmdo", "yes"); | $win->AddHidden("fmdo", "yes"); | ||||
@@ -292,51 +291,49 @@ function delArchives(){ } | |||||
} | } | ||||
/*----------------------------- | /*----------------------------- | ||||
function moveArchives(){ } | function moveArchives(){ } | ||||
------------------------------*/ else if ($dopost == 'moveArchives') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'moveArchives') { | |||||
CheckPurview('sys_ArcBatch'); | CheckPurview('sys_ArcBatch'); | ||||
if (empty($totype)) { | if (empty($totype)) { | ||||
require_once(DEDEINC . '/typelink.class.php'); | |||||
require_once(DEDEINC.'/typelink.class.php'); | |||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
AjaxHead(); | AjaxHead(); | ||||
$channelid = empty($channelid) ? 0 : $channelid; | $channelid = empty($channelid) ? 0 : $channelid; | ||||
$tl = new TypeLink($aid); | $tl = new TypeLink($aid); | ||||
$typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid); | $typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid); | ||||
$typeOptions = "<select name='totype' style='width:90%'> | |||||
<option value='0'>请选择移动到的位置...</option>\r\n | |||||
$typeOptions = "<select name='totype' style='width:320px'> | |||||
<option value='0'>请选择移动到的位置</option> | |||||
$typeOptions | $typeOptions | ||||
</select>"; | </select>"; | ||||
//输出AJAX可移动窗体 | //输出AJAX可移动窗体 | ||||
$divname = 'moveArchives'; | $divname = 'moveArchives'; | ||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">\r\n"; | |||||
echo " <div class='titLeft'>移动文档</div>\r\n"; | |||||
echo " <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' alt='关闭' title='关闭' /></div>\r\n"; | |||||
echo "</div>\r\n"; | |||||
echo "<form name='quickeditform' action='archives_do.php' method='post'>\r\n"; | |||||
echo "<input type='hidden' name='dopost' value='{$dopost}' />\r\n"; | |||||
echo "<input type='hidden' name='qstr' value='{$qstr}' />\r\n"; | |||||
echo "<table width='100%' style='margin-top:6px;z-index:9000;'>\r\n"; | |||||
?> | |||||
<tr height='28'> | |||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">"; | |||||
echo " <div class='titLeft'>移动文档</div>"; | |||||
echo " <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' title='关闭'></div>"; | |||||
echo "</div>"; | |||||
echo "<form name='quickeditform' action='archives_do.php' method='post'>"; | |||||
echo "<input type='hidden' name='dopost' value='{$dopost}'>"; | |||||
echo "<input type='hidden' name='qstr' value='{$qstr}'>"; | |||||
echo "<table width='100%' style='display:inline-block;z-index:9000'>"; | |||||
?> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 目标栏目:</td> | <td width="80" class='bline'> 目标栏目:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<?php echo $typeOptions; ?> | <?php echo $typeOptions; ?> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 文档ID:</td> | <td width="80" class='bline'> 文档ID:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:310px;overflow:hidden;' /> | |||||
<br /> | |||||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:320px;overflow:hidden'><br> | |||||
移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。 | 移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。 | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<td colspan='2' align='center' style='padding-top:12px'> | |||||
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" class="np" border="0" style="cursor:pointer" /> | |||||
<tr height='36'> | |||||
<td colspan='2' align='center' style='padding-top:10px'> | |||||
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" class="np" style="cursor:pointer"> | |||||
| | ||||
<img src="images/button_back.gif" width="60" height="22" border="0" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer" /> | |||||
<img src="images/button_back.gif" width="60" height="22" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer"> | |||||
</td> | </td> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
@@ -349,11 +346,11 @@ function moveArchives(){ } | |||||
$typeInfos = $dsql->GetOne("SELECT tp.channeltype,tp.ispart,tp.channeltype,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype WHERE tp.id='$totype' "); | $typeInfos = $dsql->GetOne("SELECT tp.channeltype,tp.ispart,tp.channeltype,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype WHERE tp.id='$totype' "); | ||||
$idtype = "id"; | $idtype = "id"; | ||||
if (!is_array($typeInfos)) { | if (!is_array($typeInfos)) { | ||||
ShowMsg('参数错误!', '-1'); | |||||
ShowMsg('参数错误', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if ($typeInfos['ispart'] != 0) { | if ($typeInfos['ispart'] != 0) { | ||||
ShowMsg('文档保存的栏目必须为最终列表栏目!', '-1'); | |||||
ShowMsg('文档保存的栏目必须为最终列表栏目', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeInfos['addtable'])) { | if (empty($typeInfos['addtable'])) { | ||||
@@ -384,21 +381,22 @@ function moveArchives(){ } | |||||
$arc = new Archives($aid); | $arc = new Archives($aid); | ||||
$arc->MakeHtml(); | $arc->MakeHtml(); | ||||
} | } | ||||
ShowMsg("成功移动 $j 个文档!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功移动 $j 个文档", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
/*----------------------------- | /*----------------------------- | ||||
//还原文档 | //还原文档 | ||||
function RbReturnArchives(){ } | function RbReturnArchives(){ } | ||||
------------------------------*/ else if ($dopost == 'return') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'return') { | |||||
CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | 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; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", "recycling.php"); | |||||
ShowMsg("参数无效", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$qstrs = explode("`", $qstr); | $qstrs = explode("`", $qstr); | ||||
@@ -406,22 +404,23 @@ function RbReturnArchives(){ } | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); | $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); | ||||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); | $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); | ||||
} | } | ||||
ShowMsg("成功还原指定的文档!", "recycling.php"); | |||||
ShowMsg("成功还原指定的文档", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*----------------------------- | /*----------------------------- | ||||
//清空文档 | //清空文档 | ||||
function RbClearArchives(){ } | function RbClearArchives(){ } | ||||
------------------------------*/ else if ($dopost == 'clear') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'clear') { | |||||
CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | 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 (empty($fmdo)) $fmdo = ''; | ||||
$recycle = empty($recycle) ? "" : $recycle; | $recycle = empty($recycle) ? "" : $recycle; | ||||
if ($fmdo == 'yes') { | if ($fmdo == 'yes') { | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", "recycling.php"); | |||||
ShowMsg("参数无效", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$qstrs = explode(",", $qstr); | $qstrs = explode(",", $qstr); | ||||
@@ -434,19 +433,19 @@ function RbClearArchives(){ } | |||||
$okaids[$qstr] = 1; | $okaids[$qstr] = 1; | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功删除指定的文档!", "recycling.php"); | |||||
ShowMsg("成功删除指定的文档", "recycling.php"); | |||||
exit(); | exit(); | ||||
} else { | } else { | ||||
$dsql->SetQuery("SELECT id FROM `#@__archives` WHERE `arcrank` = '-2'"); | $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE `arcrank` = '-2'"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
$qstr = ''; | $qstr = ''; | ||||
while ($row = $dsql->GetArray()) { | while ($row = $dsql->GetArray()) { | ||||
$qstr .= $row['id'] . ","; | |||||
$qstr .= $row['id'].","; | |||||
$aid = $row['id']; | $aid = $row['id']; | ||||
} | } | ||||
$num = $dsql->GetTotalRow(); | $num = $dsql->GetTotalRow(); | ||||
if (empty($num)) { | if (empty($num)) { | ||||
ShowMsg("对不起,未发现相关文档!", "recycling.php"); | |||||
ShowMsg("对不起,未发现相关文档", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$wintitle = "文档管理-清空所有文档"; | $wintitle = "文档管理-清空所有文档"; | ||||
@@ -458,7 +457,7 @@ function RbClearArchives(){ } | |||||
$win->AddHidden("qstr", $qstr); | $win->AddHidden("qstr", $qstr); | ||||
$win->AddHidden("aid", $aid); | $win->AddHidden("aid", $aid); | ||||
$win->AddHidden("recycle", $recycle); | $win->AddHidden("recycle", $recycle); | ||||
$win->AddTitle("本次操作将清空回收站<font color='#FF0000'>所有共 $num 篇文档</font><br>你确实要永久删除“ $qstr ”这些文档?"); | |||||
$win->AddTitle("本次操作将清空回收站所有共 $num 篇文档<br>你确实要永久删除“ $qstr ”这些文档?"); | |||||
$winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
$win->Display(); | $win->Display(); | ||||
} | } | ||||
@@ -466,21 +465,20 @@ function RbClearArchives(){ } | |||||
/*----------------------------- | /*----------------------------- | ||||
//清除文档 | //清除文档 | ||||
function RbDelArchives(){ } | function RbDelArchives(){ } | ||||
------------------------------*/ else if ($dopost == 'del') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'del') { | |||||
CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | 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 (empty($fmdo)) $fmdo = ''; | ||||
$recycle = empty($recycle) ? "" : $recycle; | $recycle = empty($recycle) ? "" : $recycle; | ||||
if ($fmdo == 'yes') { | if ($fmdo == 'yes') { | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", "recycling.php"); | |||||
ShowMsg("参数无效", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$qstrs = explode("`", $qstr); | $qstrs = explode("`", $qstr); | ||||
$okaids = array(); | $okaids = array(); | ||||
foreach ($qstrs as $aid) { | foreach ($qstrs as $aid) { | ||||
if (!isset($okaids[$aid])) { | if (!isset($okaids[$aid])) { | ||||
DelArc($aid, "OK", "", $recycle); | DelArc($aid, "OK", "", $recycle); | ||||
@@ -488,7 +486,7 @@ function RbDelArchives(){ } | |||||
$okaids[$aid] = 1; | $okaids[$aid] = 1; | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功删除指定的文档!", "recycling.php"); | |||||
ShowMsg("成功删除指定的文档", "recycling.php"); | |||||
exit(); | exit(); | ||||
} else { | } else { | ||||
$wintitle = "文档管理-删除文档"; | $wintitle = "文档管理-删除文档"; | ||||
@@ -508,8 +506,9 @@ function RbDelArchives(){ } | |||||
/*----------------------------- | /*----------------------------- | ||||
//快速编辑 | //快速编辑 | ||||
function quickEdit(){ } | function quickEdit(){ } | ||||
------------------------------*/ else if ($dopost == 'quickEdit') { | |||||
require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); | |||||
------------------------------*/ | |||||
else if ($dopost == 'quickEdit') { | |||||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||||
AjaxHead(); | AjaxHead(); | ||||
$query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* | $query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* | ||||
FROM `#@__archives` arc | FROM `#@__archives` arc | ||||
@@ -517,83 +516,82 @@ function quickEdit(){ } | |||||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; | LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; | ||||
$arcRow = $dsql->GetOne($query); | $arcRow = $dsql->GetOne($query); | ||||
$divname = 'quickEdit'; | $divname = 'quickEdit'; | ||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">\r\n"; | |||||
echo " <div class='titLeft'>快速属性编辑</div>\r\n"; | |||||
echo " <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' alt='关闭' title='关闭' /></div>\r\n"; | |||||
echo "</div>\r\n"; | |||||
echo "<form name='quickeditform' action='archives_do.php?dopost=quickEditSave&aid={$aid}' method='post'>\r\n"; | |||||
echo "<input type='hidden' name='addtable' value='{$arcRow['addtable']}' />\r\n"; | |||||
echo "<input type='hidden' name='oldtypeid' value='{$arcRow['typeid']}' />\r\n"; | |||||
echo "<table width='100%' style='margin-top:6px;z-index:9000;'>\r\n"; | |||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">"; | |||||
echo "<div class='titLeft'>快速属性编辑</div>"; | |||||
echo "<div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' title='关闭'></div>"; | |||||
echo "</div>"; | |||||
echo "<form name='quickeditform' action='archives_do.php?dopost=quickEditSave&aid={$aid}' method='post'>"; | |||||
echo "<input type='hidden' name='addtable' value='{$arcRow['addtable']}'>"; | |||||
echo "<input type='hidden' name='oldtypeid' value='{$arcRow['typeid']}'>"; | |||||
echo "<table width='100%' style='display:inline-block;z-index:9000'>"; | |||||
?> | ?> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 所属栏目:</td> | <td width="80" class='bline'> 所属栏目:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<?php | <?php | ||||
$typeOptions = GetOptionList($arcRow['typeid'], $cuserLogin->getUserChannel(), $arcRow['channel']); | $typeOptions = GetOptionList($arcRow['typeid'], $cuserLogin->getUserChannel(), $arcRow['channel']); | ||||
echo "<select name='typeid' style='width:70%'>\r\n"; | |||||
if ($arcRow["typeid"] == "0") echo "<option value='0' selected>请选择栏目...</option>\r\n"; | |||||
echo "<select name='typeid' style='width:320px'>"; | |||||
if ($arcRow["typeid"] == "0") echo "<option value='0' selected>请选择栏目</option>"; | |||||
echo $typeOptions; | echo $typeOptions; | ||||
echo "</select>"; | echo "</select>"; | ||||
?> | ?> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='28'> | |||||
<td width="80" class='bline'> 属 性:</td> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 属性:</td> | |||||
<td class='bline'> | <td class='bline'> | ||||
<input type='hidden' name='oldflag' value='<?php echo $arcRow['flag']; ?>' /> | |||||
<input type='hidden' name='oldflag' value='<?php echo $arcRow['flag']; ?>'> | |||||
<?php | <?php | ||||
$dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); | $dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($trow = $dsql->GetObject()) { | while ($trow = $dsql->GetObject()) { | ||||
if ($trow->att == 'j' || $trow->att == 'p') continue; | if ($trow->att == 'j' || $trow->att == 'p') continue; | ||||
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}</label> "; | |||||
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 | else | ||||
echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' /> {$trow->attname}.{$trow->att}</label> "; | |||||
echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> "; | |||||
} | } | ||||
?> | ?> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<td width="80" class='bline'> 标 题:</td> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 标题:</td> | |||||
<td class='bline'> | <td class='bline'> | ||||
<input name="title" type="text" id="title" value="<?php echo $arcRow['title']; ?>" style="width:90%" /> | |||||
<input name="title" type="text" id="title" value="<?php echo $arcRow['title']; ?>" style="width:320px"> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 简略标题:</td> | <td width="80" class='bline'> 简略标题:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<input name="shorttitle" type="text" id="shorttitle" value="<?php echo $arcRow['shorttitle']; ?>" style="width:60%" /> | |||||
<input name="shorttitle" type="text" id="shorttitle" value="<?php echo $arcRow['shorttitle']; ?>" style="width:320px"> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 阅读权限:</td> | <td width="80" class='bline'> 阅读权限:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<select name="arcrank" id="arcrank" style="width:120px"> | |||||
<select name="arcrank" id="arcrank" style="width:100px"> | |||||
<option value='<?php echo $arcRow["arcrank"] ?>'> | <option value='<?php echo $arcRow["arcrank"] ?>'> | ||||
<?php echo $arcRow["rankname"] ?> </option> | <?php echo $arcRow["rankname"] ?> </option> | ||||
<?php | <?php | ||||
$urank = $cuserLogin->getUserRank(); | $urank = $cuserLogin->getUserRank(); | ||||
$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE adminrank<='$urank'"); | $dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE adminrank<='$urank'"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
echo " <option value='" . $row->rank . "'>" . $row->membername . "</option>\r\n"; | |||||
echo "<option value='".$row->rank."'>".$row->membername."</option>"; | |||||
} | } | ||||
?> | ?> | ||||
</select> | </select> | ||||
需要金币:<input name="money" type="text" id="money" value="<?php echo $arcRow["money"]; ?>" style="width:80px" /> | |||||
需要金币:<input name="money" type="text" id="money" value="<?php echo $arcRow["money"]; ?>" style="width:100px"> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 关键字:</td> | <td width="80" class='bline'> 关键字:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<input name="keywords" type="text" id="keywords" value="<?php echo $arcRow['keywords']; ?>" style="width:70%" /> | |||||
<input name="keywords" type="text" id="keywords" value="<?php echo $arcRow['keywords']; ?>" style="width:320px"> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<td colspan='2' align='center' style='padding-top:12px' class='py-3'> | |||||
<tr height='36'> | |||||
<td colspan='2' align='center' class='py-3' style='padding-top:10px'> | |||||
<button type="submit" class="btn btn-success">保存</button> | <button type="submit" class="btn btn-success">保存</button> | ||||
| | ||||
<button type="button" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class="btn btn-success">关闭</button> | <button type="button" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class="btn btn-success">关闭</button> | ||||
@@ -603,17 +601,18 @@ function quickEdit(){ } | |||||
</table> | </table> | ||||
</form> | </form> | ||||
<?php | <?php | ||||
//AJAX窗体结束 | |||||
//AJAX窗体结束 | |||||
} | } | ||||
/*----------------------------- | /*----------------------------- | ||||
//保存快速编辑的内容 | //保存快速编辑的内容 | ||||
function quickEditSave(){ } | function quickEditSave(){ } | ||||
------------------------------*/ else if ($dopost == 'quickEditSave') { | |||||
require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); | |||||
------------------------------*/ | |||||
else if ($dopost == 'quickEditSave') { | |||||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||||
//权限检测 | //权限检测 | ||||
if (!TestPurview('a_Edit')) { | if (!TestPurview('a_Edit')) { | ||||
if (TestPurview('a_AccEdit')) { | if (TestPurview('a_AccEdit')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限"); | |||||
} else { | } else { | ||||
CheckArcAdmin($aid, $cuserLogin->getUserID()); | CheckArcAdmin($aid, $cuserLogin->getUserID()); | ||||
} | } | ||||
@@ -622,22 +621,13 @@ function quickEditSave(){ } | |||||
$shorttitle = cn_substrR($shorttitle, 36); | $shorttitle = cn_substrR($shorttitle, 36); | ||||
$keywords = trim(cn_substrR($keywords, 60)); | $keywords = trim(cn_substrR($keywords, 60)); | ||||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
//属性处理 | //属性处理 | ||||
$flag = isset($flags) ? join(',', $flags) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
if (!empty($flag)) { | if (!empty($flag)) { | ||||
if (preg_match("#p#", $oldflag)) $flag .= ',p'; | if (preg_match("#p#", $oldflag)) $flag .= ',p'; | ||||
if (preg_match("#j#", $oldflag)) $flag .= ',j'; | if (preg_match("#j#", $oldflag)) $flag .= ',j'; | ||||
} | } | ||||
/* | |||||
else | |||||
{ | |||||
$flag = $oldflag; | |||||
} | |||||
*/ | |||||
$query = "UPDATE `#@__archives` SET | $query = "UPDATE `#@__archives` SET | ||||
typeid = '$typeid', | typeid = '$typeid', | ||||
flag = '$flag', | flag = '$flag', | ||||
@@ -661,28 +651,25 @@ function quickEditSave(){ } | |||||
} | } | ||||
//更新HTML | //更新HTML | ||||
$artUrl = MakeArt($aid, TRUE, TRUE); | $artUrl = MakeArt($aid, TRUE, TRUE); | ||||
$backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '-1'; | $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '-1'; | ||||
ShowMsg('成功更新一篇文档的基本信息!', $backurl); | |||||
ShowMsg('成功更新一篇文档的基本信息', $backurl); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
分析并自动获取文档关键词 | 分析并自动获取文档关键词 | ||||
function makekw(){ } | function makekw(){ } | ||||
--------------------------*/ else if ($dopost == "makekw") { | |||||
--------------------------*/ | |||||
else if ($dopost == "makekw") { | |||||
CheckPurview('a_Commend,sys_ArcBatch'); | CheckPurview('a_Commend,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | ||||
$query = "SELECT arc.*, addt.* From `#@__archives` arc LEFT JOIN `#@__addonarticle` addt ON addt.aid=arc.id WHERE arc.id in($arcids) AND arc.channel=1 "; | $query = "SELECT arc.*, addt.* From `#@__archives` arc LEFT JOIN `#@__addonarticle` addt ON addt.aid=arc.id WHERE arc.id in($arcids) AND arc.channel=1 "; | ||||
$dsql->SetQuery($query); | $dsql->SetQuery($query); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | ||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | ||||
$client->appid = $cfg_bizcore_appid; | $client->appid = $cfg_bizcore_appid; | ||||
@@ -695,12 +682,12 @@ function makekw(){ } | |||||
$title = $row['title']; | $title = $row['title']; | ||||
$description = $row['description']; | $description = $row['description']; | ||||
$body = cn_substr($row['body'], 5000); | $body = cn_substr($row['body'], 5000); | ||||
$data = $client->Spliteword($title . Html2Text($body)); | |||||
$data = $client->Spliteword($title.Html2Text($body)); | |||||
$keywords = $data->data; | $keywords = $data->data; | ||||
$description = str_replace(' ', ' ', trim($description)); | $description = str_replace(' ', ' ', trim($description)); | ||||
$description = str_replace('[', ' ', $description); | $description = str_replace('[', ' ', $description); | ||||
$description = str_replace(']', ' ', $description); | $description = str_replace(']', ' ', $description); | ||||
$description = preg_replace("#[ \r\n\t]{1,}#is", ' ', $description); | |||||
$description = preg_replace("#[ \t]{1,}#is", ' ', $description); | |||||
$description = str_replace('关键字', '', $description); | $description = str_replace('关键字', '', $description); | ||||
$description = str_replace('关键词', '', $description); | $description = str_replace('关键词', '', $description); | ||||
$description = addslashes($description); | $description = addslashes($description); | ||||
@@ -708,12 +695,11 @@ function makekw(){ } | |||||
} | } | ||||
$client->Close(); | $client->Close(); | ||||
} else { | } else { | ||||
include_once(DEDEINC . '/splitword.class.php'); | |||||
include_once(DEDEINC.'/splitword.class.php'); | |||||
$sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); | $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); | ||||
while ($row = $dsql->GetArray()) { | while ($row = $dsql->GetArray()) { | ||||
//跳过已经有关键字的内容 | //跳过已经有关键字的内容 | ||||
if (trim($row['keywords']) != '') continue; | if (trim($row['keywords']) != '') continue; | ||||
$aid = $row['id']; | $aid = $row['id']; | ||||
$keywords = ''; | $keywords = ''; | ||||
$title = $row['title']; | $title = $row['title']; | ||||
@@ -725,30 +711,28 @@ function makekw(){ } | |||||
$sp->SetSource(Html2Text($body), $cfg_soft_lang, $cfg_soft_lang); | $sp->SetSource(Html2Text($body), $cfg_soft_lang, $cfg_soft_lang); | ||||
$sp->StartAnalysis(); | $sp->StartAnalysis(); | ||||
$allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); | $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); | ||||
if (is_array($allindexs) && is_array($titleindexs)) { | if (is_array($allindexs) && is_array($titleindexs)) { | ||||
foreach ($titleindexs as $k => $v) { | foreach ($titleindexs as $k => $v) { | ||||
if (strlen($keywords . $k) >= 60) { | |||||
if (strlen($keywords.$k) >= 60) { | |||||
break; | break; | ||||
} else { | } else { | ||||
if (strlen($k) <= 2) continue; | if (strlen($k) <= 2) continue; | ||||
$keywords .= $k . ','; | |||||
$keywords .= $k.','; | |||||
} | } | ||||
} | } | ||||
foreach ($allindexs as $k => $v) { | foreach ($allindexs as $k => $v) { | ||||
if (strlen($keywords . $k) >= 60) { | |||||
if (strlen($keywords.$k) >= 60) { | |||||
break; | break; | ||||
} else if (!in_array($k, $titleindexs)) { | } else if (!in_array($k, $titleindexs)) { | ||||
if (strlen($k) <= 2) continue; | if (strlen($k) <= 2) continue; | ||||
$keywords .= $k . ','; | |||||
$keywords .= $k.','; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
$description = str_replace(' ', ' ', trim($description)); | $description = str_replace(' ', ' ', trim($description)); | ||||
$description = str_replace('[', ' ', $description); | $description = str_replace('[', ' ', $description); | ||||
$description = str_replace(']', ' ', $description); | $description = str_replace(']', ' ', $description); | ||||
$description = preg_replace("#[ \r\n\t]{1,}#is", ' ', $description); | |||||
$description = preg_replace("#[ \t]{1,}#is", ' ', $description); | |||||
$description = str_replace('关键字', '', $description); | $description = str_replace('关键字', '', $description); | ||||
$description = str_replace('关键词', '', $description); | $description = str_replace('关键词', '', $description); | ||||
$description = addslashes($description); | $description = addslashes($description); | ||||
@@ -756,24 +740,22 @@ function makekw(){ } | |||||
} | } | ||||
$sp = null; | $sp = null; | ||||
} | } | ||||
ShowMsg("成功分析指定文档的关键词!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功分析指定文档的关键词", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//批量增加属性 | //批量增加属性 | ||||
function attsAdd(){ } | function attsAdd(){ } | ||||
---------------------------*/ else if ($dopost == 'attsAdd') { | |||||
---------------------------*/ | |||||
else if ($dopost == 'attsAdd') { | |||||
CheckPurview('a_Commend,sys_ArcBatch'); | CheckPurview('a_Commend,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($flagname)) { | if (empty($flagname)) { | ||||
ShowMsg("必须指定要添加的属性!", $ENV_GOBACK_URL); | |||||
ShowMsg("必须指定要添加的属性", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | ||||
@@ -788,16 +770,16 @@ function attsAdd(){ } | |||||
if ($row['issystem'] != -1) { | if ($row['issystem'] != -1) { | ||||
$maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); | $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); | ||||
$arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); | $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}' "); | $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); | ||||
} else { | } else { | ||||
$maintable = trim($row['addtable']); | $maintable = trim($row['addtable']); | ||||
$arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); | $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}' "); | $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功对选中文档增加指定的属性!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功对选中文档增加指定的属性", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
@@ -807,11 +789,11 @@ function attsDel(){ } | |||||
CheckPurview('a_Commend,sys_ArcBatch'); | CheckPurview('a_Commend,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($flagname)) { | if (empty($flagname)) { | ||||
ShowMsg("必须指定要删除的属性!", $ENV_GOBACK_URL); | |||||
ShowMsg("必须指定要删除的属性", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | ||||
@@ -833,7 +815,7 @@ function attsDel(){ } | |||||
$arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); | $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); | ||||
} | } | ||||
$flag = $arr['flag']; | $flag = $arr['flag']; | ||||
if (trim($flag) == '' || !preg_match("#" . $flagname . "#", $flag)) { | |||||
if (trim($flag) == '' || !preg_match("#".$flagname."#", $flag)) { | |||||
continue; | continue; | ||||
} else { | } else { | ||||
$flags = explode(',', $flag); | $flags = explode(',', $flag); | ||||
@@ -845,85 +827,86 @@ function attsDel(){ } | |||||
$flag = trim(join(',', $okflags)); | $flag = trim(join(',', $okflags)); | ||||
$dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE {$idname}='{$aid}' "); | $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE {$idname}='{$aid}' "); | ||||
} | } | ||||
ShowMsg("成功对选中文档删除指定的属性!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功对选中文档删除指定的属性", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//获得批量属性处理的AJAX窗体 | //获得批量属性处理的AJAX窗体 | ||||
function attsDlg(){ } | function attsDlg(){ } | ||||
---------------------------*/ else if ($dopost == 'attsDlg') { | |||||
---------------------------*/ | |||||
else if ($dopost == 'attsDlg') { | |||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
$dojobname = ($dojob == 'attsDel' ? '批量删除属性' : '批量增加属性'); | $dojobname = ($dojob == 'attsDel' ? '批量删除属性' : '批量增加属性'); | ||||
AjaxHead(); | AjaxHead(); | ||||
//输出AJAX可移动窗体 | //输出AJAX可移动窗体 | ||||
$divname = 'attsDlg'; | $divname = 'attsDlg'; | ||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">\r\n"; | |||||
echo " <div class='titLeft'>{$dojobname}</div>\r\n"; | |||||
echo " <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' alt='关闭' title='关闭' /></div>\r\n"; | |||||
echo "</div>\r\n"; | |||||
echo "<form name='quickeditform' action='archives_do.php' method='post'>\r\n"; | |||||
echo "<input type='hidden' name='dopost' value='{$dojob}' />\r\n"; | |||||
echo "<input type='hidden' name='qstr' value='{$qstr}' />\r\n"; | |||||
echo "<table width='100%' style='margin-top:6px;z-index:9000;'>\r\n"; | |||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">"; | |||||
echo "<div class='titLeft'>{$dojobname}</div>"; | |||||
echo "<div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' title='关闭'></div>"; | |||||
echo "</div>"; | |||||
echo "<form name='quickeditform' action='archives_do.php' method='post'>"; | |||||
echo "<input type='hidden' name='dopost' value='{$dojob}'>"; | |||||
echo "<input type='hidden' name='qstr' value='{$qstr}'>"; | |||||
echo "<table width='100%' style='display:inline-block;z-index:9000'>"; | |||||
?> | ?> | ||||
<tr height='28'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 属 性:</td> | <td width="80" class='bline'> 属 性:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<input type='hidden' name='oldflag' value='<?php echo $arcRow['flag']; ?>' /> | |||||
<input type='hidden' name='oldflag' value='<?php echo $arcRow['flag']; ?>'> | |||||
<?php | <?php | ||||
$dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); | $dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($trow = $dsql->GetObject()) { | while ($trow = $dsql->GetObject()) { | ||||
if ($trow->att == 'j' || $trow->att == 'p') continue; | if ($trow->att == 'j' || $trow->att == 'p') continue; | ||||
echo "<label><input class='np' type='radio' name='flagname' id='flags{$trow->att}' value='{$trow->att}' /> {$trow->attname}.{$trow->att}</label>"; | |||||
echo "<label><input class='np' type='radio' name='flagname' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> "; | |||||
} | } | ||||
?> | ?> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 文档ID:</td> | <td width="80" class='bline'> 文档ID:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:310px;overflow:hidden;' /> | |||||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:320px;overflow:hidden'> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<td colspan='2' align='center' style='padding-top:12px'> | |||||
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" class="np" border="0" style="cursor:pointer" /> | |||||
<tr height='36'> | |||||
<td colspan='2' align='center' style='padding-top:10px'> | |||||
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" class="np" style="cursor:pointer"> | |||||
| | ||||
<img src="images/button_back.gif" width="60" height="22" border="0" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer" /> | |||||
<img src="images/button_back.gif" width="60" height="22" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer"> | |||||
</td> | </td> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
</form> | </form> | ||||
<?php | <?php | ||||
//AJAX窗体结束 | |||||
//AJAX窗体结束 | |||||
} | } | ||||
/*------------------------ | /*------------------------ | ||||
function getCatMap() { } | function getCatMap() { } | ||||
-------------------------*/ else if ($dopost == 'getCatMap') { | |||||
require_once(DEDEINC . '/typeunit.class.selector.php'); | |||||
-------------------------*/ | |||||
else if ($dopost == 'getCatMap') { | |||||
require_once(DEDEINC.'/typeunit.class.selector.php'); | |||||
AjaxHead(); | AjaxHead(); | ||||
//输出AJAX可移动窗体 | //输出AJAX可移动窗体 | ||||
$divname = 'getCatMap'; | $divname = 'getCatMap'; | ||||
echo "<div class='title' style='cursor:default;'>\r\n"; | |||||
echo " <div class='titLeft'>栏目快速选择器</div>\r\n"; | |||||
echo " <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' alt='关闭' title='关闭' /></div>\r\n"; | |||||
echo "</div>\r\n"; | |||||
echo "<div class='title' style='cursor:default'>"; | |||||
echo "<div class='titLeft'>栏目快速选择器</div>"; | |||||
echo "<div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' title='关闭'></div>"; | |||||
echo "</div>"; | |||||
$tus = new TypeUnitSelector(); | $tus = new TypeUnitSelector(); | ||||
?> | |||||
?> | |||||
<form name='quicksel' action='javascript:;' method='get'> | <form name='quicksel' action='javascript:;' method='get'> | ||||
<div class='quicksel'> | <div class='quicksel'> | ||||
<?php $tus->ListAllType($channelid); ?> | <?php $tus->ListAllType($channelid); ?> | ||||
</div> | </div> | ||||
<div align='center' class='quickselfoot'> | <div align='center' class='quickselfoot'> | ||||
<img src="images/button_ok.gif" onclick="getSelCat('<?php echo $targetid; ?>');" width="60" height="22" class="np" border="0" style="cursor:pointer" /> | |||||
<img src="images/button_ok.gif" onclick="getSelCat('<?php echo $targetid; ?>');" width="60" height="22" class="np" style="cursor:pointer"> | |||||
| | ||||
<img src="images/button_back.gif" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' width="60" height="22" border="0" style="cursor:pointer" /> | |||||
<img src="images/button_back.gif" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' width="60" height="22" style="cursor:pointer"> | |||||
</div> | </div> | ||||
</form> | </form> | ||||
<?php | <?php | ||||
//AJAX窗体结束 | |||||
//AJAX窗体结束 | |||||
} | } | ||||
?> | ?> |
@@ -9,16 +9,16 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | 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 (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | 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(); | ClearMyAddon(); | ||||
$aid = intval($aid); | $aid = intval($aid); | ||||
@@ -35,7 +35,7 @@ if ($dopost != 'save') { | |||||
exit(); | exit(); | ||||
} | } | ||||
$query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; | |||||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||||
$cInfos = $dsql->GetOne($query); | $cInfos = $dsql->GetOne($query); | ||||
if (!is_array($cInfos)) { | if (!is_array($cInfos)) { | ||||
ShowMsg("读取频道配置信息出错!", "javascript:;"); | ShowMsg("读取频道配置信息出错!", "javascript:;"); | ||||
@@ -51,8 +51,8 @@ if ($dopost != 'save') { | |||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == '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) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
if (empty($litpic_b64)) $litpic_b64 = ''; | if (empty($litpic_b64)) $litpic_b64 = ''; | ||||
@@ -111,15 +111,15 @@ function __save(){ } | |||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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; | $litpic = $fullUrl; | ||||
} | } | ||||
@@ -145,17 +145,17 @@ function __save(){ } | |||||
} | } | ||||
${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); | ${$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)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag . ',p'); | |||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||||
} | } | ||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | 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); | UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | ||||
$artUrl = MakeArt($id, TRUE, TRUE, $isremote); | $artUrl = MakeArt($id, TRUE, TRUE, $isremote); | ||||
if ($artUrl == '') { | if ($artUrl == '') { | ||||
$artUrl = $cfg_phpurl . "/view.php?aid=$id"; | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||||
} | } | ||||
ClearMyAddon($id, $title); | 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_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> | <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | ||||
| | ||||
@@ -9,16 +9,16 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('a_New,a_AccNew'); | 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 (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | 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(); | ClearMyAddon(); | ||||
$channelid = empty($channelid) ? 0 : intval($channelid); | $channelid = empty($channelid) ? 0 : intval($channelid); | ||||
$cid = empty($cid) ? 0 : intval($cid); | $cid = empty($cid) ? 0 : intval($cid); | ||||
@@ -43,8 +43,8 @@ if ($dopost != 'save') { | |||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == '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) { | if ($typeid == 0) { | ||||
ShowMsg("请指定文档的栏目!", "-1"); | ShowMsg("请指定文档的栏目!", "-1"); | ||||
@@ -83,15 +83,15 @@ function __save(){ } | |||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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; | $litpic = $fullUrl; | ||||
} | } | ||||
//生成文档ID | //生成文档ID | ||||
@@ -124,15 +124,15 @@ function __save(){ } | |||||
} | } | ||||
${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); | ${$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)) { | 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)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` 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(); | exit(); | ||||
} | } | ||||
} | } | ||||
@@ -152,7 +152,7 @@ function __save(){ } | |||||
//生成HTML | //生成HTML | ||||
$artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | ||||
if ($artUrl == '') { | if ($artUrl == '') { | ||||
$artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||||
} | } | ||||
ClearMyAddon($arcID, $title); | ClearMyAddon($arcID, $title); | ||||
//返回成功信息 | //返回成功信息 | ||||
@@ -162,7 +162,7 @@ function __save(){ } | |||||
| | ||||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | <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> | <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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | 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 (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | 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(); | ClearMyAddon(); | ||||
$aid = intval($aid); | $aid = intval($aid); | ||||
@@ -42,8 +42,8 @@ if ($dopost != 'save') { | |||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == '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) { | if ($typeid == 0) { | ||||
ShowMsg("请指定文档的栏目!", "-1"); | ShowMsg("请指定文档的栏目!", "-1"); | ||||
exit(); | exit(); | ||||
@@ -81,15 +81,15 @@ function __save(){ } | |||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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; | $litpic = $fullUrl; | ||||
} | } | ||||
//分析处理附加表数据 | //分析处理附加表数据 | ||||
@@ -114,14 +114,14 @@ function __save(){ } | |||||
} | } | ||||
${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); | ${$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)) { | 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' "); | $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
@@ -137,7 +137,7 @@ function __save(){ } | |||||
//生成HTML | //生成HTML | ||||
UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); | UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); | ||||
$artUrl = MakeArt($id, TRUE, TRUE, $isremote); | $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); | 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_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> | <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | ||||
| | ||||
@@ -9,18 +9,18 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . '/config.php'); | |||||
require_once(dirname(__FILE__).'/config.php'); | |||||
CheckPurview('a_New,a_AccNew'); | 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 (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | 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(); | ClearMyAddon(); | ||||
$channelid = empty($channelid) ? 0 : intval($channelid); | $channelid = empty($channelid) ? 0 : intval($channelid); | ||||
$cid = empty($cid) ? 0 : intval($cid); | $cid = empty($cid) ? 0 : intval($cid); | ||||
@@ -32,7 +32,7 @@ if ($dopost != 'save') { | |||||
//采集单个网页 | //采集单个网页 | ||||
if (preg_match("#^http:\/\/#", $geturl)) { | if (preg_match("#^http:\/\/#", $geturl)) { | ||||
require_once(DEDEADMIN . "/inc/inc_coonepage.php"); | |||||
require_once(DEDEADMIN."/inc/inc_coonepage.php"); | |||||
$redatas = CoOnePage($geturl); | $redatas = CoOnePage($geturl); | ||||
extract($redatas); | extract($redatas); | ||||
} | } | ||||
@@ -60,8 +60,8 @@ if ($dopost != 'save') { | |||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == '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) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
@@ -123,15 +123,15 @@ function __save(){ } | |||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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; | $litpic = $fullUrl; | ||||
} | } | ||||
@@ -169,18 +169,18 @@ function __save(){ } | |||||
if (!isset(${$vs[0]})) ${$vs[0]} = ''; | if (!isset(${$vs[0]})) ${$vs[0]} = ''; | ||||
${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); | ${$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)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag . ',p'); | |||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||||
} | } | ||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | 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)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -216,7 +216,7 @@ function __save(){ } | |||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); | $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); | ||||
$dsql->ExecuteNoneQuery("Delete From `#@__arctiny` 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(); | exit(); | ||||
} | } | ||||
//生成HTML | //生成HTML | ||||
@@ -225,7 +225,7 @@ function __save(){ } | |||||
if (count($_SESSION['bigfile_info']) > 0) { | if (count($_SESSION['bigfile_info']) > 0) { | ||||
foreach ($_SESSION['bigfile_info'] as $k => $v) { | foreach ($_SESSION['bigfile_info'] as $k => $v) { | ||||
if (!empty($v)) { | if (!empty($v)) { | ||||
$pictitle = ${'picinfook' . $k}; | |||||
$pictitle = ${'picinfook'.$k}; | |||||
$titleSet = ''; | $titleSet = ''; | ||||
if (!empty($pictitle)) { | if (!empty($pictitle)) { | ||||
$picTitle = TRUE; | $picTitle = TRUE; | ||||
@@ -237,7 +237,7 @@ function __save(){ } | |||||
} | } | ||||
$artUrl = MakeArt($arcID, true, true, $isremote); | $artUrl = MakeArt($arcID, true, true, $isremote); | ||||
if ($artUrl == '') { | if ($artUrl == '') { | ||||
$artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||||
} | } | ||||
ClearMyAddon($arcID, $title); | ClearMyAddon($arcID, $title); | ||||
@@ -259,13 +259,13 @@ function __save(){ } | |||||
| | ||||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> | <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> | <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文章管理</a> | ||||
| | ||||
$backurl | $backurl | ||||
"; | "; | ||||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>" . GetUpdateTest(); | |||||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||||
$wintitle = "成功发布文章!"; | $wintitle = "成功发布文章!"; | ||||
$wecome_info = "文章管理::发布文章"; | $wecome_info = "文章管理::发布文章"; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
@@ -9,14 +9,14 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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'); | CheckPurview('sys_Source'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if (empty($allurls)) $allsource = ''; | if (empty($allurls)) $allsource = ''; | ||||
else $allurls = stripslashes($allurls); | else $allurls = stripslashes($allurls); | ||||
$m_file = DEDEDATA . "/admin/allowurl.txt"; | |||||
$m_file = DEDEDATA."/admin/allowurl.txt"; | |||||
//保存 | //保存 | ||||
if ($dopost == 'save') { | if ($dopost == 'save') { | ||||
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
if (empty($action)) $action = ''; | if (empty($action)) $action = ''; | ||||
@@ -115,6 +115,6 @@ function _ShowLoad(){ } | |||||
$sql = ""; | $sql = ""; | ||||
$sql = "SELECT id,url,title,lang,issource FROM `#@__co_onepage` ORDER BY id DESC"; | $sql = "SELECT id,url,title,lang,issource FROM `#@__co_onepage` ORDER BY id DESC"; | ||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->SetTemplate(DEDEADMIN . "/templets/article_coonepage_rule.htm"); | |||||
$dlist->SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm"); | |||||
$dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
$dlist->Display(); | $dlist->Display(); |
@@ -11,7 +11,7 @@ | |||||
*/ | */ | ||||
@ob_start(); | @ob_start(); | ||||
@set_time_limit(3600); | @set_time_limit(3600); | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('sys_Keyword'); | CheckPurview('sys_Keyword'); | ||||
if (empty($dojob)) $dojob = ''; | if (empty($dojob)) $dojob = ''; | ||||
if ($dojob == '') { | if ($dojob == '') { | ||||
@@ -98,7 +98,7 @@ if ($dojob == '') { | |||||
//更新自动分页 | //更新自动分页 | ||||
if ($dojob == 'page') { | if ($dojob == 'page') { | ||||
require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); | |||||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||||
$addquery = ""; | $addquery = ""; | ||||
if ($sid != 0) { | if ($sid != 0) { | ||||
@@ -119,7 +119,7 @@ if ($dojob == '') { | |||||
if ($totalnum > $startdd + $pagesize) { | if ($totalnum > $startdd + $pagesize) { | ||||
$limitSql = " LIMIT $startdd,$pagesize"; | $limitSql = " LIMIT $startdd,$pagesize"; | ||||
} else if (($totalnum - $startdd) > 0) { | } else if (($totalnum - $startdd) > 0) { | ||||
$limitSql = " LIMIT $startdd," . ($totalnum - $startdd); | |||||
$limitSql = " LIMIT $startdd,".($totalnum - $startdd); | |||||
} else { | } else { | ||||
$limitSql = ""; | $limitSql = ""; | ||||
} | } | ||||
@@ -156,7 +156,7 @@ if ($dojob == '') { | |||||
$tjsta .= "<br/>完成处理文档总数的:$tjlen %,继续执行任务..."; | $tjsta .= "<br/>完成处理文档总数的:$tjlen %,继续执行任务..."; | ||||
if ($tjnum < $totalnum) { | 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); | ShowMsg($tjsta, $nurl, 0, 500); | ||||
exit(); | exit(); | ||||
} else { | } else { | ||||
@@ -9,20 +9,20 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | 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 = ''; | if (empty($dopost)) $dopost = ''; | ||||
$aid = isset($aid) && is_numeric($aid) ? $aid : 0; | $aid = isset($aid) && is_numeric($aid) ? $aid : 0; | ||||
if ($dopost != 'save') { | 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(); | ClearMyAddon(); | ||||
//读取归档信息 | //读取归档信息 | ||||
@@ -35,7 +35,7 @@ if ($dopost != 'save') { | |||||
ShowMsg("读取档案基本信息出错!", "-1"); | ShowMsg("读取档案基本信息出错!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
$query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; | |||||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||||
$cInfos = $dsql->GetOne($query); | $cInfos = $dsql->GetOne($query); | ||||
if (!is_array($cInfos)) { | if (!is_array($cInfos)) { | ||||
ShowMsg("读取频道配置信息出错!", "javascript:;"); | ShowMsg("读取频道配置信息出错!", "javascript:;"); | ||||
@@ -55,8 +55,8 @@ if ($dopost != 'save') { | |||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == '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) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
@@ -139,7 +139,7 @@ function __save(){ } | |||||
} | } | ||||
${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); | ${$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 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
$ntime = time(); | $ntime = time(); | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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; | $litpic = $fullUrl; | ||||
} | } | ||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag . ',p'); | |||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||||
} | } | ||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | 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); | UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | ||||
$artUrl = MakeArt($id, true, true, $isremote); | $artUrl = MakeArt($id, true, true, $isremote); | ||||
if ($artUrl == '') { | if ($artUrl == '') { | ||||
$artUrl = $cfg_phpurl . "/view.php?aid=$id"; | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||||
} | } | ||||
ClearMyAddon($id, $title); | 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='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> | <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> | ||||
| | ||||
@@ -9,9 +9,9 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('sys_Keyword'); | CheckPurview('sys_Keyword'); | ||||
require_once(DEDEINC . "/datalistcp.class.php"); | |||||
require_once(DEDEINC."/datalistcp.class.php"); | |||||
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
@@ -24,19 +24,19 @@ if ($dopost == 'saveall') { | |||||
exit(); | exit(); | ||||
} | } | ||||
foreach ($aids as $aid) { | 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'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); | ||||
continue; | continue; | ||||
} | } | ||||
//禁用项目 | //禁用项目 | ||||
$staold = ${'staold_' . $aid}; | |||||
$sta = empty(${'isnouse_' . $aid}) ? 1 : 0; | |||||
$staold = ${'staold_'.$aid}; | |||||
$sta = empty(${'isnouse_'.$aid}) ? 1 : 0; | |||||
if ($staold != $sta) { | if ($staold != $sta) { | ||||
$query1 = "UPDATE `#@__keywords` SET sta='$sta',rpurl='$rpurl' WHERE aid='$aid' "; | $query1 = "UPDATE `#@__keywords` SET sta='$sta',rpurl='$rpurl' WHERE aid='$aid' "; | ||||
$dsql->ExecuteNoneQuery($query1); | $dsql->ExecuteNoneQuery($query1); | ||||
@@ -82,7 +82,7 @@ $sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY rank DESC"; | |||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->pageSize = 20; | $dlist->pageSize = 20; | ||||
$dlist->SetParameter("keyword", $keyword); | $dlist->SetParameter("keyword", $keyword); | ||||
$dlist->SetTemplate(DEDEADMIN . "/templets/article_keywords_main.htm"); | |||||
$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); | |||||
$dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
$dlist->Display(); | $dlist->Display(); | ||||
@@ -11,7 +11,7 @@ | |||||
*/ | */ | ||||
@ob_start(); | @ob_start(); | ||||
@set_time_limit(3600); | @set_time_limit(3600); | ||||
require_once(dirname(__FILE__) . '/config.php'); | |||||
require_once(dirname(__FILE__).'/config.php'); | |||||
CheckPurview('sys_Keyword'); | CheckPurview('sys_Keyword'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
@@ -43,14 +43,14 @@ if ($dopost == 'analyse') { | |||||
continue; | continue; | ||||
} | } | ||||
if (isset($ws[$v])) { | if (isset($ws[$v])) { | ||||
$mykey .= $v . " "; | |||||
$mykey .= $v." "; | |||||
} else if (isset($wsnew[$v])) { | } else if (isset($wsnew[$v])) { | ||||
$mykey .= $v . ' '; | |||||
$mykey .= $v.' '; | |||||
$wsnew[$v]++; | $wsnew[$v]++; | ||||
} else if (isset($wserr[$v])) { | } else if (isset($wserr[$v])) { | ||||
$nerr = true; | $nerr = true; | ||||
} else { | } else { | ||||
$mykey .= $v . " "; | |||||
$mykey .= $v." "; | |||||
$wsnew[$v] = 1; | $wsnew[$v] = 1; | ||||
} | } | ||||
} | } | ||||
@@ -68,7 +68,7 @@ if ($dopost == 'analyse') { | |||||
if (strlen($k) > 20) { | if (strlen($k) > 20) { | ||||
continue; | 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(); | $dsql->Execute(); | ||||
} | } | ||||
echo "完成关键字的导入!<br/>\r\n"; | echo "完成关键字的导入!<br/>\r\n"; | ||||
@@ -84,7 +84,7 @@ if ($dopost == 'analyse') { | |||||
} | } | ||||
//自动获取关键字(适用于默认的文章模型) | //自动获取关键字(适用于默认的文章模型) | ||||
else if ($dopost == 'fetch') { | else if ($dopost == 'fetch') { | ||||
require_once(DEDEINC . "/splitword.class.php"); | |||||
require_once(DEDEINC."/splitword.class.php"); | |||||
if (empty($startdd)) { | if (empty($startdd)) { | ||||
$startdd = 0; | $startdd = 0; | ||||
} | } | ||||
@@ -105,7 +105,7 @@ else if ($dopost == 'fetch') { | |||||
if ($totalnum > $startdd + $pagesize) { | if ($totalnum > $startdd + $pagesize) { | ||||
$limitSql = " LIMIT $startdd,$pagesize"; | $limitSql = " LIMIT $startdd,$pagesize"; | ||||
} else if (($totalnum - $startdd) > 0) { | } else if (($totalnum - $startdd) > 0) { | ||||
$limitSql = " LIMIT $startdd," . ($totalnum - $startdd); | |||||
$limitSql = " LIMIT $startdd,".($totalnum - $startdd); | |||||
} else { | } else { | ||||
$limitSql = ''; | $limitSql = ''; | ||||
} | } | ||||
@@ -127,7 +127,7 @@ else if ($dopost == 'fetch') { | |||||
$tjnum++; | $tjnum++; | ||||
$id = $row->id; | $id = $row->id; | ||||
$keywords = ""; | $keywords = ""; | ||||
$data = $client->Spliteword($row->title . Html2Text($row->body)); | |||||
$data = $client->Spliteword($row->title.Html2Text($row->body)); | |||||
$keywords = $data->data; | $keywords = $data->data; | ||||
$keywords = addslashes($keywords); | $keywords = addslashes($keywords); | ||||
if ($keywords == '') { | if ($keywords == '') { | ||||
@@ -162,7 +162,7 @@ else if ($dopost == 'fetch') { | |||||
break; | break; | ||||
} else { | } else { | ||||
if (strlen($k) <= 2) continue; | if (strlen($k) <= 2) continue; | ||||
$keywords .= $k . ","; | |||||
$keywords .= $k.","; | |||||
} | } | ||||
} | } | ||||
foreach ($allindexs as $k => $v) { | foreach ($allindexs as $k => $v) { | ||||
@@ -170,7 +170,7 @@ else if ($dopost == 'fetch') { | |||||
break; | break; | ||||
} else if (!in_array($k, $titleindexs)) { | } else if (!in_array($k, $titleindexs)) { | ||||
if (strlen($k) <= 2) continue; | if (strlen($k) <= 2) continue; | ||||
$keywords .= $k . ","; | |||||
$keywords .= $k.","; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -194,7 +194,7 @@ else if ($dopost == 'fetch') { | |||||
$tjsta .= "<br/>完成处理文档总数的:$tjlen %,位置:{$startdd},继续执行任务..."; | $tjsta .= "<br/>完成处理文档总数的:$tjlen %,位置:{$startdd},继续执行任务..."; | ||||
if ($tjnum < $totalnum) { | 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); | ShowMsg($tjsta, $nurl, 0, 500); | ||||
} else { | } else { | ||||
ShowMsg("完成所有任务!", "javascript:;"); | ShowMsg("完成所有任务!", "javascript:;"); | ||||
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
$f = RemoveXSS($f); | $f = RemoveXSS($f); | ||||
@@ -19,7 +19,7 @@ if (empty($keywords)) $keywords = ""; | |||||
$sql = "SELECT * FROM #@__keywords ORDER BY rank DESC"; | $sql = "SELECT * FROM #@__keywords ORDER BY rank DESC"; | ||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->SetTemplate(DEDEADMIN . "/templets/article_keywords_select.htm"); | |||||
$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); | |||||
$dlist->pageSize = 300; | $dlist->pageSize = 300; | ||||
$dlist->SetParameter("f", $f); | $dlist->SetParameter("f", $f); | ||||
$dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
@@ -7,14 +7,14 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require(dirname(__FILE__) . "/config.php"); | |||||
require(dirname(__FILE__)."/config.php"); | |||||
header("Pragma:no-cache"); | header("Pragma:no-cache"); | ||||
header("Cache-Control:no-cache"); | header("Cache-Control:no-cache"); | ||||
header("Expires:0"); | header("Expires:0"); | ||||
//来源列表 | //来源列表 | ||||
if ($t == 'source') { | if ($t == 'source') { | ||||
$m_file = DEDEDATA . "/admin/source.txt"; | |||||
$m_file = DEDEDATA."/admin/source.txt"; | |||||
$allsources = file($m_file); | $allsources = file($m_file); | ||||
echo "<div class='coolbg4'>[<a href=\"javascript:OpenMyWin('article_source_edit.php');ClearDivCt('mysource');\">设置</a>] "; | 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"; | 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>"; | echo "</div><div class='coolbg5'> </div>"; | ||||
} else { | } 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 "<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"; | echo "[<a href='#' onclick='javascript:HideObj(\"mywriter\");ChangeFullDiv(\"hide\");'>关闭</a>]</div>\r\n<div class='wsselect'>\r\n"; | ||||
if (filesize($m_file) > 0) { | if (filesize($m_file) > 0) { | ||||
@@ -9,14 +9,14 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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'); | CheckPurview('sys_Source'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if (empty($allsource)) $allsource = ''; | if (empty($allsource)) $allsource = ''; | ||||
else $allsource = stripslashes($allsource); | else $allsource = stripslashes($allsource); | ||||
$m_file = DEDEDATA . "/admin/source.txt"; | |||||
$m_file = DEDEDATA."/admin/source.txt"; | |||||
//保存 | //保存 | ||||
if ($dopost == 'save') { | if ($dopost == 'save') { | ||||
@@ -9,15 +9,15 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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'); | CheckPurview('sys_StringMix'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if (empty($allsource)) $allsource = ''; | if (empty($allsource)) $allsource = ''; | ||||
else $allsource = stripslashes($allsource); | else $allsource = stripslashes($allsource); | ||||
$m_file = DEDEDATA . "/downmix.data.php"; | |||||
$m_file = DEDEDATA."/downmix.data.php"; | |||||
//保存 | //保存 | ||||
if ($dopost == "save") { | if ($dopost == "save") { | ||||
@@ -9,12 +9,12 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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'); | CheckPurview('sys_StringMix'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
$templates = empty($templates) ? '' : stripslashes($templates); | $templates = empty($templates) ? '' : stripslashes($templates); | ||||
$m_file = DEDEDATA . '/template.rand.php'; | |||||
$m_file = DEDEDATA.'/template.rand.php'; | |||||
//----------------------action | //----------------------action | ||||
$okmsg = ''; | $okmsg = ''; | ||||
@@ -25,7 +25,7 @@ if ($dopost == 'save') { | |||||
flock($fp, 3); | flock($fp, 3); | ||||
fwrite($fp, $templates); | fwrite($fp, $templates); | ||||
fclose($fp); | fclose($fp); | ||||
$okmsg = '成功保存配置信息 AT:(' . MyDate('H:i:s', time()) . ')'; | |||||
$okmsg = '成功保存配置信息 AT:('.MyDate('H:i:s', time()).')'; | |||||
} | } | ||||
//对旧文档进行随机模板处理 | //对旧文档进行随机模板处理 | ||||
else if ($dopost == 'makeold') { | else if ($dopost == 'makeold') { | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
@set_time_limit(0); | @set_time_limit(0); | ||||
CheckPurview('sys_ArcBatch'); | CheckPurview('sys_ArcBatch'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
@@ -29,8 +29,8 @@ if ($dopost == 'analyse') { | |||||
} | } | ||||
//删除选中的内容(只保留一条) | //删除选中的内容(只保留一条) | ||||
else if ($dopost == 'delsel') { | 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)) { | if (empty($titles)) { | ||||
header("Content-Type: text/html; charset={$cfg_ver_lang}"); | header("Content-Type: text/html; charset={$cfg_ver_lang}"); | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
AjaxHead(); | AjaxHead(); | ||||
if (empty($t) || $cfg_check_title == 'N') exit; | if (empty($t) || $cfg_check_title == 'N') exit; | ||||
@@ -9,15 +9,15 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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'); | CheckPurview('sys_Writer'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if (empty($allwriter)) $allwriter = ''; | if (empty($allwriter)) $allwriter = ''; | ||||
else $allwriter = stripslashes($allwriter); | else $allwriter = stripslashes($allwriter); | ||||
$m_file = DEDEDATA . "/admin/writer.txt"; | |||||
$m_file = DEDEDATA."/admin/writer.txt"; | |||||
//保存 | //保存 | ||||
if ($dopost == "save") { | if ($dopost == "save") { | ||||
@@ -9,12 +9,12 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
if (empty($do)) { | if (empty($do)) { | ||||
include DEDEADMIN . '/templets/baidunews.htm'; | |||||
include DEDEADMIN.'/templets/baidunews.htm'; | |||||
} else { | } 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 .= "<document>\n"; | ||||
$baidunews .= "<webSite>$cfg_webname </webSite>\n"; | $baidunews .= "<webSite>$cfg_webname </webSite>\n"; | ||||
$baidunews .= "<webMaster>$cfg_adminemail </webMaster>\n"; | $baidunews .= "<webMaster>$cfg_adminemail </webMaster>\n"; | ||||
@@ -37,7 +37,7 @@ if (empty($do)) { | |||||
$title = dede_htmlspecialchars($row['title']); | $title = dede_htmlspecialchars($row['title']); | ||||
$row1 = GetOneArchive($row['id']); | $row1 = GetOneArchive($row['id']); | ||||
if (strpos($row1['arcurl'], 'http://') === false) { | 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 { | } else { | ||||
$link = $row1['arcurl']; | $link = $row1['arcurl']; | ||||
} | } | ||||
@@ -46,7 +46,7 @@ if (empty($do)) { | |||||
$text = dede_htmlspecialchars(strip_tags($row['body'])); | $text = dede_htmlspecialchars(strip_tags($row['body'])); | ||||
$image = $row['litpic'] == '' ? '' : $row['litpic']; | $image = $row['litpic'] == '' ? '' : $row['litpic']; | ||||
if ($image != '' && strpos($image, 'http://') === false) { | 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 = ''; | //$headlineimg = ''; | ||||
$keywords = dede_htmlspecialchars($row['keywords']); | $keywords = dede_htmlspecialchars($row['keywords']); | ||||
@@ -71,7 +71,7 @@ if (empty($do)) { | |||||
} | } | ||||
$baidunews .= "</document>\n"; | $baidunews .= "</document>\n"; | ||||
$fp = fopen(dirname(__FILE__) . '/' . $filename, 'w'); | |||||
$fp = fopen(dirname(__FILE__).'/'.$filename, 'w'); | |||||
fwrite($fp, $baidunews); | fwrite($fp, $baidunews); | ||||
fclose($fp); | fclose($fp); | ||||
showmsg("<a href='{$filename}' target=\"_blank\">{$filename} make success</a>", 'javascript:;'); | showmsg("<a href='{$filename}' target=\"_blank\">{$filename} make success</a>", 'javascript:;'); | ||||
@@ -9,10 +9,10 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('member_Card'); | CheckPurview('member_Card'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if ($dopost == '') include(DEDEADMIN . "/templets/cards_make.htm"); | |||||
if ($dopost == '') include(DEDEADMIN."/templets/cards_make.htm"); | |||||
//生成点卡 | //生成点卡 | ||||
elseif ($dopost == 'make') { | elseif ($dopost == 'make') { | ||||
@@ -30,7 +30,7 @@ elseif ($dopost == 'make') { | |||||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | header("Content-Type: text/html; charset={$cfg_soft_lang}"); | ||||
for (; $startid < $endid; $startid++) { | for (; $startid < $endid; $startid++) { | ||||
$cardid = $snprefix . $startid . '-'; | |||||
$cardid = $snprefix.$startid.'-'; | |||||
for ($p = 0; $p < $pwdgr; $p++) { | for ($p = 0; $p < $pwdgr; $p++) { | ||||
for ($i = 0; $i < $pwdlen; $i++) { | for ($i = 0; $i < $pwdlen; $i++) { | ||||
if ($ctype == 1) { | if ($ctype == 1) { | ||||
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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; | $dopost = empty($dopost) ? "" : $dopost; | ||||
if ($dopost == "delete") { | if ($dopost == "delete") { | ||||
$ids = explode('`', $aids); | $ids = explode('`', $aids); | ||||
@@ -19,7 +19,7 @@ if ($dopost == "delete") { | |||||
if ($dquery == "") $dquery .= "aid='$id' "; | if ($dquery == "") $dquery .= "aid='$id' "; | ||||
else $dquery .= " OR aid='$id' "; | else $dquery .= " OR aid='$id' "; | ||||
} | } | ||||
if ($dquery != "") $dquery = " WHERE " . $dquery; | |||||
if ($dquery != "") $dquery = " WHERE ".$dquery; | |||||
$dsql->ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); | $dsql->ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); | ||||
ShowMsg("成功删除指定的记录!", "cards_manage.php"); | ShowMsg("成功删除指定的记录!", "cards_manage.php"); | ||||
exit(); | exit(); | ||||
@@ -37,7 +37,7 @@ if ($dopost == "delete") { | |||||
while ($rw = $dlist->dsql->GetArray('ts')) { | while ($rw = $dlist->dsql->GetArray('ts')) { | ||||
$TypeNames[$rw['tid']] = $rw['pname']; | $TypeNames[$rw['tid']] = $rw['pname']; | ||||
} | } | ||||
$tplfile = DEDEADMIN . "/templets/cards_manmage.htm"; | |||||
$tplfile = DEDEADMIN."/templets/cards_manmage.htm"; | |||||
//这两句的顺序不能更换 | //这两句的顺序不能更换 | ||||
$dlist->SetTemplate($tplfile); //载入模板 | $dlist->SetTemplate($tplfile); //载入模板 | ||||
@@ -50,7 +50,7 @@ function GetMemberID($mid) | |||||
global $dsql; | global $dsql; | ||||
if ($mid == 0) return '0'; | if ($mid == 0) return '0'; | ||||
$row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); | $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'; | else return '0'; | ||||
} | } | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . '/config.php'); | |||||
require_once(dirname(__FILE__).'/config.php'); | |||||
CheckPurview('member_Type'); | CheckPurview('member_Type'); | ||||
if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
@@ -19,11 +19,11 @@ if ($dopost == "save") { | |||||
$endID = $idend; | $endID = $idend; | ||||
for (; $startID <= $endID; $startID++) { | for (; $startID <= $endID; $startID++) { | ||||
$query = ''; | $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 != '') { | if ($pname != '') { | ||||
$query = "UPDATE #@__moneycard_type SET pname='$pname',money='$money',num='$num' WHERE tid='$tid'"; | $query = "UPDATE #@__moneycard_type SET pname='$pname',money='$money',num='$num' WHERE tid='$tid'"; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
@@ -46,4 +46,4 @@ if ($dopost == "save") { | |||||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | header("Content-Type: text/html; charset={$cfg_soft_lang}"); | ||||
echo "<script> alert('成功更新点卡产品分类表!'); </script>"; | 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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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($listtype)) $listtype = ''; | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
@@ -67,11 +67,11 @@ function action_savequick(){ } | |||||
} else { | } else { | ||||
continue; | 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 = GetPinyin(stripslashes($toptypename)); | ||||
$toptypedir = $referpath == 'parent' ? $nextdir . '/' . $toptypedir : '/' . $toptypedir; | |||||
$toptypedir = $referpath == 'parent' ? $nextdir.'/'.$toptypedir : '/'.$toptypedir; | |||||
if (empty($toptypename)) { | if (empty($toptypename)) { | ||||
continue; | continue; | ||||
} | } | ||||
@@ -89,7 +89,7 @@ function action_savequick(){ } | |||||
if ($v == '') { | if ($v == '') { | ||||
continue; | continue; | ||||
} | } | ||||
$typedir = $toptypedir . '/' . GetPinyin(stripslashes($v)); | |||||
$typedir = $toptypedir.'/'.GetPinyin(stripslashes($v)); | |||||
$sql = str_replace('~reid~', $tid, $queryTemplate); | $sql = str_replace('~reid~', $tid, $queryTemplate); | ||||
$sql = str_replace('~topid~', $tid, $sql); | $sql = str_replace('~topid~', $tid, $sql); | ||||
$sql = str_replace('~rank~', $k, $sql); | $sql = str_replace('~rank~', $k, $sql); | ||||
@@ -109,18 +109,18 @@ function action_savequick(){ } | |||||
} else { | } else { | ||||
continue; | continue; | ||||
} | } | ||||
$rank = ${'rank' . $k}; | |||||
$toptypename = trim(${'reltype' . $k}); | |||||
$rank = ${'rank'.$k}; | |||||
$toptypename = trim(${'reltype'.$k}); | |||||
$toptypedir = GetPinyin(stripslashes($toptypename)); | $toptypedir = GetPinyin(stripslashes($toptypename)); | ||||
switch ($referpath) { | switch ($referpath) { | ||||
case 'parent': | case 'parent': | ||||
$toptypedir = $nextdir . '/' . $toptypedir; | |||||
$toptypedir = $nextdir.'/'.$toptypedir; | |||||
break; | break; | ||||
case 'typepath': | case 'typepath': | ||||
$toptypedir = isset($row['typedir']) ? $row['typedir'] . '/' . $toptypedir : '/' . $toptypedir; | |||||
$toptypedir = isset($row['typedir']) ? $row['typedir'].'/'.$toptypedir : '/'.$toptypedir; | |||||
break; | break; | ||||
default: | default: | ||||
$toptypedir = '/' . $toptypedir; | |||||
$toptypedir = '/'.$toptypedir; | |||||
break; | break; | ||||
} | } | ||||
@@ -161,7 +161,7 @@ function action_save(){ } | |||||
if ($upinyin == 1 || $typedir == '') { | if ($upinyin == 1 || $typedir == '') { | ||||
$typedir = GetPinyin(stripslashes($typename)); | $typedir = GetPinyin(stripslashes($typename)); | ||||
} | } | ||||
$typedir = $nextdir . '/' . $typedir; | |||||
$typedir = $nextdir.'/'.$typedir; | |||||
$typedir = preg_replace("#\/{1,}#", "/", $typedir); | $typedir = preg_replace("#\/{1,}#", "/", $typedir); | ||||
} | } | ||||
@@ -176,7 +176,7 @@ function action_save(){ } | |||||
ShowMsg("你绑定的二级域名无效,请用(http://host)的形式!", "-1"); | ShowMsg("你绑定的二级域名无效,请用(http://host)的形式!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
if (preg_match("#" . $cfg_basehost . "#i", $siteurl)) { | |||||
if (preg_match("#".$cfg_basehost."#i", $siteurl)) { | |||||
ShowMsg("你绑定的二级域名与当前站点是同一个域,不需要绑定!", "-1"); | ShowMsg("你绑定的二级域名与当前站点是同一个域,不需要绑定!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -9,12 +9,12 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . '/config.php'); | |||||
require_once(dirname(__FILE__).'/config.php'); | |||||
//检查权限许可 | //检查权限许可 | ||||
CheckPurview('t_Del,t_AccDel'); | 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)); | $id = trim(preg_replace("#[^0-9]#", '', $id)); | ||||
//检查栏目操作许可 | //检查栏目操作许可 | ||||
@@ -27,7 +27,7 @@ if ($dopost == 'ok') { | |||||
ShowMsg("成功删除一个栏目!", "catalog_main.php"); | ShowMsg("成功删除一个栏目!", "catalog_main.php"); | ||||
exit(); | exit(); | ||||
} | } | ||||
$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=" . $id); | |||||
$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); | |||||
$row = $dsql->GetOne(); | $row = $dsql->GetOne(); | ||||
$wintitle = "删除栏目确认"; | $wintitle = "删除栏目确认"; | ||||
$wecome_info = "<a href='catalog_main.php'>栏目管理</a> >> 删除栏目确认"; | $wecome_info = "<a href='catalog_main.php'>栏目管理</a> >> 删除栏目确认"; | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . '/config.php'); | |||||
require_once(dirname(__FILE__).'/config.php'); | |||||
if (empty($dopost)) { | if (empty($dopost)) { | ||||
ShowMsg("对不起,请指定栏目参数!", "catalog_main.php"); | ShowMsg("对不起,请指定栏目参数!", "catalog_main.php"); | ||||
exit(); | exit(); | ||||
@@ -83,14 +83,14 @@ function listArchives(); | |||||
//浏览通用模板目录 | //浏览通用模板目录 | ||||
function viewTempletDir(); | function viewTempletDir(); | ||||
---------------------------*/ else if ($dopost == "viewTemplet") { | ---------------------------*/ else if ($dopost == "viewTemplet") { | ||||
header("location:tpl.php?path=/" . $cfg_df_style); | |||||
header("location:tpl.php?path=/".$cfg_df_style); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*------------------------ | /*------------------------ | ||||
浏览单个页面的栏目 | 浏览单个页面的栏目 | ||||
function ViewSgPage() | function ViewSgPage() | ||||
------------------------*/ else if ($dopost == "viewSgPage") { | ------------------------*/ else if ($dopost == "viewSgPage") { | ||||
require_once(DEDEINC . "/arc.listview.class.php"); | |||||
require_once(DEDEINC."/arc.listview.class.php"); | |||||
$lv = new ListView($cid); | $lv = new ListView($cid); | ||||
$pageurl = $lv->MakeHtml(); | $pageurl = $lv->MakeHtml(); | ||||
ShowMsg("更新缓冲,请稍后...", $pageurl); | ShowMsg("更新缓冲,请稍后...", $pageurl); | ||||
@@ -123,8 +123,8 @@ function upRank() | |||||
if (is_array($row)) { | if (is_array($row)) { | ||||
$maxID = $row['id']; | $maxID = $row['id']; | ||||
for ($i = 1; $i <= $maxID; $i++) { | 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(); | function GetSunListsMenu(); | ||||
-----------*/ else if ($dopost == "GetSunListsMenu") { | -----------*/ else if ($dopost == "GetSunListsMenu") { | ||||
$userChannel = $cuserLogin->getUserChannel(); | $userChannel = $cuserLogin->getUserChannel(); | ||||
require_once(DEDEINC . "/typeunit.class.menu.php"); | |||||
require_once(DEDEINC."/typeunit.class.menu.php"); | |||||
AjaxHead(); | AjaxHead(); | ||||
PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); | PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); | ||||
$tu = new TypeUnit($userChannel); | $tu = new TypeUnit($userChannel); | ||||
@@ -185,7 +185,7 @@ function GetSunListsMenu(); | |||||
获得子类的内容 | 获得子类的内容 | ||||
function GetSunLists(); | function GetSunLists(); | ||||
-----------*/ else if ($dopost == "GetSunLists") { | -----------*/ else if ($dopost == "GetSunLists") { | ||||
require_once(DEDEINC . "/typeunit.class.admin.php"); | |||||
require_once(DEDEINC."/typeunit.class.admin.php"); | |||||
AjaxHead(); | AjaxHead(); | ||||
PutCookie('lastCid', $cid, 3600 * 24, "/"); | PutCookie('lastCid', $cid, 3600 * 24, "/"); | ||||
$tu = new TypeUnit(); | $tu = new TypeUnit(); | ||||
@@ -200,9 +200,9 @@ function GetSunLists(); | |||||
function unitCatalog() { } | function unitCatalog() { } | ||||
-----------------*/ else if ($dopost == 'unitCatalog') { | -----------------*/ else if ($dopost == 'unitCatalog') { | ||||
CheckPurview('t_Move'); | 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)) { | if (empty($nextjob)) { | ||||
$typeid = isset($typeid) ? intval($typeid) : 0; | $typeid = isset($typeid) ? intval($typeid) : 0; | ||||
$row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE reid='$typeid' "); | $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE reid='$typeid' "); | ||||
@@ -258,9 +258,9 @@ function unitCatalog() { } | |||||
function moveCatalog() { } | function moveCatalog() { } | ||||
-----------------*/ else if ($dopost == 'moveCatalog') { | -----------------*/ else if ($dopost == 'moveCatalog') { | ||||
CheckPurview('t_Move'); | 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)) { | if (empty($nextjob)) { | ||||
$tl = new TypeLink($typeid); | $tl = new TypeLink($typeid); | ||||
$typename = $tl->TypeInfos['typename']; | $typename = $tl->TypeInfos['typename']; | ||||
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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 = ''; | if (empty($dopost)) $dopost = ''; | ||||
$id = isset($id) ? intval($id) : 0; | $id = isset($id) ? intval($id) : 0; | ||||
@@ -71,7 +71,7 @@ if ($dopost == "save") { | |||||
if ($topid > 0 && $issend == 1) { | if ($topid > 0 && $issend == 1) { | ||||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | $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)) { | if ($topid == 0 && preg_match("#,#", $slinks)) { | ||||
@@ -103,7 +103,7 @@ if ($dopost == "save") { | |||||
} //End Save Action | } //End Save Action | ||||
else if ($dopost == "savetime") { | else if ($dopost == "savetime") { | ||||
$uptopsql = ''; | $uptopsql = ''; | ||||
$slinks = " id IN (" . GetSonIds($id) . ")"; | |||||
$slinks = " id IN (".GetSonIds($id).")"; | |||||
//顶级栏目二级域名根目录处理 | //顶级栏目二级域名根目录处理 | ||||
if ($topid == 0 && $moresite == 1) { | if ($topid == 0 && $moresite == 1) { | ||||
@@ -219,9 +219,9 @@ if ($dopost == 'time') { | |||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
if ($myrow['corank'] == $row->rank) | 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 | else | ||||
echo "<option value='" . $row->rank . "'>" . $row->membername . "</option>\r\n"; | |||||
echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n"; | |||||
} | } | ||||
?> | ?> | ||||
</select> | </select> | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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(); | $userChannel = $cuserLogin->getUserChannel(); | ||||
include DedeInclude('templets/catalog_main.htm'); | include DedeInclude('templets/catalog_main.htm'); |
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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(); | $userChannel = $cuserLogin->getUserChannel(); | ||||
if (empty($opendir)) $opendir = -1; | if (empty($opendir)) $opendir = -1; | ||||
if ($userChannel > 0) $opendir = $userChannel; | if ($userChannel > 0) $opendir = $userChannel; | ||||
@@ -10,15 +10,15 @@ | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
define('DEDEADMIN', str_replace("\\", '/', dirname(__FILE__))); | 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'); | header('Cache-Control:private'); | ||||
$dsql->safeCheck = FALSE; | $dsql->safeCheck = FALSE; | ||||
$dsql->SetLongLink(); | $dsql->SetLongLink(); | ||||
$cfg_admin_skin = 1; // 后台管理风格 | $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; | $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 ($cuserLogin->getUserID() == -1) { | ||||
if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { | if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { | ||||
$dirname = dirname($_SERVER['SCRIPT_NAME']); | $dirname = dirname($_SERVER['SCRIPT_NAME']); | ||||
header("location:{$dirname}/login.php?gotopage=" . urlencode($dedeNowurl)); | |||||
header("location:{$dirname}/login.php?gotopage=".urlencode($dedeNowurl)); | |||||
} else { | } else { | ||||
header("location:login.php?gotopage=" . urlencode($dedeNowurl)); | |||||
header("location:login.php?gotopage=".urlencode($dedeNowurl)); | |||||
} | } | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -96,21 +96,21 @@ if ($cfg_dede_log == 'Y') { | |||||
$s_scriptNames = explode('/', $s_scriptName); | $s_scriptNames = explode('/', $s_scriptName); | ||||
$s_scriptNames = $s_scriptNames[count($s_scriptNames) - 1]; | $s_scriptNames = $s_scriptNames[count($s_scriptNames) - 1]; | ||||
$s_userip = GetIP(); | $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) | $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); | $dsql->ExecuteNoneQuery($inquery); | ||||
} | } | ||||
} | } | ||||
//管理缓存、管理员频道缓存 | //管理缓存、管理员频道缓存 | ||||
$cache1 = DEDEDATA . '/cache/inc_catalog_base.inc'; | |||||
$cache1 = DEDEDATA.'/cache/inc_catalog_base.inc'; | |||||
if (!file_exists($cache1)) UpDateCatCache(); | 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); | 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) { | if (strlen($cfg_cookie_encode) <= 10) { | ||||
$chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; | $chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; | ||||
@@ -121,25 +121,25 @@ if (strlen($cfg_cookie_encode) <= 10) { | |||||
$hash .= $chars[mt_rand(0, $max)]; | $hash .= $chars[mt_rand(0, $max)]; | ||||
} | } | ||||
$dsql->ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='{$hash}' WHERE varname='cfg_cookie_encode' "); | $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)) { | if (!is_writeable($configfile)) { | ||||
echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数!"; | echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数!"; | ||||
exit(); | exit(); | ||||
} | } | ||||
$fp = fopen($configfile, 'w'); | $fp = fopen($configfile, 'w'); | ||||
flock($fp, 3); | 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->SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($row = $dsql->GetArray()) { | while ($row = $dsql->GetArray()) { | ||||
if ($row['type'] == 'number') { | if ($row['type'] == 'number') { | ||||
if ($row['value'] == '') $row['value'] = 0; | if ($row['value'] == '') $row['value'] = 0; | ||||
fwrite($fp, "\${$row['varname']} = " . $row['value'] . ";\r\n"); | |||||
fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n"); | |||||
} else { | } 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); | fclose($fp); | ||||
} | } | ||||
@@ -152,8 +152,8 @@ if (strlen($cfg_cookie_encode) <= 10) { | |||||
function UpDateCatCache() | function UpDateCatCache() | ||||
{ | { | ||||
global $dsql, $cache1, $cuserLogin; | 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->SetQuery("SELECT id,reid,channeltype,issend,typename FROM `#@__arctype`"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
$fp1 = fopen($cache1, 'w'); | $fp1 = fopen($cache1, 'w'); | ||||
@@ -175,8 +175,8 @@ function UpDateCatCache() | |||||
// 清空选项缓存 | // 清空选项缓存 | ||||
function ClearOptCache() | function ClearOptCache() | ||||
{ | { | ||||
$tplCache = DEDEDATA . '/tplcache/'; | |||||
$fileArray = glob($tplCache . "inc_option_*.inc"); | |||||
$tplCache = DEDEDATA.'/tplcache/'; | |||||
$fileArray = glob($tplCache."inc_option_*.inc"); | |||||
if (count($fileArray) > 1) { | if (count($fileArray) > 1) { | ||||
foreach ($fileArray as $key => $value) { | foreach ($fileArray as $key => $value) { | ||||
if (file_exists($value)) unlink($value); | if (file_exists($value)) unlink($value); | ||||
@@ -197,7 +197,7 @@ function ClearOptCache() | |||||
*/ | */ | ||||
function DedeInclude($filename, $isabs = FALSE) | 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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('sys_Att'); | CheckPurview('sys_Att'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
@@ -18,9 +18,9 @@ if ($dopost == "save") { | |||||
$startID = 1; | $startID = 1; | ||||
$endID = $idend; | $endID = $idend; | ||||
for (; $startID <= $endID; $startID++) { | 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' "; | $query = "UPDATE `#@__arcatt` SET `attname`='$attname',`sortid`='$sortid' WHERE att='$att' "; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
} | } | ||||
@@ -9,6 +9,6 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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'); | include DedeInclude('templets/content_batch_up.htm'); |
@@ -9,10 +9,10 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('sys_ArcBatch'); | 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); | @set_time_limit(0); | ||||
//typeid,startid,endid,seltime,starttime,endtime,action,newtypeid | //typeid,startid,endid,seltime,starttime,endtime,action,newtypeid | ||||
@@ -29,7 +29,7 @@ if (empty($userid)) $userid = ''; | |||||
if ($action == "makehtml") { | if ($action == "makehtml") { | ||||
$jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | ||||
$jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; | $jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; | ||||
$jumpurl .= "&stime=" . urlencode($starttime) . "&etime=" . urlencode($endtime); | |||||
$jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); | |||||
header("Location: $jumpurl"); | header("Location: $jumpurl"); | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -65,7 +65,7 @@ if ($action == 'check') { | |||||
} | } | ||||
$jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | ||||
$jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; | $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->SetQuery("SELECT id,arcrank FROM `#@__arctiny` $gwhere"); | ||||
$dsql->Execute('c'); | $dsql->Execute('c'); | ||||
while ($row = $dsql->GetObject('c')) { | while ($row = $dsql->GetObject('c')) { | ||||
@@ -140,7 +140,7 @@ else if ($action == 'move') { | |||||
ShowMsg("不能把数据移动到内容类型不同的栏目!", "javascript:;"); | ShowMsg("不能把数据移动到内容类型不同的栏目!", "javascript:;"); | ||||
exit(); | 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']} "); | $ch = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id={$typenew['channeltype']} "); | ||||
$addtable = $ch['addtable']; | $addtable = $ch['addtable']; | ||||
@@ -161,7 +161,7 @@ else if ($action == 'move') { | |||||
if ($tdd > 0) { | if ($tdd > 0) { | ||||
$jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | ||||
$jumpurl .= "&typeid=$newtypeid&pagesize=20&seltime=$seltime"; | $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); | ShowMsg("成功移动 $tdd 条记录,准备重新生成HTML...", $jumpurl); | ||||
} else { | } else { | ||||
ShowMsg("完成操作,没移动任何数据...", "javascript:;"); | ShowMsg("完成操作,没移动任何数据...", "javascript:;"); | ||||
@@ -10,4 +10,4 @@ | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
$s_tmplets = "templets/content_i_list.htm"; | $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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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; | $cid = isset($cid) ? intval($cid) : 0; | ||||
$channelid = isset($channelid) ? intval($channelid) : 0; | $channelid = isset($channelid) ? intval($channelid) : 0; | ||||
@@ -76,11 +76,11 @@ if (empty($totalresult) && empty($keyword) && empty($orderby) && empty($flag)) { | |||||
} | } | ||||
if (!empty($cid)) { | if (!empty($cid)) { | ||||
$tinyQuerys[] = " typeid in(" . GetSonIds($cid) . ") "; | |||||
$tinyQuerys[] = " typeid in(".GetSonIds($cid).") "; | |||||
} | } | ||||
if (count($tinyQuerys) > 0) { | if (count($tinyQuerys) > 0) { | ||||
$tinyQuery = "WHERE " . join(' AND ', $tinyQuerys); | |||||
$tinyQuery = "WHERE ".join(' AND ', $tinyQuerys); | |||||
} | } | ||||
// 缓存处理 | // 缓存处理 | ||||
$sql = "SELECT COUNT(*) AS dd FROM `#@__arctiny` $tinyQuery "; | $sql = "SELECT COUNT(*) AS dd FROM `#@__arctiny` $tinyQuery "; | ||||
@@ -93,12 +93,12 @@ if ($cid == 0) { | |||||
$positionname = '所有栏目>'; | $positionname = '所有栏目>'; | ||||
} else { | } else { | ||||
$row = $tl->dsql->GetOne("SELECT id,typename,maintable FROM `#@__channeltype` WHERE id='$channelid'"); | $row = $tl->dsql->GetOne("SELECT id,typename,maintable FROM `#@__channeltype` WHERE id='$channelid'"); | ||||
$positionname = $row['typename'] . " > "; | |||||
$positionname = $row['typename']." > "; | |||||
$maintable = $row['maintable']; | $maintable = $row['maintable']; | ||||
$channelid = $row['id']; | $channelid = $row['id']; | ||||
} | } | ||||
} else { | } 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则需要缓存数据 | // 栏目大于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; | $typeCount = 0; | ||||
if (file_exists($cache1)) require_once($cache1); | if (file_exists($cache1)) require_once($cache1); | ||||
@@ -143,7 +143,7 @@ while ($frow = $dsql->GetArray('f')) { | |||||
if (!empty($userCatalogSql)) { | if (!empty($userCatalogSql)) { | ||||
$whereSql .= " AND " . $userCatalogSql; | |||||
$whereSql .= " AND ".$userCatalogSql; | |||||
} | } | ||||
if (!empty($mid)) { | if (!empty($mid)) { | ||||
$whereSql .= " AND arc.mid = '$mid' "; | $whereSql .= " AND arc.mid = '$mid' "; | ||||
@@ -155,17 +155,17 @@ if ($flag != '') { | |||||
$whereSql .= " AND FIND_IN_SET('$flag', arc.flag) "; | $whereSql .= " AND FIND_IN_SET('$flag', arc.flag) "; | ||||
} | } | ||||
if ($cid != 0) { | if ($cid != 0) { | ||||
$whereSql .= ' AND arc.typeid IN (' . GetSonIds($cid) . ')'; | |||||
$whereSql .= ' AND arc.typeid IN ('.GetSonIds($cid).')'; | |||||
} | } | ||||
if ($arcrank != '') { | if ($arcrank != '') { | ||||
$whereSql .= " AND arc.arcrank = '$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 { | } 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); | $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, | $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 | 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'; | if (empty($s_tmplets)) $s_tmplets = 'templets/content_list.htm'; | ||||
$dlist->SetTemplate(DEDEADMIN . '/' . $s_tmplets); | |||||
$dlist->SetTemplate(DEDEADMIN.'/'.$s_tmplets); | |||||
//查询 | //查询 | ||||
$dlist->SetSource($query); | $dlist->SetSource($query); | ||||
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('spec_List'); | CheckPurview('spec_List'); | ||||
$s_tmplets = "templets/content_s_list.htm"; | $s_tmplets = "templets/content_s_list.htm"; | ||||
$channelid = -1; | $channelid = -1; | ||||
include(dirname(__FILE__) . "/content_list.php"); | |||||
include(dirname(__FILE__)."/content_list.php"); |
@@ -10,4 +10,4 @@ | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
$s_tmplets = "templets/content_select_list.htm"; | $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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
$cid = isset($cid) ? intval($cid) : 0; | $cid = isset($cid) ? intval($cid) : 0; | ||||
$channelid = isset($channelid) ? intval($channelid) : 0; | $channelid = isset($channelid) ? intval($channelid) : 0; | ||||
$mid = isset($mid) ? intval($mid) : 0; | $mid = isset($mid) ? intval($mid) : 0; | ||||
@@ -36,9 +36,9 @@ if (TestPurview('a_List')) { | |||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
$maintable = '#@__archives'; | $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, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
$tl = new TypeLink($cid); | $tl = new TypeLink($cid); | ||||
$listtable = @trim($tl->TypeInfos['addtable']); | $listtable = @trim($tl->TypeInfos['addtable']); | ||||
@@ -49,10 +49,10 @@ if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $cha | |||||
if ($cid == 0) { | if ($cid == 0) { | ||||
$row = $tl->dsql->GetOne("SELECT typename,addtable FROM `#@__channeltype` WHERE id='$channelid'"); | $row = $tl->dsql->GetOne("SELECT typename,addtable FROM `#@__channeltype` WHERE id='$channelid'"); | ||||
$positionname = $row['typename'] . " > "; | |||||
$positionname = $row['typename']." > "; | |||||
$listtable = $row['addtable']; | $listtable = $row['addtable']; | ||||
} else { | } else { | ||||
$positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName()) . " > "; | |||||
$positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; | |||||
} | } | ||||
$optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); | $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 (!empty($mid)) $whereSql .= " AND arc.mid = '$mid' "; | ||||
if ($keyword != '') $whereSql .= " AND (arc.title like '%$keyword%') "; | 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 != '') { | if ($arcrank != '') { | ||||
$whereSql .= " AND arc.arcrank = '$arcrank' "; | $whereSql .= " AND arc.arcrank = '$arcrank' "; | ||||
@@ -81,7 +81,7 @@ $dlist->SetParameter("dopost", "listArchives"); | |||||
$dlist->SetParameter("keyword", $keyword); | $dlist->SetParameter("keyword", $keyword); | ||||
$dlist->SetParameter("cid", $cid); | $dlist->SetParameter("cid", $cid); | ||||
$dlist->SetParameter("channelid", $channelid); | $dlist->SetParameter("channelid", $channelid); | ||||
$dlist->SetTemplate(DEDEADMIN . "/templets/content_sg_list.htm"); | |||||
$dlist->SetTemplate(DEDEADMIN."/templets/content_sg_list.htm"); | |||||
$dlist->SetSource($query); | $dlist->SetSource($query); | ||||
$dlist->Display(); | $dlist->Display(); | ||||
$dlist->Close(); | $dlist->Close(); |
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('sys_ArcTj'); | CheckPurview('sys_ArcTj'); | ||||
$row1 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); | $row1 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); | ||||
$row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` "); | $row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` "); | ||||
@@ -40,12 +40,12 @@ function GetArchives($dsql, $ordertype) | |||||
$dsql->Execute('ga'); | $dsql->Execute('ga'); | ||||
while ($row = $dsql->GetObject('ga')) { | while ($row = $dsql->GetObject('ga')) { | ||||
if (preg_match("#feedback#i", $ordertype)) { | 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 { | } else { | ||||
$moreinfo = "[点击:{$row->click}]"; | $moreinfo = "[点击:{$row->click}]"; | ||||
} | } | ||||
echo "·<a href='archives_do.php?aid={$row->id}&dopost=viewArchives' target='_blank'>"; | 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'); | include DedeInclude('templets/content_tj.htm'); |
@@ -1,162 +1 @@ | |||||
div.flash | |||||
{ | |||||
width:375px; | |||||
-moz-border-radius-topleft:5px; | |||||
-webkit-border-top-left-radius:5px; | |||||
-moz-border-radius-topright:5px; | |||||
-webkit-border-top-right-radius:5px; | |||||
-moz-border-radius-bottomleft:5px; | |||||
-webkit-border-bottom-left-radius:5px; | |||||
-moz-border-radius-bottomright:5px; | |||||
-webkit-border-bottom-right-radius:5px; | |||||
border-color:#D9E4FF; | |||||
margin:10px 5px; | |||||
} | |||||
#btnSubmit | |||||
{ | |||||
margin:0 0 0 155px; | |||||
} | |||||
.progressWrapper | |||||
{ | |||||
width:357px; | |||||
overflow:hidden; | |||||
} | |||||
.progressContainer | |||||
{ | |||||
border:solid 1px #E8E8E8; | |||||
background-color:#F7F7F7; | |||||
overflow:hidden; | |||||
margin:5px; | |||||
padding:4px; | |||||
} | |||||
.message | |||||
{ | |||||
border:solid 1px #FD9; | |||||
background-color:#FFC; | |||||
overflow:hidden; | |||||
margin:1em 0; | |||||
padding:10px 20px; | |||||
} | |||||
.red | |||||
{ | |||||
border:solid 1px #B50000; | |||||
background-color:#FFEBEB; | |||||
} | |||||
.green | |||||
{ | |||||
border:solid 1px #DDF0DD; | |||||
background-color:#EBFFEB; | |||||
} | |||||
.blue | |||||
{ | |||||
border:solid 1px #CEE2F2; | |||||
background-color:#F0F5FF; | |||||
} | |||||
.progressName | |||||
{ | |||||
font-size:8pt; | |||||
font-weight:700; | |||||
color:#555; | |||||
width:323px; | |||||
height:14px; | |||||
text-align:left; | |||||
white-space:nowrap; | |||||
overflow:hidden; | |||||
} | |||||
.progressBarInProgress,.progressBarComplete,.progressBarError | |||||
{ | |||||
font-size:0; | |||||
width:0; | |||||
height:2px; | |||||
background-color:blue; | |||||
margin-top:2px; | |||||
} | |||||
.progressBarComplete | |||||
{ | |||||
width:100%; | |||||
background-color:green; | |||||
visibility:hidden; | |||||
} | |||||
.progressBarError | |||||
{ | |||||
width:100%; | |||||
background-color:red; | |||||
visibility:hidden; | |||||
} | |||||
.progressBarStatus | |||||
{ | |||||
margin-top:2px; | |||||
width:337px; | |||||
font-size:7pt; | |||||
font-family:Arial; | |||||
text-align:left; | |||||
white-space:nowrap; | |||||
} | |||||
a.progressCancel | |||||
{ | |||||
font-size:0; | |||||
display:block; | |||||
height:14px; | |||||
width:14px; | |||||
background-image:url(../images/cancelbutton.gif); | |||||
background-repeat:no-repeat; | |||||
background-position:-14px 0; | |||||
float:right; | |||||
} | |||||
a.progressCancel:hover | |||||
{ | |||||
background-position:0 0; | |||||
} | |||||
.swfupload | |||||
{ | |||||
vertical-align:top; | |||||
} | |||||
.albCt | |||||
{ | |||||
float:left; | |||||
width:244px; | |||||
height:150px; | |||||
margin-right:10px; | |||||
margin-bottom:10px; | |||||
border:1px dashed #AAD381; | |||||
background:#FAFFEE; | |||||
text-align:center; | |||||
padding:3px; | |||||
} | |||||
.albEdit | |||||
{ | |||||
height:180px; | |||||
} | |||||
.picinfo | |||||
{ | |||||
height:30px; | |||||
line-height:30px; | |||||
margin:10px 0; | |||||
} | |||||
.thumbnails img,.thumbnailsEdit img | |||||
{ | |||||
margin:5px; | |||||
} | |||||
.albCt img { | |||||
height: 100px!important; | |||||
} | |||||
div.flash{margin:10px 5px;width:375px;border-color:#D9E4FF;border-radius:.2rem}#btnSubmit{margin:0 0 0 155px}.progressWrapper{width:357px;overflow:hidden}.progressContainer{padding:4px;margin:5px;background-color:#f8f8f8;border:solid 1px #E8E8E8;overflow:hidden}.message{margin:10px 0;padding:10px 20px;background-color:#FFC;border:solid 1px #FD9;overflow:hidden}.red{background-color:#FFEBEB;border:solid 1px #B50000}.green{background-color:#EBFFEB;border:solid 1px #DDF0DD}.blue{background-color:#F0F5FF;border:solid 1px #CEE2F2}.progressName{width:320px;height:14px;text-align:left;white-space:nowrap;overflow:hidden}.progressBarInProgress,.progressBarComplete,.progressBarError{margin-top:2px;width:0;height:2px;font-size:0;background-color:blue}.progressBarComplete{width:100%;background-color:green;visibility:hidden}.progressBarError{width:100%;background-color:red;visibility:hidden}.progressBarStatus{margin-top:2px;width:340px;text-align:left;white-space:nowrap}a.progressCancel{font-size:0;display:block;height:14px;width:14px;background-image:url(../images/cancelbutton.gif);background-repeat:no-repeat;background-position:-14px 0;float:right}a.progressCancel:hover{background-position:0 0}.swfupload{vertical-align:top}.albCt{float:left;width:240px;height:180px;margin-right:10px;margin-bottom:10px;border:1px dashed #eee;background:#f8f8f8;text-align:center;padding:10px}.albEdit{height:180px}.picinfo{height:30px;line-height:30px;margin:10px 0}.thumbnails img,.thumbnailsEdit img{margin:5px}.albCt img{height:100px!important} |
@@ -1 +1 @@ | |||||
.title{color:#666600;font-weight:bold}.title span{padding-left:3px}#addTab{position:absolute;left:455px;top:150px;width:360px;height:200px;z-index:2;background-color:#FFFFFF;border:1px solid #889D8F;padding:0px;display:none;overflow:hidden}#editTab{position:absolute;left:455px;top:120px;width:360px;height:350px;z-index:1;background-color:#FFFFFF;border:1px solid #889D8F;padding:0px;display:none}.txt{float:left}.updatedvt{width:98%;border-bottom:1px dashed #dcdcdc}.upinfotitle{border-bottom:1px solid #cccccc;color:red;font-weight:bold}.verline{border-bottom:1px dashed #cccccc}.itemTable{background:#CBD8AC}#loaddiv{top:0;left:0;background:#cccccc;filter:Alpha(opacity=70);-moz-opacity:0.7;position:absolute;z-index:10000;width:100%;height:100%}#mainmsg{padding-right:8px}.rightside{width:49%;float:left;margin-right:1%;height:670px}.column{width:49%;float:left;margin-right:0.5%}.placeholder{width:98%;margin-left:1%;background:#f0f0f0;border:1px dashed #ddd}.dbox{border:1px solid #DEEAB6;width:98%;margin-left:1%;margin-top:8px}.dbox dt{height:28px;line-height:28px;font-weight:bold;color:#4D6C2F;cursor:move}.dbox dt .l{float:left;padding-left:8px}.dbox dt .r{float:right;padding-right:8px}.dbox dt.lside{border-bottom:1px solid #CFD7C4;background-color:rgb(239,248,229)}.dbox dt.rside{border-bottom:1px solid #DEEAB6;background:url(../images/wbg.gif) repeat-x}.dbox dd{padding:0px}.dbox dd.intable{padding-top:0}#updatetest{padding:6px;padding-left:110px;background:url(../images/ico_spider.gif) no-repeat scroll 10px 15px transparent}#quickmenu{width:100%;height:46px;overflow:hidden}#quickmenu .icoitem{float:left;height:24px;line-height:24px;margin-top:10px;padding-left:30px;overflow:hidden}.dboxtable td.nline{border-bottom:1px dashed #CFD7C4;height:26px}.dboxtable1 ul li{float:left;border-bottom:1px dashed #CFD7C4;height:26px;line-height:26px;display:inline;width:48%;text-align:center}.biz p{padding:0 15px}.biz img{float:right;margin:40px 15px 0 15px} | |||||
.title{color:#666600;font-weight:bold}.title span{padding-left:3px}#addTab{position:absolute;left:455px;top:150px;width:360px;height:200px;z-index:2;background-color:#FFFFFF;border:1px solid #889D8F;padding:0px;display:none;overflow:hidden}#editTab{position:absolute;left:455px;top:120px;width:360px;height:350px;z-index:1;background-color:#FFFFFF;border:1px solid #889D8F;padding:0px;display:none}.txt{float:left}.updatedvt{width:98%;border-bottom:1px dashed #dcdcdc}.upinfotitle{border-bottom:1px solid #cccccc;color:red;font-weight:bold}.verline{border-bottom:1px dashed #cccccc}.itemTable{background:#CBD8AC}#loaddiv{top:0;left:0;background:#cccccc;filter:Alpha(opacity=70);-moz-opacity:0.7;position:absolute;z-index:10000;width:100%;height:100%}#mainmsg{padding-right:8px}.rightside{width:49%;float:left;margin-right:1%;height:670px}.column{width:49%;float:left;margin-right:0.5%}.placeholder{width:98%;margin-left:1%;background:#f0f0f0;border:1px dashed #ddd}.dbox{border:1px solid #DEEAB6;width:98%;margin-left:1%;margin-top:8px}.dbox dt{height:28px;line-height:28px;font-weight:bold;color:#4D6C2F;cursor:move}.dbox dt .l{float:left;padding-left:8px}.dbox dt .r{float:right;padding-right:8px}.dbox dt.lside{border-bottom:1px solid #CFD7C4;background-color:rgb(239,248,229)}.dbox dt.rside{border-bottom:1px solid #DEEAB6;background:url(../images/wbg.gif)repeat-x}.dbox dd{padding:0px}.dbox dd.intable{padding-top:0}#updatetest{padding:6px;padding-left:110px;background:url(../images/ico_spider.gif)no-repeat scroll 10px 15px transparent}#quickmenu{width:100%;height:46px;overflow:hidden}#quickmenu .icoitem{float:left;height:24px;line-height:24px;margin-top:10px;padding-left:30px;overflow:hidden}.dboxtable td.nline{border-bottom:1px dashed #CFD7C4;height:26px}.dboxtable1 ul li{float:left;border-bottom:1px dashed #CFD7C4;height:26px;line-height:26px;display:inline;width:48%;text-align:center}.biz p{padding:0 15px}.biz img{float:right;margin:40px 15px 0 15px} |
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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变量,请自行更改这个选项 | //获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 | ||||
$dedeNowurl = ''; | $dedeNowurl = ''; | ||||
@@ -27,11 +27,11 @@ $cuserLogin = new userLogin(); | |||||
if ($cuserLogin->getUserID() <= 0) { | if ($cuserLogin->getUserID() <= 0) { | ||||
if (empty($adminDirHand)) { | 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(); | exit(); | ||||
} | } | ||||
$adminDirHand = HtmlReplace($adminDirHand, 1); | $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>"; | echo "<script language='javascript'>location='$gurl';</script>"; | ||||
exit(); | exit(); | ||||
} | } |
@@ -8,8 +8,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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)) { | if (empty($activepath)) { | ||||
$activepath = ''; | $activepath = ''; | ||||
} | } | ||||
@@ -22,8 +22,8 @@ $activepath = preg_replace("#\/{1,}#", '/', $activepath); | |||||
if (strlen($activepath) < strlen($cfg_medias_dir)) { | if (strlen($activepath) < strlen($cfg_medias_dir)) { | ||||
$activepath = $cfg_medias_dir; | $activepath = $cfg_medias_dir; | ||||
} | } | ||||
$inpath = $cfg_basedir . $activepath; | |||||
$activeurl = '..' . $activepath; | |||||
$inpath = $cfg_basedir.$activepath; | |||||
$activeurl = '..'.$activepath; | |||||
if (empty($f)) { | if (empty($f)) { | ||||
$f = 'form1.picname'; | $f = 'form1.picname'; | ||||
} | } | ||||
@@ -36,11 +36,11 @@ if (empty($comeback)) { | |||||
} | } | ||||
$addparm = ''; | $addparm = ''; | ||||
if (!empty($CKEditor)) { | if (!empty($CKEditor)) { | ||||
$addparm = '&CKEditor=' . $CKEditor; | |||||
$addparm = '&CKEditor='.$CKEditor; | |||||
$f = $CKEditor; | $f = $CKEditor; | ||||
} | } | ||||
if (!empty($CKEditorFuncNum)) { | if (!empty($CKEditorFuncNum)) { | ||||
$addparm .= '&CKEditorFuncNum=' . $CKEditorFuncNum; | |||||
$addparm .= '&CKEditorFuncNum='.$CKEditorFuncNum; | |||||
} | } | ||||
if (!empty($noeditor)) { | if (!empty($noeditor)) { | ||||
$addparm .= '&noeditor=yes'; | $addparm .= '&noeditor=yes'; | ||||
@@ -148,10 +148,10 @@ table{background:#fff} | |||||
if ($filesize != "") | if ($filesize != "") | ||||
if ($filesize < 0.1) { | if ($filesize < 0.1) { | ||||
@list($ty1, $ty2) = split("\.", $filesize); | @list($ty1, $ty2) = split("\.", $filesize); | ||||
$filesize = $ty1 . "." . substr($ty2, 0, 2); | |||||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||||
} else { | } else { | ||||
@list($ty1, $ty2) = split("\.", $filesize); | @list($ty1, $ty2) = split("\.", $filesize); | ||||
$filesize = $ty1 . "." . substr($ty2, 0, 1); | |||||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||||
} | } | ||||
$filetime = filemtime("$inpath/$file"); | $filetime = filemtime("$inpath/$file"); | ||||
$filetime = MyDate("Y-m-d H:i", $filetime); | $filetime = MyDate("Y-m-d H:i", $filetime); | ||||
@@ -162,7 +162,7 @@ table{background:#fff} | |||||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | ||||
$line = "\n<tr> | $line = "\n<tr> | ||||
<td class='linerow' colspan='2'> | <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> | <td colspan='2' class='linerow'>当前目录:$activepath</td> | ||||
</tr>"; | </tr>"; | ||||
echo $line; | echo $line; | ||||
@@ -171,12 +171,12 @@ table{background:#fff} | |||||
if (preg_match("#^\.(.*)$#i", $file)) continue; | if (preg_match("#^\.(.*)$#i", $file)) continue; | ||||
$line = "\n<tr> | $line = "\n<tr> | ||||
<td class='linerow' colspan='2'> | <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> | ||||
<td class='linerow'></td> | <td class='linerow'></td> | ||||
</tr>"; | </tr>"; | ||||
echo "$line"; | echo "$line"; | ||||
} else if (preg_match("#\.(" . $cfg_imgtype . ")#i", $file)) { | |||||
} else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) { | |||||
$reurl = "$activeurl/$file"; | $reurl = "$activeurl/$file"; | ||||
$reurl = preg_replace("#^\.\.#", "", $reurl); | $reurl = preg_replace("#^\.\.#", "", $reurl); | ||||
$reurl = $reurl; | $reurl = $reurl; | ||||
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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)) { | if (empty($activepath)) { | ||||
@@ -27,13 +27,13 @@ if (empty($imgfile)) { | |||||
$imgfile = ''; | $imgfile = ''; | ||||
} | } | ||||
if (!is_uploaded_file($imgfile)) { | if (!is_uploaded_file($imgfile)) { | ||||
ShowMsg("你没有选择上传的文件!" . $imgfile, "-1"); | |||||
ShowMsg("你没有选择上传的文件!".$imgfile, "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$CKEditorFuncNum = (isset($CKEditorFuncNum)) ? $CKEditorFuncNum : 1; | $CKEditorFuncNum = (isset($CKEditorFuncNum)) ? $CKEditorFuncNum : 1; | ||||
$imgfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $imgfile_name)); | $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"); | ShowMsg("你所上传的图片类型不在许可列表,请更改系统对扩展名限定的配置!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -45,16 +45,16 @@ if (!in_array($imgfile_type, $sparr)) { | |||||
exit(); | exit(); | ||||
} | } | ||||
$mdir = MyDate($cfg_addon_savetype, $nowtme); | $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(); | 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); | $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 失败!"); | move_uploaded_file($imgfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); | ||||
@unlink($imgfile); | @unlink($imgfile); | ||||
@@ -79,13 +79,13 @@ $imgwidthValue = $sizes[0]; | |||||
$imgheightValue = $sizes[1]; | $imgheightValue = $sizes[1]; | ||||
$imgsize = filesize($fullfilename); | $imgsize = filesize($fullfilename); | ||||
$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | ||||
VALUES ('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); | $dsql->ExecuteNoneQuery($inquery); | ||||
$fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
AddMyAddon($fid, $activepath . '/' . $filename); | |||||
AddMyAddon($fid, $activepath.'/'.$filename); | |||||
$CKUpload = isset($CKUpload) ? $CKUpload : FALSE; | $CKUpload = isset($CKUpload) ? $CKUpload : FALSE; | ||||
if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { | if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { | ||||
$fileurl = $activepath . '/' . $filename; | |||||
$fileurl = $activepath.'/'.$filename; | |||||
$result = array('url' => $fileurl, "uploaded" => 1, 'fileName' => $filename); | $result = array('url' => $fileurl, "uploaded" => 1, 'fileName' => $filename); | ||||
echo json_encode($result); | echo json_encode($result); | ||||
exit; | exit; | ||||
@@ -93,8 +93,8 @@ if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { | |||||
if (!empty($noeditor)) { | 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 { | } 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(); | exit(); |
@@ -10,7 +10,7 @@ | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
if (empty($activepath)) { | if (empty($activepath)) { | ||||
$activepath = ''; | $activepath = ''; | ||||
} | } | ||||
@@ -20,8 +20,8 @@ $activepath = preg_replace("#\/{1,}#", '/', $activepath); | |||||
if (strlen($activepath) < strlen($cfg_other_medias)) { | if (strlen($activepath) < strlen($cfg_other_medias)) { | ||||
$activepath = $cfg_other_medias; | $activepath = $cfg_other_medias; | ||||
} | } | ||||
$inpath = $cfg_basedir . $activepath; | |||||
$activeurl = '..' . $activepath; | |||||
$inpath = $cfg_basedir.$activepath; | |||||
$activeurl = '..'.$activepath; | |||||
if (!is_dir($inpath)) { | if (!is_dir($inpath)) { | ||||
die('No Exsits Path'); | die('No Exsits Path'); | ||||
} | } | ||||
@@ -34,10 +34,10 @@ if (empty($comeback)) { | |||||
} | } | ||||
$addparm = ''; | $addparm = ''; | ||||
if (!empty($CKEditor)) { | if (!empty($CKEditor)) { | ||||
$addparm = '&CKEditor=' . $CKEditor; | |||||
$addparm = '&CKEditor='.$CKEditor; | |||||
} | } | ||||
if (!empty($CKEditorFuncNum)) { | if (!empty($CKEditorFuncNum)) { | ||||
$addparm .= '&CKEditorFuncNum=' . $CKEditorFuncNum; | |||||
$addparm .= '&CKEditorFuncNum='.$CKEditorFuncNum; | |||||
} | } | ||||
if (!empty($noeditor)) { | if (!empty($noeditor)) { | ||||
$addparm .= '&noeditor=yes'; | $addparm .= '&noeditor=yes'; | ||||
@@ -96,10 +96,10 @@ if (!empty($noeditor)) { | |||||
if ($filesize != "") | if ($filesize != "") | ||||
if ($filesize < 0.1) { | if ($filesize < 0.1) { | ||||
@list($ty1, $ty2) = split("\.", $filesize); | @list($ty1, $ty2) = split("\.", $filesize); | ||||
$filesize = $ty1 . "." . substr($ty2, 0, 2); | |||||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||||
} else { | } else { | ||||
@list($ty1, $ty2) = split("\.", $filesize); | @list($ty1, $ty2) = split("\.", $filesize); | ||||
$filesize = $ty1 . "." . substr($ty2, 0, 1); | |||||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||||
} | } | ||||
$filetime = filemtime("$inpath/$file"); | $filetime = filemtime("$inpath/$file"); | ||||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | $filetime = MyDate("Y-m-d H:i:s", $filetime); | ||||
@@ -111,7 +111,7 @@ if (!empty($noeditor)) { | |||||
if ($activepath == "") continue; | if ($activepath == "") continue; | ||||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | ||||
$line = "\n<tr> | $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> | <td colspan='2' class='linerow'> 当前目录:$activepath</td> | ||||
</tr>\r\n"; | </tr>\r\n"; | ||||
echo $line; | echo $line; | ||||
@@ -120,7 +120,7 @@ if (!empty($noeditor)) { | |||||
if (preg_match("#^\.(.*)$#i", $file)) continue; | if (preg_match("#^\.(.*)$#i", $file)) continue; | ||||
$line = "\n<tr> | $line = "\n<tr> | ||||
<td bgcolor='#F9FBF0' class='linerow'> | <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> | ||||
<td class='linerow'>-</td> | <td class='linerow'>-</td> | ||||
<td bgcolor='#F9FBF0' class='linerow'>-</td> | <td bgcolor='#F9FBF0' class='linerow'>-</td> | ||||
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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; | $cfg_soft_dir = $cfg_other_medias; | ||||
$bkurl = 'select_media.php'; | $bkurl = 'select_media.php'; | ||||
$uploadmbtype = "多媒体文件类型"; | $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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
if (empty($activepath)) { | if (empty($activepath)) { | ||||
$activepath = ''; | $activepath = ''; | ||||
} | } | ||||
@@ -17,8 +17,8 @@ $activepath = preg_replace("#\/{1,}#", '/', $activepath); | |||||
if (strlen($activepath) < strlen($cfg_soft_dir)) { | if (strlen($activepath) < strlen($cfg_soft_dir)) { | ||||
$activepath = $cfg_soft_dir; | $activepath = $cfg_soft_dir; | ||||
} | } | ||||
$inpath = $cfg_basedir . $activepath; | |||||
$activeurl = '..' . $activepath; | |||||
$inpath = $cfg_basedir.$activepath; | |||||
$activeurl = '..'.$activepath; | |||||
if (empty($f)) { | if (empty($f)) { | ||||
$f = 'form1.enclosure'; | $f = 'form1.enclosure'; | ||||
} | } | ||||
@@ -30,10 +30,10 @@ if (empty($comeback)) { | |||||
} | } | ||||
$addparm = ''; | $addparm = ''; | ||||
if (!empty($CKEditor)) { | if (!empty($CKEditor)) { | ||||
$addparm = '&CKEditor=' . $CKEditor; | |||||
$addparm = '&CKEditor='.$CKEditor; | |||||
} | } | ||||
if (!empty($CKEditorFuncNum)) { | if (!empty($CKEditorFuncNum)) { | ||||
$addparm .= '&CKEditorFuncNum=' . $CKEditorFuncNum; | |||||
$addparm .= '&CKEditorFuncNum='.$CKEditorFuncNum; | |||||
} | } | ||||
if (!empty($noeditor)) { | if (!empty($noeditor)) { | ||||
$addparm .= '&noeditor=yes'; | $addparm .= '&noeditor=yes'; | ||||
@@ -109,10 +109,10 @@ table{background:#fff} | |||||
if ($filesize != "") | if ($filesize != "") | ||||
if ($filesize < 0.1) { | if ($filesize < 0.1) { | ||||
@list($ty1, $ty2) = split("\.", $filesize); | @list($ty1, $ty2) = split("\.", $filesize); | ||||
$filesize = $ty1 . "." . substr($ty2, 0, 2); | |||||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||||
} else { | } else { | ||||
@list($ty1, $ty2) = split("\.", $filesize); | @list($ty1, $ty2) = split("\.", $filesize); | ||||
$filesize = $ty1 . "." . substr($ty2, 0, 1); | |||||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||||
} | } | ||||
$filetime = filemtime("$inpath/$file"); | $filetime = filemtime("$inpath/$file"); | ||||
$filetime = MyDate("Y-m-d H:i", $filetime); | $filetime = MyDate("Y-m-d H:i", $filetime); | ||||
@@ -123,7 +123,7 @@ table{background:#fff} | |||||
if ($activepath == "") continue; | if ($activepath == "") continue; | ||||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | ||||
$line = "\n<tr height='28'> | $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> | <td colspan='2' class='linerow'>当前目录:$activepath</td> | ||||
</tr>\r\n"; | </tr>\r\n"; | ||||
echo $line; | echo $line; | ||||
@@ -131,7 +131,7 @@ table{background:#fff} | |||||
if (preg_match("#^_(.*)$#i", $file)) continue; | if (preg_match("#^_(.*)$#i", $file)) continue; | ||||
if (preg_match("#^\.(.*)$#i", $file)) continue; | if (preg_match("#^\.(.*)$#i", $file)) continue; | ||||
$line = "\n<tr height='28'> | $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> | ||||
<td class='linerow'></td> | <td class='linerow'></td> | ||||
</tr>"; | </tr>"; | ||||
@@ -10,7 +10,7 @@ | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
if (!isset($cfg_basedir)) { | if (!isset($cfg_basedir)) { | ||||
include_once(dirname(__FILE__) . '/config.php'); | |||||
include_once(dirname(__FILE__).'/config.php'); | |||||
} | } | ||||
if (empty($uploadfile)) $uploadfile = ''; | if (empty($uploadfile)) $uploadfile = ''; | ||||
if (empty($uploadmbtype)) $uploadmbtype = '软件类型'; | if (empty($uploadmbtype)) $uploadmbtype = '软件类型'; | ||||
@@ -31,7 +31,7 @@ $cfg_softtype = $cfg_softtype; | |||||
$cfg_softtype = str_replace('||', '|', $cfg_softtype); | $cfg_softtype = str_replace('||', '|', $cfg_softtype); | ||||
$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | $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}不在许可列表,请更改系统对扩展名限定的配置!", ""); | ShowMsg("你所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!", ""); | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -39,9 +39,9 @@ if (!preg_match("#\.(" . $cfg_softtype . ")#i", $uploadfile_name)) { | |||||
$nowtme = time(); | $nowtme = time(); | ||||
if ($activepath == $cfg_soft_dir) { | if ($activepath == $cfg_soft_dir) { | ||||
$newdir = MyDate($cfg_addon_savetype, $nowtme); | $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(); | CloseFtp(); | ||||
} | } | ||||
} | } | ||||
@@ -51,23 +51,23 @@ if (!empty($newname)) { | |||||
$filename = $newname; | $filename = $newname; | ||||
if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); | if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); | ||||
else $fs = explode('.', $filename); | 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:;'); | ShowMsg("你指定的文件名被系统禁止!", 'javascript:;'); | ||||
exit(); | exit(); | ||||
} | } | ||||
if (!preg_match("#\.#", $filename)) $filename = $filename . '.' . $fs[count($fs) - 1]; | |||||
if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; | |||||
} else { | } else { | ||||
$filename = $cuserLogin->getUserID() . '-' . dd2char(MyDate('ymdHis', $nowtme)); | |||||
$filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); | |||||
$fs = explode('.', $uploadfile_name); | $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:;'); | ShowMsg("你上传了某些可能存在不安全因素的文件,系统拒绝操作!", 'javascript:;'); | ||||
exit(); | 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 失败!"); | move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); | ||||
@unlink($uploadfile); | @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) | $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); | $dsql->ExecuteNoneQuery($inquery); | ||||
$fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
@@ -99,6 +99,6 @@ if ($ck == 1) { | |||||
); | ); | ||||
echo json_encode($arr); | echo json_encode($arr); | ||||
} else { | } 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(); | exit(); | ||||
} | } |
@@ -8,7 +8,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
if (empty($activepath)) { | if (empty($activepath)) { | ||||
$activepath = ''; | $activepath = ''; | ||||
} | } | ||||
@@ -19,8 +19,8 @@ $templetdir = $cfg_templets_dir; | |||||
if (strlen($activepath) < strlen($templetdir)) { | if (strlen($activepath) < strlen($templetdir)) { | ||||
$activepath = $templetdir; | $activepath = $templetdir; | ||||
} | } | ||||
$inpath = $cfg_basedir . $activepath; | |||||
$activeurl = '..' . $activepath; | |||||
$inpath = $cfg_basedir.$activepath; | |||||
$activeurl = '..'.$activepath; | |||||
if (!is_dir($inpath)) { | if (!is_dir($inpath)) { | ||||
die('No Exsits Path'); | die('No Exsits Path'); | ||||
} | } | ||||
@@ -76,10 +76,10 @@ table{background:#fff} | |||||
if ($filesize != "") | if ($filesize != "") | ||||
if ($filesize < 0.1) { | if ($filesize < 0.1) { | ||||
@list($ty1, $ty2) = split("\.", $filesize); | @list($ty1, $ty2) = split("\.", $filesize); | ||||
$filesize = $ty1 . "." . substr($ty2, 0, 2); | |||||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||||
} else { | } else { | ||||
@list($ty1, $ty2) = split("\.", $filesize); | @list($ty1, $ty2) = split("\.", $filesize); | ||||
$filesize = $ty1 . "." . substr($ty2, 0, 1); | |||||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||||
} | } | ||||
$filetime = filemtime("$inpath/$file"); | $filetime = filemtime("$inpath/$file"); | ||||
$filetime = MyDate("Y-m-d H:i", $filetime); | $filetime = MyDate("Y-m-d H:i", $filetime); | ||||
@@ -90,7 +90,7 @@ table{background:#fff} | |||||
if ($activepath == "") continue; | if ($activepath == "") continue; | ||||
$tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); | $tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); | ||||
$line = "\n<tr> | $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> | <td colspan='2' class='linerow'>当前目录:$activepath</td> | ||||
</tr>\r\n"; | </tr>\r\n"; | ||||
echo $line; | echo $line; | ||||
@@ -98,7 +98,7 @@ table{background:#fff} | |||||
if (preg_match("#^_(.*)$#i", $file)) continue; | if (preg_match("#^_(.*)$#i", $file)) continue; | ||||
if (preg_match("#^\.(.*)$#i", $file)) continue; | if (preg_match("#^\.(.*)$#i", $file)) continue; | ||||
$line = "\n<tr> | $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> | ||||
<td class='linerow'></td> | <td class='linerow'></td> | ||||
</tr>"; | </tr>"; | ||||
@@ -108,7 +108,7 @@ table{background:#fff} | |||||
else $lstyle = ""; | else $lstyle = ""; | ||||
$reurl = "$activeurl/$file"; | $reurl = "$activeurl/$file"; | ||||
$reurl = preg_replace("#\.\.#", "", $reurl); | $reurl = preg_replace("#\.\.#", "", $reurl); | ||||
$reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||||
$line = "\n<tr> | $line = "\n<tr> | ||||
<td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/htm.gif'>$file</a></td> | <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/htm.gif'>$file</a></td> | ||||
<td class='linerow'>$filesize KB</td> | <td class='linerow'>$filesize KB</td> | ||||
@@ -120,7 +120,7 @@ table{background:#fff} | |||||
else $lstyle = ""; | else $lstyle = ""; | ||||
$reurl = "$activeurl/$file"; | $reurl = "$activeurl/$file"; | ||||
$reurl = preg_replace("#\.\.#", "", $reurl); | $reurl = preg_replace("#\.\.#", "", $reurl); | ||||
$reurl = preg_replace("#" . $templetdir . "/#", "", $reurl); | |||||
$reurl = preg_replace("#".$templetdir."/#", "", $reurl); | |||||
$line = "\n<tr> | $line = "\n<tr> | ||||
<td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/css.gif'>$file</a></td> | <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/css.gif'>$file</a></td> | ||||
<td class='linerow'>$filesize KB</td> | <td class='linerow'>$filesize KB</td> | ||||
@@ -132,7 +132,7 @@ table{background:#fff} | |||||
else $lstyle = ""; | else $lstyle = ""; | ||||
$reurl = "$activeurl/$file"; | $reurl = "$activeurl/$file"; | ||||
$reurl = preg_replace("#\.\.#", "", $reurl); | $reurl = preg_replace("#\.\.#", "", $reurl); | ||||
$reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||||
$line = "\n<tr> | $line = "\n<tr> | ||||
<td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/js.gif'>$file</a></td> | <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/js.gif'>$file</a></td> | ||||
<td class='linerow'>$filesize KB</td> | <td class='linerow'>$filesize KB</td> | ||||
@@ -144,7 +144,7 @@ table{background:#fff} | |||||
else $lstyle = ""; | else $lstyle = ""; | ||||
$reurl = "$activeurl/$file"; | $reurl = "$activeurl/$file"; | ||||
$reurl = preg_replace("#\.\.#", "", $reurl); | $reurl = preg_replace("#\.\.#", "", $reurl); | ||||
$reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||||
$line = "\n<tr> | $line = "\n<tr> | ||||
<td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/jpg.gif'>$file</a></td> | <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/jpg.gif'>$file</a></td> | ||||
<td class='linerow'>$filesize KB</td> | <td class='linerow'>$filesize KB</td> | ||||
@@ -156,7 +156,7 @@ table{background:#fff} | |||||
else $lstyle = ""; | else $lstyle = ""; | ||||
$reurl = "$activeurl/$file"; | $reurl = "$activeurl/$file"; | ||||
$reurl = preg_replace("#\.\.#", "", $reurl); | $reurl = preg_replace("#\.\.#", "", $reurl); | ||||
$reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||||
$line = "\n<tr> | $line = "\n<tr> | ||||
<td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/gif.gif'>$file</a></td> | <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/gif.gif'>$file</a></td> | ||||
<td class='linerow'>$filesize KB</td> | <td class='linerow'>$filesize KB</td> | ||||
@@ -168,7 +168,7 @@ table{background:#fff} | |||||
else $lstyle = ""; | else $lstyle = ""; | ||||
$reurl = "$activeurl/$file"; | $reurl = "$activeurl/$file"; | ||||
$reurl = preg_replace("#\.\.#", "", $reurl); | $reurl = preg_replace("#\.\.#", "", $reurl); | ||||
$reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); | |||||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||||
$line = "\n<tr> | $line = "\n<tr> | ||||
<td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/txt.gif'>$file</a></td> | <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/txt.gif'>$file</a></td> | ||||
<td class='linerow'>$filesize KB</td> | <td class='linerow'>$filesize KB</td> | ||||
@@ -10,7 +10,7 @@ | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
$cfg_txttype = "htm|html|tpl|txt"; | $cfg_txttype = "htm|html|tpl|txt"; | ||||
if (empty($uploadfile)) { | if (empty($uploadfile)) { | ||||
$uploadfile = ""; | $uploadfile = ""; | ||||
@@ -23,7 +23,7 @@ if (!preg_match("#^text#", $uploadfile_type)) { | |||||
ShowMsg("你上传的不是文本类型附件!", "-1"); | ShowMsg("你上传的不是文本类型附件!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
if (!preg_match("#\.(" . $cfg_txttype . ")#i", $uploadfile_name)) { | |||||
if (!preg_match("#\.(".$cfg_txttype.")#i", $uploadfile_name)) { | |||||
ShowMsg("你所上传的模板文件类型不能被识别,只允许htm、html、tpl、txt扩展名!", "-1"); | ShowMsg("你所上传的模板文件类型不能被识别,只允许htm、html、tpl、txt扩展名!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -32,13 +32,13 @@ if ($filename != '') { | |||||
} else { | } else { | ||||
$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | ||||
$filename = $uploadfile_name; | $filename = $uploadfile_name; | ||||
if ($filename == '' || !preg_match("#\.(" . $cfg_txttype . ")#i", $filename)) { | |||||
if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { | |||||
ShowMsg("你所上传的文件存在问题,请检查文件类型是否适合!", "-1"); | ShowMsg("你所上传的文件存在问题,请检查文件类型是否适合!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
$fullfilename = $cfg_basedir . $activepath . "/" . $filename; | |||||
$fullfilename = $cfg_basedir.$activepath."/".$filename; | |||||
move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); | move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); | ||||
@unlink($uploadfile); | @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(); | exit(); |
@@ -9,16 +9,16 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('c_New'); | CheckPurview('c_New'); | ||||
$mysql_version = $dsql->GetVersion(); | $mysql_version = $dsql->GetVersion(); | ||||
$mysql_versions = explode(".", trim($mysql_version)); | $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)) { | if (empty($action)) { | ||||
$row = $dsql->GetOne("SELECT diyid FROM #@__diyforms ORDER BY diyid DESC LIMIT 0,1 "); | $row = $dsql->GetOne("SELECT diyid FROM #@__diyforms ORDER BY diyid DESC LIMIT 0,1 "); | ||||
if (is_array($row)) $newdiyid = $row['diyid'] + 1; | if (is_array($row)) $newdiyid = $row['diyid'] + 1; | ||||
else $newdiyid = 1; | else $newdiyid = 1; | ||||
include(DEDEADMIN . "/templets/diy_add.htm"); | |||||
include(DEDEADMIN."/templets/diy_add.htm"); | |||||
} else { | } else { | ||||
if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { | if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { | ||||
ShowMsg("<font color=red>'自定义表单diyid'</font>必须为数字!", "-1"); | ShowMsg("<font color=red>'自定义表单diyid'</font>必须为数字!", "-1"); | ||||
@@ -52,7 +52,7 @@ if (empty($action)) { | |||||
if ($mysql_version < 4.1) { | if ($mysql_version < 4.1) { | ||||
$sql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; | $sql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; | ||||
} else { | } 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)) { | if ($dsql->ExecuteNoneQuery($sql)) { | ||||
$query = "INSERT INTO #@__diyforms (`diyid`, `name`, `table`, `info`, `listtemplate`, `viewtemplate`, `posttemplate`, `public` ) VALUES ('$diyid', '$name', '$table', '', '$listtemplate', '$viewtemplate', '$posttemplate', '$public')"; | $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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('c_Edit'); | 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 = ""; | if (empty($dopost)) $dopost = ""; | ||||
$diyid = (empty($diyid) ? 0 : intval($diyid)); | $diyid = (empty($diyid) ? 0 : intval($diyid)); | ||||
@@ -45,7 +45,7 @@ function __Delete() | |||||
$win->AddHidden("job", "yes"); | $win->AddHidden("job", "yes"); | ||||
$win->AddHidden("dopost", $dopost); | $win->AddHidden("dopost", $dopost); | ||||
$win->AddHidden("diyid", $diyid); | $win->AddHidden("diyid", $diyid); | ||||
$win->AddTitle("!将删除所有与该自定义表单相关的文件和数据<br />你确实要删除 \"" . $row['name'] . "\" 这个自定义表单?"); | |||||
$win->AddTitle("!将删除所有与该自定义表单相关的文件和数据<br />你确实要删除 \"".$row['name']."\" 这个自定义表单?"); | |||||
$winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
$win->Display(); | $win->Display(); | ||||
exit(); | exit(); | ||||
@@ -73,4 +73,4 @@ function __Delete() | |||||
function edit() | function edit() | ||||
-----------------*/ | -----------------*/ | ||||
$row = $dsql->GetOne("Select * From #@__diyforms where diyid='$diyid'"); | $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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
//增加权限检查 | //增加权限检查 | ||||
require_once(DEDEADMIN . '/inc/inc_admin_channel.php'); | |||||
require_once(DEDEADMIN.'/inc/inc_admin_channel.php'); | |||||
if (empty($action)) $action = ''; | if (empty($action)) $action = ''; | ||||
$mysql_version = $dsql->GetVersion(); | $mysql_version = $dsql->GetVersion(); | ||||
$mysql_versions = explode(".", trim($mysql_version)); | $mysql_versions = explode(".", trim($mysql_version)); | ||||
$mysql_version = $mysql_versions[0] . "." . $mysql_versions[1]; | |||||
$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; | |||||
/*---------------------- | /*---------------------- | ||||
function Save() | function Save() | ||||
---------------------*/ | ---------------------*/ | ||||
@@ -26,7 +26,7 @@ if ($action == 'save') { | |||||
$fieldname = strtolower($fieldname); | $fieldname = strtolower($fieldname); | ||||
$row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); | $row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); | ||||
$fieldset = $row['info']; | $fieldset = $row['info']; | ||||
require_once(DEDEINC . "/dedetag.class.php"); | |||||
require_once(DEDEINC."/dedetag.class.php"); | |||||
$dtp = new DedeTagParse(); | $dtp = new DedeTagParse(); | ||||
$dtp->SetNameSpace("field", "<", ">"); | $dtp->SetNameSpace("field", "<", ">"); | ||||
$dtp->LoadSource($fieldset); | $dtp->LoadSource($fieldset); | ||||
@@ -46,7 +46,7 @@ if ($action == 'save') { | |||||
if (!$rs) { | if (!$rs) { | ||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
ShowMsg("增加字段失败,错误提示为:" . $gerr, "javascript:;"); | |||||
ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$ok = FALSE; | $ok = FALSE; | ||||
@@ -61,17 +61,17 @@ if ($action == 'save') { | |||||
break; | break; | ||||
} | } | ||||
} | } | ||||
$oksetting = $ok ? $dtp->GetResultNP() : $fieldset . "\n" . stripslashes($fieldstring); | |||||
$oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); | |||||
} else { | } else { | ||||
//原来的配置为空 | //原来的配置为空 | ||||
$oksetting = $fieldset . "\n" . stripslashes($fieldstring); | |||||
$oksetting = $fieldset."\n".stripslashes($fieldstring); | |||||
} | } | ||||
$addlist = GetAddFieldList($dtp, $oksetting); | $addlist = GetAddFieldList($dtp, $oksetting); | ||||
$oksetting = addslashes($oksetting); | $oksetting = addslashes($oksetting); | ||||
$rs = $dsql->ExecuteNoneQuery("Update #@__diyforms set `info`='$oksetting' where diyid='$diyid' "); | $rs = $dsql->ExecuteNoneQuery("Update #@__diyforms set `info`='$oksetting' where diyid='$diyid' "); | ||||
if (!$rs) { | if (!$rs) { | ||||
$grr = $dsql->GetError(); | $grr = $dsql->GetError(); | ||||
ShowMsg("保存节点配置出错!" . $grr, "javascript:;"); | |||||
ShowMsg("保存节点配置出错!".$grr, "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
ShowMsg("成功增加一个字段!", "diy_edit.php?diyid=$diyid"); | ShowMsg("成功增加一个字段!", "diy_edit.php?diyid=$diyid"); | ||||
@@ -91,7 +91,7 @@ $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( | |||||
if ($mysql_version < 4.1) { | if ($mysql_version < 4.1) { | ||||
$tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; | $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; | ||||
} else { | } 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); | $dsql->ExecuteNoneQuery($tabsql); | ||||
@@ -104,6 +104,6 @@ while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | |||||
} | } | ||||
$f = ''; | $f = ''; | ||||
foreach ($fields as $k => $v) { | 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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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 = ''; | if (empty($action)) $action = ''; | ||||
//获取模型信息 | //获取模型信息 | ||||
$mysql_version = $dsql->GetVersion(); | $mysql_version = $dsql->GetVersion(); | ||||
$mysql_versions = explode(".", trim($mysql_version)); | $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'"); | $row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); | ||||
$fieldset = $row['info']; | $fieldset = $row['info']; | ||||
$trueTable = $row['table']; | $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) { | foreach ($ds as $d) { | ||||
$dds = explode(',', trim($d)); | $dds = explode(',', trim($d)); | ||||
$fieldtypes[$dds[0]] = $dds[1]; | $fieldtypes[$dds[0]] = $dds[1]; | ||||
@@ -57,7 +57,7 @@ if ($action == 'save') { | |||||
if ($mysql_version < 4.1) { | if ($mysql_version < 4.1) { | ||||
$tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; | $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; | ||||
} else { | } 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); | $dsql->ExecuteNoneQuery($tabsql); | ||||
@@ -86,10 +86,10 @@ if ($action == 'save') { | |||||
if (trim($fieldname) == trim(strtolower($ctag->GetName()))) { | if (trim($fieldname) == trim(strtolower($ctag->GetName()))) { | ||||
if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { | if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { | ||||
$tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` " . $ntabsql; | |||||
$tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; | |||||
$dsql->ExecuteNoneQuery($tabsql); | $dsql->ExecuteNoneQuery($tabsql); | ||||
} else if (!isset($fields[$fieldname])) { | } else if (!isset($fields[$fieldname])) { | ||||
$tabsql = "ALTER TABLE `$trueTable` ADD " . $ntabsql; | |||||
$tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; | |||||
$dsql->ExecuteNoneQuery($tabsql); | $dsql->ExecuteNoneQuery($tabsql); | ||||
} else { | } else { | ||||
$tabsql = ''; | $tabsql = ''; | ||||
@@ -120,4 +120,4 @@ function _DELETE() | |||||
ShowMsg("成功删除一个字段!", "diy_edit.php?diyid=$diyid"); | ShowMsg("成功删除一个字段!", "diy_edit.php?diyid=$diyid"); | ||||
exit(); | exit(); | ||||
} | } | ||||
require_once(DEDEADMIN . "/templets/diy_field_edit.htm"); | |||||
require_once(DEDEADMIN."/templets/diy_field_edit.htm"); |
@@ -1,5 +1,4 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 自定义表单列表 | * 自定义表单列表 | ||||
* | * | ||||
@@ -9,25 +8,25 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('c_New'); | CheckPurview('c_New'); | ||||
$diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; | $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; | ||||
$action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete')) ? $action : ''; | |||||
$action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete','excel')) ? $action : ''; | |||||
if (empty($diyid)) { | if (empty($diyid)) { | ||||
showMsg("非法操作!", 'javascript:;'); | showMsg("非法操作!", 'javascript:;'); | ||||
exit(); | exit(); | ||||
} | } | ||||
require_once DEDEINC . '/diyform.cls.php'; | |||||
require_once DEDEINC.'/diyform.cls.php'; | |||||
$diy = new diyform($diyid); | $diy = new diyform($diyid); | ||||
if ($action == 'post') { | if ($action == 'post') { | ||||
if (empty($do)) { | if (empty($do)) { | ||||
$postform = $diy->getForm('post', '', 'admin'); | $postform = $diy->getForm('post', '', 'admin'); | ||||
include DEDEADMIN . '/templets/diy_post.htm'; | |||||
include DEDEADMIN.'/templets/diy_post.htm'; | |||||
} else if ($do == 2) { | } else if ($do == 2) { | ||||
$dede_fields = empty($dede_fields) ? '' : trim($dede_fields); | $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); | ||||
$dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); | $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); | ||||
if (!empty($dede_fields)) { | if (!empty($dede_fields)) { | ||||
if ($dede_fieldshash != md5($dede_fields . $cfg_cookie_encode)) { | |||||
if ($dede_fieldshash != md5($dede_fields.$cfg_cookie_encode)) { | |||||
showMsg("数据校验不对,程序返回", '-1'); | showMsg("数据校验不对,程序返回", '-1'); | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -53,8 +52,8 @@ if ($action == 'post') { | |||||
} else { | } else { | ||||
${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); | ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); | ||||
} | } | ||||
$addvar .= ', `' . $fieldinfo[0] . '`'; | |||||
$addvalue .= ", '" . ${$fieldinfo[0]} . "'"; | |||||
$addvar .= ', `'.$fieldinfo[0].'`'; | |||||
$addvalue .= ", '".${$fieldinfo[0]}."'"; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -67,13 +66,13 @@ if ($action == 'post') { | |||||
} | } | ||||
} | } | ||||
} else if ($action == 'list') { | } 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"; | $query = "SELECT * FROM {$diy->table} ORDER BY id DESC"; | ||||
$datalist = new DataListCP(); | $datalist = new DataListCP(); | ||||
$datalist->pageSize = 10; | $datalist->pageSize = 10; | ||||
$datalist->SetParameter('action', 'list'); | $datalist->SetParameter('action', 'list'); | ||||
$datalist->SetParameter('diyid', $diyid); | $datalist->SetParameter('diyid', $diyid); | ||||
$datalist->SetTemplate(DEDEADMIN . '/templets/diy_list.htm'); | |||||
$datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); | |||||
$datalist->SetSource($query); | $datalist->SetSource($query); | ||||
$fieldlist = $diy->getFieldList(); | $fieldlist = $diy->getFieldList(); | ||||
$datalist->Display(); | $datalist->Display(); | ||||
@@ -94,7 +93,7 @@ if ($action == 'post') { | |||||
$fieldlist = $diy->getFieldList(); | $fieldlist = $diy->getFieldList(); | ||||
$c1 = $row['ifcheck'] == 1 ? 'checked' : ''; | $c1 = $row['ifcheck'] == 1 ? 'checked' : ''; | ||||
$c2 = $row['ifcheck'] == 0 ? 'checked' : ''; | $c2 = $row['ifcheck'] == 0 ? 'checked' : ''; | ||||
include DEDEADMIN . '/templets/diy_edit_content.htm'; | |||||
include DEDEADMIN.'/templets/diy_edit_content.htm'; | |||||
} else if ($do == 2) { | } else if ($do == 2) { | ||||
$dede_fields = empty($dede_fields) ? '' : trim($dede_fields); | $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); | ||||
$diyform = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid=$diyid"); | $diyform = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid=$diyid"); | ||||
@@ -122,7 +121,7 @@ if ($action == 'post') { | |||||
${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'diy', $fieldinfo[0]); | ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'diy', $fieldinfo[0]); | ||||
${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$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]}."'"; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -163,14 +162,43 @@ if ($action == 'post') { | |||||
} | } | ||||
} else if ($do = 1) { | } else if ($do = 1) { | ||||
$row = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); | $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'"); | $dsql->ExecuteNoneQuery("UPDATE `$diy->table` SET $name='' WHERE id='$id'"); | ||||
showmsg('文件删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); | showmsg('文件删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); | ||||
} else { | } else { | ||||
showmsg('文件不存在', '-1'); | showmsg('文件不存在', '-1'); | ||||
} | } | ||||
} | } | ||||
} | |||||
elseif($action == 'excel') { | |||||
ob_end_clean();//清除缓冲区,避免乱码 | |||||
header("Content-type:application/vnd.ms-excel"); | |||||
header("Content-Disposition:attachment;filename={$diy->name}_".date("Y-m-d").".xls"); | |||||
print(chr(0xEF).chr(0xBB).chr(0xBF));//清除bom | |||||
$fieldlist = $diy->getFieldList(); | |||||
echo "<table><tr>"; | |||||
foreach($fieldlist as $field=>$fielddata) | |||||
{ | |||||
echo "<th>{$fielddata[0]}</th>"; | |||||
} | |||||
echo "<th>状态</th>"; | |||||
echo "</tr>"; | |||||
$sql = "SELECT * FROM {$diy->table} ORDER BY id DESC"; | |||||
$dsql->SetQuery($sql); | |||||
$dsql->Execute('t'); | |||||
while($arr = $dsql->GetArray('t')) | |||||
{ | |||||
echo "<tr>"; | |||||
foreach($fieldlist as $key => $field) | |||||
{ | |||||
echo "<td>".$arr[$key]."</td>"; | |||||
} | |||||
$status = $arr['ifcheck'] == 1 ? '已审核' : '未审核'; | |||||
echo "<td>".$status."</td>"; | |||||
echo "</tr>"; | |||||
} | |||||
echo "</table>"; | |||||
} else { | } else { | ||||
showmsg('未定义操作', "-1"); | showmsg('未定义操作', "-1"); | ||||
} | } |
@@ -9,14 +9,14 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('c_List'); | 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, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
$sql = "Select `diyid`,`name`,`table` From #@__diyforms order by diyid asc"; | $sql = "Select `diyid`,`name`,`table` From #@__diyforms order by diyid asc"; | ||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->SetTemplet(DEDEADMIN . "/templets/diy_main.htm"); | |||||
$dlist->SetTemplet(DEDEADMIN."/templets/diy_main.htm"); | |||||
$dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
$dlist->display(); | $dlist->display(); | ||||
$dlist->Close(); | $dlist->Close(); |
@@ -9,9 +9,9 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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($dopost)) $dopost = ''; | ||||
if (empty($fmdo)) $fmdo = ''; | if (empty($fmdo)) $fmdo = ''; | ||||
@@ -77,7 +77,7 @@ if ($dopost == "delete") { | |||||
ShowMsg("成功删除指定的文档!", "erraddsave.php"); | ShowMsg("成功删除指定的文档!", "erraddsave.php"); | ||||
exit(); | exit(); | ||||
} else { | } else { | ||||
require_once(DEDEINC . "/oxwindow.class.php"); | |||||
require_once(DEDEINC."/oxwindow.class.php"); | |||||
$wintitle = "删除"; | $wintitle = "删除"; | ||||
$wecome_info = "<a href='erraddsave.php'>错误管理</a>::删除错误"; | $wecome_info = "<a href='erraddsave.php'>错误管理</a>::删除错误"; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
@@ -95,6 +95,6 @@ if ($dopost == "delete") { | |||||
$sql = "SELECT * FROM `#@__erradd` ORDER BY id desc"; | $sql = "SELECT * FROM `#@__erradd` ORDER BY id desc"; | ||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->SetTemplet(DEDEADMIN . "/templets/erradd.htm"); | |||||
$dlist->SetTemplet(DEDEADMIN."/templets/erradd.htm"); | |||||
$dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
$dlist->display(); | $dlist->display(); |
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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 = new userLogin(); | ||||
$cuserLogin->exitUser(); | $cuserLogin->exitUser(); | ||||
if (empty($needclose)) { | if (empty($needclose)) { | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('sys_Feedback'); | CheckPurview('sys_Feedback'); | ||||
$id = isset($id) && is_numeric($id) ? $id : 0; | $id = isset($id) && is_numeric($id) ? $id : 0; | ||||
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "feedback_main.php" : $_COOKIE['ENV_GOBACK_URL']; | $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(" ", " ", $adminmsg); | $adminmsg = str_replace(" ", " ", $adminmsg); | ||||
$adminmsg = str_replace("\r\n", "<br/>\n", $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"; | $query = "UPDATE `#@__feedback` SET username='$username',msg='$msg',ischeck=1 WHERE id=$id"; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
ShowMsg("成功回复一则留言!", $ENV_GOBACK_URL); | ShowMsg("成功回复一则留言!", $ENV_GOBACK_URL); | ||||
exit(); | exit(); | ||||
} elseif ($dopost === 'makehtml') { | } 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"; | $query = "SELECT * FROM `#@__feedback` WHERE id=$id"; | ||||
$row = $dsql->GetOne($query); | $row = $dsql->GetOne($query); | ||||
MakeArt($row['aid']); | MakeArt($row['aid']); | ||||
@@ -9,12 +9,12 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
//权限检查 | //权限检查 | ||||
CheckPurview('sys_Feedback'); | 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, "/"); | setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | ||||
function IsCheck($st) | function IsCheck($st) | ||||
@@ -101,7 +101,7 @@ else { | |||||
$tl = new TypeLink($typeid); | $tl = new TypeLink($typeid); | ||||
$openarray = $tl->GetOptionArray($typeid, $admin_catalogs, 0); | $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 .= ($aid != 0 ? " And aid=$aid " : ''); | ||||
$addsql .= ($ip != '' ? " And ip LIKE '$ip' " : ''); | $addsql .= ($ip != '' ? " And ip LIKE '$ip' " : ''); | ||||
@@ -117,7 +117,7 @@ else { | |||||
$dlist->SetParameter('ip', $ip); | $dlist->SetParameter('ip', $ip); | ||||
$dlist->SetParameter('typeid', $typeid); | $dlist->SetParameter('typeid', $typeid); | ||||
$dlist->SetParameter('keyword', $keyword); | $dlist->SetParameter('keyword', $keyword); | ||||
$dlist->SetTemplate(DEDEADMIN . '/templets/feedback_main.htm'); | |||||
$dlist->SetTemplate(DEDEADMIN.'/templets/feedback_main.htm'); | |||||
$dlist->SetSource($querystring); | $dlist->SetSource($querystring); | ||||
$dlist->Display(); | $dlist->Display(); | ||||
} | } |
@@ -28,12 +28,12 @@ class FileManagement | |||||
//更改文件名 | //更改文件名 | ||||
function RenameFile($oldname, $newname) | 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)) { | if (($newname != $oldname) && is_writable($oldname)) { | ||||
rename($oldname, $newname); | rename($oldname, $newname); | ||||
} | } | ||||
ShowMsg("成功更改一个文件名!", "file_manage_main.php?activepath=" . $this->activeDir); | |||||
ShowMsg("成功更改一个文件名!", "file_manage_main.php?activepath=".$this->activeDir); | |||||
return 0; | return 0; | ||||
} | } | ||||
@@ -41,14 +41,14 @@ class FileManagement | |||||
function NewDir($dirname) | function NewDir($dirname) | ||||
{ | { | ||||
$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']); | MkdirAll($dirname, $GLOBALS['cfg_dir_purview']); | ||||
CloseFtp(); | CloseFtp(); | ||||
ShowMsg("成功创建一个新目录!", "file_manage_main.php?activepath=" . $this->activeDir . "/" . $newdir); | |||||
ShowMsg("成功创建一个新目录!", "file_manage_main.php?activepath=".$this->activeDir."/".$newdir); | |||||
return 1; | return 1; | ||||
} else { | } else { | ||||
ShowMsg("创建新目录失败,因为这个位置不允许写入!", "file_manage_main.php?activepath=" . $this->activeDir); | |||||
ShowMsg("创建新目录失败,因为这个位置不允许写入!", "file_manage_main.php?activepath=".$this->activeDir); | |||||
return 0; | return 0; | ||||
} | } | ||||
} | } | ||||
@@ -64,20 +64,20 @@ class FileManagement | |||||
function MoveFile($mfile, $mpath) | function MoveFile($mfile, $mpath) | ||||
{ | { | ||||
if ($mpath != "" && !preg_match("#\.\.#", $mpath)) { | if ($mpath != "" && !preg_match("#\.\.#", $mpath)) { | ||||
$oldfile = $this->baseDir . $this->activeDir . "/$mfile"; | |||||
$oldfile = $this->baseDir.$this->activeDir."/$mfile"; | |||||
$mpath = str_replace("\\", "/", $mpath); | $mpath = str_replace("\\", "/", $mpath); | ||||
$mpath = preg_replace("#\/{1,}#", "/", $mpath); | $mpath = preg_replace("#\/{1,}#", "/", $mpath); | ||||
if (!preg_match("#^/#", $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_readable($oldfile) && is_readable($truepath) && is_writable($truepath)) { | ||||
if (is_dir($truepath)) { | if (is_dir($truepath)) { | ||||
copy($oldfile, $truepath . "/$mfile"); | |||||
copy($oldfile, $truepath."/$mfile"); | |||||
} else { | } else { | ||||
MkdirAll($truepath, $GLOBALS['cfg_dir_purview']); | MkdirAll($truepath, $GLOBALS['cfg_dir_purview']); | ||||
CloseFtp(); | CloseFtp(); | ||||
copy($oldfile, $truepath . "/$mfile"); | |||||
copy($oldfile, $truepath."/$mfile"); | |||||
} | } | ||||
unlink($oldfile); | unlink($oldfile); | ||||
ShowMsg("成功移动文件!", "file_manage_main.php?activepath=$mpath", 0, 1000); | ShowMsg("成功移动文件!", "file_manage_main.php?activepath=$mpath", 0, 1000); | ||||
@@ -127,7 +127,7 @@ class FileManagement | |||||
{ | { | ||||
$dh = dir($indir); | $dh = dir($indir); | ||||
while ($filename = $dh->read()) { | while ($filename = $dh->read()) { | ||||
$truefile = $indir . '/' . $filename; | |||||
$truefile = $indir.'/'.$filename; | |||||
if ($filename == "." || $filename == "..") { | if ($filename == "." || $filename == "..") { | ||||
continue; | continue; | ||||
} else if (is_dir($truefile)) { | } else if (is_dir($truefile)) { | ||||
@@ -147,7 +147,7 @@ class FileManagement | |||||
*/ | */ | ||||
function DeleteFile($filename) | function DeleteFile($filename) | ||||
{ | { | ||||
$filename = $this->baseDir . $this->activeDir . "/$filename"; | |||||
$filename = $this->baseDir.$this->activeDir."/$filename"; | |||||
if (is_file($filename)) { | if (is_file($filename)) { | ||||
@unlink($filename); | @unlink($filename); | ||||
$t = "文件"; | $t = "文件"; | ||||
@@ -157,11 +157,11 @@ class FileManagement | |||||
$this->RmDirFiles($filename); | $this->RmDirFiles($filename); | ||||
} else { | } else { | ||||
// 完善用户体验,by:sumic | // 完善用户体验,by:sumic | ||||
ShowMsg("系统禁止删除" . $t . "!", "file_manage_main.php?activepath=" . $this->activeDir); | |||||
ShowMsg("系统禁止删除".$t."!", "file_manage_main.php?activepath=".$this->activeDir); | |||||
exit; | exit; | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功删除一个" . $t . "!", "file_manage_main.php?activepath=" . $this->activeDir); | |||||
ShowMsg("成功删除一个".$t."!", "file_manage_main.php?activepath=".$this->activeDir); | |||||
return 0; | return 0; | ||||
} | } | ||||
} | } | ||||
@@ -191,7 +191,7 @@ class SpaceUse | |||||
if ($size > 0) { | if ($size > 0) { | ||||
list($t1, $t2) = explode(".", $size); | list($t1, $t2) = explode(".", $size); | ||||
$size = $t1 . "." . substr($t2, 0, 1); | |||||
$size = $t1.".".substr($t2, 0, 1); | |||||
} | } | ||||
return $size; | return $size; | ||||
} | } | ||||
@@ -201,7 +201,7 @@ class SpaceUse | |||||
$size = $size / 1024 / 1024; | $size = $size / 1024 / 1024; | ||||
if ($size > 0) { | if ($size > 0) { | ||||
list($t1, $t2) = explode(".", $size); | list($t1, $t2) = explode(".", $size); | ||||
$size = $t1 . "." . substr($t2, 0, 2); | |||||
$size = $t1.".".substr($t2, 0, 2); | |||||
} | } | ||||
return $size; | return $size; | ||||
} | } | ||||
@@ -9,15 +9,15 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require(dirname(__FILE__) . "/config.php"); | |||||
require(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('plus_文件管理器'); | 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 = str_replace("..", "", $activepath); | ||||
$activepath = preg_replace("#^\/{1,}#", "/", $activepath); | $activepath = preg_replace("#^\/{1,}#", "/", $activepath); | ||||
if ($activepath == "/") $activepath = ""; | if ($activepath == "/") $activepath = ""; | ||||
if ($activepath == "") $inpath = $cfg_basedir; | if ($activepath == "") $inpath = $cfg_basedir; | ||||
else $inpath = $cfg_basedir . $activepath; | |||||
else $inpath = $cfg_basedir.$activepath; | |||||
//文件管理器交互与逻辑控制文件 | //文件管理器交互与逻辑控制文件 | ||||
$fmm = new FileManagement(); | $fmm = new FileManagement(); | ||||
@@ -100,16 +100,16 @@ function __upload(); | |||||
----------------*/ else if ($fmdo == "upload") { | ----------------*/ else if ($fmdo == "upload") { | ||||
$j = 0; | $j = 0; | ||||
for ($i = 1; $i <= 50; $i++) { | 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})) { | if (!isset(${$upfile}) || !isset(${$upfile_name})) { | ||||
continue; | continue; | ||||
} | } | ||||
$upfile = ${$upfile}; | $upfile = ${$upfile}; | ||||
$upfile_name = ${$upfile_name}; | $upfile_name = ${$upfile_name}; | ||||
if (is_uploaded_file($upfile)) { | 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); | @unlink($upfile); | ||||
$j++; | $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/>"; | $titleinfo = "目录 <a href='file_manage_main.php?activepath=$activepath'><b><u>$ecpath</u></b></a> 空间使用状况:<br/>"; | ||||
$wintitle = "文件管理"; | $wintitle = "文件管理"; | ||||
$wecome_info = "文件管理::空间大小检查 [<a href='file_manage_main.php?activepath=$activepath'>文件浏览器</a>]</a>"; | $wecome_info = "文件管理::空间大小检查 [<a href='file_manage_main.php?activepath=$activepath'>文件浏览器</a>]</a>"; | ||||
$activepath = $cfg_basedir . $activepath; | |||||
$activepath = $cfg_basedir.$activepath; | |||||
$space = new SpaceUse; | $space = new SpaceUse; | ||||
$space->checksize($activepath); | $space->checksize($activepath); | ||||
$total = $space->totalsize; | $total = $space->totalsize; | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require(dirname(__FILE__) . "/config.php"); | |||||
require(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('plus_文件管理器'); | CheckPurview('plus_文件管理器'); | ||||
if (!isset($activepath)) $activepath = $cfg_cmspath; | if (!isset($activepath)) $activepath = $cfg_cmspath; | ||||
@@ -19,10 +19,10 @@ $activepath = preg_replace("#^\/{1,}#", "/", $activepath); | |||||
if ($activepath == "/") $activepath = ""; | if ($activepath == "/") $activepath = ""; | ||||
if ($activepath == "") $inpath = $cfg_basedir; | if ($activepath == "") $inpath = $cfg_basedir; | ||||
else $inpath = $cfg_basedir . $activepath; | |||||
else $inpath = $cfg_basedir.$activepath; | |||||
$activeurl = $activepath; | $activeurl = $activepath; | ||||
if (preg_match("#" . $cfg_templets_dir . "#i", $activepath)) { | |||||
if (preg_match("#".$cfg_templets_dir."#i", $activepath)) { | |||||
$istemplets = TRUE; | $istemplets = TRUE; | ||||
} else { | } else { | ||||
$istemplets = FALSE; | $istemplets = FALSE; | ||||
@@ -9,14 +9,14 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('plus_文件管理器'); | CheckPurview('plus_文件管理器'); | ||||
require_once(DEDEINC . "/oxwindow.class.php"); | |||||
require_once(DEDEINC."/oxwindow.class.php"); | |||||
$activepath = str_replace("..", "", $activepath); | $activepath = str_replace("..", "", $activepath); | ||||
$activepath = preg_replace("#^\/{1,}#", "/", $activepath); | $activepath = preg_replace("#^\/{1,}#", "/", $activepath); | ||||
if ($activepath == "/") $activepath = ""; | if ($activepath == "/") $activepath = ""; | ||||
if ($activepath == "") $inpath = $cfg_basedir; | 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("fmdo", $fmdo); | ||||
$win->AddHidden("activepath", $activepath); | $win->AddHidden("activepath", $activepath); | ||||
$win->AddHidden("filename", $filename); | $win->AddHidden("filename", $filename); | ||||
if (@is_dir($cfg_basedir . $activepath . "/$filename")) { | |||||
if (@is_dir($cfg_basedir.$activepath."/$filename")) { | |||||
$wmsg = "你确信要删除目录:$filename 吗?"; | $wmsg = "你确信要删除目录:$filename 吗?"; | ||||
} else { | } else { | ||||
$wmsg = "你确信要删除文件:$filename 吗?"; | $wmsg = "你确信要删除文件:$filename 吗?"; | ||||
@@ -120,7 +120,7 @@ else if ($fmdo == "edit") { | |||||
$GLOBALS['extension'] = 'text/html'; | $GLOBALS['extension'] = 'text/html'; | ||||
} | } | ||||
$ctp = new DedeTagParse(); | $ctp = new DedeTagParse(); | ||||
$ctp->LoadTemplate(DEDEADMIN . "/templets/file_edit.htm"); | |||||
$ctp->LoadTemplate(DEDEADMIN."/templets/file_edit.htm"); | |||||
$ctp->display(); | $ctp->display(); | ||||
} | } | ||||
/*编辑文件,可视化模式 | /*编辑文件,可视化模式 | ||||
@@ -162,13 +162,13 @@ else if ($fmdo == "newfile") { | |||||
$contentView = "<textarea id='str' name='str' style='width:99%;height:400'></textarea>\r\n"; | $contentView = "<textarea id='str' name='str' style='width:99%;height:400'></textarea>\r\n"; | ||||
$GLOBALS['token'] = make_hash(); | $GLOBALS['token'] = make_hash(); | ||||
$ctp = new DedeTagParse(); | $ctp = new DedeTagParse(); | ||||
$ctp->LoadTemplate(DEDEADMIN . "/templets/file_edit.htm"); | |||||
$ctp->LoadTemplate(DEDEADMIN."/templets/file_edit.htm"); | |||||
$ctp->display(); | $ctp->display(); | ||||
} | } | ||||
//上传文件 | //上传文件 | ||||
else if ($fmdo == "upload") { | else if ($fmdo == "upload") { | ||||
$ctp = new DedeTagParse(); | $ctp = new DedeTagParse(); | ||||
$ctp->LoadTemplate(DEDEADMIN . "/templets/file_upload.htm"); | |||||
$ctp->LoadTemplate(DEDEADMIN."/templets/file_upload.htm"); | |||||
$ctp->display(); | $ctp->display(); | ||||
} | } |
@@ -9,10 +9,10 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('c_FreeList'); | CheckPurview('c_FreeList'); | ||||
if (empty($dopost)) { | if (empty($dopost)) { | ||||
require_once DEDEINC . '/typelink.class.php'; | |||||
require_once DEDEINC.'/typelink.class.php'; | |||||
include DedeInclude('templets/freelist_add.htm'); | include DedeInclude('templets/freelist_add.htm'); | ||||
exit(); | exit(); | ||||
} else if ($dopost == 'save') { | } else if ($dopost == 'save') { | ||||
@@ -26,10 +26,10 @@ if (empty($dopost)) { | |||||
exit(); | exit(); | ||||
} | } | ||||
if (is_array($types)) { | 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($typeid)) $atts .= " typeid='$typeid' "; | ||||
if (!empty($channel)) $atts .= " channel='$channel' "; | if (!empty($channel)) $atts .= " channel='$channel' "; | ||||
if (!empty($subday)) $atts .= " subday='$subday' "; | if (!empty($subday)) $atts .= " subday='$subday' "; | ||||
@@ -9,15 +9,15 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
if (empty($dopost)) { | 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; | $aid = isset($aid) && is_numeric($aid) ? $aid : 0; | ||||
$row = $dsql->GetOne("Select * From `#@__freelist` where aid='$aid' "); | $row = $dsql->GetOne("Select * From `#@__freelist` where aid='$aid' "); | ||||
$dtp = new DedeTagParse(); | $dtp = new DedeTagParse(); | ||||
$dtp->SetNameSpace("dede", "{", "}"); | $dtp->SetNameSpace("dede", "{", "}"); | ||||
$dtp->LoadSource("--" . $row['listtag'] . "--"); | |||||
$dtp->LoadSource("--".$row['listtag']."--"); | |||||
$ctag = $dtp->GetTag('list'); | $ctag = $dtp->GetTag('list'); | ||||
include DedeInclude('templets/freelist_edit.htm'); | include DedeInclude('templets/freelist_edit.htm'); | ||||
exit(); | exit(); | ||||
@@ -28,10 +28,10 @@ if (empty($dopost)) { | |||||
$ntype = ''; | $ntype = ''; | ||||
$edtime = time(); | $edtime = time(); | ||||
if (is_array($types)) { | 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($typeid)) $atts .= " typeid='$typeid' "; | ||||
if (!empty($channel)) $atts .= " channel='$channel' "; | if (!empty($channel)) $atts .= " channel='$channel' "; | ||||
if (!empty($subday)) $atts .= " subday='$subday' "; | if (!empty($subday)) $atts .= " subday='$subday' "; | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require(dirname(__FILE__) . "/config.php"); | |||||
require(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('plus_友情链接模块'); | CheckPurview('plus_友情链接模块'); | ||||
if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
@@ -17,18 +17,18 @@ if ($dopost == "add") { | |||||
$dtime = time(); | $dtime = time(); | ||||
if (is_uploaded_file($logoimg)) { | if (is_uploaded_file($logoimg)) { | ||||
$names = split("\.", $logoimg_name); | $names = split("\.", $logoimg_name); | ||||
$shortname = "." . $names[count($names) - 1]; | |||||
$shortname = ".".$names[count($names) - 1]; | |||||
if (!preg_match("#(jpg|gif|png)$#", $shortname)) { | if (!preg_match("#(jpg|gif|png)$#", $shortname)) { | ||||
$shortname = '.gif'; | $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(); | 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); | @unlink($logoimg); | ||||
} else { | } else { | ||||
$imgurl = $logo; | $imgurl = $logo; | ||||
@@ -48,7 +48,7 @@ if ($dopost == "add") { | |||||
ShowMsg("成功增加一个链接!", $burl, 0, 500); | ShowMsg("成功增加一个链接!", $burl, 0, 500); | ||||
exit(); | exit(); | ||||
} else { | } else { | ||||
ShowMsg("增加链接时出错,请向官方反馈,原因:" . $dsql->GetError(), "javascript:;"); | |||||
ShowMsg("增加链接时出错,请向官方反馈,原因:".$dsql->GetError(), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckPurview('plus_友情链接模块'); | CheckPurview('plus_友情链接模块'); | ||||
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'friendlink_main.php' : $_COOKIE['ENV_GOBACK_URL']; | $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'friendlink_main.php' : $_COOKIE['ENV_GOBACK_URL']; | ||||
if (empty($dopost)) $dopost = ""; | if (empty($dopost)) $dopost = ""; | ||||
@@ -40,15 +40,15 @@ if ($dopost == "delete") { | |||||
exit(); | exit(); | ||||
} | } | ||||
} else if ($dopost == "saveedit") { | } else if ($dopost == "saveedit") { | ||||
require_once DEDEINC . '/request.class.php'; | |||||
require_once DEDEINC.'/request.class.php'; | |||||
$request = new Request(); | $request = new Request(); | ||||
$request->Init(); | $request->Init(); | ||||
$id = preg_replace("#[^0-9]#", "", $request->Item('id', 0)); | $id = preg_replace("#[^0-9]#", "", $request->Item('id', 0)); | ||||
$logo = $request->Item('logo', ''); | $logo = $request->Item('logo', ''); | ||||
$logoimg = $request->Upfile('logoimg', ''); | $logoimg = $request->Upfile('logoimg', ''); | ||||
if (!empty($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); | $sortrank = $request->Item('sortrank', 1); | ||||
$url = $request->Item('url', ''); | $url = $request->Item('url', ''); | ||||
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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, '/'); | setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); | ||||
if (empty($keyword)) $keyword = ''; | if (empty($keyword)) $keyword = ''; | ||||
@@ -29,7 +29,7 @@ $sql = "SELECT * FROM `#@__flink` WHERE CONCAT(`url`,`webname`,`email`) LIKE '% | |||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->SetParameter('keyword', $keyword); | $dlist->SetParameter('keyword', $keyword); | ||||
$dlist->SetParameter('ischeck', $ischeck); | $dlist->SetParameter('ischeck', $ischeck); | ||||
$dlist->SetTemplet(DEDEADMIN . '/templets/friendlink_main.htm'); | |||||
$dlist->SetTemplet(DEDEADMIN.'/templets/friendlink_main.htm'); | |||||
$dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
$dlist->display(); | $dlist->display(); | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
//保存更改 | //保存更改 | ||||
@@ -18,9 +18,9 @@ if ($dopost == "save") { | |||||
$endID = $idend; | $endID = $idend; | ||||
for (; $startID <= $endID; $startID++) { | for (; $startID <= $endID; $startID++) { | ||||
$query = ''; | $query = ''; | ||||
$tid = ${'ID_' . $startID}; | |||||
$pname = ${'pname_' . $startID}; | |||||
if (isset(${'check_' . $startID})) { | |||||
$tid = ${'ID_'.$startID}; | |||||
$pname = ${'pname_'.$startID}; | |||||
if (isset(${'check_'.$startID})) { | |||||
if ($pname != '') { | if ($pname != '') { | ||||
$query = "UPDATE `#@__flinktype` SET typename='$pname' WHERE id='$tid' "; | $query = "UPDATE `#@__flinktype` SET typename='$pname' WHERE id='$tid' "; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
@@ -9,19 +9,19 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . '/config.php'); | |||||
require_once(dirname(__FILE__).'/config.php'); | |||||
$action = isset($action) ? trim($action) : ''; | $action = isset($action) ? trim($action) : ''; | ||||
if (empty($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); | 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(); | exit(); | ||||
} | } | ||||
include DEDEADMIN . '/templets/imagecut.htm'; | |||||
include DEDEADMIN.'/templets/imagecut.htm'; | |||||
exit(); | exit(); | ||||
} elseif ($action == 'cut') { | } 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'); | ShowMsg('对不起,请重新选择裁剪图片!', '-1'); | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -33,13 +33,13 @@ if (empty($action)) { | |||||
ShowMsg('对不起,请选择裁剪图片的尺寸!', '-1'); | ShowMsg('对不起,请选择裁剪图片的尺寸!', '-1'); | ||||
exit(); | exit(); | ||||
} | } | ||||
$imginfo = getimagesize($cfg_basedir . $file); | |||||
$imginfo = getimagesize($cfg_basedir.$file); | |||||
$imgw = $imginfo[0]; | $imgw = $imginfo[0]; | ||||
$imgh = $imginfo[1]; | $imgh = $imginfo[1]; | ||||
$temp = 400 / $imgw; | $temp = 400 / $imgw; | ||||
$newwidth = 400; | $newwidth = 400; | ||||
$newheight = $imgh * $temp; | $newheight = $imgh * $temp; | ||||
$srcFile = $cfg_basedir . $file; | |||||
$srcFile = $cfg_basedir.$file; | |||||
$thumb = imagecreatetruecolor($newwidth, $newheight); | $thumb = imagecreatetruecolor($newwidth, $newheight); | ||||
$thumba = imagecreatetruecolor($width, $height); | $thumba = imagecreatetruecolor($width, $height); | ||||
@@ -65,7 +65,7 @@ if (empty($action)) { | |||||
$ddpicok = $reObjJs = ''; | $ddpicok = $reObjJs = ''; | ||||
if (empty($isupload)) { | 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; | $reObjJs = " var backObj = window.opener.document.form1.picname; | ||||
var prvObj = window.opener.document.getElementById('divpicview');\r\n"; | var prvObj = window.opener.document.getElementById('divpicview');\r\n"; | ||||
} else { | } else { | ||||
@@ -74,7 +74,7 @@ if (empty($action)) { | |||||
var prvObj = window.opener.parent.document.getElementById('divpicview');\r\n"; | var prvObj = window.opener.parent.document.getElementById('divpicview');\r\n"; | ||||
} | } | ||||
$ddpicokurl = $cfg_basedir . $ddpicok; | |||||
$ddpicokurl = $cfg_basedir.$ddpicok; | |||||
switch ($imginfo['mime']) { | switch ($imginfo['mime']) { | ||||
case 'image/jpeg': | case 'image/jpeg': | ||||
@@ -99,7 +99,7 @@ if (empty($action)) { | |||||
//如果从其它图中剪出, 保存附件信息 | //如果从其它图中剪出, 保存附件信息 | ||||
if (empty($isupload)) { | if (empty($isupload)) { | ||||
$inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | ||||
VALUES ('$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); | $dsql->ExecuteNoneQuery($inquery); | ||||
$fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
AddMyAddon($fid, $ddpicok); | AddMyAddon($fid, $ddpicok); | ||||
@@ -9,7 +9,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/../config.php"); | |||||
require_once(dirname(__FILE__)."/../config.php"); | |||||
$cuserLogin = new userLogin(); | $cuserLogin = new userLogin(); | ||||
//后台功能操作配置项 | //后台功能操作配置项 | ||||
$actionSearch[0] = array( | $actionSearch[0] = array( | ||||
@@ -33,7 +33,7 @@ $actionSearch[0] = array( | |||||
'title' => '我发布的文档', | 'title' => '我发布的文档', | ||||
'description' => '现在登录的管理员所发表的所有内容模型中的文档', | 'description' => '现在登录的管理员所发表的所有内容模型中的文档', | ||||
'purview' => 'a_List,a_AccList,a_MyList', | 'purview' => 'a_List,a_AccList,a_MyList', | ||||
'linkurl' => 'content_list.php?mid=' . $cuserLogin->userID | |||||
'linkurl' => 'content_list.php?mid='.$cuserLogin->userID | |||||
), | ), | ||||
3 => array( | 3 => array( | ||||
'title' => '评论管理', | 'title' => '评论管理', | ||||
@@ -69,7 +69,7 @@ function GetFormItem($ctag) | |||||
} | } | ||||
if ($ctag->GetAtt("type") == "htmltext" || $ctag->GetAtt("type") == "textdata") { | if ($ctag->GetAtt("type") == "htmltext" || $ctag->GetAtt("type") == "textdata") { | ||||
$formitem = ""; | $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 .= GetEditor($fieldname, '', 350, 'Basic', 'string'); | ||||
$formitem .= "</td></tr></table>\r\n"; | $formitem .= "</td></tr></table>\r\n"; | ||||
return $formitem; | return $formitem; | ||||
@@ -86,22 +86,22 @@ function GetFormItem($ctag) | |||||
$formitem = str_replace("~form~", $innertext, $formitem); | $formitem = str_replace("~form~", $innertext, $formitem); | ||||
return $formitem; | return $formitem; | ||||
} else if ($ctag->GetAtt("type") == "img") { | } 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("~name~", $ctag->GetAtt('itemname'), $formitem); | ||||
$formitem = str_replace("~form~", $innertext, $formitem); | $formitem = str_replace("~form~", $innertext, $formitem); | ||||
return $formitem; | return $formitem; | ||||
} else if ($ctag->GetAtt("type") == "media") { | } 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("~name~", $ctag->GetAtt('itemname'), $formitem); | ||||
$formitem = str_replace("~form~", $innertext, $formitem); | $formitem = str_replace("~form~", $innertext, $formitem); | ||||
return $formitem; | return $formitem; | ||||
} else if ($ctag->GetAtt("type") == "addon") { | } 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("~name~", $ctag->GetAtt('itemname'), $formitem); | ||||
$formitem = str_replace("~form~", $innertext, $formitem); | $formitem = str_replace("~form~", $innertext, $formitem); | ||||
return $formitem; | return $formitem; | ||||
} else if ($ctag->GetAtt("type") == "media") { | } 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("~name~", $ctag->GetAtt('itemname'), $formitem); | ||||
$formitem = str_replace("~form~", $innertext, $formitem); | $formitem = str_replace("~form~", $innertext, $formitem); | ||||
return $formitem; | return $formitem; | ||||
@@ -147,28 +147,28 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') | |||||
} else if ($dtype == "textdata") { | } else if ($dtype == "textdata") { | ||||
if ($job == 'edit') { | if ($job == 'edit') { | ||||
$addvarDirs = explode('/', $addvar); | $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)) { | if (!is_dir($mdir)) { | ||||
MkdirAll($mdir, $GLOBALS['cfg_dir_purview']); | MkdirAll($mdir, $GLOBALS['cfg_dir_purview']); | ||||
} | } | ||||
$fp = fopen($GLOBALS['cfg_basedir'] . $addvar, "w"); | |||||
$fp = fopen($GLOBALS['cfg_basedir'].$addvar, "w"); | |||||
fwrite($fp, stripslashes($dvalue)); | fwrite($fp, stripslashes($dvalue)); | ||||
fclose($fp); | fclose($fp); | ||||
CloseFtp(); | CloseFtp(); | ||||
return $addvar; | return $addvar; | ||||
} else { | } else { | ||||
$ipath = $GLOBALS['cfg_cmspath'] . "/data/textdata"; | |||||
$ipath = $GLOBALS['cfg_cmspath']."/data/textdata"; | |||||
$tpath = ceil($aid / 5000); | $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)); | fwrite($fp, stripslashes($dvalue)); | ||||
fclose($fp); | fclose($fp); | ||||
CloseFtp(); | CloseFtp(); | ||||
@@ -180,24 +180,24 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') | |||||
return ""; | return ""; | ||||
} | } | ||||
$iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl)); | $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']) { | if (preg_match("#^http:\/\/#i", $iurl) && $GLOBALS['isUrlOpen']) { | ||||
//远程图片 | //远程图片 | ||||
$reimgs = ""; | $reimgs = ""; | ||||
if ($isUrlOpen) { | if ($isUrlOpen) { | ||||
$reimgs = GetRemoteImage($iurl, $GLOBALS['adminid']); | $reimgs = GetRemoteImage($iurl, $GLOBALS['adminid']); | ||||
if (is_array($reimgs)) { | 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 { | } else { | ||||
$imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}"; | |||||
$imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; | |||||
} | } | ||||
} else if ($iurl != "") { | } else if ($iurl != "") { | ||||
//站内图片 | //站内图片 | ||||
$imgfile = $GLOBALS['cfg_basedir'] . $iurl; | |||||
$imgfile = $GLOBALS['cfg_basedir'].$iurl; | |||||
if (is_file($imgfile)) { | if (is_file($imgfile)) { | ||||
$imginfos = GetImageSize($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); | return addslashes($imgurl); | ||||
@@ -271,8 +271,8 @@ function GetFormItemValue($ctag, $fvalue) | |||||
//文本数据的特殊处理 | //文本数据的特殊处理 | ||||
if ($ctag->GetAtt("type") == "textdata") { | 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 = ""; | $okfvalue = ""; | ||||
while (!feof($fp)) { | while (!feof($fp)) { | ||||
$okfvalue .= fgets($fp, 1024); | $okfvalue .= fgets($fp, 1024); | ||||
@@ -281,14 +281,14 @@ function GetFormItemValue($ctag, $fvalue) | |||||
} else { | } else { | ||||
$okfvalue = ""; | $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 .= "</tr></table>\r\n"; | ||||
$formitem .= "<input type='hidden' name='{$fieldname}_file' value='{$fvalue}'>\r\n"; | $formitem .= "<input type='hidden' name='{$fieldname}_file' value='{$fvalue}'>\r\n"; | ||||
return $formitem; | return $formitem; | ||||
} else if ($ctag->GetAtt("type") == "htmltext") { | } 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"; | $formitem .= "</tr></table>\r\n"; | ||||
return $formitem; | return $formitem; | ||||
} else if ($ctag->GetAtt("type") == "multitext") { | } else if ($ctag->GetAtt("type") == "multitext") { | ||||
@@ -312,17 +312,17 @@ function GetFormItemValue($ctag, $fvalue) | |||||
} | } | ||||
$ntag = $ndtp->GetTag("img"); | $ntag = $ndtp->GetTag("img"); | ||||
$fvalue = trim($ntag->GetInnerText()); | $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("~name~", $ctag->GetAtt('itemname'), $formitem); | ||||
$formitem = str_replace("~form~", $innertext, $formitem); | $formitem = str_replace("~form~", $innertext, $formitem); | ||||
return $formitem; | return $formitem; | ||||
} else if ($ctag->GetAtt("type") == "media") { | } 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("~name~", $ctag->GetAtt('itemname'), $formitem); | ||||
$formitem = str_replace("~form~", $innertext, $formitem); | $formitem = str_replace("~form~", $innertext, $formitem); | ||||
return $formitem; | return $formitem; | ||||
} else if ($ctag->GetAtt("type") == "addon") { | } 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("~name~", $ctag->GetAtt('itemname'), $formitem); | ||||
$formitem = str_replace("~form~", $innertext, $formitem); | $formitem = str_replace("~form~", $innertext, $formitem); | ||||
return $formitem; | return $formitem; | ||||
@@ -1,5 +1,4 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 文档操作相关函数 | * 文档操作相关函数 | ||||
* | * | ||||
@@ -9,16 +8,15 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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 = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : ''; | ||||
$backurl = preg_match("#content_#", $backurl) ? "<a href='$backurl' class='btn btn-success btn-sm'>记忆的列表页</a> " : ''; | $backurl = preg_match("#content_#", $backurl) ? "<a href='$backurl' class='btn btn-success btn-sm'>记忆的列表页</a> " : ''; | ||||
if (!isset($_NOT_ARCHIVES)) { | if (!isset($_NOT_ARCHIVES)) { | ||||
require_once(DEDEINC . '/customfields.func.php'); | |||||
require_once(DEDEINC.'/customfields.func.php'); | |||||
} | } | ||||
/** | /** | ||||
* 获得HTML里的外部资源,针对图集 | * 获得HTML里的外部资源,针对图集 | ||||
* | * | ||||
@@ -32,46 +30,44 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) | |||||
{ | { | ||||
global $dsql, $cfg_multi_site, $cfg_basehost, $cfg_ddimg_width; | global $dsql, $cfg_multi_site, $cfg_basehost, $cfg_ddimg_width; | ||||
global $cfg_basedir, $pagestyle, $cuserLogin, $cfg_addon_savetype; | 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; | if (empty($cfg_ddimg_width)) $cfg_ddimg_width = 320; | ||||
$rsimg = ''; | $rsimg = ''; | ||||
$cfg_uploaddir = $GLOBALS['cfg_image_dir']; | $cfg_uploaddir = $GLOBALS['cfg_image_dir']; | ||||
$cfg_basedir = $GLOBALS['cfg_basedir']; | $cfg_basedir = $GLOBALS['cfg_basedir']; | ||||
$basehost = 'http://' . $_SERVER['HTTP_HOST']; | |||||
$basehost = 'http://'.$_SERVER['HTTP_HOST']; | |||||
$img_array = array(); | $img_array = array(); | ||||
preg_match_all("/(src)=[\"|'| ]{0,}(http:\/\/([^>]*)\.(gif|jpg|png))/isU", $body, $img_array); | preg_match_all("/(src)=[\"|'| ]{0,}(http:\/\/([^>]*)\.(gif|jpg|png))/isU", $body, $img_array); | ||||
$img_array = array_unique($img_array[2]); | $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']); | MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); | ||||
CloseFtp(); | CloseFtp(); | ||||
} | } | ||||
$milliSecond = 'co' . dd2char(MyDate('ymdHis', time())); | |||||
$milliSecond = 'co'.dd2char(MyDate('ymdHis', time())); | |||||
foreach ($img_array as $key => $value) { | foreach ($img_array as $key => $value) { | ||||
$value = trim($value); | $value = trim($value); | ||||
if ( | 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; | continue; | ||||
} | } | ||||
$itype = substr($value, -4, 4); | $itype = substr($value, -4, 4); | ||||
if (!preg_match("#\.(gif|jpg|png)#", $itype)) $itype = ".jpg"; | 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); | $rs = DownImageKeep($value, $rfurl, $rndFileName, '', 0, 30); | ||||
if ($rs) { | if ($rs) { | ||||
$info = ''; | $info = ''; | ||||
$imginfos = GetImageSize($rndFileName, $info); | $imginfos = GetImageSize($rndFileName, $info); | ||||
$fsize = filesize($rndFileName); | $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) | $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); | $dsql->ExecuteNoneQuery($inquery); | ||||
$fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
AddMyAddon($fid, $iurl); | AddMyAddon($fid, $iurl); | ||||
@@ -82,17 +78,16 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) | |||||
} | } | ||||
if (empty($firstdd) && !empty($litpicname)) { | if (empty($firstdd) && !empty($litpicname)) { | ||||
$firstdd = $litpicname; | $firstdd = $litpicname; | ||||
if (!file_exists($cfg_basedir . $firstdd)) { | |||||
if (!file_exists($cfg_basedir.$firstdd)) { | |||||
$firstdd = $iurl; | $firstdd = $iurl; | ||||
} | } | ||||
} | } | ||||
@WaterImg($rndFileName, 'down'); | @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; | return $rsimg; | ||||
} | } | ||||
/** | /** | ||||
* 获得文章body里的外部资源 | * 获得文章body里的外部资源 | ||||
* | * | ||||
@@ -105,23 +100,22 @@ function GetCurContent($body) | |||||
global $cfg_multi_site, $cfg_basehost, $cfg_basedir, $cfg_image_dir, $arcID, $cuserLogin, $dsql; | global $cfg_multi_site, $cfg_basehost, $cfg_basedir, $cfg_image_dir, $arcID, $cuserLogin, $dsql; | ||||
$cfg_uploaddir = $cfg_image_dir; | $cfg_uploaddir = $cfg_image_dir; | ||||
$htd = new DedeHttpDown(); | $htd = new DedeHttpDown(); | ||||
$basehost = "http://" . $_SERVER["HTTP_HOST"]; | |||||
$basehost = "http://".$_SERVER["HTTP_HOST"]; | |||||
$img_array = array(); | $img_array = array(); | ||||
preg_match_all("/src=[\"|'|\s]([^\"|^\'|^\s]*?)/isU", $body, $img_array); | preg_match_all("/src=[\"|'|\s]([^\"|^\'|^\s]*?)/isU", $body, $img_array); | ||||
$img_array = array_unique($img_array[1]); | $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']); | MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); | ||||
CloseFtp(); | CloseFtp(); | ||||
} | } | ||||
$milliSecond = MyDate('His', time()); | $milliSecond = MyDate('His', time()); | ||||
foreach ($img_array as $key => $value) { | foreach ($img_array as $key => $value) { | ||||
if (preg_match("#" . $basehost . "#i", $value)) { | |||||
if (preg_match("#".$basehost."#i", $value)) { | |||||
continue; | continue; | ||||
} | } | ||||
if ($cfg_basehost != $basehost && preg_match("#" . $cfg_basehost . "#i", $value)) { | |||||
if ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value)) { | |||||
continue; | continue; | ||||
} | } | ||||
if (!preg_match("#^(http|https):\/\/#i", $value)) { | if (!preg_match("#^(http|https):\/\/#i", $value)) { | ||||
@@ -140,11 +134,10 @@ function GetCurContent($body) | |||||
$itype = '.jpg'; | $itype = '.jpg'; | ||||
} | } | ||||
} | } | ||||
$milliSecondN = dd2char($milliSecond . mt_rand(1000, 8000)); | |||||
$milliSecondN = dd2char($milliSecond.mt_rand(1000, 8000)); | |||||
$value = trim($value); | $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); | $rs = $htd->SaveToBin($rndFileName); | ||||
if ($rs) { | if ($rs) { | ||||
$info = ''; | $info = ''; | ||||
@@ -152,12 +145,12 @@ function GetCurContent($body) | |||||
$fsize = filesize($rndFileName); | $fsize = filesize($rndFileName); | ||||
//保存图片附件信息 | //保存图片附件信息 | ||||
$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | ||||
VALUES ('{$arcID}','$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); | $dsql->ExecuteNoneQuery($inquery); | ||||
$fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
AddMyAddon($fid, $fileurl); | AddMyAddon($fid, $fileurl); | ||||
if ($cfg_multi_site == 'Y') { | if ($cfg_multi_site == 'Y') { | ||||
$fileurl = $cfg_basehost . $fileurl; | |||||
$fileurl = $cfg_basehost.$fileurl; | |||||
} | } | ||||
$body = str_replace($value, $fileurl, $body); | $body = str_replace($value, $fileurl, $body); | ||||
@WaterImg($rndFileName, 'down'); | @WaterImg($rndFileName, 'down'); | ||||
@@ -166,7 +159,6 @@ function GetCurContent($body) | |||||
$htd->Close(); | $htd->Close(); | ||||
return $body; | return $body; | ||||
} | } | ||||
/** | /** | ||||
* 获取一个远程图片 | * 获取一个远程图片 | ||||
* | * | ||||
@@ -187,8 +179,8 @@ function GetRemoteImage($url, $uid = 0) | |||||
if (!in_array($htd->GetHead("content-type"), $sparr)) { | if (!in_array($htd->GetHead("content-type"), $sparr)) { | ||||
return ''; | return ''; | ||||
} else { | } 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); | CreateDir($imgUrl); | ||||
$itype = $htd->GetHead("content-type"); | $itype = $htd->GetHead("content-type"); | ||||
if ($itype == "image/gif") { | if ($itype == "image/gif") { | ||||
@@ -200,9 +192,9 @@ function GetRemoteImage($url, $uid = 0) | |||||
} else { | } else { | ||||
$itype = '.jpg'; | $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); | $ok = $htd->SaveToBin($rndtrueName); | ||||
@WaterImg($rndtrueName, 'down'); | @WaterImg($rndtrueName, 'down'); | ||||
if ($ok) { | if ($ok) { | ||||
@@ -215,7 +207,6 @@ function GetRemoteImage($url, $uid = 0) | |||||
$htd->Close(); | $htd->Close(); | ||||
return ($ok ? $revalues : ''); | return ($ok ? $revalues : ''); | ||||
} | } | ||||
/** | /** | ||||
* 获取远程flash | * 获取远程flash | ||||
* | * | ||||
@@ -235,13 +226,13 @@ function GetRemoteFlash($url, $uid = 0) | |||||
if ($htd->GetHead("content-type") != $sparr) { | if ($htd->GetHead("content-type") != $sparr) { | ||||
return ''; | return ''; | ||||
} else { | } 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); | CreateDir($imgUrl); | ||||
$itype = '.swf'; | $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); | $ok = $htd->SaveToBin($rndFileName); | ||||
if ($ok) { | if ($ok) { | ||||
$revalues = $fileurl; | $revalues = $fileurl; | ||||
@@ -250,7 +241,6 @@ function GetRemoteFlash($url, $uid = 0) | |||||
$htd->Close(); | $htd->Close(); | ||||
return $revalues; | return $revalues; | ||||
} | } | ||||
/** | /** | ||||
* 检测频道ID | * 检测频道ID | ||||
* | * | ||||
@@ -263,12 +253,10 @@ function CheckChannel($typeid, $channelid) | |||||
{ | { | ||||
global $dsql; | global $dsql; | ||||
if ($typeid == 0) return TRUE; | if ($typeid == 0) return TRUE; | ||||
$row = $dsql->GetOne("SELECT ispart,channeltype FROM `#@__arctype` WHERE id='$typeid' "); | $row = $dsql->GetOne("SELECT ispart,channeltype FROM `#@__arctype` WHERE id='$typeid' "); | ||||
if ($row['ispart'] != 0 || $row['channeltype'] != $channelid) return FALSE; | if ($row['ispart'] != 0 || $row['channeltype'] != $channelid) return FALSE; | ||||
else return TRUE; | else return TRUE; | ||||
} | } | ||||
/** | /** | ||||
* 检测档案权限 | * 检测档案权限 | ||||
* | * | ||||
@@ -284,7 +272,6 @@ function CheckArcAdmin($aid, $adminid) | |||||
if ($row['mid'] != $adminid) return FALSE; | if ($row['mid'] != $adminid) return FALSE; | ||||
else return TRUE; | else return TRUE; | ||||
} | } | ||||
/** | /** | ||||
* 文档自动分页 | * 文档自动分页 | ||||
* | * | ||||
@@ -309,7 +296,7 @@ function SpLongBody($mybody, $spsize, $sptag) | |||||
$npageBody .= $bds[$i]; | $npageBody .= $bds[$i]; | ||||
continue; | continue; | ||||
} | } | ||||
$bds[$i] = "<" . $bds[$i]; | |||||
$bds[$i] = "<".$bds[$i]; | |||||
if (strlen($bds[$i]) > 6) { | if (strlen($bds[$i]) > 6) { | ||||
$tname = substr($bds[$i], 1, 5); | $tname = substr($bds[$i], 1, 5); | ||||
if (strtolower($tname) == 'table') { | if (strtolower($tname) == 'table') { | ||||
@@ -327,7 +314,7 @@ function SpLongBody($mybody, $spsize, $sptag) | |||||
$npageBody .= $bds[$i]; | $npageBody .= $bds[$i]; | ||||
} | } | ||||
if (strlen($npageBody) > $spsize) { | if (strlen($npageBody) > $spsize) { | ||||
$mybody .= $npageBody . $sptag; | |||||
$mybody .= $npageBody.$sptag; | |||||
$npageBody = ''; | $npageBody = ''; | ||||
} | } | ||||
} | } | ||||
@@ -336,7 +323,6 @@ function SpLongBody($mybody, $spsize, $sptag) | |||||
} | } | ||||
return addslashes($mybody); | return addslashes($mybody); | ||||
} | } | ||||
/** | /** | ||||
* 创建指定ID的文档 | * 创建指定ID的文档 | ||||
* | * | ||||
@@ -349,13 +335,12 @@ function SpLongBody($mybody, $spsize, $sptag) | |||||
function MakeArt($aid, $mkindex = FALSE, $ismakesign = FALSE, $isremote = 0) | function MakeArt($aid, $mkindex = FALSE, $ismakesign = FALSE, $isremote = 0) | ||||
{ | { | ||||
global $envs, $typeid; | global $envs, $typeid; | ||||
require_once(DEDEINC . '/arc.archives.class.php'); | |||||
require_once(DEDEINC.'/arc.archives.class.php'); | |||||
if ($ismakesign) $envs['makesign'] = 'yes'; | if ($ismakesign) $envs['makesign'] = 'yes'; | ||||
$arc = new Archives($aid); | $arc = new Archives($aid); | ||||
$reurl = $arc->MakeHtml($isremote); | $reurl = $arc->MakeHtml($isremote); | ||||
return $reurl; | return $reurl; | ||||
} | } | ||||
/** | /** | ||||
* 取第一个图片为缩略图 | * 取第一个图片为缩略图 | ||||
* | * | ||||
@@ -375,7 +360,6 @@ function GetDDImgFromBody(&$body) | |||||
} | } | ||||
return $litpic; | return $litpic; | ||||
} | } | ||||
/** | /** | ||||
* 获得缩略图 | * 获得缩略图 | ||||
* | * | ||||
@@ -389,8 +373,7 @@ function GetDDImage($litpic, $picname, $isremote) | |||||
{ | { | ||||
global $cuserLogin, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir, $ddcfg_image_dir, $cfg_addon_savetype; | global $cuserLogin, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir, $ddcfg_image_dir, $cfg_addon_savetype; | ||||
$ntime = time(); | $ntime = time(); | ||||
if (($litpic != 'none' || $litpic != 'ddfirst') && | |||||
!empty($_FILES[$litpic]['tmp_name']) && is_uploaded_file($_FILES[$litpic]['tmp_name']) | |||||
if (($litpic != 'none' || $litpic != 'ddfirst') && !empty($_FILES[$litpic]['tmp_name']) && is_uploaded_file($_FILES[$litpic]['tmp_name']) | |||||
) { | ) { | ||||
//如果用户自行上传缩略图 | //如果用户自行上传缩略图 | ||||
$istype = 0; | $istype = 0; | ||||
@@ -400,48 +383,42 @@ function GetDDImage($litpic, $picname, $isremote) | |||||
ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); | ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
$savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); | |||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | |||||
CreateDir($savepath); | 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") { | if (strtolower($_FILES[$litpic]['type']) == "image/gif") { | ||||
$fullUrl = $fullUrl . ".gif"; | |||||
$fullUrl = $fullUrl.".gif"; | |||||
} else if (strtolower($_FILES[$litpic]['type']) == "image/png") { | } else if (strtolower($_FILES[$litpic]['type']) == "image/png") { | ||||
$fullUrl = $fullUrl . ".png"; | |||||
$fullUrl = $fullUrl.".png"; | |||||
} else { | } 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; | $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); | |||||
$img = $cfg_basedir . $litpic; | |||||
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; | |||||
} else { | } else { | ||||
$picname = trim($picname); | $picname = trim($picname); | ||||
if ($isremote == 1 && preg_match("#^http:\/\/#i", $picname)) { | if ($isremote == 1 && preg_match("#^http:\/\/#i", $picname)) { | ||||
$litpic = $picname; | $litpic = $picname; | ||||
$ddinfos = GetRemoteImage($litpic, $cuserLogin->getUserID()); | $ddinfos = GetRemoteImage($litpic, $cuserLogin->getUserID()); | ||||
if (!is_array($ddinfos)) { | if (!is_array($ddinfos)) { | ||||
$litpic = ''; | $litpic = ''; | ||||
} else { | } else { | ||||
$litpic = $ddinfos[0]; | $litpic = $ddinfos[0]; | ||||
if ($ddinfos[1] > $cfg_ddimg_width || $ddinfos[2] > $cfg_ddimg_height) { | 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 { | } else { | ||||
if ($litpic == 'ddfirst' && !preg_match("#^http:\/\/#i", $picname)) { | if ($litpic == 'ddfirst' && !preg_match("#^http:\/\/#i", $picname)) { | ||||
$oldpic = $cfg_basedir . $picname; | |||||
$oldpic = $cfg_basedir.$picname; | |||||
$litpic = str_replace('.', '-lp.', $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 { | } else { | ||||
$litpic = $picname; | $litpic = $picname; | ||||
return $litpic; | return $litpic; | ||||
@@ -451,7 +428,6 @@ function GetDDImage($litpic, $picname, $isremote) | |||||
if ($litpic == 'litpic' || $litpic == 'ddfirst') $litpic = ''; | if ($litpic == 'litpic' || $litpic == 'ddfirst') $litpic = ''; | ||||
return $litpic; | return $litpic; | ||||
} | } | ||||
/** | /** | ||||
* 获得一个附加表单 | * 获得一个附加表单 | ||||
* | * | ||||
@@ -463,7 +439,6 @@ function GetFormItemA($ctag) | |||||
{ | { | ||||
return GetFormItem($ctag, 'admin'); | return GetFormItem($ctag, 'admin'); | ||||
} | } | ||||
/** | /** | ||||
* 处理不同类型的数据 | * 处理不同类型的数据 | ||||
* | * | ||||
@@ -479,7 +454,6 @@ function GetFieldValueA($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') | |||||
{ | { | ||||
return GetFieldValue($dvalue, $dtype, $aid, $job, $addvar, 'admin'); | return GetFieldValue($dvalue, $dtype, $aid, $job, $addvar, 'admin'); | ||||
} | } | ||||
/** | /** | ||||
* 获得带值的表单(编辑时用) | * 获得带值的表单(编辑时用) | ||||
* | * | ||||
@@ -492,7 +466,6 @@ function GetFormItemValueA($ctag, $fvalue) | |||||
{ | { | ||||
return GetFormItemValue($ctag, $fvalue, 'admin'); | return GetFormItemValue($ctag, $fvalue, 'admin'); | ||||
} | } | ||||
/** | /** | ||||
* 载入自定义表单(用于发布) | * 载入自定义表单(用于发布) | ||||
* | * | ||||
@@ -510,17 +483,15 @@ function PrintAutoFieldsAdd($fieldset, $loadtype = 'all') | |||||
if (is_array($dtp->CTags)) { | if (is_array($dtp->CTags)) { | ||||
foreach ($dtp->CTags as $tid => $ctag) { | foreach ($dtp->CTags as $tid => $ctag) { | ||||
if ( | if ( | ||||
$loadtype != 'autofield' | |||||
|| ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) | |||||
$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 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"; | |||||
} | } | ||||
/** | /** | ||||
* 载入自定义表单(用于编辑) | * 载入自定义表单(用于编辑) | ||||
* | * | ||||
@@ -539,18 +510,15 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all') | |||||
if (is_array($dtp->CTags)) { | if (is_array($dtp->CTags)) { | ||||
foreach ($dtp->CTags as $tid => $ctag) { | foreach ($dtp->CTags as $tid => $ctag) { | ||||
if ( | if ( | ||||
$loadtype != 'autofield' | |||||
|| ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) | |||||
$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 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"; | |||||
} | } | ||||
/** | /** | ||||
* 处理HTML文本 | * 处理HTML文本 | ||||
* 删除非站外链接、自动摘要、自动获取缩略图 | * 删除非站外链接、自动摘要、自动获取缩略图 | ||||
@@ -569,36 +537,31 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||||
global $cfg_bizcore_appid, $cfg_bizcore_key, $cfg_bizcore_hostname, $cfg_bizcore_port; | global $cfg_bizcore_appid, $cfg_bizcore_key, $cfg_bizcore_hostname, $cfg_bizcore_port; | ||||
$autolitpic = (empty($autolitpic) ? '' : $autolitpic); | $autolitpic = (empty($autolitpic) ? '' : $autolitpic); | ||||
$body = stripslashes($body); | $body = stripslashes($body); | ||||
//远程图片本地化 | //远程图片本地化 | ||||
if ($remote == 1) { | if ($remote == 1) { | ||||
$body = GetCurContent($body); | $body = GetCurContent($body); | ||||
} | } | ||||
//删除非站内链接 | //删除非站内链接 | ||||
if ($dellink == 1) { | if ($dellink == 1) { | ||||
$allow_urls = array($_SERVER['HTTP_HOST']); | $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); | $body = Replace_Links($body, $allow_urls); | ||||
} | } | ||||
//自动摘要 | //自动摘要 | ||||
if ($description == '' && $cfg_auot_description > 0) { | if ($description == '' && $cfg_auot_description > 0) { | ||||
$description = cn_substr(html2text($body), $cfg_auot_description); | $description = cn_substr(html2text($body), $cfg_auot_description); | ||||
$description = trim(preg_replace('/#p#|#e#/', '', $description)); | $description = trim(preg_replace('/#p#|#e#/', '', $description)); | ||||
$description = addslashes($description); | $description = addslashes($description); | ||||
} | } | ||||
//自动获取缩略图 | //自动获取缩略图 | ||||
if ($autolitpic == 1 && $litpic == '') { | if ($autolitpic == 1 && $litpic == '') { | ||||
$litpic = GetDDImgFromBody($body); | $litpic = GetDDImgFromBody($body); | ||||
} | } | ||||
//自动获取关键字 | //自动获取关键字 | ||||
if ($autokey == 1 && $keywords == '') { | |||||
if ($autokey == 2 && $keywords == '') { | |||||
$subject = $title; | $subject = $title; | ||||
$message = $body; | $message = $body; | ||||
// 采用DedeBIZ Core分词组件分词 | // 采用DedeBIZ Core分词组件分词 | ||||
@@ -607,11 +570,11 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | ||||
$client->appid = $cfg_bizcore_appid; | $client->appid = $cfg_bizcore_appid; | ||||
$client->key = $cfg_bizcore_key; | $client->key = $cfg_bizcore_key; | ||||
$data = $client->Spliteword($subject . Html2Text($message)); | |||||
$data = $client->Spliteword($subject.Html2Text($message)); | |||||
$keywords = $data->data; | $keywords = $data->data; | ||||
$client->Close(); | $client->Close(); | ||||
} else { | } else { | ||||
include_once(DEDEINC . '/splitword.class.php'); | |||||
include_once(DEDEINC.'/splitword.class.php'); | |||||
$keywords = ''; | $keywords = ''; | ||||
$sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); | $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); | ||||
$sp->SetSource($subject, $cfg_soft_lang, $cfg_soft_lang); | $sp->SetSource($subject, $cfg_soft_lang, $cfg_soft_lang); | ||||
@@ -620,22 +583,21 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||||
$sp->SetSource(Html2Text($message), $cfg_soft_lang, $cfg_soft_lang); | $sp->SetSource(Html2Text($message), $cfg_soft_lang, $cfg_soft_lang); | ||||
$sp->StartAnalysis(); | $sp->StartAnalysis(); | ||||
$allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); | $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); | ||||
if (is_array($allindexs) && is_array($titleindexs)) { | if (is_array($allindexs) && is_array($titleindexs)) { | ||||
foreach ($titleindexs as $k => $v) { | foreach ($titleindexs as $k => $v) { | ||||
if (strlen($keywords . $k) >= 60) { | |||||
if (strlen($keywords.$k) >= 60) { | |||||
break; | break; | ||||
} else { | } else { | ||||
if (strlen($k) <= 2) continue; | if (strlen($k) <= 2) continue; | ||||
$keywords .= $k . ','; | |||||
$keywords .= $k.','; | |||||
} | } | ||||
} | } | ||||
foreach ($allindexs as $k => $v) { | foreach ($allindexs as $k => $v) { | ||||
if (strlen($keywords . $k) >= 60) { | |||||
if (strlen($keywords.$k) >= 60) { | |||||
break; | break; | ||||
} else if (!in_array($k, $titleindexs)) { | } else if (!in_array($k, $titleindexs)) { | ||||
if (strlen($k) <= 2) continue; | if (strlen($k) <= 2) continue; | ||||
$keywords .= $k . ','; | |||||
$keywords .= $k.','; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -646,7 +608,6 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||||
$body = addslashes($body); | $body = addslashes($body); | ||||
return $body; | return $body; | ||||
} | } | ||||
/** | /** | ||||
* 删除非站内链接 | * 删除非站内链接 | ||||
* | * | ||||
@@ -667,7 +628,7 @@ function Replace_Links(&$body, $allow_urls = array()) | |||||
$rparr = array(); | $rparr = array(); | ||||
$tgarr = array(); | $tgarr = array(); | ||||
foreach ($arr[0] as $i => $v) { | 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; | continue; | ||||
} else { | } else { | ||||
$rparr[] = $v; | $rparr[] = $v; | ||||
@@ -681,7 +642,6 @@ function Replace_Links(&$body, $allow_urls = array()) | |||||
$arr = $rparr = $tgarr = ''; | $arr = $rparr = $tgarr = ''; | ||||
return $body; | return $body; | ||||
} | } | ||||
/** | /** | ||||
* 图集里大图的小图 | * 图集里大图的小图 | ||||
* | * | ||||
@@ -694,26 +654,21 @@ function GetImageMapDD($filename, $maxwidth) | |||||
{ | { | ||||
global $cuserLogin, $dsql, $cfg_ddimg_height, $cfg_ddimg_full; | global $cuserLogin, $dsql, $cfg_ddimg_height, $cfg_ddimg_full; | ||||
$ddn = substr($filename, -3); | $ddn = substr($filename, -3); | ||||
$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); | |||||
$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); | |||||
//保存图片附件信息 | //保存图片附件信息 | ||||
$fsize = filesize($toFile); | $fsize = filesize($toFile); | ||||
$ddpicoks = explode('/', $ddpicok); | $ddpicoks = explode('/', $ddpicok); | ||||
$filename = $ddpicoks[count($ddpicoks) - 1]; | $filename = $ddpicoks[count($ddpicoks) - 1]; | ||||
$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) | ||||
VALUES ('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); | $dsql->ExecuteNoneQuery($inquery); | ||||
$fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
AddMyAddon($fid, $ddpicok); | AddMyAddon($fid, $ddpicok); | ||||
return $ddpicok; | return $ddpicok; | ||||
} | } | ||||
/** | /** | ||||
* 上传一个未经处理的图片 | * 上传一个未经处理的图片 | ||||
* | * | ||||
@@ -734,7 +689,6 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||||
$filename = ''; | $filename = ''; | ||||
$isrm_up = FALSE; | $isrm_up = FALSE; | ||||
$handurl = trim($handurl); | $handurl = trim($handurl); | ||||
//如果用户自行上传了图片 | //如果用户自行上传了图片 | ||||
if (!empty($_FILES[$upname]['tmp_name']) && is_uploaded_file($_FILES[$upname]['tmp_name'])) { | if (!empty($_FILES[$upname]['tmp_name']) && is_uploaded_file($_FILES[$upname]['tmp_name'])) { | ||||
$istype = 0; | $istype = 0; | ||||
@@ -744,40 +698,36 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||||
ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); | ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); | ||||
exit(); | 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)) { | if (!is_object($dsql)) { | ||||
$dsql = new DedeSql(); | $dsql = new DedeSql(); | ||||
} | } | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '$handurl' "); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '$handurl' "); | ||||
$fullUrl = preg_replace("#\.([a-z]*)$#i", "", $handurl); | $fullUrl = preg_replace("#\.([a-z]*)$#i", "", $handurl); | ||||
} else { | } else { | ||||
$savepath = $cfg_image_dir . '/' . strftime("%Y-%m", $ntime); | |||||
$savepath = $cfg_image_dir.'/'.strftime("%Y-%m", $ntime); | |||||
CreateDir($savepath); | 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") { | if (strtolower($_FILES[$upname]['type']) == "image/gif") { | ||||
$fullUrl = $fullUrl . ".gif"; | |||||
$fullUrl = $fullUrl.".gif"; | |||||
} else if (strtolower($_FILES[$upname]['type']) == "image/png") { | } else if (strtolower($_FILES[$upname]['type']) == "image/png") { | ||||
$fullUrl = $fullUrl . ".png"; | |||||
$fullUrl = $fullUrl.".png"; | |||||
} else { | } 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; | $filename = $fullUrl; | ||||
//水印 | //水印 | ||||
@WaterImg($cfg_basedir . $fullUrl, 'up'); | |||||
@WaterImg($cfg_basedir.$fullUrl, 'up'); | |||||
$isrm_up = TRUE; | $isrm_up = TRUE; | ||||
} | } | ||||
//远程或选择本地图片 | //远程或选择本地图片 | ||||
else { | else { | ||||
if ($handurl == '') { | if ($handurl == '') { | ||||
return ''; | return ''; | ||||
} | } | ||||
//远程图片并要求本地化 | //远程图片并要求本地化 | ||||
if ($isremote == 1 && preg_match("#^http[s]?:\/\/#i", $handurl)) { | if ($isremote == 1 && preg_match("#^http[s]?:\/\/#i", $handurl)) { | ||||
$ddinfos = GetRemoteImage($handurl, $cuserLogin->getUserID()); | $ddinfos = GetRemoteImage($handurl, $cuserLogin->getUserID()); | ||||
@@ -787,27 +737,23 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||||
$filename = $ddinfos[0]; | $filename = $ddinfos[0]; | ||||
} | } | ||||
$isrm_up = TRUE; | $isrm_up = TRUE; | ||||
//本地图片或远程不要求本地化 | //本地图片或远程不要求本地化 | ||||
} else { | } else { | ||||
$filename = $handurl; | $filename = $handurl; | ||||
} | } | ||||
} | } | ||||
$imgfile = $cfg_basedir . $filename; | |||||
$imgfile = $cfg_basedir.$filename; | |||||
if (is_file($imgfile) && $isrm_up && $filename != '') { | if (is_file($imgfile) && $isrm_up && $filename != '') { | ||||
$info = ""; | $info = ""; | ||||
$imginfos = GetImageSize($imgfile, $info); | $imginfos = GetImageSize($imgfile, $info); | ||||
//把新上传的图片信息保存到媒体文档管理档案中 | //把新上传的图片信息保存到媒体文档管理档案中 | ||||
$inquery = " | $inquery = " | ||||
INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | 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); | $dsql->ExecuteNoneQuery($inquery); | ||||
} | } | ||||
return $filename; | return $filename; | ||||
} | } | ||||
/** | /** | ||||
* 获取更新测试信息 | * 获取更新测试信息 | ||||
* | * | ||||
@@ -823,7 +769,7 @@ function GetUpdateTest() | |||||
if ($cfg_makeindex == 'Y') $dolist .= empty($dolist) ? 'makeindex' : ',makeindex'; | if ($cfg_makeindex == 'Y') $dolist .= empty($dolist) ? 'makeindex' : ',makeindex'; | ||||
if ($cfg_make_andcat == 'Y') $dolist .= empty($dolist) ? 'makeparenttype' : ',makeparenttype'; | if ($cfg_make_andcat == 'Y') $dolist .= empty($dolist) ? 'makeparenttype' : ',makeparenttype'; | ||||
$dolists = explode(',', $dolist); | $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 = "<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 .= "<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>"; | $revalue .= "</table>"; | ||||
@@ -96,14 +96,14 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) | |||||
$addfile = $row['url']; | $addfile = $row['url']; | ||||
$aid = $row['aid']; | $aid = $row['aid']; | ||||
$dsql->ExecuteNoneQuery("Delete From `#@__uploads` where aid = '$aid' "); | $dsql->ExecuteNoneQuery("Delete From `#@__uploads` where aid = '$aid' "); | ||||
$upfile = $cfg_basedir . $addfile; | |||||
$upfile = $cfg_basedir.$addfile; | |||||
if (@file_exists($upfile)) @unlink($upfile); | 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); | if (@is_file($filenameh)) @unlink($filenameh); | ||||
} | } | ||||
@@ -132,14 +132,14 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) | |||||
$arcRow['filename'] | $arcRow['filename'] | ||||
); | ); | ||||
if (!preg_match("#\?#", $arcurl)) { | 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)) { | if (file_exists($htmlfile) && !is_dir($htmlfile)) { | ||||
@unlink($htmlfile); | @unlink($htmlfile); | ||||
$arcurls = explode(".", $htmlfile); | $arcurls = explode(".", $htmlfile); | ||||
$sname = $arcurls[count($arcurls) - 1]; | $sname = $arcurls[count($arcurls) - 1]; | ||||
$fname = preg_replace("#(\.$sname)$#", "", $htmlfile); | $fname = preg_replace("#(\.$sname)$#", "", $htmlfile); | ||||
for ($i = 2; $i <= 100; $i++) { | for ($i = 2; $i <= 100; $i++) { | ||||
$htmlfile = $fname . "_{$i}." . $sname; | |||||
$htmlfile = $fname."_{$i}.".$sname; | |||||
if (@file_exists($htmlfile)) @unlink($htmlfile); | if (@file_exists($htmlfile)) @unlink($htmlfile); | ||||
else break; | else break; | ||||
} | } | ||||
@@ -33,8 +33,8 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||||
//当前选中的栏目 | //当前选中的栏目 | ||||
if ($selid > 0) { | if ($selid > 0) { | ||||
$row = $dsql->GetOne("SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id='$selid'"); | $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 = ''; | $topidstr = ''; | ||||
while ($row = $dsql->GetObject('qq')) { | while ($row = $dsql->GetObject('qq')) { | ||||
if ($row->reid == 0) continue; | 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 = explode(',', $admin_catalog); | ||||
$admin_catalogs = array_unique($admin_catalogs); | $admin_catalogs = array_unique($admin_catalogs); | ||||
$admin_catalog = join(',', $admin_catalogs); | $admin_catalog = join(',', $admin_catalogs); | ||||
@@ -68,17 +68,17 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||||
$sonCats = ''; | $sonCats = ''; | ||||
LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); | LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); | ||||
if ($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 ($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; | $OptionArrayList .= $sonCats; | ||||
} else { | } else { | ||||
if ($row->ispart == 0 && (!empty($channeltype) && $row->channeltype == $channeltype)) { | 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)) { | } 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) | function LogicGetOptionArray($id, $step, $channeltype, &$dsql, &$sonCats) | ||||
{ | { | ||||
global $OptionArrayList, $channels, $cfg_admin_channel, $admin_catalogs; | 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); | $dsql->Execute($id); | ||||
while ($row = $dsql->GetObject($id)) { | while ($row = $dsql->GetObject($id)) { | ||||
if ($cfg_admin_channel != 'all' && !in_array($row->id, $admin_catalogs)) { | if ($cfg_admin_channel != 'all' && !in_array($row->id, $admin_catalogs)) { | ||||
continue; | continue; | ||||
} | } | ||||
if ($row->channeltype == $channeltype && $row->ispart == 1) { | 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)) { | } 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 | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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 = array('title' => '', 'body' => '', 'source' => '', 'writer' => '', 'description' => '', 'keywords' => ''); | ||||
$redatas['source'] = preg_replace("/http:\/\//i", "", $gurl); | $redatas['source'] = preg_replace("/http:\/\//i", "", $gurl); | ||||
$redatas['source'] = preg_replace("/\/(.*)$/i", "", $redatas['source']); | $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 = ''; | $s = $e = ''; | ||||
if (is_array($row)) { | if (is_array($row)) { | ||||
list($s, $e) = explode('{@body}', $row['rule']); | list($s, $e) = explode('{@body}', $row['rule']); | ||||
@@ -1,5 +1,4 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 列表对应函数 | * 列表对应函数 | ||||
* | * | ||||
@@ -10,16 +9,15 @@ | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
if (!isset($registerGlobals)) { | if (!isset($registerGlobals)) { | ||||
require_once(dirname(__FILE__) . "/../../include/common.inc.php"); | |||||
require_once(dirname(__FILE__)."/../../include/common.inc.php"); | |||||
} | } | ||||
// 获取栏目名称 | // 获取栏目名称 | ||||
function GetTypename($tid) | function GetTypename($tid) | ||||
{ | { | ||||
global $dsql; | global $dsql; | ||||
if (empty($tid)) return ''; | 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; | global $cfg_Cs; | ||||
if (isset($cfg_Cs[$tid])) { | if (isset($cfg_Cs[$tid])) { | ||||
return base64_decode($cfg_Cs[$tid][3]); | return base64_decode($cfg_Cs[$tid][3]); | ||||
@@ -32,37 +30,29 @@ function GetTypename($tid) | |||||
} | } | ||||
return ''; | return ''; | ||||
} | } | ||||
//获得是否推荐的表述 | //获得是否推荐的表述 | ||||
$arcatts = array(); | $arcatts = array(); | ||||
$dsql->Execute('n', 'SELECT * FROM `#@__arcatt` '); | $dsql->Execute('n', 'SELECT * FROM `#@__arcatt` '); | ||||
while ($arr = $dsql->GetArray('n')) { | while ($arr = $dsql->GetArray('n')) { | ||||
$arcatts[$arr['att']] = $arr['attname']; | $arcatts[$arr['att']] = $arr['attname']; | ||||
} | } | ||||
function IsCommendArchives($iscommend) | function IsCommendArchives($iscommend) | ||||
{ | { | ||||
global $arcatts; | global $arcatts; | ||||
$sn = ''; | $sn = ''; | ||||
foreach ($arcatts as $k => $v) { | foreach ($arcatts as $k => $v) { | ||||
$v = cn_substr($v, 2); | $v = cn_substr($v, 2); | ||||
$sn .= (preg_match("#" . $k . "#", $iscommend) ? ' ' . $v : ''); | |||||
$sn .= (preg_match("#".$k."#", $iscommend) ? ' '.$v : ''); | |||||
} | } | ||||
$sn = trim($sn); | $sn = trim($sn); | ||||
if ($sn == '') return ''; | if ($sn == '') return ''; | ||||
else return "[<font color='red'>$sn</font>]"; | |||||
else return "<span style='color:#dc3545'>[$sn]</span>"; | |||||
} | } | ||||
//获得推荐的标题 | //获得推荐的标题 | ||||
function GetCommendTitle($title, $iscommend) | function GetCommendTitle($title, $iscommend) | ||||
{ | { | ||||
/*if(preg_match('#c#i',$iscommend)) | |||||
{ | |||||
$title = "$title<font color='red'>(推荐)</font>"; | |||||
}*/ | |||||
return $title; | return $title; | ||||
} | } | ||||
//更换颜色 | //更换颜色 | ||||
$GLOBALS['RndTrunID'] = 1; | $GLOBALS['RndTrunID'] = 1; | ||||
function GetColor($color1, $color2) | function GetColor($color1, $color2) | ||||
@@ -74,7 +64,6 @@ function GetColor($color1, $color2) | |||||
return $color2; | return $color2; | ||||
} | } | ||||
} | } | ||||
//检查图片是否存在 | //检查图片是否存在 | ||||
function CheckPic($picname) | function CheckPic($picname) | ||||
{ | { | ||||
@@ -84,7 +73,6 @@ function CheckPic($picname) | |||||
return "images/dfpic.gif"; | return "images/dfpic.gif"; | ||||
} | } | ||||
} | } | ||||
//判断内容是否生成HTML | //判断内容是否生成HTML | ||||
function IsHtmlArchives($ismake) | function IsHtmlArchives($ismake) | ||||
{ | { | ||||
@@ -93,10 +81,9 @@ function IsHtmlArchives($ismake) | |||||
} else if ($ismake == -1) { | } else if ($ismake == -1) { | ||||
return "仅动态"; | return "仅动态"; | ||||
} else { | } else { | ||||
return "<font color='red'>未生成</font>"; | |||||
return "<span style='color:#dc3545'>未生成</span>"; | |||||
} | } | ||||
} | } | ||||
//获得内容的限定级别名称 | //获得内容的限定级别名称 | ||||
function GetRankName($arcrank) | function GetRankName($arcrank) | ||||
{ | { | ||||
@@ -114,12 +101,11 @@ function GetRankName($arcrank) | |||||
return "不限"; | return "不限"; | ||||
} | } | ||||
} | } | ||||
//判断内容是否为图片文章 | //判断内容是否为图片文章 | ||||
function IsPicArchives($picname) | function IsPicArchives($picname) | ||||
{ | { | ||||
if ($picname != '') { | if ($picname != '') { | ||||
return '<font color=\'red\'>(图)</font>'; | |||||
return "<span style='color:#dc3545'>[图]</span>"; | |||||
} else { | } else { | ||||
return ''; | return ''; | ||||
} | } |
@@ -1,5 +1,4 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 后台管理菜单项 | * 后台管理菜单项 | ||||
* | * | ||||
@@ -9,11 +8,9 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/../config.php"); | |||||
require_once(dirname(__FILE__)."/../config.php"); | |||||
//载入可发布频道 | //载入可发布频道 | ||||
$addset = ''; | $addset = ''; | ||||
//检测可用的内容模型 | //检测可用的内容模型 | ||||
if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { | if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { | ||||
$admin_catalog = join(',', $admin_catalogs); | $admin_catalog = join(',', $admin_catalogs); | ||||
@@ -24,17 +21,16 @@ if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { | |||||
$dsql->Execute(); | $dsql->Execute(); | ||||
$candoChannel = ''; | $candoChannel = ''; | ||||
while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
$candoChannel .= ($candoChannel == '' ? $row->channeltype : ',' . $row->channeltype); | |||||
$candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); | |||||
} | } | ||||
if (empty($candoChannel)) $candoChannel = 1; | 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->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'); | $dsql->Execute('mm'); | ||||
while ($row = $dsql->GetObject('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; | $dedebizUrl = DEDEBIZURL; | ||||
$adminMenu1 = $adminMenu2 = ''; | $adminMenu1 = $adminMenu2 = ''; | ||||
if ($cuserLogin->getUserType() >= 10) { | if ($cuserLogin->getUserType() >= 10) { | ||||
@@ -44,8 +40,7 @@ if ($cuserLogin->getUserType() >= 10) { | |||||
<m:item name='联动类别管理' link='stepselect_main.php' rank='c_Stepseclect' 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='freelist_main.php' rank='c_List' target='main' /> | ||||
<m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> | <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> | ||||
</m:top> | |||||
"; | |||||
</m:top>"; | |||||
$adminMenu2 = "<m:top item='7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> | $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_main.php' rank='temp_All' target='main'/> | ||||
<m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> | <m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> | ||||
@@ -53,7 +48,6 @@ if ($cuserLogin->getUserType() >= 10) { | |||||
<m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' 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='tag_test.php' rank='temp_Test' target='main'/> | ||||
</m:top> | </m:top> | ||||
<m:top item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> | <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_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_admin_user.php' rank='sys_User' target='main' /> | ||||
@@ -64,12 +58,11 @@ if ($cuserLogin->getUserType() >= 10) { | |||||
<m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' 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_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='article_template_rand.php' rank='sys_StringMix' target='main' /> | ||||
<m:item name='数据库备份/还原' link='sys_data.php' rank='sys_Data' 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='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_safetest.php' rank='sys_verify' target='main' /> | |||||
<m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> | |||||
</m:top> | </m:top> | ||||
<m:top item='10_6_' name='支付工具' display='none' rank='sys_Data'> | <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_type.php' rank='sys_Data' target='main' /> | ||||
<m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> | <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> | ||||
@@ -78,75 +71,59 @@ if ($cuserLogin->getUserType() >= 10) { | |||||
<m:item name='商店订单记录' link='shops_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='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='shops_delivery.php' rank='sys_Data' target='main' /> | ||||
</m:top> | |||||
"; | |||||
</m:top>"; | |||||
} | } | ||||
$menusMain = " | |||||
----------------------------------------------- | |||||
<m:top item='1_' name='常用操作' display='block'> | |||||
$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='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' 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?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='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='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: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> | ||||
<m:top item='1_' name='内容管理' display='block'> | <m:top item='1_' name='内容管理' display='block'> | ||||
$addset | $addset | ||||
<m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> | <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> | ||||
<m:top item='1_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> | <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_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' 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_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> | ||||
</m:top> | </m:top> | ||||
$adminMenu1 | $adminMenu1 | ||||
<m:top item='1_3_3' name='批量维护' display='block'> | <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='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='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='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_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_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='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='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_data_replace.php' rank='sys_ArcBatch' target='main' /> | ||||
</m:top> | </m:top> | ||||
<m:top item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> | <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='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='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> | ||||
</m:top> | </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: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_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: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> | ||||
<m:top item='6_' name='会员管理' display='none' rank='member_List,member_Type'> | <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_main.php' rank='member_List' target='main' /> | ||||
<m:item name='会员级别设置' link='member_rank.php' rank='member_Type' 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_scores.php' rank='member_Type' target='main' /> | ||||
<m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> | <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> | ||||
</m:top> | </m:top> | ||||
$adminMenu2 | $adminMenu2 | ||||
<m:top item='1_10_7_' name='系统帮助' display='none'> | <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_helpUrl' rank='' target='_blank' /> | ||||
<m:item name='代码托管' link='$cfg_biz_gitUrl' rank='' target='_blank' /> | <m:item name='代码托管' link='$cfg_biz_gitUrl' rank='' target='_blank' /> | ||||
<m:item name='商业支持' link='$cfg_biz_dedebizUrl' rank='' target='_blank' /> | <m:item name='商业支持' link='$cfg_biz_dedebizUrl' rank='' target='_blank' /> | ||||
</m:top> | |||||
----------------------------------------------- | |||||
"; | |||||
</m:top>"; |
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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> | $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~'> | <dd style='display:~display~' class='sitem' id='items~cc~'> | ||||
@@ -38,26 +38,26 @@ function GetMenus($userrank, $topos = 'main') | |||||
$m = 0; | $m = 0; | ||||
foreach ($dtp->CTags as $i => $ctag) { | foreach ($dtp->CTags as $i => $ctag) { | ||||
if ($ctag->GetName() == 'top' && ($ctag->GetAtt('rank') == '' || TestPurview($ctag->GetAtt('rank')))) { | 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++; | $m++; | ||||
echo "<!-- Item " . ($m + 1) . " Strat -->\r\n"; | |||||
echo "<!-- Item ".($m + 1)." Strat -->\r\n"; | |||||
$htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet); | $htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet); | ||||
if (empty($openitem) || $openitem == 100) { | if (empty($openitem) || $openitem == 100) { | ||||
if ($ctag->GetAtt('notshowall') == '1') continue; | if ($ctag->GetAtt('notshowall') == '1') continue; | ||||
$htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp); | $htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp); | ||||
} else { | } 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); | $htmp = str_replace('~display~', 'block', $htmp); | ||||
else | else | ||||
$htmp = str_replace('~display~', 'none', $htmp); | $htmp = str_replace('~display~', 'none', $htmp); | ||||
} | } | ||||
$htmp = str_replace('~cc~', $m . '_' . $openitem, $htmp); | |||||
$htmp = str_replace('~cc~', $m.'_'.$openitem, $htmp); | |||||
echo $htmp; | echo $htmp; | ||||
$dtp2->LoadSource($ctag->InnerText); | $dtp2->LoadSource($ctag->InnerText); | ||||
foreach ($dtp2->CTags as $j => $ctag2) { | foreach ($dtp2->CTags as $j => $ctag2) { | ||||
$ischannel = trim($ctag2->GetAtt('ischannel')); | $ischannel = trim($ctag2->GetAtt('ischannel')); | ||||
if ($ctag2->GetName() == 'item' && ($ctag2->GetAtt('rank') == '' || TestPurview($ctag2->GetAtt('rank')))) { | 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 ($ischannel == '1') { | ||||
if ($ctag2->GetAtt('addalt') != '') { | if ($ctag2->GetAtt('addalt') != '') { | ||||
$addalt = $ctag2->GetAtt('addalt'); | $addalt = $ctag2->GetAtt('addalt'); | ||||
@@ -75,7 +75,7 @@ function GetMenus($userrank, $topos = 'main') | |||||
$link = " <div class='items'> | $link = " <div class='items'> | ||||
<div class='fllct'>$link</div>\r\n | <div class='fllct'>$link</div>\r\n | ||||
<div class='flrct'> | <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> | ||||
</div>\r\n"; | </div>\r\n"; | ||||
} else { | } else { | ||||
@@ -86,7 +86,7 @@ function GetMenus($userrank, $topos = 'main') | |||||
} | } | ||||
} | } | ||||
echo $footTemplet; | echo $footTemplet; | ||||
echo "<!-- Item " . ($m + 1) . " End -->\r\n"; | |||||
echo "<!-- Item ".($m + 1)." End -->\r\n"; | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -1,5 +1,4 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 菜单地图 | * 菜单地图 | ||||
* | * | ||||
@@ -9,13 +8,10 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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 => '基本模块插件'); | $maparray = array(1 => '文档相关', 2 => '系统设置', 3 => '必须辅助功能', 4 => '网站更新操作', 5 => '会员相关', 6 => '基本模块插件'); | ||||
//载入可发布频道 | //载入可发布频道 | ||||
$addset = ''; | $addset = ''; | ||||
//检测可用的内容模型 | //检测可用的内容模型 | ||||
if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { | if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { | ||||
$admin_catalog = join(',', $admin_catalogs); | $admin_catalog = join(',', $admin_catalogs); | ||||
@@ -26,32 +22,26 @@ if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { | |||||
$dsql->Execute(); | $dsql->Execute(); | ||||
$candoChannel = ''; | $candoChannel = ''; | ||||
while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
$candoChannel .= ($candoChannel == '' ? $row->channeltype : ',' . $row->channeltype); | |||||
$candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); | |||||
} | } | ||||
if (empty($candoChannel)) $candoChannel = 1; | 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->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($row = $dsql->GetObject()) { | 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'> | |||||
$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='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' 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?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='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='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: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> | ||||
<m:top mapitem='1' item='1_' name='内容管理' display='block'> | <m:top mapitem='1' item='1_' name='内容管理' display='block'> | ||||
$addset | $addset | ||||
<m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> | <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> | ||||
<m:top mapitem='1' item='1_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'> | <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='mychannel_main.php' rank='c_List' target='main' /> | ||||
<m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> | <m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> | ||||
@@ -59,45 +49,40 @@ $menusMain = " | |||||
<m:item name='自由列表管理' link='freelist_main.php' rank='c_List' 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='diy_main.php' rank='c_List' target='main' /> | ||||
</m:top> | </m:top> | ||||
<m:top mapitem='3' item='1_3_3' name='批量维护' display='block'> | <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='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='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='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_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='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='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_data_replace.php' rank='sys_ArcBatch' target='main' /> | ||||
</m:top> | </m:top> | ||||
<m:top mapitem='4' item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> | <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='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='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> | ||||
</m:top> | </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: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_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='更新订阅' 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> | ||||
<m:top mapitem='3' item='1_6_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> | <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_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' 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_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> | ||||
</m:top> | </m:top> | ||||
<m:top mapitem='5' item='6_' name='会员管理' display='none' rank='member_List,member_Type'> | <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_main.php' rank='member_List' target='main' /> | ||||
<m:item name='会员级别设置' link='member_rank.php' rank='member_Type' 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_scores.php' rank='member_Type' target='main' /> | ||||
<m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> | <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> | ||||
</m:top> | </m:top> | ||||
<m:top mapitem='2' item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> | <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_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_admin_user.php' rank='sys_User' target='main' /> | ||||
@@ -108,12 +93,11 @@ $menusMain = " | |||||
<m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' 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_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='article_template_rand.php' rank='sys_StringMix' target='main' /> | ||||
<m:item name='数据库备份/还原' link='sys_data.php' rank='sys_Data' 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='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_safetest.php' rank='sys_verify' target='main' /> | |||||
<m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> | |||||
</m:top> | </m:top> | ||||
<m:top mapitem='5' item='10_6_' name='支付工具' display='none' rank='sys_Data'> | <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_type.php' rank='sys_Data' target='main' /> | ||||
<m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> | <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> | ||||
@@ -123,43 +107,34 @@ $menusMain = " | |||||
<m:item name='支付接口设置' link='sys_payment.php' .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='shops_delivery.php' rank='sys_Data' target='main' /> | ||||
</m:top> | </m:top> | ||||
<m:top mapitem='2' item='10_7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> | <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_main.php' rank='temp_All' target='main'/> | ||||
<m:item name='标签源码管理' link='templets_tagsource.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_main.php' rank='temp_MyTag' target='main'/> | ||||
<m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' 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='tag_test.php' rank='temp_Test' target='main'/> | ||||
</m:top> | |||||
"; | |||||
</m:top>"; | |||||
//载入插件菜单 | //载入插件菜单 | ||||
$plusset = ''; | $plusset = ''; | ||||
$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); | $dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
$plusset .= $row->menustring . "\r\n"; | |||||
$plusset .= $row->menustring."\r\n"; | |||||
} | } | ||||
$menusMain .= " | $menusMain .= " | ||||
<m:top mapitem='6' name='模块管理' c='6,' display='block'> | <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_main.php' rank='sys_module' target='main' /> | ||||
<m:item name='上传新模块' link='module_upload.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_make.php' rank='sys_module' target='main' /> | ||||
</m:top> | </m:top> | ||||
<m:top mapitem='6' item='7' name='辅助插件' display='block'> | <m:top mapitem='6' item='7' name='辅助插件' display='block'> | ||||
<m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> | <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> | ||||
$plusset | $plusset | ||||
</m:top> | |||||
"; | |||||
</m:top>"; | |||||
$mapstring = ''; | $mapstring = ''; | ||||
$dtp = new DedeTagparse(); | $dtp = new DedeTagparse(); | ||||
$dtp->SetNameSpace('m', '<', '>'); | $dtp->SetNameSpace('m', '<', '>'); | ||||
$dtp->LoadString($menusMain); | $dtp->LoadString($menusMain); | ||||
foreach ($maparray as $k => $bigname) { | foreach ($maparray as $k => $bigname) { | ||||
$mapstring .= "<dl class='maptop'>\r\n"; | $mapstring .= "<dl class='maptop'>\r\n"; | ||||
$mapstring .= "<dt class='bigitem'>$bigname</dt>\r\n"; | $mapstring .= "<dt class='bigitem'>$bigname</dt>\r\n"; | ||||
@@ -167,13 +142,13 @@ foreach ($maparray as $k => $bigname) { | |||||
foreach ($dtp->CTags as $ctag) { | foreach ($dtp->CTags as $ctag) { | ||||
if ($ctag->GetAtt('mapitem') == $k) { | if ($ctag->GetAtt('mapitem') == $k) { | ||||
$mapstring .= "<dl class='mapitem'>\r\n"; | $mapstring .= "<dl class='mapitem'>\r\n"; | ||||
$mapstring .= "<dt>" . $ctag->GetAtt('name') . "</dt>\r\n"; | |||||
$mapstring .= "<dt>".$ctag->GetAtt('name')."</dt>\r\n"; | |||||
$mapstring .= "<dd>\r\n<ul class='item'>\r\n"; | $mapstring .= "<dd>\r\n<ul class='item'>\r\n"; | ||||
$dtp2 = new DedeTagParse(); | $dtp2 = new DedeTagParse(); | ||||
$dtp2->SetNameSpace('m', '<', '>'); | $dtp2->SetNameSpace('m', '<', '>'); | ||||
$dtp2->LoadSource($ctag->InnerText); | $dtp2->LoadSource($ctag->InnerText); | ||||
foreach ($dtp2->CTags as $j => $ctag2) { | 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 .= "<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 .= "</ul>\r\n</dd>\r\n</dl>\r\n"; | ||||
} | } | ||||
@@ -1,5 +1,4 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 模块菜单 | * 模块菜单 | ||||
* | * | ||||
@@ -9,8 +8,7 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . "/../config.php"); | |||||
require_once(dirname(__FILE__)."/../config.php"); | |||||
/* | /* | ||||
模块菜单一般在不要直接改此文件,直接保存在#@__sys_module表即可,格式为 | 模块菜单一般在不要直接改此文件,直接保存在#@__sys_module表即可,格式为 | ||||
<m:top name='问答模块管理' c='6,' display='block' rank=''> | <m:top name='问答模块管理' c='6,' display='block' rank=''> | ||||
@@ -20,24 +18,21 @@ require_once(dirname(__FILE__) . "/../config.php"); | |||||
</m:top> | </m:top> | ||||
这个菜单可在生成模块时指定 | 这个菜单可在生成模块时指定 | ||||
*/ | */ | ||||
//载入模块菜单 | //载入模块菜单 | ||||
$moduleset = ''; | $moduleset = ''; | ||||
$dsql->SetQuery("SELECT * FROM `#@__sys_module` ORDER BY id DESC"); | $dsql->SetQuery("SELECT * FROM `#@__sys_module` ORDER BY id DESC"); | ||||
$dsql->Execute('mm'); | $dsql->Execute('mm'); | ||||
while ($row = $dsql->GetObject('mm')) { | while ($row = $dsql->GetObject('mm')) { | ||||
$moduleset .= $row->menustring . "\r\n"; | |||||
$moduleset .= $row->menustring."\r\n"; | |||||
} | } | ||||
//载入插件菜单 | //载入插件菜单 | ||||
$plusset = ''; | $plusset = ''; | ||||
$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); | $dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
$row->menustring = str_replace('plus_友情链接', 'plus_友情链接模块', $row->menustring); | $row->menustring = str_replace('plus_友情链接', 'plus_友情链接模块', $row->menustring); | ||||
$plusset .= $row->menustring . "\r\n"; | |||||
$plusset .= $row->menustring."\r\n"; | |||||
} | } | ||||
$adminMenu = ''; | $adminMenu = ''; | ||||
if ($cuserLogin->getUserType() >= 10) { | if ($cuserLogin->getUserType() >= 10) { | ||||
$adminMenu = "<m:top name='模块管理' c='6,' display='block'> | $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:item name='模块打包' link='module_make.php' rank='sys_module' target='main' /> | ||||
</m:top>"; | </m:top>"; | ||||
} | } | ||||
$menusMoudle = " | $menusMoudle = " | ||||
----------------------------------------------- | |||||
$adminMenu | $adminMenu | ||||
<m:top item='7' name='辅助插件' display='block'> | <m:top item='7' name='辅助插件' display='block'> | ||||
<m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> | <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> | ||||
$plusset | $plusset | ||||
</m:top> | </m:top> | ||||
$moduleset | $moduleset | ||||
----------------------------------------------- | |||||
"; | "; |
@@ -13,18 +13,18 @@ | |||||
if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { | if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { | ||||
if ($_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME'])) { | if ($_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME'])) { | ||||
header('HTTP/1.1 301 Moved Permanently'); | 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; | 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(); | exit(); |
@@ -1,5 +1,4 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 管理后台首页主体 | * 管理后台首页主体 | ||||
* | * | ||||
@@ -9,23 +8,22 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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 (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; | ||||
//默认主页 | //默认主页 | ||||
if (empty($dopost)) { | 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'); | $fp = fopen($verLockFile, 'r'); | ||||
$upTime = trim(fread($fp, 64)); | $upTime = trim(fread($fp, 64)); | ||||
fclose($fp); | 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(); | $offUrl = SpGetNewInfo(); | ||||
$dedecmsidc = DEDEDATA . '/admin/idc.txt'; | |||||
$dedecmsidc = DEDEDATA.'/admin/idc.txt'; | |||||
$fp = fopen($dedecmsidc, 'r'); | $fp = fopen($dedecmsidc, 'r'); | ||||
$dedeIDC = fread($fp, filesize($dedecmsidc)); | $dedeIDC = fread($fp, filesize($dedecmsidc)); | ||||
fclose($fp); | fclose($fp); | ||||
@@ -35,51 +33,48 @@ if (empty($dopost)) { | |||||
/*----------------------- | /*----------------------- | ||||
增加新项 | 增加新项 | ||||
function _AddNew() { } | function _AddNew() { } | ||||
-------------------------*/ else if ($dopost == 'addnew') { | |||||
-------------------------*/ | |||||
else if ($dopost == 'addnew') { | |||||
if (empty($link) || empty($title)) { | if (empty($link) || empty($title)) { | ||||
ShowMsg("链接网址或标题不能为空!", "-1"); | |||||
ShowMsg("链接网址或标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$fp = fopen($myIcoFile, 'r'); | $fp = fopen($myIcoFile, 'r'); | ||||
$oldct = trim(fread($fp, filesize($myIcoFile))); | $oldct = trim(fread($fp, filesize($myIcoFile))); | ||||
fclose($fp); | fclose($fp); | ||||
$link = preg_replace("#['\"]#", '`', $link); | $link = preg_replace("#['\"]#", '`', $link); | ||||
$title = preg_replace("#['\"]#", '`', $title); | $title = preg_replace("#['\"]#", '`', $title); | ||||
$ico = preg_replace("#['\"]#", '`', $ico); | $ico = preg_replace("#['\"]#", '`', $ico); | ||||
$oldct .= "\r\n<menu:item ico=\"{$ico}\" link=\"{$link}\" title=\"{$title}\" />"; | |||||
$myIcoFileTrue = DEDEDATA . '/admin/quickmenu-' . $cuserLogin->getUserID() . '.txt'; | |||||
$oldct .= "\r\n<menu:item ico=\"{$ico}\" link=\"{$link}\" title=\"{$title}\">"; | |||||
$myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; | |||||
$fp = fopen($myIcoFileTrue, 'w'); | $fp = fopen($myIcoFileTrue, 'w'); | ||||
fwrite($fp, $oldct); | fwrite($fp, $oldct); | ||||
fclose($fp); | fclose($fp); | ||||
ShowMsg("成功增加一个项目!", "index_body.php?" . time()); | |||||
ShowMsg("成功增加一个项目", "index_body.php?".time()); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*--------------------------- | /*--------------------------- | ||||
保存修改的项 | 保存修改的项 | ||||
function _EditSave() { } | function _EditSave() { } | ||||
----------------------------*/ else if ($dopost == 'editsave') { | |||||
----------------------------*/ | |||||
else if ($dopost == 'editsave') { | |||||
$quickmenu = stripslashes($quickmenu); | $quickmenu = stripslashes($quickmenu); | ||||
$myIcoFileTrue = DEDEDATA . '/admin/quickmenu-' . $cuserLogin->getUserID() . '.txt'; | |||||
$myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; | |||||
$fp = fopen($myIcoFileTrue, 'w'); | $fp = fopen($myIcoFileTrue, 'w'); | ||||
fwrite($fp, $quickmenu); | fwrite($fp, $quickmenu); | ||||
fclose($fp); | fclose($fp); | ||||
ShowMsg("成功修改快捷操作项目!", "index_body.php?" . time()); | |||||
ShowMsg("成功修改快捷操作项目", "index_body.php?".time()); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*--------------------------- | /*--------------------------- | ||||
保存修改的项 | 保存修改的项 | ||||
function _EditSave() { } | function _EditSave() { } | ||||
----------------------------*/ else if ($dopost == 'movesave') { | |||||
----------------------------*/ | |||||
else if ($dopost == 'movesave') { | |||||
$movedata = str_replace('\\', "", $sortorder); | $movedata = str_replace('\\', "", $sortorder); | ||||
$movedata = json_decode($movedata, TRUE); | $movedata = json_decode($movedata, TRUE); | ||||
$movedata = serialize($movedata); | $movedata = serialize($movedata); | ||||
$myIcoFileTrue = DEDEDATA . '/admin/move-' . $cuserLogin->getUserID() . '.txt'; | |||||
$myIcoFileTrue = DEDEDATA.'/admin/move-'.$cuserLogin->getUserID().'.txt'; | |||||
$fp = fopen($myIcoFileTrue, 'w'); | $fp = fopen($myIcoFileTrue, 'w'); | ||||
fwrite($fp, $movedata); | fwrite($fp, $movedata); | ||||
fclose($fp); | fclose($fp); | ||||
@@ -87,19 +82,20 @@ function _EditSave() { } | |||||
/*----------------------------- | /*----------------------------- | ||||
显示修改表单 | 显示修改表单 | ||||
function _EditShow() { } | function _EditShow() { } | ||||
-----------------------------*/ else if ($dopost == 'editshow') { | |||||
-----------------------------*/ | |||||
else if ($dopost == 'editshow') { | |||||
$fp = fopen($myIcoFile, 'r'); | $fp = fopen($myIcoFile, 'r'); | ||||
$oldct = trim(fread($fp, filesize($myIcoFile))); | $oldct = trim(fread($fp, filesize($myIcoFile))); | ||||
fclose($fp); | fclose($fp); | ||||
?> | ?> | ||||
<form name='editform' action='index_body.php' method='post'> | <form name='editform' action='index_body.php' method='post'> | ||||
<input type='hidden' name='dopost' value='editsave' /> | |||||
<input type='hidden' name='dopost' value='editsave'> | |||||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | <table width="100%" border="0" cellspacing="0" cellpadding="0"> | ||||
<tr> | <tr> | ||||
<td height='28' background="images/tbg.gif"> | <td height='28' background="images/tbg.gif"> | ||||
<div style='float:left'><b>修改快捷操作项</b></div> | <div style='float:left'><b>修改快捷操作项</b></div> | ||||
<div style='float:right;padding:3px 10px 0 0;'> | <div style='float:right;padding:3px 10px 0 0;'> | ||||
<a href="javascript:CloseTab('editTab')"><img src="images/close.gif" width="12" height="12" border="0" /></a> | |||||
<a href="javascript:CloseTab('editTab')"><img src="images/close.gif" width="12" height="12" border="0"></a> | |||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
@@ -107,43 +103,37 @@ function _EditShow() { } | |||||
<td style="height:6px;font-size:1px;border-top:1px solid #8DA659"> </td> | <td style="height:6px;font-size:1px;border-top:1px solid #8DA659"> </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td> | |||||
按原格式修改/增加XML项。 | |||||
</td> | |||||
<td>按原格式修改/增加XML项。</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td align='center'> | |||||
<textarea name="quickmenu" rows="10" cols="50" style="width:94%;height:220px"><?php echo $oldct; ?></textarea> | |||||
</td> | |||||
<td align='center'><textarea name="quickmenu" rows="10" cols="50" style="width:94%;height:220px"><?php echo $oldct; ?></textarea></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td height="45" align="center"> | |||||
<input type="submit" name="Submit" value="保存项目" class="np coolbg" style="width:80px;cursor:pointer" /> | |||||
| |||||
<input type="reset" name="reset" value="重设" class="np coolbg" style="width:50px;cursor:pointer" /> | |||||
<td height="46" align="center"> | |||||
<input type="submit" name="Submit" value="保存项目" class="np coolbg" style="width:80px;cursor:pointer"> | |||||
<input type="reset" name="reset" value="重设" class="np coolbg" style="width:50px;cursor:pointer"> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
</form> | </form> | ||||
<?php | <?php | ||||
exit(); | |||||
exit(); | |||||
} | } | ||||
/*--------------------------------- | /*--------------------------------- | ||||
载入右边内容 | 载入右边内容 | ||||
function _getRightSide() { } | function _getRightSide() { } | ||||
---------------------------------*/ else if ($dopost == 'getRightSide') { | |||||
---------------------------------*/ | |||||
else if ($dopost == 'getRightSide') { | |||||
$query = " SELECT COUNT(*) AS dd FROM `#@__member` "; | $query = " SELECT COUNT(*) AS dd FROM `#@__member` "; | ||||
$row1 = $dsql->GetOne($query); | $row1 = $dsql->GetOne($query); | ||||
$query = " SELECT COUNT(*) AS dd FROM `#@__feedback` "; | $query = " SELECT COUNT(*) AS dd FROM `#@__feedback` "; | ||||
$row2 = $dsql->GetOne($query); | $row2 = $dsql->GetOne($query); | ||||
$chArrNames = array(); | $chArrNames = array(); | ||||
$query = "SELECT id, typename FROM `#@__channeltype` "; | $query = "SELECT id, typename FROM `#@__channeltype` "; | ||||
$dsql->Execute('c', $query); | $dsql->Execute('c', $query); | ||||
while ($row = $dsql->GetArray('c')) { | while ($row = $dsql->GetArray('c')) { | ||||
$chArrNames[$row['id']] = $row['typename']; | $chArrNames[$row['id']] = $row['typename']; | ||||
} | } | ||||
$query = "SELECT COUNT(channel) AS dd, channel FROM `#@__arctiny` GROUP BY channel "; | $query = "SELECT COUNT(channel) AS dd, channel FROM `#@__arctiny` GROUP BY channel "; | ||||
$allArc = 0; | $allArc = 0; | ||||
$chArr = array(); | $chArr = array(); | ||||
@@ -179,7 +169,7 @@ function _getRightSide() { } | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<?php | <?php | ||||
exit(); | |||||
exit(); | |||||
} else if ($dopost == 'getRightSideNews') { | } else if ($dopost == 'getRightSideNews') { | ||||
$query = "SELECT arc.id, arc.arcrank, arc.title, arc.channel, ch.editcon FROM `#@__archives` arc | $query = "SELECT arc.id, arc.arcrank, arc.title, arc.channel, ch.editcon FROM `#@__archives` arc | ||||
LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel | LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel | ||||
@@ -201,45 +191,40 @@ function _getRightSide() { } | |||||
if ($row['arcrank'] == -1) $linkstr .= "<font color='red'>(未审核)</font>"; | if ($row['arcrank'] == -1) $linkstr .= "<font color='red'>(未审核)</font>"; | ||||
?> | ?> | ||||
<tr> | <tr> | ||||
<td class='nline'> | |||||
<?php echo $linkstr; ?> | |||||
</td> | |||||
<td class='nline'><?php echo $linkstr; ?></td> | |||||
</tr> | </tr> | ||||
<?php | <?php | ||||
} | } | ||||
?> | ?> | ||||
</table> | </table> | ||||
<?php | <?php | ||||
exit; | |||||
exit; | |||||
} else if ($dopost == 'setskin') { | } else if ($dopost == 'setskin') { | ||||
$cskin = empty($cskin) ? 1 : $cskin; | $cskin = empty($cskin) ? 1 : $cskin; | ||||
$skin = !in_array($cskin, array(1, 2, 3, 4)) ? 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); | PutFile($skinconfig, $skin); | ||||
} elseif ($dopost == 'get_seo') { | } elseif ($dopost == 'get_seo') { | ||||
// 直接采用DedeBIZ重写方法 | |||||
//直接采用DedeBIZ重写方法 | |||||
exit; | exit; | ||||
} elseif ($dopost == "system_info") { | } elseif ($dopost == "system_info") { | ||||
if (!extension_loaded("openssl")) { | if (!extension_loaded("openssl")) { | ||||
echo json_encode(array( | echo json_encode(array( | ||||
"code" => -1001, | "code" => -1001, | ||||
"msg" => "PHP不支持OpenSSL,无法完成Dede商业授权", | |||||
"msg" => "PHP不支持OpenSSL,无法完成商业版授权", | |||||
"result" => null, | "result" => null, | ||||
)); | )); | ||||
exit; | exit; | ||||
} | } | ||||
if (empty($cfg_auth_code)) { | if (empty($cfg_auth_code)) { | ||||
echo json_encode(array( | echo json_encode(array( | ||||
"code" => -1002, | "code" => -1002, | ||||
"msg" => "当前站点尚未购买Dede商业授权", | |||||
"msg" => "当前站点尚未购买商业版授权", | |||||
"result" => null, | "result" => null, | ||||
)); | )); | ||||
exit; | exit; | ||||
} | } | ||||
openssl_public_decrypt(base64_decode($cfg_auth_code), $decotent, DEDEPUB); | openssl_public_decrypt(base64_decode($cfg_auth_code), $decotent, DEDEPUB); | ||||
$core_info = new stdClass; | $core_info = new stdClass; | ||||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | ||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | ||||
@@ -248,7 +233,6 @@ function _getRightSide() { } | |||||
$core_info = $client->SystemInfo(); | $core_info = $client->SystemInfo(); | ||||
$client->Close(); | $client->Close(); | ||||
} | } | ||||
if (!empty($decotent)) { | if (!empty($decotent)) { | ||||
$res = json_decode($decotent); | $res = json_decode($decotent); | ||||
if (isset($res->sid)) { | if (isset($res->sid)) { | ||||
@@ -9,8 +9,8 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @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); | $openitem = (empty($openitem) ? 1 : $openitem); | ||||
include DedeInclude('templets/index_menu2.htm'); | include DedeInclude('templets/index_menu2.htm'); |
@@ -9,17 +9,17 @@ | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__) . '/config.php'); | |||||
require_once(dirname(__FILE__).'/config.php'); | |||||
AjaxHead(); | AjaxHead(); | ||||
if ($openitem != 100) { | 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'); | GetMenus($cuserLogin->getUserRank(), 'main'); | ||||
exit(); | exit(); | ||||
} else { | } else { | ||||
$openitem = 0; | $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'); | GetMenus($cuserLogin->getUserRank(), 'module'); | ||||
exit(); | exit(); | ||||
} | } |