diff --git a/src/admin/album_add.php b/src/admin/album_add.php index f8d1b5e1..9fb973da 100644 --- a/src/admin/album_add.php +++ b/src/admin/album_add.php @@ -49,8 +49,12 @@ if ($dopost != 'save') { if (!isset($albums)) $albums = ""; if (!isset($delzip)) $delzip = 0; if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click); - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } + if (empty($typeid)) { + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { diff --git a/src/admin/album_edit.php b/src/admin/album_edit.php index 9723271d..c71ff77a 100644 --- a/src/admin/album_edit.php +++ b/src/admin/album_edit.php @@ -62,8 +62,12 @@ if ($dopost != 'save') { if (!isset($formzip)) $formzip = 0; if (!isset($ddisfirst)) $ddisfirst = 0; if (!isset($delzip)) $delzip = 0; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } + if (empty($typeid)) { + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { diff --git a/src/admin/archives_add.php b/src/admin/archives_add.php index 088ae167..7045b610 100644 --- a/src/admin/archives_add.php +++ b/src/admin/archives_add.php @@ -49,8 +49,12 @@ if ($dopost != 'save') { if (!isset($dellink)) $dellink = 0; if (!isset($autolitpic)) $autolitpic = 0; if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click); - if ($typeid == 0) { - ShowMsg('请指定文档的栏目', '-1'); + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } + if (empty($typeid)) { + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { diff --git a/src/admin/archives_do.php b/src/admin/archives_do.php index cef8cb36..aca58400 100644 --- a/src/admin/archives_do.php +++ b/src/admin/archives_do.php @@ -486,7 +486,7 @@ else if ($dopost == 'quickEdit') { getUserChannel(), $arcRow['channel']); echo ""; ?> diff --git a/src/admin/archives_edit.php b/src/admin/archives_edit.php index 4695e32e..b53971b5 100644 --- a/src/admin/archives_edit.php +++ b/src/admin/archives_edit.php @@ -48,8 +48,12 @@ if ($dopost != 'save') { if (!isset($dellink)) $dellink = 0; if (!isset($autolitpic)) $autolitpic = 0; if (!isset($writer)) $writer = ''; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } + if (empty($typeid)) { + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { diff --git a/src/admin/archives_sg_add.php b/src/admin/archives_sg_add.php index 93bf1fee..40109f85 100644 --- a/src/admin/archives_sg_add.php +++ b/src/admin/archives_sg_add.php @@ -37,8 +37,12 @@ if ($dopost != 'save') { } else if ($dopost == 'save') { require_once(DEDEINC.'/image.func.php'); require_once(DEDEINC.'/libraries/oxwindow.class.php'); - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } + if (empty($typeid)) { + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { diff --git a/src/admin/archives_sg_edit.php b/src/admin/archives_sg_edit.php index 707ab0ca..d344fcb2 100644 --- a/src/admin/archives_sg_edit.php +++ b/src/admin/archives_sg_edit.php @@ -34,8 +34,12 @@ if ($dopost != 'save') { } else if ($dopost == 'save') { require_once(DEDEINC.'/image.func.php'); require_once(DEDEINC.'/libraries/oxwindow.class.php'); - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } + if (empty($typeid)) { + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { diff --git a/src/admin/article_add.php b/src/admin/article_add.php index 4927cf2c..b5c09704 100644 --- a/src/admin/article_add.php +++ b/src/admin/article_add.php @@ -51,8 +51,12 @@ if ($dopost != 'save') { if (!isset($dellink)) $dellink = 0; if (!isset($autolitpic)) $autolitpic = 0; if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click); + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } if (empty($typeid)) { - ShowMsg("请指定文档的栏目", "-1"); + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { @@ -100,10 +104,6 @@ if ($dopost != 'save') { ShowMsg("获取主键失败,无法进行后续操作", "-1"); exit(); } - if (trim($title) == '') { - ShowMsg('标题不能为空', '-1'); - exit(); - } //处理body字段自动摘要、自动提取缩略图等 $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); //自动分页 diff --git a/src/admin/article_edit.php b/src/admin/article_edit.php index a10d244d..cae6c312 100644 --- a/src/admin/article_edit.php +++ b/src/admin/article_edit.php @@ -54,8 +54,12 @@ if ($dopost != 'save') { if (!isset($remote)) $remote = 0; if (!isset($dellink)) $dellink = 0; if (!isset($autolitpic)) $autolitpic = 0; + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } if (empty($typeid)) { - ShowMsg("请指定文档的栏目", "-1"); + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { diff --git a/src/admin/js/album.js b/src/admin/js/album.js index ba221f6f..a9392c03 100644 --- a/src/admin/js/album.js +++ b/src/admin/js/album.js @@ -28,7 +28,7 @@ function seePicNewAlb(f, imgdid, frname, hpos, acname) { picnameObj.value = ''; newobj = $Obj('uploadwait'); if (!newobj) { - newobj = document.createElement("DIV"); + newobj = document.createElement("div"); newobj.id = 'uploadwait'; newobj.style.position = 'absolute'; newobj.className = 'uploadwait'; diff --git a/src/admin/js/main.js b/src/admin/js/main.js index 9eca32ad..e6873ef3 100644 --- a/src/admin/js/main.js +++ b/src/admin/js/main.js @@ -32,7 +32,7 @@ function SeePicNew(f, imgdid, frname, hpos, acname) { picnameObj.value = ''; newobj = $Obj('uploadwait'); if (!newobj) { - newobj = document.createElement("DIV"); + newobj = document.createElement("div"); newobj.id = 'uploadwait'; newobj.style.position = 'absolute'; newobj.className = 'uploadwait'; @@ -82,11 +82,11 @@ function SelectKeywords(f) { } function OpenMyWin(surl) { var pos = GetWinPos(800,600); - window.open(surl, "popUpMyWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left="+pos.left+", top="+pos.top); + window.open(surl, "popUpMyWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); } function OpenMyWinCoOne(surl) { var pos = GetWinPos(800,600); - window.open(surl, "popUpMyWin2", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left="+pos.left+",top="+pos.top); + window.open(surl, "popUpMyWin2", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ",top=" + pos.top); } function InitPage() { var selsource = $Obj('selsource'); @@ -165,7 +165,7 @@ function ChangeFullDiv(showhide, screenheigt) { var newobj = $Obj('fullpagediv'); if (showhide == 'show') { if (!newobj) { - newobj = document.createElement("DIV"); + newobj = document.createElement("div"); newobj.id = 'fullpagediv'; newobj.style.position = 'absolute'; newobj.className = 'fullpagediv'; @@ -201,7 +201,7 @@ function LoadNewDiv(e, surl, oname) { posLeft = posLeft - 100; var newobj = $Obj(oname); if (!newobj) { - newobj = document.createElement("DIV"); + newobj = document.createElement("div"); newobj.id = oname; newobj.style.position = 'absolute'; newobj.className = oname; @@ -221,7 +221,7 @@ function LoadNewDiv2(e, surl, oname, dlgcls) { var posTop = 50; var newobj = $Obj(oname); if (!newobj) { - newobj = document.createElement("DIV"); + newobj = document.createElement("div"); newobj.id = oname; newobj.style.position = 'absolute'; newobj.className = dlgcls; @@ -262,7 +262,7 @@ function CkRemote() { function LoadQuickDiv(e, surl, oname, w, h) { var newobj = $Obj(oname); if (!newobj) { - newobj = document.createElement("DIV"); + newobj = document.createElement("div"); newobj.id = oname; newobj.style.position = 'fixed'; newobj.className = 'pubdlg'; @@ -407,10 +407,9 @@ function DedeConfirm(content="",title="确认提示") { //函数会返回一个modalID,通过这个id可自已定义一些方法,这里用到了一个展开语法:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax function ShowMsg(content, ...args) { title = "系统提示"; - size = ""; if (typeof content == "undefined") content = ""; modalID = guid(); - var footer = ``; + var footer = ``; var noClose = false; if (args.length == 1) { //存在args参数 diff --git a/src/admin/soft_add.php b/src/admin/soft_add.php index 88a47b66..30822e59 100644 --- a/src/admin/soft_add.php +++ b/src/admin/soft_add.php @@ -46,8 +46,12 @@ if ($dopost != 'save') { if (!isset($remote)) $remote = 0; if (!isset($dellink)) $dellink = 0; if (!isset($autolitpic)) $autolitpic = 0; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } + if (empty($typeid)) { + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { diff --git a/src/admin/soft_edit.php b/src/admin/soft_edit.php index fdbecec4..7421e3d2 100644 --- a/src/admin/soft_edit.php +++ b/src/admin/soft_edit.php @@ -75,8 +75,12 @@ if ($dopost != 'save') { if (!isset($remote)) $remote = 0; if (!isset($dellink)) $dellink = 0; if (!isset($autolitpic)) $autolitpic = 0; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); + if (trim($title) == '') { + ShowMsg("请输入文档标题", "-1"); + exit(); + } + if (empty($typeid)) { + ShowMsg("请选择文档栏目", "-1"); exit(); } if (empty($channelid)) { diff --git a/src/admin/templets/album_add.htm b/src/admin/templets/album_add.htm index 525cc684..b875cd67 100644 --- a/src/admin/templets/album_add.htm +++ b/src/admin/templets/album_add.htm @@ -134,7 +134,7 @@ getUserChannel(),$channelid); echo ""; ?> @@ -368,9 +368,6 @@ + + + + + \ No newline at end of file diff --git a/src/user/templets/archives_add.htm b/src/user/templets/archives_add.htm index 1242ad51..7ae6c4a3 100755 --- a/src/user/templets/archives_add.htm +++ b/src/user/templets/archives_add.htm @@ -54,7 +54,7 @@ "; - echo ""; + echo ""; echo $typeOptions; echo ""; ?> diff --git a/src/user/templets/archives_sg_add.htm b/src/user/templets/archives_sg_add.htm index 525e683f..be2d1e3a 100755 --- a/src/user/templets/archives_sg_add.htm +++ b/src/user/templets/archives_sg_add.htm @@ -54,7 +54,7 @@ "; - echo ""; + echo ""; echo $typeOptions; echo ""; ?> diff --git a/src/user/templets/article_add.htm b/src/user/templets/article_add.htm index 49ed4590..77976407 100755 --- a/src/user/templets/article_add.htm +++ b/src/user/templets/article_add.htm @@ -54,7 +54,7 @@ "; - echo ""; + echo ""; echo $typeOptions; echo ""; ?> diff --git a/src/user/templets/soft_add.htm b/src/user/templets/soft_add.htm index 878c7391..50ac268b 100755 --- a/src/user/templets/soft_add.htm +++ b/src/user/templets/soft_add.htm @@ -54,7 +54,7 @@ "; - echo ""; + echo ""; echo $typeOptions; echo ""; ?>