<!--#include file="../common/conn.asp"-->
<%
'检查用户权限
call checkuser(GetQueryString("WindowName"))

	HtmlEditContent = "商品详细介绍"
	EditorHeight = "90%"

%>

<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE>
BODY {
	FONT-SIZE: 9pt
}
TABLE {
	FONT-SIZE: 9pt
}
TH {
	FONT-WEIGHT: 500; FONT-SIZE: 9pt
}
A:link {
	COLOR: #dd006f; TEXT-DECORATION: none
}
A:visited {
	TEXT-DECORATION: none
}
A:active {
	TEXT-DECORATION: none
}
A:hover {
	COLOR: #9933ff; TEXT-DECORATION: underline
}

</STYLE>
<script language="JavaScript" src="../../common/JS_CheckForm.js"></script>

<script language="JavaScript">

function CheckForm(theform){
	if(!Checkselect(theform.selClass, "分类")) return false;
	if(!CheckEmpty(theform.txtname, "产品名")) return false;
	if (theform.txtprice!=null){
		if(!CheckEmpty(theform.txtprice, "价格")) return false;
		if(!CheckReal(theform.txtprice, "价格")) return false;
	}
	if(!CheckEmpty(theform.filepic, "产品全图")) return false;
	if(!CheckEmpty(theform.filesmallpic, "产品缩微图")) return false;
	
	return true;
}

</script>

