⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clubaction_edit.jsp

📁 自己制作的联通CRM,支持客户分类,管理,升级,积分管理等等..
💻 JSP
字号:
<%@ page language="java" pageEncoding="GBK"%>

<%@ 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" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

<html:html lang="true">
  <head>
    <title>俱乐部活动编辑</title>
	<link rel="stylesheet" type="text/css" 
		href="${pageContext.request.contextPath}/image/main.css">
		
	<script type="text/javascript"
		src = "${pageContext.request.contextPath}/js/calendar2.js">
	</script>
	
	<script type="text/javascript">
		
		//表单的检验
		function mycheck(){
			
			//检验组织者
			var organiger = document.formca.organiger.value.replace(/\s/g,"");
			if(organiger.length == 0){
				alert("组织者不能为空");
				document.formca.organiger.focus();
				return false;
			}
			
			//检验活动时间
			var actiontime = document.formca.actiontime.value.replace(/\s/g,"");
			if(actiontime.length==0){
				alert("活动时间不能为空");
				document.formca.actiontime.focus();
				return false;
			
			}
			
			//获取系统时间
			var systime = new Date();
			var sys_year  = systime.getFullYear();
			var sys_month = systime.getMonth() + 1;
			var sys_date = systime.getDate();
			var sys_hour = systime.getHours();
			var sys_minute = systime.getMinutes(); 
			
			if(sys_month<10)
				sys_month = "0" + sys_month;
				
			if(sys_date<10)
				sys_date = "0" + sys_date;
				
			if(sys_hour<10)
				sys_hour = "0" + sys_hour;
				
			if(sys_minute<10)
				sys_minute = "0" + sys_minute;
			
			var str = sys_year + "-" + sys_month + "-" + sys_date + sys_hour + ":" + sys_minute;
			
			if(str>actiontime){
				alert("活动时间不能小于当前时间");
				document.formca.actiontime.focus();
				return false;
			}
				
			//检验活动地点
			var saddress = document.formca.saddress.value.replace(/\s/g,"");
			if(saddress.length==0){
				alert("活动地点不能为空");
				document.formca.saddress.focus();
				return false;
			
			}
			
			//检验活动内容
			var content = document.formca.content.value.replace(/\s/g,"");
			if(content.length==0){
				alert("活动内容不能为空");
				document.formca.content.focus();
				return false;
			
			}
			
			//检验活动预算
			var budget = document.formca.budget.value.replace(/\s/g,"");
			if(budget.length==0){
				alert("活动预算不能为空");
				document.formca.budget.focus();
				return false;
			
			}
			
			var temp_budget = budget.replace(/[0-9]/g,"");
			if(temp_budget.length>0){
				alert("活动预算必须为数字");
				document.formca.budget.focus();
				return false;
				
			}
			
			
			//检验预计参加人数
			var intendnum = document.formca.intendnum.value.replace(/\s/g,"");
			if(intendnum.length==0){
				alert("预计参加人数不能为空");
				document.formca.intendnum.focus();
				return false;
			
			}
			
			var temp_intendnum = intendnum.replace(/[0-9]/g,"");
			if(temp_intendnum.length>0){
				alert("预计参加人数必须为数字");
				document.formca.intendnum.focus();
				return false;
				
			}
		
			return true;
		}
	
	
	</script>
	
	
  </head>
  
  <body>
  
  	<logic:equal value="add" property="tag" name="clubActionForm">
  		<center><span style="font-size: 14px;font-weight: bold">添加俱乐部活动</span></center>
  	</logic:equal>
  
  	<logic:equal value="update" property="tag" name="clubActionForm">
  		<center><span style="font-size: 14px;font-weight: bold">修改俱乐部活动</span></center>
  	</logic:equal>
  
  	<br><br>
  	
  	<table width="80%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#D71920">
        <tr align="center" valign="middle"><td><br>
        	 <html:form action="/clubAction" styleId="formca" onsubmit="return mycheck();">
			  <table width="95%" border="1" align="center" cellpadding="0" cellspacing="0" id="ttc">
	
				<tr height="27">
				  	<td width="40%" align="center" id="ttc">俱 乐 部 名 称</td>
				    <td width="60%" id="ttc">
				    	&nbsp;&nbsp;&nbsp;
				    	<html:select property="clubname">
				    		<html:optionsCollection  name="clublist" label="clubname"  value="clubname" />
				    	</html:select>
				    </td>
				</tr>
				
				<tr height="27">
				  	<td width="40%" align="center" id="ttc">活 动 组 织 者</td>
				    <td width="60%" id="ttc">
				    	&nbsp;&nbsp;&nbsp;
				    	<html:text property="organiger" size="10"></html:text>
				    </td>
				</tr>
				
				<tr height="27">
				  	<td width="40%" align="center" id="ttc">活 动 时 间</td>
				    <td width="60%" id="ttc">
				    	&nbsp;&nbsp;&nbsp;
				    	<html:text property="actiontime" readonly="true" onclick="setDayHM(this);">
				    	</html:text>
				    </td>
				</tr>
				
				<tr height="27">
				  	<td width="40%" align="center" id="ttc">活 动 地 点</td>
				    <td width="60%" id="ttc">
				    	&nbsp;&nbsp;&nbsp;
				    	<html:text property="saddress" size="35"></html:text>
				    </td>
				</tr>
				
				<tr>
				  	<td width="40%" align="center" id="ttc">活 动 内 容</td>
				    <td width="60%" id="ttc">
				    	&nbsp;&nbsp;&nbsp;
				    	<html:textarea property="content" cols="35" rows="3"></html:textarea>
				    </td>
				</tr>
				
				<tr height="27">
				  	<td width="40%" align="center" id="ttc">活 动 预 算</td>
				    <td width="60%" id="ttc">
				    	&nbsp;&nbsp;&nbsp;
				    	<html:text property="budget" size="10"></html:text>
				    </td>
				</tr>
				
				<tr height="27">
				  	<td width="40%" align="center" id="ttc">预 计 参 加 人 数</td>
				    <td width="60%" id="ttc">
				    	&nbsp;&nbsp;&nbsp;
				    	<html:text property="intendnum" size="10"></html:text>
				    </td>
				</tr>
				
				
				<tr height="30">
					<td colspan="2" align="center" id="ttc">
					
					<logic:equal value="add" property="tag" name="clubActionForm">
						<input type="submit" value="添加"/>
						<input type="hidden" value="insert" name="tag" />
					</logic:equal>
					
					<logic:equal value="update" property="tag" name="clubActionForm">
						<input type="submit" value="修改"/>
						<input type="hidden" value="modify" name="tag" />
						<input type="hidden" name="currentpage" value="${requestScope.map.currentpage}">
						<html:hidden property="nid" />
						<html:hidden property="ischecked" />
						<html:hidden property="ispass" />
						<html:hidden property="opinion" />
					</logic:equal>
					
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input type="reset" value="重置"/>
					&nbsp;&nbsp;&nbsp;
					
					</td>
				</tr>
				
				</table>
			  </html:form>
		</td>
		</tr>
	 </table>
    
     <br>
     <center><a href="${pageContext.request.contextPath}/clubAction.do?tag=show&currentpage=${requestScope.map.currentpage}">返回俱乐部活动管理</a></center>
  
  
  
  
    
  </body>
</html:html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -