<!--#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
dim sid
id=SafeRequest("id",1)
if FormatSQL(SafeRequest("action",0))="save" then
if session("rank")>2 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 sdx_opay where opayid="&id,conn,1,3
rs("opaypic")=trim(request.form("opaypic"))
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript>alert('更改成功！');history.go(-1);</script>"
response.End
end if
%>
<title>上传广告图片</title>
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from sdx_opay where opayid="&id,conn,1,1%>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" BGCOLOR="#39867B">
  <tr> 
    <td align="center"><font color="#FFFFFF">编辑修改图片</font></td>
  </tr>
  <tr align="center" bgcolor="#FFFFFF"> 
      <td align="center">
    <table width="80%" border="0" align="center" cellpadding="1" cellspacing="1" BGCOLOR="#39867B">
      <form name="form1" method="post" action="upopaypic.asp?action=save&id=<%=rs("opayid")%>"> 
         <tr align="center"> 
       <td height="50" valign="top" bgcolor="#FFFFFF"> 
	<img src=../<%=rs("opaypic")%> border=0 width="600"  style="border: 1px solid #C0C0C0">
    </td>
      </tr> 
     <tr align="center"> 
     
    <td height="50" valign="top" bgcolor="#FFFFFF"> 
	<input class=shopinput1 name="opaypic" TYPE="text" ID="opaypic" SIZE="50"   value="<%=rs("opaypic")%>">
             <input class=shopinput1 type="button" name="Submit119" value="上传" onClick="window.open('upfile.asp?formname=form1&editname=opaypic&uppath=images/upfile&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 
    </td>
  </tr>
<tr bgcolor="#FFFFFF" align="center"> 
            <td height="28" colspan="3" bgcolor="#FFFFFF" style="PADDING-LEFT: 6px"> 
              <input class=shopinput1 type="submit" name="Submit" value="提交发表"> &nbsp;<a href=admin_opay.asp>返回</a></td>
          </tr>
  </form>
</table>
<%    rs.close
set rs = Nothing
%>
<!--#include file="footer.asp"-->