📄 manager_meeting_edit.jsp
字号:
<%@ page errorPage="ErrPage.jsp"
import="java.util.Date, java.sql.*"
contentType="text/html;charset=gb2312"%>
<jsp:useBean id="pool" scope="application" class="com.PoolBean"/>
<%
String strLoginUser = (String)session.getAttribute("LoginUser");
if (strLoginUser == null || strLoginUser.length() == 0)
response.sendRedirect("Login.jsp");
%>
<HTML>
<HEAD>
<LINK REL="stylesheet" HREF="littleproject.css" TYPE="text/css">
<SCRIPT LANGUAGE="JavaScript" SRC="meeting.js"></SCRIPT>
<script language="javascript">
<!--
function isok(theform)
{
if (theform.meeting_title.value=="")
{
alert("请您填写会议主题!");
theform.meeting_title.focus();
return (false);
}
var getformyear;
getformyear= theform.beginyear.value;
var getformmonth;
getformmonth = theform.beginmonth.value;
var getformday;
getformday = theform.beginday.value;
var subreturndate;
subreturndate = isrightdate(getformyear,getformmonth,getformday);
if (subreturndate == 1)
{
alert(getformyear+"年"+getformmonth+"月只有三十天,
请您重新选择会议起始日期!");
return false;
}
if (subreturndate == 2)
{
alert(getformyear+"年二月只有29天,请您重新选择会议起始日期!");
return false;
}
if (subreturndate == 3)
{
alert(getformyear+"年二月只有28天,请您重新选择会议起始日期!");
return false;
}
var getformyear1;
getformyear1= theform.endyear.value;
var getformmonth1;
getformmonth1 = theform.endmonth.value;
var getformday1;
getformday1 = theform.endday.value;
var subreturndate1;
subreturndate1 = isrightdate(getformyear1,getformmonth1,getformday1);
if (subreturndate1 == 1)
{
alert(getformyear1+"年"+getformmonth1+"月只有三十天,
请您重新选择会议结束日期!");
return false;
}
if (subreturndate1 == 2)
{
alert(getformyear1+"年二月只有29天,请您重新选择会议结束日期!");
return false;
}
if (subreturndate1 == 3)
{
alert(getformyear1+"年二月只有28天,请您重新选择会议结束日期!");
return false;
}
if (theform.place.value=="")
{
alert("请您填写会议召开地点!");
theform.place.focus();
return (false);
}
if (theform.touch_man.value=="")
{
alert("请您填写联系人!");
theform.touch_man.focus();
return (false);
}
if (theform.touch_tel.value=="")
{
alert("请您填写联系电话!");
theform.touch_tel.focus();
return (false);
}
if (theform.touch_address.value=="")
{
alert("请您填写联系地址!");
theform.touch_address.focus();
return (false);
}
if (theform.touch_email.value=="")
{
alert("请您填写联系邮件地址!");
theform.touch_email.focus();
return (false);
}
if (theform.remark.value=="")
{
alert("请您填写会议简介!");
theform.remark.focus();
return (false);
}
theform.nrooms.value= noblankrooms;
return (true);
}
-->
</script>
<TITLE>会务信息更改</TITLE>
</HEAD>
<BODY bgcolor=LightBlue>
<%
Date date = new Date();
try{
String num = request.getParameter("num");
if (pool.getConnectionSize() == 0)
{
pool.initializePool();
}
Connection con = null;
Statement stmt = null;
con = pool.getConnection();
stmt= con.createStatement();
ResultSet rs=null;
String strSel = "select * from meeting where num="+num;
rs = stmt.executeQuery(strSel);
while (rs.next())
{
String title=rs.getString("title");
String begin_time=rs.getString("begin_time");
String end_time=rs.getString("end_time");
String place=rs.getString("place");
String touch_man=rs.getString("touch_man");
String touch_tel=rs.getString("touch_tel");
String touch_address=rs.getString("touch_address");
String remark=rs.getString("remark");
String touch_email=rs.getString("touch_email");
%>
<center>
<font size="5" face="隶书">会议信息更改</font><br><br>
<form action="manager_meeting_editext.jsp"
method=POST onsubmit="return isok(this)">
<input type="hidden" name="meeting_num" value="<%=num %>">
<TABLE border=1 bordercolor=RoyalBlue bgcolor=LightBlue width=650>
<tr>
<td align="center" bgcolor=LightYellow width="100">
<font color="red">会议主题</font>
</td>
<td width="550">
<input type="text" size=45 name="meeting_title" value="<%=title%>"
style="border-style: solid; border-width: 1">
</td>
</tr>
<tr>
<td align="center" bgcolor=LightYellow width="100">
<font color="red">起始日期</font>
</td>
<td align="left" width="550">
<select name="beginyear" size="1">
<option value="<%=begin_time.substring(0,4)%>">
<%=begin_time.substring(0,4)%>
<%
for (int y=date.getYear()+1900;y<date.getYear()+1905;y++)
{
%>
<option value="<%=y%>"><%=y%></option>
<%
}
%>
</select>年
<select name="beginmonth" size="1">
<option value="<%=begin_time.substring(5,7)%>">
<%=begin_time.substring(5,7)%>
<%
for (int i=0; i<10;i++)
{
%>
<option value="0<%=i+1%>"><%=i+1%></option>
<%
}
for (int i=10; i<12;i++)
{
%>
<option value="<%=i+1%>"><%=i+1%></option>
<%
}
%>
</select>月
<select name="beginday" size="1">
<option value="<%=begin_time.substring(8,10)%>">
<%=begin_time.substring(8,10)%>
<%
for (int j=1; j<10;j++)
{
%>
<option value="0<%=j%>"><%=j%></option>
<%
}
for (int j=10; j<32;j++)
{
%>
<option value="<%=j%>"><%=j%></option>
<%
}
%>
</select>日
</td>
</tr>
<tr>
<tr>
<td align="center" bgcolor=LightYellow width="100">
<font color="red">结束日期</font>
</td>
<td align="left" width="550">
<select name="endyear" size="1">
<option value="<%=end_time.substring(0,4)%>">
<%=end_time.substring(0,4)%>
<%
for (int y=date.getYear()+1900;y<date.getYear()+1905;y++)
{
%>
<option value="<%=y%>"><%=y%></option>
<%
}
%>
</select>年
<select name="endmonth" size="1">
<option value="<%=end_time.substring(5,7)%>">
<%=end_time.substring(5,7)%>
<%
for (int i=0; i<10;i++)
{
%>
<option value="0<%=i+1%>"><%=i+1%></option>
<%
}
for (int i=10; i<12;i++)
{
%>
<option value="<%=i+1%>"><%=i+1%></option>
<%
}
%>
</select>月
<select name="endday" size="1">
<option value="<%=end_time.substring(8,10)%>">
<%=end_time.substring(8,10)%>
<%
for (int j=1; j<10;j++)
{
%>
<option value="0<%=j%>"><%=j%></option>
<%
}
for (int j=10; j<32;j++)
{
%>
<option value="<%=j%>"><%=j%></option>
<%
}
%>
</select>日
</td>
</tr>
<tr>
<td align="center" bgcolor=LightYellow width="100">
<font color="red">开会地点</font>
</td>
<td width="550">
<input type="text" size=25 name="place" value="<%=place%>"
style="border-style: solid; border-width: 1">
</td>
</tr>
<tr>
<td align="center" bgcolor=LightYellow width="100">
<font color="red">联 系 人</font>
</td>
<td width="550">
<input type="text" size=35 name="touch_man" value="<%=touch_man%>"
style="border-style: solid; border-width: 1">
</td>
</tr>
<tr>
<td align="center" bgcolor=LightYellow width="100">
<font color="red">联系电话</font>
</td>
<td width="550">
<input type="text" size=30 name="touch_tel" value="<%=title%>"
style="border-style: solid; border-width: 1">
</td>
</tr>
<tr>
<td align="center" bgcolor=LightYellow width="100">
<font color="red">联系地址</font>
</td>
<td width="550">
<input type="text" size=45 name="touch_address" value="<%=touch_address%>" style="border-style: solid; border-width: 1">
</td>
</tr>
<tr>
<td align="center" bgcolor=LightYellow width="100">
<font color="red">邮件地址</font>
</td>
<td width="550">
<input type="text" size=30 name="touch_email" value="<%=touch_email%>" style="border-style: solid; border-width: 1">
</td>
</tr>
<tr>
<td align="center" bgcolor=LightYellow width="100">
<font color="red">会议简介</font>
</td>
<td width="550">
<textarea rows="10" name="remark" cols="73"
style="border-style: solid; border-width: 1">
<%=remark%>
</textarea>
</td>
</tr>
<tr align="right">
<td colspan="2" width="650">
<input type="submit" value="修 改" name=submit1>
<input type="reset" value="重 置" name=reset1>
<a href="manager_meeting.jsp">退 出</a>
</td>
</tr>
</table>
</form>
</CENTER>
<%
}
stmt.close();
pool.releaseConnection(con);
}
catch(Exception e)
{
System.out.println("Exception: " + e.getMessage());
}
%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -