📄 calendar.jsp
字号:
<!--------------------------------------------------------------------------------------------------------------
*@崔仿
*@Author : 弥眠岿 (2008-6-25)
--------------------------------------------------------------------------------------------------------------->
<%@ page import='java.io.*,java.text.*,java.util.Date,java.util.Vector, javax.servlet.http.HttpSession,java.sql.*, com.entaz.lib.db.*, com.entaz.relay.net.*' contentType='text/html;charset=euc-kr'%>
<%@ include file="../imgpath.jsp"%>
<%@ include file="../common_func.jsp"%>
<%@ include file="../makeKOR.jsp"%>
<%@ include file="appConstants.jsp"%>
<%@ include file="formatUtil.jsp"%>
<style type="text/css">
A:hover {
COLOR: #000000; TEXT-DECORATION: underline
}
A:link {
COLOR: #000000; TEXT-DECORATION: underline
}
A:visited {
COLOR: #000000; TEXT-DECORATION: underline
}
</style>
<%! String days[]; %>
<%
/*------------------------------------------------------------------------------------------------------
+ 扁夯 颇扼固磐
-------------------------------------------------------------------------------------------------------*/
String mphone= request.getParameter("mphone");
String gphone= request.getParameter("gphone");
mphone = getStrPhone(getLong(mphone));
gphone = getStrPhone(getLong(gphone));
/*------------------------------------------------------------------------------------------------------
+ 傈开 函荐
-------------------------------------------------------------------------------------------------------*/
int today= 0;
int month=0;
int year =0;
String nickname = "";
/*------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
-------------------------------------------------------------------------------------------------------*/
PreparedStatement pstmt = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String query1 = null;
ResultSet pageRs = null;
try
{
/*------------------------------------------------------------------------------------------------
* DB 目池记
-------------------------------------------------------------------------------------------------*/
%><%@ include file="../getConnection.jsp"%><%@ include file="bgColor.jsp"%><%
/*------------------------------------------------------------------------------------------------
* 橇肺鞘 nickname
-------------------------------------------------------------------------------------------------*/
query1 = "SELECT nickname FROM gt_user_info WITH (READUNCOMMITTED) WHERE phonenum = ?";
pstmt = con.prepareStatement(query1);
pstmt.setString(1,gphone);
rs = pstmt.executeQuery();
if(rs.next())
{
nickname = rs.getString("nickname");
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* time
-------------------------------------------------------------------------------------------------*/
days=new String[42];
for(int i=0;i<42;i++)
{
days[i]="";
}
GregorianCalendar currentDay = new GregorianCalendar();
today=currentDay.get(Calendar.DAY_OF_MONTH);
if(request.getParameter("year")!=null)
{
year = Integer.parseInt(request.getParameter("year"));
}
else
{
year=currentDay.get(Calendar.YEAR);
}
if(request.getParameter("month")!=null)
{
month = Integer.parseInt(request.getParameter("month"));
if(month==-1)
{
month=11;
year=year-1;
}
if(month==12)
{
month=0;
year=year+1;
}
}else
{
month=currentDay.get(Calendar.MONTH);
}
Calendar thisMonth=Calendar.getInstance();
thisMonth.set(Calendar.MONTH, month );
thisMonth.set(Calendar.YEAR, year );
thisMonth.setFirstDayOfWeek(Calendar.SUNDAY);
thisMonth.set(Calendar.DAY_OF_MONTH,1);
int firstIndex=thisMonth.get(Calendar.DAY_OF_WEEK)-1;
int maxIndex=thisMonth.getActualMaximum(Calendar.DAY_OF_MONTH);
for(int i=0;i<maxIndex;i++)
{
days[firstIndex+i]=String.valueOf(i+1);
}
%>
<html>
<head>
<title></title>
<link href="http://entaz.mugeta.com/client/mugeta_v2_test/web/user/mobile.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<!-- 鸥捞撇 矫累 -->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="19">
<td width="8" bgcolor="<%=mainBgColor %>"></td>
<td bgcolor="<%=mainBgColor %>">
<font color="#ffffff"><b><%=year %>.<%=month+1%> </b></font>
</td>
</tr>
</table>
</td>
</tr>
<!-- 鸥捞撇 场 -->
<!-- 咯归 矫累 -->
<tr height="8">
<td></td>
</tr>
<!-- 咯归 场 -->
<!--捞傈/促澜 傅农 冠胶 矫累-->
<tr>
<td>
<table width="240" bgcolor="<%=pageBgColor %>" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"></td>
<td width="60" height="19" align="left">
<font color="#676767" size="3">⒏ </font><a href="Calendar.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&year=<%=year%>&month=<%=month-1%>"><font color="<%=pageFNFontColor %>" size="3">(7) <b>捞傈</b> </font> </a>
</td>
<td></td>
<td width="60" align="right">
<a href="Calendar.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&year=<%=year%>&month=<%=month+1%>"><font color="<%=pageFNFontColor %>" size="3"><b>促澜</b> (9)</font> </a><font color="#676767" size="3"> ⒑</font>
</td>
<td width="25"></td>
</tr>
</table>
</td>
</tr>
<!--捞傈/促澜 傅农 冠胶 场-->
<!--咯归 矫累-->
<tr>
<td height="2"></td>
</tr>
<!--咯归 场-->
<!-- 崔仿 矫累 -->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16"></td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<!-- 鸥捞撇 矫累 -->
<tr height="26">
<td width="28" align="center">
<font color="#ff4d72">老</font>
</td>
<td width="2"></td>
<td width="28" align="center">
<font color="#716e63">岿</font>
</td>
<td width="2"></td>
<td width="28" align="center">
<font color="#716e63">拳</font>
</td>
<td width="2"></td>
<td width="28" align="center">
<font color="#716e63">荐</font>
</td>
<td width="2"></td>
<td width="28" align="center">
<font color="#716e63">格</font>
</td>
<td width="2"></td>
<td width="28" align="center">
<font color="#716e63">陛</font>
</td>
<td width="2"></td>
<td width="28" align="center">
<font color="#1e7ef4">配</font>
</td>
<td width="2"></td>
</tr>
<!-- 鸥捞撇 矫累 -->
<!-- 老磊 矫累 -->
<%
month = month+1;
String mon = "";
if(month<10)
{
mon ="0"+month;
}else {
mon = "month";
}
for(int j=0;j<5;j++)
{
%>
<tr height="26">
<%
for(int i=j*7;i<(j+1)*7;i++)
{
int idx = 0;
if(days[i].length()==1)
{
days[i]="0"+days[i];
}
query1= "SELECT idx FROM GT_NsProfile WITH (READUNCOMMITTED) WHERE phonenum=? AND "
+" CONVERT(char(10),regdate,120)=CONVERT(char(10), '"+year+"-"+mon+"-"+days[i]+"',120) ";
pstmt = con.prepareStatement(query1);
pstmt.setLong(1,getLong(gphone));
rs = pstmt.executeQuery();
if(rs.next())
{
idx=rs.getInt("idx");
}
rs.close();
pstmt.close();
%>
<td width="28" align="center" bgcolor="#f5f3e6">
<%if((i-firstIndex+1)==today){
if(i==j*7){
%>
<font color="#ff4d72"> <%}else if(i==(j+1)*7-1){%> <font color="#1e7ef4"> <%}else{%> <font color="#000000">
<%} %> <b> <%if(idx!=0){%> <a href="Trace.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&year=<%=year%>&month=<%=mon%>&day=<%=days[i]%>">
<%=days[i]%> </a> <%}else{%> <%=days[i]%> <%} %> </b> </font> <%} else {%><% if(i==j*7){%>
<font color="#ff4d72"> <%}else if(i==(j+1)*7-1){%> <font color="#1e7ef4"> <%}else{%> <font color="#000000">
<%} %> <%if(idx!=0){ %> <a href="Trace.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&year=<%=year%>&month=<%=mon%>&day=<%=days[i]%>">
<%=days[i]%> </a> <%}else{%> <%=days[i]%> <%} %> </font> <%}%>
</td>
<td width="2"></td>
<%}%>
</tr>
<tr height="2">
<td colspan="14"></td>
</tr>
<%} %>
<!-- 老磊 场 -->
</table>
</td>
<td width="16"></td>
</tr>
</table>
</td>
</tr>
<!-- 崔仿 场 -->
<!--咯归 矫累-->
<tr>
<td height="9"></td>
</tr>
<!--咯归 场-->
<!-- 滚瓢 矫累 -->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="17">
<td></td>
<td width="72" bgcolor="<%=mainBgColor %>" align="center"><a href="NewsMain.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>"><font color="#ffffff">迄乔春胶肺</font></a>
</td>
<td></td>
</tr>
</table>
</td>
</tr>
<!-- 滚瓢 场 -->
<!-- 咯归 矫累 -->
<tr height="11">
<td></td>
</tr>
<!-- 咯归 场 -->
<!--版肺钎矫 矫累-->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="19">
<td width="10" bgcolor="#BBC7C8"></td>
<td bgcolor="#DAE6E8"> <a href="<%=url_path+"/main.jsp?mphone="+mphone+"&gphone="+gphone%>">权</a>><a href="<%=url_path%>/mypage/my_confirm.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>"><%=nickname %>丛狼迄乔</a>><a href="NewsMain.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>">春胶</a>>橇肺鞘崔仿
</td>
<td width="10" bgcolor="#BBC7C8"></td>
</tr>
</table>
</td>
</tr>
<!--版肺钎矫 场-->
</table>
<!--窍窜 版肺钎矫 矫累-->
<%@ include file="../newbottom.jsp"%>
<!--窍窜 版肺钎矫 场-->
</body>
</html>
<%
}catch(Exception e)
{
System.out.println(e);
}
finally
{
if(rs != null) try{ rs.close(); }catch(Exception se){}
if(pstmt != null) try{ pstmt.close(); }catch(Exception se){}
if(stmt != null) try{ stmt.close(); }catch(Exception se){}
if(con != null) try{ con.close(); }catch(Exception se){}
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -