📄 product_admin.asp
字号:
<!--#include file="../inc/CheckAdmin.asp"-->
<!--#include file="../inc/Config.asp"-->
<!--#include file="../inc/Navtree.asp"-->
<!--#include file="../inc/Conn.asp"-->
<%
Dim Sortid,sql,Sortid3,KeyWord
Sortid=request("sel1")
fs=request("fs")
Sortid3=request("sel3")
KeyWord=formatStr(request("KeyWord"))
if Sortid="" or not isnumeric(Sortid) then
SortSql=""
else
SortSql=" and h_from="&Sortid
end if
if fs="" then
SortSql2=""
else
SortSql2=" and h_fangshi='"&fs&"'"
end if
if Sortid3="" or not isnumeric(Sortid3) then
SortSql3=""
else
SortSql3=" and h_to="&Sortid3
end if
sql="select * from houyun where h_content like '%"&KeyWord&"%'"&SortSql&SortSql2&SortSql3&" order by h_id"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
rs.pagesize=20
%>
<!--#include file="../../inc/Page_function.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站管理系统</title>
<link href="../Css_Main.css" rel="stylesheet" type="text/css">
</head>
<script language="JavaScript">
<!--
function CheckAll(formall)
{
for (var i=0;i<formall.elements.length;i++)
{
var e = formall.elements[i];
if (e.name == 'delid')
e.checked = formall.chkall.checked;
}
}
-->
</script>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr>
<td class="title_dh"><div align="center">路线管理</div></td>
</tr>
<form action="" method="get" name="form">
<tr>
<td class="tdbg"><div align="left"><strong>搜索:</strong><select name="sel1" id="sel1">
<option value="" selected>起运站</option>
<%sql="select * from hfrom order by hf_id"
set rss=conn.execute(sql)
do while not rss.eof%>
<option value="<%= rss("hf_id") %>"<% If cstr(rss("hf_id"))=Sortid Then response.Write(" selected")%>><%= rss("hf_name") %></option>
<%rss.movenext
loop
rss.close
set rss=nothing%>
</select>
<select name="sel3" id="sel3">
<option value="" selected>目的站</option>
<%sql="select * from hto order by ht_id"
set rss=conn.execute(sql)
do while not rss.eof%>
<option value="<%= rss("ht_id") %>"<% If cstr(rss("ht_id"))=Sortid3 Then response.Write(" selected")%>><%= rss("ht_name") %></option>
<%rss.movenext
loop
rss.close
set rss=nothing%>
</select>
<select name="fs" class="Maxlenght" id="fs">
<option value="">运货方式</option>
<option value="公路"<% If fs="公路" Then response.Write(" selected")%>>公路</option>
<option value="铁路"<% If fs="铁路" Then response.Write(" selected")%>>铁路</option>
<option value="航空"<% If fs="航空" Then response.Write(" selected")%>>航空</option>
</select>
<input name="Keyword" type="text" id="Keyword" size="20" value="<%= Keyword %>">
<input name="Submit" type="submit" id="Submit" value="查询">
</div></td>
</tr></form>
</table>
<form name="form1" method="post" action="Product_del.asp">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr class="title_top">
<td width="6%"><div align="center">选择 </div></td>
<td width="5%"><div align="center"> ID</div></td>
<td width="11%"><div align="center">起运站</div></td>
<td width="11%"><div align="center">目的站</div></td>
<td width="11%"><div align="center">元/立方米</div></td>
<td width="11%"><div align="center"> 元/ 公斤</div>
<div align="center"></div></td>
<td width="11%"><div align="center"> 到达时限</div></td>
<td width="11%"><div align="center">里程</div></td>
<td width="11%"><div align="center">方式</div></td>
<td width="12%"><div align="center">操作</div></td>
</tr>
<% if rs.eof and rs.bof then %>
<tr class="tdbg">
<td colspan="10">
<div align="center"> 暂时没有路线 </div></td>
</tr>
<% else %>
<% for i=1 to rs.PageSize
if rs.EOF or rs.BOF then exit for
%>
<tr class="tdbg">
<td>
<div align="center">
<input type="checkbox" name="delid" value="<%= rs("h_id") %>">
</div></td>
<td>
<div align="center"><%= rs("h_id") %></div></td>
<td><div align="center"><%= Get_TableName(rs("h_from"),"hfrom","hf_name","hf_id") %></div></td>
<td><div align="center"><a href="Product_Edit.asp?id=<%= rs("h_id") %>&Sortid=<%= rs("h_from") %>&Sortid2=<%= rs("h_area") %>&Sortid3=<%= rs("h_to") %>"><%= Get_TableName(rs("h_to"),"hto","ht_name","ht_id") %></a></div></td>
<td><div align="center"><%= rs("h_lifang") %></div></td>
<td> <div align="center"><%= rs("h_price") %></div></td>
<td>
<div align="center"><%= rs("h_time") %></div></td>
<td><div align="center"><%= rs("h_licheng") %></div></td>
<td><div align="center">
<div align="center"><%= rs("h_fangshi") %></div>
</div></td>
<td><div align="center"><a href="Product_Edit.asp?id=<%= rs("h_id") %>&Sortid=<%= rs("h_from") %>&Sortid2=<%= rs("h_area") %>&Sortid3=<%= rs("h_to") %>">修改</a> | <a href="Product_Del.asp?delid=<%= rs("h_id") %>" onClick="return confirm('此操作不可恢复,确定执行吗?');">删除</a></div></td>
</tr>
<% rs.movenext
next
%>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="40">
<div align="center">
<input type="checkbox" name="chkall" value="on" onClick="CheckAll(this.form)" title='全选/不选' >
全选/不选
<input type="submit" name="Submit2" value="删除所选" onClick="return confirm('此操作不可恢复,确定执行吗?');">
</div></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr>
<td>
<div align="center"><!-- #include file="../../inc/showpage.asp" --></div></td>
</tr>
</table> </form>
<% end if
rs.close
set rs=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -