PageRenderTime 80ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/Space.asp

http://king51digg.googlecode.com/
ASP | 110 lines | 101 code | 1 blank | 8 comment | 11 complexity | 47d936ad1fbe91e1a02d2a4e3ef1d148 MD5 | raw file
  1. <!--#include file="include/skin.asp"-->
  2. <!--#include file="include/Function.asp"-->
  3. <!--#include file="include/user_info.asp"-->
  4. <!--#include file="ubb/ubb.asp"-->
  5. <%
  6. dim user_id,tag_name,num,now_url,navstr,o,ostr,p_url
  7. user_id =trim(request.QueryString("user_id"))
  8. o=Trim(Request.QueryString("o"))
  9. if not int_true(user_id) then
  10. response.Write "??id??????":response.End()
  11. else
  12. user_id=int(user_id)
  13. if user_id=login_ID then call format_redirect("MySpace.asp")
  14. now_url="Space.asp?user_id="&user_id&"&"
  15. p_url="Space.asp?user_id="&user_id&"&"
  16. tag_name=Trim(Request.QueryString("tag_name"))
  17. if not var_null(tag_name) then '????
  18. tag_name=king51_dig.code_html(tag_name,1,20)
  19. p_url=now_url&"&tag_name="&tag_name&"&"
  20. tagstr = " AND ((article.tag) = '"&tag_name&"')"
  21. navstr="??:<a href=""list_tag.asp?tagname="&server.urlencode(tag_name)&""">"&tag_name&"</a>"
  22. ' else
  23. ' navstr="????"
  24. end if
  25. end if
  26. if not var_null(o) then
  27. p_url=now_url&"&o="&o
  28. end if
  29. call order_nav
  30. '????????
  31. dim User_CoolName,User_Face,User_Sex,User_Money, User_PostNum, User_counter,User_Demo, User_ad
  32. sql="select User_CoolName,User_Face,User_Sex,User_Money,User_PostNum,User_counter,User_Demo,User_ad from user_data where id="&user_id
  33. set rs=king51_dig.exec(sql,1)
  34. if not rs.eof then
  35. User_CoolName=rs(0):User_Face=rs(1):User_Sex=rs(2):User_Money=rs(3)
  36. User_PostNum=rs(4):User_counter=rs(5):User_demo=rs(6):User_ad=rs(7)
  37. end if
  38. rs.close : Set Rs = Nothing
  39. navstr="<a href=""Space.asp?user_id="&user_id&""">"&User_CoolName&"???</a>"&navstr
  40. tit=User_CoolName&"???-"&tag_name&"-????"
  41. call web_head()
  42. response.Write "<div id=""contain"">"&_
  43. vbcrlf&"<div class=""left"">"&left_nav&"<dl>"
  44. '??????
  45. dim tagstr,orderstr,view_url,art_data,art_dataNum
  46. dim id,c_id,topic,pic,word,tags,tim,counter,Fav_Num,hit_num,revert_num,c_name
  47. sql="SELECT article.id, article.c_id, article.topic, article.pic, article.word, article.tag, article.tim, article.counter, article.Fav_Num, article.hit_num, article.revert_num, class.c_name FROM class INNER JOIN article ON class.ID = article.c_id where article.user_id="&user_id&tagstr&" order by "&ostr&" desc"
  48. set rs=king51_dig.exec(sql,1)
  49. if not rs.eof then
  50. art_data=rs.getrows
  51. art_dataNum=ubound(art_data,2) '??????????
  52. rs.close : Set Rs = Nothing
  53. '//?asp???getrows?????????
  54. dim j,iStop,page
  55. page=Trim(Request.QueryString("page"))
  56. if Not int_true(page) then
  57. page=1 '??????
  58. j = 0
  59. iStop=web_dim(26)-1 '?????
  60. else
  61. if page<1 then : page=1
  62. j = (CInt(page)-1)*web_dim(26)
  63. iStop=(web_dim(26)*page)-1
  64. end if
  65. if iStop>art_dataNum then
  66. iStop=art_dataNum
  67. end if
  68. '//----------------------------
  69. For i = j to iStop
  70. id=art_data(0,i) : c_id=art_data(1,i) : topic=art_data(2,i):pic=art_data(3,i) : word=art_data(4,i):tags=art_data(5,i)
  71. tim=art_data(6,i) : counter=art_data(7,i) : Fav_Num=art_data(8,i): hit_num=art_data(9,i):revert_num=art_data(10,i)
  72. c_name=art_data(11,i)
  73. topic=king51_dig.code_html(topic,1,78)
  74. word=king51_dig.code_html(word,2,web_dim(27))
  75. view_url="view.asp?article_id="&id
  76. if not var_null(tags) then tags="<img src="""&web_dim(11)&"tag.png""> <a href='list_tag.asp?tagname="&server.urlencode(tags)&"'>"&tags&"</a>"
  77. response.Write vbcrlf&"<dd class=""info"" id=""Src_Info"&id&""">"&_
  78. vbcrlf&"<ul class=""left"">"&_
  79. vbcrlf&"<li class=""dig1"" id=""Src_HitNum"&id&""">"&hit_num&"</li>"&_
  80. vbcrlf&"<li class=""dig2"" id=""art_id"&id&""">"&kdig.Is_Hit(id)&"</li>"&_
  81. vbcrlf&"</ul>"&_
  82. vbcrlf&"<ul class=""right"">"&_
  83. vbcrlf&"<h1><a href="""&view_url&""" >"&topic&"</a></h1>"&_
  84. vbcrlf&"<li class=""postinfo"">"&fav_list&" ???"&king51_dig.time_type(tim,1)&"</li>"&_
  85. vbcrlf&"<li class=""content clear"">"&_
  86. vbcrlf&"<table width=""auto"" height=""auto"" cellspacing=""0""><tr>"&_
  87. vbcrlf&"<td>"&Ubbcode(word)&" <a href="""&view_url&""" title=""?????"&topic&"?????""><font style="" font-weight: normal"">??&raquo;</font></a> ("&counter&" ???)</td>"&_
  88. vbcrlf&"</tr></table></li>"&_
  89. vbcrlf&"<li class=""count_info""><a href="""&view_url&"#Revert"">"&revert_num&" ???</a>&nbsp;&nbsp;<img src="""&web_dim(11)&"fav.gif""> "&add_fav(id)&"&nbsp;&nbsp;<img src="""&web_dim(11)&"tag.png""> <a href=""list.asp?c_id="&c_id&""" title=""?????????"">"&c_name&"</a> "&tags&"</li></ul></dd>"
  90. next
  91. erase art_data
  92. '//----------
  93. response.Write page_view
  94. '//-----------
  95. else
  96. rs.close : Set Rs = Nothing
  97. response.write vbcrlf&"<h1>???????????????</h1><div>1??????????,?????????<br>2????????????????????????<br />3??????????????????“????”?<br /><br /><a href=""user.asp""><b>??????????????</b></a></div>"
  98. end if
  99. if islogin then call addvisit
  100. response.Write"<dl></div>"&_
  101. vbcrlf&"<div class=""sidebar"">"
  102. user_box
  103. fav_box
  104. tag_box(user_id)
  105. visit_box
  106. response.Write"</div></div>"
  107. call king51_dig.exec("update user_data set User_counter=User_counter+1 where ID="&user_id,0)
  108. call web_end()
  109. %>