📄 admin_class.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin_check.asp" -->
<!--#include file="conn_acc.asp" -->
<!--#include file="function.asp" -->
<%
dim furl
furl =request.ServerVariables("URL")
If (Request.QueryString <> "") Then
If (InStr(1, furl, "?", vbTextCompare) = 0) Then
furl = furl & "?" & Request.QueryString
Else
furl = furl & "&" & Request.QueryString
End If
End If
furl=server.URLEncode(furl)
dim f_cid
f_cid=Trim(Request.QueryString("cid"))
if f_cid="" then f_cid=0
%>
<%dim i
i=1
function firste_showmenu(f_id,f_depth)
Dim rs
Dim rs_cmd
Dim rs_numRows
Set rs_cmd = Server.CreateObject ("ADODB.Command")
rs_cmd.ActiveConnection = MM_conn_comm_STRING
rs_cmd.CommandText = "SELECT * FROM firste_city WHERE f_up = "&f_id&" ORDER BY f_p ASC,fid asc"
rs_cmd.Prepared = true
Set rs = rs_cmd.Execute
rs_numRows = 0
%>
<%
While NOT rs.EOF
%>
<tr>
<td bgcolor="#FFFFFF"><% If f_depth=0 Then %><input name="f_p<%= i %>" type="text" id="f_p<%= i %>" value="<%=(rs.Fields.Item("f_p").Value)%>" size="4" maxlength="4" onKeyUp="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
<input type="button" name="Submit2" value="修改" onClick="changep('f_p<%= i %>',<%=(rs.Fields.Item("fid").Value)%>)"><% Else
for j=0 to f_depth
response.Write(" ")
next
response.Write("|-")%>
<input name="f_p<%= i %>" type="text" id="f_p<%= i %>" value="<%=(rs.Fields.Item("f_p").Value)%>" size="4" maxlength="4" onKeyUp="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
<input type="button" name="Submit2" value="修改" onClick="changep('f_p<%= i %>',<%=(rs.Fields.Item("fid").Value)%>)">
<% End If %></td>
<td bgcolor="#FFFFFF"><%if f_depth=0 then
if (rs.Fields.Item("f_grade").Value)<>0 then Response.Write("<a href=""admin_class.asp?cid="&rs.Fields.Item("fid").Value&""">")
response.Write(rs.Fields.Item("f_title").Value)
if (rs.Fields.Item("f_grade").Value)<>0 then Response.Write("</a>")
else
for j=0 to f_depth
response.Write(" ")
next
response.Write("|-"&(rs.Fields.Item("f_title").Value))
end if%></td>
<td bgcolor="#FFFFFF" align="center"><%= (rs.Fields.Item("f_grade").Value) %></td>
<td bgcolor="#FFFFFF" align="center"><a href="admin_class_add.asp?sid=<%=(rs.Fields.Item("fid").Value)%>&url=<%= furl %>">添加子分类</a> <input name="imageField" type="image" id="imageField" onClick="MM_goToURL('self','admin_class_edit.asp?eid=<%=(rs.Fields.Item("fid").Value)%>&url=<%= furl %>');return document.MM_returnValue" src="image/edit.gif" alt="修改">
<input name="imageField2" type="image" onClick="MM_goToURL1('self','admin_class_del.asp?delid=<%=(rs.Fields.Item("fid").Value)%>&upid=<%=(rs.Fields.Item("f_up").Value)%>&url=<%= furl %>&g= <%=(rs.Fields.Item("f_grade").Value) %>');return document.MM_returnValue" src="image/del.gif" alt="删除" /></td>
</tr>
<% i=i+1
if f_id <>0 then call firste_showmenu(rs.Fields.Item("fid").Value,f_depth+1)
rs.MoveNext()
Wend
%>
<%
rs.Close()
Set rs = Nothing
end function
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>firste</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//JQuery ready is quicker than onload
$(".stripeMe tr:gt(0)").mouseover(function() {$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");});
$(".stripeMe tr:even").addClass("alt");
});
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_goToURL1() { //v3.0
var i, args=MM_goToURL1.arguments; document.MM_returnValue = false;
if(confirm("确定删除吗?"))
{
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
else
{
//location.href='admin_product.asp';
}
}
function changep(fp,fid){
var obj=document.getElementById(fp);
window.location="admin_class_p.asp?fp="+obj.value+"&id="+fid+"&url=<%= furl %>";
}
function changec(fid){
window.location="admin_class.asp?cid="+fid;
}
</script>
<style type="text/css">
tr.over td {
background: #bcd4ec;
}
</style>
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="t3">
<tr>
<td class="l"></td>
<td align="center" class="t">分类列表</td>
<td class="r"></td>
</tr>
</table>
<div class="b3">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="96%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr>
<td><select name="select" id="select" onChange="changec(this.value)">
<option>---请选择---</option>
<% call firste_classselect_sql(MM_conn_comm_STRING,"firste_city",0,0,f_cid) %>
</select>
</td>
</tr>
</table>
<table width="97%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#E0E0E0" class="stripeMe">
<tr>
<td width="22%" align="center" bgcolor="#0099FF"><strong>排序</strong></td>
<td width="41%" align="center" bgcolor="#0099FF"><strong>分类名称</strong></td>
<td width="14%" align="center" bgcolor="#0099FF"><strong>子分类数</strong></td>
<td width="23%" align="center" bgcolor="#0099FF"><strong>操作</strong></td>
</tr>
<% call firste_showmenu(f_cid,0) %>
</table>
<table width="96%" border="0" align="center" cellpadding="4" cellspacing="1">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="t3b">
<tr>
<td class="l"> </td>
<td class="c"> </td>
<td class="r"> </td>
</tr>
</table>
</td>
</tr>
</table><br>
<br>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -