<%@ 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"%>





<html>





<head>





<title> 添加存储设置</title><link href="<bean:write name="SystemConfigApp" property="appContext"/>/com/goosaa/templete/default.css" type="text/css" rel="stylesheet">





</head>





<body>





<div class="title_box">





<h1>  </h1>





</div><div id="content">添加会员存储权限</div>











<html:form  action="/store/admin/uploadConfig/action/PermissionAddAction?leixing=tj" onsubmit="return formsubmit()"  >





<div id="content">











<p>





会员组:<html:text property="grounpName" size="30"  maxlength="45"/>





</p>











<br/>





	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.grounpName" message="false">





	<span style="color:red;font-size:16px;">





	<bean:write name="zhouWuXingShi"/>





	</span>





	</html:messages>











<p>





会员组ID:<select  name="grounpId" >








<logic:iterate id="grounp"  indexId="index" name="MembergrounpList">


	<option value="<bean:write name="grounp" property="grounpid"/>" >


<bean:write name="grounp" property="groupname"/>


</option>


</logic:iterate>














</select>





</p>











<br/>





	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.grounpId" message="false">





	<span style="color:red;font-size:16px;">





	<bean:write name="zhouWuXingShi"/>





	</span>





	</html:messages>











<p>





许可上传文件类型:<html:text property="storeFileType" size="30"  maxlength="45"/>*多个类型以|分隔，如jpg|gif





</p>











<br/>





	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.storeFileType" message="false">





	<span style="color:red;font-size:16px;">





	<bean:write name="zhouWuXingShi"/>





	</span>





	</html:messages>











<p>





默认保存目录:<html:text property="defaultStoreDir" size="30"  maxlength="45"/>





</p>











<br/>





	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.defaultStoreDir" message="false">





	<span style="color:red;font-size:16px;">





	<bean:write name="zhouWuXingShi"/>





	</span>





	</html:messages>











<p>





默认存储目录ID:<select name="defaultStoreBankId">


	<logic:iterate id="StoreWebFileBankItem" name="StoreWebFileBankList">


	<option value="<bean:write name="StoreWebFileBankItem" property="id"/>">





<bean:write name="StoreWebFileBankItem" property="name"/>





</option>	


</logic:iterate>


</select>





</p>











<br/>





	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.defaultStoreBankId" message="false">





	<span style="color:red;font-size:16px;">





	<bean:write name="zhouWuXingShi"/>





	</span>





	</html:messages>











<p>





是否允许该用户组上传:<Input type="checkbox" name="benableUpload" checked="checked"  value="true"/>





</p>











<br/>





	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.benableUpload" message="false">





	<span style="color:red;font-size:16px;">





	<bean:write name="zhouWuXingShi"/>





	</span>





	</html:messages>











<p>





系统关键字:<html:text property="systemKeyWord" size="30"  maxlength="45"/>*DonFileUpload 下载资源上传，ShopImgUpload,商城图,UserVideoUpload,视频上传，EbookUPlaod，电子书





</p>











<br/>





	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.systemKeyWord" message="false">





	<span style="color:red;font-size:16px;">





	<bean:write name="zhouWuXingShi"/>





	</span>





	</html:messages>





<p>





<html:submit  value="提交"/> <html:reset  value="重设"/>





</p>











</div></html:form>





	<script language="javascript">





	//重设表单





	function resetForm(){





	 var form=document.forms["StoreWebUserGrounpPermissionForm"];





	 form.reset();





	 return false;





	}





	





	//提交表单，成功后提交表单





	function formsubmit(){





	var form=document.forms["StoreWebUserGrounpPermissionForm"];





		if(form==null){





			alert("无法获取表单！");





			 	return false;





		}else{





		//表单验证





		 var formchekcReturn=formcheck();





	 		if(formchekcReturn==true){





			//alert("提交成功！");





			 }else{





	 	return false;





		}





	 }//end if





	





	}//end fun





	//表单验证





	function formcheck(){





		var form=document.forms["StoreWebUserGrounpPermissionForm"];





		//alert("表单： "+form.name);





		





		var isreturn =true;





		if(form==null){





			alert("未发现表单！");





			isreturn =false;





			return false;





			





		}





		//表单grounpId元素是否为空





	     var grounpId =form.grounpId;





		var grounpIdValue=trim(grounpId.value);





			if(grounpIdValue==null||grounpIdValue==""){





			alert("grounpId不能为空！");





			userName.focus();





			isreturn =false;





			return false;





		}	//end if





		//表单defaultStoreBankId元素是否为空





	     var defaultStoreBankId =form.defaultStoreBankId;





		var defaultStoreBankIdValue=trim(defaultStoreBankId.value);





			if(defaultStoreBankIdValue==null||defaultStoreBankIdValue==""){





			alert("defaultStoreBankId不能为空！");





			userName.focus();





			isreturn =false;





			return false;





		}	//end if





		//表单benableUpload元素是否为空





	     var benableUpload =form.benableUpload;





		var benableUploadValue=trim(benableUpload.value);





			if(benableUploadValue==null||benableUploadValue==""){





			alert("benableUpload不能为空！");





			userName.focus();





			isreturn =false;





			return false;





		}	//end if





		//表单systemKeyWord元素是否为空





	     var systemKeyWord =form.systemKeyWord;





		var systemKeyWordValue=trim(systemKeyWord.value);





			if(systemKeyWordValue==null||systemKeyWordValue==""){





			alert("systemKeyWord不能为空！");





			userName.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;





		}





	}





	//javascript去空格函数





		





	function LTrim(str){ 





		if(str==null||str==""){





		return str;





		}





		//去掉字符串 的头空格 





		var i; 	





		var strlenght=str.length;





		for(i=0;i<strlenght;i++){





			





		





		    if(str.charAt(i)!=" "&&str.charAt(i)!=" "){	





		    break;





		    }else{





		  





		     str = str.substring(i+1,str.length); 





			 //删除后，重新赋值





			 i=0;





			 strlenght=str.length;





			 //	alert("删除空格："+str);





		    }//end if





			}//end for





			//alert("  删除左空格返回值："+str);





		     return str;





	  } //end function





		 





	 function RTrim(str){





		if(str==null||str==""){





		return str;





		}





		  var i; 





		 





		 for(i=str.length-1;i>=0;i--){





		 





			  if(str.charAt(i)!=" "&&str.charAt(i)!=" "){





		 	  break;





		 	  }else{





		   





		 	   str = str.substring(0,i+1); 





			   //删除后重新赋值





			  i=str.length-1;





		 	   }





		      





		  } //end for





		  





		  //alert("删除右空格返回值："+str);





		    return str; 





	 }//fun





		   





	 function trim(str){





			if(str==null||str==""){





		      return str;





		      }





	       return LTrim(RTrim(str));





	     }





	





	</script>























</body>





</html>