<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" Inherits="b2bNet.Admin_shopping_manage_edit" %>
<%On Error Resume Next%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="inc/admin_style.css" rel="stylesheet" type="text/css" /><link href="inc/style.css" rel="stylesheet" type="text/css" />
<title><%=AppConst.SiteName%></title>

<script type="Text/JavaScript" language="JavaScript"> 
<!--
var subval2 = new Array(); 
//数组结构：一级根值,二级根值,二级显示值 
<%=GetSmallClassArray("subval2")%>
var subval3 = new Array(); 
//数组结构：二级根值,三级根值,三级显示值 
<%=GetThreeClassArray("subval3")%>

function changeselect1(locationid) 
{ 
      document.form.s2.length = 0; 
      document.form.s2.options[0] = new Option('==请选择二级分类==',''); 
      document.form.s3.length = 0; 
      document.form.s3.options[0] = new Option('==请选择三级分类==',''); 
      for (i=0; i<subval2.length; i++) 
      { 
          if (subval2[i][0] == locationid) 
          {document.form.s2.options[document.form.s2.length] = new Option(subval2[i][1],subval2[i][2]);} 
      } 
} 

function changeselect2(locationid) 
{ 
      document.form.s3.length = 0; 
      document.form.s3.options[0] = new Option('==请选择三级分类==',''); 
      for (i=0; i<subval3.length; i++) 
      { 
          if (subval3[i][0] == locationid) 
          {document.form.s3.options[document.form.s3.length] = new Option(subval3[i][1],subval3[i][2]);} 
      } 
} 
//--> 

function check(){
	if(document.form.s1.value==""){
		alert("请选择产品一级分类！");
		document.form.s1.focus();
		return false;
	}
	if(document.form.P_name.value==""){
		alert("产品名称不能为空！");
		document.form.P_name.focus();
		return false;
	}
	if(document.form.s2.value==""){
		alert("请选择产品二级分类！");
		document.form.s2.focus();
		return false;
	}
	
//	if(document.form.s3.value==""){
//		alert("请选择产品三级分类！");
//		document.form.s3.focus();
//		return false;
//	}
//	
	if(document.form.P_from.value==""){
		alert("产品产地不能为空！");
		document.form.P_from.focus();
		return false;
	}
	if(document.form.P_Keyword.value==""){
		alert("请输入至少一个产品关键字！");
		document.form.P_Keyword.focus();
		return false;
	}
		if(document.form.P_Explain.value==""){
		alert("产品描述不能为空！");
		document.form.P_Explain.focus();
		return false;
	}

}
</script>

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FF0000}
.M {FONT: 14px 宋体
}
.style2 {	font-size: 10pt;
	font-weight: bold;
}
.style2 {color: <%=AppConst.Skincolor%>}
-->
</style>
</head>

<body>
<table style="width:100%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table style="height:22; width:100%" border="0" cellpadding="0" cellspacing="1">
      <tr class="topbg">
        <td style="height:22" align="center" class="topbg"><strong>产 品 修 改</strong></td>
      </tr>
    </table>
      <table style="width:100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td style="width:25"><div align="center"><img src="<%=AppConst.SiteUrl%>/<%=AppConst.Skinpath%>/gojump01.gif" width="16" height="16" /></div></td>
          <td><a href="Shopping_manage_passed.aspx">已审产品</a> | <a href="Shopping_manage_nopass.aspx">待审产品</a> | <a href="Shopping_manage_tuijian.aspx">推荐产品</a> | <a href="Shopping_manage_hot.aspx">热门产品</a></td>
          <td style="width:400"><table style="width:400"  border="0" align="right" cellpadding="2" cellspacing="0">
              <form name="form1" method="get" action="Shopping_manage_search.aspx">
                <tr>
                  <td style="height:25"><div align="right">搜索关键字：</div></td>
                  <td><div align="center">
                      <input name="keyword" type="text" id="keyword3" size="30" />
                  </div></td>
                  <td><input type="submit" name="Submit" value="  搜索 " /></td>
                </tr>
              </form>
          </table></td>
        </tr>
      </table>      <table style="height:436; width:100%" border="0" cellpadding="4" cellspacing="1" class="border">
        <form method="POST" action="" onsubmit="return check();" name="form">
          <tr>
            <td style="background-color:#C4E4FF; width:40%" align="right"><div align="right">名称：</div></td>
            <td style="background-color:#F1F9FF; height:20" colspan="2"><font color="#000000">
              <input name="P_name" type="text" id="P_name" value="<%=rs("P_name").Value%>" />

            </font></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right"><div align="right">型号：</div></td>
            <td style="background-color:#F1F9FF; height:20" colspan="2"><font color="#000000">
              <input name="P_pattern" type="text" id="P_pattern" value="<%=rs("P_pattern").Value%>"  size="20" maxlength="20" />
            </font> </td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right"><div align="right">行业大类：</div></td>
            <td style="background-color:#F1F9FF; height:8" colspan="2">
                <select name="s1" id="s1" onchange="changeselect1(this.value)"><%=GetBigClassOptions()%></select> 
                <select name="s2" id="s2" onchange="changeselect2(this.value)"></select> 
                <select name="s3" id="s3" style="visibility:hidden"> </select> 
             </td>
            <script type="text/javascript">
                document.all.s1.value = '<%=rs("P_BigClassID").Value%>';
                changeselect1(document.all.s1.value);
                document.all.s2.value = '<%=rs("P_SmallClassID").Value%>';
                changeselect2(document.all.s2.value);
            </script>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">原产地：</td>
            <td style="background-color:#F1F9FF; height:5" colspan="2"><font color="#000000">
              <input name="P_from" type="text" id="P_from" value="<%=rs("P_from").Value%>"  size="20" maxlength="20" />
            </font></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right"><div align="right">产品关键字：</div></td>
            <td style="background-color:#F1F9FF; height:22" colspan="2"><input name="P_Keyword" type="text" id="P_Keyword" value="<%=rs("P_Keyword").Value%>"   size="30" maxlength="50" />            </td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right"><div align="right">上传图片：</div></td>
            <td style="background-color:#F1F9FF; height:6" colspan="2"><%IF rs("p_pic").Value<>"" THEN%>
              <img src="<%=AppConst.SiteUrl%>/upload/info/<%=rs("p_pic").Value%>" width="25" height="25" onmouseout="this.width=25;this.height=25" onmouseover="this.width=60;this.height=60" style="cursor:hand " />
              <%ELSE%>
              <font color="#cccccc">无图</font>
              <%end if%></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">* 产品属性：</td>
            <td style="background-color:#F1F9FF; height:6" colspan="2">
                <label><input type="radio" value="0" name="P_type" id="P0" />正常商品</label>
                <label><input type="radio" value="1" name="P_type" id="P1" />新品上市</label>
                <label><input type="radio" value="2" name="P_type"  id="P2"/>促销商品</label>
                <label><input type="radio" value="3" name="P_type"  id="P3"/>热卖商品</label>
              </td>
              <script type="text/javascript">document.getElementById("P<%=rs("P_type").Value%>").checked=true;</script>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">产品价格：</td>
            <td style="background-color:#F1F9FF; height:13" colspan="2"><input name="P_price" id="P_price" value="<%=Rs("P_price").Value%>" size="12" />
元每<select id="P_danwei" name="P_danwei">
    <option>请选择产品单位</option>
    <option value="件">件</option>
    <option value="个">个</option>
    <option value="套">套</option>
    <option value="支">支</option>
    <option value="千克">千克</option>
    <option value="克">克</option>
    <option value="吨">吨</option>
    <option value="米">米</option>
    <option value="千米">千米</option>
    <option value="升">升</option>
    <option value="立方毫米">立方毫米</option>
    <option value="立方厘米">立方厘米</option>
    <option value="立方米">立方米</option>
  </select>
  <script type="text/javascript">document.all.P_danwei.value='<%=Rs("P_danwei").Value%>';</script>
　（价格只能是数字，产品单位请认真选择）</td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right"><div align="right">产品描述：</div></td>
            <td style="background-color:#F1F9FF; height:22" colspan="2"><textarea name="P_Explain" cols="50" rows="10" id="P_Explain"><%=rs("P_Explain").Value%></textarea></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">发布人：</td>
            <td style="background-color:#F1F9FF; height:29" colspan="2"><input name="p_Userid" type="text" id="p_Userid"  value="<%=rs("p_Userid").Value%>"  size="30" maxlength="50" />            </td>
          </tr>
          <div id='CompanyInfo'>          </div>
     <tr>
            <td style="height:35" colspan="3"><div align="center">
             
				<input name="send" type="hidden" id="send" value="<%=rs("id").Value%>" />
                <input type="submit" name="Submit3" value=" 修 改 " onclick="return check()" />
                <input type="button" name="Submit22" value=" 返 回 " onclick="history.go(-1)" />
            </div></td>
          </tr>
        </form>
    </table>    </td>
  </tr>
</table>
</body>
<%Page_Loaded()%>
</html>
