pic.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:3k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_Inc/Function.asp"-->
  4. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  5. <!--#include file="../FS_InterFace/NS_Function.asp" -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  7. <%
  8. response.buffer=true
  9. Response.CacheControl = "no-cache"
  10. Dim Conn,User_Conn
  11. MF_Default_Conn
  12. Dim pic1,rsObj,picSql
  13. pic1=NoSqlHack(request("pic"))
  14. set rsObj=server.createobject(G_FS_RS)
  15. picSql="select * from FS_AD_Info where AdID="&pic1&""
  16. rsObj.open picSql,Conn,1,1
  17. If rsobj.eof or Err.number<>0 then
  18. rsObj.close
  19. set rsObj=nothing
  20. Set Conn=Nothing
  21. Response.Write "参数传递错误!!!"&Err.description
  22. Response.End()
  23. Else
  24. If Cint(rsObj("AdLoopFactor"))=1 Then
  25. If Cint(rsobj("AdLock"))=1 or Cint(rsobj("AdClickNum")) > Cint(rsobj("AdMaxClickNum")) or Cint(rsobj("AdShowNum")) > Cint(rsobj("AdMaxShowNum")) Then
  26. If Trim(rsobj("AdEndDate"))<>"" And  not IsNull(rsobj("AdEndDate")) Then
  27. If Cdate(rsobj("AdEndDate"))>Now() Then
  28. rsObj.close
  29. set rsObj=nothing
  30. Set Conn=Nothing
  31. Response.Write "此广告已经暂停或是失效!"
  32. Response.End()
  33. End If
  34. End If
  35. rsObj.close
  36. set rsObj=nothing
  37. Set Conn=Nothing
  38. Response.Write "此广告已经暂停或是失效!"
  39. Response.End()
  40. else
  41. Response.Write "此广告已经暂停或是失效!"
  42. Response.End()
  43. End If
  44. Else
  45. If InStr(1,LCase(rsobj("AdPicPath")),".swf",1)<>0 Then
  46. If InStr(1,LCase(rsobj("AdPicPath")),"http://")=0 then
  47. Response.Write "<a href="&Conn.execute("Select MF_Domain From FS_MF_Config")(0)&"Ads/AdsClick.asp?Location="& Pic1 &" target=_blank><EMBED src="""& Conn.execute("Select MF_Domain From FS_MF_Config") &"/"&rsObj("AdPicPath") &""" quality=high WIDTH="""& rsObj("AdPicWidth") &""" HEIGHT="""& rsObj("AdPicHeight") &""" TYPE=""application/x-shockwave-flash"" PLUGINSPAGE=""http://www.macromedia.com/go/getflashplayer""></EMBED></a>"
  48. Else
  49. Response.Write "<EMBED src="""& rsObj("AdPicPath") &""" quality=high WIDTH="""& rsObj("AdPicWidth") &""" HEIGHT="""& rsObj("AdPicHeight") &""" TYPE=""application/x-shockwave-flash"" PLUGINSPAGE=""http://www.macromedia.com/go/getflashplayer""></EMBED>"
  50. End If 
  51. Else 
  52. Response.Write "<a href=http://"&Conn.execute("Select MF_Domain From FS_MF_Config")(0)&"/Ads/AdsClick.asp?Location="&Pic1 _
  53. &" target=_blank><img src="&rsobj("AdPicPath")&" border=0 title="&rsobj("AdCaptionTxt")&"></img></a>"
  54. End If
  55. End If
  56. End If
  57. rsObj.close
  58. set rsObj=nothing
  59. Set Conn=Nothing
  60. %>