Browse Source

统一使用默认提示,其他2开会员中心也用不到我们提示

pull/40/head
叙述、别离 3 months ago
parent
commit
e925193281
42 changed files with 40 additions and 216 deletions
  1. +1
    -1
      src/admin/templets/ad_add.htm
  2. +1
    -1
      src/admin/templets/album_add.htm
  3. +1
    -1
      src/admin/templets/album_edit.htm
  4. +1
    -1
      src/admin/templets/archives_add.htm
  5. +1
    -1
      src/admin/templets/archives_edit.htm
  6. +1
    -1
      src/admin/templets/archives_sg_add.htm
  7. +1
    -1
      src/admin/templets/archives_sg_edit.htm
  8. +1
    -1
      src/admin/templets/article_add.htm
  9. +1
    -1
      src/admin/templets/article_edit.htm
  10. +1
    -1
      src/admin/templets/catalog_add.htm
  11. +1
    -1
      src/admin/templets/catalog_edit.htm
  12. +1
    -1
      src/admin/templets/diy_add.htm
  13. +1
    -1
      src/admin/templets/diy_edit.htm
  14. +1
    -1
      src/admin/templets/freelist_add.htm
  15. +1
    -1
      src/admin/templets/freelist_edit.htm
  16. +1
    -1
      src/admin/templets/friendlink_add.htm
  17. +1
    -1
      src/admin/templets/friendlink_main.htm
  18. +1
    -1
      src/admin/templets/media_add.htm
  19. +1
    -1
      src/admin/templets/media_edit.htm
  20. +1
    -1
      src/admin/templets/member_edit.htm
  21. +1
    -1
      src/admin/templets/member_toadmin.htm
  22. +1
    -1
      src/admin/templets/mytag_add.htm
  23. +1
    -1
      src/admin/templets/soft_add.htm
  24. +1
    -1
      src/admin/templets/soft_edit.htm
  25. +1
    -1
      src/admin/templets/spec_add.htm
  26. +1
    -1
      src/admin/templets/spec_edit.htm
  27. +1
    -1
      src/admin/templets/sys_admin_user_add.htm
  28. +1
    -1
      src/admin/templets/sys_data_replace.htm
  29. +1
    -1
      src/admin/templets/templets_one_add.htm
  30. +1
    -1
      src/admin/templets/templets_one_edit.htm
  31. +1
    -1
      src/admin/templets/vote_add.htm
  32. +0
    -89
      src/static/web/js/admin.main.js
  33. +0
    -87
      src/static/web/js/style.js
  34. +2
    -2
      src/user/index.php
  35. +1
    -1
      src/user/templets/album_add.htm
  36. +1
    -1
      src/user/templets/album_edit.htm
  37. +1
    -1
      src/user/templets/edit_baseinfo.htm
  38. +1
    -1
      src/user/templets/index.htm
  39. +0
    -0
      src/user/templets/index_notlogin.htm
  40. +1
    -1
      src/user/templets/menu.htm
  41. +1
    -1
      src/user/templets/soft_add.htm
  42. +1
    -1
      src/user/templets/soft_edit.htm

+ 1
- 1
src/admin/templets/ad_add.htm View File

@@ -13,7 +13,7 @@
<script src="/static/web/js/daterangepicker.js"></script>
</head>
<body>
<form name="form1" action="ad_add.php" method="post" onSubmit="return checkSubmit();">
<form name="form1" action="ad_add.php" method="post">
<input type="hidden" name="normbody[style]" value="code" id="adstyle">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
<input type="hidden" name="dopost" value="save">


+ 1
- 1
src/admin/templets/album_add.htm View File

@@ -20,7 +20,7 @@
<script src="/static/web/js/admin.album.js"></script>
</head>
<body>
<form name="form1" action="album_add.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmitAlb();">
<form name="form1" action="album_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="cid" value="<?php echo $cid;?>">
<input type="hidden" name="imagebody">


+ 1
- 1
src/admin/templets/album_edit.htm View File

@@ -20,7 +20,7 @@
<script src="/static/web/js/admin.album.js"></script>
</head>
<body>
<form name="form1" action="album_edit.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmitAlb();">
<form name="form1" action="album_edit.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="id" value="<?php echo $aid?>">
<input type="hidden" name="imagebody">


+ 1
- 1
src/admin/templets/archives_add.htm View File

@@ -19,7 +19,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="archives_add.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="archives_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="cid" value="<?php echo $cid?>">
<input type="hidden" name="dopost" value="save">


