📄 admin_ads.asp
字号:
rsAdA("Ad_Name")=Ad_Name
rsAdA("Ad_Picture")=Ad_Picture
rsAdA("Ad_PictureWidth")=Ad_PictureWidth
rsAdA("Ad_PictureHeight")=Ad_PictureHeight
rsAdA("Ad_Title")=Ad_Title
rsAdA("Ad_Href")=Ad_Href
rsAdA("Ad_Type")=Ad_Type
rsAdA("Ad_Order")=Ad_Order
rsAdA("Ad_Note")=Ad_Note
rsAdA("Ad_Username")=Ad_Username
rsAdA("Ad_IP")=Ad_IP
rsAdA("Ad_DateTime")=date()
rsAdA.update
rsAdA.close
set rsAdA=Nothing
GuSystemCode=00
GuSystemMessage="网站广告已添加完成"
GuSystemURL="<a href=""Admin_Ads.asp""><img src=""Images/Admin_Button_OK.gif"" border=""0""></a>"
end if
rsAd1.close
set rsAd1=Nothing
call GuMessage()
end sub
Sub AdsModifySave()
dim rsAdM
set rsAdM=Server.CreateObject("Adodb.RecordSet")
GuSQL="select * from "&GuTablePrefix&"_Ads where Ad_ID="&Trim(Request.Form("Ad_ID"))
rsAdM.open GuSQL,GuConn,1,3
rsAdM("Ad_Name")=Ad_Name
rsAdM("Ad_Picture")=Ad_Picture
rsAdM("Ad_PictureWidth")=Ad_PictureWidth
rsAdM("Ad_PictureHeight")=Ad_PictureHeight
rsAdM("Ad_Title")=Ad_Title
rsAdM("Ad_Href")=Ad_Href
rsAdM("Ad_Type")=Ad_Type
rsAdM("Ad_Order")=Ad_Order
rsAdM("Ad_Note")=Ad_Note
rsAdM("Ad_DateTime")=date()
rsAdM.update
rsAdM.close
set rsAdM=Nothing
GuSystemCode=00
GuSystemMessage="网站广告已修改完成"
GuSystemURL="<a href=""Admin_Ads.asp""><img src=""Images/Admin_Button_OK.gif"" border=""0""></a>"
call GuMessage()
end sub
Sub AdsDelete()
if Trim(Request.Form("GuResourceID"))="" then
GuSystemCode=3
GuSystemMessage="没有选择要删除的网站广告"
else
GuConn.execute("delete from "&GuTablePrefix&"_Ads where Ad_ID in ("&Trim(Request.Form("GuResourceID"))&")")
GuSystemCode=00
GuSystemMessage="网站广告已删除完成"
GuSystemURL="<a href=""Admin_Ads.asp""><img src=""Images/Admin_Button_OK.gif"" border=""0""></a>"
end if
call GuMessage()
end sub
Sub Admin_Ads(isAdsModify)
if isAdsModify then
dim rsAd2
set rsAd2=Server.CreateObject("Adodb.RecordSet")
rsAd2.open "select * from "&GuTablePrefix&"_Ads where Ad_ID="&Trim(Request.QueryString("Ad_ID")),GuConn,1,1
end if
%>
<table border="0" cellpadding="0" cellspacing="1" width="600" height="10" bgcolor="#CEEFE7">
<form name="Admin_Ads" method="post" action="Admin_Ads.asp" onSubmit="return Admin_Ads_Check();">
<tr>
<td width="600" height="30" background="Images/Admin_T_Bg1.gif" align="center" colspan="3"><font class="BlackS12"><b>网 站 广 告 管 理</b></font></td>
</tr>
<tr>
<td width="600" height="10" bgcolor="#FFFFFF" colspan="3"></td>
</tr>
<tr>
<td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">广告名称</font></td>
<td width="276" height="28" bgcolor="#FFFFFF"> <input type="text" name="Ad_Name" maxlength="50" value="<%if isAdsModify then Response.write rsAd2("Ad_Name") end if%>" class="Admin_InputText" style="width:260;background-color:#EAFBF5;"></td>
<td width="240" height="28" bgcolor="#FFFFFF"> <span id="JS_M_Ad_Name" class="BlackS12">填写广告名称</span></td>
</tr>
<tr>
<td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">广告位置</font></td>
<td width="276" height="28" bgcolor="#FFFFFF"> <select name="Ad_Type" size="1" onchange="Ad_Type_Select();" class="Admin_Select" style="background-color:#EAFBF5;">
<%if isAdsModify then%>
<option value="1"<%if rsAd2("Ad_Type")="1" then Response.write " selected" end if%>>广告位一(顶部广告)</option>
<option value="2"<%if rsAd2("Ad_Type")="2" then Response.write " selected" end if%>>广告位二(页面横幅)</option>
<option value="3"<%if rsAd2("Ad_Type")="3" then Response.write " selected" end if%>>广告位三(漂浮广告)</option>
<option value="4"<%if rsAd2("Ad_Type")="4" then Response.write " selected" end if%>>广告位四(对联广告)</option>
<option value="5"<%if rsAd2("Ad_Type")="5" then Response.write " selected" end if%>>广告位五(文章内容右上角广告)</option>
<option value="6"<%if rsAd2("Ad_Type")="6" then Response.write " selected" end if%>>广告位六(文章内容底部广告)</option>
<option value="7"<%if rsAd2("Ad_Type")="7" then Response.write " selected" end if%>>广告位七(搜索表单下的广告)</option>
<option value="8"<%if rsAd2("Ad_Type")="8" then Response.write " selected" end if%>>广告位八(页面底部横幅广告)</option>
<%else%>
<option value="" selected>选择广告位置...</option>
<option value="1">广告位一(顶部广告)</option>
<option value="2">广告位二(页面横幅)</option>
<option value="3">广告位三(漂浮广告)</option>
<option value="4">广告位四(对联广告)</option>
<option value="5">广告位五(文章内容右上角广告)</option>
<option value="6">广告位六(文章内容底部广告)</option>
<option value="7">广告位七(搜索表单下的广告)</option>
<option value="8">广告位八(页面底部横幅广告)</option>
<%end if%></select></font></td>
<td width="240" height="28" bgcolor="#FFFFFF"> <span id="JS_M_Ad_Type" class="BlackS12">选择广告投放的位置</span></td>
</tr>
<tr>
<td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">链接图片</font></td>
<td width="276" height="28" bgcolor="#FFFFFF"> <input type="text" name="Ad_Picture" maxlength="200" value="<%if isAdsModify then Response.write rsAd2("Ad_Picture") end if%>" class="Admin_InputText" style="width:260;background-color:#EAFBF5;"></td>
<td width="240" height="28" bgcolor="#FFFFFF"> <span id="JS_M_Ad_Picture" class="BlackS12">广告图片的地址,默认的图片是广告招租</span></td>
</tr>
<tr id="Admin_Upload" style="display:<%if AdsUploadShow="0" then Response.write "none" end if%>">
<td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">上传图片</font></td>
<td width="276" height="28" bgcolor="#FFFFFF"><iframe name="UploadPicture" frameborder="0" width="272" height="28" scrolling="no" src="Admin_Upload.asp?T=P"></iframe></td>
<td width="240" height="28" bgcolor="#FFFFFF"> <font class="BlackS12">选择要上传的图片,然后复制返回的地址</font></td>
</tr>
<tr>
<td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">图片宽高</font></td>
<td width="276" height="28" bgcolor="#FFFFFF"> <input type="text" name="Ad_PictureWidth" maxlength="4" value="<%if isAdsModify then Response.write rsAd2("Ad_PictureWidth") end if%>" class="Admin_InputText" style="width:41;background-color:#EAFBF5;" onKeypress="if(event.keyCode<48||event.keyCode>57)event.returnValue=false;"> <input type="text" name="Ad_PictureHeight" maxlength="4" value="<%if isAdsModify then Response.write rsAd2("Ad_PictureHeight") end if%>" class="Admin_InputText" style="width:41;background-color:#EAFBF5;" onKeypress="if(event.keyCode<48||event.keyCode>57)event.returnValue=false;"></td>
<td width="240" height="28" bgcolor="#FFFFFF"> <span id="JS_M_Ad_PWH" class="BlackS12">设置广告图片的宽度和高度</span></td>
</tr>
<tr>
<td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">说明文字</font></td>
<td width="276" height="28" bgcolor="#FFFFFF"> <input type="text" name="Ad_Title" value="<% if isAdsModify then Response.write rsAd2("Ad_Title") end if %>" class="Admin_InputText" style="width:260;background-color:#FFFFFF;" maxlength="100"></td>
<td width="240" height="28" bgcolor="#FFFFFF"> <font class="BlackS12">广告图片的附加说明文字</font></td>
</tr>
<tr>
<td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">指向网址</font></td>
<td width="276" height="28" bgcolor="#FFFFFF"> <input type="text" name="Ad_Href" maxlength="200" value="<%if isAdsModify then Response.write rsAd2("Ad_Href") else Response.write "http://" end if %>" class="Admin_InputText" style="width:260;background-color:#EAFBF5;"></td>
<td width="240" height="28" bgcolor="#FFFFFF"> <span id="JS_M_Ad_Href" class="BlackS12">广告指向的网址</span></td>
</tr>
<tr>
<td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">排序代码</font></td>
<td width="276" height="28" bgcolor="#FFFFFF"> <input type="text" name="Ad_Order" value="<%if isAdsModify then Response.write rsAd2("Ad_Order") else Response.write""&hour(time)&minute(time)&second(time)&"" end if%>" onKeypress="if(event.keyCode<48||event.keyCode>57)event.returnValue=false;" class="Admin_InputText" style="width:76;background-color:#EAFBF5;" maxlength="7"></td>
<td width="240" height="28" bgcolor="#FFFFFF"> <span id="JS_M_Ad_Order" class="BlackS12">排列先后顺序的代码</span></td>
</tr>
<tr>
<td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">备注说明</font></td>
<td width="276" height="28" bgcolor="#FFFFFF"> <input type="text" name="Ad_Note" value="<%if isAdsModify then Response.write rsAd2("Ad_Note") end if %>" class="Admin_InputText" style="width:260;background-color:#FFFFFF;"></td>
<td width="240" height="28" bgcolor="#FFFFFF"> <font class="BlackS12">注释说明</font></td>
</tr>
<tr>
<td width="80" height="38" bgcolor="#FFFFFF"><input type="hidden" name="GuComm" value="<%if isAdsModify then Response.write "MoSa" else Response.write "AdSa" end if%>"><%if isAdsModify then%><input type="hidden" name="Ad_ID" value="<%=Request("Ad_ID")%>"><%end if%></td>
<td width="518" height="38" bgcolor="#FFFFFF" colspan="2"> <input type="submit" name="Submit2" value="" class="<%if isAdsModify then Response.write "Admin_Button_Modify" else Response.write "Admin_Button_Add" end if%>"> <input type="Reset" value="" name="Reset2" class="Admin_Button_Reset"> <input type="button" value="" name="Upload2" class="Admin_Button_Upload" onclick="JavaScript:GuDIVShowHidden(Admin_Upload);"> <input type="button" value="" name="Help" class="Admin_Button_Help" onclick="JavaScript:GuDIVShowHidden(Admin_Help);"></td>
</tr>
</form>
</table>
<%
if isAdsModify then
rsAd2.close
set rsAd2=Nothing
end if
%>
<div id="Admin_Help" style="display:none">
<br>
<table border="0" cellpadding="0" cellspacing="1" width="600" height="1" bgcolor="#CEEFE7">
<tr>
<td width="600" height="100" bgcolor="#FFFFFF" align="center"><table border="0" width="580" height="10"><tr><td height="6" width="580"></td></tr><tr><td height="26" width="580"><font class="BlueS12">网站广告添加说明:</font><br><br><font class="BlackS12">默认的广告位有八个,如果你想要在这八个广告位以外的位置再增加广告位,必须手动修改代码。选择广告位置时自动填写广告的图片地址,这默认的图片地址是广告招租的,图片的宽和高也默认设定,你可以自行修改,但不要超过最大限制,否则影响页面,在这里添加的广告只能是图片广告,图片的格式可以是普通的.bmp .gif .jpg 等图片,也可以是.swf 的 Flash 动画,如果你要添加文本广告或是自定义代码的广告,请从“网站文件管理”中的广告位文件添加或修改。<br><br>当你设置广告位为自定义代码时,这里添加的对应的广告位的图片广告将失效<br><br>若有其它问题,请参阅使用说明文档</font></td></tr><tr><td height="6" width="580"></td></tr></table></td>
</tr>
</table>
</div>
<br>
<table border="0" cellpadding="0" cellspacing="1" width="600" height="10" bgcolor="#CEEFE7">
<form name="Admin_Ads_List" method="post" action="Admin_Ads.asp">
<tr>
<td width="41" height="26" bgcolor="#EAFBF5" align="center"><font class=BlackS12>编号</font></td>
<td width="38" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">选择</font></td>
<td width="100" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">广告名称</font></td>
<td width="68" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">广告位置</font></td>
<td width="160" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">备注说明</font></td>
<td width="68" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">排序代码</font></td>
<td width="76" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">整理日期</font></td>
<td width="38" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">编辑</font></td>
</tr>
<%
dim rsAd3
set rsAd3=Server.CreateObject("Adodb.RecordSet")
rsAd3.open "select top 100 * from "&GuTablePrefix&"_Ads order by Ad_Type asc,Ad_Order asc",GuConn,1,1
if rsAd3.bof and rsAd3.eof then
Response.write "<tr><td width=""600"" height=""40"" bgcolor=""#FFFFFF"" colspan=""8""> <font class=""SilverS12"">没有找到相关数据</font></td></tr>"
else
do while not rsAd3.eof
%>
<tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#EAFBF5'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
<td width="41" height="26" align="center"><font class="BlackS12"><%=rsAd3("Ad_ID")%></font></td>
<td width="38" height="26" align="center"><input name="GuResourceID" type="checkbox" id="GuResourceID" value="<%=rsAd3("Ad_ID")%>"></td>
<td width="100" height="26" align="center"><a href="<%=rsAd3("Ad_Href")%>" class="BlackS12" target="_blank" title="<%=rsAd3("Ad_Name")%><%if rsAd3("Ad_Title")<>"" then Response.write "("&rsAd3("Ad_Title")&")" end if%>"><%if Len(rsAd3("Ad_Name"))>8 then Response.write Left(rsAd3("Ad_Name"),6)&".." else Response.write rsAd3("Ad_Name") end if%></a></td>
<td width="68" height="26" align="center"><a href="<%=rsAd3("Ad_Picture")%>" class="BlackS12" target="_blank" title="查看图片"><%if rsAd3("Ad_Type")="1" then%>广告位一<%elseif rsAd3("Ad_Type")="2" then%>广告位二<%elseif rsAd3("Ad_Type")="3" then%>广告位三<%elseif rsAd3("Ad_Type")="4" then %>广告位四<%elseif rsAd3("Ad_Type")="5" then%>广告位五<%elseif rsAd3("Ad_Type")="6" then%>广告位六<%elseif rsAd3("Ad_Type")="7" then%>广告位七<%elseif rsAd3("Ad_Type")="8" then%>广告位八<%else%><%end if%></a></td>
<td width="160" height="26" align="center"><font class="BlackS12"><%=rsAd3("Ad_Note")%></font></td>
<td width="68" height="26" align="center"><font class="BlackS12"><%=rsAd3("Ad_Order")%></font></td>
<td width="76" height="26" align="center"><font class="BlackS12"><%=rsAd3("Ad_DateTime")%></font></td>
<td width="38" height="26" align="center"><a href="Admin_Ads.asp?GuComm=Mo&Ad_ID=<%=rsAd3("Ad_ID")%>" class="BlackS12"><img src="Images/Admin_Modify.gif" border="0" width="16" height="16" title="编辑广告"></a></td>
</tr>
<%
rsAd3.movenext
loop
%>
<tr>
<td width="600" height="38" bgcolor="#FFFFFF" colspan="8" align="right"><input type="hidden" name="GuComm" value="De"><input type="submit" value="" name="Admin_Ads_Delete" class="Admin_Button_Delete"> </td>
</tr>
<%
end if
rsAd3.close
set rsAd3=Nothing
%>
</form>
</table>
<br>
<%end sub%>
<!--#include file="Include/Message.asp"-->
</body>
</html>
<%CloseDatabase%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -