diff --git a/src/dede/album_add.php b/src/dede/album_add.php
index 1d38fc8d..1d02e01e 100755
--- a/src/dede/album_add.php
+++ b/src/dede/album_add.php
@@ -1,5 +1,4 @@
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 = "
- 请选择你的后续操作:
- 继续发布图片
-
- 更改图集
-
- 预览文档
-
- 已发布图片管理
-
- $backurl
- ";
+ $msg = "请选择你的后续操作:继续发布图片 更改图集 预览文档 已发布图片管理 $backurl";
$msg = "
{$msg}
".GetUpdateTest();
- $wintitle = "成功发布一个图集!";
+ $wintitle = "成功发布一个图集";
$wecome_info = "文章管理::发布图集";
$win = new OxWindow();
$win->AddTitle("成功发布一个图集:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", FALSE);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/album_edit.php b/src/dede/album_edit.php
index c3ae9009..50075c45 100755
--- a/src/dede/album_edit.php
+++ b/src/dede/album_edit.php
@@ -1,5 +1,4 @@
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 =
- " 请选择你的后续操作:
- 继续发布图片
-
- 查看更改
-
- 预览文档
-
- 管理已发布图片
-
- $backurl
- ";
-
- $wintitle = "成功更改图集!";
+ $msg = "请选择你的后续操作:继续发布图片 查看更改 预览文档 管理已发布图片 $backurl";
+ $wintitle = "成功更改图集";
$wecome_info = "文章管理::更改图集";
$win = new OxWindow();
$win->AddTitle("成功更改一个图集:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", false);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/archives_add.php b/src/dede/archives_add.php
index 3315c085..3d0d5e4a 100755
--- a/src/dede/archives_add.php
+++ b/src/dede/archives_add.php
@@ -1,5 +1,4 @@
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 = " 请选择你的后续操作:
- 继续发布文档
-
- 查看文档
-
- 更改文档
-
- 已发布文档管理
-
- $backurl
- ";
+ $msg = "请选择你的后续操作:继续发布文档 查看文档 更改文档 已发布文档管理 $backurl";
$msg = "{$msg}
".GetUpdateTest();
-
- $wintitle = '成功发布文档!';
+ $wintitle = '成功发布文档';
$wecome_info = '文档管理::发布文档';
$win = new OxWindow();
$win->AddTitle('成功发布文档:');
$win->AddMsgItem($msg);
$winform = $win->GetWindow('hand', ' ', false);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/archives_edit.php b/src/dede/archives_edit.php
index 127bfd34..9b606eac 100755
--- a/src/dede/archives_edit.php
+++ b/src/dede/archives_edit.php
@@ -1,5 +1,4 @@
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 = "
- 请选择你的后续操作:
- 发布新文档
-
- 查看更改
-
- 查看文档
-
- 管理文档
-
- $backurl
- ";
-
- $wintitle = "成功更改文档!";
+ $msg = "请选择你的后续操作:发布新文档 查看更改 查看文档 管理文档 $backurl";
+ $wintitle = "成功更改文档";
$wecome_info = "文档管理::更改文档";
$win = new OxWindow();
$win->AddTitle("成功更改文档:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", false);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/archives_sg_add.php b/src/dede/archives_sg_add.php
index 34c8412e..9fdf19ca 100755
--- a/src/dede/archives_sg_add.php
+++ b/src/dede/archives_sg_add.php
@@ -1,5 +1,4 @@
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 = "
- 请选择你的后续操作:
- 继续发布文档
-
- 查看文档
-
- 更改文档
-
- 已发布文档管理
-
- 网站栏目管理
- ";
-
- $wintitle = "成功发布文档!";
+ $msg = "请选择你的后续操作:继续发布文档 查看文档 更改文档 已发布文档管理 网站栏目管理";
+ $wintitle = "成功发布文档";
$wecome_info = "文档管理::发布文档";
$win = new OxWindow();
$win->AddTitle("成功发布文档:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", false);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/archives_sg_edit.php b/src/dede/archives_sg_edit.php
index 6e34a42b..9d9fbbc8 100755
--- a/src/dede/archives_sg_edit.php
+++ b/src/dede/archives_sg_edit.php
@@ -1,5 +1,4 @@
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 = "
- 请选择你的后续操作:
- 发布新文档
-
- 查看更改
-
- 查看文档
-
- 管理文档
-
- 网站栏目管理
- ";
-
- $wintitle = "成功更改文档!";
+ $msg = "请选择你的后续操作:发布新文档 查看更改 查看文档 管理文档 网站栏目管理";
+ $wintitle = "成功更改文档";
$wecome_info = "文档管理::更改文档";
$win = new OxWindow();
$win->AddTitle("成功更改文档:");
diff --git a/src/dede/article_add.php b/src/dede/article_add.php
index 562d65b4..8ccb1be5 100755
--- a/src/dede/article_add.php
+++ b/src/dede/article_add.php
@@ -1,5 +1,4 @@
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 = " 请选择你的后续操作:
- 继续发布文章
-
- 查看文章
-
- 更改文章
-
- 已发布文章管理
-
- $backurl
- ";
+ $msg = "请选择你的后续操作:继续发布文章 查看文章 更改文章 已发布文章管理 $backurl";
$msg = "{$msg}
".GetUpdateTest();
- $wintitle = "成功发布文章!";
+ $wintitle = "成功发布文章";
$wecome_info = "文章管理::发布文章";
$win = new OxWindow();
$win->AddTitle("成功发布文章:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", false);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/article_edit.php b/src/dede/article_edit.php
index 657d032d..ba18d937 100755
--- a/src/dede/article_edit.php
+++ b/src/dede/article_edit.php
@@ -1,5 +1,4 @@
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 = "
- 请选择你的后续操作:
- 发布新文章
-
- 查看更改
-
- 查看文章
-
- 管理文章
-
- $backurl
- ";
-
- $wintitle = "成功更改文章!";
+ $msg = "请选择你的后续操作:发布新文章 查看更改 查看文章 管理文章 $backurl";
+ $wintitle = "成功更改文章";
$wecome_info = "文章管理::更改文章";
$win = new OxWindow();
$win->AddTitle("成功更改文章:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", false);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/css/base.css b/src/dede/css/base.css
index 6bab7f2d..810b4e6a 100644
--- a/src/dede/css/base.css
+++ b/src/dede/css/base.css
@@ -1 +1 @@
-*{font-size:12px;letter-spacing:.4px}body{font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;line-height:1.5}form,h1,h2,h3,ul,ol,div{margin:0;padding:0}td{line-height:1.5}td,th,div{word-break:break-all;word-wrap:break-word}b,strong{font-weight:400}li,dd{margin:0;padding:0;list-style-type:none}select{height:calc(1.5em + .75rem + 2px);padding:.25rem .5rem;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s}input{padding:.25rem .5rem;height:calc(1.5em + .75rem + 2px);line-height:18px;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}input[type=button],input[type=submit],input[type=reset]{padding:.25rem .5rem;line-height:1.5;color:#fff;background:#28a745;border-radius:.2rem;border:0}textarea{padding:.25rem .5rem;line-height:18px;font-family:Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}input:focus,textarea:focus{border-color:#28a745;box-shadow:0 0 2px #28a745;outline:none}input[type=radio],input[type=checkbox]{box-shadow:none;outline:none}label{display:inline-block;margin:10px 0}img{margin-right:6px;border-radius:.2rem;vertical-align:baseline}h1,h2,h3{font-size:18px;color:#424b51}a:link{color:#424b51;text-decoration:none}a:hover{opacity:.8}a:visited{color:#666}.np{border:0}.linerow{border-bottom:1px solid #ACACAC}.coolbg{padding:.25rem .5rem;background:#f2f2f2;border-bottom:1px solid #ccc;border-radius:.2rem;border:0;cursor:pointer}.coolbg2{height:18px;background:#DFDDD2;border:1px solid #000}.ll{border-right:2px solid #ACACAC;border-bottom:2px solid #ACACAC;background:#E6E6E6}.bline{height:36px;background:#fff;border-bottom:1px solid #eee}#uploadfield{float:left}.bline2{border-bottom:1px solid #eee}.coolbt{border-left:1px solid #EFEFEF;border-top:1px solid #EFEFEF;border-bottom:1px solid #ACACAC;background:#E4F7D7;cursor:pointer}.coolbt2{border-left:1px solid #EFEFEF;border-top:1px solid #EFEFEF;border-bottom:1px solid #ACACAC;background:#F7FCDA}.coolbg3{width:140px;height:20px;border:1px solid #BDC5B4;background:#DFDDD2;text-align:right}.coolbg61{width:380px;height:26px;line-height:26px;border-top:1px solid #BDC5B4;border-left:1px solid #BDC5B4;border-right:1px solid #BDC5B4;background:#E7F3B1;text-align:right}.coolbg62{padding:6px;width:380px;height:300px;border:1px solid #BDC5B4;background:#F8FDF0}.coolbg4{width:190px;height:24px;line-height:24px;border-bottom:1px solid #C9CFC1;background:#F9FCDC url(../images/dlgtitle.gif)repeat-x;text-align:right}.coolbg5{width:190px;height:6px;border-top:1px solid #BDC5B4;background:#F9FCDC}.wsselect{height:60px;line-height:24px;background:#FCFEF1;overflow:auto}.dlg{padding:.25rem .5rem;border:2px solid #008E38;background:#F0FAEB;width:360px;line-height:160%}.pubdlg{background:#fff;border:4px solid #008E38;border-radius:.2rem;z-index:8888}.pubdlg .title{height:29px;line-height:29px;border-bottom:1px solid #C9CFC1;background:url(../images/dlgtitle.gif)repeat-x;text-align:left;cursor:move}.pubdlg .titLeft{float:left;padding-left:10px;line-height:29px;font-weight:600;color:#424b51}.pubdlg .titRight{float:right;padding:0}.fullpagediv{position:absolute;top:0;left:0;width:100%;height:120%;background:#cdcdcd;opacity:.5;z-index:1999}.quicksel{margin-left:10px;margin-top:10px;width:680px;height:420px;overflow:auto;z-index:10005}.quickselfoot{padding-top:8px;border-top:1px dashed #C0CC9D}.quickselItem{margin-bottom:8px}.quickselItem .topcat{padding-left:6px;line-height:24px;border-bottom:1px dashed #ccc;background:#FBFEEF;clear:both}.quickselItem .soncat{padding-left:10px}.quickselItem .item{float:left;margin-right:8px}.mysource,.mywriter{padding:.25rem .5rem;width:280px;line-height:160%;border:4px solid #008E38;background:#F0FAEB;z-index:10001}.dlgws div{width:100%}.dlgTesttitle{padding:.25rem .5rem;width:300px;line-height:150%;border:2px solid #008E38;background:#F0FAEB}#_mysource{z-index:10003}#_mywriter{z-index:10004}#uploadwait{z-index:19999}.option1{background:#DCECA6}.option2{background:#F7FBD2}.option3{background:#fff}.ininput{width:96%;height:20px;border:1px solid #fff}.nbt{padding:2px;background:#fff url(../images/allbtbg.gif);border:1px solid #A5AF83}.tdt{padding-left:6px}.waitpage{position:absolute;top:0;left:0;opacity:.7;background:#ababab url(../../images/loading1.gif)center no-repeat;z-index:10000}.divpre img{max-width:150px;max-height:100px}.divpre{overflow:hidden}.autoinput{padding-left:6px;width:90%}.bodytitle{margin:auto;width:98%;height:28px;border:1px dotted #BFD67C;background:url(../images/wbg.gif)}.bodytitle div{float:left}.bodytitletxt{padding-left:6px;line-height:28px}.tbtitle td{padding:6px}.tblist td{padding:6px;background:#fff}.tblist td.tbsname{padding:6px;background:#F9FFE6}.colordlg{padding:.25rem .5rem;width:100px;line-height:160%;border:2px dashed #008E38;background:#F0FAEB;z-index:10005}option.alltype{padding-left:16px;height:18px;line-height:18px;background:url(../images/arr4.gif)3px 4px no-repeat}option.btype{padding-left:16px;height:18px;line-height:18px;background:url(../images/arr4.gif)3px 4px no-repeat}option.stype{padding-left:26px;height:18px;line-height:18px;background:url(../images/arrr.gif)10px 4px no-repeat}.ilist{border-top:1px dashed #eee;border-bottom:1px dashed #eee;border-left:1px dashed #eee}.ilist td{border-right:1px dashed #eee}#typeid2{padding:0;float:left;height:18px;font-size:12px;background:url(../images/typeid2bg.gif)no-repeat;border:0}#litpic{margin-left:-20px;width:85px;height:20px;opacity:0;cursor:pointer}.litpic_span{margin-left:-60px;width:76px;height:22px;overflow:hidden;cursor:pointer}#starttime,#endtime,#pubdate{padding-left:30px;background:url(../images/calendar.gif)10px no-repeat}#title{background:url(../images/ruler.gif)repeat-x 0px 6px}.spec{width:60px}.gtab a{display:block;float:left;width:80px;height:26px;line-height:26px;text-align:center}.albCt img{cursor:pointer}.maintable{width:98%!important;border:1px solid #dee2e6}span.page-link{color:#fff;background:#28a745}a.btn{color:white!important}.btn-success{background:#28a745;border-color:#28a745}.table{color:#424b51}.table td,.table th{padding:.6rem;vertical-align:middle}.table th img,.table td img{vertical-align:text-bottom}
\ No newline at end of file
+*{font-size:12px;letter-spacing:.4px}body{font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;line-height:1.5}form,h1,h2,h3,ul,ol,div{margin:0;padding:0}td{line-height:1.5}td,th,div{word-break:break-all;word-wrap:break-word}b,strong{font-weight:400}li,dd{margin:0;padding:0;list-style-type:none}select{height:calc(1.5em + .75rem + 2px);padding:.25rem .5rem;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s}input{padding:.25rem .5rem;height:calc(1.5em + .75rem + 2px);line-height:18px;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}input[type=button],input[type=submit],input[type=reset]{padding:.25rem .5rem;line-height:1.5;color:#fff;background:#28a745;border-radius:.2rem;border:0}textarea{padding:.25rem .5rem;line-height:18px;font-family:Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}input:focus,textarea:focus{border-color:#28a745;box-shadow:0 0 2px #28a745;outline:none}input[type=radio],input[type=checkbox]{box-shadow:none;outline:none}label{display:inline-block;margin:10px 0}img{margin-right:6px;border-radius:.2rem;vertical-align:baseline}h1,h2,h3{font-size:18px;color:#424b51}a:link{color:#424b51;text-decoration:none}a:hover{opacity:.8}a:visited{color:#666}.np{border:0}.linerow{border-bottom:1px solid #ACACAC}.coolbg{padding:.25rem .5rem;background:#f2f2f2;border-bottom:1px solid #ccc;border-radius:.2rem;border:0;cursor:pointer}.coolbg2{height:18px;background:#DFDDD2;border:1px solid #000}.ll{border-right:2px solid #ACACAC;border-bottom:2px solid #ACACAC;background:#E6E6E6}.bline{height:36px;background:#fff;border-bottom:1px solid #eee}#uploadfield{float:left}.bline2{border-bottom:1px solid #eee}.coolbt{border-left:1px solid #EFEFEF;border-top:1px solid #EFEFEF;border-bottom:1px solid #ACACAC;background:#E4F7D7;cursor:pointer}.coolbt2{border-left:1px solid #EFEFEF;border-top:1px solid #EFEFEF;border-bottom:1px solid #ACACAC;background:#F7FCDA}.coolbg3{width:140px;height:20px;border:1px solid #BDC5B4;background:#DFDDD2;text-align:right}.coolbg61{width:380px;height:26px;line-height:26px;border-top:1px solid #BDC5B4;border-left:1px solid #BDC5B4;border-right:1px solid #BDC5B4;background:#E7F3B1;text-align:right}.coolbg62{padding:6px;width:380px;height:300px;border:1px solid #BDC5B4;background:#F8FDF0}.coolbg4{width:190px;height:24px;line-height:24px;border-bottom:1px solid #C9CFC1;background:#F9FCDC url(../images/dlgtitle.gif)repeat-x;text-align:right}.coolbg5{width:190px;height:6px;border-top:1px solid #BDC5B4;background:#F9FCDC}.wsselect{height:60px;line-height:24px;background:#FCFEF1;overflow:auto}.dlg{padding:.25rem .5rem;border:2px solid #008E38;background:#F0FAEB;width:360px;line-height:160%}.pubdlg{background:#fff;border:4px solid #008E38;border-radius:.2rem;z-index:8888}.pubdlg .title{height:29px;line-height:29px;border-bottom:1px solid #C9CFC1;background:url(../images/dlgtitle.gif)repeat-x;text-align:left;cursor:move}.pubdlg .titLeft{float:left;padding-left:10px;line-height:29px;font-weight:600;color:#424b51}.pubdlg .titRight{float:right;padding:0}.fullpagediv{position:absolute;top:0;left:0;width:100%;height:120%;background:#cdcdcd;opacity:.5;z-index:1999}.quicksel{margin-left:10px;margin-top:10px;width:680px;height:420px;overflow:auto;z-index:10005}.quickselfoot{padding-top:8px;border-top:1px dashed #C0CC9D}.quickselItem{margin-bottom:8px}.quickselItem .topcat{padding-left:6px;line-height:24px;border-bottom:1px dashed #ccc;background:#FBFEEF;clear:both}.quickselItem .soncat{padding-left:10px}.quickselItem .item{float:left;margin-right:8px}.mysource,.mywriter{padding:.25rem .5rem;width:280px;line-height:160%;border:4px solid #008E38;background:#F0FAEB;z-index:10001}.dlgws div{width:100%}.dlgTesttitle{padding:.25rem .5rem;width:300px;line-height:150%;border:2px solid #008E38;background:#F0FAEB}#_mysource{z-index:10003}#_mywriter{z-index:10004}#uploadwait{z-index:19999}.option1{background:#DCECA6}.option2{background:#F7FBD2}.option3{background:#fff}.ininput{width:96%;height:20px;border:1px solid #fff}.nbt{padding:2px;background:#fff url(../images/allbtbg.gif);border:1px solid #A5AF83}.tdt{padding-left:6px}.waitpage{position:absolute;top:0;left:0;opacity:.7;background:#ababab url(../../images/loading1.gif)center no-repeat;z-index:10000}.divpre img{max-width:150px;max-height:100px}.divpre{overflow:hidden}.autoinput{padding-left:6px;width:90%}.bodytitle{margin:auto;width:98%;height:28px;border:1px dotted #BFD67C;background:url(../images/wbg.gif)}.bodytitle div{float:left}.bodytitletxt{padding-left:6px;line-height:28px}.tbtitle td{padding:6px}.tblist td{padding:6px;background:#fff}.tblist td.tbsname{padding:6px;background:#F9FFE6}.colordlg{padding:.25rem .5rem;width:100px;line-height:160%;border:2px dashed #008E38;background:#F0FAEB;z-index:10005}option.alltype{padding-left:16px;height:18px;line-height:18px;background:url(../images/arr4.gif)3px 4px no-repeat}option.btype{padding-left:16px;height:18px;line-height:18px;background:url(../images/arr4.gif)3px 4px no-repeat}option.stype{padding-left:26px;height:18px;line-height:18px;background:url(../images/arrr.gif)10px 4px no-repeat}.ilist{border-top:1px dashed #eee;border-bottom:1px dashed #eee;border-left:1px dashed #eee}.ilist td{border-right:1px dashed #eee}#typeid2{padding:0;float:left;height:18px;font-size:12px;background:url(../images/typeid2bg.gif)no-repeat;border:0}#litpic{margin-left:-20px;width:85px;height:20px;opacity:0;cursor:pointer}.litpic_span{margin-left:-60px;width:76px;height:22px;overflow:hidden;cursor:pointer}#starttime,#endtime,#pubdate{padding-left:30px;background:url(../images/calendar.gif)10px no-repeat}#title{background:url(../images/ruler.gif)repeat-x 0px 10px}.spec{width:60px}.gtab a{display:block;float:left;width:80px;height:26px;line-height:26px;text-align:center}.albCt img{cursor:pointer}.maintable{width:98%!important;border:1px solid #dee2e6}span.page-link{color:#fff;background:#28a745}a.btn{color:white!important}.btn-success{background:#28a745;border-color:#28a745}.table{color:#424b51}.table td,.table th{padding:.6rem;vertical-align:middle}.table th img,.table td img{vertical-align:text-bottom}
\ No newline at end of file
diff --git a/src/dede/soft_add.php b/src/dede/soft_add.php
index c9ec9852..c712a539 100755
--- a/src/dede/soft_add.php
+++ b/src/dede/soft_add.php
@@ -1,5 +1,4 @@
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 = "
- 请选择你的后续操作:
- 继续发布软件
-
- 查看软件
-
- 更改软件
-
- 已发布软件管理
-
- 网站栏目管理
- ";
+ $msg = "请选择你的后续操作:继续发布软件 查看软件 更改软件 已发布软件管理 网站栏目管理";
$msg = "{$msg}
".GetUpdateTest();
-
- $wintitle = "成功发布一个软件!";
+ $wintitle = "成功发布一个软件";
$wecome_info = "文章管理::发布软件";
$win = new OxWindow();
$win->AddTitle("成功发布软件:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", FALSE);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/soft_edit.php b/src/dede/soft_edit.php
index a9026af3..e46e6861 100755
--- a/src/dede/soft_edit.php
+++ b/src/dede/soft_edit.php
@@ -1,5 +1,4 @@
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 = "
- 请选择你的后续操作:
- 发布新软件
-
- 继续修改
-
- 查看软件
-
- 已发布软件管理
-
- 网站栏目管理
- ";
- $wintitle = "成功修改一个软件!";
+ $msg = "请选择你的后续操作:发布新软件 继续修改 查看软件 已发布软件管理 网站栏目管理";
+ $wintitle = "成功修改一个软件";
$wecome_info = "文章管理::修改软件";
$win = new OxWindow();
$win->AddTitle("成功修改软件:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", FALSE);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/spec_add.php b/src/dede/spec_add.php
index 334b629a..10a46566 100755
--- a/src/dede/spec_add.php
+++ b/src/dede/spec_add.php
@@ -1,5 +1,4 @@
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 = "
- 请选择你的后续操作:
- 创建新专题
-
- 查看专题
-
- 已发布专题管理
- ";
- $wintitle = "成功创建专题!";
+ $msg = "请选择你的后续操作:创建新专题 查看专题 已发布专题管理";
+ $wintitle = "成功创建专题";
$wecome_info = "文章管理::发布专题";
$win = new OxWindow();
$win->AddTitle("成功创建专题:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", FALSE);
$win->Display();
-}
+}
\ No newline at end of file
diff --git a/src/dede/spec_edit.php b/src/dede/spec_edit.php
index 92261b4c..ac052f5e 100755
--- a/src/dede/spec_edit.php
+++ b/src/dede/spec_edit.php
@@ -1,5 +1,4 @@
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 = " 请选择你的后续操作:
- 发布新专题
-
- 查看更改
-
- 查看专题
-
- 已发布专题管理 ";
- $wintitle = "成功更改一个专题!";
+ $msg = "请选择你的后续操作:发布新专题 查看更改 查看专题 已发布专题管理 ";
+ $wintitle = "成功更改一个专题";
$wecome_info = "专题管理::更改专题";
$win = new OxWindow();
- $win->AddTitle("成功更改专题!");
+ $win->AddTitle("成功更改专题");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", " ", FALSE);
$win->Display();
-}
+}
\ No newline at end of file