📄 wm.ads.asp
字号:
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=td2>" & vbCrLf
Content = Content & " <td></td>" & vbCrLf
Content = Content & " <td><input type=submit name='Submit' value=' 提 交 ' onclick=""Loading.style.display='';Loading.style.bottom=100;""></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & "</form>" & vbCrLf
Content = Content & "</table><script>"
Select Case Rs("WM_Type")
Case 1
Content = Content & "ads(""text"")"
Case 2
Content = Content & "ads(""pic"")"
Case 3
Content = Content & "ads(""swf"")"
Case 4
Content = Content & "ads(""code"")"
End Select
Content = Content & "</script>" & vbCrLf
End If
Set Rs = Nothing
Case "EditOne"
AdsBig = WRMPS.CheckStr(Request("AdsBig"), 0)
AdsSmall = WRMPS.CheckStr(Request("AdsSmall"), 0)
CityID = WRMPS.CheckStr(Request("CityID"), 1)
If CityID = "" or AdsBig = "" Or AdsSmall = "" Then Call WRMPS.ErrView("·操作错误<meta http-equiv=refresh content='1;URL=WM.Ads.asp?AreaID="&AreaID&"'>",0)
Set Rs = Conn.Execute("Select WM_ADBig From WM_ADSbig Where WM_Tag='"&AdsBig&"' and WM_SkinDir = '"&WR_Setting(5)&"'")
If Not Rs.Eof Then
BN = Rs(0)
End If
Set Rs = Conn.Execute("Select WM_ADSmall From WM_ADSsmall Where WM_Tag='"&AdsSmall&"' and WM_ADBigID='"&AdsBig&"' and WM_SkinDir = '"&WR_Setting(5)&"'")
If Not Rs.Eof Then
SN = Rs(0)
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=EditTwo&AreaID="&AreaID&"'>" & vbCrLf
Content = Content & "<input name=AdsBig_ type=hidden value="&AdsBig&">" & vbCrLf
Content = Content & "<input name=AdsSmall_ 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>" & vbCrLf
Content = Content & " <td colspan=2><strong>选择待投放广告位置</strong></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & " <tr class=td2>" & vbCrLf
Content = Content & " <td width='30%'><strong>所属地区</strong></td>" & vbCrLf
Content = Content & " <td width='70%'>" & vbCrLf
Content = Content & WRDB.GetAreaSort(0,1,CityID,"CityID")
Content = Content & "</select> <font class=Remark>不修改请不要动</font></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & " <tr class=td2>" & vbCrLf
Content = Content & " <td><strong>广告位置</strong></td>" & vbCrLf
Content = Content & " <td>当前广告位置:<strong>"&BN&" - "&SN&"</strong><br>"&ClassSelect()&" <font class=Remark>不修改请不要动</font></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 "RehFile"
ID = Replace(ID," ","")
Call AdsFile(ID)
Call WRMPS.ErrView("·广告文件刷新成功<meta http-equiv=refresh content='1;URL=WM.Ads.asp?AreaID="&AreaID&"'>",1)
Case Else
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1><tr>"
Content = Content & "<form name='form1' action='WM.Ads.asp' method='post'><td width='45%' class=td2>"
Content = Content & WRDB.GetAreaSort(0,1,AreaID,"AreaID onChange='javascript:submit()'")
Content = Content & "</td></form></tr>" & vbCrLf
Content = Content & "<tr><td width='45%' class=td4><strong>广告管理</strong></td>" & vbCrLf
Content = Content & "</tr></table>" & vbCrLf
AI = "WM_SkinDir = '"&WR_Setting(5)&"'"
If AreaID <> "" and AreaID <> 0 Then AI = AI&" and WM_AreaID="&AreaID
Set ClsPageList = New Cls_PageView
ClsPageList.strTableName = "WM_ADS"
ClsPageList.strPageUrl = ""
ClsPageList.strFieldsList = "WM_ID,WM_Url,WM_SiteTitle,WM_Type,WM_AreaID,WM_Small,WM_Pic,WM_Text,WM_Sort,WM_PlayType,WM_Begin,WM_End,WM_Contact,WM_Remark,WM_Time,WM_Type,WM_Name,WM_Big"
ClsPageList.strCondiction = AI
ClsPageList.strOrderList = "WM_ID desc"
ClsPageList.strPrimaryKey = "WM_ID"
ClsPageList.intPageSize = 20
ClsPageList.intPageNow = Page
ClsPageList.strCookiesName = "RecordCount"
ClsPageList.strPageVar = "Page"
ClsPageList.intRefresh = 1
ClsPageList.inAdmin = 1
ClsPageList.objConn = Conn
ClsPageList.InitClass
arrPage = ClsPageList.arrPage
strPageList = ClsPageList.strPageList
Set ClsPageList = nothing
Content = Content & "<table width='100%' cellpadding=2 cellspacing=1 border=0 align=center Class=TD1>" & vbCrLf
Content = Content & "<form action='WM.Ads.asp?AreaID="&AreaID&"' name=myform method=POST>" & vbCrLf
If IsArray(arrPage) Then
For i = 0 to UBound(arrPage, 2)
Content = Content & "<tr"
Select Case arrPage(3,i)
Case 1
Content = Content & " bgcolor=#FDD0FF>"
Case 2
Content = Content & " bgcolor=#B9CBFF>"
Case 3
Content = Content & " bgcolor=#B9CBFF>"
Case 4
Content = Content & " bgcolor=#FEEA89>"
Case 5
Content = Content & " bgcolor=#FFCC00>"
End Select
Set Rs1 = Conn.Execute("Select WM_ADSmall From WM_ADSsmall Where WM_Tag='"&arrPage(5,i)&"' and WM_ADBigID='"&arrPage(17,i)&"' and WM_SkinDir = '"&WR_Setting(5)&"'")
If Not Rs1.Eof Then
SN = Rs1(0)
End If
Rs1.Close
If arrPage(4,i) > 0 Then
City=WRDB.GetClassName("WM_Area",arrPage(4,i))
Else
City = WR_Area(0)
End If
Set Rs1 = Nothing
Content = Content & "<td colspan=4><input type=checkbox name=ID value="&arrPage(0,i)&"> <strong>"&City&"-"&SN&"</strong> ["&AdsType(arrPage(8,i))&"]"
Content = Content & "</td>"
Content = Content & "<td colspan=1 align=right><a href=?Action=EditOne&ID="&arrPage(0,i)&"&CityID="&arrPage(4,i)&"&AdsBig="&arrPage(17,i)&"&AdsSmall="&arrPage(5,i)&"&AreaID="&AreaID&">修改</a> | <a href=?Action=RehFile&ID="&arrPage(0,i)&"&AreaID="&AreaID&" onclick=""Loading.style.display='';Loading.style.bottom=100;"">刷新文件</a> | <a href=?Action=Del&ID="&arrPage(0,i)&"&AreaID="&AreaID&" onclick=""return confirm('确定删除?');"">删除</a> </td>"
Content = Content & "</tr>" & vbCrLf
Content = Content & "<tr Class=TD2>" & vbCrLf
Content = Content & "<td align=center width='15%' rowspan=3>"
Select Case arrPage(15,i)
Case 1
Content = Content & arrPage(7,i) & vbCrLf
Case 2
Content = Content & "<a href="&WRMPS.CheckStr(arrPage(6,i),5)&" target=_blank><img border=0 src='"&WRMPS.CheckStr(arrPage(6,i),5)&"' onload=""javascript:DrawImage(this,100,80);""></a>" & vbCrLf
Case 3
Content = Content & "<embed src='"&WRMPS.CheckStr(arrPage(6,i),5)&"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='Application/x-shockwave-flash' width=100 height=80></embed>" & vbCrLf
Case 4
Content = Content & "[代码广告]" & vbCrLf
Case 5
Content = Content & "[幻灯广告]" & vbCrLf
End Select
Content = Content & "</td>" & vbCrLf
Content = Content & "<td align=right width='12%'>播放条件:</td>" & vbCrLf
Content = Content & "<td width='30%'><strong>"
Select Case arrPage(9,i)
Case 1
Content = Content & "无任何限制"
Case 2
Content = Content & arrPage(10,i)&" 至 " & arrPage(11,i)
End Select
Content = Content & "</strong></td>"
Content = Content & "<td align=right width='13%'>广告添加时间:</td>" & vbCrLf
Content = Content & "<td width='30%'>"&arrPage(14,i)&"</td>"
Content = Content & "</tr>" & vbCrLf
Content = Content & "<tr Class=TD2>" & vbCrLf
Content = Content & "<td align=right>客户资料:</td>" & vbCrLf
Content = Content & "<td colspan=3><a href="&arrPage(1,i)&" target=_blank>"&arrPage(2,i)&"</a>"
If arrPage(16,i) <> "" or arrPage(12,i) <> "" Then Content = Content & " [ "&arrPage(16,i)&"-"&arrPage(12,i)&" ]"
Content = Content & "</td>"
Content = Content & "</tr>" & vbCrLf
Content = Content & "<tr Class=TD2>" & vbCrLf
Content = Content & "<td align=right>备注:</td>" & vbCrLf
Content = Content & "<td colspan=3>"&arrPage(13,i)&"</td>"
Content = Content & "</tr>" & vbCrLf
Content = Content & "<tr Class=TD2><td Colspan=5 height=10></td></tr>" & vbCrLf
Next
End If
Content = Content & "</table>" & vbCrLf
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 align=center><tr><td height=30>" & vbCrLf
Content = Content & "<input name='chkall' type='checkbox' id='chkall' value='select' onclick=""CheckAll(this.form)"" style='border:0'>全选 <select name='Action'><option value='RehFile'>刷新文件</option><option value='Del'>删除</option></select> <input type=submit name='submit' value='操 作' onclick=""Loading.style.display='';Loading.style.bottom=100;"">" & vbCrLf
Content = Content & "</td><td align=right>" & vbCrLf
Content = Content & strPageList
Content = Content & "</td></tr></Form></table>" & vbCrLf
End Select
Call WRMPS.Loading("")
Call ClassEnd()
Call DBConnEnd()
Response.write Content
Call GetBottom()
Function ClassSelect()
Set Rs=server.createobject("adodb.recordset")
Sql = "select * from WM_ADSsmall where WM_SkinDir = '"&WR_Setting(5)&"' order by WM_ID"
Rs.open Sql,conn,1,1
ClassSelect = ClassSelect & "var OneCou;" & vbCrLf
ClassSelect = ClassSelect & "OneCou=0;" & vbCrLf
ClassSelect = ClassSelect & "subClass = new Array();" & vbCrLf
count = 0
do while not Rs.eof
ClassSelect = ClassSelect & "subClass["&count&"] = new Array("""&trim(Rs("WM_ADSmall"))&""","""&trim(Rs("WM_ADBigID"))&""","""&trim(Rs("WM_Tag"))&""");" & vbCrLf
count = count + 1
Rs.movenext
loop
Rs.close
ClassSelect = ClassSelect & "OneCou="&count&";" & vbCrLf
ClassSelect = ClassSelect & "function ChangeLocationid(locationid){" & vbCrLf
ClassSelect = ClassSelect & "document.myform.AdsSmall.length = 0; " & vbCrLf
ClassSelect = ClassSelect & "var locationid=locationid;" & vbCrLf
ClassSelect = ClassSelect & "var i;" & vbCrLf
ClassSelect = ClassSelect & "for (i=0;i < OneCou; i++){" & vbCrLf
ClassSelect = ClassSelect & "if (subClass[i][1] == locationid){ " & vbCrLf
ClassSelect = ClassSelect & "document.myform.AdsSmall.options[document.myform.AdsSmall.length] = new Option(subClass[i][0], subClass[i][2]);" & vbCrLf
ClassSelect = ClassSelect & "}}}" & vbCrLf
Sql = "select * from WM_ADSbig where WM_SkinDir = '"&WR_Setting(5)&"' order by WM_ID"
Rs.open Sql,conn,1,1
If Not Rs.Eof then
ClassSelect = ClassSelect & "document.write(""<SELECT size=5 name=AdsBig onChange=\""ChangeLocationid(document.myform.AdsBig.options[document.myform.AdsBig.selectedIndex].value)\"">"")" & vbCrLf
Do while not Rs.eof
ClassSelect = ClassSelect & "document.write(""<OPTION value="&trim(Rs("WM_Tag"))&">"&trim(Rs("WM_ADBig"))&" </OPTION>"")" & vbCrLf
Rs.movenext
Loop
End if
Rs.close
ClassSelect = ClassSelect & "document.write(""</SELECT>"")" & vbCrLf
ClassSelect = ClassSelect & "document.write(""<SELECT size=5 name=AdsSmall></SELECT>"")" & vbCrLf
ClassSelect = Replace(ClassSelect,"'","\'")
ClassSelect = "<script>"&ClassSelect&"</script>"
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -