<!-- #include file="../Inc.asp" -->
<!-- #include file="../ydzq.asp" -->
<!-- #include file="conn.asp" -->
<%
call Head()
dim id,page,ppage
id=usb(request.QueryString("id"))
if id="" or IsNumeric(id)=False then
  Call Error("出错啦","日志ID无效！")
  end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from [zonerj] where rc=0 and uid="&uid&" and [ID]=" & ID,conn,1,1
if rs.eof then 
  Call Error("出错啦","该日志不存在或已被删除！")
  end if
call saycarda(""&username&"的日志")
page=request.QueryString("page")
if page="" or IsNumeric(page)=False then page=1
ppage=request.QueryString("ppage")
if ppage="" or IsNumeric(ppage)=False then ppage=1
if myid=clng(uid) then
response.write "<a href=""index_gl.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">个人中心</a>|"
end if
response.write "<a href=""index.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">主页</a>|"&_
               "<a href='blog.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>日志</a>|"&_
               "<a href='user_info.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>个人档</a><br/>"&_
               "【<a href=""blog.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">日志列表</a>】"
if myid=clng(uid) then
response.write "<a href=""blog_add.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">写日志</a>"
end if
response.write "<br/>"
response.write"《"&ubb(rs("tit"))&"》<br/>" 
response.write("[" & fordate(rs("tm")) & "]<br/>")
response.write"－－－－－<br/>"
Content=ubb(rs("txt"))
if request.querystring("w")<>1 then
dim pageWordNum,StartWord,Content,Length,PageAll,i,ii
pageWordNum=viewnum
StartWord = 1
Length=len(Content)
PageAll=(Length+PageWordNum-1)\PageWordNum

if PageAll>1 then
response.write "&nbsp;<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;page="&page&"&amp;w=1'>查看全部("&PageAll&")页</a><br/>"
end if
ii=clng(request("ii"))
i=clng(request("i"))
if ii<>0 then i=ii-1
if isnull(i) or i="" then i=0
	dim ccc,sss
	ccc=instr(content,"||")
	if ccc>0 then
	sss=split(content,"||")
	PageAll=ubound(sss)+1
		if i>PageAll-1 then i=PageAll-1
	content = sss(i)
	else
		if clng(i)>int(PageAll) then i=PageAll-1
	Content = mid(Content,StartWord+i*PageWordNum,PageWordNum)
	end if
	response.write ubb3(content)
if 0<=i<PageAll then
       Response.Write "<br/>"
end if
   if cint(i)<cint(PageAll)-1 then
       Response.Write "<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;i=" & i+1 & "&amp;page=" & page & "'>下页</a>"
   End if
   if cint(i)>0 then 
       Response.Write "&nbsp;" & "<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;i=" & i-1 & "&amp;page=" & page & "'>上页</a>"
if  i<pageall-1 then Response.Write "&nbsp;<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;i=999&amp;page=" & page & "'>尾页</a>"
   End if
if PageAll>1 then
response.write "&nbsp;<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;page="&page&"&amp;w=1'>全文</a>"&_
               "(" & i+1 & "/" & PageAll & ")"&_
               "<br/>跳到第<input name=""i"&tt&""" title=""页码"" type=""text"" format=""*N"" emptyok=""true"" size=""3"" value=""2"" maxlength=""3""/>页<anchor>[GO]"&_
               "<go href=""blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;page="&page&""" accept-charset='utf-8'>"&_
               "<postfield name=""ii"" value=""$(i"&tt&")""/>"&_
               "</go></anchor><br/>"
end if
else
response.write ubb3(content)
Length=len(content)
response.write "<br/><a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;'>[分页显示]</a><br/>"
end if 
if newdatainfo<>"" then
response.write "----------<br/>"&_
               "签名:"&ubb(newdatainfo)&"<br/>"
end if
'-----------会员操作权限
if rs("uid")=myid or admin=2 then
response.write"<a href=""editbbs.asp?id="&id&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;act=2"">编辑</a>"&_
              "|<a href='blogrj_del.asp?Action=ok&amp;id="&id&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>删除</a>"
end if
Response.write "<br/>"

