cardsearch.asp
来自「国内第一数字点卡销售程序。功能强大。 完整无错!数据文件经MD5加密!经严格测」· ASP 代码 · 共 141 行
ASP
141 行
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
%>
<%
if session("admin_rank")<>1 and session("admin_rank")<>4 then
response.write("<script>alert('您无权查看本页,SORRY!');window.location=('login.asp')</script>")
response.end
end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<%
if request("action")="del" then
sql="select * from tingcardnum where id="&int(request("id"))
rs.open sql,conn,3,3
if rs.eof then
response.redirect "cardsearch.asp"
else
rs.delete
rs.update
end if
rs.close
response.write "<script language=javascript>alert('删除成功!');</script>"
end if
%>
<body style="background-color: #F0FBF1">
<div align="center">
<table border="1" width="97%" cellspacing="0" height="10" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" bordercolor="#FFFFFF" cellpadding="0">
<tr>
<form method="POST" action="cardsearch.asp?soutype=1">
<td style="padding-left: 10px" colspan="6" height="30"> 卡号查询:
<select size="1" name="keywords">
<%
sql="select * from hw where hw_cz='0'"
rs.open sql,conn,3,3
if rs.eof then
%>
<option value=""></option>
<%else
do while not rs.eof%>
<option value="<%=rs("hw_id")%>"><%=rs("hw_name")%></option>
<%rs.movenext
loop
end if
rs.close%>
</select>
<input type="image" border="0" name="b12" src="../IMAGES/search.jpg" width="81" height="20">
<br>
</td>
</form>
</tr>
<%
keywords=trim(request("keywords"))
if trim(request("soutype"))="" then
soutype=1
else
soutype=int(trim(request("soutype")))
end if
select case soutype
case 0
sql="select * from tingcardnum order by id desc"
case 1
sql="select * from tingcardnum where hw_id="&int(keywords)&" order by id DESC"
case 2
strTemp=keywords
keywords=srequest(strTemp,0)
sql="select * from tingcardnum where hw_name like '"&keywords&"' order by id DESC"
end select
rs.open sql,conn,3,3
if rs.eof then
response.write "暂且没有卡号资料"
response.end
end if
rs.pagesize=15
page = cint(request("page"))
if page = "" then page = 1
if not(isnumeric(page)) then page=1
if page<1 then page=1
if page >= rs.pagecount then page = rs.pagecount
rs.absolutepage = page
%>
<tr>
<td width="22%" align="center" height="30">
商品名称</td>
<td width="19%" align="center" height="30">
商品卡号</td>
<td width="10%" align="center" height="30">
商品密码</td>
<td width="21%" align="center" height="30">
是否售出</td>
<td width="10%" align="center" height="30">
是否删除</td>
</tr>
<%
for i=1 to rs.pagesize
%>
<tr>
<td width="22%" align="center" height="30">
<%=rs("hw_name")%></td>
<td width="19%" align="center" height="30">
<%=rs("hw_number")%></td>
<td width="10%" align="center" height="30">加密</td>
<td width="21%" align="center" height="30">
<% if rs("hw_ok") then%>未售出<%else%>已售出<% end if %>
</td>
<td width="10%" align="center" height="30">
<a href="delcard.asp?id=<%=rs("id")%>&action=del" onClick="return confirm('您确定进行删除操作吗?')"><font color="#FF0000">删除此商品</font></a></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
<tr> <form name="form3" method="post" action="jump.asp?ac=1">
<td width="97%" style="padding-left: 10px" colspan="5" height="30">
<p align="center">共有记录<%=rs.recordcount%>条
<%=page%>/<%=rs.pagecount%> <A href="<%request.servervariables("document_name")%>?page=<%=page-1%>&soutype=<%=soutype%>&keywords=<%=keywords%>">上一页</A> <A href="<%request.servervariables("document_name")%>?page=<%=page+1%>&soutype=<%=soutype%>&keywords=<%=keywords%>">下一页</A> 转到第 <SELECT onchange="window.location='?soutype=<%=soutype%>&keywords=<%=keywords%>&page='+this.value" name=gopage>
<%for x=1 to rs.pagecount%>
<OPTION <%if x=page then%>selected<%end if%> value=<%=x%>><%=x%></OPTION>
<%next%>
</SELECT> 页
</div>
<%rs.close%>
</td>
</tr>
</table>
</div>
<%
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?