<!--#include file="conn.asp"-->
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录！');location.href='index.asp' ;</script>"
response.End
else
if request.cookies("sundxshop")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录！');location.href='index.asp' ;</script>"
response.End
end if
end if

if request.form("action") = "save" then
if session("rank")>1 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('你无权设置广告！');history.go(-1);</script>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from ad",conn,1,3
rs("bigpic")=trim(request.form("bigpic"))
rs("bigurl")=trim(request.form("bigurl"))
rs("top")=trim(request.form("top"))
rs("topurl")=trim(request.form("topurl"))
rs("toptxt")=trim(request.form("toptxt"))
rs("top1")=trim(request.form("top1"))
rs("top1url")=trim(request.form("top1url"))
rs("top1txt")=trim(request.form("top1txt"))
rs("top2")=trim(request.form("top2"))
rs("top2url")=trim(request.form("top2url"))
rs("top2txt")=trim(request.form("top2txt"))
rs("top3")=trim(request.form("top3"))
rs("top3url")=trim(request.form("top3url"))
rs("top3txt")=trim(request.form("top3txt"))
rs("top4")=trim(request.form("top4"))
rs("top4url")=trim(request.form("top4url"))
rs("top4txt")=trim(request.form("top4txt"))
rs("top5")=trim(request.form("top5"))
rs("top5url")=trim(request.form("top5url"))
rs("top5txt")=trim(request.form("top5txt"))
rs("middle")=trim(request.form("middle"))
rs("middleurl")=trim(request.form("middleurl"))
rs("bottom")=trim(request.form("bottom"))
rs("bottomurl")=trim(request.form("bottomurl"))
rs("left1")=trim(request.form("left1"))
rs("left1url")=trim(request.form("left1url"))
rs("left2")=trim(request.form("left2"))
rs("left2url")=trim(request.form("left2url"))
rs("left3")=trim(request.form("left3"))
rs("left3url")=trim(request.form("left3url"))
rs("zuo1")=trim(request.form("zuo1"))
rs("zuo1url")=trim(request.form("zuo1url"))
rs("zuo2")=trim(request.form("zuo2"))
rs("zuo2url")=trim(request.form("zuo2url"))
rs("zuo3")=trim(request.form("zuo3"))
rs("zuo3url")=trim(request.form("zuo3url"))
rs("zuo4")=trim(request.form("zuo4"))
rs("zuo4url")=trim(request.form("zuo4url"))
rs("right1")=trim(request.form("right1"))
rs("right1url")=trim(request.form("right1url"))
rs("right2")=trim(request.form("right2"))
rs("right2url")=trim(request.form("right2url"))
rs("right3")=trim(request.form("right3"))
rs("right3url")=trim(request.form("right3url"))
rs("adleft")=trim(request.form("adleft"))
rs("adlefturl")=trim(request.form("adlefturl"))
rs("adright")=trim(request.form("adright"))
rs("adrighturl")=trim(request.form("adrighturl"))
rs.update
rs.close
set rs=nothing
conn.close
set conn = nothing
response.write "<script language=javascript>alert('修改成功！');history.go(-1);</script>"
response.End
end if
%>
<title>广告设置</title>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" BGCOLOR="#39867B">
  <tr> 
    <td align="center"><font color="#FFFFFF">网站广告设置</font></td>
  </tr>
  <tr> 
    <td height="200" valign="top" bgcolor="#FFFFFF"> 
	<form name="form1" method="post" action="ad.asp">
        <table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
          <tr bgcolor="#FFFFFF"> 
            <td WIDTH="20%"></td>
            <td WIDTH="40%" > 图片地址</td>
            <td> 图片广告链接(连接外部网址前面请加http://)</td>
            <td> 文字</td>
          </tr>
          <tr> 
            <td colspan="4" bgcolor="#FFFFFF"><strong>网站首页广告设置</strong>：</td>
          </tr>
		  <%set rs=server.CreateObject("adodb.recordset")
			rs.open "select * from ad",conn,1,1 %> 
          <tr> 
            <td bgcolor="#FFFFFF">首页大广告：</td>
            <td bgcolor="#FFFFFF"><input name="bigpic" type="text" id="bigpic" size="28" value=<%=trim(rs("bigpic"))%>>
              <input type="button" name="Submit12" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=bigpic&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td bgcolor="#FFFFFF" colspan="2"><INPUT NAME="bigurl" TYPE="text" ID="bigurl" SIZE="28" VALUE="<% = rs("bigurl") %>"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>中间上部0(580*160|格式jpg/gif)：</td>
            <td> <input name="top" type="text" id="top" size="28" value=<%=trim(rs("top"))%>>
              <input type="button" name="Submit122" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=top&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
            </td>
            <td > <input name="topurl" type="text" id="topurl" size="28" value=<%=trim(rs("topurl"))%>> 
            </td>
            <td><input name="toptxt" type="text" id="toptxt" size="28" value=<%=trim(rs("toptxt"))%>></td>
          </tr>
           <tr bgcolor="#FFFFFF"> 
            <td>中间上部1(580*160|格式jpg/gif)：</td>
            <td> <input name="top1" type="text" id="top1" size="28" value=<%=trim(rs("top1"))%>>
              <input type="button" name="Submit1221" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=top1&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
            </td>
            <td > <input name="top1url" type="text" id="top1url" size="28" value=<%=trim(rs("top1url"))%>> 
            </td>
              <td><input name="top1txt" type="text" id="top1txt" size="28" value=<%=trim(rs("top1txt"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>中间上部2(580*160|格式jpg/gif)：</td>
            <td> <input name="top2" type="text" id="top2" size="28" value=<%=trim(rs("top2"))%>>
              <input type="button" name="Submit1222" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=top2&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
            </td>
            <td > <input name="top2url" type="text" id="top2url" size="28" value=<%=trim(rs("top2url"))%>> 
            </td>
             <td><input name="top2txt" type="text" id="top2txt" size="28" value=<%=trim(rs("top2txt"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>中间上部3(580*160|格式jpg/gif)：</td>
            <td> <input name="top3" type="text" id="top3" size="28" value=<%=trim(rs("top3"))%>>
              <input type="button" name="Submit1223" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=top3&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
            </td>
            <td > <input name="top3url" type="text" id="top3url" size="28" value=<%=trim(rs("top3url"))%>> 
            </td>
             <td><input name="top3txt" type="text" id="top3txt" size="28" value=<%=trim(rs("top3txt"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>中间上部4(580*160|格式jpg/gif：</td>
            <td> <input name="top4" type="text" id="top4" size="28" value=<%=trim(rs("top4"))%>>
              <input type="button" name="Submit1224" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=top4&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
            </td>
            <td > <input name="top4url" type="text" id="top4url" size="28" value=<%=trim(rs("top4url"))%>> 
            </td>
             <td><input name="top4txt" type="text" id="top4txt" size="28" value=<%=trim(rs("top4txt"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>中间上部5(580*160|格式jpg/gif)：</td>
            <td> <input name="top5" type="text" id="top5" size="28" value=<%=trim(rs("top5"))%>>
              <input type="button" name="Submit1225" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=top5&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
            </td>
            <td > <input name="top5url" type="text" id="top5url" size="28" value=<%=trim(rs("top5url"))%>> 
            </td>
             <td ><input name="top5txt" type="text" id="top5txt" size="28" value=<%=trim(rs("top5txt"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>中间中部：</td>
            <td> <input name="middle" type="text" id="middle" size="28" value=<%=trim(rs("middle"))%>>
              <input type="button" name="Submit123" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=middle&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
            </td>
            <td colspan="2"> <input name="middleurl" type="text" id="middleurl" size="28" value=<%=trim(rs("middleurl"))%>> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>中间下部：</td>
            <td> <input name="bottom" type="text" id="bottom" size="28" value=<%=trim(rs("bottom"))%>>
              <input type="button" name="Submit124" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=bottom&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
            </td>
            <td colspan="2"><input name="bottomurl" type="text" id="bottomurl" size="28" value=<%=trim(rs("bottomurl"))%>> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>首页左上：</td>
            <td><input name="left1" type="text" id="left1" size="28" value=<%=trim(rs("left1"))%>>
              <input type="button" name="Submit125" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=left1&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="left1url" type="text" id="left1url" size="28" value=<%=trim(rs("left1url"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>首页左中：</td>
            <td><input name="left2" type="text" id="left2" size="28" value=<%=trim(rs("left2"))%>>
              <input type="button" name="Submit126" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=left2&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="left2url" type="text" id="left2url" size="28" value=<%=trim(rs("left2url"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>首页左下：</td>
            <td><input name="left3" type="text" id="left3" size="28" value=<%=trim(rs("left3"))%>>
              <input type="button" name="Submit127" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=left3&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><INPUT NAME="left3url" TYPE="text" ID="left3url" SIZE="28" VALUE=<%=trim(rs("left3url"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>首页右上：</td>
            <td><input name="right1" type="text" id="right1" size="28" value=<%=trim(rs("right1"))%>>
              <input type="button" name="Submit128" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=right1&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="right1url" type="text" id="right1url" size="28" value=<%=trim(rs("right1url"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>首页右中：</td>
            <td><input name="right2" type="text" id="right2" size="28" value=<%=trim(rs("right2"))%>>
              <input type="button" name="Submit129" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=right2&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="right2url" type="text" id="right2url" size="28" value=<%=trim(rs("right2url"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>首页右下：</td>
            <td><input name="right3" type="text" id="right3" size="28" value=<%=trim(rs("right3"))%>>
              <input type="button" name="Submit1210" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=right3&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"> <input name="right3url" type="text" id="right3url" size="28" value=<%=trim(rs("right3url"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td colspan="4"><strong>分类页面广告设置</strong>：</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>页面左侧1：</td>
            <td><input name="zuo1" type="text" id="zuo1" size="28" value=<%=trim(rs("zuo1"))%>>
              <input type="button" name="Submit1211" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=zuo1&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="zuo1url" type="text" id="zuo1url" size="28" value=<%=trim(rs("zuo1url"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>页面左侧2：</td>
            <td><input name="zuo2" type="text" id="zuo2" size="28" value=<%=trim(rs("zuo2"))%>>
              <input type="button" name="Submit1212" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=zuo2&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="zuo2url" type="text" id="zuo2url" size="28" value=<%=trim(rs("zuo2url"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>页面左侧3：</td>
            <td><input name="zuo3" type="text" id="zuo3" size="28" value=<%=trim(rs("zuo3"))%>>
              <input type="button" name="Submit1213" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=zuo3&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="zuo3url" type="text" id="zuo3url" size="28" value=<%=trim(rs("zuo3url"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>页面左侧4：</td>
            <td><input name="zuo4" type="text" id="zuo4" size="28" value=<%=trim(rs("zuo4"))%>>
              <input type="button" name="Submit1214" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=zuo4&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="zuo4url" type="text" id="zuo4url" size="28" value=<%=trim(rs("zuo4url"))%>></td>
          </tr>
         <tr bgcolor="#FFFFFF"> 
            <td colspan="4"><strong>浮动广告设置</strong>：</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>浮动左侧：</td>
            <td><input name="adleft" type="text" id="adleft" size="28" value=<%=trim(rs("adleft"))%>>
              <input type="button" name="Submit1215" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=adleft&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="adlefturl" type="text" id="adlefturl" size="28" value=<%=trim(rs("adlefturl"))%>></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td>浮动右侧：</td>
            <td><input name="adright" type="text" id="adright" size="28" value=<%=trim(rs("adright"))%>>
              <input type="button" name="Submit1216" value="上传图片" onClick="window.open('upfile.asp?formname=form1&editname=adright&uppath=images/guanggao&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
            <td colspan="2"><input name="adrighturl" type="text" id="adrighturl" size="28" value=<%=trim(rs("adrighturl"))%>></td>
          </tr>
		  <% rs.close
			 set rs=nothing 
			 conn.close
			 set conn = nothing %>
          <tr bgcolor="#FFFFFF" align="center"> 
            <td height="32" colspan="4"> 
			<input name="action" type="hidden" value="save">
			<input type="submit" name="Submit" value="提交更改"></td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>
<!--#include file="footer.asp"-->

