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

📄

📁 一些jsp源代码 内含完整jsp程序 希望大家喜欢!!!!!!!!!!!!!!!!!!!1
💻
字号:
范例manager_meeting_add.jsp部分源代码
001	<%@ page errorPage="ErrPage.jsp"
002	         import="Java.util.Date, Java.sql.*"
003	         contentType="text/html;charset=gb2312"%>
004	<JSP:useBean id="pool" scope="application" class="com.PoolBean"/>
005	<%
006	String strLoginUser = (String)session.getAttribute("LoginUser");
007	if (strLoginUser == null || strLoginUser.length() == 0)	
008		response.sendRedirect("../Login.jsp");	
009	%>
010	<html>
011	<head>
012	<LINK REL="stylesheet" HREF="../littleproject.css" TYPE="text/css">
013	<SCRIPT LANGUAGE="JavaScript" SRC="../ meeting.js"></SCRIPT>
014	<script language="Javascript">
015	<!--
016	function isok(theform)
017	{  
018	  if (theform.meeting_title.value=="") 
019	  {
020	    alert("请您填写会议主题!");
021	    theform.meeting_title.focus();
022	    return (false);
023	  }
024	 var getformyear;
025	    getformyear= theform.beginyear.value;		 
026	 var getformmonth;
027	    getformmonth = theform.beginmonth.value;		
028	 var getformday;
029	    getformday = theform.beginday.value;
030	 var subreturndate;
031	 subreturndate = isrightdate(getformyear,getformmonth,getformday);
032	 if (subreturndate == 1)
033	 {
034	     alert(getformyear+"年"+getformmonth+"月只有三十天,
035      请您重新选择会议起始日期!");
036		 return false;
037	 }
038	 if (subreturndate == 2)
039	 {
040	     alert(getformyear+"年二月只有29天,请您重新选择会议起始日期!");
041		 return false;
042	 }
043	 if (subreturndate == 3)
044	 {
045	     alert(getformyear+"年二月只有28天,请您重新选择会议起始日期!");
046		 return false;
047	 }
048	 
049	 var getformyear1;
050	      getformyear1= theform.endyear.value;		 
051	 var getformmonth1;
052	     getformmonth1 = theform.endmonth.value;		
053	 var getformday1;
054	     getformday1 = theform.endday.value;
055	 var subreturndate1;
056	 subreturndate1 = isrightdate(getformyear1,getformmonth1,getformday1);
057	 if (subreturndate1 == 1)
058	 {
059	     alert(getformyear1+"年"+getformmonth1+"月只有三十天,
060       请您重新选择会议结束日期!");
061		 return false;
062	 }
063	 if (subreturndate1 == 2)
064	 {
065	     alert(getformyear1+"年二月只有29天,请您重新选择会议结束日期!");
066		 return false;
067	 }
068	 if (subreturndate1 == 3)
069	 {
070	     alert(getformyear1+"年二月只有28天,请您重新选择会议结束日期!");
071		 return false;
072	 }
073	   if (theform.place.value=="") 
074	  {
075	    alert("请您填写会议召开地点!");
076	    theform.place.focus();
077	    return (false);
078	  }
079	  if (theform.touch_man.value=="") 
080	  {
081	    alert("请您填写联系人!");
082	    theform.touch_man.focus();
083	    return (false);
084	  }
085	  if (theform.touch_tel.value=="") 
086	  {
087	    alert("请您填写联系电话!");
088	    theform.touch_tel.focus();
089	    return (false);
090	  }
091	  if (theform.touch_address.value=="") 
092	  {
093	    alert("请您填写联系地址!");
094	    theform.touch_address.focus();
095	    return (false);
096	  }
097	  if (theform.touch_email.value=="") 
098	  {
099	    alert("请您填写联系邮件地址!");
100	    theform.touch_email.focus();
101	    return (false);
102	  }
103	  if (theform.remark.value=="") 
104	  {
105	    alert("请您填写会议简介!");
106	    theform.remark.focus();
107	    return (false);
108	  }
109	  theform.nrooms.value= noblankrooms;	
110	  return (true);
111	}
112	function onClick()
113	{ 
114		this.location.replace("manager_meeting.jsp");
115	}
116	-->
117	</script>
118	  <title>会务信息录入</title>  
119	</head>
120	<body bgcolor=LightBlue>
121	<% 
122	   Date date = new Date();
123	try
124	{
125	 
126	    if (pool.getConnectionSize() == 0)
127		{
128			pool.initializePool();
129		}		
130		Connection con = null;
131		Statement stmt = null;		
132		con = pool.getConnection();
133		stmt= con.createStatement();
134	    ResultSet  rs=null;		
135		String sqlString = "select num from meeting order by num desc";
136		rs =stmt.executeQuery(sqlString);
137		//int mycode=0;
138		int meeting_num=0;
139		//rs.last();
140		if(rs.next())
141		{
142		  meeting_num = rs.getInt("num");
143		}
144		meeting_num=meeting_num+1;	
145	%>
146	<center>
147	<br>
148	<font color="blue" size="6" face="隶书">召开新会议</font>
149	  <form action="manager_meeting_addext.jsp" method=POST
150     onsubmit="return isok(this)">
151	  <input type="hidden" name="meeting_num" value="<%=meeting_num %>">
152	  <TABLE border=1 bordercolor=RoyalBlue bgcolor=LightBlue width=650>
153		 <tr>
154		   <td align="center" bgcolor=LightYellow width="100">
155		     <font color="red">会议主题</font>
156		   </td>
157		   <td width="550">
158		     <input type="text" size=45 name="meeting_title" 
159       style="border-style: solid; border-width: 1">
160		   </td>
161		 </tr> 
162		 <tr>
163		   <td align="center" bgcolor=LightYellow width="100">
164		     <font color="red">起始日期</font>
165		   </td>
166		   <td align="left" width="550">
167		     <select name="beginyear" size="1">
168			  <option value="<%=date.getYear()+1900%>">
169       <%=date.getYear()+1900%>
170       </option>
171	<%
172	          for (int y=date.getYear()+1900;y<date.getYear()+1905;y++)
173			  {
174	%>
175			     <option value="<%=y%>"><%=y%></option>
176	<%
177	          }
178	%>     
179	       </select>年
180		  <select name="beginmonth" size="1">	
181			  
182       
183      	    
184			  <%
185			  for (int i=0; i<10;i++)
186			  {
187	%>
188			     <option value="0<%=i+1%>"><%=i+1%></option>
189	<%
190	          }
191			  for (int i=10; i<12;i++)
192			  {
193	%>
194			     <option value="<%=i+1%>"><%=i+1%></option>
195	<%
196	          }
197	%>
198	       </select>月
199		   <select name="beginday" size="1">		 
200			  
201			  <%
202			  for (int j=1; j<10;j++)
203			  {
204	%>
205			     <option value="0<%=j%>"><%=j%></option>
206	<%
207	          }
208			  for (int j=10; j<32;j++)
209			  {
210	%>
211			     <option value="<%=j%>"><%=j%></option>
212	<%
213	          }
214	%>
215	       </select>日
216		   </td>
217		 </tr>	
218		 <tr>
219		 <tr>
220		   <td align="center" bgcolor=LightYellow width="100">
221		     <font color="red">结束日期</font>
222		   </td>
223		   <td align="left" width="550">
224		     <select name="endyear" size="1">
225			  <option value="<%=date.getYear()+1900%>">
226        <%=date.getYear()+1900%>
227       </option>
228	<%
229	          for (int y=date.getYear()+1900;y<date.getYear()+1905;y++)
230			  {
231	%>
232			     <option value="<%=y%>"><%=y%></option>
233	<%
234	          }
235	%>     
236	       </select>年
237		  <select name="endmonth" size="1">	
238			  
239      
240      	    
241	         <%
242			  for (int i=0; i<10;i++)
243			  {
244	          %>
245			     <option value="0<%=i+1%>"><%=i+1%></option>
246	         <%
247	          }
248			  for (int i=10; i<12;i++)
249			  {
250	         %>
251			     <option value="<%=i+1%>"><%=i+1%></option>
252	         <%
253	          }
254	        %>
255	       </select>月
256		   <select name="endday" size="1">		 
257			  
258			  <%
259			  for (int j=1; j<10;j++)
260			  {
261	          %>
262			     <option value="0<%=j%>"><%=j%></option>
263	          <%
264	          }
265			  for (int j=10; j<32;j++)
266			  {
267	         %>
268			     <option value="<%=j%>"><%=j%></option>
269	         <%
270	          }
271	         %>
272	       </select>日
273		   </td>
274		 </tr>	
275		 <tr>  	   
276		   <td align="center" bgcolor=LightYellow width="100">	   
277		     <font color="red">开会地点</font>
278		   </td>
279		   <td width="550">
280		     <input type="text" size=25 name="place"
281       style="border-style: solid; border-width: 1">
282		   </td>	 
283		 </tr>
284		 <tr>
285		   <td align="center" bgcolor=LightYellow width="100">
286		     <font color="red">联&nbsp;系&nbsp;人</font>
287		   </td>
288		   <td width="550">
289		     <input type="text" size=35 name="touch_man"
290       style="border-style: solid; border-width: 1">
291		   </td>
292		 </tr>
293		 <tr>  	   
294		   <td align="center" bgcolor=LightYellow width="100">
295		     <font color="red">联系电话</font>
296		   </td>
297		   <td width="550">
298		     <input type="text" size=30 name="touch_tel"
299       style="border-style: solid; border-width: 1">
300		   </td>
301		 </tr>
302		 <tr>  	   
303		   <td align="center" bgcolor=LightYellow width="100">
304		     <font color="red">联系地址</font>
305		   </td>
306		   <td width="550">
307		     <input type="text" size=45 name="touch_address"
308        style="border-style: solid; border-width: 1">
309		   </td>
310		 </tr> 	 
311		 <tr>  	   
312		   <td align="center" bgcolor=LightYellow width="100">
313		     <font color="red">邮件地址</font>
314		   </td>
315		   <td width="550">
316		    <input type="text" size=30 name="touch_email"
317       style="border-style: solid; border-width: 1">
318		   </td>
319		 </tr> 	
320		 <tr>	 
321		   <td align="center" bgcolor=LightYellow width="100">
322		     <font color="red">会议简介</font>
323		   </td>
324		   <td width="550">
325		    <textarea rows="10" name="remark" cols="73"
326       style="border-style: solid; border-width: 1"></textarea>
327		   </td>
328		 </tr>	
329		 <tr align="right">
330		  <td colspan="2" width="650">
331		   <input type="submit" value="添  加" name=submit1>
332		   <input type="reset" value="重  置" name=reset1>
333		   <input type="button" onClick="onClick()" value="退  出" name=reset1>
334		  </td>
335		 </tr>
336	 </table>
337	 </form>
338	<%  
339	 rs.close();
340	 stmt.close();
341	 pool.releaseConnection(con);
342	}
343	catch (Exception e)
344	{
345	   out.println(e.getMessage());
346	}
347	%>
348	</center>
349	</html>

⌨️ 快捷键说明

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