📄 p_search.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="top.asp"-->
<%
select case request("action")
case "edit"
call edit()
case else
call normal()
end select
sub normal()
dim strFileName,uid
Uid=trim(Request("wuid"))
strFileName="cust.asp?wuid=" & Uid
pageno=15
%>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="tablecolor">
<tr>
<td align="center" class="banner">交易记录管理</td>
<td width='89' align=center class=banner><a href=addsv.asp>添加数据</a></td>
</tr>
</table>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="tablecolor">
<form name="form1" method="post" action="p_search.asp">
<tr>
<td align="center" class="banner">快速搜索:
<input name="key" type="text" id="key" size="12" style="BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #f7f7f7">
<select name="select">
<option value="1" selected>客户ID</option>
<option value="2">交易日期</option>
</select>
<input type="submit" name="Submit" value="搜索" ></td>
</form>
</table>
<%
dim rs
set rs=server.CreateObject("adodb.recordset")
if request("select")=1 then
rs.open "select * from paylist where uid like '%"&request("key")&"%' order by id desc",conn,1,1
end if
if request("select")=2 then
rs.open "select * from paylist where idate like '%"&request("key")&"%' order by id desc",conn,1,1
end if
on error resume next '忽列错误
rscount=rs.recordcount
%>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="tablecolor">
<%
if rscount<1 then
%>
<tr>
<td height="25" colspan="9" align="center" class="tablebody">该栏目还没有数据</td>
</tr>
<%
else
%>
<tr>
<td width="5%" align="center" class="tablebody">ID</td>
<td width="12%" align="center" class="tablebody">客户ID</td>
<td align="center" class="tablebody">交易日期</td>
<td align="center" class="tablebody">交易金额</td>
<td align="center" class="tablebody">支付方式</td>
<td width="15%" align="center" class="tablebody">加入时间</td>
<td width="5%" align="center" class="tablebody">审核</td>
<td width="5%" align="center" class="tablebody">修改</td>
<td width="6%" align="center" class="tablebody">删除</td>
</tr>
<form name="form2" method="post" action="?action=edit" onSubmit="return checkf(form2)">
<%
call showsql(pageno)
rs.move(rsno)
for i=1 to loopno
%>
<tr>
<td align="center" class="tablebody"><%=rs("id")%></td>
<td align="center" class="tablebody"><a href="showuser.asp?uid=<%=rs("uid")%>"><%=rs("uid")%></a></td>
<td align="center" class="tablebody"><%=rs("Idate")%></td>
<td align="center" class="tablebody">¥<%=rs("Buyrice")%></td>
<td align="center" class="tablebody"><%=rs("payment")%></td>
<td align="center" class="tablebody"><%=rs("RegTime")%></td>
<td align="center" class="tablebody"><%if rs("isagree")=1 then response.Write("<font color=red>荐</a>") else response.Write("否") end if%></td>
<td align="center" class="tablebody"><a href="addpl.asp?id=<%=rs("id")%>">修改</a></td>
<td align="center" class="tablebody"><input name="id" type="checkbox" id="id" value="<%=rs("id")%>">
</tr>
<%
rs.movenext
next
%>
<tr>
<td height="25" colspan="9" align="right" class="tablebody"><INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>
全选
<input name="Submit" type="submit" id="Submit" value="隐藏">
<input name="Submit" type="submit" id="Submit" value="显示">
<input name="Submit" type="submit" id="Submit" value="取消推荐">
<input name="Submit" type="submit" id="Submit" value="推荐">
<input name="Submit" type="submit" id="Submit" value="删除" onclick="SetSubmitImgId('realdel');">
</td>
</tr>
</form>
<tr>
<td colspan="9" align="right" class="tablebody"><%call showpage(strFileName,rscount,pageno,false,true,"条记录")%></td>
</tr>
<% end if%>
</table>
<%
end sub
sub edit()
dim id,sql
if request("id")="" then
response.Write("<script>alert('参数错误!');history.back()</script>")
response.End()
end if
select case request("submit")
case "隐藏"
sql="update cust set elite=0 where id="
case "显示"
sql="update cust set elite=1 where id="
case "取消推荐"
sql="update cust set isagree=0 where id="
case "推荐"
sql="update cust set isagree=1 where id="
case "删除"
sql="delete from cust where id="
case else
response.Write("<script>alert('参数错误!');history.back()</script>")
response.End()
end select
for each id in request("id")
conn.execute(sql&id)
next
dim ip
ip=Request.ServerVariables("HTTP_REFERER")
response.Write("<script>alert('操作成功!');location='"&ip&"'</script>")
response.End()
end sub
%>
<%CloseConn%>
<!--#include file="end.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -