@@ -49,3 +49,4 @@ src/static/js/*.js | |||||
src/apps/special/*.html | src/apps/special/*.html | ||||
src/static/flink/*.png | src/static/flink/*.png | ||||
src/static/rss/*.xml | src/static/rss/*.xml | ||||
src/a/baidunews.xml |
@@ -16,7 +16,7 @@ if ($dopost == "save") { | |||||
CheckCSRF(); | CheckCSRF(); | ||||
//timeset tagname typeid normbody expbody | //timeset tagname typeid normbody expbody | ||||
$tagname = trim($tagname); | $tagname = trim($tagname); | ||||
$row = $dsql->GetOne("SELECT typeid FROM #@__myad WHERE typeid='$typeid' AND tagname LIKE '$tagname'"); | |||||
$row = $dsql->GetOne("SELECT typeid FROM `#@__myad` WHERE typeid='$typeid' AND tagname LIKE '$tagname'"); | |||||
if (is_array($row)) { | if (is_array($row)) { | ||||
ShowMsg("在相同栏目下已经存在同名的标记", "-1"); | ShowMsg("在相同栏目下已经存在同名的标记", "-1"); | ||||
exit(); | exit(); | ||||
@@ -531,6 +531,7 @@ function guid() { | |||||
// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax | // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax | ||||
function ShowMsg(content, ...args) { | function ShowMsg(content, ...args) { | ||||
title = "系统提示"; | title = "系统提示"; | ||||
size = ""; | |||||
if (typeof content == "undefined") content = ""; | if (typeof content == "undefined") content = ""; | ||||
modalID = guid(); | modalID = guid(); | ||||
var footer = `<button type="button" class="btn btn-primary" onClick="CloseModal(\'GKModal${modalID}\')">Ok</button>`; | var footer = `<button type="button" class="btn btn-primary" onClick="CloseModal(\'GKModal${modalID}\')">Ok</button>`; | ||||
@@ -543,6 +544,9 @@ function ShowMsg(content, ...args) { | |||||
if (typeof args[0].footer !== 'undefined' && args[0].footer != "") { | if (typeof args[0].footer !== 'undefined' && args[0].footer != "") { | ||||
footer = args[0].footer; | footer = args[0].footer; | ||||
} | } | ||||
if (typeof args[0].size !== 'undefined' && args[0].size != "") { | |||||
size = args[0].size; | |||||
} | |||||
if (typeof args[0].noClose !== 'undefined' && args[0].noClose == true) { | if (typeof args[0].noClose !== 'undefined' && args[0].noClose == true) { | ||||
noClose = true; | noClose = true; | ||||
} | } | ||||
@@ -550,7 +554,7 @@ function ShowMsg(content, ...args) { | |||||
footer = footer.replaceAll("~modalID~", modalID); | footer = footer.replaceAll("~modalID~", modalID); | ||||
content = content.replaceAll("~modalID~", modalID); | content = content.replaceAll("~modalID~", modalID); | ||||
var modal = `<div id="GKModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="GKModalLabel${modalID}"> | var modal = `<div id="GKModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="GKModalLabel${modalID}"> | ||||
<div class="modal-dialog" role="document"> | |||||
<div class="modal-dialog ${size}" role="document"> | |||||
<div class="modal-content"><div class="modal-header"> | <div class="modal-content"><div class="modal-header"> | ||||
<h5 class="modal-title" id="GKModalLabel${modalID}">${title}</h5>`; | <h5 class="modal-title" id="GKModalLabel${modalID}">${title}</h5>`; | ||||
if (!noClose) { | if (!noClose) { | ||||
@@ -19,7 +19,7 @@ if ($cfg_dbtype == 'sqlite') { | |||||
if ($dopost == "viewinfo") //查看表结构 | if ($dopost == "viewinfo") //查看表结构 | ||||
{ | { | ||||
echo "[<a href='javascript:;' onclick='javascript:HideObj(\"_mydatainfo\")'>关闭</a>]\r\n<xmp>"; | |||||
echo "<xmp>"; | |||||
if (empty($tablename)) { | if (empty($tablename)) { | ||||
echo "没有指定表名"; | echo "没有指定表名"; | ||||
} else { | } else { | ||||
@@ -33,7 +33,7 @@ if ($dopost == "viewinfo") //查看表结构 | |||||
exit(); | exit(); | ||||
} else if ($dopost == "opimize") //优化表 | } else if ($dopost == "opimize") //优化表 | ||||
{ | { | ||||
echo "[<a href='javascript:;' onclick='javascript:HideObj(\"_mydatainfo\")'>关闭</a>]\r\n<xmp>"; | |||||
echo "<xmp>"; | |||||
if (empty($tablename)) { | if (empty($tablename)) { | ||||
echo "没有指定表名"; | echo "没有指定表名"; | ||||
} else { | } else { | ||||
@@ -48,7 +48,7 @@ if ($dopost == "viewinfo") //查看表结构 | |||||
exit(); | exit(); | ||||
} else if ($dopost == "repair") //修复表 | } else if ($dopost == "repair") //修复表 | ||||
{ | { | ||||
echo "[<a href='javascript:;' onclick='javascript:HideObj(\"_mydatainfo\")'>关闭</a>]\r\n<xmp>"; | |||||
echo "<xmp>"; | |||||
if (empty($tablename)) { | if (empty($tablename)) { | ||||
echo "没有指定表名"; | echo "没有指定表名"; | ||||
} else { | } else { | ||||
@@ -6,39 +6,25 @@ | |||||
<link rel="stylesheet" href="../static/web/css/bootstrap.min.css"> | <link rel="stylesheet" href="../static/web/css/bootstrap.min.css"> | ||||
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css"> | <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css"> | ||||
<link rel="stylesheet" href="../static/web/css/admin.css"> | <link rel="stylesheet" href="../static/web/css/admin.css"> | ||||
<script src="../static/web/js/jquery.min.js"></script> | |||||
<script src="../static/web/js/bootstrap.bundle.min.js"></script> | |||||
<script src="js/main.js"></script> | |||||
<script language="javascript" src="../static/web/js/webajax.js"></script> | <script language="javascript" src="../static/web/js/webajax.js"></script> | ||||
<script language="javascript"> | <script language="javascript"> | ||||
var newobj; | |||||
var posLeft = 200; | var posLeft = 200; | ||||
var posTop = 150; | var posTop = 150; | ||||
function LoadUrl(surl) { | function LoadUrl(surl) { | ||||
newobj = document.getElementById('_mydatainfo'); | |||||
if (!newobj) { | |||||
newobj = document.createElement("DIV"); | |||||
newobj.id = '_mydatainfo'; | |||||
newobj.style.position = 'absolute'; | |||||
newobj.className = "dlg"; | |||||
newobj.style.top = posTop; | |||||
newobj.style.left = posLeft; | |||||
document.body.appendChild(newobj); | |||||
} else { | |||||
newobj.style.display = "block"; | |||||
} | |||||
fetch("sys_data.php?" + surl).then(resp=>{ | fetch("sys_data.php?" + surl).then(resp=>{ | ||||
if (resp.ok) { | if (resp.ok) { | ||||
return resp.text() | return resp.text() | ||||
} | } | ||||
throw new Error('x'); | throw new Error('x'); | ||||
}).then((d)=>{ | }).then((d)=>{ | ||||
newobj.innerHTML = d; | |||||
ShowMsg(d,{size:"modal-lg"}); | |||||
}).catch((error) => { | }).catch((error) => { | ||||
newobj.innerHTML = errMsg; | |||||
ShowMsg("操作失败"); | |||||
}); | }); | ||||
} | } | ||||
function HideObj(objname) { | |||||
var obj = document.getElementById(objname); | |||||
obj.style.display = "none"; | |||||
} | |||||
//获得选中文件的数据表 | //获得选中文件的数据表 | ||||
function getCheckboxItem() { | function getCheckboxItem() { | ||||
var myform = document.form1; | var myform = document.form1; | ||||
@@ -209,14 +209,16 @@ if (!function_exists('GetTypeUrl')) { | |||||
//伪静态栏目,Nginx伪静态规则参考: | //伪静态栏目,Nginx伪静态规则参考: | ||||
//rewrite ^/list-([0-9]+)$ /apps/list.php?tid=$1; | //rewrite ^/list-([0-9]+)$ /apps/list.php?tid=$1; | ||||
//rewrite ^/list-([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&PageNo=$2; | //rewrite ^/list-([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&PageNo=$2; | ||||
if ($cfg_rewrite == 'Y') { | |||||
//目录版return "/article/".$aid.""; | |||||
//网页版 | |||||
return $GLOBALS['cfg_cmspath']."/list-".$typeid.""; | |||||
} | |||||
if($isdefault==-1) { | if($isdefault==-1) { | ||||
//动态 | //动态 | ||||
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid; | |||||
if ($cfg_rewrite == 'Y') { | |||||
//目录版return "/article/".$aid.""; | |||||
//网页版 | |||||
return $GLOBALS['cfg_cmspath']."/list-".$typeid.""; | |||||
} else { | |||||
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid; | |||||
} | |||||
} else if ($ispart == 2) { | } else if ($ispart == 2) { | ||||
//跳转网址 | //跳转网址 | ||||
$reurl = $typedir; | $reurl = $typedir; | ||||