<%
if request.cookies("buyok")("admin")="" then response.write "<meta http-equiv='refresh' content='0;URL=../admin.asp'>"
%>
<!--#include file="../include/config.asp"-->

<script language=javascript src=../include/mouse.js></script>
<%
sub checkmanage(str)
Set mrs = conn.Execute("select * from manage where username='"&request.cookies("buyok")("admin")&"'")
if not (mrs.bof and mrs.eof) then
manage=mrs("manage")
if instr(manage,str)<=0 then
response.write "<script language='javascript'>"
response.write "alert('警告：您没有此项操作的权限！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
else
session("buyok_admin_login")=0
end if
else 
response.write "<script language='javascript'>"
response.write "alert('没有登陆，不能执行此操作！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
end if
set mrs=nothing
end sub
%>
<%call checkmanage("03")%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../images/css.css" type=text/css rel=stylesheet>
<LINK href="../list/newhead.css" type=text/css rel=stylesheet>
</head>
<BODY bgcolor="#D9EAFC">

<%action=request("ok")
if action="" then 
Set rs = conn.Execute("select * from shuiyin") 
%>
		  <table height="5"><tr><td></td></tr></table>

<TABLE cellSpacing=0 cellPadding=0 width=95% border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>
  <TBODY>
    <TR>
      <TD width="90%" bgColor=#f4f5fd><font color="#000000">　<B><font color="#FF0000">商品图片水印设置</font></B></font></TD>
      <TD bgColor=#f4f5fd height=30></TD>
    </TR>
  </TBODY>
</TABLE>
		  <table height="5"><tr><td></td></tr></table>
<table width="95%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#b1bfee">
  <form action=shuiyin.asp method=post name=setup>
    <tr>
      <td align=right bgcolor="#FFFFFF">水印开关：</td>
      <td bgcolor="#FFFFFF"><input type="radio" name="kaiguan" value="1" <%if rs("kaiguan")<>0 then%>checked<%end if%>>
        开启
<input type="radio" name="kaiguan" value="0" <%if rs("kaiguan")=0 then%>checked<%end if%>>
        关闭</td>
    </TR>
    <tr> 
      <td width=20% align=right bgcolor="#FFFFFF">水印颜色：&nbsp;</td>
      <td bgcolor="#FFFFFF"> <input name=yanse type=text id="yanse" value="<%=rs("yanse")%>" size=20 maxlength="20"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="格式&H+6位颜色代码，如&Hffffff为白色；&Hcccccc为灰色；&Hff0000为红色"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>水印字体：&nbsp;</td>
      <td> <select name="ziti" id="ziti">
          <option value="宋体">宋体</option>
          <option value="宋体">黑体</option>
          <option value="楷体">楷体</option>
          <option value="隶书">隶书</option>
          <option value="幼圆">幼圆</option>
        </select> &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="请选择水印字体"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>水印大小：&nbsp;</td>
      <td> <input name=daxiao type=text id="daxiao" value="<%=rs("daxiao")%>" size=20 maxlength="20"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="水印字体大小"> </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>位置（X）：&nbsp;</td>
      <td> <input name=x type=text id="x" value="<%=rs("x")%>" size=20 maxlength="20"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="水印在图片上的横坐标位置"> </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>位置（Y）：&nbsp;</td>
      <td> <input name=y type=text id="y" value="<%=rs("y")%>" size=20 maxlength="20"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="水印在图片上的纵坐标位置"> </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>水印内容：&nbsp;</td>
      <td> <input name=neirong type=text id="neirong" value="<%=rs("neirong")%>" size=20 maxlength="20"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="水印文字内容，如www.mcvrlab.com"> 
      </td>
    </TR>
    <tr bgcolor="#FFFFFF"> 
      <td colspan=2><INPUT name="ok" TYPE="hidden" value="ok"> <INPUT name=action TYPE="submit" value="保存设置"></td>
    </tr>
  </form>
</table>
<table height="5"><tr><td></td></tr></table>

<%
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
if action="ok" then
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from shuiyin"
rs.open sql,conn,1,3
rs("kaiguan")=trim(request.form("kaiguan"))
rs("yanse")=trim(request.form("yanse"))
rs("ziti")=trim(request.form("ziti"))
rs("daxiao")=trim(request.form("daxiao"))
rs("x")=trim(request.form("x"))
rs("y")=trim(request.form("y"))
rs("neirong")=request.form("neirong")
rs.update
url="shuiyin.asp"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script language='javascript'>"
response.write "alert('操作成功，您设置的信息已经保存！');"
response.write "location.href='"&url&"';"
response.write "</script>"
end if%>
