📄 ads_add.asp
字号:
Select Case Clng(str_AdType)
Case 0 call ShowAds(lng_TempAdID)
Case 1 call NewWindow(lng_TempAdID)
Case 2 call OpenWindow(lng_TempAdID)
Case 3 call FilterAway(lng_TempAdID)
Case 4 call DialogBox(lng_TempAdID)
Case 5 call ClarityBox(lng_TempAdID)
Case 6 call DriftBox(lng_TempAdID)
Case 7 call LeftBottom(lng_TempAdID)
Case 8 call RightBottom(lng_TempAdID)
Case 9 call Couplet(lng_TempAdID)
Case 10 call Cycle(lng_TempAdID,lng_TempLoopAdID)
Case 11 call AdTxt(lng_TempAdID)
End Select
If Clng(str_IsLoopvalue) = 1 then
Call Cycle(AdID,TempLocation)
End if
strShowErr = "<li>添加成功!</li>"
Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Ads_Manage.asp")
Response.end
End If
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>广告管理___Powered by foosun Inc.</title>
<link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
</head>
<script src="../../FS_Inc/PublicJS.js" language="JavaScript"></script>
<body>
<form action="" name="AddAds" method="post">
<%
Dim str_AdClass_Sql,o_AdClass_Rs,str_AdClass_str,str_Selected,str_ClassType
str_ClassType=Request.QueryString("AdClassID")
str_AdClass_Sql="Select AdClassID,AdClassName,Lock from FS_AD_Class"
Set o_AdClass_Rs=Conn.execute(str_AdClass_Sql)
If Not o_AdClass_Rs.Eof Then
While Not o_AdClass_Rs.Eof
If Clng(str_ClassType)=Clng(o_AdClass_Rs("AdClassID")) Then
str_Selected=" selected"
End If
str_AdClass_str=str_AdClass_str&"<option value="&o_AdClass_Rs("AdClassID")&str_Selected&">"&o_AdClass_Rs("AdClassName")&"</option>"
o_AdClass_Rs.MoveNext
Wend
End If
Set o_AdClass_Rs=Nothing
%>
<table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
<tr class="hback">
<td colspan="4" class="xingmu">添加广告</td>
</tr>
<tr>
<td height="8" colspan="4" class="hback"><%=str_ShowType%> | <a href="javascript:history.go(-1);">返回上级</a></td>
</tr>
<tr>
<td height="4" colspan="4" class="hback"><input type="hidden" name="Type" value="<%=str_AdOpType%>"></td>
</tr>
<tr>
<td height="4" align="right" class="hback">广告分类</td>
<td height="4" colspan="3" class="hback"><select name="AdClassID" size="1" style="width:600px" o>
<option value="-1">请选择广告栏目,如果不选择(默认不把此广告加入栏目)</option>
<%=str_AdClass_str%>
</select></td>
</tr>
<tr>
<td width="12%" height="20" align="right" class="hback">广告名称</td>
<td width="38%" height="20" align="left" class="hback"><input name="AdName" type="text" id="AdName" size="32" maxlength="20" title="广告名称,必填" value="<%=temp_Adname%>">
<font color="#FF0000">*必须填写项目</font></td>
<td width="12%" height="20" align="right" class="hback">广告类型</td>
<td width="38%" align="left" class="hback"><select name="AdType" id="AdType" style="width:200" onChange="javascript:ChooseType(this.value);">
<option value="0" <%if Clng(temp_adType)=0 Then Response.write "selected"%>>普通显示广告</option>
<option value="1" <%if Clng(temp_adType)=1 Then Response.write "selected"%>>弹出新窗口</option>
<option value="2" <%if Clng(temp_adType)=2 Then Response.write "selected"%>>打开新窗口</option>
<option value="3" <%if Clng(temp_adType)=3 Then Response.write "selected"%>>渐隐消失</option>
<option value="4" <%if Clng(temp_adType)=4 Then Response.write "selected"%>>网页对话框</option>
<option value="5" <%if Clng(temp_adType)=5 Then Response.write "selected"%>>透明对话框</option>
<option value="6" <%if Clng(temp_adType)=6 Then Response.write "selected"%>>满屏浮动</option>
<option value="7" <%if Clng(temp_adType)=7 Then Response.write "selected"%>>左下底端</option>
<option value="8" <%if Clng(temp_adType)=8 Then Response.write "selected"%>>右下底端</option>
<option value="9" <%if Clng(temp_adType)=9 Then Response.write "selected"%>>对联广告</option>
<option value="10" <%if Clng(temp_adType)=10 Then Response.write "selected"%>>循环广告</option>
</select></td>
</tr>
<tr id="tr1">
<td height="32" align="right" class="hback">循环广告</td>
<td height="32" align="left" class="hback">
<input name="IsLoop" type="checkbox" id="IsLoop" value="0" title="将非循环类广告添加到循环广告中循环显示" onClick="javascript:ChooseCycleDis();" <%If temp_adloop=1 Then Response.write "checkend"%>><input type="hidden" name="IsLoopvalue" value="0">
循环广告位
<select name="LoopAdName" title="将非循环广告设置为循环广告后必选" disabled style="width:110">
<%
Dim o_Temp_Loopname
Set o_Temp_Loopname=Conn.execute("select AdID,AdName From FS_AD_Info order by AdID")
If Not o_Temp_Loopname.Eof Then
Response.Write("<option value=""-1""></option>")
While Not o_Temp_Loopname.Eof
Response.Write("<option value="&o_Temp_Loopname("AdID")&">"&o_Temp_Loopname("AdName")&"</option>")
o_Temp_Loopname.MoveNext
Wend
Else
Response.Write("<option value=""-1""></option>")
Response.Write("<option value=""-1"">当前无广告,请添加</option>")
End If
Set o_Temp_Loopname=Nothing
%>
</select> </td>
<td height="32" align="right" class="hback">循环方向</td>
<td height="32" align="left" class="hback"><select name="LoopFollow" id="select" style="width:70" title="将广告设置为循环广告后必选" disabled>
<option value="0" <%If temp_adloopfollow=0 Then Response.write "selected"%>>向 上</option>
<option value="1" <%If temp_adloopfollow=1 Then Response.write "selected"%>>向 下</option>
<option value="2" <%If temp_adloopfollow=2 Then Response.write "selected"%>>向 左</option>
<option value="3" <%If temp_adloopfollow=3 Then Response.write "selected"%>>向 右</option>
</select>
循环速度
<input name="LoopSpeed" type="text" id="LoopSpeed" size="17" maxlength="20" style="width:70"title="将广告设置为循环广告后必填" disabled value="<%=temp_adloopspeed%>" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"></td>
</tr>
<tr id="tr2">
<td height="18" align="right" class="hback">图片/动画地址</td>
<td height="18" align="left" class="hback"><input name="LoopPicAdress" type="text" id="LoopPicAdress" size="19" title="广告图片地址:必选项" value="<%=temp_adloopic%>">
<input name="SelectPic" type="button" id="SelectPic" value="选择图片" onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<%=str_CurrPath %>',400,320,window,document.AddAds.LoopPicAdress);">
<font color="#FF0000">*必须填写项目</font></td>
<td height="18" align="right" class="hback">图片/动画地址</td>
<td height="18" align="left" class="hback"><input name="LoopRPicAdress" type="text" id="LoopRPicAdress" size="19" title="如果广告类型为对联广告,请选择此项,其它类型不用选择" disabled value="<%=temp_adloopRpic%>">
<input name="SelectRPic" type="button" id="SelectPic2" value="选择图片" onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<%=str_CurrPath %>',400,320,window,document.AddAds.LoopRPicAdress);" disabled></td>
</tr>
<tr id="tr3">
<td height="8" align="right" class="hback">图片/动画高度</td>
<td height="8" align="left" class="hback"><input name="AdPicHeight" type="text" id="AdPicHeight" size="32" maxlength="20" title="图片高度:必选项" value="<%=temp_picH%>" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')">
<font color="#FF0000">*必须填写项目</font></td>
<td height="8" align="right" class="hback">图片/动画宽度</td>
<td height="8" align="left" class="hback"><input name="AdPicWidth" type="text" id="AdPicWidth" size="32" maxlength="20" title="图片宽度:必选项" value="<%=temp_picW%>" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')">
<font color="#FF0000">*必须填写项目</font></td>
</tr>
<tr id="tr4" style="display:none">
<%
If str_AdOpType<>"Add" Then
Dim temp_Ad_TxtID,temp_Content_txt,temp_Css_txt,temp_link_txt
Dim temp_Ad_TxtID1,temp_Content_txt1,temp_Css_txt1,temp_link_txt1
Set temp_Txt_Rs=Conn.execute("select Ad_TxtID,AdID,AdTxtContent,Css,LinkUrl from FS_AD_TxtInfo where AdID="&Temp_AdID&" order by Ad_TxtID")
If Not temp_Txt_Rs.Eof Then
temp_Ad_TxtID1=temp_Txt_Rs("Ad_TxtID")
temp_Content_txt1=temp_Txt_Rs("AdTxtContent")
temp_Css_txt1=temp_Txt_Rs("Css")
temp_link_txt1=temp_Txt_Rs("LinkUrl")
temp_Txt_i=1
temp_Txt_Rs.Movenext
Do While Not temp_Txt_Rs.Eof
temp_Ad_TxtID=temp_Txt_Rs("Ad_TxtID")
temp_Content_txt=temp_Txt_Rs("AdTxtContent")
temp_Css_txt=temp_Txt_Rs("Css")
temp_link_txt=temp_Txt_Rs("LinkUrl")
temp_Txtcontentstr=temp_Txtcontentstr&"<tr><td> 显示文本 <input name=""AdTxtContent"" type=""text"" size=""30"" maxlength=""200"" value="""&temp_Content_txt&"""> 样式 <input name=""AdTxtCss"" type=""text"" size=""7"" maxlength=""40"" value="""&temp_Css_txt&"""> 链接地址 <input name=""AdTxtLink"" type=""text"" value="""&temp_Txt_Rs("LinkUrl")&""" size=""16"" maxlength=""100""><input name=""TxtID"" type=""hidden"" value="""&temp_Ad_TxtID&"""> <a href=""#"" onclick='f_delete(this.parentElement.parentElement)'>删除</a> </td></tr>"
temp_Txt_Rs.Movenext
temp_Txt_i=temp_Txt_i+1
Loop
End If
Set temp_Txt_Rs=Nothing
End If
%>
<td height="4" align="right" valign="top" class="hback">广告内容<br>
(<a href=javascript:f_add()><img src="/admin/images/add.gif" border="0" alt="点击添加更多文字广告"></a>)
</td>
<td height="4" colspan="3" align="left" class="hback">
<table width="641" id="tb1">
<tr><td>显示文本
<input name="AdTxtContent" type="text" size="30" maxlength="200" value="<%=temp_Content_txt1%>">
样式
<input name="AdTxtCss" type="text" size="7" maxlength="40" value="<%=temp_Css_txt1%>">
链接地址
<input name="AdTxtLink" type="text" id="AdTxtLink" value="<%=temp_link_txt1%>" size="16" maxlength="100">
列数
<input name="AdTxtColNum" type="text" id="AdTxtColNum" value="<%=temp_AdTxtColNum%>" size="4" maxlength="2" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"></td>
</tr><%=temp_Txtcontentstr%></table>
<input name="TxtID" type="hidden" value="<%=temp_Ad_TxtID1%>"></td></tr>
<tr id="tr6">
<td height="18" align="right" class="hback">链接地址</td>
<td height="18" align="left" class="hback"><input name="AdLinkUrl" type="text" id="AdLinkUrl" size="32" maxlength="200" title="广告链接地址,必填项" value="<%=temp_adlink%>">
<font color="#FF0000">*必须填写项目</font></td>
<td height="18" align="right" class="hback">说明文字</td>
<td height="18" align="left" class="hback"><input name="AdCaptionTxt" type="text" size="32" maxlength="100" title="广告说明文字,可选项" value="<%=temp_adcaptiontxt%>"></td>
</tr>
<tr>
<td height="18" align="right" class="hback">显示条件</td>
<td height="18" align="left" class="hback"><input name="LoopFactor" type="radio" title="将此广告设置为不受任何条件限制而永不过期。选择此项后,最大点击次数、最大显示次数和截止日期不用填写" value="0" onClick="javascript:LoopFactorClick('1');" <%If temp_loopfactor=0 Then Response.write "checked"%>>
无条件显示
<input type="radio" name="LoopFactor" value="1" title="将广告设置为有条件显示后,此广告将在满足最大点击次数、最大显示次数和截止日期中的任何一项后失效" onClick="javascript:LoopFactorClick('2');" <%If temp_loopfactor=1 Then Response.write "checked"%>>
有条件显示</td>
<td height="18" align="right" class="hback">截止日期</td>
<td height="18" align="left" class="hback"><input name="LoopEndDate" type="text" id="LoopEndDate" size="19" disabled value="<%=temp_loopenddate%>" readonly>
<input name="SelectDate" type="button" id="SelectDate" value="选择时间" onClick="OpenWindowAndSetValue('../CommPages/SelectDate.asp',300,130,window,document.AddAds.LoopEndDate);" disabled></td>
</tr>
<tr>
<td height="8" align="right" class="hback">点击次数</td>
<td height="8" align="left" class="hback"><input name="AdMaxClickNum" type="text" id="AdClickNum" size="32" maxlength="30" title="设置广告的最大点击数量,广告将在点击次数达到此数量后失效。如果不设置此项,请置空" disabled value="<%=temp_maxclicknum%>" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"></td>
<td height="8" align="right" class="hback">显示次数</td>
<td height="8" align="left" class="hback"><input name="AdMaxShowNum" type="text" id="AdShowNum" size="32" maxlength="30" title="设置广告的最大显示数量,广告将在显示次数达到此数量后失效。如果不设置此项,请置空" disabled value="<%=temp_maxshownum%>" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"></td>
</tr>
<tr>
<td height="9" align="right" valign="top" class="hback">广告备注</td>
<td height="9" colspan="3" align="left" class="hback"><textarea name="AdRemarks" cols="98" rows="5" title="广告备注,仅供后台查阅,不做前台调用"><%=temp_adremarks%></textarea></td>
</tr>
</table>
</form>
</body>
</html>
<script language="javascript">
function Ad_Flag()
{
if (document.AddAds.AdName.value=="")
{
alert("请输入广告名称");
document.AddAds.AdName.focus();
return false;
}
if (parseInt(document.AddAds.AdType.value)==11)
{
var _arr=document.all.AdTxtContent
if (typeof(_arr.length)=="undefined")
{
if (_arr.value=="")
{
alert("请输入文字显示内容");
_arr.focus();
return false;
}
}
else
{
for (var j=0;j<_arr.length;j++)
{
if (_arr[j].value=="")
{
alert("请输入文字显示内容");
_arr[j].focus();
return false;
}
}
}
}
else
{
if (document.AddAds.LoopPicAdress.value=="")
{
alert("请输入图片地址");
document.AddAds.LoopPicAdress.focus();
return false;
}
if (parseInt(document.AddAds.AdType.value)==9)
{
if (document.AddAds.LoopRPicAdress.value=="")
{
alert("请输入图片地址");
document.AddAds.LoopRPicAdress.focus();
return false;
}
}
if (parseInt(document.AddAds.IsLoopvalue.value)==1)
{
if (document.AddAds.LoopSpeed.value=="")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -