📄 wm.ads.asp
字号:
Content = Content & "</table>" & vbCrLf
Case "EditSave"
AdsBig = WRMPS.CheckStr(Request("AdsBig"), 0)
AdsSmall = WRMPS.CheckStr(Request("AdsSmall"), 0)
CityID = WRMPS.CheckStr(Request("CityID"), 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)," ","")
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=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If AdsBig = "" Or AdsSmall = "" Then Call WRMPS.ErrView("·请选择广告位置<meta http-equiv=refresh content='1;URL=?Action=EditOne&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If WM_Type = "" Then Call WRMPS.ErrView("·请选择广告属性<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If PlayType = "" Then PlayType = 1
Select Case PlayType
Case 1
WM_Begin = Null
WM_End = Null
Case 2
WM_Begin = WRMPS.CheckStr(Request("WM_Begin"), 0)
WM_End = WRMPS.CheckStr(Request("WM_End"), 0)
If WM_Begin <> "" and IsDate(WM_Begin) Then WM_Begin = CDate(WM_Begin) Else WM_Begin = Null
If WM_End <> "" and IsDate(WM_End) Then WM_End = CDate(WM_End) Else WM_End = Null
If WM_Begin = "" Or WM_End = "" Then Call WRMPS.ErrView("·请选择广告插放开始及结束日期<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
End Select
If WM_SiteTitle = "" Then Call WRMPS.ErrView("·请填写站点客户名称<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
Select Case WM_Type
Case 1
Pic = Null
Size1 = Null
WM_Code = Null
If WM_Text = "" Then Call WRMPS.ErrView("·请填写文字广告内容<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If WM_Url = "" Then Call WRMPS.ErrView("·请填写广告连接URL<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If OpenType = "" Then Call WRMPS.ErrView("·请选择广告打开方式<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
Case 2
WM_Text = Null
WM_Code = Null
If Pic = "" Then Call WRMPS.ErrView("·请填写广告图片地址<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If WM_Url = "" Then Call WRMPS.ErrView("·请填写广告连接URL<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If Size1 = "" Then Call WRMPS.ErrView("·请填写广告大小<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If OpenType = "" Then Call WRMPS.ErrView("·请选择广告打开方式<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
Case 3
WM_Text = Null
WM_Url = Null
OpenType = Null
WM_Code = Null
If Pic = "" Then Call WRMPS.ErrView("·请填写广告图片地址<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If Size1 = "" Then Call WRMPS.ErrView("·请填写广告大小<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
Case 4
WM_Text = Null
WM_Url = Null
OpenType = Null
Pic = Null
Size1 = Null
If WM_Code = "" Then Call WRMPS.ErrView("·请填写广告代码<meta http-equiv=refresh content='1;URL=?Action=EditTwo&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
End Select
Set Rs = Server.CreateObject("ADODB.RecordSet")
Rs.Open "Select * From WM_ADS Where WM_ID = "&Int(ID)&" and WM_SkinDir = '"&WR_Setting(5)&"'",Conn,1,3
If Not Rs.Eof Then
ID = Rs("WM_ID")
Rs("WM_AreaID") = CityID
Rs("WM_Big") = AdsBig
Rs("WM_Small") = AdsSmall
Rs("WM_Type") = WM_Type
Rs("WM_Pic") = Pic
Rs("WM_Text") = WM_Text
Rs("WM_Url") = WM_Url
Rs("WM_Code") = WM_Code
Rs("WM_Size") = Size1
Rs("WM_OpenType") = OpenType
Rs("WM_PlayType") = PlayType
Rs("WM_Begin") = WM_Begin
Rs("WM_End") = WM_End
Rs("WM_SiteTitle") = WM_SiteTitle
Rs("WM_Name") = WM_Name
Rs("WM_Contact") = WM_Contact
Rs("WM_Remark") = Remark
Rs.Update
End If
Rs.Close
Set Rs = Nothing
If AdsSmall <> WRMPS.CheckStr(Request("AdsSmall_"), 0) Or AdsBig <> WRMPS.CheckStr(Request("AdsBig_"), 0) Or CityID <> WRMPS.CheckStr(Request("CityID_"), 1) Then
Call WRMPS.FsoBegin()
WRMPS.FsoDel "FILE", "../Img/AD_"&WRMPS.CheckStr(Request("CityID_"), 1)&"_"&WRMPS.CheckStr(Request("AdsBig_"), 0)&WRMPS.CheckStr(Request("AdsSmall_"), 0)&".asp"
Call WRMPS.FsoEnd()
End If
Call AdsFile(ID)
Call WRMPS.ErrView("·修改成功<meta http-equiv=refresh content='1;URL=?AreaID="&AreaID&"'>",1)
Case "EditTwo"
AdsBig = WRMPS.CheckStr(Request("AdsBig"), 0)
AdsSmall = WRMPS.CheckStr(Request("AdsSmall"), 0)
CityID = WRMPS.CheckStr(Request("CityID"), 1)
If AdsSmall = "" Then
AdsBig = WRMPS.CheckStr(Request("AdsBig_"), 0)
AdsSmall = WRMPS.CheckStr(Request("AdsSmall_"), 0)
End If
If CityID = "" Then
CityID = WRMPS.CheckStr(Request("CityID_"), 1)
End If
If AdsBig = "" Or AdsSmall = "" Then Call WRMPS.ErrView("·请选择广告位置<meta http-equiv=refresh content='1;URL=?Action=EditOne&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",0)
If CityID = "" Then Call WRMPS.ErrView("·请选择广告所属地区<meta http-equiv=refresh content='1;URL=?Action=EditOne&AreaID="&AreaID&"&ID="&ID&"&CityID_="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig_="&WRMPS.CheckStr(Request("AdsBig_"), 1)&"&AdsSmall_="&WRMPS.CheckStr(Request("AdsSmall_"), 1)&"'>",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,WM_ADSize,WM_ADSType 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
If CityID > 0 Then
City=WRDB.GetClassName("WM_Area",CityID)
Else
City = WR_Area(0)
End If
Set Rs = Conn.Execute("Select * From WM_ADS Where WM_AreaID = "&CityID&" and WM_Big = '"&AdsBig&"' And WM_Small = '"&AdsSmall&"' and WM_ID <> "&ID&" and WM_SkinDir = '"&WR_Setting(5)&"'")
If Not Rs.Eof Then
Call WRMPS.ErrView("·该城市位置的广告已经存在<meta http-equiv=refresh content='1;URL=?Action=EditOne&AreaID="&AreaID&"&CityID="&WRMPS.CheckStr(Request("CityID_"), 1)&"&AdsBig="&WRMPS.CheckStr(Request("AdsBig_"), 0)&"&AdsSmall="&WRMPS.CheckStr(Request("AdsSmall_"), 0)&"'>",0)
End If
Rs.Close
Set Rs = Server.CreateObject("ADODB.RecordSet")
Rs.Open "Select * From WM_ADS Where WM_ID = "&ID&" and WM_SkinDir = '"&WR_Setting(5)&"'" ,conn,1,1
If Not Rs.Eof Then
If Rs("WM_Sort") = 10 Then Response.Redirect "?Action=Magic&Big="&AdsBig&"&Small="&AdsSmall&"&CityID="&CityID&"&ID="&ID
SS = Rs("WM_Size")
If IsNull(SS) Then SS = ","
Content = Content & "<Script language='JavaScript' Src='../Inc/GetDate.Js'></Script>" & vbCrLf
Content = Content & "<table width='100%' border=0 cellspacing=1 cellpadding=3 class=td1>" & vbCrLf
Content = Content & "<form name='myform' method='post' action='?Action=EditSave&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=AdsBig_ type=hidden value="&WRMPS.CheckStr(Request("AdsBig_"), 0)&">" & vbCrLf
Content = Content & "<input name=AdsSmall_ type=hidden value="&WRMPS.CheckStr(Request("AdsSmall_"),0)&">" & vbCrLf
Content = Content & "<input name=CityID_ type=hidden value="&WRMPS.CheckStr(Request("CityID_"), 1)&">" & 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%'><strong>"&City&"</strong></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></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Select Case Rs("WM_Sort")
Case 0
Content = Content & "<input name=WM_Type type=hidden value=1>"
Case 1,2,3,4,5,6,7,8
Content = Content & " <tr class=td2>" & vbCrLf
Content = Content & " <td><strong>图片属性</strong></td>" & vbCrLf
Content = Content & " <td><input type=radio name=WM_Type value=2 onclick=ads(""pic"")"&WRMPS.GetCheckVer(2,Rs("WM_Type"),1)&">图片 <input type=radio name=WM_Type value=3 onclick=ads(""swf"")"&WRMPS.GetCheckVer(3,Rs("WM_Type"),1)&">Flash <font color='#FF0000'><strong>*</strong></font></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Case 9
Content = Content & "<input name=WM_Type type=hidden value=4>"
End Select
Content = Content & " <tr class=td2 id=ad1>" & vbCrLf
Content = Content & " <td><strong>广告图片</strong></td>" & vbCrLf
Content = Content & " <td><input type=text name=Pic size=40 maxlength=200 value='"&WRMPS.CheckStr(Rs("WM_Pic"),5)&"'> <font color='#FF0000'><strong>*</strong></font> <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></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & " <tr class=td2 id=ad2>" & vbCrLf
Content = Content & " <td><strong>文字广告内容</strong></td>" & vbCrLf
Content = Content & " <td><input type=text name=WM_Text size=40 value='"&Rs("WM_Text")&"'> <font color='#FF0000'><strong>*</strong></font></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & " <tr class=td2 id=ad3>" & vbCrLf
Content = Content & " <td><strong>连接URL</strong></td>" & vbCrLf
Content = Content & " <td><input type=text name=WM_Url size=40 value='"&Rs("WM_Url")&"'> <font color='#FF0000'><strong>*</strong></font></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
WM_Code = Rs("WM_Code")
Content = Content & " <tr class=td2 id=ad6>" & vbCrLf
Content = Content & " <td><strong>广告代码</strong></td>" & vbCrLf
Content = Content & " <td><textarea name=WM_Code cols=40 rows=5>"&WRMPS.CheckStr(WM_Code,7)&"</textarea> <font color='#FF0000'><strong>*</strong></font></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & " <tr class=td2 id=ad4>" & vbCrLf
Content = Content & " <td><strong>广告大小</strong></td>" & vbCrLf
Content = Content & " <td>宽:<input type=text name=Size1 size=5 value="&Split(SS,",")(0)&"> 高:<input type=text name=Size1 size=5 value="&Split(SS,",")(1)&"> <font color='#FF0000'><strong>*</strong></font></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & " <tr class=td2 id=ad5>" & vbCrLf
Content = Content & " <td><strong>打开方式</strong></td>" & vbCrLf
Content = Content & " <td><select name='OpenType'>"
Content = Content & "<option value='_blank'"&WRMPS.GetCheckVer("_blank",Rs("WM_OpenType"),0)&">新窗口</option>" & vbCrLf
Content = Content & "<option value='_self'"&WRMPS.GetCheckVer("_self",Rs("WM_OpenType"),0)&">原窗口</option>" & vbCrLf
Content = Content & "<option value='_parent'"&WRMPS.GetCheckVer("_parent",Rs("WM_OpenType"),0)&">主窗口</option>" & vbCrLf
Content = Content & "<option value='_top'"&WRMPS.GetCheckVer("_top",Rs("WM_OpenType"),0)&">父窗口</option>" & vbCrLf
Content = Content & "</select></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & " <tr class=td2>" & vbCrLf
Content = Content & " <td><strong>广告插放条件</strong></td>" & vbCrLf
Content = Content & " <td><input type=radio name=PlayType value=1"&WRMPS.GetCheckVer(1,Rs("WM_PlayType"),1)&">无限制<br><input type=radio name=PlayType value=2"&WRMPS.GetCheckVer(2,Rs("WM_PlayType"),1)&">日期段限制 <input type='text' name='WM_Begin' size=10 value="&Rs("WM_Begin")&"><a style='cursor:pointer;' onClick='PopCalendar.show(document.myform.WM_Begin, ""yyyy-m-d"", null, null, null, ""11"");'><img src='../Images/other/Calendar.gif' border='0' Style='Padding-Top:10px' align='absmiddle'></a> 至 <input type='text' name='WM_End' size=10 value="&Rs("WM_End")&"><a style='cursor:pointer;' onClick='PopCalendar.show(document.myform.WM_End, ""yyyy-m-d"", null, null, null, ""11"");'><img src='../Images/other/Calendar.gif' border='0' Style='Padding-Top:10px' align='absmiddle'></a></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & " <tr class=td3>" & vbCrLf
Content = Content & " <td colspan=2><strong>客户信息</strong></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=WM_SiteTitle size=30 value="&Rs("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><input type=text name=WM_Name size=30 value="&Rs("WM_Name")&"></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=WM_Contact size=30 value="&Rs("WM_Contact")&"></td>" & vbCrLf
Content = Content & " </tr>" & vbCrLf
Content = Content & " <tr class=td2>" & vbCrLf
Content = Content & " <td><strong>备注</strong></td>" & vbCrLf
Remark = Rs("WM_Remark")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -