<!--#include file="../include/hf_conn.asp"-->
<!--#include file="checkadmin.asp"-->
<!--#include file="Inc/Ubbcode.asp"-->
<!--#include file="Inc/Function.asp"-->
<!--#include FILE="inc/upload_5xsoft.inc"-->
<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">
<%
dim ProductID,rsArticle,FoundErr,ErrMsg
ProductID=trim(request("ProductID"))
FoundErr=False
if ProductID="" then 
	response.Redirect("productManage.asp")
end if
sql="select * from Product where ProductID=" & ProductID & ""
Set rsArticle= Server.CreateObject("ADODB.Recordset")
rsArticle.open sql,conn,1,1
if FoundErr=True then
	call WriteErrMsg()
else
%>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
'sql = "select * from SmallClass order by SmallClassID asc"
'rs.open sql,conn,1,1
%>
<script language = "JavaScript">
/*var onecount;
subcat = new Array();
<%
'count = 0
'do while not rs.eof 
%>
subcat[<%'=count%>] = new Array("<%'= trim(rs("SmallClassName"))%>","<%'= trim(rs("BigClassName"))%>","<%'= trim(rs("SmallClassName"))%>");
<%
'count = count + 1
'rs.movenext
'loop
'rs.close
%>
onecount=<%=count%>;

function changelocation(locationid)
{
document.myform.SmallClassName.length = 1; 
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{ 
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}*/


</script>
<body onLoad="javascipt:setTimeout('loadForm()',1000);">
<table width="98%" border="1"  style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<tr> 
<td align="center" valign="top" class=td>
<br>
<b>修 改 产 品</b>
<br>
	<form action="ProductSave.asp" method="POST" enctype="multipart/form-data" name="myform" onSubmit="return CheckForm();">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr align="center">
<td class="tdbg">
	<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666">
<tr> 
<td height="22" align="right" bgcolor="#C0C0C0" width="150">所属类别：</td>
<td bgcolor="#E3E3E3"> 
<%
	if session("purview")=3 or session("purview")=4 then
		response.write rsArticle("BigClassName") & "<input name='BigClassName' type='hidden' value='" & rsArticle("BigClassName") & "'>"
	else		
sql = "select * from BigClass"
rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加分类。"
		else
		%>
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
<%
		do while not rs.eof
			%>
<option <% if rs("BigClassID")=rsArticle("BigClassID") then response.Write("selected") end if%> value="<%=trim(rs("BigClassID"))%>"><%=trim(rs("BigClassName"))%>//<%=trim(rs("BigClassName_en"))%></option>
<%
		rs.movenext
	loop
		end if
rs.close
			%>
</select> 
<%
	end if
	'if session("purview")=4 then
	'	response.write rsArticle("SmallClassName") & "<input name='SmallClassName' type='hidden' value='" & rsArticle("SmallClassName") & "'>"
	'else
	%>
<!--<select name="SmallClassName">
<option value="" <%'if rsArticle("SmallClassName")="" then response.write "selected"%>>不指定小类</option>
<%
	'		sql="select * from SmallClass where BigClassName='" & rsArticle("BigClassName") & "'"
	'		rs.open sql,conn,1,1
	'		if not(rs.eof and rs.bof) then
	'			do while not rs.eof%>
<option <%' if rs("SmallClassName")=rsArticle("SmallClassName") then response.Write("selected") end if%> value="<%'=rs("SmallClassName")%>"><'%=rs("SmallClassName")%></option>
<%
				'rs.movenext
				'loop
			'end if
'	rs.close
			%>
</select> -->
<%
	'end if
	%>
</td>
</tr>
<tr> 
<td height="22" align="right" bgcolor="#C0C0C0">产品编号：</td>
<td bgcolor="#E3E3E3">
<input name="Product_Id" type="text"
 id="Product_Id" value="<%=rsArticle("Product_Id")%>" size="9" maxlength="9"> 
<font color="#FF0000">*</font> </td>
</tr>
<tr> 
<td height="22" align="right" bgcolor="#C0C0C0">产品名称：</td>
<td bgcolor="#E3E3E3">
<input name="title" type="text"
 id="title" value="<%=rsArticle("Title")%>" size="25" maxlength="40"> / <input name="title_en" type="text"
 id="title_en" value="<%=rsArticle("Title_en")%>" size="25" maxlength="40">  
<font color="#FF0000">*</font></td>
</tr>
				<tr> 
<td height="22" align="right" bgcolor="#C0C0C0">产品图片：</td>
<td bgcolor="#E3E3E3">
				<% if rsArticle("DefaultPicUrl")<>"" then %><img src="../<%=rsArticle("DefaultPicUrl")%>" width="150" border="0"><%else%>
				尚未上传图片<%end if%>
				<br>
				重新上传 <INPUT type="file" name="file" style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 value="">（文件大小限制为200KB）</td>
</tr>
				<tr> 
<td height="22" align="right" bgcolor="#C0C0C0">已通过审核：</td>
<td bgcolor="#E3E3E3">
<input name="Passed" type="checkbox" id="Passed" value="yes" <% if rsArticle("Passed")=true then response.Write("checked") end if%>>
是<font color="#0000FF">（如果选中的话将直接发布）</font></td>
</tr>
<tr> 
<td height="22" align="right" bgcolor="#C0C0C0">特别推荐：</td>
<td bgcolor="#E3E3E3">
<input name="Elite" type="checkbox" id="Elite" value="yes" <% if rsArticle("Elite")=true then response.Write("checked") end if%>>
是<font color="#0000FF">（如果选中的话将在推荐栏目发布）</font></td>
</tr>


<input name="Key" type="hidden" id="Key" value="<%=trim(rsArticle("Key"))%>" size="50" maxlength="255"> 

<tr> 
<td height="22" align="right" valign="middle" bgcolor="#C0C0C0">产品说明：</td>
<td bgcolor="#E3E3E3">
<strong>中文说明:</strong><br>
<textarea name="Content" style="display:none"><%=rsArticle("Content")%></textarea>
<iframe ID="Editor" src="../webedit/ewebeditor.asp?id=content&style=standard" frameborder="0" scrolling="no" width="95%" HEIGHT="300"></iframe><br><br>
<strong>英文说明:</strong>
<textarea name="Content_en" style="display:none"><%=rsArticle("Content_en")%></textarea>
<iframe ID="Editor2" src="../webedit/ewebeditor.asp?id=content_en&style=standard" frameborder="0" scrolling="no" width="95%" HEIGHT="300"></iframe>
</td>
</tr>
<tr> 
<td height="22" align="right" bgcolor="#C0C0C0">录入时间：</td>
<td bgcolor="#E3E3E3">
<input name="UpdateTime" type="text" id="UpdateTime" value="<%=now()%>" maxlength="50">
当前时间为：<%=now()%> 注意不要改变格式。</td>
</tr>
</table>
</td>
</tr>
</table>
<div align="center">
<p>
<input name="ProductID" type="hidden" id="ProductID" value="<%=rsArticle("ProductID")%>">
<input
name="Save" type="submit"id="Save" value="保存修改结果">
</p>
</div>
</form>
</td>
</tr>
</table>
<%session("action")=("mod")
session("id")=rsArticle("ProductID")
%>
<%
end if
rsArticle.close
set rsArticle=nothing
call CloseConn()
%>