+ 1
- 1
src/admin/templets/archives_edit.htm View File

@@ -19,7 +19,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="archives_edit.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="archives_edit.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="id" value="<?php echo $aid?>">
<input type="hidden" name="dopost" value="save">


+ 1
- 1
src/admin/templets/archives_sg_add.htm View File

@@ -19,7 +19,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="archives_sg_add.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="archives_sg_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="cid" value="<?php echo $cid?>">
<input type="hidden" name="dopost" value="save">


+ 1
- 1
src/admin/templets/archives_sg_edit.htm View File

@@ -19,7 +19,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="archives_sg_edit.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="archives_sg_edit.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="channelid" value="<?php echo $channelid;?>">
<input type="hidden" name="id" value="<?php echo $aid;?>">
<input type="hidden" name="sortrank" value="<?php echo $addRow['senddate'];?>">


+ 1
- 1
src/admin/templets/article_add.htm View File

@@ -19,7 +19,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="article_add.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="article_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="dopost" value="save">
<table class="shadow-sm my-3">


+ 1
- 1
src/admin/templets/article_edit.htm View File

@@ -19,7 +19,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="article_edit.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="article_edit.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="id" value="<?php echo $aid?>">


+ 1
- 1
src/admin/templets/catalog_add.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="catalog_add.php" method="post" onSubmit="return checkSubmit();">
<form name="form1" action="catalog_add.php" method="post">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="reid" id="reid" value="<?php echo $id;?>">
<input type="hidden" name="topid" id="topid" value="<?php echo $topid;?>">


+ 1
- 1
src/admin/templets/catalog_edit.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="catalog_edit.php" method="post" onSubmit="return checkSubmit();">
<form name="form1" action="catalog_edit.php" method="post">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="id" value="<?php echo $id;?>">
<input type="hidden" name="topid" value="<?php echo $myrow['topid'];?>">


+ 1
- 1
src/admin/templets/diy_add.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="diy_add.php?action=add" method="post" onSubmit="return checkSubmit();">
<form name="form1" action="diy_add.php?action=add" method="post">
<table class="table shadow-sm my-3">
<tr>
<td colspan="2"><a href="diy_main.php">自定义表单管理</a> - 添加自定义表单</td>


+ 1
- 1
src/admin/templets/diy_edit.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="diy_edit.php" method="post" onSubmit="return checkSubmit();">
<form name="form1" action="diy_edit.php" method="post">
<input type="hidden" name="diyid" value="<?php echo $diyid;?>">
<input type="hidden" name="dopost" value="save">
<table class="table shadow-sm my-3">


+ 1
- 1
src/admin/templets/freelist_add.htm View File

@@ -22,7 +22,7 @@
<div id="list2" style="display:none"><p>[field:typelink/] - <a href="[field:arcurl/]">[field:title/]</a></p></div>
<div id="list3" style="display:none"><p>[field:imglink/]</p><p>[field:textlink/]</p></div>
<div id="list4" style="display:none"><p><a href="[field:arcurl/]">[field:title/]</a></p><p><a href="[field:arcurl/]">[field:description/]</a></p><p><span>日期:[field:pubdate function="MyDate('Y-m-d', @me)"/]</span><span>浏览:[field:click/]</span><span>好评:[field:scores/]</span></p></div>
<form name="form1" action="freelist_add.php" method="post" onSubmit="return CheckSubmit();">
<form name="form1" action="freelist_add.php" method="post">
<input type="hidden" name="dopost" value="save">
<table class="table shadow-sm my-3">
<tr>


+ 1
- 1
src/admin/templets/freelist_edit.htm View File

@@ -18,7 +18,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="freelist_edit.php" method="post" onSubmit="return CheckSubmit();">
<form name="form1" action="freelist_edit.php" method="post">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="aid" value="<?php echo $row['aid']?>">
<table class="table shadow-sm my-3">


+ 1
- 1
src/admin/templets/friendlink_add.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="friendlink_add.php" method="post" enctype="multipart/form-data" onSubmit="return CheckSubmit();">
<form name="form1" action="friendlink_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="add">
<table class="table shadow-sm my-3">
<tr>


+ 1
- 1
src/admin/templets/friendlink_main.htm View File

