From ddb43c0bedec0936d44f8c5436f00693b1aa3f6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?=
<93301500+xushubieli@users.noreply.github.com>
Date: Tue, 30 May 2023 16:13:39 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BF=AE=E6=94=B9=E5=92=8C?=
=?UTF-8?q?=E5=8F=91=E5=B8=83=E6=96=87=E6=A1=A3=E9=AA=8C=E8=AF=81=E6=A0=87?=
=?UTF-8?q?=E9=A2=98=E5=92=8C=E6=8F=90=E7=A4=BA=E8=B0=83=E6=95=B4=EF=BC=8C?=
=?UTF-8?q?=E5=85=B6=E4=BB=96=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/admin/album_add.php | 8 ++++++--
src/admin/album_edit.php | 8 ++++++--
src/admin/archives_add.php | 8 ++++++--
src/admin/archives_do.php | 2 +-
src/admin/archives_edit.php | 8 ++++++--
src/admin/archives_sg_add.php | 8 ++++++--
src/admin/archives_sg_edit.php | 8 ++++++--
src/admin/article_add.php | 10 +++++-----
src/admin/article_edit.php | 6 +++++-
src/admin/js/album.js | 2 +-
src/admin/js/main.js | 17 ++++++++---------
src/admin/soft_add.php | 8 ++++++--
src/admin/soft_edit.php | 8 ++++++--
src/admin/templets/album_add.htm | 7 ++-----
src/admin/templets/album_edit.htm | 7 ++-----
src/admin/templets/archives_add.htm | 2 +-
src/admin/templets/archives_edit.htm | 2 +-
src/admin/templets/archives_sg_add.htm | 2 +-
src/admin/templets/archives_sg_edit.htm | 2 +-
src/admin/templets/article_add.htm | 4 +---
src/admin/templets/article_edit.htm | 5 +----
src/admin/templets/soft_add.htm | 4 +++-
src/admin/templets/soft_edit.htm | 2 ++
src/admin/templets/spec_add.htm | 2 ++
src/admin/templets/spec_edit.htm | 2 ++
src/static/web/css/admin.css | 11 +++++++----
src/static/web/js/user.js | 4 ++--
src/system/typelink/typelink.class.php | 2 +-
src/user/inc/archives_check.php | 8 ++++++--
src/user/inc/archives_check_edit.php | 10 +++++++---
src/user/inc/inc_pwd_functions.php | 12 ++++++------
src/user/templets/album_add.htm | 2 +-
src/user/templets/album_edit.htm | 4 +---
src/user/templets/archives_add.htm | 2 +-
src/user/templets/archives_sg_add.htm | 2 +-
src/user/templets/article_add.htm | 2 +-
src/user/templets/soft_add.htm | 2 +-
37 files changed, 122 insertions(+), 81 deletions(-)
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 @@
+
+
+
+
+