⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wm.ads.asp

📁 网人分类信息5.0商业版。非常优秀的分类信息系统。比较少见。
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<!--#include file="WM.Sys_Cook.asp"-->
<!--#include file="WM.Cre_Cls.asp"-->
<%
If CheckAdminFlag("ADS") = False Then Call WRMPS.ErrView("·您没有权限进行此操作",0)
Dim Rs1
Dim BN,SN,SS,ST,City
Dim AdsBig,AdsSmall,CityID,WM_Sort,WM_Type,Pic,WM_Text,WM_Url,Size1,OpenType,PlayType,WM_Begin,WM_End,WM_SiteTitle,WM_Name,WM_Contact,remark,WM_Code
Dim Path,Tag,ADSize,AdsBig1,AdsSmall1,CityID1
Dim ButtonKey,ButtonPlace,ButtonWidth,ButtonHeight,ShowTime,ADW,ADH,P,Magic,ButtonBG,ButtonInBG
Dim count

ID = WRMPS.CheckStr(Request("ID"), 0)
Page = WRMPS.CheckStr(Request("Page"), 1)
If Page = "" Then Page = 1
AreaID = WRMPS.CheckStr(Request("AreaID"), 1)
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
Content = Content & "<tr class=td2><td><a href=WM.Ads.asp>管理首页</a> | <a href=?Action=AddOne>添加广告</a></td></tr>" & vbCrLf
Content = Content & "</table>" & vbCrLf
Call DBConnBegin()
Select Case Request("Action")
  Case "MagicSave"
	CityID = WRMPS.CheckStr(Request("CityID"), 1)
    AdsBig = WRMPS.CheckStr(Request("Big"), 0)
    AdsSmall = WRMPS.CheckStr(Request("Small"), 0)
	WM_SiteTitle = WRMPS.CheckStr(Request("WM_SiteTitle"), 0)
	Remark = WRMPS.CheckStr(Request("Remark"), 2)
	If Remark = "" Then Remark = Null
    If CityID = "" Then Call WRMPS.ErrView("·请选择广告所属地区<meta http-equiv=refresh content='1;URL=?Action=AddTwo&CityID="&CityID&"&AdsBig="&AdsBig&"&AdsSmall="&AdsSmall&"'>",0)
    If AdsBig = "" Or AdsSmall = "" Then Call WRMPS.ErrView("·请选择广告位置<meta http-equiv=refresh content='1;URL=?Action=AddOne'>",0)
	If WM_SiteTitle = "" Then Call WRMPS.ErrView("·请填写广告名称<meta http-equiv=refresh content='1;URL=?Action=AddTwo&CityID="&CityID&"&AdsBig="&AdsBig&"&AdsSmall="&AdsSmall&"'>",0)
	ButtonKey = WRMPS.CheckStr(Request("ButtonKey"), 1)
	ButtonPlace = WRMPS.CheckStr(Request("ButtonPlace"), 1)
    ButtonWidth = WRMPS.CheckStr(Request("ButtonWidth"), 1)
	ButtonHeight = WRMPS.CheckStr(Request("ButtonHeight"), 1)
    ShowTime = WRMPS.CheckStr(Request("ShowTime"), 1)
	ADW = WRMPS.CheckStr(Request("ADW"), 1)
	ADH = WRMPS.CheckStr(Request("ADH"), 1)
	P = WRMPS.CheckStr(Request("P"), 4)
	ButtonBG = WRMPS.CheckStr(Request("ButtonBG"), 0)
	ButtonInBG = WRMPS.CheckStr(Request("ButtonInBG"), 0)
	Magic = ButtonKey&"§§§"&ButtonPlace&"§§§"&ButtonWidth&"§§§"&ButtonHeight&"§§§"&ShowTime&"§§§"&ADW&"§§§"&ADH&"§§§"&P&"§§§"&ButtonBG&"§§§"&ButtonInBG

	  Set Rs = Server.CreateObject("ADODB.RecordSet")
	  If ID <> "" Then
	    SQL = "Select * From WM_ADS Where WM_AreaID = "&CityID&" And WM_Small = '"&AdsSmall&"' And WM_Big = '"&AdsBig&"' and WM_ID<>"&ID&" and WM_SkinDir = '"&WR_Setting(5)&"'"
	  Else
	    SQL = "Select * From WM_ADS Where WM_AreaID = "&CityID&" And WM_Small = '"&AdsSmall&"' And WM_Big = '"&AdsBig&"' and WM_SkinDir = '"&WR_Setting(5)&"'"
	  End If
      Rs.Open SQL,Conn,1,1
	  If Not Rs.Eof Then
	    Rs.Close
	    Set Rs = Nothing	  
	    Call WRMPS.ErrView("·该城市位置的广告已经存在<meta http-equiv=refresh content='1;URL=?Action=AddOne'>",0)
	  End If
	  Rs.Close
	  If ID <> "" Then
	    SQL = "Select * From WM_ADS Where WM_ID="&ID&" and WM_SkinDir = '"&WR_Setting(5)&"'"
	  Else
	    SQL = "Select * From WM_ADS"
	  End If
      Rs.Open SQL,Conn,1,3
	    If ID <> "" Then
	      CityID1=Rs("WM_AreaID")
	      AdsBig1=Rs("WM_Big")
	      AdsSmall1=Rs("WM_Small")
		Else
	      Rs.Addnew
	      Rs("WM_Sort") = 10
	      Rs("WM_Type") = 5
	      Rs("WM_PlayType") = 1
	      Rs("WM_Time") = Now()
	      Rs("WM_SkinDir") = WR_Setting(5)
		End If
	    Rs("WM_AreaID") = CityID
	    Rs("WM_Big") = AdsBig
	    Rs("WM_Small") = AdsSmall
	    Rs("WM_SiteTitle") = WM_SiteTitle
	    Rs("WM_Remark") = Remark
	    Rs("WM_Magic") = Magic
	    Rs.Update
	  Rs.Close
	  Set Rs = Nothing	  
	  If ID <> "" Then
	    If AdsSmall <> AdsSmall1 Or AdsBig <> AdsBig1 Or CityID <> CityID1 Then
	      Call WRMPS.FsoBegin()
	      WRMPS.FsoDel "FILE", "../Img/AD_"&CityID1&"_"&AdsBig1&AdsSmall1&".asp"
	      Call WRMPS.FsoEnd()
	    End If
	    Call AdsFile(ID)
	  Else
	    Call AdsFile(0)
	  End If
    Call WRMPS.ErrView("·操作成功<meta http-equiv=refresh content='1;URL=WM.Ads.asp'>",1)

  Case "Magic"
	CityID = WRMPS.CheckStr(Request("CityID"), 1)
    AdsBig = WRMPS.CheckStr(Request("Big"), 0)
    AdsSmall = WRMPS.CheckStr(Request("Small"), 0)
	If ID<>"" Then
      Set Rs = Conn.Execute("Select WM_SiteTitle,WM_Remark,WM_Magic From WM_ADS where WM_ID="&ID&" and WM_SkinDir = '"&WR_Setting(5)&"'")
	  If Not Rs.Eof Then
	    WM_SiteTitle = Rs(0)
	    Remark = Rs(1)
	    Magic = Rs(2)
	  End If
	  Rs.Close
	  Magic = Split(Magic,"§§§")
	Else
      Magic = "1§§§6§§§18§§§18§§§3§§§§§§§§§§§§background:#EFEFEF;color:#333333;border:1px #FF9900 solid§§§background:#FF9900;color:#FFFFFF;padding:0 2px 1px 2px;font-size:14px"
	  Magic = Split(Magic,"§§§")
      Set Rs = Conn.Execute("Select WM_ADSize From WM_ADSsmall where WM_ADBigID='"&AdsBig&"' and WM_Tag='"&AdsSmall&"' and WM_SkinDir = '"&WR_Setting(5)&"'")
	  If Not Rs.Eof Then
	    ADSize = Rs(0)
	  End If
	  Rs.Close
	  Magic(5) = Split(ADSize,",")(0)
	  Magic(6) = Split(ADSize,",")(1)
	End If
    Content = Content & "<table width='100%' border=0 cellspacing=1 cellpadding=3 class=td1>" & vbCrLf
    Content = Content & "<form name='myform' method='post' action='?Action=MagicSave'>" & vbCrLf
	Content = Content & "<input name=Big type=hidden value="&AdsBig&">" & vbCrLf
  	Content = Content & "<input name=Small type=hidden value="&AdsSmall&">" & vbCrLf
  	Content = Content & "<input name=CityID type=hidden value="&CityID&">" & vbCrLf
  	Content = Content & "<input name=ID type=hidden value="&ID&">" & vbCrLf
    Content = Content & "<tr class=td4><td colspan=2><strong>幻灯广告</strong></td></tr>" & vbCrLf
	Content = Content & "<tr class=td3><td colspan=2><strong>广告信息</strong></td></tr>" & vbCrLf
	Content = Content & "  <tr class=td2>" & vbCrLf
    Content = Content & "    <td><strong>广告名称</strong></td>" & vbCrLf
    Content = Content & "    <td><input type=text name=WM_SiteTitle size=30 value="&WM_SiteTitle&"> <font color='#FF0000'><strong>*</strong></font></td>" & vbCrLf
    Content = Content & "  </tr>" & vbCrLf
    Content = Content & "  <tr class=td2>" & vbCrLf
    Content = Content & "    <td><strong>备注</strong></td>" & vbCrLf
    Content = Content & "    <td><textarea name=Remark cols=40 rows=5>"&WRMPS.CheckStr(Remark, 3)&"</textarea></td>" & vbCrLf
    Content = Content & "  </tr>" & vbCrLf
	Content = Content & "<tr class=td3><td colspan=2><strong>按钮样式</strong></td></tr>" & vbCrLf
	Content = Content & "  <tr class=td2>" & vbCrLf
    Content = Content & "    <td width='20%'><strong>是否显示幻灯按钮</strong></td>" & vbCrLf
    Content = Content & "    <td width='80%'><input type=radio name=ButtonKey value=1 onclick='Button.style.display=""""'"&WRMPS.GetCheckVer(Int(Magic(0)),1,1)&"> 显示 <input type=radio name=ButtonKey value=0 onclick='Button.style.display=""none""'"&WRMPS.GetCheckVer(Int(Magic(0)),0,1)&"> 隐藏</td>" & vbCrLf
    Content = Content & "  </tr>" & vbCrLf
    Content = Content & "  <tr class=td2 id=Button"
	If Int(Magic(0)) = 0 Then Content = Content & " style='display:none'"
	Content = Content & ">" & vbCrLf
    Content = Content & "    <td></td>" & vbCrLf
    Content = Content & "    <td>" & vbCrLf
    Content = Content & "<table width='100%' border=0 cellspacing=0 cellpadding=0>" & vbCrLf
    Content = Content & "  <tr><td>幻灯按钮位置:<input type=radio name=ButtonPlace value=1"&WRMPS.GetCheckVer(Int(Magic(1)),1,1)&"> 外上 <input type=radio name=ButtonPlace value=2"&WRMPS.GetCheckVer(Int(Magic(1)),2,1)&"> 外下 <input type=radio name=ButtonPlace value=3"&WRMPS.GetCheckVer(Int(Magic(1)),3,1)&"> 外左 <input type=radio name=ButtonPlace value=4"&WRMPS.GetCheckVer(Int(Magic(1)),4,1)&"> 外右<br>       <input type=radio name=ButtonPlace value=5"&WRMPS.GetCheckVer(Int(Magic(1)),5,1)&"> 内上 <input type=radio name=ButtonPlace value=6"&WRMPS.GetCheckVer(Int(Magic(1)),6,1)&"> 内下 <input type=radio name=ButtonPlace value=7"&WRMPS.GetCheckVer(Int(Magic(1)),7,1)&"> 内左 <input type=radio name=ButtonPlace value=8"&WRMPS.GetCheckVer(Int(Magic(1)),8,1)&"> 内右</td></tr>" & vbCrLf
    Content = Content & "  <tr><td>幻灯按钮宽度:<input type=text name=ButtonWidth size=10 value="""&Magic(2)&"""> px</td></tr>" & vbCrLf
    Content = Content & "  <tr><td>幻灯按钮高度:<input type=text name=ButtonHeight size=10 value="""&Magic(3)&"""> px</td></tr>" & vbCrLf
    Content = Content & "  <tr><td>幻灯按钮背景CSS:<input type=text name=ButtonBG size=50 value="""&WRMPS.Getreplace(Magic(8),"&nbsp;"," ")&"""> <a href=# onclick='myform.ButtonBG.value=""background:#EFEFEF;color:#333333""'>外部默认样式</a> <a href=# onclick='myform.ButtonBG.value=""background:#EFEFEF;color:#333333;border:1px #FF9900 solid""'>内部默认样式</a></td></tr>" & vbCrLf
    Content = Content & "  <tr><td>当前按钮背景CSS:<input type=text name=ButtonInBG size=50 value="""&WRMPS.Getreplace(Magic(9),"&nbsp;"," ")&"""> <a href=# onclick='myform.ButtonInBG.value=""background:#FF9900;color:#FFFFFF""'>外部默认样式</a> <a href=# onclick='myform.ButtonInBG.value=""background:#FF9900;color:#FFFFFF;padding:0 2px 1px 2px;font-size:14px""'>内部默认样式</a></td></tr>" & vbCrLf
    Content = Content & "</table>" & vbCrLf
    Content = Content & "</td>" & vbCrLf
    Content = Content & "  </tr>" & vbCrLf
	Content = Content & "<tr class=td3><td colspan=2><strong>广告图片</strong></td></tr>" & vbCrLf
    Content = Content & "  <tr class=td2>" & vbCrLf
    Content = Content & "    <td><strong>轮显时间间隔</strong></td>" & vbCrLf
    Content = Content & "    <td><input type=text name=ShowTime size=10 value="""&Magic(4)&"""> 秒</td>" & vbCrLf
    Content = Content & "  </tr>" & vbCrLf
    Content = Content & "  <tr class=td2>" & vbCrLf
    Content = Content & "    <td><strong>广告尺寸</strong></td>" & vbCrLf
    Content = Content & "    <td>宽 <input type=text name=ADW size=5 value="""&Magic(5)&"""> px 高 <input type=text name=ADH size=5 value="""&Magic(6)&"""> px</td>" & vbCrLf
    Content = Content & "  </tr>" & vbCrLf
    Content = Content & "  <tr class=td2>" & vbCrLf
    Content = Content & "    <td><strong>广告链接及图片地址</strong></td>" & vbCrLf
    Content = Content & "    <td>" & vbCrLf
    Content = Content & "链接<input type=text name=L size=30> 图片<input type=text name=Pic size=30> <a href=""javascript:openWithIframe('上传广告图片','../Plus/UpLoad/Index.asp?Type=7&User=1',350,150);""><img src='img/pic.gif' align=absmiddle alt='上传' border=0>上传</a> <input type='button' name='button' value='设置一条幻灯广告' onclick='ad_pic()'><br><textarea name=P cols=70 rows=10>"&WRMPS.CheckStr(Magic(7),5)&"</textarea>"
    Content = Content & "    </td>" & vbCrLf
    Content = Content & "  </tr>" & vbCrLf
    Content = Content & "  <tr class=td2>" & vbCrLf
    Content = Content & "    <td></td>" & vbCrLf
    Content = Content & "    <td><input type=submit name='Submit' value=' 提 交 '></td>" & vbCrLf
    Content = Content & "  </tr>" & vbCrLf
    Content = Content & "</form>" & vbCrLf
    Content = Content & "</table>" & vbCrLf

  Case "Del"
	Set Rs = Server.CreateObject("ADODB.RecordSet")
	ID = Replace(ID,"&nbsp;","")
    If ID <> "" Then
      ID = Split(ID, ",")
      For i = 0 To UBound(ID)
        Rs.Open "Select WM_AreaID,WM_Big,WM_Small From WM_ADS Where WM_ID = "&Int(ID(i))&" and WM_SkinDir = '"&WR_Setting(5)&"'",Conn,1,1
	    If Not Rs.Eof Then
		  Path = "../Img/AD_"&Rs(0)&"_"&Rs(1)&Rs(2)&".asp"
		  Call WRMPS.FsoBegin()
		    Call WRMPS.FsoDel("File",Path)
          Call WRMPS.FsoEnd()
		  Conn.Execute ("delete from WM_ADS Where WM_ID=" & Int(ID(i)) & " and WM_SkinDir = '"&WR_Setting(5)&"'")
	    End If
	    Rs.Close
	  Next
    End If
	Set Rs = Nothing
    Call WRMPS.ErrView("·删除成功<meta http-equiv=refresh content='1;URL=WM.Ads.asp?AreaID="&AreaID&"'>",1)

  Case "Save"
    AdsBig = WRMPS.CheckStr(Request("AdsBig"), 0)
    AdsSmall = WRMPS.CheckStr(Request("AdsSmall"), 0)
	CityID = WRMPS.CheckStr(Request("CityID"), 1)
	WM_Sort = WRMPS.CheckStr(Request("WM_Sort"), 1)
	WM_Type = WRMPS.CheckStr(Request("WM_Type"), 1)
	Pic = WRMPS.CheckStr(Request("Pic"), 4)
	WM_Text = WRMPS.CheckStr(Request("WM_Text"), 0)
	WM_Url = WRMPS.CheckStr(Request("WM_Url"), 0)
	Size1 = Replace(WRMPS.CheckStr(Request("Size1"), 0),"&nbsp;","")
	OpenType = WRMPS.CheckStr(Request("OpenType"), 0)
	PlayType = WRMPS.CheckStr(Request("PlayType"), 1)
	WM_SiteTitle = WRMPS.CheckStr(Request("WM_SiteTitle"), 0)
	WM_Name = WRMPS.CheckStr(Request("WM_Name"), 0)
	If WM_Name = "" Then WM_Name = Null
	WM_Contact = WRMPS.CheckStr(Request("WM_Contact"), 0)
	If WM_Contact = "" Then WM_Contact = Null
	Remark = WRMPS.CheckStr(Request("Remark"), 2)
	If Remark = "" Then Remark = Null
	WM_Code = Request("WM_Code")
    If CityID = "" Then Call WRMPS.ErrView("·请选择广告所属地区<meta http-equiv=refresh content='1;URL=?Action=AddTwo&CityID="&CityID&"&AdsBig="&AdsBig&"&AdsSmall="&AdsSmall&"'>",0)
    If AdsBig = "" Or AdsSmall = "" Then Call WRMPS.ErrView("·请选择广告位置<meta http-equiv=refresh content='1;URL=?Action=AddOne'>",0)
    If WM_Sort = "" Then Call WRMPS.ErrView("·请选择广告类型<meta http-equiv=refresh content='1;URL=?Action=AddTwo&CityID="&CityID&"&AdsBig="&AdsBig&"&AdsSmall="&AdsSmall&"'>",0)
    If WM_Type = "" Then Call WRMPS.ErrView("·请选择广告属性<meta http-equiv=refresh content='1;URL=?Action=AddTwo&CityID="&CityID&"&AdsBig="&AdsBig&"&AdsSmall="&AdsSmall&"'>",0)
	If PlayType = "" Then PlayType = 1
	Select Case PlayType
	  Case 1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -