okcar.asp
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:6k
源码类别:

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="articleconn.asp"-->
  2. <!--#include file="home1.asp"-->
  3. <!--#include file="security.asp"-->
  4. <%if session("flag")>3 then
  5.     response.write "<br><p align=center>您的操作权限不够!</p>"
  6.     response.end
  7. end if
  8. %>
  9. <html>
  10. <head>
  11. <title>充值记录</title>
  12. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  13. <link rel="stylesheet" href="inc/Admin_STYLE.CSS" type="text/css">
  14. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  15. <style type="text/css">
  16. <!--
  17. .样式3 {color: #FFFFFF; font-weight: bold; }
  18. -->
  19. </style>
  20. <BODY leftMargin="0 "topMargin="0" marginwidth="0" marginheight="0" >
  21. <%
  22.    MaxPerPage=20
  23.    dim totalPut   
  24.    dim CurrentPage
  25.    dim TotalPages
  26.    dim i,j
  27.    dim typename
  28.    
  29.    typename=""
  30.    if not isempty(request("page")) then
  31.       currentPage=cint(request("page"))
  32.    else
  33.       currentPage=1
  34.    end if
  35.    dim sql
  36.    dim rs
  37.    dim rstype
  38.    dim typesql
  39.    dim typeid,typename1
  40.    if not isEmpty(Replace(request("typeid"), "'", "''")) then
  41. typeid=Replace(request("typeid"), "'", "''")
  42.    else
  43. typeid=0
  44.    end if
  45. %>
  46. <!--#include file="top1.asp"-->
  47. <div align="center"><%
  48.  sql="select * from car where ok=1 order by id desc"
  49.  Set rs= Server.CreateObject("ADODB.Recordset")
  50.  rs.open sql,conn,1,1
  51.   if rs.eof and rs.bof then
  52.        response.write "<p align='center'> 还 没 有 任 何 充 值 卡</p>"
  53.    else
  54.   totalPut=rs.recordcount
  55.       totalPut=rs.recordcount
  56.       if currentpage<1 then
  57.           currentpage=1
  58.       end if
  59.       if (currentpage-1)*MaxPerPage>totalput then
  60.    if (totalPut mod MaxPerPage)=0 then
  61.      currentpage= totalPut  MaxPerPage
  62.    else
  63.       currentpage= totalPut  MaxPerPage + 1
  64.    end if
  65.       end if
  66.        if currentPage=1 then
  67.            showpage totalput,MaxPerPage,"okcar.asp"
  68.             showContent
  69.             showpage totalput,MaxPerPage,"okcar.asp"
  70.        else
  71.           if (currentPage-1)*MaxPerPage<totalPut then
  72.             rs.move  (currentPage-1)*MaxPerPage
  73.             dim bookmark
  74.             bookmark=rs.bookmark
  75.            showpage totalput,MaxPerPage,"okcar.asp"
  76.             showContent
  77.              showpage totalput,MaxPerPage,"okcar.asp"
  78.         else
  79.         currentPage=1
  80.            showpage totalput,MaxPerPage,"okcar.asp"
  81.            showContent
  82.            showpage totalput,MaxPerPage,"okcar.asp"
  83.       end if
  84.    end if
  85.    end if
  86.    sub showContent
  87.        dim i
  88.    i=0
  89.   %>
  90. </div>
  91. <table border="0" width="100%" cellspacing="1" cellpadding="0" class="border" align="center">
  92.   <tr> 
  93.     <td height="23" colspan="11" class="title"> <div align="center"> <strong><font color="#FF0000">包月冲值记录</font></strong></div></td>
  94.   </tr>
  95.   <tr bgcolor="#429AEF"> 
  96.     <td width="16%" height="18" align="center" ><span class="样式3">卡 
  97.       号 </span></td>
  98.     <td width="17%" align="center" ><span class="样式3">卡密码</span></td>
  99.     <td width="14%" align="center" ><span class="样式3">可充天数</span></td>
  100.     <td width="12%" align="center" ><span class="样式3">面 值</span></td>
  101.     <td width="14%" align="center" ><span class="样式3">会员帐号</span></td>
  102.     <td width="16%" align="center" ><span class="样式3"><b>电影卡类型</b></span></td>
  103.     <td width="11%" align="center" ><span class="样式3"><b>删除</b></span></td>
  104.   </tr>
  105.       <%do while not rs.eof%>
  106.   <tr> 
  107.     <td align="center" class="tdbg"><%=rs("carid")%></td>
  108.     <td align="center" class="tdbg"><strong><%=rs("carpws")%></strong></td>
  109.     <td align="center" class="tdbg"><%=rs("day")%> 天</td>
  110.     <td align="center" class="tdbg"><%=rs("paymoney")%> 元</td>
  111.     <td align="center" class="tdbg"><a href="useredit.asp?userid=<%=rs("userid")%>" ><%=rs("userid")%></a></td>
  112.     <td align="center" class="tdbg"> <%if rs("oklook")=1 then%> 普通会员卡 <%elseif rs("oklook")=2 then%> 白银会员卡 <%elseif rs("oklook")=3 then%> 黄金会员卡 <%end if%></td>
  113.     <td align="center" class="tdbg"><a href="delcar.asp?id=<%=rs("id")%>"><font color="#000000">删除</font></a></td>
  114.   </tr>
  115.        <% i=i+1
  116.       if i>=MaxPerPage then exit do
  117.       rs.movenext
  118.    loop
  119.   %>
  120.   <tr> 
  121.     <td colspan="7" align="center" bgcolor="#CCCCCC"> </td>
  122.   </tr>
  123. </table>
  124. <div align="center"><%
  125.    end sub 
  126. function showpage(totalnumber,maxperpage,filename)
  127.   dim n
  128.   if totalnumber mod maxperpage=0 then
  129.      n= totalnumber  maxperpage
  130.   else
  131.      n= totalnumber  maxperpage+1
  132.   end if
  133.   response.write "<p align=""center""><form method=Post action="&filename&"?typeid="&typeid&">"
  134.     if CurrentPage<2 then
  135.     response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
  136.   else
  137.     response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a>&nbsp;"
  138.     response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a>&nbsp;"
  139.   end if
  140.   if n-currentpage<1 then
  141.     response.write "<font color='#000080'>下一页 尾页</font>"
  142.   else
  143.     response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
  144.     response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
  145.   end if
  146.    response.write "<font color='#000080'>&nbsp;页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
  147.     response.write "<font color='#000080'>&nbsp;共<b>"&totalnumber&"</b>张 <b>"&maxperpage&"</b>张/页</font> "
  148.    response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="&currentpage&">"
  149.    response.write " <input class=buttonface type='submit'  value='Goto'  name='cndok'></span></p></form></p>"
  150.        
  151. end function
  152.    rs.close
  153.    set rs=nothing  
  154.    conn.close
  155.    set conn=nothing
  156.   %>
  157. </div>
  158. </body>
  159. </html>