Browse Source

错误优化

tags/6.2.6
叙述、别离 1 year ago
parent
commit
ed41244b84
3 changed files with 23 additions and 26 deletions
  1. +9
    -11
      src/admin/templets/sys_info.htm
  2. +9
    -9
      src/static/web/css/admin.css
  3. +5
    -6
      src/user/api.php

+ 9
- 11
src/admin/templets/sys_info.htm View File

@@ -64,9 +64,7 @@
<body>
<table cellpadding="2" cellspacing="1" align="center" class="table maintable my-3">
<tr bgcolor="#f5f5f5">
<td width="180">
<input type="text" name="keywds" id="keywds" placeholder="请输入变量说明" class="admin-input-sm">
</td>
<td width="370"><input type="text" name="keywds" id="keywds" placeholder="请输入变量说明" class="admin-input-md"></td>
<td>
<a href="javascript:getSearch();" class="btn btn-success btn-sm">搜索</a><?php
$ds = file(DEDEADMIN.'/inc/configgroup.txt');
@@ -83,7 +81,7 @@
echo "<a href='javascript:ShowConfig($i,$totalGroup)' class='btn btn-success btn-sm'>{$dls[1]}</a>";
}
}
?><a href="javascript:;" onclick="ShowHide('addvar')" class="btn btn-success btn-sm">添加变量</a>
?><a href="javascript:;" onclick="ShowHide('addvar')" class="btn btn-success btn-sm">添加变量</a>
</td>
</tr>
<tr id="addvar" style="display:none">
@@ -94,23 +92,23 @@
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="90" class="border-top-0">变量说明</td>
<td width="270" class="border-top-0"><input type="text" name="varmsg" id="varmsg" class="admin-input-md"></td>
<td width="370" class="border-top-0"><input type="text" name="varmsg" id="varmsg" class="admin-input-md"></td>
<td width="90" class="border-top-0">变量值</td>
<td width="270" class="border-top-0"><input type="text" name="nvarvalue" id="nvarvalue" class="admin-input-md"></td>
<td width="370" class="border-top-0"><input type="text" name="nvarvalue" id="nvarvalue" class="admin-input-md"></td>
</tr>
<tr>
<td width="90">变量名称</td>
<td colspan="3"><input type="text" name="nvarname" id="nvarname" class="admin-input-md"></td>
</tr>
<tr>
<td width="90">变量类型</td>
<td colspan="3">
<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>
</tr>
<tr>
<td width="90">变量名称</td>
<td width="270"><input type="text" name="nvarname" id="nvarname" class="admin-input-md"></td>
<td width="90">所属组</td>
<td width="170">
<?php


+ 9
- 9
src/static/web/css/admin.css View File

@@ -125,8 +125,8 @@ body.hidemenu .body-right {
}
.body-right {
position:absolute;
right:0;
top:60px;
right:0;
bottom:0
}
.main,.menu {
@@ -141,7 +141,7 @@ body.hidemenu .body-right {
.head {
width:100%;
height:60px;
background:linear-gradient(45deg,#1eb867,#009688 90%);
background:linear-gradient(45deg,#1eb867,#009688 80%);
box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075)
}
.top-logo {
@@ -180,6 +180,7 @@ body.hidemenu .body-right {
margin-left:5px
}
.top-item ul li {
position:relative;
float:left;
padding-left:30px;
height:60px;
@@ -193,15 +194,16 @@ body.hidemenu .body-right {
color:#dee2e6
}
.search {
margin-left:-30px;
position:absolute;
top:20px;
right:5px;
height:20px;
line-height:20px;
font-size:12px;
color:#545b62;
background:0;
border-radius:.2rem;
border:0;
cursor:pointer
border:0
}
.search-input {
width:160px;
@@ -209,9 +211,7 @@ body.hidemenu .body-right {
line-height:26px;
font-size:12px;
background:#fff;
border:0;
border-radius:.2rem;
vertical-align:middle
border:0
}
.top-admin {
float:right;
@@ -263,7 +263,7 @@ body.hidemenu .body-right {
}
.menu li i {
position:absolute;
top:12px;
top:13px;
left:20px;
color:#545b62
}


+ 5
- 6
src/user/api.php View File

@@ -31,7 +31,7 @@ if ($action === 'is_need_check_code') {
));
exit;
}
$row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='".$cfg_ml->M_ID."'");
$row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='".$cfg_ml->M_ID."' ");
if (function_exists('password_hash') && !empty($row['pwd_new'])) {
if (!is_array($row) || !password_verify($oldpwd, $row['pwd_new'])) {
echo json_encode(array(
@@ -91,17 +91,16 @@ if ($action === 'is_need_check_code') {
} else {
$nowtme = time();
$rnd = $nowtme.'-'.mt_rand(1000,9999);
$target_file = $cfg_basedir.$cfg_user_dir."/{$cfg_ml->M_ID}/".$rnd.'.png';
$target_file = $cfg_basedir.$cfg_user_dir."/{$cfg_ml->M_ID}/".$rnd.".png";
$fsize = filesize($_FILES["file"]["tmp_name"]);
$target_url = $cfg_mediasurl.'/userup'."/{$cfg_ml->M_ID}/".$rnd.".png";
$row = $dsql->GetOne("SELECT aid,title,url FROM `#@__uploads` WHERE url LIKE '$target_url' AND mid='".$cfg_ml->M_ID."';");
$row = $dsql->GetOne("SELECT aid,title,url FROM `#@__uploads` WHERE url LIKE '$target_url' AND mid='".$cfg_ml->M_ID."'; ");
$uptime = time();
if (is_array($row)) {
$query = "UPDATE `#@__uploads` SET mediatype=1, width='{$imgSize[0]}',height='{$imgSize[1]}',filesize='{$fsize}',uptime='$uptime' WHERE aid='{$row['aid']}'; ";
$query = "UPDATE `#@__uploads` SET mediatype=1,width='{$imgSize[0]}',height='{$imgSize[1]}',filesize='{$fsize}',uptime='$uptime' WHERE aid='{$row['aid']}'; ";
$dsql->ExecuteNoneQuery($query);
} else {
$inquery = "INSERT INTO `#@__uploads`(url,mediatype,width,height,playtime,filesize,uptime,mid)
VALUES ('$target_url','1','".$imgSize[0]."','".$imgSize[1]."','0','".$fsize."','$uptime','".$cfg_ml->M_ID."'); ";
$inquery = "INSERT INTO `#@__uploads`(url,mediatype,width,height,playtime,filesize,uptime,mid) VALUES ('$target_url','1','".$imgSize[0]."','".$imgSize[1]."','0','".$fsize."','$uptime','".$cfg_ml->M_ID."'); ";
$dsql->ExecuteNoneQuery($inquery);
}
}


Loading…
Cancel
Save