<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%><%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%><%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="ShopProduct 添加实体类数据表单，path: 请情: www.guuraa.net " />

<title>ShopProduct列表</title>
<link href="<bean:write name="SystemConfigApp" property="appContext"/>/com/goosaa/templete/default.css" type="text/css" rel="stylesheet">
<!--
 * @author http://www.guuraa.org
* tel:020-28983330 mobile:15975485229
 * email:wujavei@126.com  QQ:274390981
 * @see /entryJsp/ShopProductFromAdd.jsp
 -->

<title> ShopProduct </title>

<link href="<bean:write name="SystemConfigApp" property="appContext"/>/com/goosaa/templete/default.css" type="text/css" rel="stylesheet">
<%--  时间控件 --%>

<script type="text/javascript"  src="<bean:write name="SystemConfigApp" property ="appContext"/>/DateTimeCalendar/DateTimeCalendar.js" language="javascript">
</script> 
<script src="<bean:write name="SystemConfigApp" property ="appContext"/>/guuraaApp/javascript/guuraa.js" type="text/javascript" language="javascript" charset="UTF-8" ></script>

</head>
<body>
<html:errors/>

<div class="title_box"><h1>添加系统变量</h1></div>

<script type="text/javascript" src="/guuraa.org/javascript/form.js" language="javascript"></script>
<html:form   action="/gcms.hibernate.action/ShopProductAddAction?leixing=tj" method="post"   >
<div id="content">

<p>
<span class="formElementLable">系统变量标题:</span><html:text property="title" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.title" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">content:</span><html:text property="content" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.content" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">catid:</span><html:text property="catid" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.catid" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">catName:</span><html:text property="catName" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.catName" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">网页标题:</span><html:text property="htmlTitle" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.htmlTitle" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">网页关键字:</span><html:text property="htmlKeyWord" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.htmlKeyWord" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">网页描述:</span><html:text property="htmlDescription" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.htmlDescription" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">系统变量模板路径:</span><html:text property="templetePath" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.templetePath" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">是否自定义模板:</span><Input type="checkbox" name="buseSelfTemplete" checked="checked"  value="true"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.buseSelfTemplete" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">作者:</span><html:text property="authorName" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.authorName" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">标签:</span><html:text property="tagsName" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.tagsName" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">点击:</span><html:text property="viewCount" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.viewCount" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">是否审核:</span><Input type="checkbox" name="bcheck" checked="checked"  value="true"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.bcheck" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">是否通过:</span><Input type="checkbox" name="bpassed" checked="checked"  value="true"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.bpassed" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">是否首页推荐:</span><Input type="checkbox" name="bcmdIndex" checked="checked"  value="true"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.bcmdIndex" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">是否分类推荐:</span><Input type="checkbox" name="bcmsCat" checked="checked"  value="true"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.bcmsCat" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">发布时间:</span><html:text property="addTime" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.addTime" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">更新时间:</span><html:text property="updateTime" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.updateTime" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">发布人ＩＤ:</span><html:text property="inputUserId" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.inputUserId" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">发布人:</span><html:text property="inputUserName" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.inputUserName" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>
<p>
<input id="ShopProductFormSubmit" type="button" onClick="return formsubmit()"  value="提交"/> <input type="reset"  value="重设"/>
</p>

</div></html:form>
	<script type="text/javascript" language="javascript" >
	//重设表单
	function resetForm(){
		var formPage=document.forms["ShopProductForm"];	 formPage.reset();
	 return false;
	}
	
	//提交表单，成功后提交表单
	function formsubmit(){
		var form=document.forms["ShopProductForm"];
		if(form==null){
			alert("无法获取表单！");
			 	return false;
		}
		if(form!=null){
		//表单验证
		 var formchekcReturn=formcheck();
	 	if(formchekcReturn !=null && formchekcReturn==true){
		form.submit();
	 //将提交按钮设置为失效，防止重复提交
		var formSubmit=document.getElementById("ShopProductFormSubmit");
	 	formSubmit.disabled= true;
	 	return true;
			 }else{
	 	return false;
		}
	 }//end if
	
	}//end fun
	//表单验证
	function formcheck(){
		var formPage=document.forms["ShopProductForm"];		if(formPage==null){
			alert("未发现表单！");
			isreturn =false;
			return false;
			
		}
		var isreturn =true;
		//表单catid元素是否为空
	     var catid =formPage.catid;
		var catidValue=trim(catid.value);
			if(catidValue==null||catidValue==""){
			alert("catid不能为空！");
			catid.focus();
			isreturn =false;
			return false;
		}	//end if
		//表单viewCount元素是否为空
	     var viewCount =formPage.viewCount;
		var viewCountValue=trim(viewCount.value);
			if(viewCountValue==null||viewCountValue==""){
			alert("点击不能为空！");
			viewCount.focus();
			isreturn =false;
			return false;
		}	//end if
		
		//表单中文验证
		
		//表单字符长度验证
		
		//表单密码强度验证
		
		//表单是否包含字符验证
		
		//表单过长验证
		
		//判断是否提交表单
		//alert("return :"+isreturn);
		
		if(isreturn ==false){
		
		//	alert("return :"+isreturn);
		return false;
		
		}else{
		isreturn=true;
		//alert("return :"+isreturn);
		return isreturn;
		}
	}
	
	</script>

</body>
</html>

