type.asp

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

ASP
108
字号
<%@ 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("sortid")) then
sortid=request("sortid")
else
Response.Redirect "type.asp"
Response.End
end if
%>
<script language="javascript">
function confirmdel(id,sortid){
if (confirm("您真的要删除该二级分类吗?删除该分类可能导致整个网站瘫痪!并且同时会删除该类下面的小类\n\n并且你将会删除与此相关的所有信息;例如:公司信息、产品信息、公司发布的相关信息等等\n\n而由此导致的后果一切由自己负责!\n\n在此网域高科商务网全体工作人员提醒您:请在删除之前备份好你的数据库,以防操作错误,导致严重的经济损失")) 
window.location.href="Admin_class_ok.asp?action=del_class_2&id="+id+"&sortid="+sortid+""
} 
</script>
<script language="javascript">
function setting(id,sortid){
if (confirm("确定设置吗?")) 
window.location.href="setting.asp?id="+id+"&sortid="+sortid+""
} 
</script>
<% data_path="../../" 'ACC连接数据库路径,对SQL无效 %>
<!--#include file="../../conn/conn.asp"-->
<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>
<%
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 rssort.eof and rssort.bof then 
response.write"<SCRIPT language=JavaScript>alert('对不起,参数有误!');"
response.write"this.location.href='javascript:history.back();'</SCRIPT>"
End if
rssort.close
set rssort=nothing
set rstype=server.createobject("adodb.recordset") 
typesql="select * from Yixiang_class_2 where sortid="&sortid&"" 
rstype.open typesql,conn,1,1 
%>
<br>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=98% align=center class="tableBorder">
	<tr> 
	<th height="22" colspan="2">行业二级分类列表</th>
	</tr>
<TR> 
<TD width="86%" height=25 class=bodytitle>&nbsp;所属类别:<a href=sort.asp>行业大类</a> > <a href=type.asp?sortid=<%=sortid%>><%=sortname%></a></td>
<TD width="14%" class=bodytitle><IMG src="../images_new/plus.gif" width="9" height="9">&nbsp;&nbsp;<a href="admin_class_ok.asp?action=add_class_2&sortid=<%=sortid%>"><font color=red><b>添加二级分类</b></font></a></td>
</tr>
<TR>
  <TD colspan="2" align=middle vAlign=top>
  <div align="left">&nbsp; <img src="<%=HOPE_InstallDir%>images/choice_example.gif" width="14" height="14" align="top">&nbsp;&nbsp;选中的项将在允许显示小类时被显示,建议按照版面大小来设置要显示的类目录!
    <TABLE width="100%" height="30" border="0" cellpadding="5" cellspacing="5"> 
<TR height=22>
<%
if rstype.eof then
response.Write"<br><br><div align='center'>暂无类别请<a href=admin_class_ok.asp?action=add_class_2&sortid="&sortid&">添加</a></div><br><br>"
else
j=1
do while not rstype.eof%> 
<td width="33%" align="left" height=24 class="Forumrow">
<IMG src="../images_new/plus.gif" width="9" height="9"> <input type=checkbox name=selAnnounce value="<%=rstype("typeid")%>" <%if rstype("top")=1 then response.write "checked"%> onClick="javascript:setting(<%=rstype("typeid")%>,<%=sortid%>)"><a href="type_2.asp?typeid=<%=rstype("typeid")%>"><%=rstype("typename")%></a>〖<a href=Admin_class_ok.asp?action=edit_class_2&id=<%=rstype("typeid")%>&sortid=<%=sortid%>><font color=#ff0000>修改</font></a>│<a href='javascript:confirmdel(<%=rstype("typeid")%>,<%=sortid%>)'><font color=#ff0000>删除</font></a>〗
</td>
<%if j mod 3 = 0 then %></tr><tr ><%end if%>
<% rstype.movenext 
j=j+1 
loop 
rstype.close
set rstype=nothing 
end if
%> 
</tr>
</TABLE></TD>
</TR>
</TABLE>
<br>
<%
sub deleteannounce(id)
conn.execute("update Yixiang_class_2 set top=1 where typeid="&cstr(id)&"")
End sub
%>
<!--#include file="../copy.asp" -->

⌨️ 快捷键说明

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