set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open"select * from [zonerj] where rc=0 and uid="&uid&" and [ID]<"& ID &" order by [ID] desc",conn,1,1
if not rs1.eof then
response.write "<a href='blog_view.asp?id=" & rs1("ID") & "&amp;uid=" & uid & "&amp;sid="&sid&"&amp;saytk="&saytk&"'>下篇；"&ubb(rs1("tit"))&"</a><br/>"
end if
rs1.close
set rs1=nothing
set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open"select * from [zonerj] where rc=0 and uid="&uid&" and [ID]>"& ID &" order by [ID] desc",conn,1,1
if not rs1.eof then
response.write "<a href='blog_view.asp?id=" & rs1("ID") & "&amp;uid=" & uid & "&amp;sid="&sid&"&amp;saytk="&saytk&"'>上篇；"&ubb(rs1("tit"))&"</a>"
end if
rs1.close
set rs1=nothing
dim reCount
reCount=conn.execute("Select count(ID) from [zonerjpl] where zonezid="&id&"")(0)	
response.write"<br/>【日志评论("&reCount&")】"
set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open"select * from zonerjpl where zonezid="&id&" order by id desc",conn,1,1
if rs1.eof then
   Response.write "<br/>"
Else
response.write("<br/>")
dim k
k=rs1.recordcount
i=1
do while ((not rs1.EOF) and i <=cint(review))
response.write""&k&"楼."&_
              "<a href=""index.asp?uid="&rs1("userid")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(rs1("zonerjplName"))&"</a>:"&_
              rs1("zonerjpli")&"<br/>("&fordate(rs1("tm"))&")"
