admin_emdxianlu.asp

来自「旅游管理系统 用ASP+SQL 2」· ASP 代码 · 共 89 行

ASP
89
字号
<html>
<head>
<title>编辑、删除旅游线路</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css1.css" type="text/css">
</head>
<%
if session("administrator")<>"administrator" then
Response.Redirect "admin_login.asp"
end if
%>
<body bgcolor="#FFFFFF" style="background-color: #999999" text="#000000" topmargin="5">
<!--#include file="includefile/shoubu.asp" -->
<br>
<!--#include file="includefile/conn.asp" -->
<script language =vbscript ></script>
<%
dim page,lxs
page=Request("page")
if page="" or not isNumeric(page) then 
page=1
end if
lxs=session("longname")
if lxs="系统管理员" then 
   sql="select * from xianlu order by id desc"
else
   sql="select * from xianlu where x_lxs='"&lxs&" 'order by id desc"
end if
rs.open sql,,1,1
if rs.RecordCount = 0 then
Response.Write "<div align='center'><font color='#9933FF' size='5'>被操作的数据库暂时还为空!</font></div>"
else
rs.PageSize = 10
%>
<table width="755" border="0" cellspacing="0" cellpadding="0" align="center" class="shizhou">
  <tr> 
    <td height="22" align="center">现有<b><%=rs.RecordCount%></b>条旅游线路,每页显示<b><%=rs.PageSize%></b>条,分<b><%=rs.PageCount%></b>页显示。 
      <%
    if rs.PageCount >= 0 then
    Response.Write "分页:"
    for i=1 to rs.PageCount
    %>
      <a href="admin_emdxianlu.asp?page=<%=i%>">『<%=i%>』</a> 
      <%
    next
    end if
    %>
    </td>
  </tr>
</table>
<br>
<table width="755" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#CCCCCC">
  <tr> 
    <td height="22" width="31" align="center" bgcolor="#EFEFEF">ID号</td>
    <td height="22" width="517" bgcolor="#EFEFEF" align="center">线路名称</td>
    <td height="22" width="97" align="center" bgcolor="#EFEFEF">人气/查看次数</td>
    <td height="22" width="52" align="center" bgcolor="#EFEFEF">编辑</td>
    <td height="22" width="52" align="center" bgcolor="#EFEFEF">删除</td>
  </tr>
  <tr> 
    <%
  dim i
  i=0
	while not Rs.EOF and i<(page-1)*10
	RS.MoveNext
	i=i+1
	wend
	while not Rs.eof and i<page*10
%>
    <td height="20" width="31" align="center" bgcolor="#EFEFEF"><%=rs("id")%></td>
    <td height="20" width="517" onMouseOver="me.bgcolor='#EFEFEF'" onMouseOut="me.bgcolor='#FFFFFF'" bgcolor="#FFFFFF"> <a href="listxianlu.asp?id=<%=rs("id")%>" target =_blank title="点击这里查看此线路的祥细信息" ><%=rs("x_name")%></a> 
    </td>
    <td height="20" width="97" align="center" bgcolor="#FFFFFF"><%=rs("x_n")%></td>
    <td height="20" width="52" align="center" onMouseOver="me.bgcolor='#EFEFEF'" onMouseOut="me.bgcolor='#FFFFFF'" bgcolor="#FFFFFF"><a href="admin_editdel.asp?id=<%=rs("id")%>&action=edit" title="编辑这条线路">编辑</a></td>
    <td height="20" width="52" align="center" onMouseOver="me.bgcolor='#EFEFEF'" onMouseOut="me.bgcolor='#FFFFFF'" bgcolor="#FFFFFF"><a href="admin_editdel.asp?id=<%=rs("id")%>&action=del" title="删除这条线路">删除</a></td>
  </tr>
  <%
i=i+1
Rs.MoveNext
		wend
		rs.close
		conn.close
		end if
%>
</table>
<br>
<!--#include file="includefile/weibu.asp" -->
</body>
</html>

⌨️ 快捷键说明

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