<%@ 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")))
zhuname=Request.QueryString("zhuname")
%>
<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>
<script Language="JavaScript">
function addurl(name){
var urlsl=1;
urlsl=prompt("请输入要增加的URL数量(整数)：",urlsl);
var pattern = /^([0-9])+$/;
if(pattern.test(urlsl)!=true){alert("提示：URL地址数量请使用数字！");}
else{location.href="gvaddurl.asp?name="+ name +"&urlsl="+urlsl+"&url=gvgamelist.asp";}
}
</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")
rs.Open "Select * from sjjh_gvzhu where c=1 Order By a", conn, 1,1
zhustr="<A href='gvgamelist.asp?zhuname='>全部游戏</A> "
do while (Not RS.Eof)
zhustr=zhustr & "<A href='gvgamelist.asp?zhuname="& rs("b") &"'>"& rs("b") &"</A> "
RS.MoveNext
Loop
rs.close
if search<>"" then
	rs.Open "select * from sjjh_gvdata where  m=1 and a like '%" & search & "%' Order by g DESC", conn, 1,1
else
	if zhuname="" then
		rs.Open "Select * from sjjh_gvdata where m=1 Order by g DESC", conn, 1,1
	else
		rs.Open "Select * from sjjh_gvdata where m=1 and c='"& zhuname &"' Order by g DESC", conn, 1,1
	end if
end if%>
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#00215a" align="center">
  <tr> 
    <td colspan="4" align=center bgcolor="#d7ebff"><font color="#FF0000">世纪江湖<font size="+1"><strong>游戏</strong></font>下载列表</font></td>
  </tr>
  <tr> 
    <td colspan="4" align=center bgcolor="#d7ebff"><font color="#0000FF"><%=zhustr%></td>
  </tr>
<%
if rs.eof and rs.bof then%>
  <tr> 
    <td colspan="4" align=center bgcolor="#ffffff"><font color="#0000FF">对不起，暂时没有发现任何记录！！<br>[ <a href=# onclick=history.go(-1)>返回上一级</a> ] </td>
  </tr>
  <%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>
  <tr> 
    <td align=center >游戏名</td>
    <td align=center >游戏分类</td>
    <td align=center >添加时间</td>
    <td align=center >操作数据</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><a href="gvgamemodi.asp?name=<%=rs("a")%>"><%=rs("a")%></a></td>
    <td align=center><%=rs("c")%></td>
    <td align=center><%=rs("g")%></td>
    <td align=center valign="middle"><a href="gvgamemodi.asp?name=<%=rs("a")%>">修改</a> |
      <a href=Javascript:del("jhgl.asp?act=gvdel&name=<%=rs("a")%>&url=gvgamelist.asp");>删除</a> |
      <a href=Javascript:addurl("<%=rs("a")%>")>添加URL</a> | <a href="gvmodiurl.asp?name=<%=rs("a")%>&url=gvgamelist.asp">修改URL</a> |
      <a href="gvreplurl.asp?name=<%=rs("a")%>&url=gvgamelist.asp">替换URL</a> 
    </td>
  </tr>
  <%I=I+1
RS.MoveNext
Loop%>
  <tr> 
    <td colspan=6 align=middle bordercolorlight="#00215a" bgcolor="#d7ebff"> <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr> 
          <form method="GET" action="gvgamelist.asp?zhuname=<%=zhuname%>">
            <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="gvgamelist.asp?CurPage=<%=StartPageNum-1%>&zhuname=<%=zhuname%>"><<</a> 
            <%end if%>
            <% For I=StartPageNum to EndPageNum
if I<>CurPage then %>
            <a href="gvgamelist.asp?CurPage=<%=I%>&zhuname=<%=zhuname%>"><%=I%></a> 
            <% else %>
            <b><font color=#ff0000><%=I%></font></b> 
            <% end if %>
            <% Next %>
            <% if EndPageNum<RS.Pagecount then %>
            <a href="gvgamelist.asp?CurPage=<%=EndPageNum+1%>&zhuname=<%=zhuname%>">>></a> 
            <%end if%>
            ] </td>
        </tr>
      </table></td>
  </tr>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</table>
<p align=center>楚天江湖网</p></body></html>