<!--#include file="0.asp"--><!--#include file="../../conn/zkconn.asp" -->
<link href="../../css/css.css" rel="stylesheet" type="text/css">
      <form action=ok-xiugai.asp method="post" name="myform" id="myform" onSubmit="return checksignup()">
  <script language="javascript">
function Validnumber(item){
	etext=item;
	elen=item.length;
	for (i=0;i<=elen-1;i++){
  		aa=etext.charAt(i)
  		if (aa<'0'||aa>'9') return false;
  	}
  	return true;
}
function checksignup() 
{  
     
     if (myform.mc.value=="")
      { alert("输入产品名称");
        myform.mc.focus();
	   return false;
       }
	   if (myform.jg1.value=="") {
		alert("请输入市场价！");
		myform.jg1.focus();		
		    return (false);}
    if (isNaN(myform.jg1.value)){
		alert("请填写数字！");
		   myform.jg1.focus();		
		    return (false);}
			
	    if (myform.jg2.value=="") {
		alert("请输入网上价！");
		myform.jg2.focus();		
		    return (false);}
    if (isNaN(myform.jg2.value)){
		alert("请填写数字！");
		   myform.jg2.focus();		
		    return (false);} 
 if(myform.jg1.value<1)
		{
		   alert("市场价格不能为负数");
		  myform.jg1.focus();
		 return(false);}
 if(myform.jg2.value<0)
		{
		   alert("网上价格不能为负数");
		  myform.jg2.focus();
		 return(false);}    
if (document.myform.jp.value.length>2000)
  { alert("产品简评不能大于2000字!!");
        myform.jp.focus();
	   return false;
       }	 
 if (myform.jp.value=="")
      { alert("请输入请输入产品简评!!");
        myform.jp.focus();
	   return false;
       }	
   return true;
}

</script>

  <table width="580" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
    <tr valign="middle"> 
      <td height="25" colspan="4" bgcolor="#f1f1f1"><font color="#FF3333">&gt;&gt;产品修改</font></td>
    </tr>
    <tr valign="middle"> 
      <td height="25" align="center" bgcolor="#FFFFFF">产品分类归属</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF">
<% function judge(a,b)
  dim res 
for j=0 to ubound(a)
	if trim(a(j))=trim(b) then
	res ="checked"
  end if
next
  judge = res
end function
function judge2(a,b)
  dim res 
  if instr(a,b)>0 then
   res ="selected"
  end if
  judge2= res
end function
set rs1 = conn.execute("select * from chanpin where id="&cint(request("id"))&"")
slb=split(trim(rs1("slb")),",")
set rs = conn.execute("select slbname from slb where lbid="&rs1("lbid")&" and xlbid="&rs1("xlbid")&" order by slbid")
	  i=1
	  while not rs.eof 
	  slbname=rs("slbname")%> <input name=slb type=checkbox <%=judge(slb,slbname)%> value=<%=slbname%>><%=slbname%>
<% if i mod 6=0 then 
response.write "<br>"
end if
i=i+1
rs.movenext 
wend 
rs.close %><br>（可多选，或不选）</td>
    </tr>
    <%
