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

📄 adv2.asp

📁 这是一个很漂亮的网站购物系统
💻 ASP
字号:
<!--#include file="../include/buyok_shop_30_conn.asp"-->
<!--#include file="checkadmin.asp"-->
<script language=javascript src=../include/mouse_on_title.js></script>
<%call checkmanage("02")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
</head>
<BODY background="../images/admin/back.gif">

<%
action=request("ok")
flash=request("flash")
if action="" then 
Set rs = conn.Execute("select * from adv") 
if flash="" then flash=rs("flash")
%>

	<table width="98%" border="1"  style="border-collapse: collapse; border-style: dotted; border-width: 0px"  bordercolor="#333333" cellspacing="0" cellpadding="2">
	<form action=adv2.asp method=post name=adv>
	
	<tr class=backs><td colspan=2 class=td height=18>横幅图片设置</td></tr>

    <tr>
      <td width=20% align=right height="18">图片类型</td><td><input type="radio" value="0" <%if flash=0 then%>checked<% end if%> name="flash" onclick="javascript:location.href='adv2.asp?flash=0';">JPG/GIF格式的图片<br><input type="radio" value="1"  <%if flash=1 then%> checked<% end if%> name="flash"  onclick="javascript:location.href='adv2.asp?flash=1';">Flash格式的图片<br><input type="radio" value="2"  <%if flash=2 then%> checked<% end if%> name="flash"  onclick="javascript:location.href='adv2.asp?flash=2';">隐藏横幅</td>
    </tr>

<%
if flash=1 then
%>
    <tr>
      <td width=20% align=right height="18">Flash图片</td><td> <input type=text value="<%=rs("flashurl")%>" name=flashurl size=40 maxlength=100> <INPUT TYPE="button" value="浏览"  onClick="window.open('upload.asp?fuptype=adv&fupname=banner&frmname=flashurl','blank_','scrollbars=yes,resizable=no,width=650,height=450')"></td>
    </tr>

    <tr>
      <td width=20% align=right height="18">Flash显示宽高</td><td> 宽:<input type=text value="<%=rs("flashwidth")%>" name=flashwidth  maxlength=3 size=6>象素&nbsp;&nbsp;   
        高:<input type=text value="<%=rs("flashheight")%>" name=flashheight size=6  maxlength=3>象素<br>[宽推荐值:758,高根据FLASH图片的实际宽高比决定]</td>
    </tr>
<%
elseif flash=0 then
%>
    <tr>
      <td width=20% align=right height="18">JPG/GIF图片</td><td> <input type=text value="<%=rs("hfpic")%>" name=hfpic size=40 maxlength=100> <INPUT TYPE="button" value="浏览"  onClick="window.open('upload.asp?fuptype=adv&fupname=banner&frmname=hfpic','blank_','scrollbars=yes,resizable=no,width=650,height=450')"></td>
    </tr>
    <tr>
      <td width=20% align=right height="18">链接</td><td> <input type=text value="<%=rs("hfurl")%>" name=hfurl size=40 maxlength=100></td>
    </tr>
    <tr>
      <td width=20% align=right height="18">说明</td><td> <input type=text value="<%=rs("hftit")%>" name=hftit size=40 maxlength=100></td>
    </tr>
    <tr>
      <td width=20% align=right height="18">横幅装饰效果</td>
