📄 rest.jsp
字号:
<%@ page language="java" import="java.sql.*,java.util.*" %>
<%@ page contentType="text/html;charset=gb2312"%>
<jsp:useBean id="db" scope="page" class="opendb.opendb"/>
<%
String personID=(String)session.getAttribute("personID");
String sql = "SELECT M_TIMES FROM wglMESSAGE WHERE EMP_CODE = '" + personID + "' AND M_TIMES = (SELECT MAX(M_TIMES) FROM wglMESSAGE WHERE wglMESSAGE.EMP_CODE = '" + personID + "')";
//String sql = "SELECT M_TIMES FROM wglMESSAGE WHERE EMP_CODE = '" + personID + "' and (M_TIMES = (SELECT MAX(M_TIMES) FROM wglmessage))";
ResultSet rs=db.executeQuery(sql);
int Stimes=1;
while(rs.next())
{
Stimes+=Integer.parseInt(rs.getString("M_TIMES"));
}
%>
<html>
<head>
<title>请假条填写</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="b.files/art.css" rel=stylesheet type=text/css>
</head>
<SCRIPT LANGUAGE="JavaScript">
function setf()
{
document.S_form.hours.focus();
document.S_form.Syear.focus();
document.S_form.SEyear.focus();
}
function selec(txt)
{
txt.focus();
txt.select();
}
function chkHours(txt)
{ var hours = document.S_form.hours;
if (hours.value=="")
{
alert ("Please input the hours you ask for!");
return false;
}else{
return true;}
}
function chkSyear(txt)
{
var Syear = document.S_form.Syear;
if (Syear.value=="")
{
alert ("Please input the start time you ask for!");
return false;
}else{
return true;}
}
function chkEyear(txt)
{
var Eyear = document.S_form.Eyear;
if (Eyear.value=="")
{
alert ("Please input the end time you ask for!");
return false;
}else{
return true;}
}
function chkUserPw()
{
var hours = document.S_form.hours;
var Syear = document.S_form.Syear;
var Eyear = document.S_form.Eyear;
if(chkSyear(Syear))
{
if(chkEyear(Eyear))
{
if(chkHours(hours))
{
return true;
}
return false;
}
return false;
}
return false;
}
</SCRIPT>
<body background="b.files/bj.gif">
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"\uFFFD@>
<TBODY>
<TR class=top>
<TD width=296><IMG align=left
alt=SoftshapeArt border=0 height=58 hspace=0 src="b.files/top1.gif"
width=80><IMG align=left border=0 height=58 hspace=0
src="b.files/top2.gif" width=216></TD>
<TD> </TD>
<TD width=517> </TD>
</TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR >
<td width="16%"> <IMG align=left border=0 height=22 hspace=0 src="b.files/nav1.gif"
width=165></td>
<TD background="b.files/TdBg.gif" width="84%" valign="bottom">
<font color="#00FF00"size="2">请假条填写</font>
<font color="#00FF00" size="2"><a href="restUser.jsp" target="_parent">个人请假查询</a></font>
<font color="#00FF00"\uFFFD@size="2"><a href="totallogin.jsp"target="_parent">重新登录</a></font>
</TD>
</TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 class=splash width="100%">
<TBODY>
<TR>
<TD class=splash width="8%" align="center" valign="bottom"><IMG align=left border=0 height=72 hspace=0
src="b.files/spl_1.gif" width=76></TD>
<TD width="92%" align="center"><font size="5">公司内部管理系统</font></TD>
</TR>
</TBODY>
</TABLE>
<form id="S_form" name="S_form" onSubmit="return chkUserPw()"action="restWrite.jsp" method="Post">
<DIV align=center>
<h2 align="center">
<p> </p>
</h2>
注意:带*为必添项<br>
<table width="80%" border="0" height="20">
<tr align="center">
<td colspan="4" class=blue height="24" valign="bottom" align="center">
<table border bordercolor="#008000">
<tr><td bgcolor="#00ff00"><p align="center">请假开始时间</p><td><input type=text name="Syear" class=input size="4"maxlength="4">年<input type=text name="Smonth" class=input size="2"maxlength="2">月<input type=text name="Sday" class=input size="2"maxlength="2">日<input type=text name="Shour" class=input size="2"maxlength="2">时<input type=text name="Sminute" class=input size="2"maxlength="2">分*</td>
<tr> <td bgcolor="#00ff00"><p align="center">请假结束时间</p><td><input type=text name="Eyear" class=input size="4"maxlength="4">年<input type=text name="Emonth" class=input size="2"maxlength="2">月<input type=text name="Eday" class=input size="2"maxlength="2">日<input type=text name="Ehour" class=input size="2"maxlength="2">时<input type=text name="Eminute" class=input size="2"maxlength="2">分*</td>
<tr><td bgcolor="#00ff00"><p align="center">小时数</p><td><input type=text name="hours" class=input size="4"maxlength="100">*
<input name="Stimes" type="hidden" value="<%=Stimes%>"></td>
<tr><td bgcolor="#00ff00"><p align="center">请假原因</p><td><textarea name=cause rows=5 cols=60 maxlenth="30"maxlength="100"></textarea></td>
</table>
</table>
<input type=submit value="提交" name="add"> <input type=reset value="重写" name="clear">
</DIV>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -