<%@ Page Language="VB" AutoEventWireup="false" ContentType="text/html" ResponseEncoding="gb2312" Inherits="b2bNet.user_User_products_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="<%=AppConst.SiteUrl%>/<%=AppConst.Skinpath%>/style.css" rel="stylesheet" type="text/css" />
<title>修改产品信息</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 TableMouseClick(Url){ window.location=Url; }

 //表单验证
 function check(){
   if(document.form.P_name.value=="" || (document.form.P_name.value).length<2 || (document.form.P_name.value).length>30){
		alert("产品名称不能为空,且名称长度不能小于两个文字,不能大于30个文字！");
		document.form.P_name.focus();
		return false;
	}
	if(document.form.P_pattern.value==""){
		alert("产品型号不能为空！");
		document.form.P_pattern.focus();
		return false;
	}
	if(document.form.P_from.value==""){
		alert("原产地不能为空！");
		document.form.P_from.focus();
		return false;
	}
		if(document.form.s1.value==""){
		alert("请选择行业一级分类！");
		document.form.s1.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(isNaN(document.form.P_price.value)){
		alert("产品价格只能是数字，您可以选择不填！");
		document.form.P_price.focus();
		return false;
	}
	if(document.form.P_danwei.value==""){
		alert("请选择产品单位！");
		document.form.P_danwei.focus();
		return false;
	}
//关键词验证
	var P_Keyword=document.form.P_Keyword.value;
	var P_KeywordB=document.form.P_KeywordB.value;
	var P_KeywordC=document.form.P_KeywordC.value;
	if(P_Keyword=="" && P_KeywordB=="" && P_KeywordC==""){
		alert("在关键词的三个输入框中最少要输入一个！\n这样可以大大的提高您的产品被检索到的机会！");
		document.form.P_Keyword.focus();
		return false;
	}
	var P_Explain=document.form.P_Explain.value;
	if(P_Explain=="" || P_Explain.length<10 || P_Explain.length>500){
		alert("产品描述不能为空,且不能小于10个文字,不能大于500个文字！");
		document.form.P_Explain.focus();
		return false;
	}
	if(document.form.P_Pic.value==""){
		alert("产品图片不能为空！\n您可以从自已的电脑上选取，或是到您自已的图片选取。");
		return false;
	}
}

//从图库中选择图片弹出框
function SelectPic(){
	window.open("OpenMyPic.aspx","B","width=770,height=400,resizable=yes,status=no,titlebar=no,location=no,scrollbars=yes,left=150,top=110,")
}
//返回图片
function Images(catName){
	document.form.P_Pic.value=catName;
	document.form.P_PicB.src="../upload/info/"+catName;
}
</script>
</head>
<body>
<table style="width:100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table style="width:700" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td style="width:100" rowspan="2"><div align="center"><a href="user_company_modi.aspx"><img src="images/soft_all.gif" width="50" height="48" border="0" /></a></div>
              <div align="center"><strong>公司介绍</strong></div></td>
        <td style="width:100"><div align="center"><a href="user_info_list.aspx"><img src="images/j_resume_modify.gif" width="50" height="48" border="0" /></a></div></td>
        <td style="width:100"><div align="center"><a href="user_info_add.aspx"><img src="images/j_position_supply.gif" width="50" height="48" border="0" /></a></div></td>
        <td style="width:100"><div align="center"><a href="User_products_list.aspx"><img src="images/photo_all.gif" width="50" height="48" border="0" /></a></div></td>
        <td style="width:100"><div align="center"><a href="User_products_add.aspx"><img src="images/photo_add.gif" width="50" height="48" border="0" /></a></div></td>
        <td style="width:100"><div align="center"><a href="User_products_Class.aspx"><img src="images/photo_cam.gif" width="50" height="48" border="0" /></a></div></td>
        <td style="width:100"><div align="center"><a href="User_products_AddClass.aspx"><img src="images/photo_up.gif" width="50" height="48" border="0" /></a></div></td>
      </tr>
      <tr>
        <td style="width:100"><div align="center"><strong>我的商机</strong></div></td>
        <td style="width:100"><div align="center"><strong></strong><strong>发布商机</strong></div></td>
        <td style="width:100"><div align="center"><strong>我的产品</strong></div></td>
        <td style="width:100"><div align="center"><strong>添加产品</strong></div></td>
        <td style="width:100"><div align="center"><strong>产品分类</strong></div></td>
        <td style="width:100"><div align="center"><strong>添加分类</strong></div></td>
      </tr>
    </table></td>
  </tr>
</table>
<table style="width:100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table style="width:100%; height:24" cellspacing="0" cellpadding="0"  border="0">
  <tr>
    <td style="background-color:#FFF1EB; height:24; width:142" align="center" valign="bottom" class="TDBG1"><strong><span #invalid_attr_id="none"><strong>修 改 产 品 </strong></span></strong></td>
    <td class="bottom"><div align="right">注意： 带 * 号的为必填项！<span class="note"> <strong>审核说明：</strong>本站收费</span><span class="note">会员发布的产品不需审核直接通过！<a href="<%=AppConst.SiteUrl%>/help/detail.aspx?id=10014" target="_blank"><strong>查看金牌供应商升级说明</strong></a></span> </div></td>
  </tr>
</table>
<table style="width:100%"  border="0" cellpadding="0" cellspacing="0" class="topnone">
  <tr>
    <td style="background-color:#FFFFFF"><table style="width:100%; height:50" bordercolor="#FFF1EB" cellspacing="0" cellpadding="4" align="center" border="6">
      <tr>
        <td style="height:50" valign="middle" bordercolor="#EDD6CA" class="0008"><table style="width:100%" cellspacing="1" cellpadding="3" align="center" border="0">
          <form name="form" onsubmit="return check()" method="post">
            <tr>
              <td style="background-color:#F6F6F6; height:23" align="right"><span class="00002">*</span> 产品名称：</td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left"><input name="P_name" id="P_name" value="<%=pRs("P_name").Value%>" />
                  <span class="style4">
                  <input name="Id" type="hidden" id="Id" value="<%=pRs("Id").Value%>" />
                    （请保持在2-30个字）</span></td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6; height:5" align="right" ><span class="00002">*</span> 产品型号：</td>
              <td style="background-color:#FAFAFA; height:15" colspan="2" align="left"><input name="P_pattern" id="P_pattern" value="<%=pRs("P_pattern").Value%>" />              </td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6; height:23" align="right" ><span class="00002">*</span> 原 产 地：</td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left"><input name="P_from" id="P_from" value="<%=pRs("P_from").Value%>" /></td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6" align="right" ><span class="00002">*</span> 所属类别： </td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left"><span class="lh15">
                <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></span>
             </td>
                <script type="text/javascript">
                    document.all.s1.value = '<%=pRs("P_BigClassID").Value%>';
                    changeselect1(document.all.s1.value);
                    document.all.s2.value = '<%=pRs("P_SmallClassID").Value%>';
                    changeselect2(document.all.s2.value);
                </script>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6; height:23" align="right" ><span class="00002">*</span> 关 键 字：</td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left"><%Dim kws = Split(pRs("P_Keyword").Value & ",,,", ",")%>
                  <span class="style4">
                  <input name="P_Keyword" id="P_Keyword" value="<%=kws(0)%>" size="10" maxlength="8" />
                    ,
                    <input name="P_KeywordB" id="P_KeywordB" value="<%=kws(1)%>" size="10" maxlength="8" />
                    ,
                    <input name="P_KeywordC" id="P_KeywordC" value="<%=kws(2)%>" size="10" maxlength="8" />
                    <br>
                    （为您的产品定义关键字，让客户更易找到）</span></td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6" align="right" valign="top" ><span class="00002">*</span> 产品描述：</td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left"><textarea name="P_Explain" cols="55" rows="15" id="P_Explain"><%=pRs("P_Explain").Value%></textarea>
                  <br>
                  <span >（请保持在10-500个字）</span></td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6" align="right" valign="top" ><span class="00002">*</span> 产品照片：</td>
              <td style="background-color:#FAFAFA; height:31; width:91" align="left"><table style="background-color:#CCCCCC; width:18"  border="0" cellpadding="0" cellspacing="1">
                  <tr>
                    <td style="background-color:#FFFFFF"><img src="../upload/info/<%=pRs("P_smallPic").Value%>" name="P_PicB" width="88" height="88" id="P_PicB"></td>
                  </tr>
              </table></td>
              <td style="background-color:#FAFAFA" align="left"><script type="Text/JavaScript" language="javascript">
								function upload(strinfo){
									if (strinfo=="products"){
										products.style.display="none";
										uploadproducts.style.display="inline";
										}
									}
									</script>
                  <div id="products">
                    <input type="button" name="Submit3" value="从我的电脑中选取" onclick="upload('products')" />
                    <br>
                    <input name="P_Pic" type="hidden" id="P_Pic" value="<%=pRs("P_Pic").Value%>" />
                    <input name="P_smallPic" type="hidden" id="P_smallPic" value="<%=pRs("P_smallPic").Value%>" />
                    <br>
                    <input type="button" name="Submit32" value="从图库中选择图片" onclick="SelectPic()" />
                    <br>
                  </div>
                <div id="uploadproducts" style="display:none">
                    <iframe id="upload" src="../upload/imageShowload.aspx?imgview=form.P_PicB&imgvalue=form.P_Pic&imgsmall=form.P_smallPic&subfolder=products&fileName=<%=pRs("P_Pic").Value%>&fileName_small=<%=pRs("P_smallPic").Value%>" width="300" height="30" scrolling="no" frameborder="0"></iframe>
                  <br>
                  </div>
                <span class="style4">您发布的商机中附上图片这将大大提高商业机会成功的机率</span></td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6" align="right" valign="top" > 所属分类：</td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left" class="style4"><select name="P_MyClassID" id="P_MyClassID" style="WIDTH: 180px">
                  <option value="0" selected="selected">---请选择要归入的分类---</option>
                  <%=GetMemberClassOptions()%>
                </select>
 +<a href="User_products_AddClass.aspx">添加产品分类</a>+                  <br>
                可按照您创建的产品系列进行分类，方便您管理<strong>。 </strong>不选则为 未分类产品 </td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6" align="right" valign="top" >设为加密产品：</td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left">
                  <input name="P_safe" type="checkbox" id="P_safe" value="1" <%If IsTrue(pRs("P_safe").Value) Then%>checked<%End If%> /></td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6" align="right" valign="top" >设为FLASH推荐：</td>
              <td style="background-color:#FAFAFA; height:15" colspan="2" align="left">
                  <input name="P_mb_tj" type="checkbox" id="P_mb_tj" value="1" <%If IsTrue(pRs("P_mb_tj").Value) Then%>checked<%End if %> /></td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6" align="right" valign="top" >能否在线订购：</td>
              <td style="background-color:#FAFAFA; height:15" colspan="2" align="left"><input name="Isprice" type="checkbox" id="Isprice" value="1" <%If IsTrue(pRs("Isprice").Value) Then%>checked<%End If%> />
                能　注意：若为可在线订购产品，则产品将在“<a href="../Shopping/" target="_blank"><strong><u>订购中心</u></strong></a>”频道显示，您可以随时基于些产品的订购订单</td>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6" align="right" valign="top" >价格设置：</td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left"><input name="P_price" id="P_price" value="<%=pRs("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='<%=prs("P_danwei").Value%>';</script>
　（价格只能是数字，产品单位请认真选择）</td>
            </tr><tr>
              <td style="background-color:#F6F6F6; height:11" align="right" >* 产品属性：</td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left"><p>
                <label>
                  <input type="radio" id="P0" value="0" name="P_type" />
                  正常商品</label>
                <label>
                  <input type="radio" id="P1" value="1" name="P_type" />
                  新品上市</label>
                <label>
                  <input type="radio" id="P2" value="2" name="P_type" />
                  促销商品</label>
                <label>
                  <input type="radio" id="P3" value="3" name="P_type" />
                  热卖商品</label>
              </p></td>
                  <script type="text/javascript">document.getElementById("P<%=prs("P_type").Value%>").checked=true;</script>
            </tr>
            <tr>
              <td style="background-color:#F6F6F6" align="right" valign="top" >&nbsp;</td>
              <td style="background-color:#FAFAFA; height:31" colspan="2" align="left"><input name="提交" type="submit" value="填好了，修改!" />
                  <input name="send" type="hidden" id="send" value="isok" />
                  <input name="P_M_Habitus" type="hidden" id="P_M_Habitus" value="<%=P_M_Habitus%>" />
                  <input name="page" type="hidden" id="page" value="<%=page%>" /></td>
            </tr>
          </form>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<table style="width:100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table style="width:100%; height:24" cellspacing="0" cellpadding="0"  border="0">
  <tr>
    <td style="background-color:#FFF1EB; height:24; width:142" align="center" valign="bottom" class="TDBG1"><strong><span #invalid_attr_id="none"><strong>相 关 说 明</strong></span></strong></td>
    <td style="width:448" class="bottom">&nbsp;</td>
  </tr>
</table>
<table style="width:100%"  border="0" cellpadding="0" cellspacing="0" class="topnone">
  <tr>
    <td style="background-color:#FFFFFF"><table style="width:100%; height:50" bordercolor="#FFF1EB" cellspacing="0" cellpadding="4" align="center" border="6">
      <tr>
        <td style="height:50" valign="middle" bordercolor="#EDD6CA" class="0008"><table style="width:100%"  border="0" cellpadding="3" cellspacing="0">
          <tr>
            <td style="background-color:#FFFFFF; height:28"><table style="width:100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;<img src="images/JT_2.gif" width="8" height="8" />&nbsp;产品发布：免费会员不能发布产品，<%=AppConst.SiteNamefw%>会员可发布120个产品，金牌供应商会员可发布400个产品。</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td style="background-color:#FFFFFF; height:26"><table style="width:100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;<img src="images/JT_2.gif" width="8" height="8" />&nbsp;关于价格：产品中心集成了在线支付等功能，设置了价格的产品将在报价中心集中显示，请认真填写价格。</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td style="background-color:#FFFFFF; height:26"><table style="width:100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;<img src="images/JT_2.gif" width="8" height="8" />&nbsp;关于支付：我们为您提供了各个银行的支付接口，请认真填写你的支付方式。你可以点击此处<a href="user_company_pay.aspx"><strong>修改支付方式</strong></a>。</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td style="background-color:#FFFFFF; height:26"><table style="width:100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;<img src="images/JT_2.gif" width="8" height="8" />&nbsp;关于编辑：点击对应的产品列表的编辑可对商机进行修改。</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td style="background-color:#FFFFFF; height:26"><table style="width:100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;<img src="images/JT_2.gif" width="8" height="8" />&nbsp;关于删除：删除列表对应的产品。注意，删除后不可恢复。</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td style="background-color:#FFFFFF; height:26">&nbsp;<img src="images/JT_2.gif" width="8" height="8" />&nbsp;关于重发：你可以撤回或重发产品，撤回即将产品暂时下架，不在前台显示，当您要让产品重新上架时，可以重发。</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
<%Page_Loaded()%>
</html>