<td><input type="radio" value="0" <%if rs("bannerxiaoguo")=0 then%>checked<% end if%> name="bannerxiaoguo">无效果&nbsp; 
<input type="radio" value="1" <%if rs("bannerxiaoguo")=1 then%> checked<% end if%> name="bannerxiaoguo">星光&nbsp;
<input type="radio" value="2" <%if rs("bannerxiaoguo")=2 then%> checked<% end if%> name="bannerxiaoguo">焰火&nbsp;
<input type="radio" value="3" <%if rs("bannerxiaoguo")=3 then%> checked<% end if%> name="bannerxiaoguo">飘逸&nbsp;
<input type="radio" value="4" <%if rs("bannerxiaoguo")=4 then%> checked<% end if%> name="bannerxiaoguo">霓虹&nbsp;
<input type="radio" value="5" <%if rs("bannerxiaoguo")=5 then%> checked<% end if%> name="bannerxiaoguo">光圈&nbsp;
<input type="radio" value="6" <%if rs("bannerxiaoguo")=6 then%> checked<% end if%> name="bannerxiaoguo">光影&nbsp;
<input type="radio" value="7" <%if rs("bannerxiaoguo")=7 then%> checked<% end if%> name="bannerxiaoguo">鲜花&nbsp;
<input type="radio" value="8" <%if rs("bannerxiaoguo")=8 then%> checked<% end if%> name="bannerxiaoguo">彩纸&nbsp;
<input type="radio" value="9" <%if rs("bannerxiaoguo")=9 then%> checked<% end if%> name="bannerxiaoguo">文字
</td></tr>
    <tr>
      <td width=20% align=right height="18">横幅效果垂直位置</td><td> <input type=text value="<%=rs("bannerxiaoguo_top")%>" name=bannerxiaoguo_top size=5 maxlength=3>   &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="<font color=red>重要提示:<br>当选择不同的界面时<br>横幅可能与其装饰效果错位<br>请适当调整该值"> </td>  </tr>

<%
end if
%>
	
	<tr><td colspan=2>
<INPUT name="ok" TYPE="hidden" value="ok"><INPUT name=action TYPE="submit" value="保存设置"></td></tr>
</form></table>
	<%
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
end if%>

<%              
if action="ok" then

	if flash=1 then
	if trim(request.form("flashurl"))="" then er=1
	if not isNumeric(request.form("flashwidth")) or not isNumeric(request.form("flashheight")) then er=3

	flashurl=request.form("flashurl")
	flashurl=split(flashurl,".")
	n=UBound(flashurl)
	if LCase(flashurl(n))<>"swf" then er=2

	elseif flash=0 then
	if trim(request.form("hfpic"))="" or trim(request.form("bannerxiaoguo"))="" then er=1

	IF not isNumeric(request.form("bannerxiaoguo_top")) then er=3

	hfpic=request.form("hfpic")
	hfpic=split(hfpic,".")
	n=UBound(hfpic)
	if LCase(hfpic(n))<>"jpg" and LCase(hfpic(n))<>"gif"  then er=2

	end if


	if er=1 then
	response.write "<script language='javascript'>"
	response.write "alert('出错了,资料填写不完整,或者不符合要求,单击“确定”返回上一页!');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	if er=2 then
	response.write "<script language='javascript'>"
	response.write "alert('出错了,您填写的图片格式不正确,单击“确定”返回上一页!');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	if er=3 then
	response.write "<script language='javascript'>"
	response.write "alert('出错了,宽高尺寸、位置等要求填写数字,单击“确定”返回上一页!');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if


     Set rs=Server.CreateObject("ADODB.Recordset")
	 sql="select * from adv"
	 rs.open sql,conn,1,3
 	 rs("flash")=request.form("flash")
	if flash=1 then
 	 rs("flashurl")=trim(request.form("flashurl"))
 	 rs("flashwidth")=trim(request.form("flashwidth"))
 	 rs("flashheight")=trim(request.form("flashheight"))
	elseif flash=0 then
 	 rs("hfpic")=trim(request.form("hfpic"))
 	 rs("hfurl")=trim(request.form("hfurl"))
 	 rs("hftit")=trim(request.form("hftit"))
	 rs("bannerxiaoguo")=trim(request.form("bannerxiaoguo"))
	 rs("bannerxiaoguo_top")=trim(request.form("bannerxiaoguo_top"))
	end if

	rs.update
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing

	response.write "<script language='javascript'>"
	response.write "alert('横幅图片设置成功!');"
	response.write "location.href='adv2.asp';"
	response.write "</script>"
	response.end
end if%>

</body>
</html>

⌨️ 快捷键说明

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