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

📄 floatad.asp

📁 亿众购物系统 一套设计完善、高效的web商城解决方案
💻 ASP
字号:
<!--#include file="../Session.asp"-->
<HTML>
<HEAD>
<title>弹出广告设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../../css/site.css" type="text/css">
</HEAD>
<BODY>
<%if request("action")="save" then
	call Msave()
else
	call Mails()
end if
sub mails
on error resume next
set rs =conn.execute("select FloatAd,IsFloatAd from [Config]")
if not rs.eof then
	FloatAd=split(rs(0),"$")
	IsFloatAd=rs("IsFloatAd")
end if
rs.close
set rs=nothing
%>
<form name="myform" method="post" action="FloatAd.asp">
 <input type=hidden name=action value=save>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#000000" style="border-collapse: collapse;font-family: 宋体; font-size: 9pt">
    <tr align="center"> 
      <td height="50" colspan="2" class="tdstyle"><font size="3"><strong>首面浮动图片广告设置</strong></font></td>
    </tr>
    <tr> 
      <td width="15%" height="20" align="center" class="tdstyle">是否开启</td>
      <td height="20" class="tdstyle"><input type=radio name="IsFloatAd" value="0" <%if IsFloatAd=0 then%>checked<%end if%>>
        否  <input type=radio name="IsFloatAd" value="1" <%if IsFloatAd=1 then%>checked<%end if%>>
        是</td>
    </tr>
    <tr> 
      <td height="20" align="center" class="tdstyle">图片地址</td>
      <td height="20" class="tdstyle"> <input size="70" name="FloatAd" value="<%=FloatAd(0)%>"></td>
    </tr>
    <tr> 
      <td height="20" align="center" class="tdstyle">链接地址</td>
      <td height="20" class="tdstyle"> <input size="70" name="FloatAd" value="<%=FloatAd(1)%>"></td>
    </tr>
	<tr> 
      <td height="20" align="center" class="tdstyle">链接说明</td>
      <td height="20" class="tdstyle"> <input size="70" name="FloatAd" value="<%=FloatAd(2)%>"></td>
    </tr>
    <tr> 
      <td height="30" colspan="2" align="center" class="tdstyle"><input type="submit" name="Submit"class=button  value="提 交"></td>
    </tr>
  </table>
</form>
</BODY>
</HTML>
<%
end sub        
sub Msave()
	MFloatAd=REPLACE(request("FloatAd"),", ","$")
	MIsFloatAd=request("IsFloatAd")
	if MIsFloatAd="" then:MIsFloatAd=0
	set rs =conn.execute("select FloatAd from [Config]")
	if rs.eof then
		conn.execute("Insert into Config(FloatAd,IsFloatAd)values('"&MFloatAd&"','"&MIsFloatAd&"')")
	else
		conn.execute("update Config set FloatAd='"&MFloatAd&"',IsFloatAd="&MIsFloatAd&"")
	end if
	rs.close
	set rs=nothing
	call makeFloatAd(MFloatAd,MIsFloatAd)
	Response.write "<script>alert(""修改成功!"");location.href=""FloatAd.asp"";</script>"
end sub

sub makeFloatAd(code,isf)
	FloatAd=split(code,"$")
	if isf="1" then
		dim JS_Body
		set objFso = server.CreateObject("scripting.filesystemobject")
		set Fso = objFso.opentextfile(server.mappath("../../Ads/FloatAd_Body.js"),1)
		JS_Body = Fso.readall
		Fso.close
		set Fso = nothing
		
		dim JS
		JS=JS+"<!-- Begin"&vbcrlf
		JS=JS+"var floatimg='"&FloatAd(0)&"';"&vbcrlf
		JS=JS+"var floaturl='"&FloatAd(1)&"';"&vbcrlf
		JS=JS+"var floattitle='"&FloatAd(2)&"';"&vbcrlf
		JS=JS+JS_Body
		JS=JS+"//  End -->"&vbcrlf
	else
		JS=""
	end if
	FolderPath = Server.MapPath("../../Ads")
	Set fso = Server.CreateObject("Scripting.FileSystemObject")
	Set fout = fso.CreateTextFile(FolderPath&"/FloatAd.js")
	fout.WriteLine JS
	JS=""
	'关闭连接
	fout.close
	set fout = nothing
	
end sub
%>

⌨️ 快捷键说明

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