<!--#include file="admin.asp"-->
<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<!--#include file="conn.asp"-->
<%Call head()
Call saycardd(dybt)
'检查有几条新留言


%>
<!--#include file="../sy1.asp"--><%
If saytk>1 Then Response.write "<div class=""content"">"
response.write "<img src='/img/logo/nongchang.gif' alt=''/><br/>"
If saytk>1 Then Response.write "</div>"

If saytk>1 Then Response.write "<div class=""content"">"
Response.write ubb3(dyhyy)&"<br/>"
If saytk>1 Then 
Response.write "</div>"
Else
Response.write"------------------<br/>"
End if
userid=request("userid")
If userid="" Then userid=myid


If userid=myid Then
If saytk>1 Then Response.write "<div class=""path red"">"
Response.write ssqa&"我的农场"&chr(13)
Response.write "<a href='friend.asp?sid="&sid&"&amp;saytk="&saytk&"'>好友农场</a><br/>"
If saytk>1 Then Response.write "</div><div class=""nav"">"
Response.write "<a href='cangku.asp?sid="&sid&"&amp;saytk="&saytk&"'>我的仓库</a>|"
Response.write "<a href='shangdian.asp?sid="&sid&"&amp;saytk="&saytk&"'>商店</a>"
 dim nongnum1
    nongnum1=connnong.execute("Select count(ID) from [farm] where usid="&myid&"")(0)
	If nongnum1<6 Then 
response.write "|<a href='kaiken.asp?sid="&sid&"&amp;saytk="&saytk&"'>开垦</a>"
End if
Else
If saytk>1 Then Response.write "<div class=""nav"">"
Response.write unames(userid)
Response.write "(ID:"&userid&")的农场"
End if
Response.write "<br/>"
set rs=server.createobject("adodb.recordset")
rs.open"select * from farm where usid="&userid&" order by id desc",connnong,1,1
If Not rs.eof	Then

response.write ""&getcent&":"
response.write userjb(userid)&""&chr(13)
response.write "经验:"&rs("jinyan")&"<br/>"

If saytk>1 Then Response.write "</div>"
	Dim PageSize,i
	If saytk=1 then
	PageSize=10	
	Else
	PageSize=30
	End if
	Dim Count,page,pagecount,gopage			
	gopage="index.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;"
	Count=rs.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
	rs.move(pagesize*(page-1))
dim ggss
	For i=1 To PageSize     						
	If rs.eof Then Exit For	

If saytk=100 Then
  If Is_odd(i+(page-1)*PageSize)=False Then 
  Response.write "<div class=""ade"">"
  Else
  Response.write "<div class=""add"">"
  End If
End if
response.write ""&i+(page-1)*PageSize&"."
if rs("chenzhang")=0 then
response.write "空地"&chr(13)
If userid=myid Then response.write "<a href='beibao.asp?id="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>种植</a><br/>"
else
response.write nonglx(rs("intname"))

response.write ":"&name&chr(13)
response.write ubb(rs("ji"))
response.write "/"&ubb(rs("ji1"))&"季<br/>"
set rs3=server.createobject("adodb.recordset")
rs3.open"select times from sd where id="&rs("intname"),connnong,1,1
nongztimes=rs3("times")
rs3.close
set rs3=Nothing
nongatimeas=DateAdd("h",nongztimes,rs("times"))
if nongatimeas>now() then
response.write "将于"

response.write date_nongtalk(nongatimeas)


response.write "后成熟<br/>"
rs3.close
Set rs3=nothing
else
response.write "产"&ubb(rs("chanl"))&""
response.write "剩"
response.write rs("chanl")-rs("chanll")&chr(13)
If userid=myid Then 
response.write "<a href='zhai.asp?id="&rs("id")&"&amp;ids="&rs("intname")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>摘取</a>"
Else
response.write "<a href='tou.asp?userid="&rs("usid")&"&amp;id="&rs("id")&"&amp;ids="&rs("intname")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>偷摘</a>"
End If
response.write "<br/>"
end if
end If

If saytk=100 Then Response.write "</div>"

rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳转</a><br/>"
Else
response.write "您还没有开通农场服务,"
response.write "<a href='kaiken.asp?sid="&sid&"&amp;saytk="&saytk&"'>开通</a><br/>"
end if
rs1.close
set rs1=nothing
rs.close
set rs=nothing
Response.write "==农场动态==<br/>"
Call nongchangdt(5)
Response.write "<a href='nongdt.asp?sid="&sid&"&amp;saytk="&saytk&"'>更多农场动态</a>"&chr(13)
connnong.Execute("delete from nongdt where DATEDIFF('s', shijian, now()) > 60*300")

connnong.close
set connnong=nothing
conn.close
set conn=Nothing
If userid<>myid Then
Response.write "<br/><a href='friend.asp?sid="&sid&"&amp;saytk="&saytk&"'>返回好友农场</a>"&chr(13)
Response.write "<br/><a href='index.asp?sid="&sid&"&amp;saytk="&saytk&"'>返回我的农场</a><br/>"&chr(13)
Else
if keys=1 or myid=1 Or keys=2 then
Response.write "<br/><a href='dypz.asp?sid="&sid&"&amp;saytk="&saytk&"'>[管理员配置]</a><br/>"
end if
End if
%>
<!--#include file="../fanhui.asp"-->
<%Call head1()%>