<!--#include file="conn.asp"-->
<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%
call head()
dim TP,Action,usid
Action=Request.QueryString("Action")
usid=usb(request("usid"))
tp=usb(request("tp"))

if tp<>1 then
if usid="" then
Call Error("ID无效！")
end if
if ""&userjb(usid)&""="" then
Call Error("还没开通农场服务！")
end if
else

Call saycardd("修改农场")
response.write "修改"
response.write unames(""&usid&"")
response.write "ID:"&usid&"的农场<br/>"
response.write "<a href=""beibao.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;usid="&usid&"&amp;tp=1"">查看背包</a>|"
response.write "<a href=""cangku.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;usid="&usid&"&amp;tp=1"">查看仓库</a><br/>"
set rs=server.createobject("adodb.recordset")
rs.open"select * from farm where usid="&usid&" order by id desc",connnong,1,1
If Not rs.eof	Then
response.write ""&getcent&":"
response.write userjb(usid)&""&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="?sid="&sid&"&amp;saytk="&saytk&"&amp;usid="&usid&"&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)
response.write "<a href='sckk.asp?id="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;tp=1'>删</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)
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 "该用户还没开通农场服务,"

end if
rs1.close
set rs1=nothing
rs.close
set rs=nothing



connnong.close
set connnong=nothing
conn.close
set conn=Nothing
end if
Response.Write "<a href=""nclb.asp?sid="&sid&"&amp;saytk="&saytk&""">返回农场列表</a>"
%>
<!--#include file="fanf.asp"-->
<%call head1()%>