<%@page contentType="text/html; charset=UTF-8"%>
<%@include file="/inc/init.jsp" %>
<%@include file="/inc/checklogin.jsp" %>
<%@include file="inc/header.jsp" %>
<%
DOC[] docs=null;
Product_class_db pcdb=new Product_class_db();
docs=pcdb.getListAll();
%>
<div id="c">
<%@include file="inc/left.jsp" %>
<div id="right">
<%@include file="inc/position.jsp" %>
<div class="right">
<div id="right_box">
<script type="text/javascript">
function checkform(){
	if(document.modifyForm.name.value==''){
		alert('产品名称不能为空！');
		document.modifyForm.name.focus();
		return false;
	}else if(document.modifyForm.classid.value==''||document.modifyForm.classid.value=='0'){
		alert('产品分类不能为空，如没有分类，请在添加分类页面添加！');
		document.modifyForm.classid.focus();
		return false;
	}else if($("input[name='isshow'][type='radio']:checked").val()==''){
		alert('请选择是否显示为选中！');
		document.modifyForm.isshow.focus();
		return false;
	}else if(!checknumber(document.modifyForm.sequence.value)){
		alert('产品排序必须为数字！');
		document.modifyForm.sequence.focus();
		return false;
	}else if(!checknumber(document.modifyForm.price2.value)){
		alert('价格必须为数字！');
		document.modifyForm.price2.focus();
		return false;
	}else{
		return true;
	}
}
</script>
<form method="post" name="modifyForm" action="fun/F_product.jsp"  onSubmit="return checkform();">
<input type="hidden" name="action" value="add" />
<div class="tags">
  <div id="tagstitle"> <a id="one1" onClick="setTab('one',1,20)" class="hover" href="#">添加产品</a> </div>
  <div id="tagscontent" class="right_box">
    <div id="con_one_1"  >
      <table width="100%" border="0" cellspacing="0" cellpadding="0" id="table1">

<tbody>

<tr>
  <td width="19%" align="right">产品名称<font color="#FF0000">*</font></td>
  <td width="1%">&nbsp;</td>
  <td width="70%">
  <input type="text" name="name" id="name" value=""  />&nbsp;</td>
</tr>
<tr>
  <td align="right">产品所属分类<font color="#FF0000">*</font></td>
  <td>&nbsp;</td>
  <td><label>
    <select name="classid" id="classid"  class="select">
     <option value="">请选择产品分类</option>
    <%
	for(int i=0;i<docs.length;i++){
	%>
    <option value="<%=docs[i].get("classid")%>"><%=docs[i].get("name")+docs[i].get("retain3")%></option>
    <%}%>
    </select>
  </label></td>
</tr>
<tr>
  <td align="right"><p>是否推荐<font color="#FF0000">*</font></p></td>
  <td>&nbsp;</td>
  <td><label>
    <input name="isshow" type="radio" id="radio2" value="0" checked="checked" />
    否
    <input type="radio" name="isshow" id="radio" value="1" />
是
<input type="radio" name="isshow" id="radio3" value="2" />
停用(前台不显示) </label>  <br />
<div style="margin-top:5px;"></div>
注：(若产品分类中选择显示方式是单选按钮，则高亮闪动推荐，不选中)</td>
</tr>
<tr>
  <td align="right">产品排序<font color="#FF0000">*</font></td>
  <td>&nbsp;</td>
  <td><input type="text" name="sequence" id="sequence" value="0" class="input" />
(<font color="#FF0000">数值越小，越靠前</font>) </td>
</tr>
<!--
<tr>
  <td align="right">原价</td>
  <td>&nbsp;</td>
  <td><input type="text" name="price" id="price" value="" class="input" /></td>
</tr>
-->
<tr>
  <td width="19%" align="right">价格<font color="#FF0000">*</font></td>
  <td width="1%">&nbsp;</td>
  <td width="70%">
    <input type="text" name="price2" id="price2" value="" class="input" />
    (<font color="#FF0000">以此价格为结算价</font>) </td>
</tr>
<!--
<tr>
  <td align="right">存货量</td>
  <td>&nbsp;</td>
  <td><input type="text" name="number" id="number" value="" class="input" /></td>
</tr>
-->
<tr>
  <td align="right">备注(如详细产品介绍)</td>
  <td>&nbsp;</td>
  <td><textarea name="remark" id="remark"  class="textarea"></textarea></td>
</tr>

</tbody>
</table>
    </div>
  </div>
</div>
<input type="submit" name="submit" value=" 提交 " class="btn_a" />
</form>

<div class="clear"></div>
</div>
</div>

<div class="right_bottom">
</div>
</div>

<div id="footer">
</div>
</div>
<%@include file="inc/msg.jsp" %>
<%@include file="inc/footer.jsp" %>
