@@ -6,13 +6,13 @@ $safequestions[0] = '没安全提示问题'; | |||
//下面的设置可以手工修改 | |||
//start**************************** | |||
$safequestions[1] = '你最喜欢的格言什么?'; | |||
$safequestions[2] = '你家乡的名称是什么?'; | |||
$safequestions[3] = '你读的小学叫什么?'; | |||
$safequestions[4] = '你的父亲叫什么名字?'; | |||
$safequestions[5] = '你的母亲叫什么名字?'; | |||
$safequestions[6] = '你最喜欢的偶像是谁?'; | |||
$safequestions[7] = '你最喜欢的歌曲是什么?'; | |||
$safequestions[1] = '您最喜欢的格言什么?'; | |||
$safequestions[2] = '您家乡的名称是什么?'; | |||
$safequestions[3] = '您读的小学叫什么?'; | |||
$safequestions[4] = '您的父亲叫什么名字?'; | |||
$safequestions[5] = '您的母亲叫什么名字?'; | |||
$safequestions[6] = '您最喜欢的偶像是谁?'; | |||
$safequestions[7] = '您最喜欢的歌曲是什么?'; | |||
//end**************************** | |||
@@ -1 +1 @@ | |||
document.write("<table width='100%' border='0' cellspacing='1' cellpadding='1' id='voteitem'> <form name='voteform' method='post' action='\/plus\/vote.php' target='_blank'> <input type='hidden' name='dopost' value='send' \/> <input type='hidden' name='aid' value='1' \/> <input type='hidden' name='ismore' value='0' \/> <tr align='center'><td height='30' id='votetitle' style='border-bottom:1px dashed #999999;color:#3F7652' ><strong>你是从哪儿得知本站的?<\/strong><\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='1' \/>朋友介绍<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='2' \/>门户网站的搜索引擎<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='3' \/>Google或百度搜索<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='4' \/>别的网站上的链接<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='5' \/>其它途径<\/td><\/tr> <tr><td height='30'> <input type='submit' class='btn-1' name='vbt1' value='投票' \/> <input type='button' class='btn-1' name='vbt2' value='查看结果' onClick=window.open('\/plus\/vote.php?dopost=view&aid=1'); \/><\/td><\/tr> <\/form> <\/table> "); | |||
document.write("<table width='100%' border='0' cellspacing='1' cellpadding='1' id='voteitem'> <form name='voteform' method='post' action='\/plus\/vote.php' target='_blank'> <input type='hidden' name='dopost' value='send' \/> <input type='hidden' name='aid' value='1' \/> <input type='hidden' name='ismore' value='0' \/> <tr align='center'><td height='30' id='votetitle' style='border-bottom:1px dashed #999999;color:#3F7652' ><strong>您是从哪儿得知本站的?<\/strong><\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='1' \/>朋友介绍<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='2' \/>门户网站的搜索引擎<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='3' \/>Google或百度搜索<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='4' \/>别的网站上的链接<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='5' \/>其它途径<\/td><\/tr> <tr><td height='30'> <input type='submit' class='btn-1' name='vbt1' value='投票' \/> <input type='button' class='btn-1' name='vbt2' value='查看结果' onClick=window.open('\/plus\/vote.php?dopost=view&aid=1'); \/><\/td><\/tr> <\/form> <\/table> "); |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 图集发布 | |||
* | |||
@@ -13,9 +12,7 @@ require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_New,a_AccNew'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
@@ -30,11 +27,9 @@ if ($dopost != 'save') { | |||
} else { | |||
if ($channelid == 0) $channelid = 2; | |||
} | |||
//获得频道模型信息 | |||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$channelid = $cInfos['id']; | |||
//获取文章最大id以确定当前权重 | |||
$maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); | |||
include DedeInclude("templets/album_add.htm"); | |||
@@ -42,14 +37,13 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if (!isset($typeid2)) $typeid2 = 0; | |||
if (!isset($autokey)) $autokey = 0; | |||
if (!isset($remote)) $remote = 0; | |||
@@ -61,23 +55,21 @@ function __save(){ } | |||
if (!isset($albums)) $albums = ""; | |||
if (!isset($delzip)) $delzip = 0; | |||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if ($typeid == 0) { | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
ShowMsg("请指定文档的栏目", "-1"); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||
exit(); | |||
} | |||
if (!TestPurview('a_New')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); | |||
} | |||
//对保存的内容进行处理 | |||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | |||
if (empty($source)) $source = '未知'; | |||
@@ -101,11 +93,9 @@ function __save(){ } | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) $ddisremote = 0; | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
// 处理新的缩略图上传 | |||
if ($litpic_b64 != "") { | |||
$data = explode(',', $litpic_b64); | |||
@@ -114,24 +104,19 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | |||
if (empty($arcID)) { | |||
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1"); | |||
ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); | |||
exit(); | |||
} | |||
$imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; | |||
$hasone = FALSE; | |||
//处理并保存从网上复制的图片 | |||
/*--------------------- | |||
function _getformhtml() | |||
@@ -172,7 +157,6 @@ function __save(){ } | |||
$imgfile = $cfg_basedir.$iurl; | |||
copy($imgold, $imgfile); | |||
unlink($imgold); | |||
if (is_file($imgfile)) { | |||
$litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | |||
//指定了提取第一张为缩略图的情况强制使用第一张缩略图 | |||
@@ -184,18 +168,14 @@ function __save(){ } | |||
$info = ''; | |||
$imginfos = GetImageSize($imgfile, $info); | |||
$imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
//把图片信息保存到媒体文档管理档案中 | |||
$inquery = " | |||
INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | |||
VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid'); | |||
"; | |||
VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; | |||
$dsql->ExecuteNoneQuery($inquery); | |||
$fid = $dsql->GetLastID(); | |||
AddMyAddon($fid, $iurl); | |||
WaterImg($imgfile, 'up'); | |||
if (!$hasone && $ddisfirst == 1 && $litpic == '') { | |||
if (empty($litpicname)) { | |||
$litpicname = $iurl; | |||
@@ -210,10 +190,8 @@ function __save(){ } | |||
$fm->RmDirFiles($tmpzipdir); | |||
} | |||
} | |||
if ($albums !== "") { | |||
$albumsArr = json_decode(stripslashes($albums), true); | |||
for ($i = 0; $i <= count($albumsArr) - 1; $i++) { | |||
$album = $albumsArr[$i]; | |||
$data = explode(',', $album['img']); | |||
@@ -222,7 +200,6 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
$info = ''; | |||
$imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); | |||
@@ -234,12 +211,9 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
$imgurls = addslashes($imgurls); | |||
//处理body字段自动摘要、自动提取缩略图等 | |||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
@@ -269,7 +243,6 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
@@ -277,7 +250,6 @@ function __save(){ } | |||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
$flag = ($flag == '' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if (preg_match("#j#", $flag)) $ismake = -1; | |||
//加入主档案表 | |||
@@ -288,17 +260,16 @@ function __save(){ } | |||
if (!$dsql->ExecuteNoneQuery($query)) { | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
//加入附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if (empty($addtable)) { | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作!。", "javascript:;"); | |||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); | |||
exit(); | |||
} | |||
$useip = GetIP(); | |||
@@ -308,10 +279,9 @@ function __save(){ } | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
//生成HTML | |||
InsertTags($tags, $arcID); | |||
$artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | |||
@@ -319,8 +289,7 @@ function __save(){ } | |||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
} | |||
ClearMyAddon($arcID, $title); | |||
// 自动更新关联内容 | |||
//自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
if (isset(${$key}) && !empty(${$key})) { | |||
@@ -331,27 +300,15 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<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='$artUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布图片管理</a> | |||
| |||
$backurl | |||
"; | |||
$msg = "请选择您的后续操作:<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='$artUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布图片管理</a> $backurl"; | |||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
$wintitle = "成功发布一个图集!"; | |||
$wintitle = "成功发布一个图集"; | |||
$wecome_info = "文章管理::发布图集"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功发布一个图集:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", FALSE); | |||
$win->Display(); | |||
} | |||
} |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 图集编辑 | |||
* | |||
@@ -13,15 +12,12 @@ require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
ClearMyAddon(); | |||
$aid = intval($aid); | |||
//读取归档信息 | |||
$arcQuery = "SELECT ch.typename as channelname,ar.membername as rankname,arc.* | |||
FROM `#@__archives` arc | |||
@@ -58,10 +54,10 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (empty($typeid2)) $typeid2 = 0; | |||
@@ -74,27 +70,25 @@ function __save(){ } | |||
if (!isset($formzip)) $formzip = 0; | |||
if (!isset($ddisfirst)) $ddisfirst = 0; | |||
if (!isset($delzip)) $delzip = 0; | |||
if ($typeid == 0) { | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
ShowMsg("请指定文档的栏目", "-1"); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||
exit(); | |||
} | |||
if (!TestPurview('a_Edit')) { | |||
if (TestPurview('a_AccEdit')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||
} else { | |||
CheckArcAdmin($id, $cuserLogin->getUserID()); | |||
} | |||
} | |||
//对保存的内容进行处理 | |||
$pubdate = GetMkTime($pubdate); | |||
$sortrank = AddDay($pubdate, $sortup); | |||
@@ -113,7 +107,6 @@ function __save(){ } | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) { | |||
$ddisremote = 0; | |||
@@ -127,17 +120,13 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//分析body里的内容 | |||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
@@ -145,10 +134,8 @@ function __save(){ } | |||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
$flag = ($flag == '' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if (preg_match("#j#", $flag)) $ismake = -1; | |||
//更新数据库的SQL语句 | |||
$query = " | |||
UPDATE `#@__archives` SET | |||
@@ -173,15 +160,12 @@ function __save(){ } | |||
filename='$filename', | |||
dutyadmin='$adminid' | |||
WHERE id='$id'; "; | |||
if (!$dsql->ExecuteNoneQuery($query)) { | |||
ShowMsg("更新数据库archives表时出错,请检查!".$dsql->GetError(), "javascript:;"); | |||
ShowMsg("更新数据库archives表时出错,请检查".$dsql->GetError(), "javascript:;"); | |||
exit(); | |||
} | |||
$imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; | |||
$hasone = false; | |||
//---------------------------------------- | |||
//检查旧的图片是否有更新,并保存 | |||
//----------------------------------------- | |||
@@ -228,7 +212,6 @@ function __save(){ } | |||
$imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
} | |||
} | |||
//---------------------------- | |||
//从HTML中获取新图片 | |||
//---------------------------- | |||
@@ -251,7 +234,6 @@ function __save(){ } | |||
$tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); | |||
$ntime = time(); | |||
if (file_exists($zipfile)) { | |||
@mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); | |||
@chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); | |||
$z = new zip(); | |||
@@ -274,12 +256,10 @@ function __save(){ } | |||
$info = ''; | |||
$imginfos = GetImageSize($imgfile, $info); | |||
$imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
//把图片信息保存到媒体文档管理档案中 | |||
$inquery = " | |||
INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | |||
VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid'); | |||
"; | |||
VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; | |||
$dsql->ExecuteNoneQuery($inquery); | |||
if ( | |||
!$hasone && $ddisfirst == 1 | |||
@@ -298,12 +278,9 @@ function __save(){ } | |||
$fm->RmDirFiles($tmpzipdir); | |||
} | |||
} | |||
if ($albums !== "") { | |||
$albumsArr = json_decode(stripslashes($albums), true); | |||
// var_dump($albumsArr);exit; | |||
for ($i = 0; $i <= count($albumsArr) - 1; $i++) { | |||
$album = $albumsArr[$i]; | |||
$data = explode(',', $album['img']); | |||
@@ -312,7 +289,6 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
$info = ''; | |||
$imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); | |||
@@ -321,9 +297,7 @@ function __save(){ } | |||
$imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; | |||
} | |||
} | |||
$imgurls = addslashes($imgurls); | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
@@ -350,32 +324,30 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//更新附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if ($addtable != '') { | |||
$useip = GetIP(); | |||
$query = "Update `$addtable` | |||
set typeid='$typeid', | |||
pagestyle='$pagestyle', | |||
set typeid='$typeid', | |||
pagestyle='$pagestyle', | |||
body='$body', | |||
maxwidth = '$maxwidth', | |||
ddmaxwidth = '$ddmaxwidth', | |||
pagepicnum = '$pagepicnum', | |||
imgurls='$imgurls', | |||
`row`='$row', | |||
col='$col', | |||
isrm='$isrm'{$inadd_f}, | |||
redirecturl='$redirecturl', | |||
userip = '$useip' | |||
maxwidth = '$maxwidth', | |||
ddmaxwidth = '$ddmaxwidth', | |||
pagepicnum = '$pagepicnum', | |||
imgurls='$imgurls', | |||
`row`='$row', | |||
col='$col', | |||
isrm='$isrm'{$inadd_f}, | |||
redirecturl='$redirecturl', | |||
userip = '$useip' | |||
WHERE aid='$id'; "; | |||
if (!$dsql->ExecuteNoneQuery($query)) { | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!".$dsql->GetError(), "javascript:;"); | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因".$dsql->GetError(), "javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
$arcUrl = MakeArt($id, true, true, $isremote); | |||
@@ -383,8 +355,7 @@ function __save(){ } | |||
$arcUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
} | |||
ClearMyAddon($id, $title); | |||
// 自动更新关联内容 | |||
//自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
if (isset(${$key}) && !empty(${$key})) { | |||
@@ -395,26 +366,13 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//返回成功信息 | |||
$msg = | |||
" 请选择你的后续操作: | |||
<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='$arcUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理已发布图片</a> | |||
| |||
$backurl | |||
"; | |||
$wintitle = "成功更改图集!"; | |||
$msg = "请选择您的后续操作:<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='$arcUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理已发布图片</a> $backurl"; | |||
$wintitle = "成功更改图集"; | |||
$wecome_info = "文章管理::更改图集"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功更改一个图集:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", false); | |||
$win->Display(); | |||
} | |||
} |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 文档发布 | |||
* | |||
@@ -13,27 +12,23 @@ require_once(dirname(__FILE__).'/config.php'); | |||
CheckPurview('a_New,a_AccNew'); | |||
require_once(DEDEINC.'/customfields.func.php'); | |||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEINC.'/dedetag.class.php'); | |||
require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); | |||
ClearMyAddon(); | |||
$channelid = empty($channelid) ? 0 : intval($channelid); | |||
$cid = empty($cid) ? 0 : intval($cid); | |||
//获得频道模型ID | |||
if ($cid > 0 && $channelid == 0) { | |||
$row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
$channelid = $row['channeltype']; | |||
} else { | |||
if ($channelid == 0) { | |||
ShowMsg('无法识别模型信息,因此无法操作!', '-1'); | |||
ShowMsg('无法识别模型信息,因此无法操作', '-1'); | |||
exit(); | |||
} | |||
} | |||
//获得频道模型信息 | |||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$channelid = $cInfos['id']; | |||
@@ -44,38 +39,35 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if (empty($litpic_b64)) $litpic_b64 = ''; | |||
if (empty($typeid2)) $typeid2 = 0; | |||
if (!isset($autokey)) $autokey = 0; | |||
if (!isset($remote)) $remote = 0; | |||
if (!isset($dellink)) $dellink = 0; | |||
if (!isset($autolitpic)) $autolitpic = 0; | |||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if ($typeid == 0) { | |||
ShowMsg('请指定文档的栏目!', '-1'); | |||
ShowMsg('请指定文档的栏目', '-1'); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg('文档为非指定的类型,请检查你发布内容的表单是否合法!', '-1'); | |||
ShowMsg('文档为非指定的类型,请检查您发布内容的表单是否合法', '-1'); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg('你所选择的栏目与当前模型不相符,请选择白色的选项!', '-1'); | |||
ShowMsg('您所选择的栏目与当前模型不相符,请选择白色的选项', '-1'); | |||
exit(); | |||
} | |||
if (!TestPurview('a_New')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); | |||
} | |||
//对保存的内容进行处理 | |||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | |||
if (empty($source)) $source = '未知'; | |||
@@ -100,7 +92,6 @@ function __save(){ } | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) { | |||
$ddisremote = 0; | |||
@@ -114,22 +105,17 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | |||
if (empty($arcID)) { | |||
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1"); | |||
ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); | |||
exit(); | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = $inadd_v = ''; | |||
if (!empty($dede_addonfields)) { | |||
@@ -149,7 +135,6 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
@@ -157,22 +142,18 @@ function __save(){ } | |||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
$flag = ($flag == '' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if (preg_match("#j#", $flag)) $ismake = -1; | |||
//保存到主表 | |||
$query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, | |||
color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) | |||
$query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) | |||
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', | |||
'$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$voteid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; | |||
if (!$dsql->ExecuteNoneQuery($query)) { | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
//保存到附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
@@ -183,11 +164,10 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
InsertTags($tags, $arcID); | |||
$artUrl = MakeArt($arcID, true, true, $isremote); | |||
@@ -195,8 +175,7 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
} | |||
ClearMyAddon($arcID, $title); | |||
// 自动更新关联内容 | |||
//自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
if (isset(${$key}) && !empty(${$key})) { | |||
@@ -207,26 +186,14 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||
} | |||
} | |||
} | |||
//返回成功信息 | |||
$msg = " 请选择你的后续操作: | |||
<a href='archives_add.php?cid=$typeid' 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='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> | |||
| |||
$backurl | |||
"; | |||
$msg = "请选择您的后续操作:<a href='archives_add.php?cid=$typeid' 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='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> $backurl"; | |||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
$wintitle = '成功发布文档!'; | |||
$wintitle = '成功发布文档'; | |||
$wecome_info = '文档管理::发布文档'; | |||
$win = new OxWindow(); | |||
$win->AddTitle('成功发布文档:'); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow('hand', ' ', false); | |||
$win->Display(); | |||
} | |||
} |
@@ -15,7 +15,7 @@ require_once(DEDEINC.'/typelink.class.php'); | |||
require_once(DEDEINC.'/arc.archives.class.php'); | |||
$ENV_GOBACK_URL = (empty($_COOKIE['ENV_GOBACK_URL']) ? 'content_list.php' : $_COOKIE['ENV_GOBACK_URL']); | |||
if (empty($dopost)) { | |||
ShowMsg('对不起,你没指定运行参数', '-1'); | |||
ShowMsg('对不起,您没指定运行参数', '-1'); | |||
exit(); | |||
} | |||
$aid = isset($aid) ? preg_replace("#[^0-9]#", '', $aid) : ''; | |||
@@ -122,7 +122,7 @@ else if ($dopost == "uploadLitpic") { | |||
if ($upfile == '-1') { | |||
$msg = "<script> | |||
parent.document.getElementById('uploadwait').style.display = 'none'; | |||
alert('你没指定要上传的文件或文件大小超过限制'); | |||
alert('您没指定要上传的文件或文件大小超过限制'); | |||
</script>"; | |||
} else if ($upfile == '-2') { | |||
$msg = "<script> | |||
@@ -284,7 +284,7 @@ else if ($dopost == "delArchives") { | |||
$win->AddHidden("dopost", $dopost); | |||
$win->AddHidden("qstr", $qstr); | |||
$win->AddHidden("aid", $aid); | |||
$win->AddTitle("你确实要删除“ $qstr 和 $aid ”这些文档?"); | |||
$win->AddTitle("您确实要删除 $qstr 和 $aid 这些文档?"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
} | |||
@@ -308,8 +308,8 @@ else if ($dopost == 'moveArchives') { | |||
//输出AJAX可移动窗体 | |||
$divname = 'moveArchives'; | |||
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 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}'>"; | |||
@@ -318,23 +318,19 @@ else if ($dopost == 'moveArchives') { | |||
?> | |||
<tr height='26'> | |||
<td width="80" class='bline'> 目标栏目:</td> | |||
<td class='bline'> | |||
<?php echo $typeOptions; ?> | |||
</td> | |||
<td class='bline'><?php echo $typeOptions; ?></td> | |||
</tr> | |||
<tr height='26'> | |||
<td width="80" class='bline'> 文档ID:</td> | |||
<td class='bline'> | |||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:320px;overflow:hidden'><br> | |||
移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。 | |||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:320px;overflow:hidden'> | |||
<br>移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。 | |||
</td> | |||
</tr> | |||
<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" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer"> | |||
</td> | |||
<button type='submit' class='btn btn-success'>保存</button> | |||
<button type='button' onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class='btn btn-success'>关闭</button> | |||
</td> | |||
</tr> | |||
</table> | |||
@@ -457,7 +453,7 @@ else if ($dopost == 'clear') { | |||
$win->AddHidden("qstr", $qstr); | |||
$win->AddHidden("aid", $aid); | |||
$win->AddHidden("recycle", $recycle); | |||
$win->AddTitle("本次操作将清空回收站所有共 $num 篇文档<br>你确实要永久删除“ $qstr ”这些文档?"); | |||
$win->AddTitle("本次操作将清空回收站所有共 $num 篇文档<br>您确实要永久删除 $qstr 这些文档?"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
} | |||
@@ -498,7 +494,7 @@ else if ($dopost == 'del') { | |||
$win->AddHidden("qstr", $qstr); | |||
$win->AddHidden("aid", $aid); | |||
$win->AddHidden("recycle", $recycle); | |||
$win->AddTitle("你确实要永久删除“ $qstr 和 $aid ”这些文档?"); | |||
$win->AddTitle("您确实要永久删除 $qstr 和 $aid 这些文档?"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
} | |||
@@ -556,15 +552,11 @@ else if ($dopost == 'quickEdit') { | |||
</tr> | |||
<tr height='26'> | |||
<td width="80" class='bline'> 标题:</td> | |||
<td class='bline'> | |||
<input name="title" type="text" id="title" value="<?php echo $arcRow['title']; ?>" style="width:320px"> | |||
</td> | |||
<td class='bline'><input name="title" type="text" id="title" value="<?php echo $arcRow['title']; ?>" style="width:320px"></td> | |||
</tr> | |||
<tr height='26'> | |||
<td width="80" class='bline'> 简略标题:</td> | |||
<td class='bline'> | |||
<input name="shorttitle" type="text" id="shorttitle" value="<?php echo $arcRow['shorttitle']; ?>" style="width:320px"> | |||
</td> | |||
<td class='bline'><input name="shorttitle" type="text" id="shorttitle" value="<?php echo $arcRow['shorttitle']; ?>" style="width:320px"></td> | |||
</tr> | |||
<tr height='26'> | |||
<td width="80" class='bline'> 阅读权限:</td> | |||
@@ -586,16 +578,12 @@ else if ($dopost == 'quickEdit') { | |||
</tr> | |||
<tr height='26'> | |||
<td width="80" class='bline'> 关键字:</td> | |||
<td class='bline'> | |||
<input name="keywords" type="text" id="keywords" value="<?php echo $arcRow['keywords']; ?>" style="width:320px"> | |||
</td> | |||
<td class='bline'><input name="keywords" type="text" id="keywords" value="<?php echo $arcRow['keywords']; ?>" style="width:320px"></td> | |||
</tr> | |||
<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="button" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class="btn btn-success">关闭</button> | |||
</td> | |||
<button type='submit' class='btn btn-success'>保存</button> | |||
<button type='button' onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class='btn btn-success'>关闭</button> | |||
</td> | |||
</tr> | |||
</table> | |||
@@ -612,7 +600,7 @@ else if ($dopost == 'quickEditSave') { | |||
//权限检测 | |||
if (!TestPurview('a_Edit')) { | |||
if (TestPurview('a_AccEdit')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||
} else { | |||
CheckArcAdmin($aid, $cuserLogin->getUserID()); | |||
} | |||
@@ -785,7 +773,8 @@ else if ($dopost == 'attsAdd') { | |||
/*-------------------------- | |||
//批量删除属性 | |||
function attsDel(){ } | |||
---------------------------*/ else if ($dopost == 'attsDel') { | |||
---------------------------*/ | |||
else if ($dopost == 'attsDel') { | |||
CheckPurview('a_Commend,sys_ArcBatch'); | |||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | |||
if ($qstr == '') { | |||
@@ -850,7 +839,7 @@ else if ($dopost == 'attsDlg') { | |||
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'> | |||
<input type='hidden' name='oldflag' value='<?php echo $arcRow['flag']; ?>'> | |||
<?php | |||
@@ -865,16 +854,12 @@ else if ($dopost == 'attsDlg') { | |||
</tr> | |||
<tr height='26'> | |||
<td width="80" class='bline'> 文档ID:</td> | |||
<td class='bline'> | |||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:320px;overflow:hidden'> | |||
</td> | |||
<td class='bline'><input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:320px;overflow:hidden'></td> | |||
</tr> | |||
<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" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer"> | |||
</td> | |||
<button type='submit' class='btn btn-success'>保存</button> | |||
<button type='button' onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class='btn btn-success'>关闭</button> | |||
</td> | |||
</tr> | |||
</table> | |||
@@ -897,13 +882,10 @@ else if ($dopost == 'getCatMap') { | |||
$tus = new TypeUnitSelector(); | |||
?> | |||
<form name='quicksel' action='javascript:;' method='get'> | |||
<div class='quicksel'> | |||
<?php $tus->ListAllType($channelid); ?> | |||
</div> | |||
<div class='quicksel'><?php $tus->ListAllType($channelid); ?></div> | |||
<div align='center' class='quickselfoot'> | |||
<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" style="cursor:pointer"> | |||
<button onclick='getSelCat("<?php echo $targetid; ?>");' class='btn btn-success'>保存</button> | |||
<button type='button' onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class='btn btn-success'>关闭</button> | |||
</div> | |||
</form> | |||
<?php | |||
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 文档编辑 | |||
* | |||
@@ -13,28 +12,22 @@ require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
ClearMyAddon(); | |||
$aid = intval($aid); | |||
//读取归档信息 | |||
$arcQuery = "SELECT ch.typename as channelname,ar.membername as rankname,arc.* | |||
FROM `#@__archives` arc | |||
LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel | |||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' | |||
"; | |||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid'"; | |||
$arcRow = $dsql->GetOne($arcQuery); | |||
if (!is_array($arcRow)) { | |||
ShowMsg("读取档案基本信息出错!", "-1"); | |||
exit(); | |||
} | |||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||
$cInfos = $dsql->GetOne($query); | |||
if (!is_array($cInfos)) { | |||
@@ -50,40 +43,38 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (empty($litpic_b64)) $litpic_b64 = ''; | |||
if (empty($typeid2)) $typeid2 = 0; | |||
if (!isset($autokey)) $autokey = 0; | |||
if (!isset($remote)) $remote = 0; | |||
if (!isset($dellink)) $dellink = 0; | |||
if (!isset($autolitpic)) $autolitpic = 0; | |||
if (!isset($writer)) $writer = ''; | |||
if ($typeid == 0) { | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
ShowMsg("请指定文档的栏目", "-1"); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||
exit(); | |||
} | |||
if (!TestPurview('a_Edit')) { | |||
if (TestPurview('a_AccEdit')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||
} else { | |||
CheckArcAdmin($id, $cuserLogin->getUserID()); | |||
} | |||
} | |||
//对保存的内容进行处理 | |||
$pubdate = GetMkTime($pubdate); | |||
$sortrank = AddDay($pubdate, $sortup); | |||
@@ -99,15 +90,11 @@ function __save(){ } | |||
$isremote = 0; | |||
$serviterm = empty($serviterm) ? "" : $serviterm; | |||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) $ddisremote = 0; | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
// 处理新的缩略图上传 | |||
//处理新的缩略图上传 | |||
if ($litpic_b64 != "") { | |||
$data = explode(',', $litpic_b64); | |||
$ntime = time(); | |||
@@ -115,14 +102,11 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
@@ -149,7 +133,6 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
@@ -157,7 +140,6 @@ function __save(){ } | |||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
$flag = ($flag == '' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if (preg_match("#j#", $flag)) $ismake = -1; | |||
//更新数据库的SQL语句 | |||
@@ -185,21 +167,19 @@ function __save(){ } | |||
weight='$weight' | |||
WHERE id='$id'; "; | |||
if (!$dsql->ExecuteNoneQuery($inQuery)) { | |||
ShowMsg("更新数据库archives表时出错,请检查!", "-1"); | |||
ShowMsg("更新数据库archives表时出错,请检查", "-1"); | |||
exit(); | |||
} | |||
$cts = $dsql->GetOne("SELECT addtable From `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if ($addtable != '') { | |||
$useip = GetIP(); | |||
$iquery = "UPDATE `$addtable` SET typeid='$typeid'{$inadd_f},redirecturl='$redirecturl',userip='$useip' WHERE aid='$id' "; | |||
if (!$dsql->ExecuteNoneQuery($iquery)) { | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!", "javascript:;"); | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
$artUrl = MakeArt($id, TRUE, TRUE, $isremote); | |||
@@ -207,8 +187,7 @@ function __save(){ } | |||
$artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
} | |||
ClearMyAddon($id, $title); | |||
// 自动更新关联内容 | |||
//自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
if (isset(${$key}) && !empty(${$key})) { | |||
@@ -219,26 +198,13 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<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='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a> | |||
| |||
$backurl | |||
"; | |||
$wintitle = "成功更改文档!"; | |||
$msg = "请选择您的后续操作:<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='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a> $backurl"; | |||
$wintitle = "成功更改文档"; | |||
$wecome_info = "文档管理::更改文档"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功更改文档:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", false); | |||
$win->Display(); | |||
} | |||
} |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 单表模型文档发布 | |||
* | |||
@@ -13,27 +12,23 @@ require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_New,a_AccNew'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
ClearMyAddon(); | |||
$channelid = empty($channelid) ? 0 : intval($channelid); | |||
$cid = empty($cid) ? 0 : intval($cid); | |||
//获得频道模型ID | |||
if ($cid > 0 && $channelid == 0) { | |||
$row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
$channelid = $row['channeltype']; | |||
} else { | |||
if ($channelid == 0) { | |||
ShowMsg("无法识别模型信息,因此无法操作!", "-1"); | |||
ShowMsg("无法识别模型信息,因此无法操作", "-1"); | |||
exit(); | |||
} | |||
} | |||
//获得频道模型信息 | |||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$channelid = $cInfos['id']; | |||
@@ -42,24 +37,24 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
if ($typeid == 0) { | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
ShowMsg("请指定文档的栏目", "-1"); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||
exit(); | |||
} | |||
if (!TestPurview('a_New')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); | |||
} | |||
//对保存的内容进行处理 | |||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | |||
@@ -72,14 +67,11 @@ function __save(){ } | |||
$isremote = 0; | |||
$serviterm = empty($serviterm) ? "" : $serviterm; | |||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | |||
$adminid = $cuserLogin->getUserID(); | |||
$userip = GetIP(); | |||
if (empty($ddisremote)) $ddisremote = 0; | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
// 处理新的缩略图上传 | |||
//处理新的缩略图上传 | |||
if ($litpic_b64 != "") { | |||
$data = explode(',', $litpic_b64); | |||
$ntime = time(); | |||
@@ -87,21 +79,17 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank, $typeid, $senddate, $channelid, $senddate, $adminid); | |||
if (empty($arcID)) { | |||
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1"); | |||
ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); | |||
exit(); | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
@@ -129,26 +117,23 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
} | |||
//保存到附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if (!empty($addtable)) { | |||
$query = "INSERT INTO `{$addtable}`(aid,typeid,channel,arcrank,mid,click,title,senddate,flag,litpic,userip{$inadd_f}) | |||
VALUES('$arcID','$typeid','$channelid','$arcrank','$adminid','0','$title','$senddate','$flag','$litpic','$userip'{$inadd_v})"; | |||
VALUES('$arcID','$typeid','$channelid','$arcrank','$adminid','0','$title','$senddate','$flag','$litpic','$userip'{$inadd_v})"; | |||
if (!$dsql->ExecuteNoneQuery($query)) { | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
$artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | |||
if ($artUrl == '') { | |||
@@ -156,24 +141,12 @@ function __save(){ } | |||
} | |||
ClearMyAddon($arcID, $title); | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<a href='archives_sg_add.php?cid=$typeid' 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='content_sg_list.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> | |||
| |||
<a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a> | |||
"; | |||
$wintitle = "成功发布文档!"; | |||
$msg = "请选择您的后续操作:<a href='archives_sg_add.php?cid=$typeid' 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='content_sg_list.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> <a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a>"; | |||
$wintitle = "成功发布文档"; | |||
$wecome_info = "文档管理::发布文档"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功发布文档:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", false); | |||
$win->Display(); | |||
} | |||
} |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 单表模型文档编辑 | |||
* | |||
@@ -13,25 +12,20 @@ require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
ClearMyAddon(); | |||
$aid = intval($aid); | |||
//读取归档信息 | |||
$arcQuery = "SELECT ch.*,arc.* FROM `#@__arctiny` arc | |||
LEFT JOIN `#@__channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' "; | |||
$cInfos = $dsql->GetOne($arcQuery); | |||
if (!is_array($cInfos)) { | |||
ShowMsg("读频道模型信息出错!", "-1"); | |||
ShowMsg("读频道模型信息出错", "-1"); | |||
exit(); | |||
} | |||
$addtable = $cInfos['addtable']; | |||
$addRow = $dsql->GetOne("SELECT arc.*,ar.membername as rankname FROM `$addtable` arc LEFT JOIN `#@__arcrank` ar on ar.rank=arc.arcrank WHERE arc.aid='$aid'"); | |||
$channelid = $cInfos['channel']; | |||
@@ -41,24 +35,25 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
if ($typeid == 0) { | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
ShowMsg("请指定文档的栏目", "-1"); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||
exit(); | |||
} | |||
if (!TestPurview('a_Edit')) { | |||
if (TestPurview('a_AccEdit')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||
} else { | |||
CheckArcAdmin($id, $cuserLogin->getUserID()); | |||
} | |||
@@ -71,13 +66,11 @@ function __save(){ } | |||
$serviterm = empty($serviterm) ? "" : $serviterm; | |||
if (empty($litpic_b64)) $litpic_b64 = ''; | |||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) $ddisremote = 0; | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
// 处理新的缩略图上传 | |||
//处理新的缩略图上传 | |||
if ($litpic_b64 != "") { | |||
$data = explode(',', $litpic_b64); | |||
$ntime = time(); | |||
@@ -85,9 +78,7 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
@@ -118,43 +109,27 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
} | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if ($addtable != '') { | |||
$iquery = "UPDATE `$addtable` SET typeid='$typeid',arcrank='$arcrank',title='$title',flag='$flag',litpic='$litpic'{$inadd_f} WHERE aid='$id' "; | |||
if (!$dsql->ExecuteNoneQuery($iquery)) { | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!", "javascript:;"); | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); | |||
$artUrl = MakeArt($id, TRUE, TRUE, $isremote); | |||
if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
ClearMyAddon($id, $title); | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<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='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a> | |||
| |||
<a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a> | |||
"; | |||
$wintitle = "成功更改文档!"; | |||
$msg = "请选择您的后续操作:<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='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> <a href='catalog_do.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a> <a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a>"; | |||
$wintitle = "成功更改文档"; | |||
$wecome_info = "文档管理::更改文档"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功更改文档:"); | |||
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 文档发布 | |||
* | |||
@@ -17,7 +16,6 @@ if (file_exists(DEDEDATA.'/template.rand.php')) { | |||
require_once(DEDEDATA.'/template.rand.php'); | |||
} | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
@@ -25,18 +23,14 @@ if ($dopost != 'save') { | |||
$channelid = empty($channelid) ? 0 : intval($channelid); | |||
$cid = empty($cid) ? 0 : intval($cid); | |||
if (empty($litpic_b64)) $litpic_b64 = ''; | |||
if (empty($geturl)) $geturl = ''; | |||
$keywords = $writer = $source = $body = $description = $title = ''; | |||
//采集单个网页 | |||
if (preg_match("#^http:\/\/#", $geturl)) { | |||
require_once(DEDEADMIN."/inc/inc_coonepage.php"); | |||
$redatas = CoOnePage($geturl); | |||
extract($redatas); | |||
} | |||
//获得频道模型ID | |||
if ($cid > 0 && $channelid == 0) { | |||
$row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='$cid'; "); | |||
@@ -46,48 +40,43 @@ if ($dopost != 'save') { | |||
$channelid = 1; | |||
} | |||
} | |||
//获得频道模型信息 | |||
$cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' "); | |||
//获取文章最大id以确定当前权重 | |||
$maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM `#@__archives`"); | |||
include DedeInclude("templets/article_add.htm"); | |||
exit(); | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (empty($typeid2)) $typeid2 = ''; | |||
if (!isset($autokey)) $autokey = 0; | |||
if (!isset($remote)) $remote = 0; | |||
if (!isset($dellink)) $dellink = 0; | |||
if (!isset($autolitpic)) $autolitpic = 0; | |||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if (empty($typeid)) { | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
ShowMsg("请指定文档的栏目", "-1"); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||
exit(); | |||
} | |||
if (!TestPurview('a_New')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); | |||
} | |||
//对保存的内容进行处理 | |||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | |||
if (empty($source)) $source = '未知'; | |||
@@ -107,19 +96,16 @@ function __save(){ } | |||
$userip = GetIP(); | |||
$isremote = 0; | |||
$serviterm = empty($serviterm) ? "" : $serviterm; | |||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) { | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
// 处理新的缩略图上传 | |||
//处理新的缩略图上传 | |||
if ($litpic_b64 != "") { | |||
$data = explode(',', $litpic_b64); | |||
$ntime = time(); | |||
@@ -127,34 +113,27 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | |||
if (empty($arcID)) { | |||
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1"); | |||
ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); | |||
exit(); | |||
} | |||
if (trim($title) == '') { | |||
ShowMsg('标题不能为空', '-1'); | |||
exit(); | |||
} | |||
//处理body字段自动摘要、自动提取缩略图等 | |||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | |||
//自动分页 | |||
if ($sptype == 'auto') { | |||
$body = SpLongBody($body, $spsize * 1024, "#p#分页标题#e#"); | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = $inadd_v = ''; | |||
if (!empty($dede_addonfields)) { | |||
@@ -174,7 +153,6 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
@@ -182,31 +160,24 @@ function __save(){ } | |||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
$flag = ($flag == '' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if (preg_match("#j#", $flag)) $ismake = -1; | |||
//保存到主表 | |||
$query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, | |||
color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) | |||
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money', | |||
'$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate', | |||
'$adminid','0','$notpost','$description','$keywords','$filename','$adminid','$weight');"; | |||
$query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) | |||
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename','$adminid','$weight');"; | |||
if (!$dsql->ExecuteNoneQuery($query)) { | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
//保存到附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if (empty($addtable)) { | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作!。", "javascript:;"); | |||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); | |||
exit(); | |||
} | |||
$useip = GetIP(); | |||
@@ -216,7 +187,7 @@ function __save(){ } | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
//生成HTML | |||
@@ -240,8 +211,7 @@ function __save(){ } | |||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
} | |||
ClearMyAddon($arcID, $title); | |||
// 自动更新关联内容 | |||
//自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
if (isset(${$key}) && !empty(${$key})) { | |||
@@ -252,25 +222,14 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//返回成功信息 | |||
$msg = " 请选择你的后续操作: | |||
<a href='article_add.php?cid=$typeid' 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='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文章管理</a> | |||
| |||
$backurl | |||
"; | |||
$msg = "请选择您的后续操作:<a href='article_add.php?cid=$typeid' 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='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文章管理</a> $backurl"; | |||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
$wintitle = "成功发布文章!"; | |||
$wintitle = "成功发布文章"; | |||
$wecome_info = "文章管理::发布文章"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功发布文章:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", false); | |||
$win->Display(); | |||
} | |||
} |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 文档编辑 | |||
* | |||
@@ -17,14 +16,11 @@ if (file_exists(DEDEDATA.'/template.rand.php')) { | |||
require_once(DEDEDATA.'/template.rand.php'); | |||
} | |||
if (empty($dopost)) $dopost = ''; | |||
$aid = isset($aid) && is_numeric($aid) ? $aid : 0; | |||
if ($dopost != 'save') { | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
ClearMyAddon(); | |||
//读取归档信息 | |||
$query = "SELECT ch.typename AS channelname,ar.membername AS rankname,arc.* | |||
FROM `#@__archives` arc | |||
@@ -32,19 +28,19 @@ if ($dopost != 'save') { | |||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; | |||
$arcRow = $dsql->GetOne($query); | |||
if (!is_array($arcRow)) { | |||
ShowMsg("读取档案基本信息出错!", "-1"); | |||
ShowMsg("读取档案基本信息出错", "-1"); | |||
exit(); | |||
} | |||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||
$cInfos = $dsql->GetOne($query); | |||
if (!is_array($cInfos)) { | |||
ShowMsg("读取频道配置信息出错!", "javascript:;"); | |||
ShowMsg("读取频道配置信息出错", "javascript:;"); | |||
exit(); | |||
} | |||
$addtable = $cInfos['addtable']; | |||
$addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); | |||
if (!is_array($addRow)) { | |||
ShowMsg("读取附加信息出错!", "javascript:;"); | |||
ShowMsg("读取附加信息出错", "javascript:;"); | |||
exit(); | |||
} | |||
$channelid = $arcRow['channel']; | |||
@@ -54,40 +50,37 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (empty($typeid2)) $typeid2 = 0; | |||
if (!isset($autokey)) $autokey = 0; | |||
if (!isset($remote)) $remote = 0; | |||
if (!isset($dellink)) $dellink = 0; | |||
if (!isset($autolitpic)) $autolitpic = 0; | |||
if (empty($litpic_b64)) $litpic_b64 = ''; | |||
if (empty($typeid)) { | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
ShowMsg("请指定文档的栏目", "-1"); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||
exit(); | |||
} | |||
if (!TestPurview('a_Edit')) { | |||
if (TestPurview('a_AccEdit')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||
} else { | |||
CheckArcAdmin($id, $cuserLogin->getUserID()); | |||
} | |||
} | |||
//对保存的内容进行处理 | |||
$pubdate = GetMkTime($pubdate); | |||
$sortrank = AddDay($pubdate, $sortup); | |||
@@ -107,16 +100,13 @@ function __save(){ } | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) { | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
//分析body里的内容 | |||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
@@ -143,8 +133,7 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
// 处理新的缩略图上传 | |||
//处理新的缩略图上传 | |||
if ($litpic_b64 != "") { | |||
$data = explode(',', $litpic_b64); | |||
$ntime = time(); | |||
@@ -152,14 +141,11 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match("#p#", $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
@@ -167,7 +153,6 @@ function __save(){ } | |||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | |||
$flag = ($flag == '' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if (preg_match("#j#", $flag)) $ismake = -1; | |||
//更新数据库的SQL语句 | |||
@@ -194,12 +179,10 @@ function __save(){ } | |||
dutyadmin='$adminid', | |||
weight='$weight' | |||
WHERE id='$id'; "; | |||
if (!$dsql->ExecuteNoneQuery($query)) { | |||
ShowMsg('更新数据库archives表时出错,请检查', -1); | |||
exit(); | |||
} | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if ($addtable != '') { | |||
@@ -207,11 +190,10 @@ function __save(){ } | |||
$templet = empty($templet) ? '' : $templet; | |||
$iquery = "UPDATE `$addtable` SET typeid='$typeid',body='$body'{$inadd_f},redirecturl='$redirecturl',templet='$templet',userip='$useip' WHERE aid='$id'"; | |||
if (!$dsql->ExecuteNoneQuery($iquery)) { | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!", "javascript:;"); | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
$artUrl = MakeArt($id, true, true, $isremote); | |||
@@ -219,8 +201,7 @@ function __save(){ } | |||
$artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
} | |||
ClearMyAddon($id, $title); | |||
// 自动更新关联内容 | |||
//自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
if (isset(${$key}) && !empty(${$key})) { | |||
@@ -233,24 +214,12 @@ function __save(){ } | |||
} | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<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='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文章</a> | |||
| |||
$backurl | |||
"; | |||
$wintitle = "成功更改文章!"; | |||
$msg = "请选择您的后续操作:<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='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文章</a> $backurl"; | |||
$wintitle = "成功更改文章"; | |||
$wecome_info = "文章管理::更改文章"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功更改文章:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", false); | |||
$win->Display(); | |||
} | |||
} |
@@ -20,7 +20,7 @@ if (empty($dopost)) $dopost = ''; | |||
if ($dopost == 'saveall') { | |||
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "article_keywords_main.php" : $_COOKIE['ENV_GOBACK_URL']; | |||
if (!isset($aids)) { | |||
ShowMsg("你没有选择要更改的内容!", $ENV_GOBACK_URL); | |||
ShowMsg("您没有选择要更改的内容!", $ENV_GOBACK_URL); | |||
exit(); | |||
} | |||
foreach ($aids as $aid) { | |||
@@ -42,7 +42,7 @@ $win = new OxWindow(); | |||
$win->Init('article_string_mix.php', 'js/blank.js', 'POST'); | |||
$win->AddHidden('dopost', 'save'); | |||
$win->AddHidden('token', $_SESSION['token']); | |||
$win->AddTitle("如果你要启用字符串混淆来防采集,请在文档模板需要的字段加上 function='RndString(@me)' 属性,如:{dede:field name='body' function='RndString(@me)'/}。"); | |||
$win->AddTitle("如果您要启用字符串混淆来防采集,请在文档模板需要的字段加上 function='RndString(@me)' 属性,如:{dede:field name='body' function='RndString(@me)'/}。"); | |||
$win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>"); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); |
@@ -97,7 +97,7 @@ function DoRand(jobname) | |||
<table width='98%' align='center'> | |||
<tr> | |||
<td height='28'> | |||
如果你想对旧的文章应用随机模板设置,请点击此对旧文章进行处理(必须设置好模板项)! | |||
如果您想对旧的文章应用随机模板设置,请点击此对旧文章进行处理(必须设置好模板项)! | |||
<a href='#' onclick='DoRand(\"makeold\")' class='btn btn-success btn-sm'>设置全部</a> | |||
<a href='#' onclick='DoRand(\"clearold\")' class='btn btn-success btn-sm'>取消全部</a> | |||
<span id='tmpct' style='color:red;font-weight:bold'>$okmsg</span> | |||
@@ -27,7 +27,7 @@ if ($id == 0 && $reid == 0) { | |||
} else { | |||
$checkID = empty($id) ? $reid : $id; | |||
CheckPurview('t_AccNew'); | |||
CheckCatalog($checkID, '你无权在本栏目下创建子类!'); | |||
CheckCatalog($checkID, '您无权在本栏目下创建子类!'); | |||
} | |||
if (empty($myrow)) $myrow = array(); | |||
@@ -173,11 +173,11 @@ function action_save(){ } | |||
if ($siteurl != '') { | |||
$siteurl = preg_replace("#\/$#", "", $siteurl); | |||
if (!preg_match("#http:\/\/#i", $siteurl)) { | |||
ShowMsg("你绑定的二级域名无效,请用(http://host)的形式!", "-1"); | |||
ShowMsg("您绑定的二级域名无效,请用(http://host)的形式!", "-1"); | |||
exit(); | |||
} | |||
if (preg_match("#".$cfg_basehost."#i", $siteurl)) { | |||
ShowMsg("你绑定的二级域名与当前站点是同一个域,不需要绑定!", "-1"); | |||
ShowMsg("您绑定的二级域名与当前站点是同一个域,不需要绑定!", "-1"); | |||
exit(); | |||
} | |||
} | |||
@@ -188,7 +188,7 @@ function action_save(){ } | |||
$true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir); | |||
$true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); | |||
if (!CreateDir($true_typedir)) { | |||
ShowMsg("创建目录 {$true_typedir} 失败,请检查你的路径是否存在问题!", "-1"); | |||
ShowMsg("创建目录 {$true_typedir} 失败,请检查您的路径是否存在问题!", "-1"); | |||
exit(); | |||
} | |||
} | |||
@@ -201,7 +201,7 @@ function action_save(){ } | |||
'$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes')"; | |||
if (!$dsql->ExecuteNoneQuery($in_query)) { | |||
ShowMsg("保存目录数据时失败,请检查你的输入资料是否存在问题!", "-1"); | |||
ShowMsg("保存目录数据时失败,请检查您的输入资料是否存在问题!", "-1"); | |||
exit(); | |||
} | |||
UpDateCatCache(); | |||
@@ -18,7 +18,7 @@ require_once(DEDEINC.'/oxwindow.class.php'); | |||
$id = trim(preg_replace("#[^0-9]#", '', $id)); | |||
//检查栏目操作许可 | |||
CheckCatalog($id, "你无权删除本栏目!"); | |||
CheckCatalog($id, "您无权删除本栏目!"); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost == 'ok') { | |||
$ut = new TypeUnit(); | |||
@@ -35,7 +35,7 @@ $win = new OxWindow(); | |||
$win->Init('catalog_del.php', 'js/blank.js', 'POST'); | |||
$win->AddHidden('id', $id); | |||
$win->AddHidden('dopost', 'ok'); | |||
$win->AddTitle("你要确实要删除栏目: [{$row['typename']}] 吗?"); | |||
$win->AddTitle("您要确实要删除栏目: [{$row['typename']}] 吗?"); | |||
$win->AddItem('栏目的文件保存目录:', $row['typedir']); | |||
$win->AddItem('是否删除文件:', "<label><input type='radio' name='delfile' class='np' value='no' checked='1' /> 否</label> <label> <input type='radio' name='delfile' class='np' value='yes' /> 是</label>"); | |||
$winform = $win->GetWindow('ok'); | |||
@@ -37,7 +37,7 @@ if ($dopost == "addArchives") { | |||
} | |||
$gurl = $row["addcon"]; | |||
if ($gurl == "") { | |||
ShowMsg("对不起,你指的栏目可能有误!", "catalog_main.php"); | |||
ShowMsg("对不起,您指的栏目可能有误!", "catalog_main.php"); | |||
exit(); | |||
} | |||
@@ -64,7 +64,7 @@ function listArchives(); | |||
$typename = $row["typename"]; | |||
$channelname = $row["channelname"]; | |||
if ($gurl == "") { | |||
ShowMsg("对不起,你指的栏目可能有误!", "catalog_main.php"); | |||
ShowMsg("对不起,您指的栏目可能有误!", "catalog_main.php"); | |||
exit(); | |||
} | |||
} else if ($channelid > 0) { | |||
@@ -104,7 +104,7 @@ function upRank() | |||
CheckPurview('t_Edit,t_AccEdit'); | |||
//检查栏目操作许可 | |||
CheckCatalog($cid, "你无权更改本栏目!"); | |||
CheckCatalog($cid, "您无权更改本栏目!"); | |||
$row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='$cid'"); | |||
$reid = $row['reid']; | |||
$sortrank = $row['sortrank']; | |||
@@ -224,8 +224,8 @@ function unitCatalog() { } | |||
$win->AddHidden('channelid', $channelid); | |||
$win->AddHidden('nextjob', 'unitok'); | |||
$win->AddTitle("合并目录时不会删除原来的栏目目录,合并后需手动更新目标栏目的文档HTML和列表HTML。"); | |||
$win->AddItem('你选择的栏目是:', "<font color='red'>$typename($typeid)</font>"); | |||
$win->AddItem('你希望合并到那个栏目?', "<select name='unittype'>\r\n{$typeOptions}\r\n</select>"); | |||
$win->AddItem('您选择的栏目是:', "<font color='red'>$typename($typeid)</font>"); | |||
$win->AddItem('您希望合并到那个栏目?', "<select name='unittype'>\r\n{$typeOptions}\r\n</select>"); | |||
$win->AddItem('注意事项:', '栏目不能有下级子栏目,只允许子级到更高级或同级或不同父级的情况。'); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); | |||
@@ -276,8 +276,8 @@ function moveCatalog() { } | |||
$win->AddHidden('channelid', $channelid); | |||
$win->AddHidden('nextjob', 'unitok'); | |||
$win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。"); | |||
$win->AddItem('你选择的栏目是:', "$typename($typeid)"); | |||
$win->AddItem('你希望移动到那个栏目?', "<select name='movetype'>\r\n<option value='0'>移动为顶级栏目</option>\r\n$typeOptions\r\n</select>"); | |||
$win->AddItem('您选择的栏目是:', "$typename($typeid)"); | |||
$win->AddItem('您希望移动到那个栏目?', "<select name='movetype'>\r\n<option value='0'>移动为顶级栏目</option>\r\n$typeOptions\r\n</select>"); | |||
$win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。'); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); | |||
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 栏目编辑 | |||
* | |||
@@ -13,13 +12,10 @@ require_once(dirname(__FILE__)."/config.php"); | |||
require_once(DEDEINC."/typelink.class.php"); | |||
if (empty($dopost)) $dopost = ''; | |||
$id = isset($id) ? intval($id) : 0; | |||
//检查权限许可 | |||
CheckPurview('t_Edit,t_AccEdit'); | |||
//检查栏目操作许可 | |||
CheckCatalog($id, '你无权更改本栏目!'); | |||
CheckCatalog($id, '您无权更改本栏目'); | |||
/*----------------------- | |||
function action_save() | |||
----------------------*/ | |||
@@ -33,78 +29,72 @@ if ($dopost == "save") { | |||
$uptopsql = " ,siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' "; | |||
} | |||
if ($ispart != 0) $cross = 0; | |||
$upquery = "UPDATE `#@__arctype` SET | |||
issend='$issend', | |||
sortrank='$sortrank', | |||
typename='$typename', | |||
typedir='$typedir', | |||
isdefault='$isdefault', | |||
defaultname='$defaultname', | |||
issend='$issend', | |||
ishidden='$ishidden', | |||
channeltype='$channeltype', | |||
tempindex='$tempindex', | |||
templist='$templist', | |||
temparticle='$temparticle', | |||
namerule='$namerule', | |||
namerule2='$namerule2', | |||
ispart='$ispart', | |||
corank='$corank', | |||
description='$description', | |||
keywords='$keywords', | |||
seotitle='$seotitle', | |||
moresite='$moresite', | |||
`cross`='$cross', | |||
`content`='$content', | |||
`crossid`='$crossid', | |||
`smalltypes`='$smalltypes' | |||
$uptopsql | |||
issend='$issend', | |||
sortrank='$sortrank', | |||
typename='$typename', | |||
typedir='$typedir', | |||
isdefault='$isdefault', | |||
defaultname='$defaultname', | |||
issend='$issend', | |||
ishidden='$ishidden', | |||
channeltype='$channeltype', | |||
tempindex='$tempindex', | |||
templist='$templist', | |||
temparticle='$temparticle', | |||
namerule='$namerule', | |||
namerule2='$namerule2', | |||
ispart='$ispart', | |||
corank='$corank', | |||
description='$description', | |||
keywords='$keywords', | |||
seotitle='$seotitle', | |||
moresite='$moresite', | |||
`cross`='$cross', | |||
`content`='$content', | |||
`crossid`='$crossid', | |||
`smalltypes`='$smalltypes' | |||
$uptopsql | |||
WHERE id='$id' "; | |||
if (!$dsql->ExecuteNoneQuery($upquery)) { | |||
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题!", "-1"); | |||
ShowMsg("保存当前栏目更改时失败,请检查您的输入资料是否存在问题", "-1"); | |||
exit(); | |||
} | |||
//如果选择子栏目可投稿,更新顶级栏目为可投稿 | |||
if ($topid > 0 && $issend == 1) { | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | |||
} | |||
$slinks = " id IN (".GetSonIds($id).")"; | |||
//修改顶级栏目时强制修改下级的多站点支持属性 | |||
if ($topid == 0 && preg_match("#,#", $slinks)) { | |||
$upquery = "UPDATE `#@__arctype` SET moresite='$moresite', siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' WHERE 1=1 AND $slinks"; | |||
$dsql->ExecuteNoneQuery($upquery); | |||
} | |||
//更改子栏目属性 | |||
if (!empty($upnext)) { | |||
$upquery = "UPDATE `#@__arctype` SET | |||
issend='$issend', | |||
defaultname='$defaultname', | |||
channeltype='$channeltype', | |||
tempindex='$tempindex', | |||
templist='$templist', | |||
temparticle='$temparticle', | |||
namerule='$namerule', | |||
namerule2='$namerule2', | |||
ishidden='$ishidden' | |||
WHERE 1=1 AND $slinks"; | |||
$upquery = "UPDATE `#@__arctype` SET | |||
issend='$issend', | |||
defaultname='$defaultname', | |||
channeltype='$channeltype', | |||
tempindex='$tempindex', | |||
templist='$templist', | |||
temparticle='$temparticle', | |||
namerule='$namerule', | |||
namerule2='$namerule2', | |||
ishidden='$ishidden' | |||
WHERE 1=1 AND $slinks"; | |||
if (!$dsql->ExecuteNoneQuery($upquery)) { | |||
ShowMsg("更改当前栏目成功,但更改下级栏目属性时失败!", "-1"); | |||
ShowMsg("更改当前栏目成功,但更改下级栏目属性时失败", "-1"); | |||
exit(); | |||
} | |||
} | |||
UpDateCatCache(); | |||
ShowMsg("成功更改一个分类!", "catalog_main.php"); | |||
ShowMsg("成功更改一个分类", "catalog_main.php"); | |||
exit(); | |||
} //End Save Action | |||
else if ($dopost == "savetime") { | |||
$uptopsql = ''; | |||
$slinks = " id IN (".GetSonIds($id).")"; | |||
//顶级栏目二级域名根目录处理 | |||
if ($topid == 0 && $moresite == 1) { | |||
$sitepath = $typedir; | |||
@@ -118,27 +108,24 @@ else if ($dopost == "savetime") { | |||
if ($topid > 0 && $issend == 1) { | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | |||
} | |||
$upquery = "UPDATE `#@__arctype` SET | |||
issend='$issend', | |||
sortrank='$sortrank', | |||
typedir='$typedir', | |||
typename='$typename', | |||
isdefault='$isdefault', | |||
defaultname='$defaultname', | |||
ispart='$ispart', | |||
corank='$corank' $uptopsql | |||
issend='$issend', | |||
sortrank='$sortrank', | |||
typedir='$typedir', | |||
typename='$typename', | |||
isdefault='$isdefault', | |||
defaultname='$defaultname', | |||
ispart='$ispart', | |||
corank='$corank' $uptopsql | |||
WHERE id='$id' "; | |||
if (!$dsql->ExecuteNoneQuery($upquery)) { | |||
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题!", "-1"); | |||
ShowMsg("保存当前栏目更改时失败,请检查您的输入资料是否存在问题", "-1"); | |||
exit(); | |||
} | |||
UpDateCatCache(); | |||
ShowMsg("成功更改一个分类!", "catalog_main.php"); | |||
ShowMsg("成功更改一个分类", "catalog_main.php"); | |||
exit(); | |||
} | |||
//读取栏目信息 | |||
$dsql->SetQuery("SELECT tp.*,ch.typename as ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id"); | |||
$myrow = $dsql->GetOne(); | |||
@@ -152,7 +139,6 @@ if ($topid > 0) { | |||
} | |||
} | |||
$myrow['content'] = empty($myrow['content']) ? " " : $myrow['content']; | |||
//读取频道模型信息 | |||
$channelid = $myrow['channeltype']; | |||
$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); | |||
@@ -168,105 +154,92 @@ PutCookie('lastCid', GetTopid($id), 3600 * 24, "/"); | |||
if ($dopost == 'time') { | |||
?> | |||
<form name="form1" action="catalog_edit.php" method="post" onSubmit="return checkSubmit();"> | |||
<input type="hidden" name="dopost" value="savetime" /> | |||
<input type="hidden" name="id" value="<?php echo $id; ?>" /> | |||
<input type="hidden" name="topid" value="<?php echo $myrow['topid']; ?>" /> | |||
<input type="hidden" name="moresite" value="<?php echo $myrow['moresite']; ?>" /> | |||
<input type="hidden" name="dopost" value="savetime"> | |||
<input type="hidden" name="id" value="<?php echo $id; ?>"> | |||
<input type="hidden" name="topid" value="<?php echo $myrow['topid']; ?>"> | |||
<input type="hidden" name="moresite" value="<?php echo $myrow['moresite']; ?>"> | |||
<table width="100%" border="0" cellpadding="0" cellspacing="0"> | |||
<tr> | |||
<td class='bline' height="26" align="center" colspan="2"> | |||
<a href='catalog_edit.php?id=<?php echo $id; ?>'><u>当前是快捷编辑模式,如果您要修改更详细的参数,请使用高级模式>></u></a> | |||
<a href='catalog_edit.php?id=<?php echo $id; ?>'>当前是快捷编辑模式,您要修改更详细的参数,请使用高级模式</a> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td width="150" class='bline' height="26" align="center">是否支持投稿:</td> | |||
<td class='bline'> | |||
<label><input type='radio' name='issend' value='0' class='np' <?php if ($myrow['issend'] == "0") echo " checked='1' "; ?> /> | |||
不支持</label> | |||
<label><input type='radio' name='issend' value='1' class='np' <?php if ($myrow['issend'] == "1") echo " checked='1' "; ?> /> | |||
支持</label></td> | |||
<label><input type='radio' name='issend' value='0' class='np' <?php if ($myrow['issend'] == "0") echo " checked='1' "; ?>> 不支持</label> | |||
<label><input type='radio' name='issend' value='1' class='np' <?php if ($myrow['issend'] == "1") echo " checked='1' "; ?>> 支持</label> | |||
</td> | |||
</tr> | |||
<!-- 在快速修改更改内容模型后,因为模板没改变,会导致错误,因此去除些选择框。 --> | |||
<tr> | |||
<td class='bline' height="26" align="center"> | |||
<font color='red'>内容模型:</font> | |||
</td> | |||
<td class='bline' height="26" align="center">内容模型:</td> | |||
<td class='bline'> | |||
<?php | |||
foreach ($channelArray as $k => $arr) { | |||
if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}"; | |||
} | |||
?> | |||
<a href='catalog_edit.php?id=<?php echo $id; ?>'><u>[修改]</u></a> | |||
<a href='catalog_edit.php?id=<?php echo $id; ?>' class='btn btn-success btn-sm'>修改</a> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td class='bline' height="26" align="center"> | |||
<font color='red'>栏目名称:</font> | |||
</td> | |||
<td class='bline'><input name="typename" type="text" id="typename" size="30" value="<?php echo $myrow['typename'] ?>" class="iptxt" /></td> | |||
<td class='bline' height="26" align="center">栏目名称:</td> | |||
<td class='bline'><input name="typename" type="text" id="typename" value="<?php echo $myrow['typename'] ?>" style="width:260px" class="iptxt"></td> | |||
</tr> | |||
<tr> | |||
<td class='bline' height="26" align="center"> 排列顺序: </td> | |||
<td class='bline'> <input name="sortrank" size="6" type="text" value="<?php echo $myrow['sortrank'] ?>" class="iptxt" /> | |||
(由低 -> 高) </td> | |||
<td class='bline'> <input name="sortrank" type="text" value="<?php echo $myrow['sortrank'] ?>" style="width:100" class="iptxt">(由低 -> 高)</td> | |||
</tr> | |||
<tr> | |||
<td class='bline' height="26" align="center">浏览权限:</td> | |||
<td class='bline'> <select name="corank" id="corank" style="width:100"> | |||
<?php | |||
$dsql->SetQuery("SELECT * FROM #@__arcrank WHERE rank >= 0"); | |||
$dsql->Execute(); | |||
while ($row = $dsql->GetObject()) { | |||
if ($myrow['corank'] == $row->rank) | |||
echo "<option value='".$row->rank."' selected>".$row->membername."</option>\r\n"; | |||
<td class='bline'> | |||
<select name="corank" id="corank" style="width:100"> | |||
<?php | |||
$dsql->SetQuery("SELECT * FROM #@__arcrank WHERE rank >= 0"); | |||
$dsql->Execute(); | |||
while ($row = $dsql->GetObject()) { | |||
if ($myrow['corank'] == $row->rank) | |||
echo "<option value='".$row->rank."' selected>".$row->membername."</option>\r\n"; | |||
else | |||
echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n"; | |||
} | |||
?> | |||
</select> | |||
(仅限制栏目里的文档浏览权限) </td> | |||
echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n"; | |||
} | |||
?> | |||
</select>(仅限制栏目里的文档浏览权限) | |||
</td> | |||
</tr> | |||
<tr> | |||
<td class='bline' height="26" align="center">文件保存目录:</td> | |||
<td class='bline'><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir'] ?>" style="width:300px" class="iptxt" /></td> | |||
<td class='bline'><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir'] ?>" style="width:260px"class="iptxt"></td> | |||
</tr> | |||
<tr> | |||
<td height="26" align="center" class='bline'>栏目列表选项:</td> | |||
<td class='bline'> | |||
<label><input type='radio' name='isdefault' value='1' class='np' <?php if ($myrow['isdefault'] == 1) echo " checked='1' "; ?> /> | |||
链接到默认页</label> | |||
<label><input type='radio' name='isdefault' value='0' class='np' <?php if ($myrow['isdefault'] == 0) echo " checked='1' "; ?> /> | |||
链接到列表第一页</label> | |||
<label><input type='radio' name='isdefault' value='-1' class='np' <?php if ($myrow['isdefault'] == -1) echo " checked='1' "; ?> /> | |||
使用动态页</label> </td> | |||
<label><input type='radio' name='isdefault' value='1' class='np' <?php if ($myrow['isdefault'] == 1) echo " checked='1' "; ?>> 链接到默认页</label> | |||
<label><input type='radio' name='isdefault' value='0' class='np' <?php if ($myrow['isdefault'] == 0) echo " checked='1' "; ?>> 链接到列表第一页</label> | |||
<label><input type='radio' name='isdefault' value='-1' class='np' <?php if ($myrow['isdefault'] == -1) echo " checked='1' "; ?>> 使用动态页</label></td> | |||
</tr> | |||
<tr> | |||
<td class='bline' height="26" align="center">默认页的名称: </td> | |||
<td class='bline'><input name="defaultname" type="text" value="<?php echo $myrow['defaultname'] ?>" class="iptxt" /></td> | |||
<td class='bline' height="26" align="center">默认页的名称:</td> | |||
<td class='bline'><input name="defaultname" type="text" value="<?php echo $myrow['defaultname'] ?>" style="width:260px" class="iptxt"></td> | |||
</tr> | |||
<tr> | |||
<td height="26" class='bline' align="center">栏目属性:</td> | |||
<td class='bline'> | |||
<label><input name="ispart" type="radio" id="radio" value="0" class='np' <?php if ($myrow['ispart'] == 0) echo " checked='1' "; ?> /> | |||
最终列表栏目(允许在本栏目发布文档,并生成文档列表)</label><br> | |||
<label><input name="ispart" type="radio" id="radio2" value="1" class='np' <?php if ($myrow['ispart'] == 1) echo " checked='1' "; ?> /> | |||
频道封面(栏目本身不允许发布文档)</label><br> | |||
<label><input name="ispart" type="radio" id="radio3" value="2" class='np' <?php if ($myrow['ispart'] == 2) echo " checked='1' "; ?> /> | |||
外部连接(在"文件保存目录"处填写网址) </label> </td> | |||
<label><input name="ispart" type="radio" id="radio" value="0" class='np' <?php if ($myrow['ispart'] == 0) echo " checked='1' "; ?>> 最终列表栏目(允许在本栏目发布文档,并生成文档列表)</label><br> | |||
<label><input name="ispart" type="radio" id="radio2" value="1" class='np' <?php if ($myrow['ispart'] == 1) echo " checked='1' "; ?>> 频道封面(栏目本身不允许发布文档)</label><br> | |||
<label><input name="ispart" type="radio" id="radio3" value="2" class='np' <?php if ($myrow['ispart'] == 2) echo " checked='1' "; ?>> 外部连接(在"文件保存目录"处填写网址)</label> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td align="center" colspan="2" height="54" bgcolor='#FAFEE0'> | |||
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" border="0" class="np" /> | |||
| |||
<a title='关闭' onclick='CloseMsg()'><img src="images/button_back.gif" width="60" height="22" border="0"></a> | |||
<td align="center" colspan="2" height="50" bgcolor='#FAFEE0'> | |||
<button onclick='getSelCat("<?php echo $targetid; ?>");' class='btn btn-success'>保存</button> | |||
<button type='button' onclick='CloseMsg()' class='btn btn-success'>关闭</button> | |||
</td> | |||
</tr> | |||
</table> | |||
</form> | |||
<?php | |||
exit(); | |||
exit(); | |||
} else { | |||
include DedeInclude('templets/catalog_edit.htm'); | |||
} |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 管理目录配置文件 | |||
* | |||
@@ -10,35 +9,23 @@ | |||
* @link https://www.dedebiz.com | |||
*/ | |||
define('DEDEADMIN', str_replace("\\", '/', dirname(__FILE__))); | |||
require_once(DEDEADMIN.'/../include/common.inc.php'); | |||
require_once(DEDEINC.'/userlogin.class.php'); | |||
require_once(DEDEADMIN . '/../include/common.inc.php'); | |||
require_once(DEDEINC . '/userlogin.class.php'); | |||
header('Cache-Control:private'); | |||
$dsql->safeCheck = FALSE; | |||
$dsql->SetLongLink(); | |||
$cfg_admin_skin = 1; // 后台管理风格 | |||
if (file_exists(DEDEDATA.'/admin/skin.txt')) { | |||
$skin = file_get_contents(DEDEDATA.'/admin/skin.txt'); | |||
$cfg_admin_skin = 1;//后台管理风格 | |||
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; | |||
} | |||
// 检查CSRF | |||
//检查CSRF | |||
function CheckCSRF() | |||
{ | |||
$cc_csrf_token_check = GetCookie("dede_csrf_token"); | |||
if ( | |||
!(isset($_POST['_csrf_token'], $cc_csrf_token_check) | |||
&& is_string($_POST['_csrf_token']) && is_string($cc_csrf_token_check) | |||
&& hash_equals($_POST['_csrf_token'], $cc_csrf_token_check)) | |||
) { | |||
ShowMsg('CSRF校验失败,请刷新页面重新提交', '-1'); | |||
exit(); | |||
} | |||
DropCookie("dede_csrf_token"); | |||
} | |||
// 生成CSRF校验token,在比较重要的表单中应该要加上这个token校验 | |||
//生成CSRF校验token,在比较重要的表单中应该要加上这个token校验 | |||
$cc_csrf_token = GetCookie("dede_csrf_token"); | |||
if (!isset($GLOBALS['csrf_token']) || $GLOBALS['csrf_token'] === null) { | |||
if ( | |||
@@ -50,32 +37,26 @@ if (!isset($GLOBALS['csrf_token']) || $GLOBALS['csrf_token'] === null) { | |||
$GLOBALS['csrf_token'] = md5(uniqid(mt_rand(), TRUE)); | |||
} | |||
} | |||
if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') { | |||
PutCookie('dede_csrf_token', $GLOBALS['csrf_token'], 7200, '/'); | |||
} | |||
//获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 | |||
//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行更改这个选项 | |||
$dedeNowurl = $s_scriptName = ''; | |||
$isUrlOpen = @ini_get('allow_url_fopen'); | |||
$dedeNowurl = GetCurUrl(); | |||
$dedeNowurls = explode('?', $dedeNowurl); | |||
$s_scriptName = $dedeNowurls[0]; | |||
//检验用户登录状态 | |||
$cuserLogin = new userLogin(); | |||
if ($cuserLogin->getUserID() == -1) { | |||
if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { | |||
$dirname = dirname($_SERVER['SCRIPT_NAME']); | |||
header("location:{$dirname}/login.php?gotopage=".urlencode($dedeNowurl)); | |||
header("location:{$dirname}/login.php?gotopage=" . urlencode($dedeNowurl)); | |||
} else { | |||
header("location:login.php?gotopage=".urlencode($dedeNowurl)); | |||
header("location:login.php?gotopage=" . urlencode($dedeNowurl)); | |||
} | |||
exit(); | |||
} | |||
function XSSClean($val) | |||
{ | |||
if (is_array($val)) { | |||
@@ -87,7 +68,6 @@ function XSSClean($val) | |||
} | |||
return RemoveXss($val); | |||
} | |||
if ($cfg_dede_log == 'Y') { | |||
$s_nologfile = '_main|_list'; | |||
$s_needlogfile = 'sys_|file_'; | |||
@@ -96,22 +76,19 @@ if ($cfg_dede_log == 'Y') { | |||
$s_scriptNames = explode('/', $s_scriptName); | |||
$s_scriptNames = $s_scriptNames[count($s_scriptNames) - 1]; | |||
$s_userip = GetIP(); | |||
if ($s_method == 'POST' || (!preg_match("#".$s_nologfile."#i", $s_scriptNames) && $s_query != '') || preg_match("#".$s_needlogfile."#i", $s_scriptNames)) { | |||
if ($s_method == 'POST' || (!preg_match("#" . $s_nologfile . "#i", $s_scriptNames) && $s_query != '') || preg_match("#" . $s_needlogfile . "#i", $s_scriptNames)) { | |||
$inquery = "INSERT INTO `#@__log`(adminid,filename,method,query,cip,dtime) | |||
VALUES ('".$cuserLogin->getUserID()."','{$s_scriptNames}','{$s_method}','".addslashes($s_query)."','{$s_userip}','".time()."');"; | |||
VALUES ('" . $cuserLogin->getUserID() . "','{$s_scriptNames}','{$s_method}','" . addslashes($s_query) . "','{$s_userip}','" . time() . "');"; | |||
$dsql->ExecuteNoneQuery($inquery); | |||
} | |||
} | |||
//管理缓存、管理员频道缓存 | |||
$cache1 = DEDEDATA.'/cache/inc_catalog_base.inc'; | |||
//管理缓存管理员频道缓存 | |||
$cache1 = DEDEDATA . '/cache/inc_catalog_base.inc'; | |||
if (!file_exists($cache1)) UpDateCatCache(); | |||
$cacheFile = DEDEDATA.'/cache/admincat_'.$cuserLogin->userID.'.inc'; | |||
$cacheFile = DEDEDATA . '/cache/admincat_' . $cuserLogin->userID . '.inc'; | |||
if (file_exists($cacheFile)) require_once($cacheFile); | |||
//更新服务器 | |||
require_once(DEDEDATA.'/admin/config_update.php'); | |||
require_once(DEDEDATA . '/admin/config_update.php'); | |||
if (strlen($cfg_cookie_encode) <= 10) { | |||
$chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; | |||
$hash = ''; | |||
@@ -121,28 +98,27 @@ if (strlen($cfg_cookie_encode) <= 10) { | |||
$hash .= $chars[mt_rand(0, $max)]; | |||
} | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='{$hash}' WHERE varname='cfg_cookie_encode' "); | |||
$configfile = DEDEDATA.'/config.cache.inc.php'; | |||
$configfile = DEDEDATA . '/config.cache.inc.php'; | |||
if (!is_writeable($configfile)) { | |||
echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数!"; | |||
exit(); | |||
} | |||
$fp = fopen($configfile, 'w'); | |||
flock($fp, 3); | |||
fwrite($fp, "<"."?php\r\n"); | |||
fwrite($fp, "<" . "?php\r\n"); | |||
$dsql->SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); | |||
$dsql->Execute(); | |||
while ($row = $dsql->GetArray()) { | |||
if ($row['type'] == 'number') { | |||
if ($row['value'] == '') $row['value'] = 0; | |||
fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n"); | |||
fwrite($fp, "\${$row['varname']} = " . $row['value'] . ";\r\n"); | |||
} else { | |||
fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n"); | |||
fwrite($fp, "\${$row['varname']} = '" . str_replace("'", '', $row['value']) . "';\r\n"); | |||
} | |||
} | |||
fwrite($fp, "?".">"); | |||
fwrite($fp, "?" . ">"); | |||
fclose($fp); | |||
} | |||
/** | |||
* 更新栏目缓存 | |||
* | |||
@@ -152,8 +128,8 @@ if (strlen($cfg_cookie_encode) <= 10) { | |||
function UpDateCatCache() | |||
{ | |||
global $dsql, $cache1, $cuserLogin; | |||
$cache2 = DEDEDATA.'/cache/channelsonlist.inc'; | |||
$cache3 = DEDEDATA.'/cache/channeltoplist.inc'; | |||
$cache2 = DEDEDATA . '/cache/channelsonlist.inc'; | |||
$cache3 = DEDEDATA . '/cache/channeltoplist.inc'; | |||
$dsql->SetQuery("SELECT id,reid,channeltype,issend,typename FROM `#@__arctype`"); | |||
$dsql->Execute(); | |||
$fp1 = fopen($cache1, 'w'); | |||
@@ -161,7 +137,7 @@ function UpDateCatCache() | |||
$fp1Header = "<{$phph}php\r\nglobal \$cfg_Cs;\r\n\$cfg_Cs=array();\r\n"; | |||
fwrite($fp1, $fp1Header); | |||
while ($row = $dsql->GetObject()) { | |||
// 将typename缓存起来 | |||
//将typename缓存起来 | |||
$row->typename = base64_encode($row->typename); | |||
fwrite($fp1, "\$cfg_Cs[{$row->id}]=array({$row->reid},{$row->channeltype},{$row->issend},'{$row->typename}');\r\n"); | |||
} | |||
@@ -171,12 +147,11 @@ function UpDateCatCache() | |||
@unlink($cache2); | |||
@unlink($cache3); | |||
} | |||
// 清空选项缓存 | |||
//清空选项缓存 | |||
function ClearOptCache() | |||
{ | |||
$tplCache = DEDEDATA.'/tplcache/'; | |||
$fileArray = glob($tplCache."inc_option_*.inc"); | |||
$tplCache = DEDEDATA . '/tplcache/'; | |||
$fileArray = glob($tplCache . "inc_option_*.inc"); | |||
if (count($fileArray) > 1) { | |||
foreach ($fileArray as $key => $value) { | |||
if (file_exists($value)) unlink($value); | |||
@@ -186,7 +161,6 @@ function ClearOptCache() | |||
} | |||
return FALSE; | |||
} | |||
/** | |||
* 引入模板文件 | |||
* | |||
@@ -197,9 +171,8 @@ function ClearOptCache() | |||
*/ | |||
function DedeInclude($filename, $isabs = FALSE) | |||
{ | |||
return $isabs ? $filename : DEDEADMIN.'/'.$filename; | |||
return $isabs ? $filename : DEDEADMIN . '/' . $filename; | |||
} | |||
/** | |||
* 根据用户mid获取用户名称 | |||
* | |||
@@ -217,4 +190,4 @@ if (!function_exists('GetMemberName')) { | |||
$rs = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='{$mid}' "); | |||
return $rs['uname']; | |||
} | |||
} | |||
} |
@@ -133,7 +133,7 @@ else if ($action == 'move') { | |||
exit(); | |||
} | |||
if ($typenew['ispart'] != 0) { | |||
ShowMsg("你不能把数据移动到非最终列表的栏目!", "javascript:;"); | |||
ShowMsg("您不能把数据移动到非最终列表的栏目!", "javascript:;"); | |||
exit(); | |||
} | |||
if ($typenew['channeltype'] != $typeold['channeltype']) { | |||
@@ -39,7 +39,7 @@ if (TestPurview('a_List')) {; | |||
$admin_catalog = join(',', $admin_catalogs); | |||
$userCatalogSql = " arc.typeid IN($admin_catalog) "; | |||
} else { | |||
CheckCatalog($cid, '你无权浏览非指定栏目的内容!'); | |||
CheckCatalog($cid, '您无权浏览非指定栏目的内容!'); | |||
} | |||
if (TestPurview('a_MyList')) $mid = $cuserLogin->getUserID(); | |||
} | |||
@@ -30,7 +30,7 @@ if (TestPurview('a_List')) { | |||
if ($cid == 0) { | |||
$ucid = $cid = $cuserLogin->getUserChannel(); | |||
} else { | |||
CheckCatalog($cid, "你无权浏览非指定栏目的内容!"); | |||
CheckCatalog($cid, "您无权浏览非指定栏目的内容!"); | |||
} | |||
} | |||
@@ -43,7 +43,7 @@ setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||
$tl = new TypeLink($cid); | |||
$listtable = @trim($tl->TypeInfos['addtable']); | |||
if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $channelid) { | |||
ShowMsg('你没权限访问此页!', 'javascript:;'); | |||
ShowMsg('您没权限访问此页!', 'javascript:;'); | |||
exit(); | |||
} | |||
@@ -12,7 +12,7 @@ | |||
require_once(dirname(__FILE__)."/../../include/common.inc.php"); | |||
require_once(DEDEINC."/userlogin.class.php"); | |||
//获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 | |||
//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行更改这个选项 | |||
$dedeNowurl = ''; | |||
$s_scriptName = ''; | |||
$isUrlOpen = @ini_get('allow_url_fopen'); | |||
@@ -27,14 +27,14 @@ if (empty($imgfile)) { | |||
$imgfile = ''; | |||
} | |||
if (!is_uploaded_file($imgfile)) { | |||
ShowMsg("你没有选择上传的文件!".$imgfile, "-1"); | |||
ShowMsg("您没有选择上传的文件!".$imgfile, "-1"); | |||
exit(); | |||
} | |||
$CKEditorFuncNum = (isset($CKEditorFuncNum)) ? $CKEditorFuncNum : 1; | |||
$imgfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $imgfile_name)); | |||
if (!preg_match("#\.(".$cfg_imgtype.")#i", $imgfile_name)) { | |||
ShowMsg("你所上传的图片类型不在许可列表,请更改系统对扩展名限定的配置!", "-1"); | |||
ShowMsg("您所上传的图片类型不在许可列表,请更改系统对扩展名限定的配置!", "-1"); | |||
exit(); | |||
} | |||
$nowtme = time(); | |||
@@ -22,7 +22,7 @@ $uploadfile = isset($imgfile) && empty($uploadfile) ? $imgfile : $uploadfile; | |||
$uploadfile_name = isset($imgfile_name) && empty($uploadfile_name) ? $imgfile_name : $uploadfile_name; | |||
if (!is_uploaded_file($uploadfile)) { | |||
ShowMsg("你没有选择上传的文件或选择的文件大小超出限制!", "-1"); | |||
ShowMsg("您没有选择上传的文件或选择的文件大小超出限制!", "-1"); | |||
exit(); | |||
} | |||
@@ -32,7 +32,7 @@ $cfg_softtype = $cfg_softtype; | |||
$cfg_softtype = str_replace('||', '|', $cfg_softtype); | |||
$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | |||
if (!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) { | |||
ShowMsg("你所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!", ""); | |||
ShowMsg("您所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!", ""); | |||
exit(); | |||
} | |||
@@ -52,7 +52,7 @@ if (!empty($newname)) { | |||
if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); | |||
else $fs = explode('.', $filename); | |||
if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { | |||
ShowMsg("你指定的文件名被系统禁止!", 'javascript:;'); | |||
ShowMsg("您指定的文件名被系统禁止!", 'javascript:;'); | |||
exit(); | |||
} | |||
if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; | |||
@@ -60,7 +60,7 @@ if (!empty($newname)) { | |||
$filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); | |||
$fs = explode('.', $uploadfile_name); | |||
if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { | |||
ShowMsg("你上传了某些可能存在不安全因素的文件,系统拒绝操作!", 'javascript:;'); | |||
ShowMsg("您上传了某些可能存在不安全因素的文件,系统拒绝操作!", 'javascript:;'); | |||
exit(); | |||
} | |||
$filename = $filename.'.'.$fs[count($fs) - 1]; | |||
@@ -16,15 +16,15 @@ if (empty($uploadfile)) { | |||
$uploadfile = ""; | |||
} | |||
if (!is_uploaded_file($uploadfile)) { | |||
ShowMsg("你没有选择上传的文件!", "-1"); | |||
ShowMsg("您没有选择上传的文件!", "-1"); | |||
exit(); | |||
} | |||
if (!preg_match("#^text#", $uploadfile_type)) { | |||
ShowMsg("你上传的不是文本类型附件!", "-1"); | |||
ShowMsg("您上传的不是文本类型附件!", "-1"); | |||
exit(); | |||
} | |||
if (!preg_match("#\.(".$cfg_txttype.")#i", $uploadfile_name)) { | |||
ShowMsg("你所上传的模板文件类型不能被识别,只允许htm、html、tpl、txt扩展名!", "-1"); | |||
ShowMsg("您所上传的模板文件类型不能被识别,只允许htm、html、tpl、txt扩展名!", "-1"); | |||
exit(); | |||
} | |||
if ($filename != '') { | |||
@@ -33,7 +33,7 @@ if ($filename != '') { | |||
$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | |||
$filename = $uploadfile_name; | |||
if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { | |||
ShowMsg("你所上传的文件存在问题,请检查文件类型是否适合!", "-1"); | |||
ShowMsg("您所上传的文件存在问题,请检查文件类型是否适合!", "-1"); | |||
exit(); | |||
} | |||
} | |||
@@ -45,7 +45,7 @@ function __Delete() | |||
$win->AddHidden("job", "yes"); | |||
$win->AddHidden("dopost", $dopost); | |||
$win->AddHidden("diyid", $diyid); | |||
$win->AddTitle("!将删除所有与该自定义表单相关的文件和数据<br />你确实要删除 \"".$row['name']."\" 这个自定义表单?"); | |||
$win->AddTitle("!将删除所有与该自定义表单相关的文件和数据<br />您确实要删除 \"".$row['name']."\" 这个自定义表单?"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
exit(); | |||
@@ -55,7 +55,7 @@ function __Delete() | |||
else if ($job == "yes") { | |||
$row = $dsql->GetOne("SELECT `table` FROM `#@__diyforms` WHERE diyid='$diyid'", MYSQL_ASSOC); | |||
if (!is_array($row)) { | |||
ShowMsg("你所指定的自定义表单信息不存在!", "-1"); | |||
ShowMsg("您所指定的自定义表单信息不存在!", "-1"); | |||
exit(); | |||
} | |||
@@ -45,7 +45,7 @@ function _SAVE() | |||
if ($action == 'save') { | |||
if (!isset($fieldtypes[$dtype])) { | |||
ShowMsg("你修改的是系统专用类型的数据,禁止操作!", "-1"); | |||
ShowMsg("您修改的是系统专用类型的数据,禁止操作!", "-1"); | |||
exit(); | |||
} | |||
@@ -86,7 +86,7 @@ if ($action == 'post') { | |||
$query = "SELECT * FROM {$diy->table} WHERE id=$id"; | |||
$row = $dsql->GetOne($query); | |||
if (!is_array($row)) { | |||
showmsg("你访问的记录不存在或未经审核", '-1'); | |||
showmsg("您访问的记录不存在或未经审核", '-1'); | |||
exit(); | |||
} | |||
$postform = $diy->getForm('edit', $row, 'admin'); | |||
@@ -85,7 +85,7 @@ if ($dopost == "delete") { | |||
$win->AddHidden("fmdo", "yes"); | |||
$win->AddHidden("dopost", $dopost); | |||
$win->AddHidden("id", $id); | |||
$win->AddTitle("你确实要删除“ $id ”这些错误提示?"); | |||
$win->AddTitle("您确实要删除“ $id ”这些错误提示?"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
exit(); | |||
@@ -36,7 +36,7 @@ function jsTrimjajx($str, $len) | |||
if (!empty($job)) { | |||
$ids = preg_replace("#[^0-9,]#", '', $fid); | |||
if (empty($ids)) { | |||
ShowMsg("你没选中任何选项!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); | |||
ShowMsg("您没选中任何选项!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); | |||
exit; | |||
} | |||
} else { | |||
@@ -87,7 +87,7 @@ class FileManagement | |||
return 0; | |||
} | |||
} else { | |||
ShowMsg("对不起,你移动的路径不合法!", "-1", 0, 5000); | |||
ShowMsg("对不起,您移动的路径不合法!", "-1", 0, 5000); | |||
return 0; | |||
} | |||
} | |||
@@ -81,9 +81,9 @@ else if ($fmdo == "del") { | |||
$win->AddHidden("activepath", $activepath); | |||
$win->AddHidden("filename", $filename); | |||
if (@is_dir($cfg_basedir.$activepath."/$filename")) { | |||
$wmsg = "你确信要删除目录:$filename 吗?"; | |||
$wmsg = "您确信要删除目录:$filename 吗?"; | |||
} else { | |||
$wmsg = "你确信要删除文件:$filename 吗?"; | |||
$wmsg = "您确信要删除文件:$filename 吗?"; | |||
} | |||
$win->AddTitle("删除文件确认"); | |||
$win->AddMsgItem($wmsg, "50"); | |||
@@ -36,7 +36,7 @@ if ($dopost == "delete") { | |||
ShowMsg("成功删除指定链接!", $ENV_GOBACK_URL); | |||
exit(); | |||
} else { | |||
ShowMsg("你没选定任何链接!", $ENV_GOBACK_URL); | |||
ShowMsg("您没选定任何链接!", $ENV_GOBACK_URL); | |||
exit(); | |||
} | |||
} else if ($dopost == "saveedit") { | |||
@@ -259,7 +259,7 @@ $actionSearch[6] = array( | |||
), | |||
7 => array( | |||
'title' => '汇款账号设置', | |||
'description' => '银行付款的账号设置,用户可以查看到你的银行付款账号方便支付', | |||
'description' => '银行付款的账号设置,用户可以查看到您的银行付款账号方便支付', | |||
'purview' => 'sys_Data', | |||
'linkurl' => 'shops_bank.php' | |||
), | |||
@@ -6,35 +6,31 @@ | |||
* @license https://www.dedebiz.com/license | |||
* @link https://www.dedebiz.com | |||
*/ | |||
document.write("<style type=\"text/css\">.close{float:right;cursor:default;}</style>") | |||
document.write("<style type=\"text/css\">.close{float:right;font-size:14px;cursor:pointer}</style>") | |||
function editTitle(aid) { | |||
var show = document.getElementById("show_news"); | |||
var myajax = new DedeAjax(show, false, false, "", "", ""); | |||
myajax.SendGet2("catalog_edit.php?dopost=time&id=" + aid); | |||
DedeXHTTP = null; | |||
} | |||
function $Dede(id) { return document.getElementById(id) } | |||
function AlertMsg(title, id) { | |||
var msgw, msgh, msgbg, msgcolor, bordercolor, titlecolor, titlebg, content; | |||
//弹出窗口设置 | |||
msgw = 600; //窗口宽度 | |||
msgh = 400; //窗口高度 | |||
msgbg = "#FFF"; //内容背景 | |||
msgcolor = "#000"; //内容颜色 | |||
bordercolor = "#5A6D58"; //边框颜色 | |||
titlecolor = "#254015"; //标题颜色 | |||
titlebg = "#369 url(images/tbg.gif)"; //标题背景 | |||
msgw = 600;//窗口宽度 | |||
msgbg = "#FFF";//内容背景 | |||
msgcolor = "#000";//内容颜色 | |||
bordercolor = "#5A6D58";//边框颜色 | |||
titlecolor = "#254015";//标题颜色 | |||
titlebg = "#369 url(images/tbg.gif)";//标题背景 | |||
//遮罩背景设置 | |||
content = "<div id=show_news>对不起,载入失败</div>"; | |||
var sWidth, sHeight; | |||
sWidth = screen.availWidth; | |||
if (screen.availHeight > document.body.scrollHeight) { | |||
sHeight = screen.availHeight; //少于一屏 | |||
sHeight = screen.availHeight;//少于一屏 | |||
} else { | |||
sHeight = document.body.scrollHeight; //多于一屏 | |||
sHeight = document.body.scrollHeight;//多于一屏 | |||
} | |||
//创建遮罩背景 | |||
var maskObj = document.createElement("div"); | |||
@@ -42,7 +38,7 @@ function AlertMsg(title, id) { | |||
maskObj.style.position = "absolute"; | |||
maskObj.style.top = "0"; | |||
maskObj.style.left = "0"; | |||
maskObj.style.background = "#777"; | |||
maskObj.style.background = "#666"; | |||
maskObj.style.filter = "Alpha(opacity=30);"; | |||
maskObj.style.opacity = "0.3"; | |||
maskObj.style.width = sWidth + "px"; | |||
@@ -59,7 +55,7 @@ function AlertMsg(title, id) { | |||
msgObj.style.left = "100px"; | |||
msgObj.style.width = msgw + "px"; | |||
msgObj.style.height = msgh + "px"; | |||
msgObj.style.fontSize = "12px"; | |||
msgObj.style.fontSize = "14px"; | |||
msgObj.style.background = msgbg; | |||
msgObj.style.border = "1px solid " + bordercolor; | |||
msgObj.style.zIndex = "10001"; | |||
@@ -67,13 +63,13 @@ function AlertMsg(title, id) { | |||
var thObj = document.createElement("div"); | |||
thObj.setAttribute("id", "msgth"); | |||
thObj.className = "DragAble"; | |||
thObj.title = "按住鼠标左键可以拖动窗口!"; | |||
thObj.title = "按住鼠标左键可以拖动窗口"; | |||
thObj.style.cursor = "move"; | |||
thObj.style.padding = "4px 6px"; | |||
thObj.style.padding = "10px"; | |||
thObj.style.color = titlecolor; | |||
thObj.style.fontWeight = 'bold'; | |||
thObj.style.background = titlebg; | |||
var titleStr = "<a class='close' title='关闭' style='cursor:pointer' onclick='CloseMsg()'>关闭</a>" + "<span>" + title + "</span>"; | |||
var titleStr = "<a class='close' onclick='CloseMsg()'>关闭</a>" + "<span>" + title + "</span>"; | |||
thObj.innerHTML = titleStr; | |||
//创建内容 | |||
var bodyObj = document.createElement("div"); | |||
@@ -102,7 +98,6 @@ var nn6 = document.getElementById && !document.all; | |||
var isdrag = false; | |||
var y, x; | |||
var oDragObj; | |||
function moveMouse(e) { | |||
if (isdrag) { | |||
oDragObj.style.top = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) + "px"; | |||
@@ -110,7 +105,6 @@ function moveMouse(e) { | |||
return false; | |||
} | |||
} | |||
function initDrag(e) { | |||
var oDragHandle = nn6 ? e.target : event.srcElement; | |||
var topElement = "HTML"; | |||
@@ -129,4 +123,4 @@ function initDrag(e) { | |||
} | |||
} | |||
document.onmousedown = initDrag; | |||
document.onmouseup = new Function("isdrag=false"); | |||
document.onmouseup = new Function("isdrag=false"); |
@@ -13,7 +13,7 @@ function fileQueueError(file, errorCode, message) { | |||
var imageName = "error.gif"; | |||
var errorName = ""; | |||
if (errorCode === SWFUpload.errorCode_QUEUE_LIMIT_EXCEEDED) { | |||
errorName = "你添加的文件超过了限制!"; | |||
errorName = "您添加的文件超过了限制!"; | |||
} | |||
if (errorName !== "") { | |||
@@ -22,7 +22,7 @@ function noselAll() | |||
function delkey() | |||
{ | |||
if(window.confirm("你确实要删除选定的关键字么?")) | |||
if(window.confirm("您确实要删除选定的关键字么?")) | |||
{ | |||
document.form3.dopost.value = 'del'; | |||
document.form3.submit(); | |||
@@ -31,7 +31,7 @@ function delkey() | |||
function diskey() | |||
{ | |||
if(window.confirm("你确实要禁用选定的关键字么?")) | |||
if(window.confirm("您确实要禁用选定的关键字么?")) | |||
{ | |||
document.form3.dopost.value = 'dis'; | |||
document.form3.submit(); | |||
@@ -40,7 +40,7 @@ function diskey() | |||
function enakey() | |||
{ | |||
if(window.confirm("你确实要启用选定的关键字么?")) | |||
if(window.confirm("您确实要启用选定的关键字么?")) | |||
{ | |||
document.form3.dopost.value = 'ena'; | |||
document.form3.submit(); | |||
@@ -49,7 +49,7 @@ function enakey() | |||
function urlkey() | |||
{ | |||
if(window.confirm("你确实要更新选定的关键字的网址么?")) | |||
if(window.confirm("您确实要更新选定的关键字的网址么?")) | |||
{ | |||
document.form3.dopost.value = 'url'; | |||
document.form3.submit(); | |||
@@ -58,7 +58,7 @@ function urlkey() | |||
function rankey() | |||
{ | |||
if(window.confirm("你确实要改变选定的关键字的频率么?")) | |||
if(window.confirm("您确实要改变选定的关键字的频率么?")) | |||
{ | |||
document.form3.dopost.value = 'ran'; | |||
document.form3.submit(); | |||
@@ -67,7 +67,7 @@ function rankey() | |||
// 批量删除搜多关键字 | |||
function delall() | |||
{ | |||
if(window.confirm("你确实要删除选定的关键字么?")) | |||
if(window.confirm("您确实要删除选定的关键字么?")) | |||
{ | |||
document.form3.dopost.value = 'delall'; | |||
document.form3.submit(); | |||
@@ -12,7 +12,7 @@ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('sys_Log'); | |||
if (empty($dopost)) { | |||
ShowMsg("你没指定任何参数!", "javascript:;"); | |||
ShowMsg("您没指定任何参数!", "javascript:;"); | |||
exit(); | |||
} | |||
@@ -37,6 +37,6 @@ if ($dopost == "clear") { | |||
ShowMsg("成功删除指定的日志!", $bkurl); | |||
exit(); | |||
} else { | |||
ShowMsg("无法识别你的请求!", "javascript:;"); | |||
ShowMsg("无法识别您的请求!", "javascript:;"); | |||
exit(); | |||
} |
@@ -71,11 +71,11 @@ if ($dopost == 'login') { | |||
//error | |||
else if ($res == -1) { | |||
ResetVdValue(); | |||
ShowMsg('你的用户名不存在', 'login.php', 0, 1000); | |||
ShowMsg('您的用户名不存在', 'login.php', 0, 1000); | |||
exit; | |||
} else { | |||
ResetVdValue(); | |||
ShowMsg('你的密码错误', 'login.php', 0, 1000); | |||
ShowMsg('您的密码错误', 'login.php', 0, 1000); | |||
exit; | |||
} | |||
} | |||
@@ -66,7 +66,7 @@ if ($dopost == "view") { | |||
$homeFile = DEDEADMIN."/".$position; | |||
$homeFile = str_replace("\\", "/", $homeFile); | |||
$homeFile = str_replace("//", "/", $homeFile); | |||
$fp = fopen($homeFile, "w") or die("你指定的文件名有问题,无法创建文件"); | |||
$fp = fopen($homeFile, "w") or die("您指定的文件名有问题,无法创建文件"); | |||
fclose($fp); | |||
if ($saveset == 1) { | |||
$iquery = "UPDATE `#@__homepageset` SET templet='$templet',position='$position' "; | |||
@@ -62,7 +62,7 @@ if ($dopost == "upload") { | |||
漏洞描述:dedecms早期版本后台存在大量的富文本编辑器,该控件提供了一些文件上传接口,同时dedecms对上传文件的后缀类型未进行严格的限制,这导致了黑客可以上传WEBSHELL,获取网站后台权限。 | |||
*/ | |||
if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)[^a-zA-Z0-9]+$#i', trim($filename))) { | |||
ShowMsg("你指定的文件名被系统禁止!", "javascript:;"); | |||
ShowMsg("您指定的文件名被系统禁止!", "javascript:;"); | |||
exit(); | |||
} | |||
$fullfilename = $cfg_basedir.$filename; | |||
@@ -85,27 +85,27 @@ function __save_edit() //保存更改 | |||
if ($mediatype == 1) { | |||
$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); | |||
if (!in_array($upfile_type, $sparr)) { | |||
ShowMsg("你上传的不是图片类型的文件!", "javascript:history.go(-1);"); | |||
ShowMsg("您上传的不是图片类型的文件!", "javascript:history.go(-1);"); | |||
exit(); | |||
} | |||
} else if ($mediatype == 2) { | |||
$sparr = array("application/x-shockwave-flash"); | |||
if (!in_array($upfile_type, $sparr)) { | |||
ShowMsg("你上传的不是Flash类型的文件!", "javascript:history.go(-1);"); | |||
ShowMsg("您上传的不是Flash类型的文件!", "javascript:history.go(-1);"); | |||
exit(); | |||
} | |||
} else if ($mediatype == 3) { | |||
if (!preg_match('#audio|media|video#i', $upfile_type)) { | |||
ShowMsg("你上传的为不正确类型的影音文件!", "javascript:history.go(-1);"); | |||
ShowMsg("您上传的为不正确类型的影音文件!", "javascript:history.go(-1);"); | |||
exit(); | |||
} | |||
if (!preg_match("#\.".$cfg_mediatype."#", $upfile_name)) { | |||
ShowMsg("你上传的影音文件扩展名无法被识别,请更改系统配置的参数!", "javascript:history.go(-1);"); | |||
ShowMsg("您上传的影音文件扩展名无法被识别,请更改系统配置的参数!", "javascript:history.go(-1);"); | |||
exit(); | |||
} | |||
} else { | |||
if (!preg_match("#\.".$cfg_softtype."#", $upfile_name)) { | |||
ShowMsg("你上传的附件扩展名无法被识别,请更改系统配置的参数!", "javascript:history.go(-1);"); | |||
ShowMsg("您上传的附件扩展名无法被识别,请更改系统配置的参数!", "javascript:history.go(-1);"); | |||
exit(); | |||
} | |||
} | |||
@@ -72,7 +72,7 @@ if ($dopost == "delmember") { | |||
$win->AddHidden("id", $id); | |||
$win->AddHidden("randcode", $randcode); | |||
$win->AddHidden("safecode", $safecode); | |||
$win->AddTitle("你确实要删除(ID:".$id.")这个会员?"); | |||
$win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); | |||
$win->AddMsgItem("安全验证串:<input name='safecode' type='text' id='safecode' size='16' style='width:200px' /> (复制本代码: <font color='red'>$safecode</font> )", "30"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
@@ -121,7 +121,7 @@ if ($dopost == "delmember") { | |||
$win->AddHidden("id", $id); | |||
$win->AddHidden("randcode", $randcode); | |||
$win->AddHidden("safecode", $safecode); | |||
$win->AddTitle("你确实要删除(ID:".$id.")这个会员?"); | |||
$win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); | |||
$win->AddMsgItem(" 安全验证串:<input name='safecode' type='text' id='safecode' size='16' style='width:200px' /> (复制本代码: <font color='red'>$safecode</font>)", "30"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
@@ -33,7 +33,7 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = true) | |||
if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { | |||
$i++; | |||
} else { | |||
return $msgtitle.'可能含有乱码,建议你改用英文字母和数字组合!'; | |||
return $msgtitle.'可能含有乱码,建议您改用英文字母和数字组合!'; | |||
} | |||
} else { | |||
if (preg_match("#[^0-9a-z@\.-]i#", $ck_uid[$i])) { | |||
@@ -63,7 +63,7 @@ if ($action == "post") { | |||
} | |||
$row = $dsql->GetOne("Select * From `#@__member` where userid like '$msgtoid' "); | |||
if (!is_array($row)) { | |||
ShowMsg("你指定的用户不存在,不能发送信息!", "-1"); | |||
ShowMsg("您指定的用户不存在,不能发送信息!", "-1"); | |||
exit(); | |||
} | |||
$subject = cn_substrR(HtmlReplace($subject, 1), 60); | |||
@@ -115,7 +115,7 @@ function Setup(); | |||
exit; | |||
} | |||
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br /><font color="red">(这个模块的语言编码与你系统的编码不一致,请向开发者确认它的兼容性)</font>'); | |||
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br /><font color="red">(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)</font>'); | |||
$filelists = $dm->GetFileLists($hash); | |||
$filelist = ''; | |||
@@ -314,7 +314,7 @@ function DelModule(); | |||
$dm = new DedeModule($mdir); | |||
$infos = $dm->GetModuleInfo($hash); | |||
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br /><font color="red">(这个模块的语言编码与你系统的编码不一致,请向开发者确认它的兼容性)</font>'); | |||
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br /><font color="red">(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)</font>'); | |||
$dev_id = empty($infos['dev_id'])? "未认证 <a style='color:red' target='_blank' href='{$cfg_biz_dedebizUrl}/developer'>前去认证</a>" : "{$infos['dev_id']} <a class='btn btn-success btn-sm' target='_blank' href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}'>查看详情</a>"; | |||
$win = new OxWindow(); | |||
$win->Init("module_main.php", "js/blank.js", "post"); | |||
@@ -350,7 +350,7 @@ function DelModule(); | |||
</tr> | |||
<tr> | |||
<td height='28' colspan='2'> | |||
删除模块仅删除这个模块的安装包文件,如果你已经安装,请执行<a href='module_main.php?hash={$hash}&action=uninstall'><u>卸载程序</u></a>来删除! | |||
删除模块仅删除这个模块的安装包文件,如果您已经安装,请执行<a href='module_main.php?hash={$hash}&action=uninstall'><u>卸载程序</u></a>来删除! | |||
</td> | |||
</tr> | |||
</table> | |||
@@ -374,7 +374,7 @@ function UnInstall(); | |||
$infos = $dm->GetModuleInfo($hash); | |||
if ($infos['url'] == '') $infos['url'] = ' '; | |||
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br /><font color="red">(这个模块的语言编码与你系统的编码不一致,请向开发者确认它的兼容性)</font>'); | |||
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br /><font color="red">(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)</font>'); | |||
$filelists = $dm->GetFileLists($hash); | |||
$filelist = ''; | |||
@@ -506,7 +506,7 @@ function ViewOne(); | |||
$infos = $dm->GetModuleInfo($hash); | |||
if ($infos['url'] == '') $infos['url'] = ' '; | |||
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br /><font color="red">(这个模块的语言编码与你系统的编码不一致,请向开发者确认它的兼容性)</font>'); | |||
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br /><font color="red">(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)</font>'); | |||
$filelists = $dm->GetFileLists($hash); | |||
$filelist = ''; | |||
@@ -40,7 +40,7 @@ function Makemodule() | |||
$filelist = str_replace("\r", "\n", trim($filelist)); | |||
$filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); | |||
if ($filelist == '') { | |||
ShowMsg("对不起,你没有指定模块的文件列表,因此不能创建项目!", "-1"); | |||
ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目!", "-1"); | |||
exit(); | |||
} | |||
if (empty($dev_id)) { | |||
@@ -89,14 +89,14 @@ function Makemodule() | |||
if ($dm->HasModule($hashcode)) { | |||
$dm->Clear(); | |||
ShowMsg("对不起,你指定同名模块已经存在,因此不能创建项目!<br>如果你要更新这个模块,请先删除:module/{$hashcode}.xml", "-1"); | |||
ShowMsg("对不起,您指定同名模块已经存在,因此不能创建项目!<br>如果您要更新这个模块,请先删除:module/{$hashcode}.xml", "-1"); | |||
exit(); | |||
} | |||
$readmef = $setupf = $uninstallf = ''; | |||
if (empty($readmetxt)) { | |||
move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("你没填写说明或上传说明文件!"); | |||
move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("您没填写说明或上传说明文件!"); | |||
$readmef = $dm->GetEncodeFile($mdir."/{$hashcode}-r.html", TRUE); | |||
} else { | |||
$readmetxt = "<p style='line-height:150%'>".$readmetxt; | |||
@@ -106,12 +106,12 @@ function Makemodule() | |||
} | |||
if ($autosetup == 0) { | |||
move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("你没上传,或系统无法把setup文件移动到 module 目录!"); | |||
move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录!"); | |||
$setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); | |||
} | |||
if ($autodel == 0) { | |||
move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("你没上传,或系统无法把uninstall文件移动到 module 目录!"); | |||
move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录!"); | |||
$uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", TRUE); | |||
} | |||
@@ -192,7 +192,7 @@ function editModule() | |||
$filelist = str_replace("\r", "\n", trim($filelist)); | |||
$filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); | |||
if ($filelist == "") { | |||
ShowMsg("对不起,你没有指定模块的文件列表,因此不能创建项目!", "-1"); | |||
ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目!", "-1"); | |||
exit(); | |||
} | |||
if (empty($dev_id)) { | |||
@@ -254,7 +254,7 @@ function editModule() | |||
//编译setup文件 | |||
if (is_uploaded_file($setup)) { | |||
move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("你没上传,或系统无法把setup文件移动到 module 目录!"); | |||
move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录!"); | |||
$setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); | |||
} else { | |||
if ($autosetup == 0) $setupf = base64_encode($dm->GetSystemFile($hashcode, 'setup')); | |||
@@ -262,7 +262,7 @@ function editModule() | |||
//编译uninstall文件 | |||
if (is_uploaded_file($uninstall)) { | |||
move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("你没上传,或系统无法把uninstall文件移动到 module 目录!"); | |||
move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录!"); | |||
$uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", true); | |||
} else { | |||
if ($autodel == 0) $uninstallf = base64_encode($dm->GetSystemFile($hashcode, 'uninstall')); | |||
@@ -18,7 +18,7 @@ $mdir = DEDEDATA.'/module'; | |||
if ($action == 'upload') { | |||
if (!is_uploaded_file($upfile)) { | |||
ShowMsg("貌似你什么都没有上传哦!", "javascript:;"); | |||
ShowMsg("貌似您什么都没有上传哦!", "javascript:;"); | |||
exit(); | |||
} else { | |||
include_once(dirname(__FILE__)."/../include/zip.class.php"); | |||
@@ -42,7 +42,7 @@ if ($action == 'upload') { | |||
} | |||
if ($dedefileindex == -1) { | |||
unlink($tmpfilename); | |||
ShowMsg("对不起,你上传的压缩包中不存在dede模块文件!<br /><br /><a href='javascript:history.go(-1);'>>>返回重新上传>></a>", "javascript:;"); | |||
ShowMsg("对不起,您上传的压缩包中不存在dede模块文件!<br /><br /><a href='javascript:history.go(-1);'>>>返回重新上传>></a>", "javascript:;"); | |||
exit(); | |||
} | |||
$ziptmp = $mdir.'/ziptmp'; | |||
@@ -56,7 +56,7 @@ if ($action == 'upload') { | |||
if (empty($infos['hash'])) { | |||
unlink($tmpfilename); | |||
$dm->Clear(); | |||
ShowMsg("对不起,你上传的文件可能不是织梦模块的标准格式文件!<br /><br /><a href='javascript:history.go(-1);'>>>返回重新上传>></a>", "javascript:;"); | |||
ShowMsg("对不起,您上传的文件可能不是织梦模块的标准格式文件!<br /><br /><a href='javascript:history.go(-1);'>>>返回重新上传>></a>", "javascript:;"); | |||
exit(); | |||
} | |||
if (preg_match("#[^0-9a-zA-Z]#", $infos['hash'])) { | |||
@@ -67,7 +67,7 @@ if ($action == 'upload') { | |||
if ($dm->HasModule($infos['hash']) && empty($delhas)) { | |||
unlink($tmpfilename); | |||
$dm->Clear(); | |||
ShowMsg("对不起,你上传的模块已经存在,<br />如果要覆盖请先删除原来版本或选择强制删除的选项!<br /><br /><a href='javascript:history.go(-1);'>>>返回重新上传>></a>", "javascript:;"); | |||
ShowMsg("对不起,您上传的模块已经存在,<br />如果要覆盖请先删除原来版本或选择强制删除的选项!<br /><br /><a href='javascript:history.go(-1);'>>>返回重新上传>></a>", "javascript:;"); | |||
exit(); | |||
} | |||
@unlink($okfile); | |||
@@ -113,7 +113,7 @@ function __Export() | |||
$wecome_info = "<a href='mychannel_main.php'><u>内容模型管理</u></a>::导出内容模型规则"; | |||
$win = new OxWindow(); | |||
$win->Init(); | |||
$win->AddTitle("以下为规则 [{$row['typename']}] 的模型规则,你可以共享给你的朋友:"); | |||
$win->AddTitle("以下为规则 [{$row['typename']}] 的模型规则,您可以共享给您的朋友:"); | |||
$winform = $win->GetWindow("hand", "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/codemirror.css\"><script type=\"text/javascript\" src=\"js/codemirror.js\"></script><script type=\"text/javascript\" src=\"js/mode/xml/xml.js\"></script><script type=\"text/javascript\" src=\"js/mode/javascript/javascript.js\"></script><script type=\"text/javascript\" src=\"js/mode/css/css.js\"></script><script type=\"text/javascript\" src=\"js/mode/htmlmixed/htmlmixed.js\"></script><textarea name='config' id='content' style='width:99%;height:450px;word-wrap: break-word;word-break:break-all;'>".$channelconfig."</textarea><script type=\"text/javascript\">var editor = CodeMirror.fromTextArea(document.getElementById('content'), {lineNumbers: true,lineWrapping: true,mode: 'text/html'});</script>"); | |||
$win->Display(); | |||
exit(); | |||
@@ -337,7 +337,7 @@ function __SaveEdit() | |||
} | |||
$trueTable = str_replace("#@__", $cfg_dbprefix, $addtable); | |||
if (!$dsql->IsTable($trueTable)) { | |||
ShowMsg("系统找不到你所指定的表 $trueTable ,请手工创建这个表!", "-1"); | |||
ShowMsg("系统找不到您所指定的表 $trueTable ,请手工创建这个表!", "-1"); | |||
exit(); | |||
} | |||
$dsql->ExecuteNoneQuery($query); | |||
@@ -390,7 +390,7 @@ function __Delete() | |||
$win->AddHidden("job", "yes"); | |||
$win->AddHidden("dopost", $dopost); | |||
$win->AddHidden("id", $id); | |||
$win->AddTitle("你确实要删除 (".$row['typename'].") 这个频道?"); | |||
$win->AddTitle("您确实要删除 (".$row['typename'].") 这个频道?"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
exit(); | |||
@@ -399,7 +399,7 @@ function __Delete() | |||
require_once(DEDEINC."/typeunit.class.admin.php"); | |||
$myrow = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$id'", MYSQL_ASSOC); | |||
if (!is_array($myrow)) { | |||
ShowMsg('你所指定的频道信息不存在!', '-1'); | |||
ShowMsg('您所指定的频道信息不存在!', '-1'); | |||
exit(); | |||
} | |||
@@ -29,7 +29,7 @@ if ($action == 'save') { | |||
if (preg_match("#^(select|radio|checkbox)$#i", $dtype)) { | |||
if (!preg_match("#,#", $dfvalue)) { | |||
ShowMsg("你设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); | |||
ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); | |||
exit(); | |||
} | |||
} | |||
@@ -37,7 +37,7 @@ if ($action == 'save') { | |||
if ($dtype == 'stepselect') { | |||
$arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fieldname' "); | |||
if (!is_array($arr)) { | |||
ShowMsg("你设定了字段为联动类型,但系统中没找到与你定义的字段名相同的联动组名!", "-1"); | |||
ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); | |||
exit(); | |||
} | |||
} | |||
@@ -51,14 +51,14 @@ function _SAVE() | |||
----------------------*/ | |||
if ($action == 'save') { | |||
if (!isset($fieldtypes[$dtype])) { | |||
ShowMsg("你修改的是系统专用类型的数据,禁止操作!", "-1"); | |||
ShowMsg("您修改的是系统专用类型的数据,禁止操作!", "-1"); | |||
exit(); | |||
} | |||
$dfvalue = $vdefault; | |||
if (preg_match("#^(select|radio|checkbox)#", $dtype)) { | |||
if (!preg_match("#,#", $dfvalue)) { | |||
ShowMsg("你设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); | |||
ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); | |||
exit(); | |||
} | |||
} | |||
@@ -66,7 +66,7 @@ if ($action == 'save') { | |||
if ($dtype == 'stepselect') { | |||
$arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fname' "); | |||
if (!is_array($arr)) { | |||
ShowMsg("你设定了字段为联动类型,但系统中没找到与你定义的字段名相同的联动组名!", "-1"); | |||
ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); | |||
exit(); | |||
} | |||
} | |||
@@ -32,7 +32,7 @@ if ($dopost == "show") { | |||
$win->AddHidden("job", "yes"); | |||
$win->AddHidden("dopost", $dopost); | |||
$win->AddHidden("aid", $aid); | |||
$win->AddTitle("你确实要删除'".$title."'这个插件?"); | |||
$win->AddTitle("您确实要删除'".$title."'这个插件?"); | |||
$win->AddMsgItem("<font color='red'>警告:在这里删除仅仅删除菜单项,要干净删除请在模块管理处删除!<br /><br /> <a href='module_main.php?moduletype=plus'>模块管理>></a> </font>"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
@@ -31,13 +31,13 @@ if ($action == 'setdefault') { | |||
$msg = " | |||
成功取消默认发布表单! | |||
<hr style='width:90%' size='1' /> | |||
你目前想要进行的操作: <a href='public_guide.php?action=edit'>返回发布向导页</a> | |||
您目前想要进行的操作: <a href='public_guide.php?action=edit'>返回发布向导页</a> | |||
"; | |||
} else { | |||
$msg = " | |||
成功保存默认发布表单,以后点击“内容发布”面板将直接跳转到你选择的内容发布页! | |||
成功保存默认发布表单,以后点击“内容发布”面板将直接跳转到您选择的内容发布页! | |||
<hr style='width:90%' size='1' /> | |||
你目前想要进行的操作: <a href='public_guide.php'>转到默认发布表单</a> <a href='public_guide.php?action=edit'>返回发布向导页</a> | |||
您目前想要进行的操作: <a href='public_guide.php'>转到默认发布表单</a> <a href='public_guide.php?action=edit'>返回发布向导页</a> | |||
"; | |||
} | |||
$win->AddMsgItem("<div style='padding-left:20px;line-height:150%'>$msg</div>"); | |||
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 软件发布 | |||
* | |||
@@ -14,14 +13,12 @@ CheckPurview('a_New,a_AccNew'); | |||
require_once(DEDEINC.'/customfields.func.php'); | |||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEINC.'/dedetag.class.php'); | |||
require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); | |||
ClearMyAddon(); | |||
$channelid = empty($channelid) ? 0 : intval($channelid); | |||
$cid = empty($cid) ? 0 : intval($cid); | |||
//获得频道模型ID | |||
if ($cid > 0 && $channelid == 0) { | |||
$row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
@@ -29,12 +26,10 @@ if ($dopost != 'save') { | |||
} else { | |||
if ($channelid == 0) $channelid = 1; | |||
} | |||
$softconfig = $dsql->GetOne("SELECT * FROM `#@__softconfig` "); | |||
//获得频道模型信息 | |||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$channelid = $cInfos['id']; | |||
//获取文章最大id以确定当前权重 | |||
$maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); | |||
include DedeInclude("templets/soft_add.htm"); | |||
@@ -42,48 +37,42 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if (!isset($typeid2)) $typeid2 = 0; | |||
if (!isset($autokey)) $autokey = 0; | |||
if (!isset($remote)) $remote = 0; | |||
if (!isset($dellink)) $dellink = 0; | |||
if (!isset($autolitpic)) $autolitpic = 0; | |||
if ($typeid == 0) { | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
ShowMsg("请指定文档的栏目", "-1"); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||
exit(); | |||
} | |||
if (!TestPurview('a_New')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); | |||
} | |||
//对保存的内容进行处理 | |||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | |||
if (empty($source)) $source = '未知'; | |||
$pubdate = GetMkTime($pubdate); | |||
$senddate = time(); | |||
$sortrank = AddDay($pubdate, $sortup); | |||
if ($ishtml == 0) $ismake = -1; | |||
else $ismake = 0; | |||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
$title = preg_replace('#"#', '"', $title); | |||
$title = cn_substrR($title, $cfg_title_maxlen); | |||
$shorttitle = cn_substrR($shorttitle, 36); | |||
@@ -100,7 +89,6 @@ function __save(){ } | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) { | |||
$ddisremote = 0; | |||
@@ -114,24 +102,19 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | |||
if (empty($arcID)) { | |||
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1"); | |||
ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); | |||
exit(); | |||
} | |||
//处理body字段自动摘要、自动提取缩略图等 | |||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
@@ -161,7 +144,6 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match('#p#', $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
@@ -169,24 +151,19 @@ function __save(){ } | |||
if ($redirecturl != '' && !preg_match('#j#', $flag)) { | |||
$flag = ($flag == '' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if (preg_match('#j#', $flag)) $ismake = -1; | |||
//保存到主表 | |||
$inQuery = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, | |||
color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) | |||
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', | |||
'$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; | |||
$inQuery = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) | |||
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; | |||
if (!$dsql->ExecuteNoneQuery($inQuery)) { | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
//软件链接列表 | |||
$urls = ''; | |||
//本地链接处理 | |||
$softurl1 = stripslashes($softurl1); | |||
$nsoftsize = ''; | |||
@@ -202,12 +179,10 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//软件大小 | |||
if (!empty($nsoftsize)) $softsize = $nsoftsize; | |||
else if (empty($softsize)) $softsize = '未知'; | |||
else $softsize = $softsize.' '.$unit; | |||
//其它链接处理 | |||
for ($i = 2; $i <= 30; $i++) { | |||
if (!empty(${'softurl'.$i})) { | |||
@@ -230,14 +205,13 @@ function __save(){ } | |||
} | |||
} | |||
$urls = addslashes($urls); | |||
//保存到附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if (empty($addtable)) { | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作!。", "javascript:;"); | |||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); | |||
exit(); | |||
} | |||
$daccess = isset($daccess) && is_numeric($daccess) ? $daccess : 0; | |||
@@ -250,10 +224,9 @@ function __save(){ } | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
//生成HTML | |||
InsertTags($tags, $arcID); | |||
$arcUrl = MakeArt($arcID, TRUE, TRUE, 0); | |||
@@ -261,8 +234,7 @@ function __save(){ } | |||
$arcUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
} | |||
ClearMyAddon($arcID, $title); | |||
// 自动更新关联内容 | |||
//自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
if (isset(${$key}) && !empty(${$key})) { | |||
@@ -273,27 +245,14 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<a href='soft_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布软件</a> | |||
| |||
<a href='$arcUrl' 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='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布软件管理</a> | |||
| |||
<a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a> | |||
"; | |||
$msg = "请选择您的后续操作:<a href='soft_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布软件</a> <a href='$arcUrl' 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='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布软件管理</a> <a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a>"; | |||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
$wintitle = "成功发布一个软件!"; | |||
$wintitle = "成功发布一个软件"; | |||
$wecome_info = "文章管理::发布软件"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功发布软件:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", FALSE); | |||
$win->Display(); | |||
} | |||
} |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 软件编辑 | |||
* | |||
@@ -14,14 +13,12 @@ CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
ClearMyAddon(); | |||
$aid = preg_replace("#[^0-9]#", '', $aid); | |||
$channelid = "3"; | |||
//读取归档信息 | |||
$arcQuery = "SELECT | |||
#@__channeltype.typename as channelname, | |||
@@ -79,39 +76,36 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (empty($typeid2)) $typeid2 = 0; | |||
if (!isset($autokey)) $autokey = 0; | |||
if (!isset($remote)) $remote = 0; | |||
if (!isset($dellink)) $dellink = 0; | |||
if (!isset($autolitpic)) $autolitpic = 0; | |||
if ($typeid == 0) { | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
ShowMsg("请指定文档的栏目", "-1"); | |||
exit(); | |||
} | |||
if (empty($channelid)) { | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||
exit(); | |||
} | |||
if (!CheckChannel($typeid, $channelid)) { | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||
exit(); | |||
} | |||
if (!TestPurview('a_Edit')) { | |||
if (TestPurview('a_AccEdit')) { | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||
} else { | |||
CheckArcAdmin($id, $cuserLogin->getUserID()); | |||
} | |||
} | |||
//对保存的内容进行处理 | |||
$pubdate = GetMkTime($pubdate); | |||
$senddate = time(); | |||
@@ -135,13 +129,12 @@ function __save(){ } | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) { | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('litpic', $picname, $ddisremote); | |||
// 处理新的缩略图上传 | |||
//处理新的缩略图上传 | |||
if ($litpic_b64 != "") { | |||
$data = explode(',', $litpic_b64); | |||
$ntime = time(); | |||
@@ -149,14 +142,11 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
@@ -183,7 +173,6 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match('#p#', $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
@@ -191,7 +180,6 @@ function __save(){ } | |||
if ($redirecturl != '' && !preg_match('#j#', $flag)) { | |||
$flag = ($flag == '' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if (preg_match('#j#', $flag)) $ismake = -1; | |||
//更改主档案表 | |||
@@ -219,20 +207,17 @@ function __save(){ } | |||
weight='$weight' | |||
WHERE id='$id'; "; | |||
if (!$dsql->ExecuteNoneQuery($inQuery)) { | |||
ShowMsg("更新数据库archives表时出错,请检查!", "-1"); | |||
ShowMsg("更新数据库archives表时出错,请检查", "-1"); | |||
exit(); | |||
} | |||
//软件链接列表 | |||
$urls = ''; | |||
for ($i = 1; $i <= 30; $i++) { | |||
if (!empty(${'softurl'.$i})) { | |||
$islocal = empty(${'islocal'.$i}) ? '' : 1; | |||
$isneed = empty(${'del'.$i}) ? true : false; | |||
$servermsg = str_replace("'", '', stripslashes(${'servermsg'.$i})); | |||
$softurl = stripslashes(${'softurl'.$i}); | |||
if ($servermsg == '') { | |||
$servermsg = '下载地址'.$i; | |||
} | |||
@@ -244,47 +229,43 @@ function __save(){ } | |||
} | |||
} | |||
$urls = addslashes($urls); | |||
//更新附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if ($addtable != '') { | |||
$useip = GetIP(); | |||
$inQuery = "UPDATE `$addtable` | |||
SET typeid ='$typeid', | |||
filetype ='$filetype', | |||
language ='$language', | |||
softtype ='$softtype', | |||
accredit ='$accredit', | |||
os ='$os', | |||
softrank ='$softrank', | |||
officialUrl ='$officialUrl', | |||
officialDemo ='$officialDemo', | |||
softsize ='$softsize', | |||
softlinks ='$urls', | |||
redirecturl='$redirecturl', | |||
userip = '$useip', | |||
daccess = '$daccess', | |||
needmoney = '$needmoney', | |||
introduce='$body' | |||
{$inadd_f} | |||
WHERE aid='$id';"; | |||
SET typeid ='$typeid', | |||
filetype ='$filetype', | |||
language ='$language', | |||
softtype ='$softtype', | |||
accredit ='$accredit', | |||
os ='$os', | |||
softrank ='$softrank', | |||
officialUrl ='$officialUrl', | |||
officialDemo ='$officialDemo', | |||
softsize ='$softsize', | |||
softlinks ='$urls', | |||
redirecturl='$redirecturl', | |||
userip = '$useip', | |||
daccess = '$daccess', | |||
needmoney = '$needmoney', | |||
introduce='$body' | |||
{$inadd_f} | |||
WHERE aid='$id';"; | |||
if (!$dsql->ExecuteNoneQuery($inQuery)) { | |||
ShowMsg("更新数据库附加表 addonsoft 时出错,请检查原因!", "-1"); | |||
ShowMsg("更新数据库附加表 addonsoft 时出错,请检查原因", "-1"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
$arcUrl = MakeArt($id, TRUE, TRUE, $isremote); | |||
if ($arcUrl == "") { | |||
$arcUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
} | |||
ClearMyAddon($id, $title); | |||
// 自动更新关联内容 | |||
//自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
if (isset(${$key}) && !empty(${$key})) { | |||
@@ -295,25 +276,13 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<a href='soft_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='$arcUrl' target='_blank' 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_main.php' class='btn btn-success btn-sm'>网站栏目管理</a> | |||
"; | |||
$wintitle = "成功修改一个软件!"; | |||
$msg = "请选择您的后续操作:<a href='soft_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='$arcUrl' target='_blank' 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_main.php' class='btn btn-success btn-sm'>网站栏目管理</a>"; | |||
$wintitle = "成功修改一个软件"; | |||
$wecome_info = "文章管理::修改软件"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功修改软件:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", FALSE); | |||
$win->Display(); | |||
} | |||
} |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 专题添加 | |||
* | |||
@@ -14,7 +13,6 @@ CheckPurview('a_New,a_AccNew'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if (empty($dopost)) $dopost = ''; | |||
if ($dopost != 'save') { | |||
require_once(DEDEINC.'/dedetag.class.php'); | |||
require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); | |||
@@ -29,23 +27,21 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
$channelid = -1; | |||
$money = 0; | |||
if (!isset($tags)) $tags = ''; | |||
//处理自定义字段会用到这些变量 | |||
if (!isset($autokey)) $autokey = 0; | |||
if (!isset($remote)) $remote = 0; | |||
if (!isset($dellink)) $dellink = 0; | |||
if (!isset($autolitpic)) $autolitpic = 0; | |||
//对保存的内容进行处理 | |||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | |||
if (empty($source)) $source = '未知'; | |||
@@ -54,7 +50,6 @@ function __save(){ } | |||
$sortrank = AddDay($pubdate, $sortup); | |||
if ($ishtml == 0) $ismake = -1; | |||
else $ismake = 0; | |||
$title = preg_replace('#"#', '"', $title); | |||
$title = cn_substrR($title, $cfg_title_maxlen); | |||
$shorttitle = cn_substrR($shorttitle, 36); | |||
@@ -68,13 +63,12 @@ function __save(){ } | |||
$serviterm = empty($serviterm) ? "" : $serviterm; | |||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) { | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
// 处理新的缩略图上传 | |||
//处理新的缩略图上传 | |||
if ($litpic_b64 != "") { | |||
$data = explode(',', $litpic_b64); | |||
$ntime = time(); | |||
@@ -82,34 +76,27 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | |||
if (empty($arcID)) { | |||
ShowMsg("无法获得主键,无法进行后续操作!", "-1"); | |||
ShowMsg("无法获得主键,无法进行后续操作", "-1"); | |||
exit(); | |||
} | |||
//保存到主表 | |||
$inQuery = "INSERT INTO `#@__archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, | |||
color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename) | |||
VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', | |||
'$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename');"; | |||
$inQuery = "INSERT INTO `#@__archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename) | |||
VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename');"; | |||
if (!$dsql->ExecuteNoneQuery($inQuery)) { | |||
echo $inQuery; | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||
exit(); | |||
} | |||
//专题节点列表 | |||
$arcids = array(); | |||
$notelist = ''; | |||
@@ -154,7 +141,6 @@ function __save(){ } | |||
{/dede:specnote}\r\n"; | |||
} | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
@@ -182,7 +168,6 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match('#p#', $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
@@ -193,10 +178,9 @@ function __save(){ } | |||
if (!$dsql->ExecuteNoneQuery($inQuery)) { | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 addonspec 时出错,请检查原因!", "-1"); | |||
ShowMsg("把数据保存到数据库附加表 addonspec 时出错,请检查原因", "-1"); | |||
exit(); | |||
} | |||
//生成HTML | |||
InsertTags($tags, $arcID); | |||
$artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | |||
@@ -204,8 +188,7 @@ function __save(){ } | |||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
} | |||
ClearMyAddon($arcID, $title); | |||
// 自动更新关联内容 | |||
//自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
if (isset(${$key}) && !empty(${$key})) { | |||
@@ -216,21 +199,13 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<a href='spec_add.php?cid=$typeid' class='btn btn-success btn-sm'>创建新专题</a> | |||
| |||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看专题</a> | |||
| |||
<a href='content_s_list.php' class='btn btn-success btn-sm'>已发布专题管理</a> | |||
"; | |||
$wintitle = "成功创建专题!"; | |||
$msg = "请选择您的后续操作:<a href='spec_add.php?cid=$typeid' class='btn btn-success btn-sm'>创建新专题</a> <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看专题</a> <a href='content_s_list.php' class='btn btn-success btn-sm'>已发布专题管理</a>"; | |||
$wintitle = "成功创建专题"; | |||
$wecome_info = "文章管理::发布专题"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功创建专题:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", FALSE); | |||
$win->Display(); | |||
} | |||
} |
@@ -1,5 +1,4 @@ | |||
<?php | |||
/** | |||
* 专题编辑 | |||
* | |||
@@ -20,7 +19,6 @@ if ($dopost != 'save') { | |||
ClearMyAddon(); | |||
$aid = intval($aid); | |||
$channelid = -1; | |||
//读取归档信息 | |||
$arcQuery = "SELECT ch.typename as channelname,ar.membername as rankname,arc.* | |||
FROM `#@__archives` arc | |||
@@ -43,27 +41,24 @@ if ($dopost != 'save') { | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ else if ($dopost == 'save') { | |||
-------------------------------*/ | |||
else if ($dopost == 'save') { | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | |||
if (!isset($tags)) $tags = ''; | |||
$channelid = -1; | |||
//处理自定义字段会用到这些变量 | |||
if (!isset($autokey)) $autokey = 0; | |||
if (!isset($remote)) $remote = 0; | |||
if (!isset($dellink)) $dellink = 0; | |||
if (!isset($autolitpic)) $autolitpic = 0; | |||
//对保存的内容进行处理 | |||
$pubdate = GetMkTime($pubdate); | |||
$sortrank = AddDay($pubdate, $sortup); | |||
if ($ishtml == 0) $ismake = -1; | |||
else $ismake = 0; | |||
$title = cn_substrR($title, $cfg_title_maxlen); | |||
$shorttitle = cn_substrR($shorttitle, 36); | |||
$color = cn_substrR($color, 7); | |||
@@ -78,13 +73,12 @@ function __save(){ } | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if (empty($ddisremote)) { | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
// 处理新的缩略图上传 | |||
//处理新的缩略图上传 | |||
if ($litpic_b64 != "") { | |||
$data = explode(',', $litpic_b64); | |||
$ntime = time(); | |||
@@ -92,14 +86,11 @@ function __save(){ } | |||
CreateDir($savepath); | |||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | |||
$fullUrl = $fullUrl.".png"; | |||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | |||
// 加水印 | |||
//加水印 | |||
WaterImg($cfg_basedir.$fullUrl, 'up'); | |||
$litpic = $fullUrl; | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
@@ -126,35 +117,33 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if ($litpic != '' && !preg_match('#p#', $flag)) { | |||
$flag = ($flag == '' ? 'p' : $flag.',p'); | |||
} | |||
$inQuery = "UPDATE `#@__archives` SET | |||
typeid='$typeid', | |||
sortrank='$sortrank', | |||
flag='$flag', | |||
ismake='$ismake', | |||
arcrank='$arcrank', | |||
click='$click', | |||
title='$title', | |||
color='$color', | |||
writer='$writer', | |||
source='$source', | |||
litpic='$litpic', | |||
pubdate='$pubdate', | |||
notpost='$notpost', | |||
description='$description', | |||
keywords='$keywords', | |||
shorttitle='$shorttitle', | |||
filename='$filename' | |||
WHERE id='$id'; "; | |||
typeid='$typeid', | |||
sortrank='$sortrank', | |||
flag='$flag', | |||
ismake='$ismake', | |||
arcrank='$arcrank', | |||
click='$click', | |||
title='$title', | |||
color='$color', | |||
writer='$writer', | |||
source='$source', | |||
litpic='$litpic', | |||
pubdate='$pubdate', | |||
notpost='$notpost', | |||
description='$description', | |||
keywords='$keywords', | |||
shorttitle='$shorttitle', | |||
filename='$filename' | |||
WHERE id='$id'; "; | |||
if (!$dsql->ExecuteNoneQuery($inQuery)) { | |||
ShowMsg("更新数据库archives表时出错,请检查!", "-1"); | |||
ShowMsg("更新数据库archives表时出错,请检查", "-1"); | |||
exit(); | |||
} | |||
//专题节点列表 | |||
$arcids = array(); | |||
$notelist = ''; | |||
@@ -218,14 +207,12 @@ function __save(){ } | |||
{/dede:specnote}\r\n"; | |||
} | |||
} | |||
//更新附加表 | |||
$inQuery = "UPDATE `#@__addonspec` SET typeid ='$typeid',note='$notelist'{$inadd_f},templet='$templet' WHERE aid='$id';"; | |||
if (!$dsql->ExecuteNoneQuery($inQuery)) { | |||
ShowMsg("更新数据库附加表 addonspec 时出错,请检查原因!", "-1"); | |||
ShowMsg("更新数据库附加表 addonspec 时出错,请检查原因", "-1"); | |||
exit(); | |||
} | |||
//生成HTML | |||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
$artUrl = MakeArt($id, TRUE, TRUE, $isremote); | |||
@@ -233,7 +220,6 @@ function __save(){ } | |||
$artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
} | |||
ClearMyAddon($id, $title); | |||
// 自动更新关联内容 | |||
if (is_array($automake)) { | |||
foreach ($automake as $key => $value) { | |||
@@ -245,21 +231,13 @@ function __save(){ } | |||
} | |||
} | |||
} | |||
//返回成功信息 | |||
$msg = " 请选择你的后续操作: | |||
<a href='spec_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='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看专题</a> | |||
| |||
<a href='content_s_list.php' class='btn btn-success btn-sm'>已发布专题管理</a> "; | |||
$wintitle = "成功更改一个专题!"; | |||
$msg = "请选择您的后续操作:<a href='spec_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='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看专题</a> <a href='content_s_list.php' class='btn btn-success btn-sm'>已发布专题管理</a> "; | |||
$wintitle = "成功更改一个专题"; | |||
$wecome_info = "专题管理::更改专题"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功更改专题!"); | |||
$win->AddTitle("成功更改专题"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand", " ", FALSE); | |||
$win->Display(); | |||
} | |||
} |
@@ -96,7 +96,7 @@ function __del() { } | |||
ShowMsg("成功删除选中的枚举分类!", $ENV_GOBACK_URL); | |||
} else { | |||
ShowMsg("你没选择任何分类!", "-1"); | |||
ShowMsg("您没选择任何分类!", "-1"); | |||
} | |||
exit(); | |||
} else if ($action == 'delenum') { | |||
@@ -128,7 +128,7 @@ function __addnew_save() { } | |||
} | |||
$arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE itemname LIKE '$itemname' OR egroup LIKE '$egroup' "); | |||
if (is_array($arr)) { | |||
ShowMsg("你指定的类别名称或组名称已经存在,不能使用!", "stepselect_main.php"); | |||
ShowMsg("您指定的类别名称或组名称已经存在,不能使用!", "stepselect_main.php"); | |||
exit(); | |||
} | |||
$dsql->ExecuteNoneQuery("INSERT INTO `#@__stepselect`(`itemname`,`egroup`,`issign`,`issystem`) VALUES('$itemname','$egroup','0','0'); "); | |||
@@ -64,7 +64,7 @@ if ($dopost == 'saveedit') { | |||
$win->AddHidden("safecode", $safecode); | |||
$win->AddHidden("id", $id); | |||
$win->AddTitle("系统警告!"); | |||
$win->AddMsgItem("你确信要删除用户:$userid 吗?", "50"); | |||
$win->AddMsgItem("您确信要删除用户:$userid 吗?", "50"); | |||
$win->AddMsgItem("安全验证串:<input name='safecode' type='text' id='safecode' size='16' style='width:200px' /> (复制本代码: <font color='red'>$safecode</font> )", "30"); | |||
$winform = $win->GetWindow("ok"); | |||
$win->Display(); | |||
@@ -31,7 +31,7 @@ function __bak_data(); | |||
--------------------*/ | |||
if ($dopost == 'bak') { | |||
if (empty($tablearr)) { | |||
ShowMsg('你没选中任何表!', 'javascript:;'); | |||
ShowMsg('您没选中任何表!', 'javascript:;'); | |||
exit(); | |||
} | |||
if (!is_dir($bkdir)) { | |||
@@ -69,7 +69,7 @@ function __Apply() | |||
$dsql->Execute(); | |||
$tt = $dsql->GetTotalRow(); | |||
if ($tt == 0) { | |||
ShowMsg("根据你指定的正则,找不到任何东西!", "javascript:;"); | |||
ShowMsg("根据您指定的正则,找不到任何东西!", "javascript:;"); | |||
exit(); | |||
} | |||
$oo = 0; | |||
@@ -14,7 +14,7 @@ CheckPurview('sys_Group'); | |||
if (!empty($dopost)) { | |||
$row = $dsql->GetOne("SELECT * FROM #@__admintype WHERE rank='".$rankid."'"); | |||
if (is_array($row)) { | |||
ShowMsg('你所创建的组别的级别值已存在,不允许重复!', '-1'); | |||
ShowMsg('您所创建的组别的级别值已存在,不允许重复!', '-1'); | |||
exit(); | |||
} | |||
if ($rankid > 10) { | |||
@@ -13,7 +13,7 @@ require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('sys_Edit'); | |||
require_once(DEDEINC."/image.func.php"); | |||
if ($cfg_photo_support == '') { | |||
echo "你的系统没安装GD库,不允许使用本功能!"; | |||
echo "您的系统没安装GD库,不允许使用本功能!"; | |||
exit(); | |||
} | |||
$ImageWaterConfigFile = DEDEDATA."/mark/inc_photowatermark_config.php"; | |||
@@ -19,7 +19,7 @@ if (empty($dopost)) { | |||
$win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); | |||
$win->mainTitle = "系统修复工具"; | |||
$wecome_info = "<a href='index_body.php'>系统主页</a> >> 系统错误修复工具"; | |||
$win->AddTitle('本工具用于检测和修复你的系统可能存在的错误'); | |||
$win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); | |||
$msg = " | |||
<table width='98%' border='0' cellspacing='0' cellpadding='0' align='center'> | |||
<tr> | |||
@@ -52,7 +52,7 @@ function 1_test_db() { } | |||
$win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); | |||
$win->mainTitle = "系统修复工具"; | |||
$wecome_info = "<a href='sys_repair.php'>系统错误修复工具</a> >> 检测数据结构"; | |||
$win->AddTitle('本工具用于检测和修复你的系统可能存在的错误'); | |||
$win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); | |||
$msg = " | |||
<table width='98%' border='0' cellspacing='0' cellpadding='0' align='center'> | |||
<tr> | |||
@@ -60,7 +60,7 @@ function 1_test_db() { } | |||
<b><font color='green'>已完成数据结构完整性检测!</font></b> | |||
<hr size='1'/> | |||
<br /> | |||
<b>如果你系统有下面几种问题之一,请检测微表正确性:</b><br /> | |||
<b>如果您系统有下面几种问题之一,请检测微表正确性:</b><br /> | |||
1、无法获得主键,因此无法进行后续操作<br /> | |||
2、更新数据库archives表时出错<br /> | |||
3、列表显示数据目与实际文档数不一致<br /> | |||
@@ -136,7 +136,7 @@ function 2_test_arctiny() { } | |||
$win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); | |||
$win->mainTitle = "系统修复工具"; | |||
$wecome_info = "<a href='sys_repair.php'>系统错误修复工具</a> >> 检测微表正确性"; | |||
$win->AddTitle('本工具用于检测和修复你的系统可能存在的错误'); | |||
$win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); | |||
$msg = " | |||
<table width='98%' border='0' cellspacing='0' cellpadding='0' align='center'> | |||
<tr> | |||
@@ -196,7 +196,7 @@ function 3_re_arctiny() { } | |||
$win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); | |||
$win->mainTitle = "系统修复工具"; | |||
$wecome_info = "<a href='sys_repair.php'>系统错误修复工具</a> >> 高级综合检测修复"; | |||
$win->AddTitle('本工具用于检测和修复你的系统可能存在的错误'); | |||
$win->AddTitle('本工具用于检测和修复您的系统可能存在的错误'); | |||
$msg = " | |||
<table width='98%' border='0' cellspacing='0' cellpadding='0' align='center'> | |||
<tr> | |||
@@ -31,10 +31,9 @@ function checkSubmit() { | |||
} | |||
</script> | |||
<style> | |||
body{background:#ffffff} | |||
body{background:#fff} | |||
img{vertical-align:baseline} | |||
table{border-collapse:separate} | |||
input,select{height:auto!important} | |||
.albCt img{cursor:pointer} | |||
.multipic{border:1px dashed #FC6} | |||
.albCt{border-bottom:1px dashed #FC0;margin-bottom:10px;padding-bottom:10px} | |||
@@ -61,9 +61,9 @@ | |||
function DelNode(selid) { | |||
if (selid == 0) selid = getCheckboxItem(); | |||
if (selid != '') { | |||
if (window.confirm("你确实要删除这些条目么?")) location = "article_coonepage_rule.php?ids=" + selid + "&action=del"; | |||
if (window.confirm("您确实要删除这些条目么?")) location = "article_coonepage_rule.php?ids=" + selid + "&action=del"; | |||
} else { | |||
ShowMsg("你没选择任何条目!"); | |||
ShowMsg("您没选择任何条目!"); | |||
} | |||
} | |||
@@ -29,10 +29,12 @@ function checkSubmit() { | |||
} | |||
</script> | |||
<style> | |||
body{background:#ffffff} | |||
body{background:#fff} | |||
img{vertical-align:baseline} | |||
table{border-collapse:separate} | |||
.albCt img{cursor:pointer} | |||
.multipic{border:1px dashed #FC6} | |||
.albCt{border-bottom:1px dashed #FC0;margin-bottom:10px;padding-bottom:10px} | |||
.btn+.btn{margin-left:10px} | |||
</style> | |||
</head> | |||
@@ -101,8 +101,8 @@ function SingleMenu(eobj,obj,tid,tname) | |||
} | |||
</script> | |||
<style> | |||
td,th{padding:.3rem} | |||
.coolbg2{border:1px solid #000000;background-color:#F2F5E9;height:18px} | |||
td,th{padding:.25rem} | |||
.coolbg2{border:1px solid #ccc;background-color:#F2F5E9;height:18px} | |||
.coolbt2{border-left:2px solid #EFEFEF;border-top:2px solid #EFEFEF;border-right:2px solid #ACACAC;border-bottom:2px solid #ACACAC;background-color:#F7FCDA} | |||
.nbline{border-bottom:1px solid #d6d6d6;background-color:#FFFFFF} | |||
.bline2{border-bottom:1px solid #d6d6d6;background-color:#F9FCEF} | |||
@@ -22,7 +22,7 @@ | |||
} | |||
//删除 | |||
function DelNote(gourl) { | |||
if (!window.confirm("你确认要删除这条记录么!")) { return false; } | |||
if (!window.confirm("您确认要删除这条记录么!")) { return false; } | |||
location.href = gourl; | |||
} | |||
</script> | |||
@@ -51,7 +51,7 @@ function GetFields() | |||
if((dtype=="radio" || dtype=="select" || dtype=="checkbox") && vdefault=="") | |||
{ | |||
ShowMsg("你选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!"); | |||
ShowMsg("您选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!"); | |||
return false; | |||
} | |||
@@ -32,7 +32,7 @@ function GetFields() | |||
if((dtype=="radio"||dtype=="select"||dtype=="checkbox") && vdefault=="") | |||
{ | |||
ShowMsg("你选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!"); | |||
ShowMsg("您选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!"); | |||
return false; | |||
} | |||
@@ -44,13 +44,13 @@ | |||
} | |||
function delFeedback() { | |||
var qstr = getCheckboxItem(); | |||
if (qstr == "") ShowMsg("你没选中任何内容!"); | |||
else if (window.confirm('你确定要删除这些评论吗?')) location.href = "feedback_main.php?job=del&fid=" + qstr; | |||
if (qstr == "") ShowMsg("您没选中任何内容!"); | |||
else if (window.confirm('您确定要删除这些评论吗?')) location.href = "feedback_main.php?job=del&fid=" + qstr; | |||
} | |||
function delFeedbackIP() { | |||
var qstr = getCheckboxItem(); | |||
if (qstr == "") ShowMsg("你没选中任何内容!"); | |||
else if (window.confirm('你确定要删除这些评论吗?')) location.href = "feedback_main.php?job=delall&fid=" + qstr; | |||
if (qstr == "") ShowMsg("您没选中任何内容!"); | |||
else if (window.confirm('您确定要删除这些评论吗?')) location.href = "feedback_main.php?job=delall&fid=" + qstr; | |||
} | |||
function checkFeedback() { | |||
var qstr = getCheckboxItem(); | |||
@@ -41,7 +41,7 @@ | |||
} | |||
//删除 | |||
function DelNote(nid) { | |||
if (!window.confirm("你确认要删除这条记录么!")) { return false; } | |||
if (!window.confirm("您确认要删除这条记录么!")) { return false; } | |||
var listArea = $Obj('rslist'); | |||
totalrow = totalrow - 1; | |||
var pagenum = Math.ceil(totalrow / pagesize); | |||
@@ -28,7 +28,7 @@ | |||
} | |||
} | |||
if (str == '') { | |||
ShowMsg('你没选择任何内容!'); | |||
ShowMsg('您没选择任何内容!'); | |||
return false; | |||
} | |||
else { | |||
@@ -17,9 +17,9 @@ div{margin:0;padding:0} | |||
dl.bitem{margin:0 0 2px 10px;width:140px;background:url(images/menunewbg.gif)repeat-x;clear:both} | |||
dl.bitem2{margin:0 0 2px 10px;width:140px;background:url(images/menunewbg2.gif)repeat-x;clear:both} | |||
dl.bitem dt,dl.bitem2 dt{padding-left:30px;height:26px;line-height:26px;cursor:pointer} | |||
dl.bitem dd,dl.bitem2 dd{padding:10px;background:#ffffff} | |||
dl.bitem dd,dl.bitem2 dd{padding:10px;background:#fff} | |||
dl.bitem dt b,dl.bitem2 dt b{color:#4f7632} | |||
a.mm div{padding:7px 4px 4px 10px;height:40px;font-weight:600;color:#666666;background:url(images/leftmbg1.gif)no-repeat;cursor:pointer} | |||
a.mm div{padding:7px 4px 4px 10px;height:40px;font-weight:600;color:#666;background:url(images/leftmbg1.gif)no-repeat;cursor:pointer} | |||
a.mm:hover div{color:#4f7632;background:url(images/leftbg2.gif)no-repeat} | |||
a.mmac div{padding:7px 4px 4px 10px;height:40px;font-weight:600;color:#4f7632;background:url(images/leftbg2.gif)no-repeat} | |||
#mainct{padding-top:12px;background:url(images/idnbg1.gif)repeat-y} | |||
@@ -11,12 +11,12 @@ | |||
<style> | |||
body{font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#f8f8f8} | |||
img{max-width:100%} | |||
header{background:#ffffff} | |||
header{background:#fff} | |||
header .logo{width:300px;padding:1rem 0} | |||
.goindex{line-height:68px} | |||
.fa{font-size:16px} | |||
.login-from{max-width:580px;width:100%} | |||
.login-area{background:#ffffff;padding:2rem;border-radius:.25rem} | |||
.login-area{background:#fff;padding:2rem;border-radius:.25rem} | |||
.login-area .btnLogin{width:100%} | |||
.login-power{padding-top:1rem} | |||
.login-power a,.goindex a{color:#008e38} | |||
@@ -60,7 +60,7 @@ | |||
<input type="hidden" name="idend" value="<?php echo $k; ?>"> | |||
<tr bgcolor="#F8FCF1" height="24"> | |||
<td colspan="6"><strong>新增一个级别:</strong>(由于会员升级是以级别值由低向高升级的,因此增加组别时需注意此值的设置,<font color='red'> | |||
<u>如果你增加新的会员组的级别值低于10,将自动被视为普通的注册会员。</u></font>) </td> | |||
<u>如果您增加新的会员组的级别值低于10,将自动被视为普通的注册会员。</u></font>) </td> | |||
</tr> | |||
<tr bgcolor="#FFFFFF" align="center" height="24"> | |||
<td> 级别名称 </td> | |||
@@ -138,12 +138,12 @@ function checkSubmit() | |||
<td align="right" class='bline'>升级时间:</td> | |||
<td class='bline' style="text-align:left;"> | |||
<input type="text" style="width: 200px;" value="<?php echo $row['uptime']=($row['uptime']=="0")? GetDateTimeMk(time()) : GetDateTimeMk($row['uptime']);?>" id="uptime" name="uptime"> | |||
(如果你要升级会员,必须设置此时间为当前时间)</td> | |||
(如果您要升级会员,必须设置此时间为当前时间)</td> | |||
</tr> | |||
<tr> | |||
<td align="right" class='bline'>会员天数:</td> | |||
<td class='bline' style="text-align:left;"><input type="text" style="width: 200px;" value="<?php echo $row['exptime']?>" id="exptime" name="exptime"> | |||
(如果你要升级会员,会员天数必须大于0) </td> | |||
(如果您要升级会员,会员天数必须大于0) </td> | |||
</tr> | |||
<?php if($mhasDay!=0){ $mhasDay=($mhasDay>0)? $mhasDay : '<font color="red">该会员已经到期</font>';?> | |||
<tr> | |||
@@ -230,7 +230,7 @@ | |||
<tr bgcolor="#F9FDF0"> | |||
<td height="28" colspan="2" bgcolor="#F9FCEF"> | |||
<div class="alert alert-info" role="alert"> | |||
制作模块即表示你同意<a href="<?php echo $cfg_biz_dedebizUrl;?>/license_developer" target="_blank">《DedeBIZ开发者协议》</a> | |||
制作模块即表示您同意<a href="<?php echo $cfg_biz_dedebizUrl;?>/license_developer" target="_blank">《DedeBIZ开发者协议》</a> | |||
</div> | |||
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |||
<tr> | |||
@@ -24,7 +24,7 @@ | |||
//删除 | |||
function DelNote(gourl) { | |||
if (!window.confirm("你确认要删除这个字段么!")) { return false; } | |||
if (!window.confirm("您确认要删除这个字段么!")) { return false; } | |||
location.href = gourl; | |||
} | |||
@@ -55,7 +55,7 @@ function GetFields() | |||
if((dtype=="radio" || dtype=="select" || dtype=="checkbox") && vdefault=="") | |||
{ | |||
ShowMsg("你选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!"); | |||
ShowMsg("您选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!"); | |||
return false; | |||
} | |||
@@ -34,7 +34,7 @@ | |||
} | |||
if ((dtype == "radio" || dtype == "select" || dtype == "checkbox") && vdefault == "") { | |||
ShowMsg("你选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!"); | |||
ShowMsg("您选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!"); | |||
return false; | |||
} | |||
@@ -29,7 +29,7 @@ | |||
function SetDefault() | |||
{ | |||
if(selCheckbox==''){ | |||
ShowMsg("你没有选中需要设置为默认的栏目!"); | |||
ShowMsg("您没有选中需要设置为默认的栏目!"); | |||
}else{ | |||
var selobj = document.getElementById(selCheckbox); | |||
location="public_guide.php?action=setdefault&cid="+selobj.value; | |||
@@ -60,7 +60,7 @@ | |||
if (arcid.value != "") { | |||
if (notename.value == "") { | |||
$DE('notename' + id).focus(); | |||
ShowMsg('你的节点' + id + '名称不能为空'); | |||
ShowMsg('您的节点' + id + '名称不能为空'); | |||
return false; | |||
} | |||
} | |||
@@ -65,7 +65,7 @@ | |||
if (arcid.value != "") { | |||
if (notename.value == "") { | |||
$DE('notename' + id).focus(); | |||
ShowMsg('你的节点' + id + '名称不能为空'); | |||
ShowMsg('您的节点' + id + '名称不能为空'); | |||
return false; | |||
} | |||
} | |||
@@ -96,7 +96,7 @@ | |||
} | |||
function DelType() { | |||
if (window.confirm("你确实要删除这个分类吗?") == false) return false; | |||
if (window.confirm("您确实要删除这个分类吗?") == false) return false; | |||
var id = GetSelType(); | |||
if (id == 0) { | |||
ShowMsg("必须选择一个类别!"); | |||
@@ -130,7 +130,7 @@ | |||
} | |||
function DelSel() { | |||
if (window.confirm("你确实要删除这些分类吗?")) document.form1.submit(); | |||
if (window.confirm("您确实要删除这些分类吗?")) document.form1.submit(); | |||
} | |||
function ChangePage2(sobj) { | |||
@@ -18,11 +18,11 @@ | |||
} | |||
function CheckSubmit() { | |||
if ($DE('rpfield').value == "") { | |||
ShowMsg("你选择的操作为手工指定字段,但你并没指定!"); | |||
ShowMsg("您选择的操作为手工指定字段,但您并没指定!"); | |||
return false; | |||
} | |||
if ($DE('rpstring').value == "") { | |||
ShowMsg("你没指定要替换的字符串!"); | |||
ShowMsg("您没指定要替换的字符串!"); | |||
return false; | |||
} | |||
return true; | |||
@@ -72,7 +72,7 @@ | |||
$dsql->SetQuery("Show Tables"); | |||
$dsql->Execute('t'); | |||
if($dsql->GetError()!=''){ | |||
echo "<font color='red'>找不到你所指定的数据库! $dbname</font><br>"; | |||
echo "<font color='red'>找不到您所指定的数据库! $dbname</font><br>"; | |||
echo $qbutton; | |||
} | |||
echo "<select name='exptable' id='exptable' size='10' style='width:60%;height: 220px;' onchange='ShowFields()'>\r\n"; | |||
@@ -36,7 +36,7 @@ | |||
$dsql->Execute(); | |||
while($row = $dsql->GetObject()) echo '<font color=red>'.$row->rank.'</font>、'; | |||
?> | |||
,级别值必须小于10,超过或等于10所有权限设置将无效(超级管理员),如果10个组不能完全满足你的要求,允许使用小数) </td> | |||
,级别值必须小于10,超过或等于10所有权限设置将无效(超级管理员),如果10个组不能完全满足您的要求,允许使用小数) </td> | |||
</tr> | |||
<?php | |||
$start = 0; | |||
@@ -13,7 +13,7 @@ a.btn{color:white!important} | |||
</style> | |||
<script> | |||
function DelTpl(filename) { | |||
if (window.confirm('你确定要删除这篇文档吗')) location = 'tpl.php?action=del&acdir=<?php echo $acdir; ?>&filename=' + filename; | |||
if (window.confirm('您确定要删除这篇文档吗')) location = 'tpl.php?action=del&acdir=<?php echo $acdir; ?>&filename=' + filename; | |||
else return false; | |||
} | |||
</script> | |||
@@ -148,7 +148,7 @@ function _upload() {} | |||
-----------------------*/ else if ($action == 'uploadok') { | |||
CheckCSRF(); | |||
if (!is_uploaded_file($upfile)) { | |||
ShowMsg("貌似你什么都没有上传哦!", "javascript:;"); | |||
ShowMsg("貌似您什么都没有上传哦!", "javascript:;"); | |||
exit(); | |||
} else { | |||
if (!preg_match("#\.(htm|html)$#", $upfile_name)) { | |||
@@ -186,7 +186,7 @@ function lib_demotag(&\$ctag,&\$refObj) | |||
extract(\$ctag->CAttribute->Items, EXTR_SKIP); | |||
\$revalue = ''; | |||
//你需编写的代码,不能用echo之类语法,把最终返回值传给\$revalue | |||
//您需编写的代码,不能用echo之类语法,把最终返回值传给\$revalue | |||
//------------------------------------------------------ | |||
\$revalue = 'Hello Word!'; | |||
@@ -74,7 +74,7 @@ class TagList | |||
$this->TagInfos = $this->dsql->GetOne("Select * From `#@__tagindex` where tag like '{$this->Tag}' "); | |||
if (!is_array($this->TagInfos)) { | |||
$fullsearch = $GLOBALS['cfg_phpurl']."/search.php?keyword=".$this->Tag."&searchtype=titlekeyword"; | |||
$msg = "系统无此标签,可能已经移除!<br /><br />你还可以尝试通过搜索程序去搜索这个关键字:<a href='$fullsearch'>前往搜索>></a>"; | |||
$msg = "系统无此标签,可能已经移除!<br /><br />您还可以尝试通过搜索程序去搜索这个关键字:<a href='$fullsearch'>前往搜索>></a>"; | |||
ShowMsg($msg, "-1"); | |||
exit(); | |||
} | |||
@@ -203,7 +203,7 @@ $cfg_soft_devteam = 'DedeBIZ'; | |||
//文档的默认命名规则 | |||
$art_shortname = $cfg_df_ext = '.html'; | |||
$cfg_df_namerule = '{typedir}/{aid}'.$cfg_df_ext; | |||
//新建目录的权限,如果你使用别的属性,本程不保证程序能顺利在Linux或Unix系统运行 | |||
//新建目录的权限,如果您使用别的属性,本程不保证程序能顺利在Linux或Unix系统运行 | |||
if (isset($cfg_ftp_mkdir) && $cfg_ftp_mkdir == 'Y') { | |||
$cfg_dir_purview = '0755'; | |||
} else { | |||
@@ -1944,7 +1944,7 @@ | |||
泥`ni | |||
尼`ni | |||
拟`ni | |||
你`ni | |||
您`ni | |||
匿`ni | |||
腻`ni | |||
逆`ni | |||
@@ -156,7 +156,7 @@ class DedeVote | |||
{ | |||
global $ENV_GOBACK_URL, $file, $memberID, $row, $content; | |||
if (empty($voteitem)) { | |||
return '你没选中任何项目!'; | |||
return '您没选中任何项目!'; | |||
} | |||
$items = ''; | |||
@@ -31,7 +31,7 @@ if (!function_exists('ParCv')) { | |||
if (!function_exists('ParamError')) { | |||
function ParamError() | |||
{ | |||
ShowMsg('对不起,你输入的参数有误!', 'javascript:;'); | |||
ShowMsg('对不起,您输入的参数有误!', 'javascript:;'); | |||
exit(); | |||
} | |||
} | |||
@@ -59,7 +59,7 @@ if (!function_exists('OpenFtp')) { | |||
global $cfg_basedir, $cfg_ftp_host, $cfg_ftp_port, $cfg_ftp_user, $cfg_ftp_pwd, $cfg_ftp_root, $g_ftpLink; | |||
if (!$g_ftpLink) { | |||
if ($cfg_ftp_host == '') { | |||
echo "由于你的站点的PHP配置存在限制,程序尝试用FTP进行目录操作,你必须在后台指定FTP相关的变量!"; | |||
echo "由于您的站点的PHP配置存在限制,程序尝试用FTP进行目录操作,您必须在后台指定FTP相关的变量!"; | |||
exit(); | |||
} | |||
$g_ftpLink = ftp_connect($cfg_ftp_host, $cfg_ftp_port); | |||
@@ -120,7 +120,7 @@ if (!function_exists('MemberUploads')) { | |||
//源文件类型检查 | |||
if ($utype == 'image') { | |||
if (!preg_match("/\.(".$cfg_imgtype.")$/", $GLOBALS[$upname.'_name'])) { | |||
ShowMsg("你所上传的图片类型不在许可列表,请上传{$cfg_imgtype}类型!", '-1'); | |||
ShowMsg("您所上传的图片类型不在许可列表,请上传{$cfg_imgtype}类型!", '-1'); | |||
exit(); | |||
} | |||
$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); | |||
@@ -133,10 +133,10 @@ if (!function_exists('MemberUploads')) { | |||
ShowMsg('上传的文件必须为flash文件!', '-1'); | |||
exit(); | |||
} else if ($utype == 'media' && !preg_match("/\.(".$cfg_mediatype.")$/", $GLOBALS[$upname.'_name'])) { | |||
ShowMsg('你所上传的文件类型必须为:'.$cfg_mediatype, '-1'); | |||
ShowMsg('您所上传的文件类型必须为:'.$cfg_mediatype, '-1'); | |||
exit(); | |||
} else if (!preg_match("/\.(".$allAllowType.")$/", $GLOBALS[$upname.'_name'])) { | |||
ShowMsg("你所上传的文件类型不被允许!", '-1'); | |||
ShowMsg("您所上传的文件类型不被允许!", '-1'); | |||
exit(); | |||
} | |||
//再次严格检测文件扩展名是否符合系统定义的类型 | |||
@@ -144,12 +144,12 @@ if (!function_exists('MemberUploads')) { | |||
$sname = $fs[count($fs) - 1]; | |||
$alltypes = explode('|', $allAllowType); | |||
if (!in_array(strtolower($sname), $alltypes)) { | |||
ShowMsg('你所上传的文件类型不被允许!', '-1'); | |||
ShowMsg('您所上传的文件类型不被允许!', '-1'); | |||
exit(); | |||
} | |||
//强制禁止的文件类型 | |||
if (preg_match("/(asp|php|pl|cgi|shtm|js)$/", $sname)) { | |||
ShowMsg('你上传的文件为系统禁止的类型!', '-1'); | |||
ShowMsg('您上传的文件为系统禁止的类型!', '-1'); | |||
exit(); | |||
} | |||
if ($exname == '') { | |||
@@ -162,7 +162,7 @@ if (!function_exists('MemberUploads')) { | |||
if (@filesize($cfg_basedir.$filename) > $GLOBALS['cfg_mb_upload_size'] * 1024) { | |||
@unlink($cfg_basedir.$filename); | |||
ShowMsg('你上传的文件超出系统大小限制!', '-1'); | |||
ShowMsg('您上传的文件超出系统大小限制!', '-1'); | |||
exit(); | |||
} | |||
@@ -44,7 +44,7 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = TRUE) | |||
if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { | |||
$i++; | |||
} else { | |||
return $msgtitle.'可能含有乱码,建议你改用英文字母和数字组合!'; | |||
return $msgtitle.'可能含有乱码,建议您改用英文字母和数字组合!'; | |||
} | |||
} else { | |||
if (preg_match("/[^0-9a-z@\.-]/i", $ck_uid[$i])) { | |||
@@ -69,13 +69,13 @@ function CheckNotAllow() | |||
global $dsql, $cfg_ml, $cfg_mb_spacesta; | |||
if (empty($cfg_ml->M_ID)) return; | |||
if ($cfg_ml->M_Spacesta == -2) { | |||
ShowMsg("你已经被禁言,请与管理员联系!", "-1"); | |||
ShowMsg("您已经被禁言,请与管理员联系!", "-1"); | |||
exit(); | |||
} else if ($cfg_ml->M_Spacesta == -10) { | |||
ShowMsg("系统开启了邮件审核机制,因此你的帐号需要审核后才能发信息!", "-1"); | |||
ShowMsg("系统开启了邮件审核机制,因此您的帐号需要审核后才能发信息!", "-1"); | |||
exit(); | |||
} else if ($cfg_ml->M_Spacesta < 0) { | |||
ShowMsg('系统开启了审核机制,因此你的帐号需要管理员审核后才能发信息!', '-1'); | |||
ShowMsg('系统开启了审核机制,因此您的帐号需要管理员审核后才能发信息!', '-1'); | |||
exit(); | |||
} | |||
} | |||
@@ -264,7 +264,7 @@ class MemberLogin | |||
$hasuse = $this->GetUserSpace(); | |||
$maxSize = $cfg_mb_max * 1024 * 1024; | |||
if ($hasuse >= $maxSize) { | |||
ShowMsg('你的空间已满,不允许上传新文件!', '-1'); | |||
ShowMsg('您的空间已满,不允许上传新文件!', '-1'); | |||
exit(); | |||
} | |||
} | |||
@@ -472,10 +472,10 @@ class MemberLogin | |||
{ | |||
$sta = ''; | |||
if ($this->M_Rank == 0) { | |||
$sta .= "你目前的身份是:普通会员"; | |||
$sta .= "您目前的身份是:普通会员"; | |||
} else { | |||
$row = $dsql->GetOne("Select membername From `#@__arcrank` where rank='".$this->M_Rank."'"); | |||
$sta .= "你目前的身份是:".$row['membername']; | |||
$sta .= "您目前的身份是:".$row['membername']; | |||
$rs = $dsql->GetOne("Select id From `#@__admin` where userid='".$this->M_LoginID."'"); | |||
if (!is_array($rs)) { | |||
if ($this->M_Rank > 10 && $this->M_HasDay > 0) $sta .= " 剩余天数: <font color='red'>".$this->M_HasDay."</font> 天 "; | |||