@@ -35,7 +35,7 @@
</tr>
</table>
</form>
<form name="form1" method="post" action="friendlink_edit.php" onSubmit="return checkSubmit();">
<form name="form1" method="post" action="friendlink_edit.php">
<input type="hidden" name="dopost" value="delall">
<input type="hidden" name="allid">
<table class="table shadow-sm mb-3">


+ 1
- 1
src/admin/templets/media_add.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="media_add.php" method="post" enctype="multipart/form-data" onSubmit="return CheckSubmit();">
<form name="form1" action="media_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="upload">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
<table class="table shadow-sm my-3">


+ 1
- 1
src/admin/templets/media_edit.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="media_edit.php" method="post" enctype="multipart/form-data" onSubmit="return CheckSubmit();">
<form name="form1" action="media_edit.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
<input type="hidden" name="aid" value="<?php echo $aid?>">


+ 1
- 1
src/admin/templets/member_edit.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form2" action="member_do.php" method="post" onSubmit="return checkSubmit();">
<form name="form2" action="member_do.php" method="post">
<input type="hidden" name="dopost" value="edituser">
<input type="hidden" name="id" value="<?php echo $id?>">
<table class="table shadow-sm my-3">


+ 1
- 1
src/admin/templets/member_toadmin.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form2" action="member_toadmin.php" method="post" onSubmit="return checkSubmit();">
<form name="form2" action="member_toadmin.php" method="post">
<input type="hidden" name="dopost" value="toadmin">
<input type="hidden" name="userid" value="<?php echo $row['userid']?>">
<input type="hidden" name="id" value="<?php echo $id?>">


+ 1
- 1
src/admin/templets/mytag_add.htm View File

@@ -15,7 +15,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form action="mytag_add.php" method="post" enctype="multipart/form-data" name="form1" onSubmit="return checkSubmit();">
<form action="mytag_add.php" method="post" enctype="multipart/form-data" name="form1">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
<table class="table shadow-sm my-3">


+ 1
- 1
src/admin/templets/soft_add.htm View File

@@ -35,7 +35,7 @@
</script>
</head>
<body>
<form name="form1" action="soft_add.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="soft_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="cid" value="<?php echo $cid;?>">


+ 1
- 1
src/admin/templets/soft_edit.htm View File

@@ -34,7 +34,7 @@
</script>
</head>
<body>
<form name="form1" action="soft_edit.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="soft_edit.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="id" value="<?php echo $aid?>">


+ 1
- 1
src/admin/templets/spec_add.htm View File

@@ -56,7 +56,7 @@
</script>
</head>
<body>
<form name="form1" action="spec_add.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="spec_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="arcrank" value="0">


+ 1
- 1
src/admin/templets/spec_edit.htm View File

@@ -53,7 +53,7 @@
</script>
</head>
<body>
<form name="form1" action="spec_edit.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
<form name="form1" action="spec_edit.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?php echo $arcRow['id']?>">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="arcrank" value="<?php echo $arcRow['arcrank']?>">


+ 1
- 1
src/admin/templets/sys_admin_user_add.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form name="form1" action="sys_admin_user_add.php" method="post" onSubmit="return checkSubmit();">
<form name="form1" action="sys_admin_user_add.php" method="post">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
<input type="hidden" name="dopost" value="add">
<table class="table shadow-sm my-3">


+ 1
- 1
src/admin/templets/sys_data_replace.htm View File

@@ -13,7 +13,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form action="sys_data_replace.php" name="form1" method="post" target="stafrm" onSubmit="return CheckSubmit();">
<form action="sys_data_replace.php" name="form1" method="post" target="stafrm">
<input type="hidden" name="action" value="apply">
<table class="table shadow-sm my-3">
<tr>


+ 1
- 1
src/admin/templets/templets_one_add.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form action="templets_one_add.php" method="post" name="form1" onSubmit="return checkSubmit();">
<form action="templets_one_add.php" method="post" name="form1">
<input type="hidden" name="dopost" value="save">
<table class="table shadow-sm my-3">
<tr>


+ 1
- 1
src/admin/templets/templets_one_edit.htm View File

@@ -12,7 +12,7 @@
<script src="/static/web/js/admin.main.js"></script>
</head>
<body>
<form action="templets_one_edit.php" method="post" name="form1" onSubmit="return checkSubmit();">
<form action="templets_one_edit.php" method="post" name="form1">
<input type="hidden" name="dopost" value="saveedit">
<input type="hidden" name="aid" value="<?php echo $aid?>">
<table class="table shadow-sm my-3">


+ 1
- 1
src/admin/templets/vote_add.htm View File

@@ -32,7 +32,7 @@
</script>
</head>
<body>
<form name="form1" method="post" action="vote_add.php" onSubmit="return checkSubmit();">
<form name="form1" method="post" action="vote_add.php">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="isarc" value="<?php echo $isarc;?>">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">


+ 0
- 89
src/static/web/js/admin.main.js View File

@@ -230,95 +230,6 @@ function getSelCat(targetId) {
HideObj("getCatMap");
ChangeFullDiv("hide");
}
//生成一个随机id
function guid() {
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}
var _DedeConfirmFuncs = {};
var _DedeConfirmFuncsClose = {};
function __DedeConfirmRun(modalID) {
_DedeConfirmFuncs[modalID]();
}
function __DedeConfirmRunClose(modalID) {
_DedeConfirmFuncsClose[modalID]();
}
function DedeConfirm(content = "", title = "确认提示") {
let modalID = guid();
return new Promise((resolve, reject) => {
_DedeConfirmFuncs[modalID] = ()=>{
resolve("success");
CloseModal(`DedeModal${modalID}`);
}
_DedeConfirmFuncsClose[modalID] = ()=>{
reject("cancel");
CloseModal(`DedeModal${modalID}`);
}
let footer = `<button type="button" class="btn btn-outline-success btn-sm" onclick="__DedeConfirmRunClose(\'${modalID}\')">取消</button><button type="button" class="btn btn-success btn-sm" onclick="__DedeConfirmRun(\'${modalID}\')">确定</button>`;
let modal = `<div id="DedeModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="DedeModalLabel${modalID}"><div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="modal-header"><h6 class="modal-title" id="DedeModalLabel${modalID}">${title}</h6>`;
modal += `<button type="button" class="update-close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i></button>`;
modal += `</div><div class="modal-body">${content}</div><div class="modal-footer">${footer}</div></div></div></div>`;
$("body").append(modal)
$("#DedeModal" + modalID).modal({
backdrop: 'static',
show: true
});
$("#DedeModal" + modalID).on('hidden.bs.modal', function(e) {
$("#DedeModal" + modalID).remove();
})
})
}
//函数会返回一个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 = `<button type="button" class="btn btn-primary btn-sm" onclick="CloseModal(\'GKModal${modalID}\')">确定</button>`;
var noClose = false;
if (args.length == 1) {
//存在args参数
if (typeof args[0].title !== 'undefined' && args[0].title != "") {
title = args[0].title;
}
if (typeof args[0].footer !== 'undefined' && 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) {
noClose = true;
}
}
footer = footer.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}"><div class="modal-dialog ${size}" role="document"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="GKModalLabel${modalID}">${title}</h5>`;
if (!noClose) {
modal += `<button type="button" class="update-close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i></button>`;
}
modal += `</div><div class="modal-body">${content}</div><div class="modal-footer">${footer}</div></div></div></div>`;
$("body").append(modal)
$("#GKModal" + modalID).modal({
backdrop: 'static',
show: true
});
$("#GKModal" + modalID).on('hidden.bs.modal', function(e) {
$("#GKModal" + modalID).remove();
})
return modalID;
}
//隐藏并销毁modal
function CloseModal(modalID) {
$("#" + modalID).modal('hide');
$("#" + modalID).on('hidden.bs.modal', function(e) {
if ($("#" + modalID).length > 0) {
$("#" + modalID).remove();
}
})
}
//获取缩略图
var litpicImgSrc = '';
var litpicImg = '';


+ 0
- 87
src/static/web/js/style.js View File

