admin_category.asp
来自「.asp网站程序。专业的二手汽车商店网站。功能强大」· ASP 代码 · 共 88 行
ASP
88 行
<!--#include file="Config.asp" -->
<!-- #include file="top.asp" -->
<!--#include file="navbar.asp" -->
<HTML><TITLE>选择分类</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=keywords content="安徽二手市场">
<%
if not isnull(UserName) and UserName<>"" then
call main()
else
msgtitle="大类管理"
msginfo="<li>操作错误,你没有登录系统!<li><a href=""User.Asp"" class=""ArticleList"">点此登录系统</a><li><a href=""./"" class=""ArticleList"">返回频道首页</a></li>"
call Sysmsg(msgtitle,msginfo)
end if
sub main() %>
<table width="780" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
<tr>
<th height="25" width="755" >添加信息时请选择相应的分类</th>
</tr>
<%dim Rs,SubRs
set Rs=server.createobject("adodb.recordset")
set SubRs=server.createobject("adodb.recordset")
rs.open "select * from "&CategoryName&"_Cate order by CateID asc",conn,1,1
if err.number <> 0 then
response.write "数据库出错"
else
if rs.bof and rs.eof then
response.write "没有添加大类"
else
do while not rs.eof %>
<tr>
<td class="forumRowHighlight" width="755" > <strong><%=rs("CateName")%></strong> </td>
</tr>
<tr>
<td height="22" class="forumRow" width="755">
<% SubRs.open "select * from "&CategoryName&"_SubCate where CateID="&Rs("CateID")&" order by SubCateID asc",conn,1,1
if err.number <> 0 then
response.write "数据库出错"
else
if SubRs.bof and SubRs.eof then
response.write "没有添加小类"
else
i=1
do while not SubRs.eof
%> <a href="Admin_SoftInfo.asp?CateID=<%=SubRS("CateID")%>&SubCateID=<%=SubRS("SubCateID")%>" class="ArticleList"><%=SubRS("SubCateName")%></a> ·
<%
if (i mod 7)=0 then response.write "<br>"
i=i+1
SubRs.movenext
loop
end if
end if
SubRs.close
rs.movenext
loop
end if
end if
rs.close
set rs=nothing
set Subrs=nothing
%>
</table>
<% end sub
sub Sysmsg(msgtitle,msginfo)
%> <br> <table width="780" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder" >
<tr>
<th width="668"><%=msgtitle%></th>
</tr>
<tr>
<td class="forumRow" width="668"><%=msginfo%></td>
</tr>
<tr>
<td height="22" align="center" class="forumRowHighlight" width="668"><a href="javascript:history.go(-1)" ><<
返回上一页</a></td>
</tr>
</table>
<br>
<%end sub %>
</HTML>
<%
CloseDatabase
%>
<!-- #include file="end.asp" -->
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?