home *** CD-ROM | disk | FTP | other *** search
/ 221.214.14.186 / 221.214.14.186.tar / 221.214.14.186 / wh / qim / viewpic.asp < prev    next >
Text File  |  2006-06-01  |  13KB  |  310 lines

  1. <%
  2. '==================================
  3. '=╬─ ╝■ ├√ú║viewpic.asp
  4. '=╩╩╙├░µ▒╛ú║FeitecCMS AC V1.3 Free
  5. '=╣ª    ─▄ú║▓Θ┐┤▒┌╓╜╥│├µ
  6. '=╫≈    ╒▀ú║╙Ω│╟[From to FeitecStudio]
  7. '=╚╒    ╞┌ú║2006-2-19 18:09
  8. '=░µ    ╚¿ú║http://www.feitec.com/
  9. '=╝╝╩⌡╠╓┬█ú║6602510íó14040543ú¿╨┬╩╓╚║ú⌐
  10. '==================================
  11. %>
  12. <!--#include file="Ft_config.asp"-->
  13. <!--#include file="Ft_conn.asp"-->
  14. <!--#include file="Ft_format.asp"-->
  15. <!--#include file="Ft_lib.asp"-->
  16. <%
  17. if request.querystring("id")="" then
  18.     response.redirect("showerr.asp?errmsg=<br><li>▒┌╓╜ID▓╗─▄╬¬┐╒ú¼╟δ╓╕╢¿▓┘╫≈╢╘╧≤úí</li>")
  19.     response.end
  20. end if
  21. dim csid,csurl,csname,userview
  22. csid=checksql("▒┌╓╜ID",request.querystring("id"),0,8)
  23. sql="select * from Ft_pic where pic_id="&csid
  24. set rs=server.createobject("adodb.recordset")
  25. rs.open sql,conn,1,1
  26. if rs.eof and rs.bof then
  27.     response.redirect("showerr.asp?errmsg=<br><li>├╗╙╨┤╦▒┌╓╜╗≥┤╦▒┌╓╜╥╤╔╛│²úí</li>")
  28.     response.end
  29.     rs.close
  30.     set rs=nothing
  31. else
  32.     csurl=rs("pic_url")
  33.     csname=rs("pic_name")
  34.     cscount=rs("pic_count")
  35.     userview=rs("user_view")
  36.     moneypay=rs("moneypay")
  37.     picid=rs("pic_id")
  38. '    sql="update Ft_pic set pic_count = pic_count + 1 where pic_id="&csid
  39. '    conn.execute(sql)
  40.     rs.close
  41.     set rs=nothing
  42.     if instr(csname,"<font color")<>0 then
  43.             pictitle=split(csname,">")
  44.             pic_title=replace(pictitle(1),"</font","")
  45.     else
  46.         pic_title=csname
  47.     end if
  48.     sub_title=pic_title&"-Σ»└└═╝╞¼"
  49. end if
  50. call head()
  51. call body()
  52. call foot()
  53. sub body()
  54. if request.form("addremark")="true" then
  55.     call localsubmit()
  56.     dim remarker,remarker_ip,remark,remark_date
  57.     remarker=checksql("╞└┬█╒▀",request.form("remarker"),1,10)
  58.     remarker_ip=checksql("╞└┬█╒▀IP",request.form("remarker_ip"),1,30)
  59.     picid=checksql("═╝╞¼ID",request.form("pic_id"),0,8)
  60.     remark=checksql("╞└┬█─┌╚▌",request.form("remark"),1,151)
  61.     if usecode=1 then
  62.         GetCode=checksql("╤Θ╓ñ┬δ",request.form("GetCode"),1,6)
  63.         valicode=Session("yangzeng")
  64.         if GetCode<>valicode then
  65.             response.redirect("showerr.asp?errmsg=<br><li>╤Θ╓ñ┬δ┤φ╬≤úí")
  66.             response.end
  67.         end if
  68.     end if
  69.     sql="select * from Ft_pic_remark where pic_id="&picid
  70.     set rsremark=server.createobject("adodb.recordset")
  71.     rsremark.open sql,conn,1,3
  72.     rsremark.addnew    
  73.     rsremark("remarker")=remarker
  74.     rsremark("remark")=remark
  75.     rsremark("pic_id")=picid
  76.     rsremark("remarker_ip")=remarker_ip
  77.     rsremark("remark_date")=now()
  78.     rsremark.update
  79.     rsremark.close
  80.     set rsremark=nothing
  81.     Response.Write " <script> alert('─·╥╤╛¡│╔╣ª╠ß╜╗╞└┬█╨┼╧óú¼╕╨╨╗─·╡─╞└┬█íúíúíú\n\n                                   "& webname &" "& date() &"'); location.href='viewpic.asp?id="&picid&"'</script>"
  82.     Response.End
  83. end if
  84.  
  85. StrTemp=split(mb_pic,"|||@@@|||")
  86. dim StrTemp2,Ft_mbstr2
  87. Ft_mbstr2=replace(StrTemp(1),"$csname$",csname)
  88. Ft_mbstr2=replace(Ft_mbstr2,"$cscount$",cscount)
  89. if userview=1 then
  90.     Ft_mbstr2=replace(Ft_mbstr2,"$userview$","<span class=""key_font"">╗ß╘▒═╝╞¼</span> <span class=""disable_font"">╧√╖╤"&moneypay&"╕÷╜≡▒╥</span>")
  91. elseif userview=2 then
  92.     Ft_mbstr2=replace(Ft_mbstr2,"$userview$","<span class=""key_font"">VIP╗ß╘▒═╝╞¼</span> <span class=""disable_font"">╧√╖╤"&moneypay&"╕÷╜≡▒╥</span>")
  93. else
  94.     Ft_mbstr2=replace(Ft_mbstr2,"$userview$","╞╒═¿═╝╞¼")
  95. end if
  96. if session("feitec_adminlogin")=feitec_sessionvar then
  97.     piccontent="<img onmousewheel=""return cgimg(this);"" src="""&csurl&""" onload=""javascript:DrawImage(this);"">"
  98.     sql="update Ft_pic set pic_count = pic_count + 1 where pic_id="&csid
  99.     conn.execute(sql)
  100. else
  101.     if user_system<>0 and userview<>0 then
  102.         if request.Cookies("userlogin")=user_session then
  103.             dim userarray,username
  104.             curarray=split(request.Cookies("userdata"),"||")
  105.             username=curarray(0)
  106.             sql="select * from Ft_user where lock=0 and name='"&username&"' and passed=1"
  107.             set rs2=server.createobject("adodb.recordset")
  108.             rs2.open sql,conn,1,3
  109.             if not rs2.eof then
  110.                 if rs2("user_money")<0 then
  111.                     response.write"<script>alert('"&username&"ú¼─π╡─╜≡▒╥╩²╥╤▓╗╣╗ú¼╟δ╝░╩▒│Σ╓╡úí');location.href='index.asp';</script>"
  112.                     response.end
  113.                 elseif userview=2 then
  114.                     if rs2("user_type")<>2 then
  115.                                                                         response.write"<script>alert('─·▓╗╩╟VIP╗ß╘▒ú¼╬▐╚¿▓Θ┐┤┤╦╥│');location.href='index.asp';</script>"
  116.                         response.end
  117.                     else
  118.                         rs2("user_money")=rs2("user_money")-moneypay
  119.                         rs2.update
  120.                     end if
  121.                 elseif userview=1 then
  122.                     rs2("user_money")=rs2("user_money")-moneypay
  123.                     rs2.update
  124.                 end if
  125.             else
  126.                 response.write"<script>alert('├╗╙╨┤╦╗ß╘▒╗≥┤╦╗ß╘▒╒²╘┌╔≤║╦╗≥┤╦╗ß╘▒╥╤▒╗╦°╢¿');location.href='index.asp';</script>"
  127.                 response.end
  128.             end if
  129.             rs2.close
  130.             set rs2=nothing
  131.             piccontent="<img onmousewheel=""return cgimg(this);"" src="""&csurl&""" onload=""javascript:DrawImage(this);"">"
  132.             sql="update Ft_pic set pic_count = pic_count + 1 where pic_id="&csid
  133.     conn.execute(sql)
  134.         else
  135.             piccontent="<br><p align=""center"" class=""disable_font"">─π├╗╙╨╚¿╧▐▓Θ┐┤┤╦╥│ú¼╟δ<a href=""user.asp"">╫ó▓ß</a>╬¬╗ß╘▒í¡í¡</p><br>"
  136.         end if
  137.     else
  138.         piccontent="<img onmousewheel=""return cgimg(this);"" src="""&csurl&""" onload=""javascript:DrawImage(this);"">"
  139.         sql="update Ft_pic set pic_count = pic_count + 1 where pic_id="&csid
  140.         conn.execute(sql)
  141.     end if
  142. end if
  143. '═╝╞¼╓≈╠σ▒φ╕±╩Σ│÷
  144. Ft_mbstr2=replace(Ft_mbstr2,"$piccontent$",piccontent)
  145. 'response.write Ft_mbstr2
  146. '═╝╞¼┐Γ┐∞╦┘╡╝║╜Σ»└└
  147. firstrsd=server.CreateObject("adodb.recordset")
  148. sql="select top 1 pic_id,pic_name from Ft_pic order by pic_id"
  149. set firstrsd=conn.execute(sql)
  150. dim firstid
  151. firstid=firstrsd("pic_id")
  152. csname=firstrsd("pic_name")
  153. if instr(csname,"<font color")<>0 then
  154.     pictitle=split(csname,">")
  155.     pic_title=replace(pictitle(1),"</font","")
  156. else
  157.     pic_title=csname
  158. end if
  159. picnav= "<button onClick=""window.location='?id="&firstid&"'"" title="""&pic_title&""" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'>═╝┐Γ┐Γ╩╫</button> "
  160. firstrsd.close
  161. set firstrsd=nothing
  162.  
  163. backrsd=server.CreateObject("adodb.recordset")
  164. sql="select top 1 * from Ft_pic where pic_id<"&csid&" order by pic_id desc"
  165. set backrsd=conn.execute(sql)
  166. if backrsd.eof then
  167.     picnav=picnav+"<button disabled class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'>╡┌╥╗╒┼</button> "
  168. else
  169.     a0=backrsd("pic_id")
  170.     csname=backrsd("pic_name")
  171.     if instr(csname,"<font color")<>0 then
  172.         pictitle=split(csname,">")
  173.         pic_title=replace(pictitle(1),"</font","")
  174.     else
  175.         pic_title=csname
  176.     end if
  177.     picnav=picnav+"<button onClick=""window.location='?id="&a0&"'"" title="""&pic_title&""" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'>╔╧╥╗╒┼</button> "
  178. end if
  179. backrsd.close
  180. set backrsd=nothing
  181. nextrsd=server.CreateObject("adodb.recordset")
  182. sql="select top 1 * from Ft_pic where pic_id>"&csid&" order by pic_id"
  183. set nextrsd=conn.execute(sql)
  184. if nextrsd.eof then
  185.     picnav=picnav+"<button disabled class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'>╫ε║≤╥╗╒┼</button> "
  186. else
  187.     a2=nextrsd("pic_id")
  188.     csname=nextrsd("pic_name")
  189.     if instr(csname,"<font color")<>0 then
  190.         pictitle=split(csname,">")
  191.         pic_title=replace(pictitle(1),"</font","")
  192.     else
  193.         pic_title=csname
  194.     end if
  195.     picnav=picnav+"<button onClick=""window.location='?id="&a2&"'"" title="""&pic_title&""" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'>╧┬╥╗╒┼</button> "
  196. end if
  197. nextrsd.close
  198. set nextrsd=nothing
  199. lastrsd=server.CreateObject("adodb.recordset")
  200. sql="select top 1 pic_id,pic_name from Ft_pic order by pic_id desc"
  201. set lastrsd=conn.execute(sql)
  202. dim lastid
  203. lastid=lastrsd("pic_id")
  204. csname=lastrsd("pic_name")
  205. if instr(csname,"<font color")<>0 then
  206.     pictitle=split(csname,">")
  207.     pic_title=replace(pictitle(1),"</font","")
  208. else
  209.     pic_title=csname
  210. end if
  211. picnav=picnav+"<button onClick=""window.location='?id="&lastid&"'"" title="""&pic_title&""" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'>═╝┐Γ┐Γ╬▓</button> <button onClick=""window.location='pic.asp'"" title=""╗╪▒┌╓╜Σ»└└╥│├µ"" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'>╗╪─┐┬╝</button> <button onClick=""window.close()"" title=""╣╪▒╒╡▒╟░╥│├µ"" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'>╣╪▒╒</button>"
  212. lastrsd.close
  213. set lastrsd=nothing
  214. Ft_mbstr2=replace(Ft_mbstr2,"$picnav$",picnav)
  215. '╘┌╧▀╞└┬█╝░╞└┬█▒φ╕±
  216. dim totalremark,currentpage,totalpages,i
  217. sql5="select * from Ft_pic_remark where pic_id="&picid&" order by remark_date desc"
  218. set rs5=server.createobject("adodb.recordset")
  219. rs5.open sql5,conn,1,1
  220. vv=rs5.pagecount
  221. Ft_mbstr2=replace(Ft_mbstr2,"$total_remark$",rs5.recordcount)
  222. if not rs5.eof then
  223.     rs5.movefirst
  224.     rs5.pagesize=pageremark
  225.     if trim(request("page"))<>"" then
  226.         currentpage=clng(request("page"))
  227.         if currentpage>rs5.pagecount then
  228.             currentpage=rs5.pagecount
  229.         end if
  230.     else
  231.         currentpage=1
  232.     end if
  233.     totalremark=rs5.recordcount
  234.     if currentpage<>1 then
  235.         if (currentpage-1)*pageremark<totalremark then
  236.             rs5.move(currentpage-1)*pageremark
  237.         end if
  238.     end if
  239.     if (totalremark mod pageremark)=0 then
  240.         totalpages=totalremark\pageremark
  241.     else
  242.         totalpages=totalremark\pageremark+1
  243.     end if
  244.     i=0
  245.     do while not rs5.eof and i<pageremark
  246.         artremarklist=" <img src="""&signimgpath&"/biao.gif"" border=""0""> "&ubb2html(formatstr(rs5("remark")), true, true)&" <span class=""disable_font"">["&rs5("remarker")&" "&rs5("remark_date")&"]</span><br>"
  247.         artremarkout=artremarkout+artremarklist
  248.         i=i+1
  249.         rs5.movenext
  250.     loop
  251. elseif rs5.eof and rs5.bof then
  252.         artremarkout="<span class=""disable_font"">╘▌╩▒╗╣├╗╙╨╞└┬█</span>"
  253. end if
  254. Ft_mbstr2=replace(Ft_mbstr2,"$artremarklist$",artremarkout)
  255. if currentpage<>"" then
  256.     remarkpage="╡┌"¤tpage&"╥│ú¼╣▓"
  257. else
  258.     remarkpage="╡┌0╥│ú¼╣▓"
  259. end if
  260. if totalpages<>"" then
  261.     remarkpage=remarkpage+""&totalpages&"╥│,╣▓<span class=""key_font"">"&rs5.recordcount&"</span>╠⌡╞└┬█ "
  262. else
  263.     remarkpage=remarkpage+"0╥│,╣▓<span class=""key_font"">"&rs5.recordcount&"</span>╠⌡╞└┬█ "
  264. end if
  265. i=1
  266. for i=1 to totalpages
  267. if i=currentpage then
  268.     remarkpage=remarkpage+" <span class=""key_font"">"&i&"</span>"
  269. else
  270.     remarkpage=remarkpage+" <a href=""?id="&picid&"&page="&i&""">"&i&"</a>"
  271. end if
  272. next
  273. rs5.close
  274. set rs5=nothing
  275. remarkpage=remarkpage+" "
  276. Ft_mbstr2=replace(Ft_mbstr2,"$remarkpage$",remarkpage)
  277. if usecode=1 then
  278.     Ft_mbstr2=replace(Ft_mbstr2,"$usecode$","   ╤Θ ╓ñ ┬δ  <input name=""GetCode"" type=""text"" size=""4"" maxlength=""4""> <img src=""Ft_Getcode.asp"">")
  279. else
  280.     Ft_mbstr2=replace(Ft_mbstr2,"$usecode$","")
  281. end if
  282. if request.Cookies("userlogin")=user_session then
  283.     Ft_mbstr2=replace(Ft_mbstr2,"$user_remarker$","value=""╗ß╘▒_"&split(request.Cookies("userdata"),"||")(0)&""" readonly")
  284. else
  285.     Ft_mbstr2=replace(Ft_mbstr2,"$user_remarker$","xxx")
  286. end if
  287. remarker_ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
  288. If remarker_ip = "" Then remarker_ip = Request.ServerVariables("REMOTE_ADDR")
  289. Ft_mbstr2=replace(Ft_mbstr2,"$remarker_ip$",remarker_ip)
  290. if artremark_ok=1  or session("feitec_adminlogin")=feitec_sessionvar then
  291.     remarksubmit="<input type=""submit"" name=""submit"" value=""╖ó▒φ"" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put' onclick=""{if(confirm('─·╚╖╢¿╥¬╠ß╜╗┤╦╠⌡╞└┬█┬≡?\n\n╫ó╥Γú║╟╨╝╔▓╗╥¬║·┬╥╠ß╜╗╞└┬█ú¼╖±╘≥║≤╣√╫╘╕║úí')){return true;}return false;}""> <input type=""reset"" name=""reset"" value=""╓╪╨┤"" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'><input type=""hidden"" name=""pic_id"" value="""&picid&"""><input type=""hidden"" name=""addremark"" value=""true"">"
  292. elseif artremark_ok=2 then
  293.     if user_system<>0 then
  294.         if request.Cookies("userlogin")=user_session then
  295.             remarksubmit="<input type=""submit"" name=""submit"" value=""╖ó▒φ"" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put' onclick=""{if(confirm('─·╚╖╢¿╥¬╠ß╜╗┤╦╠⌡╞└┬█┬≡?\n\n╫ó╥Γú║╟╨╝╔▓╗╥¬║·┬╥╠ß╜╗╞└┬█ú¼╖±╘≥║≤╣√╫╘╕║úí')){return true;}return false;}""><input type=""reset"" name=""reset"" value=""╓╪╨┤"" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'><input type=""hidden"" name=""pic_id"" value="""&picid&"""><input type=""hidden"" name=""addremark"" value=""true"">"
  296.         else
  297.             remarksubmit="<input type=""submit"" name=""submit"" value=""╗ß╘▒▓┼─▄╖ó▒φ╞└┬█"" disabled>"
  298.         end if
  299.     else
  300.         remarksubmit="<input type=""submit"" name=""submit"" value=""╖ó▒φ"" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put' onclick=""{if(confirm('─·╚╖╢¿╥¬╠ß╜╗┤╦╠⌡╞└┬█┬≡?\n\n╫ó╥Γú║╟╨╝╔▓╗╥¬║·┬╥╠ß╜╗╞└┬█ú¼╖±╘≥║≤╣√╫╘╕║úí')){return true;}return false;}""> <input type=""reset"" name=""reset"" value=""╓╪╨┤"" class=""put"" onmouseover=this.className='overput' onmouseout=this.className='put'><input type=""hidden"" name=""pic_id"" value="""&picid&"""><input type=""hidden"" name=""addremark"" value=""true"">"
  301.     end if
  302. else
  303.     remarksubmit="<input type=""submit"" name=""submit"" value=""╞└┬█╣ª─▄╥╤╣╪▒╒"" disabled>"
  304. end if
  305. '╞└┬█╩Σ│÷
  306. Ft_mbstr2=replace(Ft_mbstr2,"$remarksubmit$",remarksubmit)
  307. response.write Ft_mbstr2
  308. end sub
  309. %>
  310.