<%@language=vbscript codepage=936 %>
<!--#include file="../include/hf_conn.asp"-->
<!--#include file="checkadmin.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 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]);
}
}
}
*/
function CheckForm()
{
if (editor.EditMode.checked==true)
	document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
else
	document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML; 

if (document.myform.Title.value=="")
{
alert("产品名称不能为空！");
	document.myform.Title.focus();
	return false;
}
if (document.myform.Product_Id.value=="")
{
alert("产品编号不能为空！");
	document.myform.Key.focus();
	return false;
}
if (document.myform.Key.value=="")
{
alert("关键字不能为空！");
	document.myform.Key.focus();
	return false;
}
if (document.myform.Content.value=="")
{
alert("产品介绍不能为空！");
	editor.HtmlEdit.focus();
	return false;
}
return true;
}
</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" target="_self" onSubmit="return CheckForm();">
<table width="100%" border="1"  style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<tr align="center"> 
<td class="tdbg"> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666">
<tr> 
<td width="150" height="22" align="right" >所属类别：</td>
<td bgcolor="#E3E3E3"> 
<%
sql = "select * from BigClass order by orderid"
rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加栏目。"
		else
		%>
<select name="BigClassName"  size="1">
<option selected value="<%=trim(rs("BigClassID"))%>"><%=trim(rs("BigClassName"))%>/<%=trim(rs("BigClassName_en"))%></option>
<%
			dim selclass
		selclass=rs("BigClassName")
	rs.movenext
		do while not rs.eof
			%>
<option value="<%=trim(rs("BigClassID"))%>"><%=trim(rs("BigClassName"))%>/<%=trim(rs("BigClassName_en"))%></option>
<%
		rs.movenext
	loop
		end if
rs.close
			%>
</select> 
 </td>
</tr>
<tr> 
<td width="150" height="22" align="right" >产品编号：</td>
<td bgcolor="#E3E3E3"> <input name="Product_Id" type="text"
 id="Product_Id2" value="NO." size="10" maxlength="10"> <font color="#FF0000">*</font></td>
</tr>
<tr> 
<td width="150" height="22" align="right" >产品名称/英文：</td>
<td bgcolor="#E3E3E3"> <input name="Title" type="text"
 id="Title2" size="25" maxlength="40">/<input name="Title_en" type="text"
 id="Title2" size="25" maxlength="40"><font color="#FF0000">*</font></td>
</tr>
<tr> 
<td width="150" height="22" align="right" >产品图片：</td>
<td bgcolor="#E3E3E3"> 
				<INPUT type="file" name="file" style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30>
				（文件大小限制为200KB，文件格式(.jpg .gif)，建议图片大小450×360）</td>
</tr>
<tr> 
<td width="150" height="22" align="right" >已通过审核：</td>
<td bgcolor="#E3E3E3"> <input name="Passed" type="checkbox" id="Passed2" value="yes" checked>
是<font color="#0000FF">（如果选中的话将直接发布）</font></td>
</tr>

<tr> 
<td height="22" align="right" bgcolor="#C0C0C0">特别推荐：</td>
<td bgcolor="#E3E3E3"><input name="Elite" type="checkbox" id="Passed" value="yes">
是<font color="#0000FF">（如果选中的话将在推荐栏目发布）</font></td>
</tr>

<!--
<tr> 
<td height="22" align="right" bgcolor="#C0C0C0">首页显示：</td>
<td bgcolor="#E3E3E3"><input name="showindex" type="checkbox" id="Passed" value="yes">
是<font color="#0000FF">（如果选中的话将在首页显示）</font></td>
</tr>
-->
<tr> 
<td width="150" height="22" align="right" valign="middle" >产品说明：</td>
<td bgcolor="#E3E3E3"><strong>中文说明：</strong><br>
<textarea name="Content" style="display:none"></textarea>
<iframe ID="Editor" src="../webedit/ewebeditor.asp?id=content&style=standard" frameborder="0" scrolling="no" width="98%" HEIGHT="300"></iframe>
<br><br>
<strong>英文说明：</strong><br>
<textarea name="Content_en" style="display:none"></textarea>
<iframe ID="Editor2" src="../webedit/ewebeditor.asp?id=content_en&style=standard" frameborder="0" scrolling="no" width="98%" HEIGHT="300"></iframe>

</td>
</tr>
<tr> 
<td width="150" height="22" align="right" bgcolor="#C0C0C0">录入时间：</td>
<td bgcolor="#E3E3E3"> <input name="UpdateTime" type="text" id="UpdateTime2" value="<%=now()%>" maxlength="50">
当前时间为：<%=now()%> 注意不要改变格式。</td>
</tr>
</table></td>
</tr>
</table>
<div align="center"><p> 
<input name="Add" type="submit"id="Add" value=" 添 加 " onClick="document.myform.action='ProductSave.asp?action=add';document.myform.target='_self';"> 
<input name="Key" type="hidden" id="Key2" value="key"><%session("action")=("add")%>
</p>
</div>
</form>
</td>
</tr>
</table>