set rs = conn.execute("select * from user_lb where userid in(select id from user_name where name='"&session("www.loogoo.com")&"') order by id desc")
if not rs.eof then
userlb=rs1("userlb")%>
    <tr valign="middle"> 
      <td width="120" height="25" align="center" bgcolor="#FFFFFF">网店自设类别</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <select name="userlb" class="wenbenkuang">
          <%do while not rs.eof
		  ulb=rs("userlb")%>
          <option value="<%=ulb%>" <%=judge2(ulb,userlb)%>><%=ulb%></option>
          <%
        				rs.movenext
       					loop
       					rs.close
						%>
        </select>
        （可不选） </td>
    </tr>
    <% end if %>
    <tr valign="middle"> 
      <td width="120" height="25" align="center" bgcolor="#FFFFFF">产品名称</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <input name="mc" type="text" class="wenbenkuang" id="mc" value="<%=rs1("mc")%>" size="40" maxlength="28"> 
        <font color="#FF3333">*</font> </td>
    </tr>
    <tr valign="middle"> 
      <td width="120" height="25" align="center" bgcolor="#FFFFFF">市场价格</td>
      <td width="98" height="25" bgcolor="#FFFFFF"> <input name="jg1" type="text" class="wenbenkuang" id="jg1" value="<%=rs1("jg1")%>" size="10" maxlength="20"> 
      </td>
      <td width="75" align="center" bgcolor="#FFFFFF">网上价格</td>
      <td width="232" bgcolor="#FFFFFF"> <input name="jg2" type="text" class="wenbenkuang" id="jg2" value="<%=rs1("jg2")%>" size="10" maxlength="20"> 
        <font color="#FF3333">*</font> </td>
    </tr>
    <tr valign="middle"> 
      <td height="25" align="center" bgcolor="#FFFFFF">产品批发价</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"><input name="jg3" type="text" class="wenbenkuang" id="jg3" value="<%=rs1("jg3")%>" size="10" maxlength="20">
        产品批发价可不填</td>
    </tr>
    <tr valign="middle"> 
      <td width="120" height="25" align="center" bgcolor="#FFFFFF">产品关键字</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <input name="cj" type="text" class="wenbenkuang" id="cj" value="<%=rs1("cj")%>" size="40" maxlength="45">
        多个关键之间用“|”隔开</td>
    </tr>
    <tr valign="middle"> 
      <td width="120" height="25" rowspan="2" align="center" bgcolor="#FFFFFF">产品小图片</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <input name="xt" type="text" class="wenbenkuang" id="xt" value="<%=rs1("xt")%>" size="40" maxlength="50">
        图片尺寸75*75像素</td>
    </tr>
    <tr valign="middle"> 
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <iframe name="ad" frameborder=0 width=100% height=20 scrolling=no src=../shangchuan/01.asp></iframe></td>
    </tr>
    <tr valign="middle"> 
      <td width="120" height="25" rowspan="2" align="center" bgcolor="#FFFFFF">产品中图片</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <input name="zt" type="text" class="wenbenkuang" id="zt" value="<%=rs1("zt")%>" size="40" maxlength="50">
        图片尺寸200*200像素</td>
    </tr>
    <tr valign="middle"> 
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <iframe name="ad" frameborder=0 width=100% height=20 scrolling=no src=../shangchuan/02.asp></iframe></td>
    </tr>
    <tr valign="middle"> 
      <td height="25" rowspan="2" align="center" bgcolor="#FFFFFF">产品大图片</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <input name="dt" type="text" class="wenbenkuang" id="dt" value="<%=rs1("dt")%>" size="40" maxlength="50"> 
      </td>
    </tr>
    <tr valign="middle"> 
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <iframe name="ad" frameborder=0 width=100% height=20 scrolling=no src=../shangchuan/03.asp></iframe></td>
    </tr>
    <tr valign="middle"> 
      <td height="25" align="center" bgcolor="#FFFFFF">产品简评</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <textarea name="jp" cols="60" rows="4" class="wenbenkuang" id="jp"><%=rs1("jp")%></textarea> 
        <font color="#FF3333">*</font></td>
    </tr>
    <tr valign="middle"> 
      <td width="120" height="25" align="center" bgcolor="#FFFFFF">产品介绍</td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <textarea name="js" cols="60" rows="6" class="wenbenkuang" id="js"><%=rs1("js")%></textarea> 
      </td>
    </tr>
    <tr valign="middle"> 
      <td width="120" height="25" align="center" bgcolor="#FFFFFF"> <input <%If rs1("cang") ="1" Then Response.Write("CHECKED") : Response.Write("")%> type="checkbox" name="cang" value="1" onFocus="this.blur()">
        产品隐藏 </td>
      <td height="25" colspan="3" bgcolor="#FFFFFF"> <input name="Submit" type="submit" class="go-wenbenkuang" value="提交" ONCLICK="javascript:return checksignup()"> 
        <input name="Submit2" type="reset" class="go-wenbenkuang" value="重置"> 
        <input name="id" type="hidden" value="<%=request("id")%>"> 
        <input name="keywords" type="hidden" value="<%=request("keywords")%>"> 
        <input name="page" type="hidden" value="<%=request("page")%>"> 
        <input name="lbid" type="hidden" id="lbid" value="<%=request("lbid")%>"> 
        <input name="xlbid" type="hidden" id="xlbid" value="<%=request("xlbid")%>"></td>
    </tr>
  </table>
  <table width="500" align="center">
    <tr>
      <td><font color="#FF9966"><strong>注：</strong></font><br>
        &nbsp;&nbsp;&nbsp;&nbsp;如果产品的市场价为空，则产品网上售价将自动成为市场价格。<br> &nbsp;&nbsp;&nbsp;&nbsp;同时须注意产品售价不能小于等于&quot;0&quot;。<br>
        &nbsp;&nbsp;&nbsp;&nbsp;产品如果不添加图片信息，将使用默认图片。</td>
    </tr>
  </table>
</form><% 	   rs1.close
	   set rs1=nothing
	conn.Close
     set conn = nothing
 %>

