<%@page contentType="text/html; charset=UTF-8"%>
<%@include file="/inc/init.jsp" %>
<%@include file="/inc/checklogin.jsp" %>
<%@include file="inc/header.jsp" %>
<%
DOC doc=null;
int classid=pu.getInt("classid");
Product_class_db pcdb=new Product_class_db();
doc=pcdb.getOne(classid);
%>
<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.companyname.value==''){
		alert('公司名称名称不能为空！');
		document.modifyForm.companyname.focus();
		return false;
	}else if(document.modifyForm.producturl.value==''){
		alert('产品网址不能为空！');
		document.modifyForm.producturl.focus();
		return false;
	}else{
		return true;
	}
}
</script>
<form method="post" name="modifyForm" action="fun/F_class.jsp"  onSubmit="return checkform();">
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="classid" value="<%=classid%>" />
<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="22%" align="right">产品名称<font color="#FF0000">*</font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%">
  <input type="text" name="name" id="name" value="<%=doc.get("name")%>"  />
  &nbsp;</td>
</tr>
<tr>
  <td width="22%" align="right">备注信息<font color="#FF0000"></font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%">
  <input type="text" name="retain3" id="retain3" value="<%=doc.get("retain3")%>"   class="input" />
  &nbsp;区分电脑版或手机版的产品名称附加信息</td>
</tr>
<tr>
  <td width="22%" align="right">前台购买页面显示方式<font color="#FF0000"></font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%"><select class="select" name="retain4" id="retain4">
  	<option value="1" <%=doc.geti("retain4")==1?"selected":""%>>单选按钮</option>
  	<option value="2" <%=doc.geti("retain4")==2?"selected":""%>>下拉选择</option>
  	</select>&nbsp;</td>
</tr>
<tr>
  <td width="22%" align="right">前台购买页面地址<font color="#FF0000"></font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%"><select class="select" name="retain5" id="retain5">
  	<option value="0" <%=doc.geti("retain5")==0?"selected":""%>>需要填写</option>
  	<option value="1" <%=doc.geti("retain5")==1?"selected":""%>>不需要填写</option>
  	</select>&nbsp;若选择不填写地址，将不会在前台显示填写地址</td>
</tr>
<tr>
  <td width="22%" align="right">前台购买页面滚动发货<font color="#FF0000"></font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%"><select class="select" name="retain6" id="retain6">
  	<option value="0" <%=doc.geti("retain6")==0?"selected":""%>>显示</option>
  	<option value="1" <%=doc.geti("retain6")==1?"selected":""%>>不显示</option>
	<option value="3" <%=doc.geti("retain6")==3?"selected":""%>>显示地区和只显示X先生</option>
	<option value="4" <%=doc.geti("retain6")==4?"selected":""%>>显示地区和只显示X小姐</option>
	<option value="5" <%=doc.geti("retain6")==5?"selected":""%>>无地区和不分性别</option>
	<option value="6" <%=doc.geti("retain6")==6?"selected":""%>>无地区和只显示X先生</option>
	<option value="7" <%=doc.geti("retain6")==7?"selected":""%>>无地区和只显示X小姐</option>
  	</select>&nbsp;</td>
</tr>
<tr>
  <td width="22%" align="right">前台购买页面显示数量<font color="#FF0000"></font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%"><select class="select" name="retain7" id="retain7">
  	<option value="0" <%=doc.geti("retain7")==0?"selected":""%>>不显示</option>
  	<option value="1" <%=doc.geti("retain7")==1?"selected":""%>>显示</option>
  	</select>
  &nbsp;</td>
</tr>
<tr>
  <td width="22%" align="right"><p>前台购买页面显示</p>
  	<p>再次输入手机号码<font color="#FF0000"></font></p></td>
  <td width="2%">&nbsp;</td>
  <td width="76%"><select class="select" name="retain8" id="retain8">
  	<option value="0" <%=doc.geti("retain8")==0?"selected":""%>>不显示</option>
  	<option value="1" <%=doc.geti("retain8")==1?"selected":""%>>显示</option>
  	</select>
  &nbsp;</td>
</tr>
<tr>
  <td width="22%" align="right"><p>前台购买页面显示填写QQ<font color="#FF0000"></font></p></td>
  <td width="2%">&nbsp;</td>
  <td width="76%"><select class="select" name="retain9" id="retain9">
  	<option value="0" <%=doc.geti("retain9")==0?"selected":""%>>不显示</option>
  	<option value="1" <%=doc.geti("retain9")==1?"selected":""%>>显示</option>
  	</select>
  &nbsp;</td>
</tr>
<tr>
  <td align="center"><font style="font-weight:bold"><p>效果预览</p>
  	<p>（需保存后才能生效）</p></font></td>
  <td align="center">&nbsp;</td>
  <td><a href="/buy.jsp?i=<%=classid%>" target="_blank">电脑版</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/buywap.jsp?i=<%=classid%>" target="_blank">手机移动版</a></td>
</tr>
<tr>
  <td align="right">
  生成此分类iframe嵌入代码</td>
  <td align="center">&nbsp;</td>
  <td><p style="font-size:14px; color:#006600" align="center"><input value="生成电脑版" type="button" onClick="$('#pccode').slideToggle('slow');$('#phonecode').hide();" class="btn_a" style="margin:1px 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input value="生成手机版" type="button" onClick="$('#phonecode').slideToggle('slow');$('#pccode').hide();" class="btn_a" style="margin:1px 0px;"></p>
  <div id="pccode" style="display:none; padding:10px 10px;">
  <span style=" font-weight:bold; margin:0px 0px 5px 2px;">可直接自行调整height和width的数值，以适应网站页面</span>
  <%
  String tempStr="<iframe height=\"450\" width=\"920\" src=\""+Config.get("domain")+"buy.jsp?i="+classid+"\"  frameborder=\"0\" scrolling=\"no\" align=\"middle\" id=\"buyiframe\"></iframe>";
  tempStr=Util.htmlEncode(tempStr);
  %>
  <textarea name="iframecode1" id="iframecode1" cols="" rows="" style="width:490px;height:90px;font-size: 12px;color: #006600;"><%=tempStr %></textarea>
  </div>
  <div id="phonecode" style="display:none; padding:10px 10px;">
    <span style=" font-weight:bold; margin:0px 0px 5px 2px;">可直接自行调整height和width的数值，以适应网站页面</span>
   <%
  tempStr="<iframe height=\"710\" width=\"312\" src=\""+Config.get("domain")+"buywap.jsp?i="+classid+"\"  frameborder=\"0\" scrolling=\"no\" align=\"middle\" id=\"buyiframe\"></iframe>";
  tempStr=Util.htmlEncode(tempStr);
  %>
  <textarea name="iframecode2" id="iframecode2" cols="" rows="" style="width:490px;height:90px;font-size: 12px;color: #006600;"><%=tempStr %></textarea>
  </div>
  </td>
</tr>
<tr>
  <td colspan="3" align="center"><font style="font-weight:bold">以下内容是用于短信或邮件发送的变量值</font></td>
</tr>
<tr>
  <td width="22%" align="right">显示某某公司<font color="#FF0000">*</font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%"><input type="text" name="companyname" id="companyname" value="<%=doc.get("showname")%>"  class="input" />  	
  	&nbsp;变量值：#coompanyname#</td>
</tr>
<tr>
  <td width="22%" align="right">产品网址<font color="#FF0000">*</font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%">
  <input type="text" name="producturl" id="producturl" value="<%=doc.get("producturl")%>" class="input"  />
  &nbsp;变量值：#producturl#&nbsp;&nbsp;<a href="<%=doc.get("producturl")%>" target="_blank">查看</a></td>
</tr>
<tr>
  <td width="22%" align="right">客服电话<font color="#FF0000"></font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%">
  <input type="text" name="retain1" id="retain1" value="<%=doc.get("retain1")%>" class="input"  />
  &nbsp;变量值：#kfphone#</td>
</tr>
<tr>
  <td width="22%" align="right">QQ<font color="#FF0000"></font></td>
  <td width="2%">&nbsp;</td>
  <td width="76%">
  <input type="text" name="retain2" id="retain2" value="<%=doc.get("retain2")%>" class="input"  />
  &nbsp;变量值：#QQ#</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" %>
