case "del"
lpid=request.QueryString("lpid")
conn.execute("delete Jifen_record where id="&lpid&"")
response.write"<script>alert(""兑换礼品删除成功!"");location.href=""admin_lpRecorde.asp"";</script>"
end select
%>
<SCRIPT language=javascript>
<!--
<%
'生成分页HTML代码
'Unit为单位
function GetPageNumber(currentpage,totalrec,PerPage,URL,Unit)
dim p,ii,n
dim PageString
'URL = DealURL(URL)
if totalrec mod PerPage=0 then
n = totalrec \ PerPage
else
n = totalrec \ PerPage + 1
end if
PageString = "每页<strong>" & _
PerPage & "</strong>" & Unit & " 分页:"
if currentpage-1 mod 10=0 then
p=(currentpage-1) \ 10
else
p=(currentpage-1) \ 10
end if
if currentPage=1 then
PageString = PageString & "<font face=webdings color=red>9</font> "
else
PageString = PageString & "<a href=" & URL & "page=1 title=首页><font face=webdings>9</font></a> "
end if
if p*10>0 then PageString = PageString & "<a href=" & URL & "page="&Cstr(p*10)&" title=上十页><font face=webdings>7</font></a> "
PageString = PageString & "<b>"
for ii=p*10+1 to P*10+10
if ii=currentPage then
PageString = PageString & "<font color=red>"+Cstr(ii)+"</font> "
else
PageString = PageString & "<a href=" & URL & "page="&Cstr(ii)&">"+Cstr(ii)+"</a> "
end if
if ii=n then exit for
'p=p+1
next
PageString = PageString & "</b>"
if ii<n then PageString = PageString & "<a href=" & URL & "page="&Cstr(ii)&" title=下十页><font face=webdings>8</font></a> "
if currentPage=n then
PageString = PageString & "<font face=webdings color=red>:</font> "
else
PageString = PageString & "<a href=" & URL & "page="&Cstr(n)&" title=尾页><font face=webdings>:</font></a> "
end if
GetPageNumber = PageString
end function
%>
//-->
</SCRIPT>
</td>
<td>提供商家</td>
<td>消耗积分</td>
<td>兑换用户</td>
<td width="120">操作</td>
</tr>
<%
set rs=conn.execute("select * from Jifen_lp order by addtime")
sql="select id,userId,userName,PayJifen,lp_id from Jifen_record order by PayTime desc"
PerPage=36
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
url="?action=1&"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,2
a=1
if not rs.eof then
pagestring=GetPageNumber(page,RS.RecordCount,PerPage,url,"个")
rs.Move (Page-1)*PerPage
do while not rs.eof and Page_Count<PerPage
Page_Count=Page_Count+1
set rs2=conn.execute("select lp_img,lp_name,lp_tgsj from Jifen_lp where id="&rs(4)&"")
if not rs2.eof then
lp_img=rs2(0)
lp_name=rs2(1)
lp_tgsj=rs2(2)
end if
rs2.close
set rs2=nothing
if trim(lp_tgsj)="" then
lp_tgsj=0
end if
set rs2=conn.execute("select sj_name,web_url from Jifen_sj where id="&lp_tgsj&"")
if not rs2.eof then
sj_name=rs2(0)
web_url=rs2(1)
end if
rs2.close
set rs2=nothing
%>
<tr>
<td height="25" align="left" >
<%=lp_name%>
</td>
<td><a href="<%=web_url%>" target="_blank"><%=sj_name%></a>
</td>
<td><%=rs("PayJifen")%></td>
<td><%=rs("userName")%></td>
<td width="120"><a href="?action=del&lpid=<%=rs("id")%>">删除</a></td>
</tr>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
<tr><td colspan="5"><%=pagestring%></td></tr>
</table>