@@ -18,93 +18,6 @@ function SetCookie(c_name, value, expiredays) {
exdate.setDate(exdate.getDate() + expiredays);
document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
}
//全局消息提示框,生成一个随机id
function guid() {
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}
var _DedeConfirmFuncs = {};
var _DedeConfirmFuncsClose = {};
function __DedeConfirmRun(modalID) {
_DedeConfirmFuncs[modalID]();
}
function __DedeConfirmRunClose(modalID) {
_DedeConfirmFuncsClose[modalID]();
}
function DedeConfirm(content = "", title = "确认提示") {
let modalID = guid();
return new Promise((resolve, reject) => {
_DedeConfirmFuncs[modalID] = () => {
resolve("success");
CloseModal(`DedeModal${modalID}`);
}
_DedeConfirmFuncsClose[modalID] = () => {
reject("cancel");
CloseModal(`DedeModal${modalID}`);
}
let footer = `<button type="button" class="btn btn-success btn-sm" onClick="__DedeConfirmRun(\'${modalID}\')">确定</button> <button type="button" class="btn btn-outline-success btn-sm" onClick="__DedeConfirmRunClose(\'${modalID}\')">取消</button>`;
let modal = `<div id="DedeModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="DedeModalLabel${modalID}"><div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="modal-header"><h6 class="modal-title" id="DedeModalLabel${modalID}">${title}</h6>`;modal +=`<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span>&times;</span></button>`;
modal += `</div><div class="modal-body">${content}</div><div class="modal-footer">${footer}</div></div></div></div>`;
$("body").append(modal)
$("#DedeModal" + modalID).modal({
backdrop: 'static',
show: true
});
$("#DedeModal" + modalID).on('hidden.bs.modal', function(e) {
$("#DedeModal" + modalID).remove();
})
})
}
//函数会返回一个modalID,通过这个id可自已定义一些方法,这里用到了一个展开语法:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax
function ShowMsg(content, ...args) {
title = "系统提示";
if (typeof content == "undefined") content = '';
modalID = guid();
var footer = `<button type="button" class="btn btn-success btn-sm" onClick="CloseModal(\'DedeModal${modalID}\')">确定</button>`;
var noClose = false;
if (args.length == 1) {
//存在args参数
if (typeof args[0].title !== 'undefined' && args[0].title != "") {
title = args[0].title;
}
if (typeof args[0].footer !== 'undefined' && args[0].footer != "") {
footer = args[0].footer;
}
if (typeof args[0].noClose !== 'undefined' && args[0].noClose == true) {
noClose = true;
}
}
String.prototype.replaceAll = function(s1, s2) {
return this.replace(new RegExp(s1, "gm"), s2);
}
footer = footer.replaceAll("~modalID~", modalID);
content = content.replaceAll("~modalID~", modalID);
var modal = `<div id="DedeModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="DedeModalLabel${modalID}"><div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="modal-header"><h6 class="modal-title" id="DedeModalLabel${modalID}">${title}</h6>`;
if (!noClose) {
modal += `<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i></button>`;
}
modal += `</div><div class="modal-body">${content}</div><div class="modal-footer">${footer}</div></div></div></div>`;
$("body").append(modal)
$("#DedeModal" + modalID).modal({
backdrop: 'static',
show: true
});
$("#DedeModal" + modalID).on('hidden.bs.modal', function(e) {
$("#DedeModal" + modalID).remove();
})
return modalID;
}
//隐藏并销毁modal
function CloseModal(modalID) {
$("#" + modalID).modal('hide');
$("#" + modalID).on('hidden.bs.modal', function(e) {
if ($("#" + modalID).length > 0) {
$("#" + modalID).remove();
}
})
}
//在某个元素内显示alert信息
function ShowAlert(ele, content, type, showtime = 3000) {
let msg = `<div class="alert alert-${type}" role="alert">


+ 2
- 2
src/user/index.php View File

@@ -16,7 +16,7 @@ $menutype = 'mydede';
if ($uid == '') {
$iscontrol = 'yes';
if (!$cfg_ml->IsLogin()) {
include_once(dirname(__FILE__)."/templets/index-notlogin.htm");
include_once(dirname(__FILE__)."/templets/index_notlogin.htm");
} else {
$minfos = $dsql->GetOne("SELECT * FROM `#@__member_tj` WHERE mid='".$cfg_ml->M_ID."';");
$minfos['totaluse'] = $cfg_ml->GetUserSpace();
@@ -59,7 +59,7 @@ if ($uid == '') {
$_vars['face'] = empty($_vars['face'])? $GLOBALS['cfg_mainsite'].'/static/web/img/admin.png' : $_vars['face'];
$_vars['userid_e'] = urlencode($_vars['userid']);
$_vars['userurl'] = $cfg_memberurl."/index.php?uid=".$_vars['userid_e'];
if($_vars['membername']=='开放浏览') $_vars['membername'] = '限制会员';
if ($_vars['membername'] == '开放浏览') $_vars['membername'] = '限制会员';
$dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET homecount=homecount+1 WHERE mid='{$_vars['mid']}' ");
$tpl = new DedeTemplate();
$tpl->LoadTemplate(dirname(__FILE__)."/templets/space.htm");


+ 1
- 1
src/user/templets/album_add.htm View File

@@ -19,7 +19,7 @@
<li class="breadcrumb-item">发布<?php echo $cInfos['typename'];?></li></li>
</ol>
</nav>
<form name="addcontent" action="<?php echo $cfg_memberurl;?>/album_add.php" method="post" enctype="multipart/form-data" onsubmit="return checkSubmit();">
<form name="addcontent" action="<?php echo $cfg_memberurl;?>/album_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="channelid" value="<?php echo $channelid;?>">
<input type="hidden" name="imagebody" id="imagebody">


+ 1
- 1
src/user/templets/album_edit.htm View File

@@ -19,7 +19,7 @@
<li class="breadcrumb-item">修改<?php echo $row['title']?></li></li>
</ol>
</nav>
<form name="addcontent" action="<?php echo $cfg_memberurl;?>/album_edit.php" method="post" enctype="multipart/form-data" onsubmit="return checkSubmit();">
<form name="addcontent" action="<?php echo $cfg_memberurl;?>/album_edit.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="aid" value="<?php echo $row['id'];?>">
<input type="hidden" name="idhash" value="<?php echo hash('sha256', $row['id'].$cfg_cookie_encode);?>">


+ 1
- 1
src/user/templets/edit_baseinfo.htm View File

@@ -19,7 +19,7 @@
<?php include(DEDEMEMBER."/templets/menu.htm");?>
<div class="col-md-9">
<div class="pannel-main-container shadow-sm rounded">
<form name="form2" action="<?php echo $cfg_memberurl;?>/edit_baseinfo.php" method="post" enctype="multipart/form-data" onsubmit="return checkSubmit();">
<form name="form2" action="<?php echo $cfg_memberurl;?>/edit_baseinfo.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
<input type="hidden" name="dopost" value="save">
<input type="hidden" id="newface" name="newface">


+ 1
- 1
src/user/templets/index.htm View File

@@ -68,7 +68,7 @@
</div>
</div>
</div>
<?php if($cfg_mb_max > 0){?>
<?php if ($cfg_mb_max > 0){?>
<div class="py-3">
<div class="pannel-main-container shadow-sm rounded">
<div class="media-body item-article">


src/user/templets/index-notlogin.htm → src/user/templets/index_notlogin.htm View File


+ 1
- 1
src/user/templets/menu.htm View File

@@ -24,7 +24,7 @@ while ($channel = $dsql->GetArray('addmod')) {
<div id="collapseArchives" class="collapse mt-3<?php echo (isset($_menu_conex) && $_menu_conex===true)? ' show' : '';?>">
<ul class="list-group list-group-flush">
<?php foreach($channels as $chid => $channel) {?>
<?php if(!in_array($chid,$enabledChannels) || $channel['isshow'] == 0) continue;?>
<?php if (!in_array($chid,$enabledChannels) || $channel['isshow'] == 0) continue;?>
<?php $channel['usermancon'] = empty($channel['usermancon'])? "content_list.php" : $channel['usermancon'];?>
<?php if ($channel['issend'] == 1) {?>
<li class="list-group-item justify-content-between align-items-center rounded <?php if (isset($_menu_conex) && $channelid == $channel['id']) echo 'active';?>">


+ 1
- 1
src/user/templets/soft_add.htm View File

@@ -19,7 +19,7 @@
<li class="breadcrumb-item">发布<?php echo $cInfos['typename'];?></li></li>
</ol>
</nav>
<form name="addcontent" action="<?php echo $cfg_memberurl;?>/soft_add.php" method="post" enctype="multipart/form-data" onsubmit="return checkSubmit();">
<form name="addcontent" action="<?php echo $cfg_memberurl;?>/soft_add.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="channelid" value="<?php echo $channelid;?>">
<input type="hidden" id="litpic" name="litpic">


+ 1
- 1
src/user/templets/soft_edit.htm View File

@@ -19,7 +19,7 @@
<li class="breadcrumb-item">修改<?php echo $row['title']?></li></li>
</ol>
</nav>
<form name="addcontent" action="<?php echo $cfg_memberurl;?>/soft_edit.php" method="post" enctype="multipart/form-data" onsubmit="return checkSubmit();">
<form name="addcontent" action="<?php echo $cfg_memberurl;?>/soft_edit.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="aid" value="<?php echo $row['id'];?>">
<input type="hidden" name="channelid" value="<?php echo $row['channel'];?>">


Loading…
Cancel
Save