<title>发布<%=GetQueryString("WindowName")%></title></head>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
<form action="newdo.asp" method="post" enctype="multipart/form-data" name="newform" target="BackFrame" id="newform" onSubmit="return CheckForm(this)">
  <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td align="center" valign="top"> 
        <table width="100%" height="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#336600">
          <tr> 
            <td height="25" colspan="2" bgcolor="#669900"> <font color="#FFFFFF">::发表<%=GetQueryString("WindowName")%></font></td>
          </tr>
          <tr bgcolor="#eeeeee"> 
            <td height="25" align="right">产品分类：</td>
            <td height="25" bgcolor="#eeeeee">
              </select>
              <select name="selClass" id="selClass">
                <option value="">请选择...</option>
                <%Sql="select id,c_name,c_code from web_product_class where mn_id="&GetVariable("mnid")&" order by c_code"
        set rsclass=conn.execute(sql)
        Do While Not rsclass.eof
			Level=(Len(rsclass(2))/4-1)*3
			Response.Write "<option value="""&rsclass(0)&""""
			Response.Write ">"
			If Len(rsclass(2))>4 Then Response.Write "├"
			Response.Write String(Level,"-")
			Response.Write rsclass(1)&"</option>"
			rsclass.movenext
		Loop
		rsclass.close%>
              </select>
              <input name="mnid" type="hidden" id="mnid" value="<%=GetVariable("mnid")%>" > 
              <input name="WindowName" type="hidden" id="WindowName" value="<%=GetQueryString("WindowName")%>"></td>
          </tr>
          <%
					'读取产品展示的属性，以确定显示那个字段
					strCurrMenu=GetVariable("mnid")
					showPrice=GetKey("Price",WebUserID,"product_" & strCurrMenu )
					showSize=GetKey("Size",WebUserID,"product_" & strCurrMenu )
					showSymbol=GetKey("Symbol",WebUserID,"product_" & strCurrMenu )
					showWeight=GetKey("Weight",WebUserID,"product_" & strCurrMenu )
					showFace=GetKey("Face",WebUserID,"product_" & strCurrMenu )
					showPlace=GetKey("Place",WebUserID,"product_" & strCurrMenu )
					showProducer=GetKey("Place",WebUserID,"product_" & strCurrMenu )
					showDetail=GetKey("Detail",WebUserID,"product_" & strCurrMenu )
					%>
          <tr bgcolor="#eeeeee"> 
            <td width="19%" height="25" align="right">产品名称：</td>
            <td width="81%" height="25" bgcolor="#eeeeee"> <input name="txtname" type="text" class=bginput id="txtname" size="50" maxlength="100"> 
              <font color="#FF0000">(必填) </font></td>
          </tr>
          <tr bgcolor="#F9F9F9">
            <td height="25" align="right">产品编号：</td>
            <td height="25"><input name="txtCode" type="text" class=bginput id="txtCode" size="10" maxlength="30">
              (排序时填写)</td>
          </tr>
          <%if showPrice<>"none" then%>
          <tr bgcolor="#F9F9F9"> 
            <td height="25" align="right">出售价格：</td>
            <td height="25"> <input name="txtprice" type="text" class=bginput id="txtprice" value="0" size="10"> 
              <font color="#FF0000">(必填，0 表示面议，单位：元) </font></td>
          </tr>
          <%end if%>
          <tr bgcolor="#F9F9F9"> 
            <td height="25" align="right">产品全图：</td>
            <td height="25"> <input name="filepic" type="file" id="filepic" size="40"> 
              <font color="#FF0000">(必填) </font></td>
          </tr>
          <tr bgcolor="#eeeeee"> 
            <td height="25" align="right">产品缩图：</td>
            <td height="25"> <input name="filesmallpic" type="file" id="filesmallpic" size="40"> 
              <font color="#FF0000">(必填) </font></td>
          </tr>
          <%if showSymbol<>"none" then%>
          <tr bgcolor="#F9F9F9" id="p_symbol"> 
            <td height="25" align="right" bgcolor="#F9F9F9">规格型号：</td>
            <td height="25"> <input name="txtsymbol" type="text" class=bginput id="txtsymbol" size="40" maxlength="100"></td>
          </tr>
          <%end if%>
          <%if showSize<>"none" then%>
          <tr bgcolor="#eeeeee" id="p_size"> 
            <td height="25" align="right">尺　寸：</td>
            <td height="25"> <input name="txtsize" type="text" class=bginput id="txtsize" size="40" maxlength="100"> 
            </td>
          </tr>
          <%end if%>
          <%if showWeight<>"none" And  showWeight<>"Null" then%>
          <tr bgcolor="#F9F9F9" id="p_weight"> 
            <td height="25" align="right">重　量：</td>
            <td height="25"> <input name="txtweight" type="text" class=bginput id="txtweight" size="40" maxlength="100"> 
            </td>
          </tr>
          <%end if%>
          <%if showFace<>"none" And showFace<>"Null" then%>
          <tr bgcolor="#eeeeee" id="p_face"> 
            <td height="25" align="right">外　观：</td>
            <td height="25"> <input name="txtface" type="text" class=bginput id="txtface" size="40" maxlength="100"> 
            </td>
          </tr>
          <%end if%>
          <%if showPlace<>"none" And showPlace<>"Null" then%>
          <tr bgcolor="#F9F9F9" id="p_place"> 
            <td height="25" align="right">生产地：</td>
            <td height="25"> <input name="txtplace" type="text" class=bginput id="txtplace" size="40" maxlength="100"> 
            </td>
          </tr>
          <%end if%>
          <%if showProducer<>"none" then%>
          <tr bgcolor="#eeeeee" id="p_producer"> 
            <td height="25" align="right">生产商：</td>
            <td height="25"> <input name="txtproducer" type="text" class=bginput id="txtproducer" size="40" maxlength="100"> 
            </td>
          </tr>
          <%end if%>
          <%if showDetail<>"none" then%>
          <tr bgcolor="#F9F9F9"> 
            <td height="100%" colspan="2" align="center"> <table width="100%" height="100%" border=1 cellpadding="0" cellspacing="0"  bordercolor=gray >
                <tr> 
                  <td align=center bgcolor="#D4D0C8"><textarea name="content" style="display:none"><%=HtmlEditContent%></textarea><input type="hidden" name="content1">
                    <iframe ID="eWebEditor1" src="../editor/ewebeditor.asp?id=content&style=standard" frameborder="0" scrolling="no" width="100%" HEIGHT="100%">
                    </iframe></td>
                </tr>
              </table></td>
          </tr>
          <%end if%>
          <tr bgcolor="#F9F9F9"> 
            <td height="40" colspan="2" align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="5">
                <tr> 
                  <td align="center"> <input name="btSubmit" type=submit class=button id="btSubmit" value="　发　布　" >
                    　 
                    <input name="YL2" type=button class=button value="　继续发布　" onClick="window.location=window.location">
                    　 
                    <input name="YL" type=button class=button value="　关　闭　" onClick="window.close()"></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
<iframe name="BackFrame" width="0" height="0" src="about:blank"></iframe>
<script language="JavaScript">
	SelectValue(document.newform.selClass,"<%=GetQueryString("class")%>");
</script>
</body>
</html>