⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 30q&a_replelist.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
字号:
<!-------------------------------------------------------------
* @ name: 30q&a_repleList.jsp
* @ Author : linaZhou 
* @ date :2008-06-26
-------------------------------------------------------------->
<%@ page import='java.io.*,java.text.*,java.util.Date,java.util.*, 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"%>
<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> 
<%! 	 
public static String isNull(String str){ 
	if (str == null) 
		return ""; 
	else 
		return str; 
} 	
public static String formatDate(Date date,String format){
	SimpleDateFormat sdf = new SimpleDateFormat(format);
	Calendar cal = Calendar.getInstance();
	cal.setTime(date);
		return sdf.format(cal.getTime());
}
%>
	<% 
	/*------------------------------------------------------------------------------------------------------
	+	扁夯 颇扼固磐
	-------------------------------------------------------------------------------------------------------*/
	String mphone = request.getParameter("mphone");
	String gphone = request.getParameter("gphone");
	if(mphone == null){
		mphone= "09900100081";
	}	
	if(gphone == null){
		gphone = mphone;
	}
	mphone = getStrPhone(getLong(mphone));
 	gphone = getStrPhone(getLong(gphone));	
    /*------------------------------------------------------------------------------------------------------
	+	傈开 函荐
	-------------------------------------------------------------------------------------------------------*/
    int			idx					= 0;   
    int 		reple_idx			= 0; 
	long 		phonenum			= 0;
	String		master_nickname		= "";
	String 		nickname 			= "";
	String 		text				= "";
	int			sticker				= 0;
	int 		ref_idx				= 0;
	String		regdate				= null; 	
	String 		pageurl 			= null;
	// 其捞瘤 备泅 眠啊 函荐 
	int 		pagesize 			= 7;  // 茄其捞瘤寸 10俺 免仿拱
	// 傈开 函荐肺 急攫.. 其捞瘤 备泅 何盒俊 犁荤侩
	int 		pageNUM				= 1;  // 其捞瘤 锅龋
	int 		pagecount			= 1 ; // 其捞瘤 肮荐 瘤沥 函荐
	int 		absolutepage		= 1;  // 例措 困摹 其捞瘤 锅龋
    int 		dbcount				= 0;   //  DB 救俊 臂 肮荐 历厘 函荐
	int 		isNoPage 			= 0;	//茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
	
	idx = Integer.parseInt(request.getParameter("idx"));
	long mphoneToLong = Long.parseLong(mphone);	
	/*------------------------------------------------------------------------------------------------------
	+	DB 包访 函荐
	-------------------------------------------------------------------------------------------------------*/
	PreparedStatement pstmt = null;
	Connection con = null;
	Statement stmt = null;
	ResultSet rs = null;
	String query1 = null;
    String sql = null;
    List list = new ArrayList();
    Map map = null;
	/*------------------------------------------------------------------------------------------------------
	+	朝楼 包访	
	-------------------------------------------------------------------------------------------------------*/
	Timestamp di_date = null;
	Date today = new Date();
	SimpleDateFormat timeform;
	timeform = new SimpleDateFormat("MM/dd HH:mm");
	try
	{
	/*------------------------------------------------------------------------------------------------
	 *		DB 目池记
	 -------------------------------------------------------------------------------------------------*/
	%>
	<%@ include file="../getConnection.jsp"%>
	<%@ include file="bgColor.jsp"%>
	<%
	/*------------------------------------------------------------------------------------------------
	 *		getmaster_nickname
	 -------------------------------------------------------------------------------------------------*/
	sql = " SELECT  nickname FROM GT_User_Info WITH (READUNCOMMITTED) WHERE   phonenum='"+gphone+"'" ; 
	pstmt = con.prepareStatement(sql);	
	rs = pstmt.executeQuery();		 
	if( rs.next() )
	{
		master_nickname = rs.getString("nickname");
	}else{
		master_nickname = "绝澜";
	}
	rs.close();
	pstmt.close();
      
	/*------------------------------------------------------------------------------------------------
	 *		pageCount
	 -------------------------------------------------------------------------------------------------*/
	query1 = " SELECT COUNT(idx) countNum FROM GT_Ns30questionRe WITH (READUNCOMMITTED) WHERE ref_idx="+idx;
	pstmt = con.prepareStatement(query1);	
	rs = pstmt.executeQuery();	
	if(rs.next()){
		dbcount = rs.getInt("countNum");  // 臂 醚 肮荐
		rs.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;
	}
	/*------------------------------------------------------------------------------------------------
	 *		gameListLog
	 -------------------------------------------------------------------------------------------------*/
	query1 = " SELECT * FROM GT_Ns30questionRe WITH (READUNCOMMITTED) WHERE ref_idx ="+idx+" ORDER BY regdate DESC";
	pstmt = con.prepareStatement(query1);	
	rs = pstmt.executeQuery();	
	if(!rs.next()) // 蔼捞 绝阑锭
	{
		isNoPage = 1;
		pagesize=0;
	}else{	         // 蔼捞 乐阑锭	//rs.absolute(absolutepage);				
		for(int s=0; s<absolutepage-1; s++)
			rs.next();
	}	
	%>
<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">春胶巩翠乞啊</font></td>
				</tr>
			</table>
		</td>
	</tr>
	<!-- 鸥捞撇 场 -->
	<!-- 咯归 矫累 -->
	<tr height="8">
		<td></td>
	</tr>
	<!-- 咯归 场 -->
	<!-- 鸥捞撇 牧刨明 矫累 -->
	<tr>
		<td align="center"><font color="#716e63"><%=master_nickname%>丛狼 30巩 30翠俊 措秦<br>模备甸捞 崔酒霖 巩翠 乞啊涝聪促..</font><br></td>
	</tr>
	<!-- 鸥捞撇 牧刨明 场 -->
	<!--咯归 矫累-->
	<tr>
		<td height="8"></td>
	</tr>
	<!--咯归 场-->
	<!--捞傈/促澜 傅农 冠胶 矫累-->
	<%
     pageurl=url_path+"/news/30q&a_repleList.jsp?mphone="+mphone+"&gphone="+gphone+"&idx="+idx;         
     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]%><b><font color="<%=pageFNFontColor%>" size="3">捞傈</font></b><%=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>
			<table width="240" border="0" cellspacing="0" cellpadding="0">
				<!-- 馆汗 1 矫累 -->
				<%
				int count = 0 ; //其捞瘤 墨款磐 函荐					
				while(count<pagesize){
					count++;
					reple_idx = rs.getInt("idx");
					phonenum = rs.getLong("phonenum");
					String phonenum0 = getStrPhone(phonenum);
					text = rs.getString("text");
					nickname = rs.getString("nickname");
					sticker	= rs.getInt("sticker");		
					regdate = formatDate((Date)rs.getTimestamp("regdate"),"yy/MM/dd HH:mm");		
				%>
				<%	if(phonenum == mphoneToLong){ %>
				<!-- 馆汗 4 矫累 -->
				<tr height="8">
					<td colspan="5"></td>
				</tr>
				<tr>
					<td width="4"></td>
					<td width="31" valign="top">
					<%if(sticker==10){%>
					<img src="<%=img_path%>images/news/<%=sticker%>.png">
					<%}else{ %>
					<img src="<%=img_path%>images/news/0<%=sticker%>.png">
					<%} %>
					</td>					
					<td width="4"></td>
					<td valign="top"><font color="<%=mainBgColor%>"><%=text%></font></td>
					<td width="4"></td>
				</tr>
				<tr height="4">
					<td colspan="5"></td>
				</tr>
				<tr>
					<td width="4"></td>
					<td colspan="3">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr height="15">
								<td></td>								
								<td width="94" bgcolor="#efebd5" align="center"><font color="#716e63" size="3"><a href="<%=url_path%>/mypage/my_confirm.jsp?mphone=<%=mphone%>&gphone=<%=phonenum0%>"><%=nickname%></a><br><%=regdate%></font></td>
								<td width="2"></td>
								<td width="30" bgcolor="#efebd5" align="center"><font color="#716e63" size="3"><a href="<%=url_path%>/news/30q&a_repleModify.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&idx=<%=idx%>&reple_idx=<%=reple_idx%>">荐沥</a></font></td>
							</tr>
						</table>
					</td>
					<td width="4"></td>
				</tr>
				<tr height="4">
					<td colspan="5"></td>
				</tr>
				<tr height="1">
					<td colspan="5" bgcolor="#ffcbb9"></td>
				</tr>
				<!-- 馆汗 4 场 -->					
				<%}else{%>				
				<tr height="8">
					<td colspan="5"></td>
				</tr>
				<tr>
					<td width="4"></td>
					<td width="31" valign="top"><img src="<%=img_path%>images/news/0<%=sticker%>.png"></td>
					<td width="4"></td>
					<td valign="top"><%=text%></td>
					<td width="4"></td>
				</tr>
				<tr height="4">
					<td colspan="5"></td>
				</tr>
				<tr>
					<td width="4"></td>
					<td colspan="3">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr height="15">
								<td></td>
								<td width="94" bgcolor="#efebd5" align="center"><font color="#716e63" size="3"><a href="<%=url_path%>/mypage/my_confirm.jsp?mphone=<%=mphone%>&gphone=<%=phonenum0%>"><%=nickname%></a><br><%=regdate%></font></td>
							</tr>
						</table>
					</td>
					<td width="4"></td>
				</tr>
				<tr height="4">
					<td colspan="5"></td>
				</tr>
				<tr height="1">
					<td colspan="5" bgcolor="#ffcbb9"></td>
				</tr>
				<% }%> 							
				<%	
    			if(rs.isLast()){ //盖 付瘤阜 饭内靛 老版快
						 break;
				}else{
						rs.next();
					 }
				}	
				%>	
				<!-- 馆汗 1 场 -->
			</table>
		</td>
	</tr>
	<!-- 巩翠乞啊 场 -->
	<!--咯归 矫累-->
	<tr>
		<td height="8"></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"><%=szSplit2[19]%></font><%=szSplit2[20]%></td>
								<td></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<!--其捞瘤 傅农 场-->	
	<!--咯归 矫累-->
	<tr>
		<td height="8"></td>
	</tr>
	<!--咯归 场-->
	<!-- 滚瓢 矫累 -->
	<tr> 
		<td>
			<table width="240" border="0" cellspacing="0" cellpadding="0">
				<tr height="17">
					<td></td>
					<td width="84" bgcolor="<%=mainBgColor%>" align="center" ><a href="<%=url_path%>/news/NewsMain.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>"><font color="#ffffff">迄乔春胶权</font></a></td>
					<td width="2"></td>
					<td width="84" bgcolor="<%=mainBgColor%>" align="center" ><a href="<%=url_path%>/mypage/my_main_sub.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">&nbsp;<a href="<%=url_path%>/main.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>">权</a>&gt;<a href="<%=url_path%>/mypage/my_confirm.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>"><%=master_nickname%>丛狼迄乔</a>&gt;<a href="<%=url_path%>/news/NewsMain.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>">春胶</a>&gt;乞啊格废</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 + -