📄 diaryinfotipsearch.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"%>
<%@ page import="cn.com.aheadsoft.recordset.DiaryOtherInfoTipRecordSet"%>
<%@ page import="cn.com.aheadsoft.recordset.DEProccessRecordSet"%>
<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" />
<jsp:useBean id="diaryOtherInfoTipRecordSet" scope="page" class="cn.com.aheadsoft.recordset.DiaryOtherInfoTipRecordSet" />
<jsp:useBean id="deProccessRecordSet" scope="page" class="cn.com.aheadsoft.recordset.DEProccessRecordSet" />
<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日
每日信息查询显示页面
*/
//权限校验
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 去除数据授权信息
int userPopInt=userPurviewManage.getUserPopInt(userInfo,"5","2","9");
if(userPopInt==-2){
response.sendRedirect("/krm/jsp/nologin.htm");
return;
}
String status="q";//查询标志
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));
}
String yearnow=String.valueOf(nowYear);
String monthnow=String.valueOf(calendar.get(Calendar.MONTH)+1);
String datenow=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="common" 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=q'" >
<%
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")){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -