<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="check.asp"-->
<%Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
Response.Expires=0
search=cstr(server.HTMLEncode(Request.QueryString("search")))
%>
<html><title>世纪江湖卡片管理</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK href="style.css" rel=stylesheet></head>
<script language=JavaScript>
function del(url)
{if(confirm("此操作将要删除此卡片，您确定删除此项目吗？"))parent.mainFrame.location.href=url;}
</script>
<%
If Request.QueryString("CurPage") = "" or Request.QueryString("CurPage") = 0 then
CurPage = 1
Else
CurPage = CINT(Request.QueryString("CurPage"))
End If
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("sjjh_usermdb")
if search<>"" then
	rs.Open "select * from sjjh_card where (a like '%" & search & "%'or k like '%" & search & "%') Order by id desc", conn, 1,1
else
	rs.Open "Select * from sjjh_card Order by id desc", conn, 1,1
end if
if rs.eof and rs.bof then%>
<body topmargin="0">
<div align="center">对不起，暂时没有发现任何记录！！ <br>[ <a href=# onclick=history.go(-1)>返回上一级</a> ] 
  <%else
RS.PageSize=20'设置每页记录数,可修改
Dim TotalPages
TotalPages = RS.PageCount
If CurPage>RS.Pagecount Then
CurPage=RS.Pagecount
end if
RS.AbsolutePage=CurPage
rs.CacheSize = RS.PageSize'设置最大记录数
Dim Totalcount
Totalcount =INT(RS.recordcount)
StartPageNum=1
do while StartPageNum+10<=CurPage
StartPageNum=StartPageNum+10
Loop
EndPageNum=StartPageNum+9
If EndPageNum>RS.Pagecount then EndPageNum=RS.Pagecount%>
  <br>
</div>
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#00215a" align="center">
  <tr> 
    <td colspan="10" align=center bgcolor="#d7ebff">世纪江湖卡片管理<br>
      <strong>如果你不明白这里的设置您最好不要改动否则卡片将不能使用不能恢复!</strong><br>
      <font color="#0000FF">e对自己操作还是对对方操作 f自己操作的表 g自己不能为的表 h对方操作的表 i对方不能为的表 j是否有冲突的卡</font></td>
  </tr>
  <tr> 
    <td align=center >卡 片 名</td>
    <td align=center >允许</td>
    <td align=center >e</td>
    <td align=center >f</td>
    <td align=center >g</td>
    <td align=center >h</td>
    <td align=center >i</td>
    <td align=center >j</td>
    <td align=center >消息</td>
    <td align=center ><a href="addcard.asp"><strong><font color="#0000FF">添加新卡片</font></strong></a></td>
  </tr>
  <%I=0
p=RS.PageSize*(Curpage-1)
do while (Not RS.Eof) and (I<RS.PageSize)
p=p+1%>
  <tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';"> 
    <td align=center><%=rs("a")%></td>
    <td align=center><%if rs("b")=1 then 
Response.Write"使用"
else
Response.Write"<font color=red>禁卡</font>"
end if%></td>
    <td align=center> 
      <%if rs("e")=1 then 
Response.Write"自己"
else
Response.Write"<font color=red>对方</font>"
end if%>
    </td>
    <td align=center> 
      <%if rs("f")=1 then 
Response.Write"存在"
else
Response.Write"<font color=red>没有</font>"
end if%>
    </td>
    <td align=center> 
      <%if rs("g")=1 then 
Response.Write"存在"
else
Response.Write"<font color=red>没有</font>"
end if%>
    </td>
    <td align=center> 
      <%if rs("h")=1 then 
Response.Write"存在"
else
Response.Write"<font color=red>没有</font>"
end if%>
    </td>
    <td align=center> 
      <%if rs("i")=1 then 
Response.Write"存在"
else
Response.Write"<font color=red>没有</font>"
end if%>
    </td>
    <td align=center> 
      <%if rs("j")=1 then 
Response.Write"存在"
else
Response.Write"<font color=red>没有</font>"
end if%>
    </td>
    <td align=left> 
      <%if len(trim(rs("k")))>30 then 
Response.Write left(trim(rs("k")),30) &"..."
else
Response.Write trim(rs("k"))
end if%>
    </td>
    <td align=center><a href="cardgl.asp?name=<%=trim(rs("a"))%>">管理</a> | <a href="modicard.asp?id=<%=rs("id")%>">修改</a> 
      | <a href=Javascript:del("jhgl.asp?act=delcard&id=<%=rs("id")%>");>删除</a></td>
  </tr>
  <%I=I+1
RS.MoveNext
Loop%>
  <tr> 
    <td height="24" colspan=12 align=middle bordercolorlight="#00215a" bgcolor="#d7ebff"> 
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr> 
          <form method="GET" action="cardlist.asp">
            <td width="50%"> 　关键字： 
              <input type="text" name="search" size=15 class="input1" onfocus=this.select() onmouseover=this.focus()> 
              <input name="B1" type="submit" value="搜索" class="input1"> </td>
          </form>
          <td width="50%" align="right"> 有<font color=blue><%=Totalcount%></font>条 
            共<%=int(Totalcount/25)+1%>页 [ 
            <% if StartPageNum>1 then %>
            <a href="cardlist.asp?CurPage=<%=StartPageNum-1%>"><<</a> 
            <%end if%>
            <% For I=StartPageNum to EndPageNum
if I<>CurPage then %>
            <a href="cardlist.asp?CurPage=<%=I%>"><%=I%></a> 
            <% else %>
            <b><font color=#ff0000><%=I%></font></b> 
            <% end if %>
            <% Next %>
            <% if EndPageNum<RS.Pagecount then %>
            <a href="cardlist.asp?CurPage=<%=EndPageNum+1%>">>></a> 
            <%end if%>
            ] </td>
        </tr>
      </table></td>
  </tr>
</table>
<p align=center>楚天江湖网</p></body></html>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>