<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<!--#include file="conn.asp"-->
<%'=============================
call head()
Call cardt("英雄美女色狼","index.asp?sid="&sid&"&amp;num="&int(timer())&"&amp;saytk="&saytk&"","600")

'检查有几条新留言
dim newguest
newguest = 0
IF myid > 0 THEN
  newguest = ForNewGuest(myid)
END IF
if myid<>0 then
if newguest > 0 then
Response.write "<a href='../msgview.asp?sid="&sid&"&amp;saytk="&saytk&"'>您有"&newguest&"条新消息</a><br/>"& chr(13)
end if
response.write"欢迎<a href='../show.asp?sid="&sid&"&amp;saytk="&saytk&"'>"&myni&"</a>,您目前共有"&myjb&getcent&"<br/>"&chr(13)
else
Response.write "欢迎您:<a href='../show.asp?sid="&sid&"&amp;saytk="&saytk&"'>登陆/注册</a><br/>"& chr(13)
end if

response.write"<a href=""yms2.asp?sid="&sid&"&amp;saytk="&saytk&""">公开挑战</a>|"
response.write"<a href=""yms.asp?sid="&sid&"&amp;saytk="&saytk&""">单人挑战</a><br/>"
response.write"<a href=""mypklist.asp?sid="&sid&"&amp;saytk="&saytk&""">挑战记录</a>|"
response.write"<a href=""mypklist2.asp?sid="&sid&"&amp;saytk="&saytk&""">应战记录</a><br/>"
response.write"【最新挑战】<a href=""index.asp?sid="&sid&"&amp;num="&int(timer())&"&amp;saytk="&saytk&""">刷新</a><br/>"

  dim objgbrs1,ssql1
   set objgbrs1=Server.CreateObject("ADODB.Recordset")
  ssql1="select about,useid from YD_jd where [reuseid]=" & myid & " and op=0 order by id desc"
  objgbrs1.open ssql1,ydzqconn,1,1

    if objgbrs1.eof then
    
	elseif objgbrs1("about")="J" then
response.write"<img src='img/new.gif' alt='.'/><a href=""jd_list.asp?sid="&sid&"&amp;saytk="&saytk&""">ID("&objgbrs1("useid")&")向您发起挑战</a><br/>"
	elseif objgbrs1("about")="D" then
response.write"<img src='img/new.gif' alt='.'/><a href=""dx_list.asp?sid="&sid&"&amp;saytk="&saytk&""">ID("&objgbrs1("useid")&")向您发起挑战</a><br/>"
end if

dim rs1
 set rs1=Server.CreateObject("ADODB.Recordset")
  rs1.open"select about,useid,num,id from YD_jd where op=0 and reuseid=0 and active=1 order by id desc",ydzqconn,1,1
if objgbrs1.eof and rs1.eof then       
response.write"请耐心等待,友友们正在创建挑战中...<br/>"
end if 
 If not rs1.eof Then 
 Dim PageSize,i
	PageSize=10
	Dim Count,page,pagecount,gopage			
	gopage="index.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;"
	Count=rs1.recordcount	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount
	rs1.move(pagesize*(page-1))
	For i=1 To PageSize     						
	If rs1.eof Then Exit For	
	if rs1("about")="J" then
response.write"<a href=""jd_list2.asp?ids="&rs1("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">挑战</a>擂金"&rs1("num")&getcent&"(等待中)<br/>"
	elseif rs1("about")="D" then
response.write"<a href=""dx_list2.asp?ids="&rs1("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">挑战</a>擂金"&rs1("num")&getcent&"(等待中)<br/>"
                 end if
rs1.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下一页</a>"&chr(13)
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上一页</a>"&chr(13)
if pagecount>1 then response.write"<br/>"
	end if
objgbrs1.close
set objgbrs1=nothing
rs1.close
set rs1=nothing
response.write"【玩家排行】<br/>"
response.write"<a href=""pk_top.asp?sid="&sid&"&amp;saytk="&saytk&""">赢家排行</a>|"
response.write"<a href=""pk_cent.asp?sid="&sid&"&amp;saytk="&saytk&""">赚币排行</a>"
response.write"<br/><a href=""pklist.asp?sid="&sid&"&amp;saytk="&saytk&""">挑战清单</a>|"
response.write"<a href=""pk_h.asp?sid="&sid&"&amp;saytk="&saytk&""">游戏规则</a>"
ydzqconn.close
set ydzqconn=nothing
conn.close
set conn=nothing
Response.write "<br/><a href=""/bbs/game/?sid="&sid&"&amp;saytk="&saytk&""">返回游戏中心</a><br/><a href=""../show.asp?sid="&sid&"&amp;saytk="&saytk&""">地盘</a>&gt;&gt;<a href=""/bbs/index.asp?sid="&sid&"&amp;saytk="&saytk&""">社区首页</a><br/>(c) "&Request.ServerVariables("SERVER_NAME")&"["&String(2-Len(hour(now)),"0") & hour(now) &":"&String(2-len(minute(now)),"0") & minute(now)&"]"
call headsay()
%>