type_2.asp

来自「实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员」· ASP 代码 · 共 104 行

ASP
104
字号
<%@ codepage ="936" %>
<%
if session("globalecmaster")="" or session("masterflag")="" then
response.write "<script language='javascript'>"
response.write"parent.location.href='../login.asp';</SCRIPT>" 
response.end
end if
if instr(session("masterflag"),"71")=0 then
response.redirect "../err.asp"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../css/style.css" rel=stylesheet type=text/css>
<%
if not isEmpty(request("typeid")) then
typeid=request("typeid")
else
Response.Redirect "type_2.asp"
Response.End
end if
%>
<script language="javascript">
function confirmdel(id,typeid){
if (confirm("您真的要删除该分类吗?删除该分类可能导致整个网站瘫痪!\n\n并且你将会删除与此相关的所有信息;例如:公司信息、产品信息、公司发布的相关信息等等\n\n而由此导致的后果一切由自己负责!\n\n在此网域高科商务网全体工作人员提醒您:请在删除之前备份好你的数据库,以防操作错误,导致严重的经济损失")) 
window.location.href="Admin_class_ok.asp?action=del_class_3&id="+id+"&typeid="+typeid+""
} 
</script>
<% data_path="../../" 'ACC连接数据库路径,对SQL无效 %>
<!--#include file="../../conn/conn.asp"-->
<%
Set rstype= Server.CreateObject("ADODB.Recordset") 
typesql="select * from Yixiang_class_2 where typeid="&typeid&"" 
rstype.open typesql,conn,1,1
typename1=rstype("typename")
sortid=rstype("sortid")
If rstype.eof and rstype.bof then 
response.write"<SCRIPT language=JavaScript>alert('对不起,参数有误!');"
response.write"this.location.href='javascript:history.back();'</SCRIPT>"
End if
Set rssort= Server.CreateObject("ADODB.Recordset") 
sortsql="select * from Yixiang_class_1 where sortid="&sortid&"" 
rssort.open sortsql,conn,1,1
sortname=rssort("sort")
If rstype.eof and rstype.bof then 
response.write"<SCRIPT language=JavaScript>alert('对不起,参数有误!');"
response.write"this.location.href='javascript:history.back();'</SCRIPT>"
End if
rstype.close
set rstype=nothing
set rstype_2=server.createobject("adodb.recordset") 
typesql_2="select * from Yixiang_class_3 where typeid="&typeid&"" 
rstype_2.open typesql_2,conn,1,1 
%>
<table width="98%" border="0" cellspacing="0" cellpadding="0"  align=center class="tableBorder"> 
  <tr> 
     <th height=25 colspan="2" class="tableHeaderText">网站行业类别管理 </th> 
  </tr> 
  <tr> 
     <td colspan="2" class="forumRowHighlight"><p><B>注意</B>:<BR> 
         <font color="blue">①类别直接与发布的信息相关联,删除类别可能会影响到会员发布的供求商机信息。<br>
		 ②点击类别名称进入相应下级分类,点击相应的分类操作属性进行相应操作。</font><br>
		 <font color="blue">③如果改变了网站行业分类,一定要重新<a href="makeallclass.asp"><font color="red"><b>生成行业分类JS文件</b></font></a>。</font><br>
		 <font color="red">④如:要添加三级分类——>先点击大类进入二级类——>点击二级类进入三级类——>添加三级类别</font>
[<a href="sort.asp">返回大类</a>]    </td> 
  </tr> 
</table>
<br>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=98% class="tableBorder">
	<tr> 
	<th height="22" colspan="2">行业三级分类列表</th>
	</tr>
<TR> 
<TD width="86%" height=25 class=bodytitle>所属类别:<a href=sort.asp>行业大类</a> > <a href=type.asp?sortid=<%=sortid%>><%=sortname%></a> > <a href=type_2.asp?typeid=<%=typeid%>><%=typename1%></a></td>
<TD width="16%" class=bodytitle><IMG src="../images_new/plus.gif" width="9" height="9">&nbsp;&nbsp;<a href="admin_class_ok.asp?action=add_class_3&sortid=<%=sortid%>&typeid=<%=typeid%>"><font color=red><b>添加三级分类</b></font></a></td>
</tr>
<TR>
  <TD colspan="2" align=middle vAlign=top><TABLE width="100%" border="0" cellpadding="5" cellspacing="5"> 
<TR height=22>
<%
if rstype_2.eof then
response.Write"<br><br><div align='center'>暂无类别请<a href=admin_class_ok.asp?action=add_class_3&sortid="&sortid&"&typeid="&typeid&">添加</a></div><br><br>"
else
j=1
do while not rstype_2.eof%> 
<td width="33%" align="left" height=24 class="Forumrow">
<IMG src="../images_new/plus.gif" width="9" height="9"> <%=rstype_2("typename_2")%>〖<a href=Admin_class_ok.asp?action=edit_class_3&id=<%=rstype_2("typeid_2")%>&typeid=<%=typeid%>><font color=#ff0000>修改</font></a>│<a href='javascript:confirmdel(<%=rstype_2("typeid_2")%>,<%=typeid%>)'><font color=#ff0000>删除</font></a>〗
</td>
<%if j mod 3 = 0 then %></tr><tr ><%end if%>
<% rstype_2.movenext 
j=j+1 
loop 
rstype_2.close
set rstype_2=nothing
end if 
%> 
</tr>
</TABLE></TD>
</TR>
</TABLE>
<br>
<!--#include file="../copy.asp" -->

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?