📄 other_news_list_lhl.jsp
字号:
<%@ page language="java" pageEncoding="EUC-KR"%>
<%@ page import="java.io.*,java.text.*,java.util.Date,java.util.Vector, java.sql.*, com.entaz.lib.db.*, com.entaz.relay.net.* "%>
<%@ include file="../common_func.jsp"%>
<%@ include file="appConstants.jsp"%>
<%@ include file="formatUtil.jsp"%>
<%@ include file="../imgpath.jsp"%>
<%
// 其捞瘤 备泅 眠啊 函荐
int pagesize = 10; // 茄其捞瘤寸 10俺 免仿拱
// 傈开 函荐肺 急攫.. 其捞瘤 备泅 何盒俊 犁荤侩
int pageNUM=1; // 其捞瘤 锅龋
int pagecount=1 ; // 其捞瘤 肮荐 瘤沥 函荐
int absolutepage=1; // 例措 困摹 其捞瘤 锅龋
int dbcount=0 ; // DB 救俊 臂 肮荐 历厘 函荐
int isNoPage = 0; //茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
String pageurl = null;
Connection con = null;
PreparedStatement pstmt = null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageset = null;
String tableGT_USER_INFO = "GT_USER_INFO";
String mphone= request.getParameter("mphone");
String gphone= request.getParameter("gphone");
mphone = getStrPhone(getLong(mphone));
gphone = getStrPhone(getLong(gphone));
//int phonenum = 0;
//String mphone = "13366103"; //test db fang ke
//String gphone = "9900100081"; //test db zu ren
String usernickname = "No name";
// pageColor
String mainColor = "";
String pageBColor = "";
String btnFColor = "";
String pgetFNFColor = "";
// pageColor
try {
%>
<%@ include file="../getConnection.jsp"%>
<%@ include file="bgColor.jsp"%>
<% mainColor = mainBgColor;
pageBColor = pageBgColor;
btnFColor = btnFontColor;
pgetFNFColor = pageFNFontColor; %>
<%
String queryString = "SELECT * FROM GT_NsNews WITH (READUNCOMMITTED) WHERE phonenum=" + getLong(gphone) + " order by regdate desc";
String szCount = "SELECT count(phonenum) countNum FROM(SELECT * FROM GT_NsNews WITH (READUNCOMMITTED) WHERE phonenum=" + getLong(gphone) + ") countNum";
stmt = con.createStatement();
pageset = stmt.executeQuery(szCount);
if(pageset.next()){
dbcount = pageset.getInt("countNum"); // 臂 醚 肮荐
pageset.close();
}
if(dbcount%pagesize == 0)
pagecount = dbcount/(pagesize); // 醚 其捞瘤荐 备窍扁
else
pagecount = dbcount/(pagesize)+1; // 醚 其捞瘤荐 备窍扁
if(request.getParameter("pageNUM")!=null)
{
pageNUM=Integer.parseInt(request.getParameter("pageNUM"));//瘤沥等 其捞瘤 焊咯林扁
absolutepage=(pageNUM-1)*pagesize+1;
}
//String strNicknameQuery = "SELECT nickname FROM gt_user_info WHERE phonenum = ?";
String strNicknameQuery = "SELECT nickname FROM gt_user_info WITH (READUNCOMMITTED) WHERE phonenum = ?";//gphone
pstmt = con.prepareStatement(strNicknameQuery);
pstmt.setString(1, getStr(gphone));
rs = pstmt.executeQuery();
while(rs.next())
{
usernickname = rs.getString("nickname");
}
%>
<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="<%=mainColor %>"></td>
<td bgcolor="<%=mainColor %>"><font color="#ffffff"><%= usernickname %>丛狼弥辟春胶</font></td>
</tr>
</table>
</td>
</tr>
<!-- 鸥捞撇 场 -->
<!-- 咯归 矫累 -->
<tr height="8">
<td></td>
</tr>
<!-- 咯归 场 -->
<!--捞傈/促澜 傅农 冠胶 矫累-->
<%
pageurl=url_path+"/news/other_news_list_lhl.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]%>
<font color="<%=pageFNFontColor %>" size="3"><b>促澜</b></font>
<%=szSplit[3]%>
<font color="<%=pageFNFontColor %>" size="3">(9)</font>
<font color="#676767" size="3"> ⒑</font>
</td>
<td width="25"></td>
</tr>
</table>
</td>
</tr>
<!--捞傈/促澜 傅农 冠胶 场-->
<!-- 巩翠 府胶飘 矫累 -->
<%
stmt = con.createStatement();
rs = stmt.executeQuery(queryString);
if(!rs.next()) // 蔼捞 绝阑锭
{
isNoPage = 1;
pagesize=0;
}
else // 蔼捞 乐阑锭 //rs.absolute(absolutepage);
{
for(int s=0; s<absolutepage-1; s++)
rs.next();
}
int count = 0 ; //其捞瘤 墨款磐 函荐
int idx = 0;
int kind = 0;
String title = "";
int reCnt = 0;
String regdate = "";
int cnt = dbcount;
if(pageNUM == 1) {
cnt = dbcount;
} else {
cnt=dbcount-(pageNUM-1)*pagesize;
}
while(count<pagesize)
{
idx = rs.getInt("idx");
kind = rs.getInt("kind");
usernickname = rs.getString("nickname");
title = rs.getString("title");
reCnt = rs.getInt("reCnt");
regdate = rs.getString("regdate");
%>
<tr height="34">
<td bgcolor="#f5f3e6">
<font color="#ff4d72">[<%=getType(kind)%>]</font>
<a href="other_news_view_lhl.jsp?dispatch=hit&idxNsNews=<%=idx%>&gphone=<%=gphone%>&mphone=<%=mphone%>"><%=title%></a>
<font color="#fc3f4e"><b> [<%=reCnt%>]</b></font><br>
<font color="#716e63" size="3">-<%=getTime(regdate)%></font>
</td>
</tr>
<tr height="3">
<td></td>
</tr>
<%
count++;
if(rs.isLast())
{ //盖 付瘤阜 饭内靛 老版快
break;
}
else
{
rs.next();
}
}
rs.close();
stmt.close();
con.close();
%>
<!--咯归 矫累-->
<tr>
<td height="4"></td>
</tr>
<!--咯归 场-->
<!-- 巩翠 府胶飘 场 -->
<!--其捞瘤 傅农 矫累-->
<%
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"><b><%=szSplit2[19]%></b></font>
<%=szSplit2[20]%>
</td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!--其捞瘤 傅农 场-->
<!--咯归 矫累-->
<tr>
<td height="4"></td>
</tr>
<!--咯归 场-->
<!-- 滚瓢 矫累 -->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="17">
<td></td>
<td width="60" bgcolor="<%=mainColor%>" align="center" >
<a href="NewsMain.jsp?gphone=<%=gphone%>&mphone=<%=mphone%>"><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%>"><%= usernickname %>丛狼迄乔</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)
{
e.printStackTrace();
}
finally
{
if ( rs != null ) { try { rs.close(); } catch ( Exception e ) {e.printStackTrace(); } }
if ( stmt != null ) { try { stmt.close(); } catch ( Exception e ) { e.printStackTrace();} }
if ( con != null ) { try { con.close(); } catch ( Exception e ) { e.printStackTrace();} }
}
%>
<%!
public String getType(int input)
{
if(input == 1)
return new String("荤扒/荤绊");
if(input == 2)
return new String("瘤开");
if(input == 3)
return new String("楷抗/胶器明");
else
return new String("扁鸥");
}
public String getTime(String input)
{
return input.substring(2,4)+"/"+input.substring(5,8)+"/"+input.substring(8,10)+" "+input.substring(11,16);
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -