Browse Source

配置参数支持图片,后台名称支持图标

tags/6.2.0
xushubieli 1 year ago
parent
commit
c5693956c9
2 changed files with 18 additions and 10 deletions
  1. +1
    -1
      src/admin/css/menu.css
  2. +17
    -9
      src/admin/templets/sys_info.htm

+ 1
- 1
src/admin/css/menu.css View File

@@ -1 +1 @@
*{margin:0;padding:0;letter-spacing:.4px;box-sizing:border-box}body{line-height:1.5;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;overflow:hidden}body.hidemenu{background:none}body.showmenu .body-left{display:block}body.hidemenu .body-left{display:none}body.showmenu .body-right{left:250px;transition:all .2s}body.hidemenu .body-right{left:0;transition:all .2s}a,a:hover{text-decoration:none}ul,li{list-style:none}input[type=text]{padding:.2rem;width:140px;height:26px;line-height:26px;font-size:12px;background:#fff;border:0;border-radius:.2rem;vertical-align:middle}input[type=text]:focus{box-shadow:none;outline:none}.body-left{position:absolute;top:60px;width:250px;left:0;bottom:0;z-index:7}.body-right{position:absolute;right:0;top:60px;bottom:0;z-index:7}.main{height:100%}.main iframe{width:100%;height:100%;z-index:20}.menu{height:100%}.menu iframe{width:100%;height:100%;z-index:20}.head{position:relative;width:100%;height:60px;overflow:hidden;z-index:8}.top{width:100%;height:60px;background:linear-gradient(45deg,#008e38,#57960f 50%);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075)}.top .top-logo{float:left;width:220px;margin-left:30px}.top .top-dedebiz a{float:left;height:60px;line-height:60px;font-size:18px;color:#fff;font-weight:600}.top .top-version a{float:left;height:60px;line-height:60px;font-size:18px;font-weight:600;color:#fff}.top .top-version{float:left;margin-top:20px;margin-left:10px;color:#fff}.top .btn-primary{float:left;margin-top:18px;margin-left:10px;padding:2px;line-height:12px;font-size:12px;color:#fff}.top .btn-warning{float:left;margin-top:18px;margin-left:10px;padding:2px;line-height:12px;font-size:12px;color:#fff}.top .top-item ul li{float:left;padding-left:30px;height:60px;line-height:60px}.top .top-item ul li a{color:#fff}.top .top-item ul li a:hover{color:#dee2e6}.search{margin-left:-20px;height:20px;line-height:20px;font-size:12px;color:#424b51;background:0;border-radius:.2rem;border:0;cursor:pointer}.top .top-admin{float:right;height:60px;line-height:60px;margin-right:30px}.top .top-admin img{margin-right:10px;width:30px;height:30px;border-radius:50%;vertical-align:middle}.top .top-admin ul li{float:left;padding-left:30px;height:60px;line-height:60px}.top .top-admin ul li a{color:#fff}.top .top-admin ul li a:hover{color:#dee2e6}.menu-box{margin:0;padding:0 6px;background:#f8f8f8;overflow:scroll;overflow-x:hidden}.menu-left{padding-top:1rem}.menu-right{width:100%;background:#fff;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075);border-radius:0 0 .2rem .2rem}a.menu-item div{margin-bottom:6px;padding:6px 0;width:50px;color:#424b51;background:#fff;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075);border-radius:.2rem 0 0 .2rem;cursor:pointer;text-align:center;transition:all .2s}a.menu-item:hover div{color:#fff;background:#424b51}a.menu-active div{margin-bottom:6px;padding:6px 0;width:50px;color:#fff;background:#424b51;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075);border-radius:.2rem 0 0 .2rem;text-align:center}dl.bitem{margin:1rem 0 10px 0;padding:0 10px}dl.bitem dt{margin-bottom:10px;padding-left:10px;height:28px;line-height:28px;background:#f8f8f8;border-radius:.2rem;cursor:pointer}dl.bitem dt b{color:#424b51}dl.bitem dt b i{margin-right:10px;width:10px}.sitemu li{padding:0 0 0 30px;display:block;height:26px;line-height:26px}.fllct{float:left}.flrct{float:right}.fa-minus-circle{color:#dc3545}.fa-plus-circle{color:#28a745}
*{margin:0;padding:0;letter-spacing:.4px;box-sizing:border-box}body{line-height:1.5;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;overflow:hidden}body.hidemenu{background:none}body.showmenu .body-left{display:block}body.hidemenu .body-left{display:none}body.showmenu .body-right{left:260px;transition:all .2s}body.hidemenu .body-right{left:0;transition:all .2s}a,a:hover{text-decoration:none}ul,li{list-style:none}input[type=text]{padding:.2rem;width:140px;height:26px;line-height:26px;font-size:12px;background:#fff;border:0;border-radius:.2rem;vertical-align:middle}input[type=text]:focus{box-shadow:none;outline:none}.body-left{position:absolute;top:60px;width:260px;left:0;bottom:0;z-index:7}.body-right{position:absolute;right:0;top:60px;bottom:0;z-index:7}.main{height:100%}.main iframe{width:100%;height:100%;z-index:20}.menu{height:100%}.menu iframe{width:100%;height:100%;z-index:20}.head{position:relative;width:100%;height:60px;overflow:hidden;z-index:8}.top{width:100%;height:60px;background:linear-gradient(45deg,#008e38,#57960f 50%);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075)}.top .top-logo{float:left;width:230px;margin-left:30px}.top .top-dedebiz a{float:left;height:60px;line-height:60px;font-size:18px;font-weight:600;color:#fff}.top .top-dedebiz a img{width:100px}.top .top-version a{float:left;height:60px;line-height:60px;font-size:18px;font-weight:600;color:#fff}.top .top-version{float:left;margin-top:20px;margin-left:10px;color:#fff}.top .btn-primary{float:left;margin-top:18px;margin-left:10px;padding:2px;line-height:12px;font-size:12px;color:#fff}.top .btn-warning{float:left;margin-top:18px;margin-left:10px;padding:2px;line-height:12px;font-size:12px;color:#fff}.top .top-item ul li{float:left;padding-left:30px;height:60px;line-height:60px}.top .top-item ul li a{color:#fff}.top .top-item ul li a:hover{color:#dee2e6}.search{margin-left:-20px;height:20px;line-height:20px;font-size:12px;color:#424b51;background:0;border-radius:.2rem;border:0;cursor:pointer}.top .top-admin{float:right;height:60px;line-height:60px;margin-right:30px}.top .top-admin img{margin-right:10px;width:30px;height:30px;border-radius:50%}.top .top-admin ul li{float:left;padding-left:30px;height:60px;line-height:60px}.top .top-admin ul li a{color:#fff}.top .top-admin ul li a:hover{color:#dee2e6}.menu-box{margin:0;padding:0 6px;background:#f8f8f8;overflow:scroll;overflow-x:hidden}.menu-left{padding-top:1rem}.menu-right{width:100%;background:#fff;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075);border-radius:0 0 .2rem .2rem}a.menu-item div{margin-bottom:6px;padding:6px 0;width:56px;color:#424b51;background:#fff;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075);border-radius:.2rem 0 0 .2rem;cursor:pointer;text-align:center;transition:all .2s}a.menu-item:hover div{color:#fff;background:#424b51}a.menu-active div{margin-bottom:6px;padding:6px 0;width:56px;color:#fff;background:#424b51;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075);border-radius:.2rem 0 0 .2rem;text-align:center}dl.bitem{margin:1rem 0 10px 0;padding:0 10px}dl.bitem dt{margin-bottom:10px;padding-left:10px;height:28px;line-height:28px;background:#f8f8f8;border-radius:.2rem;cursor:pointer}dl.bitem dt b{color:#424b51}dl.bitem dt b i{margin-right:10px;width:10px}.sitemu li{padding:0 0 0 30px;display:block;height:26px;line-height:26px}.fllct{float:left}.flrct{float:right}.fa-minus-circle{color:#dc3545}.fa-plus-circle{color:#28a745}

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

@@ -9,6 +9,7 @@
<link rel="stylesheet" href="../static/web/css/admin.css">
<script src="../static/web/js/webajax.js"></script>
<script src="../static/web/js/jquery.min.js"></script>
<script src="js/main.js"></script>
<script>
var searchconfig = false;
function Nav() {
@@ -105,6 +106,7 @@
<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>
@@ -155,8 +157,7 @@
$dls = explode(',',$dl);
$n++;
?>
<table width="100%" cellspacing="1" cellpadding="1" id="td<?php echo $n?>" class="table"
style="<?php if($n!=$gp) echo 'display:none'; ?>">
<table width="100%" cellspacing="1" cellpadding="1" id="td<?php echo $n?>" class="table" style="<?php if($n!=$gp) echo 'display:none'; ?>">
<tr bgcolor="#F8FCF1" align="center">
<td width="360" style="border-top:0">变量说明</td>
<td style="border-top:0">变量值</td>
@@ -179,22 +180,29 @@
<td align="left">
<?php
if($row['type']=='bool') {
$c1='';
$c1 = '';
$c2 = '';
$row['value']=='Y' ? $c1=" checked" : $c2=" checked";
echo "<label><input type='radio' name='edit___{$row['varname']}' value='Y'$c1> 是 </label> ";
echo "<label><input type='radio' name='edit___{$row['varname']}' value='N'$c2> 否 </label> ";
$row['value']=='Y' ? $c1="checked" : $c2="checked";
echo "<label><input type='radio' name='edit___{$row['varname']}' value='Y' $c1> 是 </label>";
echo "<label><input type='radio' name='edit___{$row['varname']}' value='N' $c2> 否 </label>";
} else if($row['type']=='bstring') {
$row['value'] = stripslashes($row['value']);
echo "<textarea name='edit___{$row['varname']}' row='4' id='edit___{$row['varname']}' class='textarea_info' style='width:98%;height:50px'>".dede_htmlspecialchars($row['value'])."</textarea>";
echo "<textarea name='edit___{$row['varname']}' id='edit___{$row['varname']}' style='width:98%;height:50px'>".dede_htmlspecialchars($row['value'])."</textarea>";
} else if($row['type']=='number') {
echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value='{$row['value']}' style='width:30%'>";
} else if($row['type']=='img') {
echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value='{$row['value']}' style='width:30%'> <input type='button' name='set9' value='选择' onClick="."SelectImageN('form1.edit___{$row['varname']}','','idd_{$row['varname']}');"." class='btn btn-success btn-sm'>";
if($row['value']){
echo " <img src=".$row['value']." id='idd_{$row['varname']}' style='max-width:100px;vertical-align:middle'>";
} else {
echo " <img src='../static/web/img/defaultpic.jpg' id='idd_{$row['varname']}' style='max-width:100px;vertical-align:middle'>";
}
} else {
$addstr='';
if ($row['varname']=='cfg_cookie_encode') {
$addstr=' <a href="javascript:resetCookieEncode();" class="btn btn-success btn-sm">重新生成</a>';
$addstr='<a href="javascript:resetCookieEncode();" class="btn btn-success btn-sm">重新生成</a>';
}
echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value=\"".dede_htmlspecialchars($row['value'])."\" style='width:80%'>{$addstr}";
echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value=\"".dede_htmlspecialchars($row['value'])."\" style='width:80%'> {$addstr}";
}
?>
</td>


Loading…
Cancel
Save