<%
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 shopsetup") 
%>
<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">&nbsp;商品参数设置</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=prod4.asp method=post name=advsetup>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>商品属性名称</td>
      <td> 商品名称： 
        <input type=text value="<%=rs("ProdNametext")%>" name=prodname size="20" maxlength=6> 
        <img src=../images/admin/memo.gif alt="必填，如‘商品名称’等"><br>
        商品编号： 
        <input type=text value="<%=rs("ProdIdtext")%>" name=prodid size="20" maxlength=6> 
        <img src=../images/admin/memo.gif alt="必填，如‘商品编号’等"><br>
        原价名称： 
        <input type=text value="<%=rs("PriceOrigintext")%>" name=shichang size="20" maxlength=6> 
        <img src=../images/admin/memo.gif alt="必填，如‘商品原价’等"><br>
        现价名称： 
        <input type=text value="<%=rs("PriceListtext")%>" name=remai size="20" maxlength=6>
        <img src=../images/admin/memo.gif alt="必填，如‘商品现价’等"><br>
        会员价格： 
        <input type=text value="<%=rs("zidingyi2")%>" name=zidingyi2 size="20" maxlength=6>
        <img src=../images/admin/memo.gif alt="必填，如‘会员价，VIP价’等"><br>
        赠送积分： 
        <input name=jifenname type=text id="jifenname" value="<%=rs("jifenname")%>" size="20" maxlength=6> 
        <img src=../images/admin/memo.gif alt="选填，如‘获得积分’等"> 
        <br>
        商品简介： 
        <input type=text value="<%=rs("ProdDisctext")%>" name=proddisc size="20" maxlength=6> 
        <img src=../images/admin/memo.gif alt="必填，如‘商品简介’等"><br>
        商品介绍： 
        <input type=text value="<%=rs("MemoSpectext")%>" name=MemoSpec size="20" maxlength=6> 
        <img src=../images/admin/memo.gif alt="必填，如‘详细介绍’等"><br>
        商品参数一： 
        <input type=text value="<%=rs("Modeltext")%>" name=modeltext size="20" maxlength=6> 
        <img src=../images/admin/memo.gif alt="选填，如‘商品型号’等"><br>
        商品参数二： 
        <input name=prodtext1 type=text id="prodtext1" value="<%=rs("prodtext1")%>" size="20" maxlength=6> 
        <img src=../images/admin/memo.gif alt="选填，如‘商品品牌’等"> <br>
        商品参数三： 
        <input name=prodtext2 type=text id="prodtext2" value="<%=rs("prodtext2")%>" size="20" maxlength=6>
        <img src=../images/admin/memo.gif alt="选填，如‘商品产地’等"> </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan=2><INPUT name="ok" TYPE="hidden" value="ok">
        <INPUT name="zidingyi1" TYPE="hidden" value="自定义一"> 
        <INPUT TYPE="submit" value="保存设置"> 
        &nbsp;</td>
    </tr>
  </form>
</table>

<%
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
end if%>
<%              
if action="ok" then

	if len(request.form("prodname"))>8 or len(request.form("prodid"))>8 or len(request.form("shichang"))>8 or len(request.form("remai"))>8 or len(request.form("proddisc"))>8 or len(request.form("MemoSpec"))>8 or len(request.form("modeltext"))>8 or len(request.form("prodtext1"))>8 then
	response.write "<script language='javascript'>"
	response.write "alert('您填写的参数内容太长，请不要超过8个文字，单击“确定”返回上一页！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

     Set rs=Server.CreateObject("ADODB.Recordset")
	 sql="select * from shopsetup"
	 rs.open sql,conn,1,3
rs("ProdIdtext")=request.form("prodid")	'编号名称
rs("ProdNametext")=request.form("prodname")	'品名名称
rs("PriceOrigintext")=request.form("shichang")	'原价名称
rs("PriceListtext")=request.form("remai")  '现价名称
rs("ProdDisctext")=request.form("proddisc")	'简介名称
rs("MemoSpectext")=request.form("MemoSpec")'商品介绍名称
rs("Modeltext")=request.form("Modeltext")	'型号名称
rs("prodtext1")=request.form("prodtext1")'商品介绍名?
rs("prodtext2")=request.form("prodtext2")	'型号名称
rs("zidingyi1")=request.form("zidingyi1")'自定义一名称
rs("zidingyi2")=request.form("zidingyi2")
rs("jifenname")=request.form("jifenname")

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

	response.write "<script language='javascript'>"
	response.write "alert('操作成功，您设置的商品参数已保存！');"
	response.write "location.href='prod4.asp';"
	response.write "</script>"
	response.end
end if%>
