📄 feelstatus.jsp
字号:
<!-------------------------------------------------------------
* @ name: feelStatus.jsp
* @ func: show the mood char of the recent 5 days
* @ Author : ranxu
* @ date :2008-06-26
-------------------------------------------------------------->
<%@ page import='java.io.*,java.text.*,java.util.Date,java.util.Vector, 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="appConstants.jsp"%>
<%@ include file="formatUtil.jsp"%>
<%@ include file="../makeKOR.jsp"%>
<%
/*------------------------------------------------------------------------------------------------------
+ parameter FROM last page
-------------------------------------------------------------------------------------------------------*/
String mphone = request.getParameter("mphone");
String gphone = request.getParameter("gphone");
mphone = getStrPhone(getLong(mphone));
gphone = getStrPhone(getLong(gphone));
String strNickname = "";
/*------------------------------------------------------------------------------------------------------
+ Page
-------------------------------------------------------------------------------------------------------*/
String pageurl = null;// 其捞瘤 备泅 眠啊 函荐
int pagesize = 5; // 茄其捞瘤寸 10俺 免仿拱
// 傈开 函荐肺 急攫.. 其捞瘤 备泅 何盒俊 犁荤侩
int pageNUM = 1; // 其捞瘤 锅龋
int pagecount = 1 ; // 其捞瘤 肮荐 瘤沥 函荐
int absolutepage = 1; // 例措 困摹 其捞瘤 锅龋
int dbcount = 0; // DB 救俊 臂 肮荐 历厘 函荐
int isNoPage = 0; //茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
/*------------------------------------------------------------------------------------------------------
+ parmater of current page
-------------------------------------------------------------------------------------------------------*/
String states[] = new String[5];
String regdates[] = new String[5];
int count = 0;
/*------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
-------------------------------------------------------------------------------------------------------*/
PreparedStatement pstmt = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String sql = "";
try
{
/*------------------------------------------------------------------------------------------------
* DB 目池记
-------------------------------------------------------------------------------------------------*/
%><%@ include file="../getConnection.jsp"%>
<%@ include file="bgColor.jsp"%>
<%
/*------------------------------------------------------------------------------------------------
* Host nickName
-------------------------------------------------------------------------------------------------*/
sql = " SELECT nickname FROM GT_User_Info WITH (READUNCOMMITTED) WHERE phonenum='"+gphone+"'" ;
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if( rs.next() ){
strNickname = rs.getString("nickname");
}else{
strNickname = "绝澜";
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 郴 巩力 炼福扁 荤恩.
-------------------------------------------------------------------------------------------------*/
sql = " SELECT count(*) dbcount FROM gt_nsmood WITH (READUNCOMMITTED) WHERE phonenum = ?";
pstmt = con.prepareStatement(sql);
pstmt.setLong(1,getLong(gphone));
rs = pstmt.executeQuery();
if(rs.next()){
dbcount = rs.getInt("dbcount");
}
rs.close();
pstmt.close();
if(dbcount%pagesize == 0)
pagecount = dbcount/(pagesize); // 醚 其捞瘤荐 备窍扁
else
pagecount = dbcount/(pagesize)+1; // 醚 其捞瘤荐 备窍扁
if(request.getParameter("pageNUM")!=null){
pageNUM=Integer.parseInt(request.getParameter("pageNUM"));//瘤沥等 其捞瘤 焊咯林扁
}
/*------------------------------------------------------------------------------------------------
* 郴 巩力 炼福扁 荤恩.
-------------------------------------------------------------------------------------------------*/
sql = " SELECT * FROM (SELECT TOP "+pagesize+" idx,state,convert(varchar(5),regdate,101) regMD,regdate"+
" FROM gt_nsmood WITH (READUNCOMMITTED)"+
" WHERE (idx NOT IN"+
" (SELECT TOP "+5*(pageNUM-1)+" idx"+
" FROM gt_nsmood WITH (READUNCOMMITTED) WHERE phonenum=?"+
" ORDER BY regdate DESC))"+
" AND phonenum=? "+
" ORDER BY regdate desc ) a ORDER BY regdate";
pstmt = con.prepareStatement(sql);
pstmt.setLong(1,getLong(gphone));
pstmt.setLong(2,getLong(gphone));
rs = pstmt.executeQuery();
for(int i=0;rs.next();i++){
count = count +1;
states[i]=rs.getString("state");
regdates[i]=rs.getString("regMD");
}
rs.close();
pstmt.close();
%>
<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"><%=strNickname %>丛狼扁盒惑怕函拳</font></td>
</tr>
</table>
</td>
</tr>
<!-- 鸥捞撇 场 -->
<!-- 咯归 矫累 -->
<tr height="8">
<td></td>
</tr>
<!-- 咯归 场 -->
<!--捞傈/促澜 傅农 冠胶 矫累-->
<%
pageurl=url_path+"/news/feelStatus.jsp?mphone="+mphone+"&gphone="+gphone;
String [] szSplit = pagePathTop(pageurl, dbcount, pageNUM, pagecount);
%>
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0" bgcolor="<%=pageBgColor %>">
<tr>
<td width="25"></td>
<td width="60" height="19" align="left"><font color="#676767" size="3">⒏ </font><font color="<%=pageFNFontColor %>" size="3">(7)</font><%=szSplit[0]%><font color="<%=pageFNFontColor %>" size="3"><b>捞傈</b></font><%=szSplit[1]%></td>
<td></td>
<td width="60" height="19" align="right"><%=szSplit[2]%><b><font color="<%=pageFNFontColor%>" size="3">促澜</font></b><%=szSplit[3]%><font color="<%=pageFNFontColor%>" size="3">(9)</font><font color="#676767" size="3"> ⒑</font></td>
<td width="25"></td>
</tr>
</table>
</td>
</tr>
<!--捞傈/促澜 傅农 冠胶 场-->
<!--咯归 矫累-->
<tr>
<td height="8"></td>
</tr>
<!--咯归 场-->
<!-- 弊贰橇 矫累 -->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6"></td>
<td width="31" valign="top">
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#fffad2">
<tr height="31">
<td align="center"><img src="<%=img_path%>/images/news/0005.png" width="22" height="22"></td>
</tr>
</table>
</td>
<td width="1" bgcolor="626882"></td>
<td width="165">
<table width="165" border="0" cellspacing="0" cellpadding="0">
<tr height="4">
<td colspan="15"></td>
</tr>
<!-- 5/5 矫累 -->
<%
int j=5;
for(int i=0;i<5;i++){
String bgcolor=btnFontColor;
j--;
%>
<tr height="25">
<!-- 1 矫累 -->
<td width="10"></td>
<td width="13" bgcolor="<% if(getLong(states[0])>=(j+1)){%><%=bgcolor %><% }%>"></td>
<td width="10"></td>
<!-- 1 场 -->
<!-- 2 矫累 -->
<td width="10"></td>
<td width="13" bgcolor="<% if(getLong(states[1])>=(j+1)){%><%=bgcolor %><% }%>"></td>
<td width="10"></td>
<!-- 2 场 -->
<!-- 3 矫累 -->
<td width="10"></td>
<td width="13" bgcolor="<% if(getLong(states[2])>=(j+1)){%><%=bgcolor %><% }%>"></td>
<td width="10"></td>
<!-- 3 场 -->
<!-- 4 矫累 -->
<td width="10"></td>
<td width="13" bgcolor="<% if(getLong(states[3])>=(j+1)){%><%=bgcolor %><% }%>"></td>
<td width="10"></td>
<!-- 4 场 -->
<!-- 5 矫累 -->
<td width="10"></td>
<td width="13" bgcolor="<% if(getLong(states[4])>=(j+1)){%><%=bgcolor %><% }%>"></td>
<td width="10"></td>
<!-- 5 场 -->
</tr>
<%
}
%>
<!-- 5/5 场 -->
<tr height="2">
<td colspan="15"></td>
</tr>
<tr height="1">
<td colspan="15" bgcolor="#000000"></td>
</tr>
</table>
</td>
<td width="24">
<table border="0" cellspacing="0" cellpadding="0">
<tr height="110">
<td></td>
</tr>
<tr height="15">
<td><font color="#6b66af" size="3">朝楼</font></td>
</tr>
</table>
</td>
<td width="7"></td>
</tr>
<!--2008-08-21 弊贰橇 朝楼 沥纺 荐沥 矫累-->
<tr height="2">
<td colspan="6"></td>
</tr>
<tr height="16">
<td width="6"></td>
<td colspan="4">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="31"></td>
<td width="35" align="center" bgcolor="<%if(regdates[0]==null){%><%}else{ %>#efebd5<%} %>"><font color="#716e63"><%=getStr(regdates[0]) %></font></td>
<td></td>
<td width="35" align="center" bgcolor="<%if(regdates[2]==null){%><%}else{ %>#efebd5<%} %>"><font color="#716e63"><%=getStr(regdates[2]) %></font></td>
<td></td>
<td width="35" align="center" bgcolor="<%if(regdates[4]==null){%><%}else{ %>#efebd5<%} %>"><font color="#716e63"><%=getStr(regdates[4]) %></font></td>
<td width="24"></td>
</tr>
</table>
</td>
<td width="7"></td>
</tr>
<tr>
<td height="1" colspan="6"></td>
</tr>
<tr height="16">
<td width="6"></td>
<td colspan="4">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29"></td>
<td></td>
<td width="35" align="center" bgcolor="<%if(regdates[1]==null){%><%}else{ %>#efebd5<%} %>"><font color="#716e63"><%=getStr(regdates[1]) %></font></td>
<td width="26"></td>
<td width="35" align="center" bgcolor="<%if(regdates[3]==null){%><%}else{ %>#efebd5<%} %>"><font color="#716e63"><%=getStr(regdates[3]) %></font></td>
<td></td>
<td width="22"></td>
</tr>
</table>
</td>
<td width="7"></td>
</tr>
</table>
</td>
</tr>
<!--2008-08-21 弊贰橇 朝楼 沥纺 荐沥 场-->
<!-- 弊贰橇 场 -->
<!--咯归 矫累-->
<tr>
<td height="8"></td>
</tr>
<!--咯归 场-->
<!--2008-08-21 其捞瘤傅农 埃拜 荐沥 矫累-->
<!--其捞瘤 傅农 矫累-->
<%
String [] szSplit2 = pagePathBottom(pageurl, dbcount, pageNUM, pagecount);
%>
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0" bgcolor="<%=pageBgColor %>">
<tr>
<td height="19">
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
<td width="21" align="center"><%=szSplit2[0]%><font color="#676767" size="3"><%=szSplit2[1]%></font><%=szSplit2[2]%></td>
<%
String pageColor = "";
for(int i=1;i<6;i++)
{
if(pageNUM%10 == Integer.parseInt(szSplit2[i*3+1]))
pageColor = pageFontColorY;
else
pageColor = pageFontColorN;
%>
<td width="1" align="center"><font color="<%=pageColor %>" size="3">|</font></td>
<td width="21" align="center"><%=szSplit2[i*3]%><font color="<%=pageColor%>" size="3"><b><%=szSplit2[i*3+1]%></b></font><%=szSplit2[i*3+2]%></td>
<%
}
%>
<td width="21" align="center"><%=szSplit2[18]%><font color="#676767" size="3"><%=szSplit2[19]%></font><%=szSplit2[20]%></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!--其捞瘤 傅农 场-->
<!--2008-08-21 其捞瘤傅农 埃拜 荐沥 场-->
<!--咯归 矫累-->
<tr>
<td height="5"></td>
</tr>
<!--咯归 场-->
<!-- 滚瓢 矫累 -->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="17">
<td></td>
<%if(mphone.equals(gphone)){ %>
<td width="60" bgcolor="<%=mainBgColor %>" align="center" ><a href="<%=url_path%>/news/feelRegCha.jsp?mphone=<%=mphone%>&gphone=<%=gphone %>"><font color="#ffffff">荐沥/殿废</font></a></td>
<td width="2"></td>
<%
}
%>
<td width="60" bgcolor="<%=mainBgColor %>" align="center" ><a href="<%=url_path%>/news/NewsMain.jsp?mphone=<%=mphone%>&gphone=<%=gphone %>"><font color="#ffffff">倒酒啊扁</font></a></td>
<td></td>
</tr>
</table>
</td>
</tr>
<!-- 滚瓢 场 -->
<!-- 咯归 矫累 -->
<tr height="11">
<td></td>
</tr>
<!-- 咯归 场 -->
<!--版肺钎矫 矫累-->
<%
String step1=url_path+"/main.jsp?mphone="+mphone+"&gphone="+gphone;//权
String step2=url_path+"/mypage/my_confirm.jsp?mphone="+mphone+"&gphone="+gphone;
String step3=url_path+"/news/NewsMain.jsp?mphone="+mphone+"&gphone="+gphone;
%>
<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="<%=step1%>">权</a>><a href="<%=step2%>"><%=strNickname%>丛狼迄乔</a>><a href="<%=step3%>">春胶</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 + -