<!--#include file="../include/hf_conn.asp"-->
<!--#include file="checkadmin.asp"-->
<script language=javascript src=../include/mouse_on_title.js></script>
<%call checkmanage("03")%>
<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")
if action="" then 
    Set rs = conn.Execute("select * from hfvipsetup") 
	%>
	<table width="98%" border="1"  style="border-collapse: collapse; border-style: dotted; border-width: 0px"  bordercolor="#333333" cellspacing="0" cellpadding="2">
	<form action=prod4.asp method=post name=setup>
	<tr class=backs><td colspan=2 class=td height=18>产品管理选项 &nbsp;</td></tr>

	<tr><td width=20% align=right>产品属性名称</td><td>
    产品名称：<input type=text value="<%=rs("prodname")%>" name=prodname size="20" maxlength=5> <img src=../images/admin/memo.gif alt="必填，如‘产品名称’等"><br>
    产品编号：<input type=text value="<%=rs("prodid")%>" name=prodid size="20" maxlength=5> <img src=../images/admin/memo.gif alt="必填，如‘产品编号’等"><br>
    原价名称：<input type=text value="<%=rs("shichang")%>" name=shichang size="20" maxlength=5> <img src=../images/admin/memo.gif alt="必填，如‘产品原价’等"><br>
    现价名称：<input type=text value="<%=rs("remai")%>" name=remai size="20" maxlength=5> <img src=../images/admin/memo.gif alt="必填，如‘产品现价’等"><br>
    产品简介：<input type=text value="<%=rs("proddisc")%>" name=proddisc size="20" maxlength=5> <img src=../images/admin/memo.gif alt="必填，如‘产品简介’等"><br>
    产品介绍：<input type=text value="<%=rs("MemoSpec")%>" name=MemoSpec size="20" maxlength=5> <img src=../images/admin/memo.gif alt="必填，如‘详细介绍’等"><br>
    产品型号：<input type=text value="<%=rs("modeltext")%>" name=modeltext size="20" maxlength=5> <img src=../images/admin/memo.gif alt="选填，如‘产品型号’等"><br>
    自定义一：<input type=text value="<%=rs("prodtext1")%>" name=prodtext1 size="20" maxlength=5> <img src=../images/admin/memo.gif alt="选填，如‘产品品牌’、‘产品单位’、‘产品颜色’、‘产品规格’、‘产品产地’、‘生产厂家’等等"><br>
    自定义二：<input type=text value="<%=rs("prodtext2")%>" name=prodtext2 size="20" maxlength=5> <img src=../images/admin/memo.gif alt="选填">
	</td></tr>  

	<tr><td width=20% align=right>删除分类同步删除产品</td><td > <input type="radio" name="tree_del_yesorno" value="1" <%if rs("tree_del_yesorno")="1" then%>checked<%end if%>>是 <input type="radio" name="tree_del_yesorno" value="0" <%if rs("tree_del_yesorno")<>"1" then%>checked<%end if%>>否  <img src=../images/admin/memo.gif alt="选择是：删除产品分类时，同时删除所属全部产品<br>选择否：删除产品分类时，所属产品将转为“未归类产品”"></td></TR>
	<tr><td width=20% align=right>产品列表每页产品数</td><td> <input type=text value="<%=rs("per_page_num")%>" name=per_page_num size="5" maxlength=3> <img src=../images/admin/memo.gif alt="在“产品管理”操作页面中，每页显示的产品数量"></td></tr>
	<td width=20% align=center>产品列表排序方式
</td><td><input type="radio" name="paixu" value="1" <%if rs("paixu")="1" then%>checked<%end if%>>时间降 <input type="radio" name="paixu" value="2" <%if rs("paixu")="2" then%>checked<%end if%>>时间升<input type="radio" name="paixu" value="3" <%if rs("paixu")="3" then%>checked<%end if%>>编号降 <input type="radio" name="paixu" value="4" <%if rs("paixu")="4" then%>checked<%end if%>>编号升 <input type="radio" name="paixu" value="5" <%if rs("paixu")="5" then%>checked<%end if%>>名称 <input type="radio" name="paixu" value="6" <%if rs("paixu")="6" then%>checked<%end if%>>点击数</td></TR>


	<tr><td colspan=2><INPUT name="ok" TYPE="hidden" value="ok"><INPUT name=action TYPE="submit" value="保存设置"> &nbsp;</td></tr>
	</form>
	</table>

	<%
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
end if

if action="ok" then

if trim(request("prodname"))="" or trim(request("prodid"))="" or trim(request("proddisc"))="" or trim(request("shichang"))="" or trim(request("remai"))="" or trim(request("MemoSpec"))="" or trim(request("tree_del_yesorno"))=""  or trim(request("per_page_num"))="" or trim(request("paixu"))="" 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 not isNumeric(request("per_page_num")) 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 hfvipsetup"
	 rs.open sql,conn,1,3

 	 rs("tree_del_yesorno")=trim(request.form("tree_del_yesorno"))
 	 rs("per_page_num")=trim(request.form("per_page_num"))
 	 rs("paixu")=trim(request.form("paixu"))

 	 rs("MemoSpec")=trim(request.form("MemoSpec"))
 	 rs("proddisc")=trim(request.form("proddisc"))
 	 rs("prodid")=trim(request.form("prodid"))
 	 rs("prodname")=trim(request.form("prodname"))
 	 rs("shichang")=trim(request.form("shichang"))
 	 rs("remai")=trim(request.form("remai"))
	 rs("modeltext")=trim(request.form("modeltext"))
	 rs("prodtext1")=trim(request.form("prodtext1"))
	 rs("prodtext2")=trim(request.form("prodtext2"))

	rs.update
	url="prod4.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%>