if rs("uid")=myid or admin=2 then
response.write"<a href='blogpl_del.asp?Action=ok&amp;id="&rs1("id")&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>删除</a>"
end if
response.write"<br/>"
rs1.Movenext
k=k-1
i=i+1
loop
end if
rs1.close
set rs1=nothing
call zonepost("blog_addcl.asp?id="&id&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"")
response.write"<input type=""text"" name=""pl"" title=""输入内容"" value="""" maxlength=""300""/><br/>"
if saytk<>1 then
Response.Write "<input type=""submit"" value=""发表评论""/></form><br/>"
else
response.write "<anchor title=""确定"">发表评论"&_
               "<go method=""post"" href=""blog_addcl.asp?id="&id&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&_
               "<postfield name=""pl"" value=""$(pl)""/>"&_
               "</go></anchor><br/>"
end if
rs.close
set rs=nothing
call zoneLast()
call headsay()
'===================================
Function zoneblog()
call zoneHead()
dim id,page,ppage
id=usb(request.QueryString("id"))
if id="" or IsNumeric(id)=False then
  Call Error("出错啦","日志ID无效！")
  end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from [zonerj] where rc=0 and uid="&uid&" and [ID]=" & ID,conn,1,1
if rs.eof then 
  Call Error("出错啦","该日志不存在或已被删除！")
  end if
call zonecard(""&username&"的日志","left")
page=request.QueryString("page")
if page="" or IsNumeric(page)=False then page=1
ppage=request.QueryString("ppage")
if ppage="" or IsNumeric(ppage)=False then ppage=1
if myid=clng(uid) then
response.write "<a href=""index_gl.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">个人中心</a>|"
end if
response.write "<a href=""index.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">主页</a>|"&_
               "<a href='blog.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>日志</a>|"&_
               "<a href='user_info.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>个人档</a><br/>"&_
               "【<a href=""blog.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">日志列表</a>】"
if myid=clng(uid) then
response.write "<a href=""blog_add.asp?uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">写日志</a>"
end if
response.write "<br/>"
response.write"《"&ubb(rs("tit"))&"》<br/>" 
response.write("[" & fordate(rs("tm")) & "]<br/>")
response.write"－－－－－<br/>"
Content=ubb(rs("txt"))
if request.querystring("w")<>1 then
dim pageWordNum,StartWord,Content,Length,PageAll,i,ii
pageWordNum=viewnum
StartWord = 1
Length=len(Content)
PageAll=(Length+PageWordNum-1)\PageWordNum

if PageAll>1 then
response.write "&nbsp;<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;page="&page&"&amp;w=1'>查看全部("&PageAll&")页</a><br/>"
end if
ii=clng(request("ii"))
i=clng(request("i"))
if ii<>0 then i=ii-1
if isnull(i) or i="" then i=0
	dim ccc,sss
	ccc=instr(content,"||")
	if ccc>0 then
	sss=split(content,"||")
	PageAll=ubound(sss)+1
		if i>PageAll-1 then i=PageAll-1
	content = sss(i)
	else
		if clng(i)>int(PageAll) then i=PageAll-1
	Content = mid(Content,StartWord+i*PageWordNum,PageWordNum)
	end if
	response.write ubb3(content)
if 0<=i<PageAll then
       Response.Write "<br/>"
end if
   if cint(i)<cint(PageAll)-1 then
       Response.Write "<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;i=" & i+1 & "&amp;page=" & page & "'>下页</a>"
   End if
   if cint(i)>0 then 
       Response.Write "&nbsp;" & "<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;i=" & i-1 & "&amp;page=" & page & "'>上页</a>"
if  i<pageall-1 then Response.Write "&nbsp;<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;i=999&amp;page=" & page & "'>尾页</a>"
   End if
if PageAll>1 then
response.write "&nbsp;<a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;page="&page&"&amp;w=1'>全文</a>"&_
               "(" & i+1 & "/" & PageAll & ")"&_
               "<br/>跳到第<input name=""i"&tt&""" title=""页码"" type=""text"" format=""*N"" emptyok=""true"" size=""3"" value=""2"" maxlength=""3""/>页<anchor>[GO]"&_
               "<go href=""blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;page="&page&""" accept-charset='utf-8'>"&_
               "<postfield name=""ii"" value=""$(i"&tt&")""/>"&_
               "</go></anchor><br/>"
end if
else
response.write ubb3(content)
Length=len(content)
response.write "<br/><a href='blog_view.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;id="&id&"&amp;uid="&uid&"&amp;'>[分页显示]</a><br/>"
end if 
if newdatainfo<>"" then
response.write "----------<br/>"&_
               "签名:"&ubb(newdatainfo)&"<br/>"
end if
'-----------会员操作权限
if rs("uid")=myid or admin=2 then
response.write"<a href=""editbbs.asp?id="&id&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;act=1"">续写</a>|"&_
              "<a href=""editbbs.asp?id="&id&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;act=2"">编辑</a>"&_
              "|<a href='blogrj_del.asp?Action=ok&amp;id="&id&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>删除</a>"
end if
Response.write "<br/>"

set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open"select * from [zonerj] where rc=0 and uid="&uid&" and [ID]<"& ID &" order by [ID] desc",conn,1,1
if not rs1.eof then
response.write "<a href='blog_view.asp?id=" & rs1("ID") & "&amp;uid=" & uid & "&amp;sid="&sid&"&amp;saytk="&saytk&"'>下篇；"&ubb(rs1("tit"))&"</a><br/>"
end if
rs1.close
set rs1=nothing
set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open"select * from [zonerj] where rc=0 and uid="&uid&" and [ID]>"& ID &" order by [ID] desc",conn,1,1
if not rs1.eof then
response.write "<a href='blog_view.asp?id=" & rs1("ID") & "&amp;uid=" & uid & "&amp;sid="&sid&"&amp;saytk="&saytk&"'>上篇；"&ubb(rs1("tit"))&"</a>"
end if
rs1.close
set rs1=nothing
dim reCount
reCount=conn.execute("Select count(ID) from [zonerjpl] where zonezid="&id&"")(0)	
response.write"<br/>【日志评论("&reCount&")】"
set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open"select * from zonerjpl where zonezid="&id&" order by id desc",conn,1,1
if rs1.eof then
   Response.write "<br/>"
Else
response.write("<br/>")
dim k
k=rs1.recordcount
i=1
do while ((not rs1.EOF) and i <=cint(review))
response.write""&k&"楼."&_
              "<a href=""index.asp?uid="&rs1("userid")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(rs1("zonerjplName"))&"</a>:"&_
              rs1("zonerjpli")&"<br/>("&fordate(rs1("tm"))&")"
if rs("uid")=myid or admin=2 then
response.write"<a href='blogpl_del.asp?Action=ok&amp;id="&rs1("id")&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>删除</a>"
end if
response.write"<br/>"
rs1.Movenext
k=k-1
i=i+1
loop
end if
rs1.close
set rs1=Nothing
if saytk<>1 then
call zonepost("blog_addcl.asp?id="&id&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"")
End if

if saytk=1 then
response.write"<input type=""text"" name=""pl"" title=""输入内容"" value="""" maxlength=""300""/><br/>"
response.write "<anchor title=""确定"">发表评论<go method=""post"" href=""blog_addcl.asp?id="&id&"&amp;uid="&uid&"&amp;sid="&sid&"&amp;saytk="&saytk&"""><postfield name=""pl"" value=""$(pl)""/></go></anchor><br/>"
Else
response.write"<input type=""text"" name=""pl"" title=""输入内容"" value="""" maxlength=""300""/><br/>"
Response.Write "<input type='submit' value='发表评论'/></form><br/>"
end if
rs.close
set rs=nothing
call zoneLast()
call head1()
End Function
%>