Browse Source

调整界面及栏目方面提示

tags/6.2.12
叙述、别离 8 months ago
parent
commit
c83331e269
11 changed files with 135 additions and 132 deletions
  1. +1
    -1
      src/admin/index_body.php
  2. +5
    -4
      src/admin/js/body.js
  3. +2
    -3
      src/admin/templets/catalog_add.htm
  4. +1
    -0
      src/admin/templets/catalog_add_quick.htm
  5. +1
    -1
      src/admin/templets/catalog_edit.htm
  6. +1
    -1
      src/admin/templets/index_body.htm
  7. +1
    -0
      src/admin/templets/member_scores.htm
  8. +1
    -0
      src/admin/templets/mychannel_modifysearch.htm
  9. +55
    -59
      src/admin/templets/sys_info.htm
  10. +64
    -52
      src/static/web/css/admin.css
  11. +3
    -11
      src/user/index.php

+ 1
- 1
src/admin/index_body.php View File

@@ -38,7 +38,7 @@ if (empty($dopost)) {
$admin_catalog = join(',', $admin_catalogs);
$userCatalogSql = "AND arc.typeid IN($admin_catalog) ";
}
$query = "SELECT arc.id, arc.arcrank, arc.title, arc.typeid, arc.mid, arc.pubdate, arc.channel, ch.editcon, tp.typename FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank<>-2 {$userCatalogSql} AND arc.mid={$cuserLogin->getUserID()} ORDER BY arc.id DESC LIMIT 0,13";
$query = "SELECT arc.id, arc.arcrank, arc.title, arc.typeid, arc.mid, arc.pubdate, arc.channel, ch.editcon, tp.typename FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank<>-2 {$userCatalogSql} AND arc.mid={$cuserLogin->getUserID()} ORDER BY arc.id DESC LIMIT 0,10";
$arcArr = array();
$dsql->Execute('m', $query);
while($row = $dsql->GetArray('m'))


+ 5
- 4
src/admin/js/body.js View File

@@ -198,6 +198,7 @@ async function LoadStatChart() {
type: 'line',
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'right',
@@ -212,28 +213,28 @@ async function LoadStatChart() {
data: pvs,
lineTension: .5,
borderColor: 'rgba(54, 162, 235, 1)',
backgroundColor: 'rgba(54, 162, 235, 0.2)',
backgroundColor: 'rgba(54, 162, 235, 0.1)',
borderWidth: 2
}, {
label: 'UV',
data: uvs,
lineTension: .5,
borderColor: 'rgba(255, 206, 86, 1)',
backgroundColor: 'rgba(255, 206, 86, 0.2)',
backgroundColor: 'rgba(255, 206, 86, 0.1)',
borderWidth: 2
}, {
label: 'IP',
data: ips,
lineTension: .5,
borderColor: 'rgba(255, 99, 132, 1)',
backgroundColor: 'rgba(255, 99, 132, 0.2)',
backgroundColor: 'rgba(255, 99, 132, 0.1)',
borderWidth: 2
}, {
label: 'VV',
data: vvs,
lineTension: .5,
borderColor: 'rgba(75, 192, 192, 1)',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
backgroundColor: 'rgba(75, 192, 192, 0.1)',
borderWidth: 2
}
]


+ 2
- 3
src/admin/templets/catalog_add.htm View File

