📄 diaryinfotipmodify.jsp
字号:
<%@ page import="java.util.*"%>
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="cn.com.aheadsoft.util.UserInfo"%>
<%@ page import="cn.com.aheadsoft.recordset.DiaryInfoTipRecordSet"%>
<%@ page import="cn.com.aheadsoft.recordset.PersonInfoRecordSet"%>
<jsp:useBean id="userPurviewManage" scope="page" class="cn.com.aheadsoft.manage.UserPurviewManage" />
<jsp:useBean id="userInfo" scope="page" class="cn.com.aheadsoft.util.UserInfo" />
<jsp:useBean id="diaryManage" scope="page" class="cn.com.aheadsoft.manage.DiaryManage" />
<jsp:useBean id="userDeptManage" scope="page" class="cn.com.aheadsoft.manage.UserDeptManage" />
<jsp:useBean id="diaryInfoTipRecordSet" scope="page" class="cn.com.aheadsoft.recordset.DiaryInfoTipRecordSet" />
<html>
<head>
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
</head>
<%
/*
修改:曾红立
时间:2004年3月3日
每日信息修改页面
*/
String userID;
//权限校验
userInfo=(UserInfo)session.getAttribute("userinfo") ;
/*List userList=userPurviewManage.getUserPurview(userInfo,"5","2","q");
if(userList==null){
response.sendRedirect("/krm/jsp/nologin.htm");
return;
}*/ //replace by zenghongli 2004.9.7 去除数据授权信息
userID=userInfo.GetUserID();
String status="m";
String year=request.getParameter("year");
String month=request.getParameter("month");
String date=request.getParameter("date");
Calendar calendar= Calendar.getInstance();
int nowYear=calendar.get(Calendar.YEAR);
if(year==null||month==null||date==null){
year=String.valueOf(nowYear);
month=String.valueOf(calendar.get(Calendar.MONTH)+1);
date=String.valueOf(calendar.get(Calendar.DATE));
}
%>
<script language="JavaScript">
<!--
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
-->
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr height="8">
<td class="trA"> 您的位置:工作日记 >> 每日信息 >><font class="fontcolor"> 每日信息修改</font></td>
</tr>
<tr height="8">
<td></td>
</tr>
<tr>
<td align="center">
<form name="form1" method="post" action="/krm/servlet/DiaryInfoTipServlet">
<input type="hidden" name="userNameShow">
<input type="hidden" name="status" value="<%=status%>">
<%//if(userList.size()!=0){%>
<table border="0" width="98%" align="center" height="30%" class="collapse">
<tr>
<td class="tdA"colspan="7" >
每日信息修改</td>
</tr>
<tr>
<td class="tdC" colspan="2">
<select name="year">
<%
String checked="";
for(int i=nowYear;i>2003;i--){
if(year!=null&&year.equals(String.valueOf(i))){
checked=" selected";
}
%>
<option value="<%=i%>"<%=checked%>><%=i%></option>
<%
}
%>
</select>
年
<select name="month">
<%
for(int i=1;i<=12;i++){
checked="";
if(month!=null&&month.equals(String.valueOf(i))){
checked=" selected";
}
%>
<option value="<%=i%>"<%=checked%>><%=i%></option>
<%
}
%>
</select>
月
<select name="date">
<%
for(int i=1;i<=31;i++){
checked="";
if(date!=null&&date.equals(String.valueOf(i))){
checked=" selected";
}
%>
<option value="<%=i%>"<%=checked%>><%=i%></option>
<%
}
%>
</select>
日
<input name="imageField" type="submit" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" value="查 询">
<%
String upyear=year;
if(month.equals("1")&&date.equals("1")){
upyear=String.valueOf(Integer.parseInt(year)-1);
}
String upmonth=month;
if(month.equals("1")){
if(date.equals("1")){
upmonth=("12");
}
}else{
if(date.equals("1")){
upmonth=String.valueOf(Integer.parseInt(month)-1);
}
}
String update=date;
if(month.equals("5")||month.equals("7")||month.equals("10")||month.equals("12")){
if(date.equals("1")){
update="30";
}else{
update=String.valueOf(Integer.parseInt(date)-1);
}
}
if(month.equals("3")){
if(date.equals("1")){
if((Integer.parseInt(year)%4==0)||(Integer.parseInt(year)%400==0&&year.
substring(2,3)=="00")){
update="29";
}else{
update="28";
}
}else{
update=String.valueOf(Integer.parseInt(date)-1);
}
}
if(month.equals("2")||month.equals("4")||month.equals("6")||month.equals("8")||month.equals("9")||month.equals("11")||month.equals("1")){
if(date.equals("1")){
update="31";
}else{
update=String.valueOf(Integer.parseInt(date)-1);
}
}
%>
<input type="button" value="上一日" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" onClick="document.location.href='/krm/servlet/DiaryInfoTipServlet?year=<%=upyear%>&month=<%=upmonth%>&date=<%=update%>&write=betoday&flag=m'" >
<%
String backyear=year;
if(month.equals("12")&&date.equals("31")){
backyear=String.valueOf(Integer.parseInt(year)+1);
}
String backmonth=month;
if(month.equals("12")){
if(date.equals("31")){
backmonth=("1");
}
}
if(month.equals("2")){
if((Integer.parseInt(year)%4==0)||(Integer.parseInt(year)%400==0&&year.substring(2,3)=="00")){
if(date.equals("29")||date.equals("30")||date.equals("31")){
backmonth="3";
}
}else{
if(date.equals("28")||date.equals("29")||date.equals("30")||date.equals("31")){
backmonth="3";
}
}
}
if(month.equals("1")||month.equals("3")||month.equals("5")||month.equals("7")||month.equals("8")||month.equals("10")){
if(date.equals("31")){
backmonth=String.valueOf(Integer.parseInt(month)+1);
}
} if(month.equals("4")||month.equals("6")||month.equals("9")||month.equals("11")){
if(date.equals("30")||date.equals("31")){
backmonth=String.valueOf(Integer.parseInt(month)+1);
}
}
String backdate=date;
if(month.equals("1")||month.equals("3")||month.equals("5")||month.equals("7")||month.equals("8")||month.equals("10")||month.equals("12")){
if(date.equals("31")){
backdate="1";
}else{
backdate=String.valueOf(Integer.parseInt(date)+1);
}
} if(month.equals("4")||month.equals("6")||month.equals("9")||month.equals("11")){
if(date.equals("30")||date.equals("31")){
backdate="1";
}else{
backdate=String.valueOf(Integer.parseInt(date)+1);
}
}
if(month.equals("2")){
if((Integer.parseInt(year)%4==0)||(Integer.parseInt(year)%400==0&&year.substring(2,3)=="00")){
if(date.equals("29")||date.equals("30")||date.equals("31")){
backdate="1";
}else{
backdate=String.valueOf(Integer.parseInt(date)+1);
}
}else{
if(date.equals("28")||date.equals("29")||date.equals("30")||date.equals("31")){
backdate="1";
}else{
backdate=String.valueOf(Integer.parseInt(date)+1);
}
}
}
%>
<input type="button" value="下一日" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" onClick="document.location.href='/krm/servlet/DiaryInfoTipServlet?year=<%=backyear%>&month=<%=backmonth%>&date=<%=backdate%>&write=betoday&flag=m'" >
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="98%" align="center" class="collapse">
<tr width="95%" class="tdA">
<td class="tdC" colspan="14" >查询显示:</td>
</tr>
<tr align="center" >
<td width="20%" class="tdB">日期</td>
<td width="10%" class="tdB">姓名</td>
<td width="10%" class="tdB">工作</td>
<td width="10%" class="tdB">学习</td>
<td width="10%" class="tdB">运动</td>
<td width="10%" class="tdB">休息</td>
<td width="15%" class="tdB" colspan="2">修改</td>
</tr>
<%
/* 得到高层领导每日信息记录 */
diaryInfoTipRecordSet=(DiaryInfoTipRecordSet)request.getAttribute("M_DiaryInfoTipRecordSet");
/* 得到高层领导记录 */
List manageNames=new ArrayList();
manageNames=(List)request.getAttribute("ManageNames");
if(null!=diaryInfoTipRecordSet){
int size=diaryInfoTipRecordSet.size();
String uid=null;
String name=null;
String strTemp=null;
int iPos=0;
for(int i=0;i<size;i++){
diaryInfoTipRecordSet.next();
strTemp=(String)manageNames.get(i);
iPos=strTemp.indexOf('-');
uid=strTemp.substring(0,iPos);
name=strTemp.substring(iPos+1);
%>
<tr align="center" <%if(i%2==0){%> class="bgcolor"<%}%>>
<td class="common" width="20%"><%=diaryInfoTipRecordSet.getDIT_WriteDate()%></td>
<td class="common" width="10%"><%=name%></td>
<td class="common" width="10%"><%=diaryInfoTipRecordSet.getDIT_WorkTime()%></td>
<td class="common" width="10%"><%=diaryInfoTipRecordSet.getDIT_StudyTime()%></td>
<td class="common" width="10%"><%=diaryInfoTipRecordSet.getDIT_SportTime()%></td>
<td class="common" width="10%"><%=diaryInfoTipRecordSet.getDIT_RestTime()%></td>
<td width="15%" class="common"> <a href="/krm/servlet/DiaryInfoTipServlet?write=modify&userID=<%=uid%>&date=<%=diaryInfoTipRecordSet.getDIT_WriteDate()%>">每日信息</a></td>
<td width="15%" class="common"><a href="/krm/servlet/DiaryInfoTipServlet?write=modify_other&userID=<%=userID%>&date=<%=diaryInfoTipRecordSet.getDIT_WriteDate()%>">其他信息</a></td>
</tr>
<%
;}
}
%>
</table>
<%//}else{%>
<!--<table border="0" width="98%" align="center" height="20%" class="collapse">
<tr>
<td class="common" align="center">您没有可查看的数据!请与管理员联系</td>
</tr>
</table>-->
<%//}%>
</form>
</td>
</tr><% if(null==diaryInfoTipRecordSet){%>
<tr><td class="tdC" align="center" ><input name="button" type="button" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" onClick="document.location.href='/krm/jsp/diamanage/diaryInfoTip/diaryInfoTipSearch.jsp'" value="返 回" >
</td></tr><%}%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -