@@ -1,86 +1,84 @@ | |||||
<?php | |||||
/** | |||||
* 管理菜单函数 | |||||
* | |||||
* @version $Id: inc_menu_func.php 1 10:32 2010年7月21日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__)."/../config.php"); | |||||
require_once(DEDEINC."/dedetag.class.php"); | |||||
$headTemplet = "<dl class='bitem' id='sunitems~cc~'><dt onClick='showHide(\"items~cc~\")'>~channelname~</dt> | |||||
<dd style='display:~display~' class='sitem' id='items~cc~'> | |||||
<ul class='sitemu'>\r\n"; | |||||
$footTemplet = "</ul>\r\n</dd>\r\n</dl>\r\n"; | |||||
$itemTemplet = "<li>~link~</li>\r\n"; | |||||
function GetMenus($userrank, $topos = 'main') | |||||
{ | |||||
global $openitem, $headTemplet, $footTemplet, $itemTemplet; | |||||
if ($topos == 'main') { | |||||
$openitem = (empty($openitem) ? 1 : $openitem); | |||||
$menus = $GLOBALS['menusMain']; | |||||
} else if ($topos == 'module') { | |||||
$openitem = 100; | |||||
$menus = $GLOBALS['menusMoudle']; | |||||
} | |||||
$dtp = new DedeTagParse(); | |||||
$dtp->SetNameSpace('m', '<', '>'); | |||||
$dtp->LoadSource($menus); | |||||
$dtp2 = new DedeTagParse(); | |||||
$dtp2->SetNameSpace('m', '<', '>'); | |||||
$m = 0; | |||||
foreach ($dtp->CTags as $i => $ctag) { | |||||
if ($ctag->GetName() == 'top' && ($ctag->GetAtt('rank') == '' || TestPurview($ctag->GetAtt('rank')))) { | |||||
if ($openitem != 999 && !preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) && $openitem != 100) continue; | |||||
$m++; | |||||
echo "<!-- Item ".($m + 1)." Strat -->\r\n"; | |||||
$htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet); | |||||
if (empty($openitem) || $openitem == 100) { | |||||
if ($ctag->GetAtt('notshowall') == '1') continue; | |||||
$htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp); | |||||
} else { | |||||
if ($openitem == $ctag->GetAtt('item') || preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) || $openitem == '-1') | |||||
$htmp = str_replace('~display~', 'block', $htmp); | |||||
else | |||||
$htmp = str_replace('~display~', 'none', $htmp); | |||||
} | |||||
$htmp = str_replace('~cc~', $m.'_'.$openitem, $htmp); | |||||
echo $htmp; | |||||
$dtp2->LoadSource($ctag->InnerText); | |||||
foreach ($dtp2->CTags as $j => $ctag2) { | |||||
$ischannel = trim($ctag2->GetAtt('ischannel')); | |||||
if ($ctag2->GetName() == 'item' && ($ctag2->GetAtt('rank') == '' || TestPurview($ctag2->GetAtt('rank')))) { | |||||
$link = "<a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a>"; | |||||
if ($ischannel == '1') { | |||||
if ($ctag2->GetAtt('addalt') != '') { | |||||
$addalt = $ctag2->GetAtt('addalt'); | |||||
} else { | |||||
$addalt = '录入新内容'; | |||||
} | |||||
if ($ctag2->GetAtt('addico') != '') { | |||||
$addico = $ctag2->GetAtt('addico'); | |||||
} else { | |||||
$addico = 'images/gtk-sadd.png'; | |||||
} | |||||
//an add icos , small items use att ischannel='1' addico='ico' addalt='msg' linkadd='' | |||||
$link = " <div class='items'> | |||||
<div class='fllct'>$link</div>\r\n | |||||
<div class='flrct'> | |||||
<a href='".$ctag2->GetAtt('linkadd')."' target='".$ctag2->GetAtt('target')."'><img src='$addico' alt='$addalt' title='$addalt'/></a> | |||||
</div> | |||||
</div>\r\n"; | |||||
} else { | |||||
$link .= "\r\n"; | |||||
} | |||||
$itemtmp = str_replace('~link~', $link, $itemTemplet); | |||||
echo $itemtmp; | |||||
} | |||||
} | |||||
echo $footTemplet; | |||||
echo "<!-- Item ".($m + 1)." End -->\r\n"; | |||||
} | |||||
} | |||||
<?php | |||||
/** | |||||
* 管理菜单函数 | |||||
* | |||||
* @version $Id: inc_menu_func.php 1 10:32 2010年7月21日Z tianya $ | |||||
* @package DedeBIZ.Administrator | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__)."/../config.php"); | |||||
require_once(DEDEINC."/dedetag.class.php"); | |||||
$headTemplet = "<dl class='bitem' id='sunitems~cc~'><dt onClick='showHide(\"items~cc~\")'><b>~channelname~</b></dt><dd style='display:~display~' class='sitem' id='items~cc~'><ul class='sitemu'>"; | |||||
$footTemplet = "</ul></dd></dl>"; | |||||
$itemTemplet = "<li>~link~</li>"; | |||||
function GetMenus($userrank, $topos = 'main') | |||||
{ | |||||
global $openitem, $headTemplet, $footTemplet, $itemTemplet; | |||||
if ($topos == 'main') { | |||||
$openitem = (empty($openitem) ? 1 : $openitem); | |||||
$menus = $GLOBALS['menusMain']; | |||||
} else if ($topos == 'module') { | |||||
$openitem = 100; | |||||
$menus = $GLOBALS['menusMoudle']; | |||||
} | |||||
$dtp = new DedeTagParse(); | |||||
$dtp->SetNameSpace('m', '<', '>'); | |||||
$dtp->LoadSource($menus); | |||||
$dtp2 = new DedeTagParse(); | |||||
$dtp2->SetNameSpace('m', '<', '>'); | |||||
$m = 0; | |||||
foreach ($dtp->CTags as $i => $ctag) { | |||||
if ($ctag->GetName() == 'top' && ($ctag->GetAtt('rank') == '' || TestPurview($ctag->GetAtt('rank')))) { | |||||
if ($openitem != 999 && !preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) && $openitem != 100) continue; | |||||
$m++; | |||||
echo "<!-- Item ".($m + 1)." Strat -->"; | |||||
$htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet); | |||||
if (empty($openitem) || $openitem == 100) { | |||||
if ($ctag->GetAtt('notshowall') == '1') continue; | |||||
$htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp); | |||||
} else { | |||||
if ($openitem == $ctag->GetAtt('item') || preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) || $openitem == '-1') | |||||
$htmp = str_replace('~display~', 'block', $htmp); | |||||
else | |||||
$htmp = str_replace('~display~', 'none', $htmp); | |||||
} | |||||
$htmp = str_replace('~cc~', $m.'_'.$openitem, $htmp); | |||||
echo $htmp; | |||||
$dtp2->LoadSource($ctag->InnerText); | |||||
foreach ($dtp2->CTags as $j => $ctag2) { | |||||
$ischannel = trim($ctag2->GetAtt('ischannel')); | |||||
if ($ctag2->GetName() == 'item' && ($ctag2->GetAtt('rank') == '' || TestPurview($ctag2->GetAtt('rank')))) { | |||||
$link = "<a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a>"; | |||||
if ($ischannel == '1') { | |||||
if ($ctag2->GetAtt('addalt') != '') { | |||||
$addalt = $ctag2->GetAtt('addalt'); | |||||
} else { | |||||
$addalt = '录入新内容'; | |||||
} | |||||
if ($ctag2->GetAtt('addico') != '') { | |||||
$addico = $ctag2->GetAtt('addico'); | |||||
} else { | |||||
$addico = 'images/gtk-sadd.png'; | |||||
} | |||||
//an add icos , small items use att ischannel='1' addico='ico' addalt='msg' linkadd='' | |||||
$link = " <div class='items'> | |||||
<div class='fllct'>$link</div> | |||||
<div class='flrct'> | |||||
<a href='".$ctag2->GetAtt('linkadd')."' target='".$ctag2->GetAtt('target')."'><img src='$addico' alt='$addalt' title='$addalt'/></a> | |||||
</div> | |||||
</div>"; | |||||
} else { | |||||
$link .= ""; | |||||
} | |||||
$itemtmp = str_replace('~link~', $link, $itemTemplet); | |||||
echo $itemtmp; | |||||
} | |||||
} | |||||
echo $footTemplet; | |||||
echo "<!-- Item ".($m + 1)." End -->"; | |||||
} | |||||
} | |||||
}//End Function | }//End Function |
@@ -17,8 +17,8 @@ | |||||
<script src="js/main.js"></script> | <script src="js/main.js"></script> | ||||
<style> | <style> | ||||
table.stattable td{padding:.6rem;border-bottom:1px solid #dee2e6;text-align:right;vertical-align:middle} | table.stattable td{padding:.6rem;border-bottom:1px solid #dee2e6;text-align:right;vertical-align:middle} | ||||
.table{margin-bottom:0} | |||||
.stattable{width:100%} | .stattable{width:100%} | ||||
.table{margin-bottom:0} | |||||
.web-info{padding:10px;background:#f6f6f6;border-radius:.2rem;text-align:center} | .web-info{padding:10px;background:#f6f6f6;border-radius:.2rem;text-align:center} | ||||
.web-info p{margin-bottom:10px} | .web-info p{margin-bottom:10px} | ||||
</style> | </style> | ||||
@@ -26,10 +26,10 @@ table.stattable td{padding:.6rem;border-bottom:1px solid #dee2e6;text-align:righ | |||||
<body> | <body> | ||||
<div class="container-fluid"> | <div class="container-fluid"> | ||||
<div class="row"> | <div class="row"> | ||||
<div id="__testEvn" class="col-md-12"></div> | |||||
<div id="tips" class="col-md-12"></div> | |||||
<div class="col-md-12 mt-3 mb-3"> | <div class="col-md-12 mt-3 mb-3"> | ||||
<div class="card"> | <div class="card"> | ||||
<div class="card-header"><a title="点击查看流量统计图" href="#statChart"><i class="fa fa-line-chart"></i></a> 流量统计表</div> | |||||
<div class="card-header"><a title="查看流量统计图" href="#statChart"><i class="fa fa-line-chart"></i></a> 流量统计表</div> | |||||
<div class="card-body"> | <div class="card-body"> | ||||
<table class="stattable"> | <table class="stattable"> | ||||
<tbody> | <tbody> | ||||
@@ -42,24 +42,24 @@ table.stattable td{padding:.6rem;border-bottom:1px solid #dee2e6;text-align:righ | |||||
</tr> | </tr> | ||||
<tr class="bg-white"> | <tr class="bg-white"> | ||||
<td class="today">今日</td> | <td class="today">今日</td> | ||||
<td class="today" id="today_pv"></td> | |||||
<td class="today" id="today_uv"></td> | |||||
<td class="today" id="today_ip"></td> | |||||
<td class="today" id="today_vv"></td> | |||||
<td class="today" id="today_pv">0</td> | |||||
<td class="today" id="today_uv">0</td> | |||||
<td class="today" id="today_ip">0</td> | |||||
<td class="today" id="today_vv">0</td> | |||||
</tr> | </tr> | ||||
<tr class="bg-white"> | <tr class="bg-white"> | ||||
<td>昨日</td> | <td>昨日</td> | ||||
<td id="yestoday_pv"></td> | |||||
<td id="yestoday_uv"></td> | |||||
<td id="yestoday_ip"></td> | |||||
<td id="yestoday_vv"></td> | |||||
<td id="yestoday_pv">0</td> | |||||
<td id="yestoday_uv">0</td> | |||||
<td id="yestoday_ip">0</td> | |||||
<td id="yestoday_vv">0</td> | |||||
</tr> | </tr> | ||||
<tr class="bg-white grey9 hide" style="display:table-row"> | <tr class="bg-white grey9 hide" style="display:table-row"> | ||||
<td>历史累计</td> | <td>历史累计</td> | ||||
<td id="total_pv"></td> | |||||
<td id="total_uv"></td> | |||||
<td id="total_ip"></td> | |||||
<td id="total_vv"></td> | |||||
<td id="total_pv">0</td> | |||||
<td id="total_uv">0</td> | |||||
<td id="total_ip">0</td> | |||||
<td id="total_vv">0</td> | |||||
</tr> | </tr> | ||||
</tbody> | </tbody> | ||||
</table> | </table> | ||||
@@ -99,6 +99,12 @@ table.stattable td{padding:.6rem;border-bottom:1px solid #dee2e6;text-align:righ | |||||
<span><?php echo @phpversion(); ?></span> | <span><?php echo @phpversion(); ?></span> | ||||
</div> | </div> | ||||
</td> | </td> | ||||
<td> | |||||
<div class="web-info"> | |||||
<p>数据库版本</p> | |||||
<span><?php echo $dsql->GetVersion(); ?></span> | |||||
</div> | |||||
</td> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
</div> | </div> | ||||
@@ -130,9 +136,7 @@ table.stattable td{padding:.6rem;border-bottom:1px solid #dee2e6;text-align:righ | |||||
<div id="loaddiv" style="display:none"> | <div id="loaddiv" style="display:none"> | ||||
<p align="center"><img src="images/loadinglit.gif">请稍后,正在下载更新文件列表</p> | <p align="center"><img src="images/loadinglit.gif">请稍后,正在下载更新文件列表</p> | ||||
</div> | </div> | ||||
<div id="editTab"> | |||||
<span id="editTabBody">请稍候,正在载入</span> | |||||
</div> | |||||
<div id="editTab"><span id="editTabBody">请稍候,正在载入</span></div> | |||||
<div id="addTab"> | <div id="addTab"> | ||||
<form name="addform" action="index_body.php"> | <form name="addform" action="index_body.php"> | ||||
<input type="hidden" name="dopost" value="addnew"> | <input type="hidden" name="dopost" value="addnew"> | ||||
@@ -168,7 +172,7 @@ table.stattable td{padding:.6rem;border-bottom:1px solid #dee2e6;text-align:righ | |||||
$(function(){ | $(function(){ | ||||
$.get("index_testenv.php", function (data){ | $.get("index_testenv.php", function (data){ | ||||
if (data !== ''){ | if (data !== ''){ | ||||
$("#__testEvn").html(data); | |||||
$("#tips").html(data); | |||||
} | } | ||||
}); | }); | ||||
$.get("index_body.php?dopost=get_articles", function (data){ | $.get("index_body.php?dopost=get_articles", function (data){ | ||||
@@ -1,80 +1,80 @@ | |||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||||
<head> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>DedeBIZ menu</title> | |||||
<link rel="stylesheet" href="css/base.css"> | |||||
<script src="../static/js/webajax.js"></script> | |||||
<script src="../static/js/jquery.js"></script> | |||||
<?php | |||||
echo "<script>var curopenItem = '$openitem';</script>"; | |||||
?> | |||||
<script src="js/leftmenu.js"></script> | |||||
<style> | |||||
body{margin:0;background:#f6f6f6;padding-left:6px;overflow:scroll;overflow-x:hidden} | |||||
img{margin-right:0;border-radius:0} | |||||
div{margin:0;padding:0} | |||||
dl.bitem{margin:0 0 2px 10px;width:140px;background:url(images/menunewbg.gif)repeat-x;clear:both} | |||||
dl.bitem2{margin:0 0 2px 10px;width:140px;background:url(images/menunewbg2.gif)repeat-x;clear:both} | |||||
dl.bitem dt,dl.bitem2 dt{padding-left:30px;height:26px;line-height:26px;cursor:pointer} | |||||
dl.bitem dd,dl.bitem2 dd{padding:10px;background:#fff} | |||||
dl.bitem dt b,dl.bitem2 dt b{color:#4f7632} | |||||
a.mm div{padding:7px 4px 4px 10px;height:40px;font-weight:600;color:#666;background:url(images/leftmbg1.gif)no-repeat;cursor:pointer} | |||||
a.mm:hover div{color:#4f7632;background:url(images/leftbg2.gif)no-repeat} | |||||
a.mmac div{padding:7px 4px 4px 10px;height:40px;font-weight:600;color:#4f7632;background:url(images/leftbg2.gif)no-repeat} | |||||
#mainct{padding-top:12px;background:url(images/idnbg1.gif)repeat-y} | |||||
.sitemu li{padding:0 0 0 20px;height:26px;line-height:26px;background:url(images/arr4.gif)no-repeat 6px 10px} | |||||
.fllct{float:left;width:80px} | |||||
.flrct{float:left;padding-top:4px} | |||||
</style> | |||||
<base target="main"> | |||||
</head> | |||||
<body target="main" onLoad="CheckOpenMenu();"> | |||||
<table width="180" align="left" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td valign="top" style="padding-top:10px" width="26"> | |||||
<a id="link1" class="mmac"><div onClick="ShowMainMenu(1)">运维</div></a> | |||||
<a id="link100" class="mm"><div onClick="ShowMainMenu(100)">插件</div></a> | |||||
<a id="link5" class="mm"><div onClick="ShowMainMenu(5)">更新</div></a> | |||||
<a id="link6" class="mm"><div onClick="ShowMainMenu(6)">会员</div></a> | |||||
<?php | |||||
if($cuserLogin->getUserType()>=10){ | |||||
?> | |||||
<a id="link7" class="mm"><div onClick="ShowMainMenu(7)">模板</div></a> | |||||
<a id="link10" class="mm"><div onClick="ShowMainMenu(10)">系统</div></a> | |||||
<?php | |||||
} | |||||
?> | |||||
</td> | |||||
<td width="160" id="mainct" valign="top"> | |||||
<div id="ct1"> | |||||
<?php | |||||
GetMenus($cuserLogin->getUserRank(),'main'); | |||||
?> | |||||
</div> | |||||
<div id="ct100"></div> | |||||
<div id="ct3"></div> | |||||
<div id="ct5"></div> | |||||
<div id="ct6"></div> | |||||
<div id="ct7"></div> | |||||
<div id="ct20"></div> | |||||
<div id="ct10"></div> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="26"></td> | |||||
<td width="160" valign="top"><img src="images/idnbgfoot.gif"></td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
if(!empty($openitem) && $openitem!=1) | |||||
{ | |||||
?> | |||||
<script> | |||||
ShowMainMenu(100); | |||||
</script> | |||||
<?php | |||||
} | |||||
?> | |||||
</body> | |||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||||
<head> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>DedeBIZ menu</title> | |||||
<link rel="stylesheet" href="css/base.css"> | |||||
<script src="../static/js/webajax.js"></script> | |||||
<script src="../static/js/jquery.js"></script> | |||||
<?php | |||||
echo "<script>var curopenItem = '$openitem';</script>"; | |||||
?> | |||||
<script src="js/leftmenu.js"></script> | |||||
<style> | |||||
body{margin:0;background:#f6f6f6;padding-left:6px;overflow:scroll;overflow-x:hidden} | |||||
img{margin-right:0;border-radius:0} | |||||
div{margin:0;padding:0} | |||||
dl.bitem{margin:0 0 2px 10px;width:140px;background:url(images/menunewbg.gif)repeat-x;clear:both} | |||||
dl.bitem2{margin:0 0 2px 10px;width:140px;background:url(images/menunewbg2.gif)repeat-x;clear:both} | |||||
dl.bitem dt,dl.bitem2 dt{padding-left:30px;height:26px;line-height:26px;cursor:pointer} | |||||
dl.bitem dd,dl.bitem2 dd{padding:10px;background:#fff} | |||||
dl.bitem dt b,dl.bitem2 dt b{color:#4f7632} | |||||
a.mm div{padding:7px 4px 4px 10px;height:40px;color:#666;background:url(images/leftmbg1.gif)no-repeat;cursor:pointer} | |||||
a.mm:hover div{color:#4f7632;background:url(images/leftbg2.gif)no-repeat} | |||||
a.mmac div{padding:7px 4px 4px 10px;height:40px;color:#4f7632;background:url(images/leftbg2.gif)no-repeat} | |||||
#mainct{padding-top:12px;background:url(images/idnbg1.gif)repeat-y} | |||||
.sitemu li{padding:0 0 0 20px;height:26px;line-height:26px;background:url(images/arr4.gif)no-repeat 6px 10px} | |||||
.fllct{float:left;width:80px} | |||||
.flrct{float:left;padding-top:4px} | |||||
</style> | |||||
<base target="main"> | |||||
</head> | |||||
<body target="main" onLoad="CheckOpenMenu();"> | |||||
<table width="180" align="left" cellspacing="0" cellpadding="0"> | |||||
<tr> | |||||
<td valign="top" style="padding-top:10px" width="26"> | |||||
<a id="link1" class="mmac"><div onClick="ShowMainMenu(1)"><b>运维<b></div></a> | |||||
<a id="link100" class="mm"><div onClick="ShowMainMenu(100)"><b>插件<b></div></a> | |||||
<a id="link5" class="mm"><div onClick="ShowMainMenu(5)"><b>更新<b></div></a> | |||||
<a id="link6" class="mm"><div onClick="ShowMainMenu(6)"><b>会员<b></div></a> | |||||
<?php | |||||
if($cuserLogin->getUserType()>=10){ | |||||
?> | |||||
<a id="link7" class="mm"><div onClick="ShowMainMenu(7)"><b>模板<b></div></a> | |||||
<a id="link10" class="mm"><div onClick="ShowMainMenu(10)"><b>系统<b></div></a> | |||||
<?php | |||||
} | |||||
?> | |||||
</td> | |||||
<td width="160" id="mainct" valign="top"> | |||||
<div id="ct1"> | |||||
<?php | |||||
GetMenus($cuserLogin->getUserRank(),'main'); | |||||
?> | |||||
</div> | |||||
<div id="ct100"></div> | |||||
<div id="ct3"></div> | |||||
<div id="ct5"></div> | |||||
<div id="ct6"></div> | |||||
<div id="ct7"></div> | |||||
<div id="ct20"></div> | |||||
<div id="ct10"></div> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="26"></td> | |||||
<td width="160" valign="top"><img src="images/idnbgfoot.gif"></td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
if(!empty($openitem) && $openitem!=1) | |||||
{ | |||||
?> | |||||
<script> | |||||
ShowMainMenu(100); | |||||
</script> | |||||
<?php | |||||
} | |||||
?> | |||||
</body> | |||||
</html> | </html> |
@@ -1,414 +1,414 @@ | |||||
{dede:config.pagesize value="30"/} | |||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||||
<head> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>联动枚举管理</title> | |||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css"> | |||||
<link rel="stylesheet" href="../static/font-awesome/css/font-awesome.min.css"> | |||||
<link rel="stylesheet" href="css/base.css"> | |||||
<style> | |||||
li{float:left;padding-right:10px;line-height:26px} | |||||
.abt{width:90%;border:1px #ffffff solid} | |||||
#edsta{position:absolute;top:70px;left:110px;width:280px;height:200px;background-color:#f6f6f6;border:1px solid #dedede;display:none;padding:6px} | |||||
#edsta div{margin:6px} | |||||
</style> | |||||
<SCRIPT LANGUAGE="JavaScript" src="../static/js/webajax.js"></SCRIPT> | |||||
<script language="javascript" src="../static/js/jquery.js"></script> | |||||
<script src="../static/js/bootstrap.bundle.js"></script> | |||||
<script language='javascript' src='js/main.js'></script> | |||||
<SCRIPT LANGUAGE="JavaScript"> | |||||
var loadhtml = "<center><img src='../static/loadinglit.gif' style='padding:30px' /></center>"; | |||||
function updateItem(aid) { | |||||
var upenumf = document.getElementById('upenumf'); | |||||
upenumf.ename.value = $DE('ename' + aid).value; | |||||
upenumf.disorder.value = $DE('disorder' + aid).value; | |||||
upenumf.aid.value = aid; | |||||
upenumf.submit(); | |||||
} | |||||
function GetSelType() { | |||||
var selvalue = $DE('egroup1').options[$DE('egroup1').selectedIndex].value; | |||||
return selvalue; | |||||
} | |||||
function AddType() { | |||||
$DE('edsta').style.display = 'block'; | |||||
fetch('stepselect_main.php?action=addnew').then(resp=>{ | |||||
if (resp.ok) { | |||||
return resp.text() | |||||
} | |||||
throw new Error('系统错误,无法获取数据'); | |||||
}).then((d)=>{ | |||||
$DE('edsta').innerHTML = d; | |||||
}).catch((error) => { | |||||
$DE('edsta').innerHTML = errMsg; | |||||
}); | |||||
} | |||||
function AddEnum() { | |||||
var id = GetSelType(); | |||||
if (id == 0) { | |||||
ShowMsg("必须选择一个类别"); | |||||
return false; | |||||
} | |||||
fetch('stepselect_main.php?action=addenum&id=' + id).then(resp=>{ | |||||
if (resp.ok) { | |||||
return resp.text() | |||||
} | |||||
throw new Error('系统错误,无法获取数据'); | |||||
}).then((d)=>{ | |||||
$DE('edsta').innerHTML = d; | |||||
}).catch((error) => { | |||||
$DE('edsta').innerHTML = errMsg; | |||||
}); | |||||
$DE('edsta').style.display = 'block'; | |||||
} | |||||
function EditType() { | |||||
var id = GetSelType(); | |||||
if (id == 0) { | |||||
ShowMsg("必须选择一个类别"); | |||||
return false; | |||||
} | |||||
$DE('edsta').style.display = 'block'; | |||||
fetch('stepselect_main.php?action=edit&id=' + id).then(resp=>{ | |||||
if (resp.ok) { | |||||
return resp.text() | |||||
} | |||||
throw new Error('系统错误,无法获取数据'); | |||||
}).then((d)=>{ | |||||
$DE('edsta').innerHTML = d; | |||||
}).catch((error) => { | |||||
$DE('edsta').innerHTML = errMsg; | |||||
}); | |||||
} | |||||
function ViewType() { | |||||
var id = GetSelType(); | |||||
if (id == 0) { | |||||
ShowMsg("必须选择一个类别"); | |||||
return false; | |||||
} | |||||
$DE('edsta').style.display = 'block'; | |||||
fetch('stepselect_main.php?action=view&id=' + id).then(resp=>{ | |||||
if (resp.ok) { | |||||
return resp.text() | |||||
} | |||||
throw new Error('系统错误,无法获取数据'); | |||||
}).then((d)=>{ | |||||
$DE('edsta').innerHTML = d; | |||||
}).catch((error) => { | |||||
$DE('edsta').innerHTML = errMsg; | |||||
}); | |||||
} | |||||
function DelType() { | |||||
if (window.confirm("您确实要删除这个分类吗") == false) return false; | |||||
var id = GetSelType(); | |||||
if (id == 0) { | |||||
ShowMsg("必须选择一个类别"); | |||||
return false; | |||||
} | |||||
location.href = 'stepselect_main.php?action=del&id=' + id; | |||||
} | |||||
function CloseTWin() { | |||||
$DE('edsta').innerHTML = loadhtml; | |||||
$DE('edsta').style.display = 'none'; | |||||
} | |||||
function ChangePage(sobj) { | |||||
var ntxt = sobj.options[sobj.selectedIndex].text; | |||||
if (sobj.options[sobj.selectedIndex].value == 0) { | |||||
location.href = 'stepselect_main.php'; | |||||
} | |||||
else { | |||||
var ns = ntxt.split('|'); | |||||
location.href = 'stepselect_main.php?egroup=' + ns[0]; | |||||
} | |||||
} | |||||
function TogSel() { | |||||
var ems = document.getElementsByName('ids[]'); | |||||
for (i = 0; i < ems.length; i++) { | |||||
if (ems[i].checked == false) ems[i].checked = true; | |||||
else ems[i].checked = false; | |||||
} | |||||
} | |||||
function DelSel() { | |||||
if (window.confirm("您确实要删除这些分类吗")) document.form1.submit(); | |||||
} | |||||
function ChangePage2(sobj) { | |||||
var nv = sobj.options[sobj.selectedIndex].value; | |||||
if (sobj.options[sobj.selectedIndex].value == 0) { | |||||
location.href = 'stepselect_main.php?egroup=<?php echo $egroup; ?>'; | |||||
} | |||||
else { | |||||
location.href = 'stepselect_main.php?egroup=<?php echo $egroup; ?>&topvalue=' + nv; | |||||
} | |||||
} | |||||
</SCRIPT> | |||||
</head> | |||||
<body background='images/allbg.gif' leftmargin='8' topmargin='8'> | |||||
<div id='edsta'> | |||||
<center><img src='../static/loadinglit.gif'></center> | |||||
</div> | |||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" style="margin-bottom:10px" class="table maintable mt-3"> | |||||
<tr> | |||||
<td height="26" background="images/wbg.gif" colspan="6" style="padding-left:10px">联动枚举组管理</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="100">请选择组别:</td> | |||||
<td width="260"> | |||||
<select name="egroup1" id="egroup1" style="width:90%;" onChange="ChangePage(this)"> | |||||
<option value='0'>所有组</option> | |||||
<?php | |||||
$selgroup = ''; | |||||
foreach($etypes as $arr) | |||||
{ | |||||
$stylecolor = ""; | |||||
if($arr['issystem']==1) $stylecolor = " style='color:#999999' "; | |||||
if($egroup==$arr['egroup']) { | |||||
$selgroup = $arr['itemname']; | |||||
echo "<option value='{$arr['id']}' $stylecolor selected='1'>{$arr['egroup']}|{$arr['itemname']}</option>"; | |||||
} else { | |||||
echo "<option value='{$arr['id']}' $stylecolor>{$arr['egroup']}|{$arr['itemname']}</option>"; | |||||
} | |||||
} | |||||
?> | |||||
</select> | |||||
</td> | |||||
<td> | |||||
<button type="button" name="gedit" id="gedit" class="btn btn-success btn-sm" onClick="EditType()">修改</button> | |||||
<button type="button" name="gdel" id="gdel" class="btn btn-success btn-sm" onClick="DelType()">删除</button> | |||||
<button type="button" name="gview" id="gview" class="btn btn-success btn-sm" onClick="ViewType()">预览</button> | |||||
</td> | |||||
<td> | |||||
<button type="button" name="addnew" id="addnew" class="btn btn-success btn-sm" onClick="AddType()">新增类别组</button> | |||||
<a href='stepselect_main.php?action=upallcache' class="btn btn-success btn-sm">更新所有枚举缓存</a> | |||||
</td> | |||||
<td colspan='2'><img src='images/help.gif'>灰色字的为系统内置枚举,您是不能对它进行删除修改操作的,但可以添加或修改它的元素</td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
if(!empty($egroup)) | |||||
{ | |||||
$arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='{$egroup}' "); | |||||
$dsql->Execute('out',"SELECT evalue,ename FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}' ORDER BY disorder ASC,evalue ASC"); | |||||
$options = ''; | |||||
while($row1 = $dsql->GetArray('out')) | |||||
{ | |||||
if(!preg_match("#\.#", $row1['evalue'])) | |||||
{ | |||||
$row1['ename'] = ($row1['evalue'] % 500 == 0)? $row1['ename'] : '└─'.$row1['ename']; | |||||
if($topvalue != $row1['evalue']) $options .= "<option value='{$row1['evalue']}'>{$row1['ename']}</option>"; | |||||
else $options .= "<option value='{$row1['evalue']}' selected='selected'>{$row1['ename']}</option>"; | |||||
} | |||||
} | |||||
//如果添加3级之类 | |||||
if($topvalue % 500 != 0) $arr['issign'] = 2; | |||||
?> | |||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" | |||||
style='margin-bottom:10px;' class="table maintable table-bordered"> | |||||
<tr> | |||||
<td height="26" background="images/tbg.gif" colspan="8"> | |||||
<div style="float:left"> | |||||
·<?php echo $selgroup; ?> | |||||
> | |||||
子分类管理 | |||||
</div> | |||||
<div style="float:right"> | |||||
<?php | |||||
if($egroup=='nativeplace') { | |||||
echo "<a href='stepselect_main.php?action=exarea' class='np coolbg'>把默认省市地区表导入</a> "; | |||||
} | |||||
?> | |||||
</div> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#ffffff" height='48'> | |||||
<td> | |||||
<form action='stepselect_main.php' method='post'> | |||||
<INPUT TYPE="hidden" NAME="action" value="addenum_save"> | |||||
<INPUT TYPE="hidden" NAME="issign" value="<?php echo $arr['issign']; ?>"> | |||||
<INPUT TYPE="hidden" NAME="egroup" value="<?php echo $arr['egroup']; ?>"> | |||||
<div style='float:left;'> | |||||
隶属分类: | |||||
<select name='topvalue' style='width:130px' onChange="ChangePage2(this)"> | |||||
<option value='0'><?php echo $selgroup; ?></option> | |||||
<?php echo $options; ?> | |||||
</select> | |||||
</div> | |||||
<div style='float:left;'> | |||||
分类名称:<INPUT TYPE="text" NAME="ename" class="iptxt" style='width:350px' /> | |||||
</div> | |||||
<div style='float:left;padding-left:6px'> | |||||
<button TYPE="submit" name='sb2' class="btn btn-success btn-sm">增加分类</button> | |||||
</div> | |||||
<div style='clear:both'> | |||||
<img src='images/help.gif'>如果没选择隶属分类则表示增加的是顶级分类,用半角逗号","分开可以一次增加多个分类 | |||||
</div> | |||||
</form> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" | |||||
class="table maintable table-bordered"> | |||||
<tr> | |||||
<td height="26" background="images/tbg.gif" colspan="8"> | |||||
<div style="float:left"> | |||||
<a href='stepselect_main.php'>枚举组列表</a> | |||||
> <a href='stepselect_main.php?egroup=<?php echo $egroup; ?>'><?php echo $selgroup; ?></a> | |||||
> 子分类列表 | |||||
</div> | |||||
<div style="float:right"></div> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#FBFCE2" height="26"> | |||||
<td width="6%">选择</td> | |||||
<td width="6%">编号</td> | |||||
<td width="20%">枚举名</td> | |||||
<td width="20%">类别组名</td> | |||||
<td width="10%">枚举类型</td> | |||||
<td width="10%">枚举值</td> | |||||
<td width="10%">组内排序</td> | |||||
<td width="18%">操作</td> | |||||
</tr> | |||||
<form action='stepselect_main.php' name='upenumf' method='post' id="upenumf"> | |||||
<input type='hidden' name='action' value='upenum' /> | |||||
<INPUT TYPE="hidden" NAME="aid" value=""> | |||||
<input type='hidden' name='ename' value='' /> | |||||
<input type='hidden' name='disorder' value='' /> | |||||
</form> | |||||
<form name='form1' action='stepselect_main.php' method='post'> | |||||
<input type='hidden' name='action' value='delenumAllSel' /> | |||||
{dede:datalist} | |||||
<tr align="center" bgcolor="#FFFFFF" height="26" onMouseMove="javascript:this.bgColor='#FCFDEE';" | |||||
onMouseOut="javascript:this.bgColor='#FFFFFF';"> | |||||
<td><input type='checkbox' name='ids[]' value='{dede:field.id /}' class='np' /></td> | |||||
<td>{dede:field.id /}</td> | |||||
<td> | |||||
<?php | |||||
if(!preg_match("#\.#", $fields['evalue'])) | |||||
{ | |||||
if($fields['evalue']>500 && $fields['evalue']%500 != 0) $fields['ename'] = " └─".$fields['ename']; | |||||
} else { | |||||
$fields['ename'] = " └───".$fields['ename']; | |||||
} | |||||
?> | |||||
<input type='text' id='ename{dede:field.id/}' value='{dede:field.ename /}' class='abt' /> | |||||
</td> | |||||
<td>{dede:field.egroup /}</td> | |||||
<td> | |||||
<?php | |||||
if(!preg_match("#\.#", $fields['evalue'])) | |||||
{ | |||||
if($fields['evalue']>500 && $fields['evalue']%500 != 0) echo '二级选择'; | |||||
else echo '一级选择'; | |||||
} else { | |||||
echo "三级选择"; | |||||
} | |||||
?></td> | |||||
<td>{dede:field.evalue /}</td> | |||||
<td><input type='text' id='disorder{dede:field.id/}' value='{dede:field.disorder /}' class='abt' /></td> | |||||
<td> | |||||
<?php | |||||
if(!empty($egroup)) | |||||
{ | |||||
?> | |||||
<a href='javascript:updateItem({dede:field.id/});' class="btn btn-success btn-sm"> <i class="fa fa-refresh" aria-hidden="true"></i> 更新</a> | |||||
<a href='stepselect_main.php?action=delenum&id={dede:field.id/}' class="btn btn-success btn-sm"> <i class="fa fa-trash" aria-hidden="true"></i> 删除</a> | |||||
<?php | |||||
} | |||||
else | |||||
{ | |||||
echo "<a href='stepselect_main.php?egroup={$fields['egroup']}'>".$egroups[$fields['egroup']]."</a>"; | |||||
} | |||||
?> | |||||
</td> | |||||
</tr> | |||||
{/dede:datalist} | |||||
</form> | |||||
<tr height="26"> | |||||
<td colspan="8" bgcolor="#ffffff"> | |||||
| |||||
<a href='javascript:TogSel();' class='btn btn-success btn-sm'>全选/反选</a> | |||||
| |||||
<a href='javascript:DelSel();' class='btn btn-success btn-sm'>删除所选</a> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#f6f6f6" height="26"> | |||||
<td colspan="8"> | |||||
{dede:pagelist listsize=6/} | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
} | |||||
else | |||||
{ | |||||
?> | |||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" | |||||
class="table maintable table-bordered"> | |||||
<tr> | |||||
<td height="26" background="images/tbg.gif" colspan="8"> | |||||
<div style="float:left"> | |||||
·<a href='stepselect_main.php'>枚举组列表</a> | |||||
</div> | |||||
<div style="float:right"></div> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#FBFCE2" height="26"> | |||||
<td width="6%">选择</td> | |||||
<td width="6%">编号</td> | |||||
<td width="28%">组类别名</td> | |||||
<td width="10%">级数</td> | |||||
<td width="10%">系统</td> | |||||
<td width="15%">缓存组名</td> | |||||
<td>操作</td> | |||||
</tr> | |||||
{dede:datalist} | |||||
<tr align="center" bgcolor="#FFFFFF" height="26" onMouseMove="javascript:this.bgColor='#FCFDEE';" | |||||
onMouseOut="javascript:this.bgColor='#FFFFFF';"> | |||||
<td><input type='checkbox' name='ids[]' value='{dede:field.id /}' class='np' /></td> | |||||
<td> {dede:field.id /} </td> | |||||
<td> <a href='stepselect_main.php?egroup={dede:field.egroup /}'>{dede:field.itemname /}</a> </td> | |||||
<td> | |||||
<?php | |||||
switch ($fields['issign']) { | |||||
case 0: | |||||
echo "一级选择"; | |||||
break; | |||||
case 1: | |||||
echo "二级选择"; | |||||
break; | |||||
case 2: | |||||
echo "三级选择"; | |||||
break; | |||||
} | |||||
?> | |||||
</td> | |||||
<td> {dede:field.issystem function="@me==1 ? '是' : '否'" /} </td> | |||||
<td>{dede:field.egroup /}</td> | |||||
<td> | |||||
<a href='stepselect_main.php?action=upallcache&egroup={dede:field.egroup /}' class="btn btn-success btn-sm"> <i class="fa fa-refresh" aria-hidden="true"></i> 更新缓存</a> | |||||
<a href='stepselect_main.php?egroup={dede:field.egroup /}' class="btn btn-success btn-sm"> <i class="fa fa-list-ul" aria-hidden="true"></i> 查看子分类</a> | |||||
</td> | |||||
</tr> | |||||
{/dede:datalist} | |||||
<tr align="center" bgcolor="#f6f6f6" height="26"> | |||||
<td colspan="8"> | |||||
{dede:pagelist listsize=6/} | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
} | |||||
?> | |||||
</body> | |||||
{dede:config.pagesize value="30"/} | |||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||||
<head> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>联动枚举管理</title> | |||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css"> | |||||
<link rel="stylesheet" href="../static/font-awesome/css/font-awesome.min.css"> | |||||
<link rel="stylesheet" href="css/base.css"> | |||||
<style> | |||||
li{float:left;padding-right:10px;line-height:26px} | |||||
.abt{width:90%;border:1px #ffffff solid} | |||||
#edsta{position:absolute;top:70px;left:110px;width:280px;height:200px;background-color:#f6f6f6;border:1px solid #dedede;display:none;padding:6px} | |||||
#edsta div{margin:6px} | |||||
</style> | |||||
<SCRIPT LANGUAGE="JavaScript" src="../static/js/webajax.js"></SCRIPT> | |||||
<script language="javascript" src="../static/js/jquery.js"></script> | |||||
<script src="../static/js/bootstrap.bundle.js"></script> | |||||
<script language='javascript' src='js/main.js'></script> | |||||
<SCRIPT LANGUAGE="JavaScript"> | |||||
var loadhtml = "<center><img src='../static/loadinglit.gif' style='padding:30px' /></center>"; | |||||
function updateItem(aid) { | |||||
var upenumf = document.getElementById('upenumf'); | |||||
upenumf.ename.value = $DE('ename' + aid).value; | |||||
upenumf.disorder.value = $DE('disorder' + aid).value; | |||||
upenumf.aid.value = aid; | |||||
upenumf.submit(); | |||||
} | |||||
function GetSelType() { | |||||
var selvalue = $DE('egroup1').options[$DE('egroup1').selectedIndex].value; | |||||
return selvalue; | |||||
} | |||||
function AddType() { | |||||
$DE('edsta').style.display = 'block'; | |||||
fetch('stepselect_main.php?action=addnew').then(resp=>{ | |||||
if (resp.ok) { | |||||
return resp.text() | |||||
} | |||||
throw new Error('系统错误,无法获取数据'); | |||||
}).then((d)=>{ | |||||
$DE('edsta').innerHTML = d; | |||||
}).catch((error) => { | |||||
$DE('edsta').innerHTML = errMsg; | |||||
}); | |||||
} | |||||
function AddEnum() { | |||||
var id = GetSelType(); | |||||
if (id == 0) { | |||||
ShowMsg("必须选择一个类别"); | |||||
return false; | |||||
} | |||||
fetch('stepselect_main.php?action=addenum&id=' + id).then(resp=>{ | |||||
if (resp.ok) { | |||||
return resp.text() | |||||
} | |||||
throw new Error('系统错误,无法获取数据'); | |||||
}).then((d)=>{ | |||||
$DE('edsta').innerHTML = d; | |||||
}).catch((error) => { | |||||
$DE('edsta').innerHTML = errMsg; | |||||
}); | |||||
$DE('edsta').style.display = 'block'; | |||||
} | |||||
function EditType() { | |||||
var id = GetSelType(); | |||||
if (id == 0) { | |||||
ShowMsg("必须选择一个类别"); | |||||
return false; | |||||
} | |||||
$DE('edsta').style.display = 'block'; | |||||
fetch('stepselect_main.php?action=edit&id=' + id).then(resp=>{ | |||||
if (resp.ok) { | |||||
return resp.text() | |||||
} | |||||
throw new Error('系统错误,无法获取数据'); | |||||
}).then((d)=>{ | |||||
$DE('edsta').innerHTML = d; | |||||
}).catch((error) => { | |||||
$DE('edsta').innerHTML = errMsg; | |||||
}); | |||||
} | |||||
function ViewType() { | |||||
var id = GetSelType(); | |||||
if (id == 0) { | |||||
ShowMsg("必须选择一个类别"); | |||||
return false; | |||||
} | |||||
$DE('edsta').style.display = 'block'; | |||||
fetch('stepselect_main.php?action=view&id=' + id).then(resp=>{ | |||||
if (resp.ok) { | |||||
return resp.text() | |||||
} | |||||
throw new Error('系统错误,无法获取数据'); | |||||
}).then((d)=>{ | |||||
$DE('edsta').innerHTML = d; | |||||
}).catch((error) => { | |||||
$DE('edsta').innerHTML = errMsg; | |||||
}); | |||||
} | |||||
function DelType() { | |||||
if (window.confirm("您确实要删除这个分类吗") == false) return false; | |||||
var id = GetSelType(); | |||||
if (id == 0) { | |||||
ShowMsg("必须选择一个类别"); | |||||
return false; | |||||
} | |||||
location.href = 'stepselect_main.php?action=del&id=' + id; | |||||
} | |||||
function CloseTWin() { | |||||
$DE('edsta').innerHTML = loadhtml; | |||||
$DE('edsta').style.display = 'none'; | |||||
} | |||||
function ChangePage(sobj) { | |||||
var ntxt = sobj.options[sobj.selectedIndex].text; | |||||
if (sobj.options[sobj.selectedIndex].value == 0) { | |||||
location.href = 'stepselect_main.php'; | |||||
} | |||||
else { | |||||
var ns = ntxt.split('|'); | |||||
location.href = 'stepselect_main.php?egroup=' + ns[0]; | |||||
} | |||||
} | |||||
function TogSel() { | |||||
var ems = document.getElementsByName('ids[]'); | |||||
for (i = 0; i < ems.length; i++) { | |||||
if (ems[i].checked == false) ems[i].checked = true; | |||||
else ems[i].checked = false; | |||||
} | |||||
} | |||||
function DelSel() { | |||||
if (window.confirm("您确实要删除这些分类吗")) document.form1.submit(); | |||||
} | |||||
function ChangePage2(sobj) { | |||||
var nv = sobj.options[sobj.selectedIndex].value; | |||||
if (sobj.options[sobj.selectedIndex].value == 0) { | |||||
location.href = 'stepselect_main.php?egroup=<?php echo $egroup; ?>'; | |||||
} | |||||
else { | |||||
location.href = 'stepselect_main.php?egroup=<?php echo $egroup; ?>&topvalue=' + nv; | |||||
} | |||||
} | |||||
</SCRIPT> | |||||
</head> | |||||
<body background='images/allbg.gif' leftmargin='8' topmargin='8'> | |||||
<div id='edsta'> | |||||
<center><img src='../static/loadinglit.gif'></center> | |||||
</div> | |||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" style="margin-bottom:10px" class="table maintable mt-3"> | |||||
<tr> | |||||
<td height="26" background="images/wbg.gif" colspan="6" style="padding-left:10px">联动枚举组管理</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="100">请选择组别:</td> | |||||
<td width="260"> | |||||
<select name="egroup1" id="egroup1" style="width:90%;" onChange="ChangePage(this)"> | |||||
<option value='0'>所有组</option> | |||||
<?php | |||||
$selgroup = ''; | |||||
foreach($etypes as $arr) | |||||
{ | |||||
$stylecolor = ""; | |||||
if($arr['issystem']==1) $stylecolor = " style='color:#999999' "; | |||||
if($egroup==$arr['egroup']) { | |||||
$selgroup = $arr['itemname']; | |||||
echo "<option value='{$arr['id']}' $stylecolor selected='1'>{$arr['egroup']}|{$arr['itemname']}</option>"; | |||||
} else { | |||||
echo "<option value='{$arr['id']}' $stylecolor>{$arr['egroup']}|{$arr['itemname']}</option>"; | |||||
} | |||||
} | |||||
?> | |||||
</select> | |||||
</td> | |||||
<td colspan='2'><img src='images/help.gif'>灰色字的为系统内置枚举,您是不能对它进行删除修改操作的,但可以添加或修改它的元素</td> | |||||
<td> | |||||
<button type="button" name="gedit" id="gedit" class="btn btn-success btn-sm" onClick="EditType()">修改</button> | |||||
<button type="button" name="gdel" id="gdel" class="btn btn-success btn-sm" onClick="DelType()">删除</button> | |||||
<button type="button" name="gview" id="gview" class="btn btn-success btn-sm" onClick="ViewType()">预览</button> | |||||
</td> | |||||
<td> | |||||
<button type="button" name="addnew" id="addnew" class="btn btn-success btn-sm" onClick="AddType()">新增类别组</button> | |||||
<a href='stepselect_main.php?action=upallcache' class="btn btn-success btn-sm">更新所有枚举缓存</a> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
if(!empty($egroup)) | |||||
{ | |||||
$arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='{$egroup}' "); | |||||
$dsql->Execute('out',"SELECT evalue,ename FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}' ORDER BY disorder ASC,evalue ASC"); | |||||
$options = ''; | |||||
while($row1 = $dsql->GetArray('out')) | |||||
{ | |||||
if(!preg_match("#\.#", $row1['evalue'])) | |||||
{ | |||||
$row1['ename'] = ($row1['evalue'] % 500 == 0)? $row1['ename'] : '└─'.$row1['ename']; | |||||
if($topvalue != $row1['evalue']) $options .= "<option value='{$row1['evalue']}'>{$row1['ename']}</option>"; | |||||
else $options .= "<option value='{$row1['evalue']}' selected='selected'>{$row1['ename']}</option>"; | |||||
} | |||||
} | |||||
//如果添加3级之类 | |||||
if($topvalue % 500 != 0) $arr['issign'] = 2; | |||||
?> | |||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" | |||||
style='margin-bottom:10px;' class="table maintable table-bordered"> | |||||
<tr> | |||||
<td height="26" background="images/tbg.gif" colspan="8"> | |||||
<div style="float:left"> | |||||
·<?php echo $selgroup; ?> | |||||
> | |||||
子分类管理 | |||||
</div> | |||||
<div style="float:right"> | |||||
<?php | |||||
if($egroup=='nativeplace') { | |||||
echo "<a href='stepselect_main.php?action=exarea' class='np coolbg'>把默认省市地区表导入</a> "; | |||||
} | |||||
?> | |||||
</div> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#ffffff" height='48'> | |||||
<td> | |||||
<form action='stepselect_main.php' method='post'> | |||||
<INPUT TYPE="hidden" NAME="action" value="addenum_save"> | |||||
<INPUT TYPE="hidden" NAME="issign" value="<?php echo $arr['issign']; ?>"> | |||||
<INPUT TYPE="hidden" NAME="egroup" value="<?php echo $arr['egroup']; ?>"> | |||||
<div style='float:left;'> | |||||
隶属分类: | |||||
<select name='topvalue' style='width:130px' onChange="ChangePage2(this)"> | |||||
<option value='0'><?php echo $selgroup; ?></option> | |||||
<?php echo $options; ?> | |||||
</select> | |||||
</div> | |||||
<div style='float:left;'> | |||||
分类名称:<INPUT TYPE="text" NAME="ename" class="iptxt" style='width:350px' /> | |||||
</div> | |||||
<div style='float:left;padding-left:6px'> | |||||
<button TYPE="submit" name='sb2' class="btn btn-success btn-sm">增加分类</button> | |||||
</div> | |||||
<div style='clear:both'> | |||||
<img src='images/help.gif'>如果没选择隶属分类则表示增加的是顶级分类,用半角逗号","分开可以一次增加多个分类 | |||||
</div> | |||||
</form> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" | |||||
class="table maintable table-bordered"> | |||||
<tr> | |||||
<td height="26" background="images/tbg.gif" colspan="8"> | |||||
<div style="float:left"> | |||||
<a href='stepselect_main.php'>枚举组列表</a> | |||||
> <a href='stepselect_main.php?egroup=<?php echo $egroup; ?>'><?php echo $selgroup; ?></a> | |||||
> 子分类列表 | |||||
</div> | |||||
<div style="float:right"></div> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#FBFCE2" height="26"> | |||||
<td width="6%">选择</td> | |||||
<td width="6%">编号</td> | |||||
<td width="20%">枚举名</td> | |||||
<td width="20%">类别组名</td> | |||||
<td width="10%">枚举类型</td> | |||||
<td width="10%">枚举值</td> | |||||
<td width="10%">组内排序</td> | |||||
<td width="18%">操作</td> | |||||
</tr> | |||||
<form action='stepselect_main.php' name='upenumf' method='post' id="upenumf"> | |||||
<input type='hidden' name='action' value='upenum' /> | |||||
<INPUT TYPE="hidden" NAME="aid" value=""> | |||||
<input type='hidden' name='ename' value='' /> | |||||
<input type='hidden' name='disorder' value='' /> | |||||
</form> | |||||
<form name='form1' action='stepselect_main.php' method='post'> | |||||
<input type='hidden' name='action' value='delenumAllSel' /> | |||||
{dede:datalist} | |||||
<tr align="center" bgcolor="#FFFFFF" height="26" onMouseMove="javascript:this.bgColor='#FCFDEE';" | |||||
onMouseOut="javascript:this.bgColor='#FFFFFF';"> | |||||
<td><input type='checkbox' name='ids[]' value='{dede:field.id /}' class='np' /></td> | |||||
<td>{dede:field.id /}</td> | |||||
<td> | |||||
<?php | |||||
if(!preg_match("#\.#", $fields['evalue'])) | |||||
{ | |||||
if($fields['evalue']>500 && $fields['evalue']%500 != 0) $fields['ename'] = " └─".$fields['ename']; | |||||
} else { | |||||
$fields['ename'] = " └───".$fields['ename']; | |||||
} | |||||
?> | |||||
<input type='text' id='ename{dede:field.id/}' value='{dede:field.ename /}' class='abt' /> | |||||
</td> | |||||
<td>{dede:field.egroup /}</td> | |||||
<td> | |||||
<?php | |||||
if(!preg_match("#\.#", $fields['evalue'])) | |||||
{ | |||||
if($fields['evalue']>500 && $fields['evalue']%500 != 0) echo '二级选择'; | |||||
else echo '一级选择'; | |||||
} else { | |||||
echo "三级选择"; | |||||
} | |||||
?></td> | |||||
<td>{dede:field.evalue /}</td> | |||||
<td><input type='text' id='disorder{dede:field.id/}' value='{dede:field.disorder /}' class='abt' /></td> | |||||
<td> | |||||
<?php | |||||
if(!empty($egroup)) | |||||
{ | |||||
?> | |||||
<a href='javascript:updateItem({dede:field.id/});' class="btn btn-success btn-sm"> <i class="fa fa-refresh" aria-hidden="true"></i> 更新</a> | |||||
<a href='stepselect_main.php?action=delenum&id={dede:field.id/}' class="btn btn-success btn-sm"> <i class="fa fa-trash" aria-hidden="true"></i> 删除</a> | |||||
<?php | |||||
} | |||||
else | |||||
{ | |||||
echo "<a href='stepselect_main.php?egroup={$fields['egroup']}'>".$egroups[$fields['egroup']]."</a>"; | |||||
} | |||||
?> | |||||
</td> | |||||
</tr> | |||||
{/dede:datalist} | |||||
</form> | |||||
<tr height="26"> | |||||
<td colspan="8" bgcolor="#ffffff"> | |||||
| |||||
<a href='javascript:TogSel();' class='btn btn-success btn-sm'>全选/反选</a> | |||||
| |||||
<a href='javascript:DelSel();' class='btn btn-success btn-sm'>删除所选</a> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#f6f6f6" height="26"> | |||||
<td colspan="8"> | |||||
{dede:pagelist listsize=6/} | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
} | |||||
else | |||||
{ | |||||
?> | |||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" | |||||
class="table maintable table-bordered"> | |||||
<tr> | |||||
<td height="26" background="images/tbg.gif" colspan="8"> | |||||
<div style="float:left"> | |||||
·<a href='stepselect_main.php'>枚举组列表</a> | |||||
</div> | |||||
<div style="float:right"></div> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#FBFCE2" height="26"> | |||||
<td width="6%">选择</td> | |||||
<td width="6%">编号</td> | |||||
<td width="28%">组类别名</td> | |||||
<td width="10%">级数</td> | |||||
<td width="10%">系统</td> | |||||
<td width="15%">缓存组名</td> | |||||
<td>操作</td> | |||||
</tr> | |||||
{dede:datalist} | |||||
<tr align="center" bgcolor="#FFFFFF" height="26" onMouseMove="javascript:this.bgColor='#FCFDEE';" | |||||
onMouseOut="javascript:this.bgColor='#FFFFFF';"> | |||||
<td><input type='checkbox' name='ids[]' value='{dede:field.id /}' class='np' /></td> | |||||
<td> {dede:field.id /} </td> | |||||
<td> <a href='stepselect_main.php?egroup={dede:field.egroup /}'>{dede:field.itemname /}</a> </td> | |||||
<td> | |||||
<?php | |||||
switch ($fields['issign']) { | |||||
case 0: | |||||
echo "一级选择"; | |||||
break; | |||||
case 1: | |||||
echo "二级选择"; | |||||
break; | |||||
case 2: | |||||
echo "三级选择"; | |||||
break; | |||||
} | |||||
?> | |||||
</td> | |||||
<td> {dede:field.issystem function="@me==1 ? '是' : '否'" /} </td> | |||||
<td>{dede:field.egroup /}</td> | |||||
<td> | |||||
<a href='stepselect_main.php?action=upallcache&egroup={dede:field.egroup /}' class="btn btn-success btn-sm"> <i class="fa fa-refresh" aria-hidden="true"></i> 更新缓存</a> | |||||
<a href='stepselect_main.php?egroup={dede:field.egroup /}' class="btn btn-success btn-sm"> <i class="fa fa-list-ul" aria-hidden="true"></i> 查看子分类</a> | |||||
</td> | |||||
</tr> | |||||
{/dede:datalist} | |||||
<tr align="center" bgcolor="#f6f6f6" height="26"> | |||||
<td colspan="8"> | |||||
{dede:pagelist listsize=6/} | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php | |||||
} | |||||
?> | |||||
</body> | |||||
</html> | </html> |
@@ -1,97 +1,94 @@ | |||||
<?php | |||||
if($action=='edit') { | |||||
$arr = $dsql->GetOne("Select * from `#@__stepselect` where id='$id' "); | |||||
$sbjs = " onsubmit=\"alert('该分类是系统内置枚举,不允许修改'); return false;\" "; | |||||
if($arr['issystem']==0) $sbjs = ''; | |||||
?> | |||||
<!-- 编辑表单 --> | |||||
<div style='float:left;'>修改类别</div> | |||||
<div style='float:right;'>[<a href="javascript:;" onclick="javascript:CloseTWin();">关闭</a>]</div> | |||||
<br style='clear:both' /> | |||||
<form action='stepselect_main.php' method='post'<?php echo $sbjs; ?>> | |||||
<INPUT TYPE="hidden" NAME="action" value="edit_save"> | |||||
<INPUT TYPE="hidden" NAME="id" value="<?php echo $arr['id']; ?>"> | |||||
<div>类 别 名:<INPUT TYPE="text" NAME="itemname" class="iptxt" style='width:180px' value="<?php echo $arr['itemname']; ?>"></div> | |||||
<div>缓存组名:<INPUT TYPE="text" NAME="egroup" class="iptxt" style='width:180px' value="<?php echo $arr['egroup']; ?>"></div> | |||||
<div>缓存组名必须为英文或数字组合!</div> | |||||
<div><button TYPE="submit" class="btn btn-success btn-sm">确定增加</button></div> | |||||
</form> | |||||
<?php | |||||
} else if($action=='addnew') { | |||||
?> | |||||
<!-- 新增类别表单 --> | |||||
<div style='float:left;'>新增类别</div> | |||||
<div style='float:right;'>[<a href="javascript:;" onclick="javascript:CloseTWin();">关闭</a>]</div> | |||||
<br style='clear:both' /> | |||||
<form action='stepselect_main.php' method='post'> | |||||
<INPUT TYPE="hidden" NAME="action" value="addnew_save"> | |||||
<div>类 别 名:<INPUT TYPE="text" NAME="itemname" class="iptxt" style='width:180px' /></div> | |||||
<div>缓存组名:<INPUT TYPE="text" NAME="egroup" class="iptxt" style='width:180px' /></div> | |||||
<div>缓存组名必须为英文或数字组合!</div> | |||||
<div><button TYPE="submit" class="btn btn-success btn-sm">确定增加</button></div> | |||||
</form> | |||||
<?php | |||||
} else if($action=='addenum') { | |||||
$arr = $dsql->GetOne("Select * from `#@__stepselect` where id='$id' "); | |||||
$dsql->Execute('out',"Select evalue,ename from `#@__sys_enum` where egroup='{$arr['egroup']}' And (evalue mod 500)=0 order by disorder asc,evalue asc"); | |||||
$options = ''; | |||||
if($arr['issign']==0) | |||||
{ | |||||
while($row1 = $dsql->GetArray('out')) $options .= "<option value='{$row1['evalue']}'>{$row1['ename']}</option>\r\n"; | |||||
} | |||||
?> | |||||
<!-- 新增枚举表单 --> | |||||
<div style='float:left;'>添加枚举</div> | |||||
<div style='float:right;'>[<a href="javascript:;" onclick="javascript:CloseTWin();">关闭</a>]</div> | |||||
<br style='clear:both' /> | |||||
<form action='stepselect_main.php' method='post'> | |||||
<INPUT TYPE="hidden" NAME="action" value="addenum_save"> | |||||
<INPUT TYPE="hidden" NAME="issign" value="<?php echo $arr['issign']; ?>"> | |||||
<INPUT TYPE="hidden" NAME="egroup" value="<?php echo $arr['egroup']; ?>"> | |||||
<div> | |||||
隶属枚举:<select name='topvalue' style='width:180px'> | |||||
<option value='0'>增加一级枚举</option> | |||||
<?php echo $options; ?> | |||||
</select> | |||||
</div> | |||||
<div> 枚举名:<INPUT TYPE="text" NAME="ename" class="iptxt" style='width:180px' /></div> | |||||
<div> 排序值:<INPUT TYPE="text" NAME="disorder" class="iptxt" style='width:180px' /></div> | |||||
<div>如果不指定,默认以枚举添加先后来排序</div> | |||||
<div><INPUT TYPE="submit" value="确定增加" class="np coolbg"/></div> | |||||
</form> | |||||
<?php | |||||
} else if($action=='view') { | |||||
$arr = $dsql->GetOne("Select * from `#@__stepselect` where id='$id' "); | |||||
$dsql->Execute('out',"Select * From `#@__sys_enum` where egroup like '{$arr['egroup']}' order by disorder asc, evalue asc"); | |||||
$options = ''; | |||||
while($row1 = $dsql->GetArray('out')) | |||||
{ | |||||
if($row1['evalue']%500==0 || $arr['issign']==1) | |||||
{ | |||||
$options .= "<option value='{$row1['evalue']}'>{$row1['ename']}</option>\r\n"; | |||||
} | |||||
else | |||||
{ | |||||
$options .= "<option value='{$row1['evalue']}'> └─{$row1['ename']}</option>\r\n"; | |||||
} | |||||
} | |||||
?> | |||||
<!-- 预览联动表单 --> | |||||
<div style='float:left;'>预览联动表单</div> | |||||
<div style='float:right;'>[<a href="javascript:;" onclick="javascript:CloseTWin();">关闭</a>]</div> | |||||
<br style='clear:both' /> | |||||
<br style='clear:both' /> | |||||
<div> | |||||
类别关系: | |||||
<select name='topvalue' style='width:160px'> | |||||
<option value='0'>请选择</option> | |||||
<?php echo $options; ?> | |||||
</select> | |||||
<br> | |||||
<br> | |||||
这里仅显示数据关系,实际应用中,二级联动生成的表单是支持级连的,并非全部列出 | |||||
</div> | |||||
<br style='clear:both' /> | |||||
<?php | |||||
} | |||||
<?php | |||||
if($action=='edit') { | |||||
$arr = $dsql->GetOne("Select * from `#@__stepselect` where id='$id' "); | |||||
$sbjs = " onsubmit=\"alert('该分类是系统内置枚举,不允许修改'); return false;\" "; | |||||
if($arr['issystem']==0) $sbjs = ''; | |||||
?> | |||||
<!-- 编辑表单 --> | |||||
<div style='float:left'>修改类别</div> | |||||
<div style='float:right'><a class="btn btn-success btn-sm" href="javascript:;" onclick="javascript:CloseTWin();">关闭</a></div> | |||||
<br style='clear:both'> | |||||
<form action='stepselect_main.php' method='post'<?php echo $sbjs; ?>> | |||||
<INPUT TYPE="hidden" NAME="action" value="edit_save"> | |||||
<INPUT TYPE="hidden" NAME="id" value="<?php echo $arr['id']; ?>"> | |||||
<div>类 别 名:<INPUT TYPE="text" NAME="itemname" class="iptxt" style='width:180px' value="<?php echo $arr['itemname']; ?>"></div> | |||||
<div>缓存组名:<INPUT TYPE="text" NAME="egroup" class="iptxt" style='width:180px' value="<?php echo $arr['egroup']; ?>"></div> | |||||
<div>缓存组名必须为英文或数字组合</div> | |||||
<div><button TYPE="submit" class="btn btn-success btn-sm">确定增加</button></div> | |||||
</form> | |||||
<?php | |||||
} else if($action=='addnew') { | |||||
?> | |||||
<!-- 新增类别表单 --> | |||||
<div style='float:left'>新增类别</div> | |||||
<div style='float:right'><a class="btn btn-success btn-sm" href="javascript:;" onclick="javascript:CloseTWin();">关闭</a></div> | |||||
<br style='clear:both'> | |||||
<form action='stepselect_main.php' method='post'> | |||||
<INPUT TYPE="hidden" NAME="action" value="addnew_save"> | |||||
<div>类 别 名:<INPUT TYPE="text" NAME="itemname" class="iptxt" style='width:180px' /></div> | |||||
<div>缓存组名:<INPUT TYPE="text" NAME="egroup" class="iptxt" style='width:180px' /></div> | |||||
<div>缓存组名必须为英文或数字组合</div> | |||||
<div><button TYPE="submit" class="btn btn-success btn-sm">确定增加</button></div> | |||||
</form> | |||||
<?php | |||||
} else if($action=='addenum') { | |||||
$arr = $dsql->GetOne("Select * from `#@__stepselect` where id='$id' "); | |||||
$dsql->Execute('out',"Select evalue,ename from `#@__sys_enum` where egroup='{$arr['egroup']}' And (evalue mod 500)=0 order by disorder asc,evalue asc"); | |||||
$options = ''; | |||||
if($arr['issign']==0) | |||||
{ | |||||
while($row1 = $dsql->GetArray('out')) $options .= "<option value='{$row1['evalue']}'>{$row1['ename']}</option>\r\n"; | |||||
} | |||||
?> | |||||
<!-- 新增枚举表单 --> | |||||
<div style='float:left'>添加枚举</div> | |||||
<div style='float:right'><a class="btn btn-success btn-sm" href="javascript:;" onclick="javascript:CloseTWin();">关闭</a></div> | |||||
<br style='clear:both'> | |||||
<form action='stepselect_main.php' method='post'> | |||||
<INPUT TYPE="hidden" NAME="action" value="addenum_save"> | |||||
<INPUT TYPE="hidden" NAME="issign" value="<?php echo $arr['issign']; ?>"> | |||||
<INPUT TYPE="hidden" NAME="egroup" value="<?php echo $arr['egroup']; ?>"> | |||||
<div> | |||||
隶属枚举:<select name='topvalue' style='width:180px'> | |||||
<option value='0'>增加一级枚举</option> | |||||
<?php echo $options; ?> | |||||
</select> | |||||
</div> | |||||
<div>枚举名:<INPUT TYPE="text" NAME="ename" class="iptxt" style='width:180px' /></div> | |||||
<div>排序值:<INPUT TYPE="text" NAME="disorder" class="iptxt" style='width:180px' /></div> | |||||
<div>如果不指定,默认以枚举添加先后来排序</div> | |||||
<div><INPUT TYPE="submit" value="确定增加" class="np coolbg"/></div> | |||||
</form> | |||||
<?php | |||||
} else if($action=='view') { | |||||
$arr = $dsql->GetOne("Select * from `#@__stepselect` where id='$id' "); | |||||
$dsql->Execute('out',"Select * From `#@__sys_enum` where egroup like '{$arr['egroup']}' order by disorder asc, evalue asc"); | |||||
$options = ''; | |||||
while($row1 = $dsql->GetArray('out')) | |||||
{ | |||||
if($row1['evalue']%500==0 || $arr['issign']==1) | |||||
{ | |||||
$options .= "<option value='{$row1['evalue']}'>{$row1['ename']}</option>\r\n"; | |||||
} else { | |||||
$options .= "<option value='{$row1['evalue']}'> └─{$row1['ename']}</option>\r\n"; | |||||
} | |||||
} | |||||
?> | |||||
<!-- 预览联动表单 --> | |||||
<div style='float:left'>预览联动表单</div> | |||||
<div style='float:right'><a class="btn btn-success btn-sm" href="javascript:;" onclick="javascript:CloseTWin();">关闭</a></div> | |||||
<br style='clear:both'> | |||||
<div> | |||||
类别关系: | |||||
<select name='topvalue' style='width:160px'> | |||||
<option value='0'>请选择</option> | |||||
<?php echo $options; ?> | |||||
</select> | |||||
<br> | |||||
<br> | |||||
这里仅显示数据关系,实际应用中,二级联动生成的表单是支持级连的,并非全部列出 | |||||
</div> | |||||
<br style='clear:both'> | |||||
<?php | |||||
} | |||||
?> | ?> |