@@ -8,6 +8,7 @@
<link rel="stylesheet" href="../static/web/css/bootstrap.min.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.min.js"></script>
<script src="js/main.js"></script>
</head>
<body>
@@ -297,11 +298,9 @@
}
function checkSubmit() {
if (document.form1.typename.value == "") {
alert("栏目名称不能为空");
document.form1.typename.focus();
ShowMsg("栏目名称不能为空");
return false;
}
return true;
}
function SelectTemplets(fname) {
var pos = GetWinPos(800,600);


+ 1
- 0
src/admin/templets/catalog_add_quick.htm View File

@@ -8,6 +8,7 @@
<link rel="stylesheet" href="../static/web/css/bootstrap.min.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.min.js"></script>
<script src="js/main.js"></script>
</head>
<body>


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

@@ -328,7 +328,7 @@
}
function checkSubmit() {
if (document.form1.typename.value == "") {
alert("栏目名称不能为空");
ShowMsg("栏目名称不能为空");
document.form1.typename.focus();
return false;
}


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

@@ -124,7 +124,7 @@
<div class="card-header">
<a name="statChart"><i class="fa fa-line-chart"></i> 流量统计图</a>
</div>
<div class="card-body p-3">
<div class="card-body">
<canvas id="statChart"></canvas>
</div>
</div>


+ 1
- 0
src/admin/templets/member_scores.htm View File

@@ -8,6 +8,7 @@
<link rel="stylesheet" href="../static/web/css/bootstrap.min.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.min.js"></script>
<script src="js/main.js"></script>
</head>
<body>


+ 1
- 0
src/admin/templets/mychannel_modifysearch.htm View File

@@ -8,6 +8,7 @@
<link rel="stylesheet" href="../static/web/css/bootstrap.min.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.min.js"></script>
<script src="js/main.js"></script>
</head>
<body>


+ 55
- 59
src/admin/templets/sys_info.htm View File

@@ -39,51 +39,48 @@
<a href="javascript:;" onclick="ShowHide('addvar')" class="btn btn-success btn-sm">添加变量</a>
</td>
</tr>
<tr id="addvar" style="display:none">
<td colspan="2" class="p-0">
<form name="fadd" action="sys_info.php" method="post">
<input type="hidden" name="dopost" value="add">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
<table class="table-borderless w-100">
<tr>
<td width="120">变量说明:</td>
<td width="370"><input type="text" name="varmsg" id="varmsg" class="admin-input-lg"></td>
<td width="120">变量值:</td>
<td width="370"><input type="text" name="nvarvalue" id="nvarvalue" class="admin-input-lg"></td>
</tr>
<tr>
<td width="120">变量名称:</td>
<td colspan="3"><input type="text" name="nvarname" id="nvarname" class="admin-input-lg"></td>
</tr>
<tr>
<td width="120">变量类型:</td>
<td width="370">
<label><input type="radio" name="vartype" value="string" checked="checked"> 文本</label>
<label><input type="radio" name="vartype" value="number"> 数字</label>
<label><input type="radio" name="vartype" value="bool"> 布尔(Y/N)</label>
<label><input type="radio" name="vartype" value="bstring"> 多行文本</label>
<label><input type="radio" name="vartype" value="img"> 图片</label>
</td>
<td width="120">变量所属:</td>
<td width="170">
<?php
echo "<select name='vargroup' class='admin-input-sm'>";
foreach($ds as $dl){
$dl = trim($dl);
if (empty($dl)) continue;
$dls = explode(',',$dl);
echo "<option value='{$dls[0]}'>{$dls[1]}</option>";
}
echo "</select>";
?>
<button type="submit" class="btn btn-success btn-sm">保存变量</button>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<form name="fadd" action="sys_info.php" method="post" id="addvar" style="display:none">
<input type="hidden" name="dopost" value="add">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
<table align="center" class="table maintable mb-3">
<tr>
<td bgcolor="#f5f5f5" colspan="6">添加变量</td>
</tr>
<tr>
<td width="120">变量说明:</td>
<td width="370"><input type="text" name="varmsg" id="varmsg" class="admin-input-lg"></td>
<td width="120">变量值:</td>
<td width="370"><input type="text" name="nvarvalue" id="nvarvalue" class="admin-input-lg"></td>
<td width="120">变量名称:</td>
<td><input type="text" name="nvarname" id="nvarname" class="admin-input-lg"></td>
</tr>
<tr>
<td width="120">变量类型:</td>
<td width="370">
<label><input type="radio" name="vartype" value="string" checked="checked"> 文本</label>
<label><input type="radio" name="vartype" value="number"> 数字</label>
<label><input type="radio" name="vartype" value="bool"> 布尔(Y/N)</label>
<label><input type="radio" name="vartype" value="bstring"> 多行文本</label>
<label><input type="radio" name="vartype" value="img"> 图片</label>
</td>
<td width="120">变量所属:</td>
<td colspan="4">
<?php
echo "<select name='vargroup' class='admin-input-sm'>";
foreach($ds as $dl){
$dl = trim($dl);
if (empty($dl)) continue;
$dls = explode(',',$dl);
echo "<option value='{$dls[0]}'>{$dls[1]}</option>";
}
echo "</select>";
?>
<button type="submit" class="btn btn-success btn-sm">保存变量</button>
</td>
</tr>
</table>
</form>
<form action="sys_info.php" method="post" name="form1">
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
<input type="hidden" name="dopost" value="save">
@@ -132,7 +129,7 @@
echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value='{$row['value']}' class='w-75'>";
} else if ($row['type']=='img') {
echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value='{$row['value']}' class='w-50'> <input type='button' name='set9' class='btn btn-success btn-sm' onclick="."SelectImageN('form1.edit___{$row['varname']}','','idd_{$row['varname']}');"." value='选择'>";
if ($row['value']){
if ($row['value']) {
echo " <img src=".$row['value']." id='idd_{$row['varname']}' class='thumbnail-md'>";
} else {
echo " <img src='../static/web/img/thumbnail.jpg' id='idd_{$row['varname']}' class='thumbnail-md'>";
@@ -164,8 +161,7 @@
<script>
var searchconfig = false;
function Nav() {
if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE';
else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF';
if (window.navigator.userAgent.indexOf("Firefox") >= 1) return "FF";
else return "OT";
}
function $Obj(objname) {
@@ -174,36 +170,36 @@
function ShowConfig(em, allgr) {
if (searchconfig) location.reload();
for (var i = 1; i <= allgr; i++) {
if ($Obj('td' + i)) {
if (i == em) $Obj('td' + i).style.display = (Nav() == 'IE' ? 'block' : 'table');
else $Obj('td' + i).style.display = 'none';
if ($Obj("td" + i)) {
if (i == em) $Obj("td" + i).style.display = "table";
else $Obj("td" + i).style.display = "none";
}
}
$Obj('addvar').style.display = 'none';
$Obj("addvar").style.display = "none";
}
function ShowHide(objname) {
var obj = $Obj(objname);
if (obj.style.display != "none") obj.style.display = "none";
else obj.style.display = (Nav() == 'IE' ? 'block' : 'table-row');
else obj.style.display = "block";
}
function backSearch() {
location.reload();
}
function getSearch() {
var searchKeywords = $Obj('keywds').value;
var searchKeywords = $Obj("keywds").value;
searchKeywords = searchKeywords.replace(/^cfg_/, "");
fetch('sys_info.php?dopost=search&keywords=' + searchKeywords).then(resp => {
if (resp.ok) {
$("#btnClear").removeClass('d-none').show();
$("#btnClear").removeClass("d-none").show();
return resp.text()
}
throw new Error('系统错误,无法获取数据');
throw new Error("系统错误,无法获取数据");
}).then((d) => {
$Obj('_search').innerHTML = d;
$Obj("_search").innerHTML = d;
}).catch((error) => {
$Obj('_search').innerHTML = errMsg;
$Obj("_search").innerHTML = errMsg;
});
$Obj('_mainsearch').innerHTML = '';
$Obj("_mainsearch").innerHTML = "";
searchconfig = true;
}
function resetCookieEncode() {
@@ -212,7 +208,7 @@
});
}
$(document).ready(function () {
$("#btnClear").click(()=>{
$("#btnClear").click(() => {
location.reload();
})
});


+ 64
- 52
src/static/web/css/admin.css View File

@@ -33,7 +33,10 @@ a:hover {
img {
margin-right:10px;
max-width:100%;
border-radius:.5rem
border-radius:0.5rem
}
p {
margin-bottom:10px
}
ul,ol,li {
margin:0;
@@ -48,32 +51,36 @@ table {
border-collapse:separate
}
table tr:first-child td:first-child {
border-top-left-radius:.5rem;
border-top-left-radius:0.5rem;
border-top:0
}
table tr:first-child td:last-child {
border-top-right-radius:.5rem;
border-top-right-radius:0.5rem;
border-top:0
}
table tr:last-child td:first-child {
border-bottom-left-radius:.5rem;
border-bottom-left-radius:0.5rem;
border-bottom:0
}
table tr:last-child td:last-child {
border-bottom-right-radius:.5rem;
border-bottom-right-radius:0.5rem;
border-bottom:0
}
td {
word-break:break-all;
word-wrap:break-word
}
form,label {
margin-bottom:0
}
input {
padding:.375rem .75rem;
padding:0.375rem 0.75rem;
height:30px;
color:#545b62;
background:#fff;
border:1px solid #dee2e6;
vertical-align:middle;
transition:all .5s
transition:all 0.5s
}
input[type=file] {
padding:0;
@@ -82,29 +89,30 @@ input[type=file] {
vertical-align:middle
}
input[type=button],input[type=submit],input[type=reset] {
padding:.375rem .55rem;
padding:0.375rem 0.55rem;
height:30px;
line-height:1.5;
font-size:12px;
color:#fff;
background:#1eb867;
border:0;
transition:all .5s
transition:all 0.5s
}
input[type=radio],input[type=checkbox],input[type=radio]:focus,input[type=checkbox]:focus {
height:auto;
width:14px;
height:14px;
outline:none;
box-shadow:none;
vertical-align:text-top
}
select {
padding:.375rem .75rem;
padding:0.375rem 0.75rem;
height:30px;
color:#545b62;
background:#fff;
border:1px solid #dee2e6;
vertical-align:middle;
transition:all .5s
transition:all 0.5s
}
select[multiple=yes] {
height:180px
@@ -116,12 +124,12 @@ option {
align-items:center
}
textarea {
padding:.375rem .75rem;
padding:0.375rem 0.75rem;
color:#545b62;
background:#fff;
border:1px solid #dee2e6;
vertical-align:middle;
transition:all .5s
transition:all 0.5s
}
input:focus,select:focus,textarea:focus {
color:#495057;
@@ -141,11 +149,11 @@ body.hidemenu .body-left {
}
body.showmenu .body-right {
left:220px;
transition:all .5s
transition:all 0.5s
}
body.hidemenu .body-right {
left:0;
transition:all .5s
transition:all 0.5s
}
.body-left {
position:absolute;
@@ -182,7 +190,7 @@ body.hidemenu .body-right {
.menu-body {
width:100%;
background:#fff;
box-shadow:0 .125rem .25rem rgba(0,0,0,.075)
box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075)
}
.item-menu .link {
position:relative;
@@ -191,7 +199,7 @@ body.hidemenu .body-right {
height:42px;
line-height:42px;
cursor:pointer;
transition:all .5s
transition:all 0.5s
}
.item-menu li:last-child .link {
border-bottom:0
@@ -258,7 +266,6 @@ body.hidemenu .body-right {
line-height:60px
}
.top-item ul li a,.top-admin ul li a {
font-size:14px;
color:#fff
}
.top-item ul li a:hover,.top-admin ul li a:hover {
@@ -305,7 +312,7 @@ body.hidemenu .body-right {
.submenu li {
height:40px;
line-height:40px;
transition:all .5s
transition:all 0.5s
}
.submenu li:hover {
background:#009688
@@ -323,8 +330,14 @@ body.hidemenu .body-right {
float:right!important;
padding:0 20px 0 10px!important
}
.card-header {
padding:0.5rem 1rem
}
.card-body {
padding:.5rem
padding:0.5rem
}
.card-body canvas {
height:360px!important
}
.web-info {
padding:10px;
@@ -368,27 +381,27 @@ body.hidemenu .body-right {
right:20px
}
.coolbg {
padding:.375rem .75rem;
padding:0.375rem 0.75rem;
background:#f5f5f5;
border-bottom:1px solid #dee2e6;
border:0;
cursor:pointer
}
.coolbg2 {
padding:.5rem;
padding:0.5rem;
background:#fff;
border-bottom:1px solid #dee2e6;
text-align:right
}
.colordlg {
padding:.5rem;
padding:0.5rem;
width:120px;
background:#fff;
border:1px solid #dee2e6;
z-index:10005
}
.wsselect {
padding:.5rem;
padding:0.5rem;
background:#fff;
overflow:auto
}
@@ -398,7 +411,7 @@ body.hidemenu .body-right {
z-index:8888
}
.pubdlg .title {
padding:0 .5rem;
padding:0 0.5rem;
height:30px;
line-height:30px;
color:#545b62;
@@ -424,7 +437,7 @@ body.hidemenu .body-right {
z-index:10005
}
.quickselfoot {
padding:.5rem;
padding:0.5rem;
background:#f5f5f5;
border-top:1px solid #dee2e6
}
@@ -467,13 +480,16 @@ body.hidemenu .body-right {
.option3 {
background:#fff
}
.modal-title {
font-size:16px
}
.tips-box {
margin:70px auto 0;
width:500px;
height:auto;
background:#fff;
border-radius:.5rem;
box-shadow:0 .125rem .25rem rgba(0,0,0,.075)
border-radius:0.5rem;
box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075)
}
.tips-head {
margin:0 20px;
@@ -494,9 +510,6 @@ body.hidemenu .body-right {
word-break:break-all;
word-wrap:break-word
}
.modal-title {
font-size:16px
}
.maintable {
width:98%!important;
border:1px solid #dee2e6!important
@@ -506,7 +519,7 @@ body.hidemenu .body-right {
color:#545b62
}
.table td,.table th {
padding:.5rem;
padding:0.5rem;
vertical-align:middle
}
.form-control {
@@ -521,10 +534,10 @@ body.hidemenu .body-right {
line-height:30px
}
.list-group-item {
padding:.5rem 0
padding:0.5rem 0
}
.btn-sm {
padding:.375rem .55rem;
padding:0.375rem 0.55rem;
height:30px;
line-height:1.5;
font-size:12px
@@ -555,7 +568,7 @@ body.hidemenu .body-right {
text-align:center
}
.admin-td {
padding:.5rem;
padding:0.5rem;
border-bottom:1px solid #dee2e6
}
.admin-textarea-xl {
@@ -622,24 +635,24 @@ span.page-link {
background:#1eb867
}
table,input,select,textarea,.search,.menu-body,.coolbg,.mysource,.mywriter,.pubdlg,.colordlg,.quickselitem .topcat,.web-info,.upload-bg,.cke_chrome,.cke_inner,.pagination,.card,.form-control,.btn-sm,.alert,.rounded,#edsta {
border-radius:.5rem!important
border-radius:0.5rem!important
}
.btn-xs {
border-radius:.35rem!important
border-radius:0.35rem!important
}
.coolbg2,.pubdlg .title,.cke_top {
border-radius:.5rem .5rem 0 0!important
border-radius:0.5rem 0.5rem 0 0!important
}
.submenu,.wsselect,.cke_bottom {
border-radius:0 0 .5rem .5rem!important
border-radius:0 0 0.5rem 0.5rem!important
}
.page-item:first-child .page-link {
border-top-left-radius:.5rem!important;
border-bottom-left-radius:.5rem!important
border-top-left-radius:0.5rem!important;
border-bottom-left-radius:0.5rem!important
}
.page-item:last-child .page-link {
border-top-right-radius:.5rem!important;
border-bottom-right-radius:.5rem!important
border-top-right-radius:0.5rem!important;
border-bottom-right-radius:0.5rem!important
}
#selColor {
padding:0;
@@ -647,7 +660,7 @@ table,input,select,textarea,.search,.menu-body,.coolbg,.mysource,.mywriter,.pubd
}
#edsta {
display:none;
padding:.5rem;
padding:0.5rem;
position:absolute;
top:100px;
left:200px;
@@ -658,19 +671,14 @@ table,input,select,textarea,.search,.menu-body,.coolbg,.mysource,.mywriter,.pubd
}
#browsehappy {
padding:1rem 30px;
font-size:14px;
color:#856404;
background:#fff3cd
}
.browsehappy-close {
float:right;
font-size:14px;
cursor:pointer
}
@media (max-width:480px) {
.web-info {
word-break:break-all
}
@media (max-width:768px) {
.tips {
padding:0 15px
}
@@ -678,7 +686,11 @@ table,input,select,textarea,.search,.menu-body,.coolbg,.mysource,.mywriter,.pubd
width:100%
}
}
@media (min-width:480px) {
@media (min-width:1200px) {
.web-info {
text-overflow:ellipsis;
white-space:nowrap
}
.modal-dialog {
max-width:500px
}

+ 3
- 11
src/user/index.php View File

@@ -46,18 +46,10 @@ if ($uid == '') {
$_vars = array();
$uid = HtmlReplace($uid, -1);
$userid = preg_replace("#[\r\n\t \*%]#", '', $uid);
$query = "SELECT MB.mid,MB.mtype,MB.userid,MB.uname,MB.sex,MB.rank,MB.email,MB.scores,
MB.spacesta,MB.face,MB.logintime,
MS.*,MT.*,MB.matt,MR.membername
From `#@__member` MB
LEFT JOIN `#@__member_space` MS on MS.mid=MB.mid
LEFT JOIN `#@__member_tj` MT on MT.mid=MB.mid
LEFT JOIN `#@__arcrank` MR on MR.rank=MB.rank
where MB.userid like '$uid' ";
$query = "SELECT MB.mid,MB.mtype,MB.userid,MB.uname,MB.sex,MB.rank,MB.email,MB.scores,MB.spacesta,MB.face,MB.logintime,MS.*,MT.*,MB.matt,MR.membername FROM `#@__member` MB LEFT JOIN `#@__member_space` MS on MS.mid=MB.mid LEFT JOIN `#@__member_tj` MT on MT.mid=MB.mid LEFT JOIN `#@__arcrank` MR on MR.rank=MB.rank WHERE MB.userid like '$uid' ";
$_vars = $dsql->GetOne($query);
if(!is_array($_vars))
{
ShowMsg("你访问的用户可能已经被删除!","javascript:;");
if (!is_array($_vars)) {
ShowMsg("你访问的用户可能已经被删除","javascript:;");
exit();
}
$_vars['face'] = empty($_vars['face'])? $GLOBALS['cfg_mainsite'].'/static/web/img/admin.png' : $_vars['face'];


Loading…
Cancel
Save