📄 manager_meeting_edit.jsp.txt
字号:
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 String num = request.getParameter("num");
125 if (pool.getConnectionSize() == 0)
126 {
127 pool.initializePool();
128 }
129 Connection con = null;
130 Statement stmt = null;
131 con = pool.getConnection();
132 stmt= con.createStatement();
133 ResultSet rs=null;
134 String strSel = "select * from meeting where num="+num;
135 rs = stmt.executeQuery(strSel);
136 while (rs.next())
137 {
138 String title=rs.getString("title");
139 String begin_time=rs.getString("begin_time");
140 String end_time=rs.getString("end_time");
141 String place=rs.getString("place");
142 String touch_man=rs.getString("touch_man");
143 String touch_tel=rs.getString("touch_tel");
144 String touch_address=rs.getString("touch_address");
145 String remark=rs.getString("remark");
146 String touch_email=rs.getString("touch_email");
147 %>
148 <center>
149 <font size="5" face="隶书">用户信息更改</font><br><br>
150 <form action="manager_meeting_editext.jsp"
151 method=POST onsubmit="return isok(this)">
152 <input type="hidden" name="meeting_num" value="<%=num %>">
153 <TABLE border=1 bordercolor=RoyalBlue bgcolor=LightBlue width=650>
154 <tr>
155 <td align="center" bgcolor=LightYellow width="100">
156 <font color="red">会议主题</font>
157 </td>
158 <td width="550">
159 <input type="text" size=45 name="meeting_title" value="<%=title%>"
160 style="border-style: solid; border-width: 1">
161 </td>
162 </tr>
163 <tr>
164 <td align="center" bgcolor=LightYellow width="100">
165 <font color="red">起始日期</font>
166 </td>
167 <td align="left" width="550">
168 <select name="beginyear" size="1">
169 <option value="<%=begin_time.substring(0,4)%>">
170 <%=begin_time.substring(0,4)%>
171 <%
172
173 for (int y=date.getYear()+1900;y<date.getYear()+1905;y++)
174 {
175 %>
176 <option value="<%=y%>"><%=y%></option>
177 <%
178 }
179 %>
180 </select>年
181 <select name="beginmonth" size="1">
182 <option value="<%=begin_time.substring(5,7)%>">
183 <%=begin_time.substring(5,7)%>
184
185
186
187 <%
188 for (int i=0; i<10;i++)
189 {
190 %>
191 <option value="0<%=i+1%>"><%=i+1%></option>
192 <%
193 }
194 for (int i=10; i<12;i++)
195 {
196 %>
197 <option value="<%=i+1%>"><%=i+1%></option>
198 <%
199 }
200 %>
201 </select>月
202 <select name="beginday" size="1">
203 <option value="<%=begin_time.substring(8,10)%>">
204 <%=begin_time.substring(8,10)%>
205
206 <%
207 for (int j=1; j<10;j++)
208 {
209 %>
210 <option value="0<%=j%>"><%=j%></option>
211 <%
212 }
213 for (int j=10; j<32;j++)
214 {
215 %>
216 <option value="<%=j%>"><%=j%></option>
217 <%
218 }
219 %>
220 </select>日
221 </td>
222 </tr>
223 <tr>
224 <tr>
225 <td align="center" bgcolor=LightYellow width="100">
226 <font color="red">结束日期</font>
227 </td>
228 <td align="left" width="550">
229 <select name="endyear" size="1">
230 <option value="<%=end_time.substring(0,4)%>">
231 <%=end_time.substring(0,4)%>
232 <%
233
234 for (int y=date.getYear()+1900;y<date.getYear()+1905;y++)
235 {
236 %>
237 <option value="<%=y%>"><%=y%></option>
238 <%
239 }
240 %>
241 </select>年
242 <select name="endmonth" size="1">
243 <option value="<%=end_time.substring(5,7)%>">
244 <%=end_time.substring(5,7)%>
245 <%
246 for (int i=0; i<10;i++)
247 {
248 %>
249 <option value="0<%=i+1%>"><%=i+1%></option>
250 <%
251 }
252 for (int i=10; i<12;i++)
253 {
254 %>
255 <option value="<%=i+1%>"><%=i+1%></option>
256 <%
257 }
258 %>
259 </select>月
260 <select name="endday" size="1">
261 <option value="<%=end_time.substring(8,10)%>">
262 <%=end_time.substring(8,10)%>
263 <%
264 for (int j=1; j<10;j++)
265 {
266 %>
267 <option value="0<%=j%>"><%=j%></option>
268 <%
269 }
270 for (int j=10; j<32;j++)
271 {
272 %>
273 <option value="<%=j%>"><%=j%></option>
274 <%
275 }
276 %>
277 </select>日
278 </td>
279 </tr>
280 <tr>
281 <td align="center" bgcolor=LightYellow width="100">
282 <font color="red">开会地点</font>
283 </td>
284 <td width="550">
285 <input type="text" size=25 name="place" value="<%=place%>"
286 style="border-style: solid; border-width: 1">
287 </td>
288 </tr>
289 <tr>
290 <td align="center" bgcolor=LightYellow width="100">
291 <font color="red">联 系 人</font>
292 </td>
293 <td width="550">
294 <input type="text" size=35 name="touch_man" value="<%=touch_man%>"
295 style="border-style: solid; border-width: 1">
296 </td>
297 </tr>
298 <tr>
299 <td align="center" bgcolor=LightYellow width="100">
300 <font color="red">联系电话</font>
301 </td>
302 <td width="550">
303 <input type="text" size=30 name="touch_tel" value="<%=title%>"
304 style="border-style: solid; border-width: 1">
305 </td>
306 </tr>
307 <tr>
308 <td align="center" bgcolor=LightYellow width="100">
309 <font color="red">联系地址</font>
310 </td>
311 <td width="550">
312 <input type="text" size=45 name="touch_address"
313 value="<%=touch_address%>" style="border-style: solid; border-width: 1">
314 </td>
315 </tr>
316 <tr>
317 <td align="center" bgcolor=LightYellow width="100">
318 <font color="red">邮件地址</font>
319 </td>
320 <td width="550">
321 <input type="text" size=30 name="touch_email"
322 value="<%=touch_email%>" style="border-style: solid; border-width: 1">
323 </td>
324 </tr>
325 <tr>
326 <td align="center" bgcolor=LightYellow width="100">
327 <font color="red">会议简介</font>
328 </td>
329 <td width="550">
330 <textarea rows="10" name="remark" cols="73"
331 style="border-style: solid; border-width: 1">
332 <%=remark%>
333 </textarea>
334 </td>
335 </tr>
336 <tr align="right">
337 <td colspan="2" width="650">
338 <input type="submit" value="修 改" name=submit1>
339 <input type="reset" value="重 置" name=reset1>
340 <input type="button" onClick="onClick()" value="退 出" name=reset1>
341 </td>
342 </tr>
343 </table>
344 </form>
345 </CENTER>
346 <%
347 }
348 stmt.close();
349 pool.releaseConnection(con);
350 }
351 catch(Exception e)
352 {
353 System.out.println("Exception: " + e.getMessage());
354 }
355 %>
356 </BODY>
357 </HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -