<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page contentType="text/html;charset=GBK" %>
<%@ taglib uri="/bean" prefix="bean" %>
<%@ taglib uri="/html" prefix="html" %>
<%@ taglib uri="/logic" prefix="logic" %>
<%@ taglib uri="/keyshop" prefix="keyshop" %>
<%@include file="/jsp/pub/pub.jsp"%>
<%
	if(request.getAttribute("no_product") != null) {
%>

<%
	} else {
	Product product = (Product)request.getAttribute("Product");
%>
<%
String cssName = "";
com.keyshop.shop.system.model.SystemCss css = com.keyshop.shop.system.util.SystemConst.getSystemCss(request);
		
if(css != null) {
	cssName = css.getCssName();
}

com.keyshop.shop.system.model.ViewConfig viewConfigComm = com.keyshop.shop.system.manager.SystemManager.getViewConfig(request);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title><%=product.getName()%>商品推荐</title>
<link href="<%=CONTEXT%>/<%=cssName%>" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript src="<%=CONTEXT%>/fg/js/check.js"></SCRIPT>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<script>
	function sendMail() {
		if(document.all['myname'].value == "") {
			alert("请输入您的名称。")
			document.all['myname'].focus();
			return;
		}
		if(document.all['myemail'].value == "") {
			alert("请输入您的邮件地址。")
			document.all['myemail'].focus();
			return;
		}
		
		if(!isEmail(document.all['myemail'].value)) {
			alert("您的邮件地址格式不正确。")
			document.all['myemail'].focus();
			return;
		}
		
		if(document.all['name1'].value == "") {
			alert("请输入您朋友的名称。")
			document.all['myname'].focus();
			return;
		}
		if(document.all['email1'].value == "") {
			alert("请输入您朋友的邮件地址。")
			document.all['myemail'].focus();
			return;
		}
		
		if(!isEmail(document.all['email1'].value)) {
			alert("您朋友的邮件地址格式不正确。")
			document.all['myemail'].focus();
			return;
		}
		
		productCommandForm.submit();
	}
</script>
</head>

<body leftmargin="0" topmargin="0">
<table align="center" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10" height="10"><img src="<%=CONTEXT%>/img/QQ/i01.gif" width="10" height="10"></td>
    <td  background="<%=CONTEXT%>/img/QQ/i03.gif"></td>
    <td width="10" height="10"><img src="<%=CONTEXT%>/img/QQ/i02.gif" width="10" height="10"></td>
  </tr>
  <tr>
    <td  background="<%=CONTEXT%>/img/QQ/i04.gif">&nbsp;</td>
    <td>
    	<!--主题内容开始-->
			<table width="650" border="0" align="center" cellpadding="4" cellspacing="0">
			  <tr>
			    <td width="266"><img src="<%=CONTEXT%>/<%=viewConfigComm.getLog_image()%>" ></td>
			    <td valign="bottom"><font color="red"><b>
			    	订购电话：
			    	      <%
										if(viewConfigComm.getSys_tel() != null) {
									%>
										<%=viewConfigComm.getSys_tel()%><br>
									<%
										}
									%>
			      客 服 QQ：
			            <%
										if(viewConfigComm.getSys_qq() != null) {
									%>
										<%=viewConfigComm.getSys_qq()%><br>
									<%
										}
									%>
			      </b></font></td>    
			  </tr>
			</table><br>
			<table width="650" border="0" align="center">
			  <tr>
			    <td>
			    	您推荐给朋友的商品是：
			    	<font color="red"><%=product.getName()%></font><br>
			    	<%if(!StringUtil.isEmpty(product.getModel())){%> 
          	型号:<font color="red"><%=product.getModel()%></font>
          	<%}%>
          	<%if(!StringUtil.isEmpty(product.getProductNo())){%>
          	编号：<font color="red"><%=product.getProductNo()%></font>
          	<%}%> 
          	<%if(!StringUtil.isEmpty(product.getSpec())){%>
          	品牌: <font color="red"><%=product.getSpec()%></font>
          	<%}%><br>
			     售价：<font color="red">￥<%=product.getUnitPrice()%></font>
			    </td>
			  </tr>
			</table>
			<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
			  <tr>
			    <td height="25" bgcolor="2B579E" align=center><font color=white size=2><b>商品推荐</b></font></td>
			  </tr>
			</table>
			<html:form action="fg/product/productCommand">
			<input type="hidden" name="channelId" value="<%=currentChannel.getId()%>">
			<html:hidden property="bean.id"/>
			<html:hidden property="actionType" value="command"/>
			<table width="650" border="1" align="center" cellpadding="0" cellspacing="0" 
				bordercolorlight="#D4D4D4" bordercolordark="white">
			  <tr>
			    <td>
			    	<table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1">
				      <tr bgcolor="f2f2f2">
				        <td width="26%" align="right">第一个朋友的称呼：</td>
				        <td width="74%" align="left"><input name="name1" type="text" size="20" maxlength="32">
				        <font color=red>*</font></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">第一个朋友的E-mail：</td>
				        <td align="left"><input name="email1" type="text" size="30"  maxlength="40">
				          <font color=red>*</font></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">朋友的称呼：</td>
				        <td align="left"><input name="name2" type="text" size="20" maxlength="32"></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">朋友的E-mail：</td>
				        <td align="left"><input name="email2" type="text" size="30"  maxlength="40"></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">朋友的称呼：</td>
				        <td align="left"><input name="name3" type="text" size="20" maxlength="32"></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">朋友的E-mail：</td>
				        <td align="left"><input name="email3" type="text" size="30"  maxlength="40">
				        </td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">朋友的称呼：</td>
				        <td align="left"><input name="name4" type="text" size="20" maxlength="32"></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">朋友的E-mail：</td>
				        <td align="left"><input name="email4" type="text" size="30"  maxlength="40"></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">朋友的称呼：</td>
				        <td align="left"><input name="name5" type="text" size="20" maxlength="32"></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">朋友的E-mail：</td>
				        <td align="left"><input name="email5" type="text" size="30"  maxlength="40"></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right" valign="top">给朋友的留言：</td>
				        <td align="left"><textarea name="content" cols="50" rows="5"></textarea><font color=red>*</font></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">您的称呼：</td>
				        <td align="left"><input name="myname" type="text" size="20">
				          <font color=red>*</font></td>
				      </tr>
				      <tr bgcolor="f2f2f2">
				        <td align="right">您的E-mail：</td>
				        <td align="left"><input name="myemail" type="text" size="30">
				          <font color=red>*</font></td>
				      </tr>
			      </table>
			    </td>
			  </tr>
			</table>
			<table width="90%"  border="0" cellspacing="0" cellpadding="0">
			  <tr>
			    <td height="60" align="center">
			    	<input type="button" name="button" onclick="javascript:sendMail()" value="推荐给朋友">
			      <input type="reset" name="Submit2" value="清空"></td>
			  </tr>
			</table>
			<br>
			</html:form>
    	<!--主体内容结束-->
    </td>
    <td background="<%=CONTEXT%>/img/QQ/i05.gif"></td>
  </tr>
  <tr>
    <td width="10" height="10"><img src="<%=CONTEXT%>/img/QQ/i06.gif" width="10" height="10"></td>
    <td background="<%=CONTEXT%>/img/QQ/i08.gif"></td>
    <td width="10" height="10"><img src="<%=CONTEXT%>/img/QQ/i07.gif" width="10" height="10"></td>
  </tr>
</table>

</body>
</html>
<%
	}
%>
	<script>
  	function sendMail() {
  		if(document.all['myname'].value == "") {
  			alert("请输入您的名称。")
  			document.all['myname'].focus();
  			return;
  		}
  		if(document.all['myemail'].value == "") {
  			alert("请输入您的邮件地址。")
  			document.all['myemail'].focus();
  			return;
  		}
  		
  		
  		if(document.all['name1'].value == "") {
  			alert("请输入您朋友的名称。")
  			document.all['name1'].focus();
  			return;
  		}
  		if(document.all['email1'].value == "") {
  			alert("请输入您朋友的邮件地址。")
  			document.all['email1'].focus();
  			return;
  		}
  		
  		
  		productCommandForm.submit();
  	}
  </script>