?? manage_line.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="chk.asp"-->
<!--#include file="db_conn.asp"-->
<!--#include file="../my_libs/my_request.asp"-->
<!--#include file="../my_libs/my_lib.asp"-->
<!--#include file="../my_libs/pages.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建網頁 1</title>
<link rel="stylesheet" type="text/css" href="style_admin.css" />
</head>
<body>
<table border="1" width="100%" id="table2">
<form action=manage_line.asp method=post>
<tr>
<td class="top_td">旅游線路搜索</td>
</tr>
<tr>
<td>
<p align="center">線路搜索:<select size="1" name="pp">
<option value="a4" selected>按線路名稱搜索</option>
<option value="a5">按線路類型搜索</option>
</select><input type="text" name="sid" size="20"><input type="submit" value="提交" name="B1">
</td>
</tr>
</form>
</table>
<b>旅游線路管理<font face="宋體" color="#FF6600">↓</font></b><table border="1" width="100%" id="table1">
<tr>
<td width="41" class="top_td" align="center">id</td>
<td width="443" class="top_td" align="center">線路名稱</td>
<td width="35" class="top_td" align="center"><select size="1" name="D1" onchange="if (this.options[this.selectedIndex].value==3) {void(null)} else {location=this.options[this.selectedIndex].value;}" onChange="openCopartner(copartner)">
<%
response.write "<option selected value=3>類別</option>"
response.write "<option value=manage_line.asp>全部</option>"
sql="select sort_id,zm_linesort from ssort_line order by zm_flag"
set rs=conn.execute (sql)
if rs.eof then
else
do while not rs.eof
response.write "<option value=manage_line.asp?pp=a1&sid="&rs(0)&">"&rs(1)&"</option>"
rs.movenext
loop
rs.close
set rs=nothing
end if
%></select></td>
<td width="35" class="top_td" align="center">
<select size="1" name="D2" onchange="if (this.options[this.selectedIndex].value==3) {void(null)} else {location=this.options[this.selectedIndex].value;}" onChange="openCopartner(copartner)">
<%
response.write "<option selected value=3>狀態</option>"
response.write "<option value=manage_line.asp?pp=a2&sid=0>啟用</option>"
response.write "<option value=manage_line.asp?pp=a2&sid=1>暫存</option>"
%></select></td>
<td width="35" class="top_td" align="center">
<select size="1" name="D3" onchange="if (this.options[this.selectedIndex].value==3) {void(null)} else {location=this.options[this.selectedIndex].value;}" onChange="openCopartner(copartner)">
<%
response.write "<option selected value=3>推薦</option>"
response.write "<option value=manage_line.asp?pp=a3&sid=1>置頂</option>"
response.write "<option value=manage_line.asp?pp=a3&sid=0>正常</option>"
%></select></td>
<td width="241" class="top_td" align="center">添加時間</td>
<td colspan="2" class="top_td" align="center">操作</td>
</tr>
<%
dim sql,rs,arrlist(5),sqls,rss,sid,pp,i,ii
pp=request("pp")
sid=request("sid")
select case pp
case "a1"
sql="select id,zm_linename,zm_linesort,zm_istop,zm_addtime,zm_isok from ssort_lines where zm_linesort="&sid&" order by zm_flagx"
case "a2"
sql="select id,zm_linename,zm_linesort,zm_istop,zm_addtime,zm_isok from ssort_lines where zm_isok="&sid&" order by zm_flagx"
case "a3"
sql="select id,zm_linename,zm_linesort,zm_istop,zm_addtime,zm_isok from ssort_lines where zm_istop="&sid&" order by zm_flagx"
case "a4"
sql="select id,zm_linename,zm_linesort,zm_istop,zm_addtime,zm_isok from ssort_lines where zm_linename like '%"&sid&"%' order by zm_flagx"
case "a5"
sql="select id,zm_linename,zm_linesort,zm_istop,zm_addtime,zm_isok from ssort_lines where ssort_linetype like '%"&sid&"%' order by zm_flagx"
case else
sql="select id,zm_linename,zm_linesort,zm_istop,zm_addtime,zm_isok from ssort_lines order by zm_flagx"
end select
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if (rs.eof and rs.bof) then
response.write "<tr>"
response.write "<td class=12px width=760 colspan=6><font color=#FF0000>暫時還沒有任何數據</font></td>"
response.write "</tr>"
else
rs.PageSize =20 '每頁記錄條數
iCount=rs.RecordCount '記錄總數
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
end if
ii=1
while not rs.eof and ii<=rs.pagesize
for i=0 to 5
arrlist(i)=rs(i)
next
sqls="select zm_linesort from ssort_line where sort_id="&arrlist(2)
set rss=conn.execute (sqls)
zm_linesort=rss(0)
rss.close
set rss=nothing
%>
<tr>
<td width="41" align="center"><%=(page-1)*19+ii%></td>
<td width="443" align="center"><%=arrlist(1)%></td>
<td align="center"><%=zm_linesort%></td>
<td align="center"><%if arrlist(5)=0 then response.write "<a href=change_line.asp?flag=1,0,"&arrlist(0)&">啟用</a>" else response.write "<a href=change_line.asp?flag=0,0,"&arrlist(0)&">暫存</a>"%></td>
<td align="center"><%if arrlist(3)=0 then response.write "<a href=change_line.asp?flag=1,1,"&arrlist(0)&">正常</a>" else response.write "<a href=change_line.asp?flag=0,1,"&arrlist(0)&">置頂</a>"%></td>
<td width="241" align="center"><%=arrlist(4)%></td>
<td width="47" align="center"><a href="modi_line.asp?id=<%=arrlist(0)%>">修改</a></td>
<td width="45" align="center"><a href="delete_line.asp?id=<%=arrlist(0)%>">刪除</a></td>
</tr>
<%
rs.movenext
ii=ii+1
wend
call PageControl(iCount,maxpage,page,"border=0 width=100% align=center class=left_td ","<p align=right>")
rs.close
set rs=nothing%>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -