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

📄 tarofornoquestion_lhl.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 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="../imgpath.jsp"%>
<%@ include file="../common_func.jsp"%>

<%
	// 其捞瘤 备泅 眠啊 函荐 
	int pagesize = 5;  // 茄其捞瘤寸 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_LUCKY_TARO = "GT_LUCKY_TARO";
	String tableGT_LUCKY_TARO_COMMENT = "GT_LUCKY_TARO_COMMENT";
	String tableGT_USER_INFO = "GT_USER_INFO";
	String mphone = request.getParameter("mphone");
	String gphone = request.getParameter("gphone");
	
	//int phonenum = 0;
	//String mphone = "13366103";		//test db		fang ke
	//String gphone = "9900100081";		//test db		zu ren
	
	String username = "No name";
	String gusername = "No name";
	try {
%>
<%@ include file="../getConnection.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>8权 > Xxx丛狼 迄乔 > 家匡皋捞飘 > 鸥肺痢</title>
<link rel="stylesheet" href="../mobile.css" type="text/css"></link>
<style type="text/css">
a:link { 
text-decoration: none; 
} 
</style> 
</head>
<body>
<table width="176" border="0" cellspacing="0" cellpadding="0">
	<!--鸥捞撇 矫累-->
	<tr>
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="2" height="2" bgcolor="#c789ff"></td>
				</tr>
				<tr>
					<td width="6" height="14" bgcolor="#9819e9"></td>
					<td height="14" bgcolor="#9819e9"><font color="#ffffff">鸥肺痢焊扁</font></td>
				</tr>
				<tr>
					<td colspan="2" height="2" bgcolor="#c789ff"></td>
				</tr>
				<tr>
					<td colspan="2" height="1" bgcolor="#9819e9"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--鸥捞撇 场-->
	

	<!--咯归 矫累-->
	<tr>
		<td height="4"></td>
	</tr>
	<!--咯归 场-->




<%
		stmt = con.createStatement();
		
		String sqlgName = "SELECT name FROM " + tableGT_USER_INFO + " WITH (READUNCOMMITTED) WHERE phonenum='" + mphone + "'";
		rs = stmt.executeQuery(sqlgName);
		while(rs.next())
		{
			gusername = rs.getString("name");
		}
		
		
		String sqlName = "SELECT nickname FROM " + tableGT_USER_INFO + " WITH (READUNCOMMITTED) WHERE phonenum='" + gphone + "'";
		rs = stmt.executeQuery(sqlName);
		while(rs.next())
		{
			username = rs.getString("nickname");
		}
 %>

	<!--膏飘郴侩 矫累-->
	<tr> 
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="7"></td>
					<td><font color="#acacac"><%=gusername %>丛捞</font><font color="#ff6c78"> 捞固 鸥肺痢阑 毫靛妨辑 歹 捞惑 翠阑 秦 靛副 荐 绝绢夸.</font></td>
					<td width="7"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--盖飘郴侩 场-->

	<!--咯归 矫累-->
	<tr>
		<td height="11"></td>
	</tr>
	<!--咯归 场-->

	<!--捞傈俊 夯 鸥肺痢 府胶飘 矫累-->
	<tr> 
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><font color="#ecaaff">≮ </font><font color="#616667">捞傈俊 夯 鸥肺痢 郴侩</font></td>
				</tr>
				<tr>
					<td height="3"></td>
				</tr>
				<tr>
					<td>
					<!--捞傈/促澜 傅农 冠胶 矫累-->
						<table width="176" bgcolor="#e8f2f2" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td bgcolor="#e8f2f2" align="center">
<%
	pageurl = url_path+"/soulmate/tarofornoquestion_lhl.jsp?mphone="+mphone+"&gphone="+gphone;
	out.println(pagePath(pageurl, dbcount, pageNUM, pagecount));
%>
								
								</td>
							</tr>
						</table>
						<!--捞傈/促澜 傅农 冠胶 场-->
					</td>
				</tr>				
				<tr>
					<td height="7"></td>
				</tr>

<%
		
		String strSQL = "SELECT distinct a.text,a.nregdate,a.idx,b.taro_card_idx,b.taro_idx " +
						"FROM " + tableGT_LUCKY_TARO + " a WITH (READUNCOMMITTED), " + tableGT_LUCKY_TARO_COMMENT + " b WITH (READUNCOMMITTED)" + 
						"WHERE a.idx=b.taro_idx and a.comment=1 and b.phonenum=" + mphone + " and a.phonenum='" + gphone+"' order by nregdate desc";
						
		String strSqlfuben = "SELECT distinct a.text,a.nregdate,a.idx,b.taro_card_idx,b.taro_idx " +
							 "FROM " + tableGT_LUCKY_TARO + " a WITH (READUNCOMMITTED), " + tableGT_LUCKY_TARO_COMMENT + " b WITH (READUNCOMMITTED)" + 
							 "WHERE a.idx=b.taro_idx and a.comment=1 and b.phonenum=" + mphone	+ " and a.phonenum='" + gphone+"'";		
		String szCount = " select count(1) countNum  from ("+ strSqlfuben +") countNum";
		
		rs = stmt.executeQuery(strSQL);
		
		pstmt = con.prepareStatement(szCount);
		
		pageset = pstmt.executeQuery();
		
		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 strDate = "";
		String strQuestion = "";
		String taroId = "";
		String taro_idx = "";
		String taro_card_idx = "";
		
		if(!rs.next()) // 蔼捞 绝阑锭
		{
			isNoPage = 1;
			pagesize=0;
		}
		else         // 蔼捞 乐阑锭	//rs.absolute(absolutepage);
		{				
			for(int s=0; s<absolutepage-1; s++)
				rs.next();
		}
		
		int count = 0 ; //其捞瘤 墨款磐 函荐
		
		while(count<pagesize)
		{
			strDate = rs.getString("nregdate");
			strQuestion = rs.getString("text");
			taroId = rs.getString("idx");
			taro_idx = rs.getString("taro_idx");
			taro_card_idx = rs.getString("taro_card_idx");
%>
				<tr>
					<td>
						<!--龙巩郴侩1 冠胶 矫累-->
						<table width="176" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="5"></td>
								<td width="166"><font size="3"><%=getTime(strDate)%>&nbsp;&nbsp;龙巩 郴侩</font></td>
								<td width="5"></td>
							</tr>
							<tr>
								<td width="5"></td>
								<td width="166"><a href="taroforview_lhl.jsp?gphone=<%=gphone%>&mphone=<%=mphone%>&taroID=<%=taroId%>&taro_idx=<%=taro_idx%>&taro_card_idx=<%=taro_card_idx%>"><font color="#9819e9"><%=strQuestion%></font></a></td>
								<td width="5"></td>
							</tr>
							<tr>
								<td colspan="3" height="3"></td>
							</tr>
							<!--备盒 扼牢 矫累-->
							<tr>
								<td></td>
								<td height="1" bgcolor="#f7d9ff"></td>
								<td></td>
							</tr>
							<!--备盒 扼牢 场-->
						</table>
						<!--龙巩郴侩1 冠胶 场-->
					</td>
				</tr>
				<tr>
					<td height="3"></td>
				</tr>
<%
			if(rs.isLast())
			{ //盖 付瘤阜 饭内靛 老版快
				break;
			}
			else
			{
				rs.next();
			}
		}
		
			
		rs.close();
		pstmt.close();
		stmt.close();
		con.close();
%>
	<tr>
		<td>
			<!--其捞瘤 傅农 矫累-->
			<table width="176" height="16" bgcolor="#e8f2f2" border="0" cellspacing="0" cellpadding="0">
				<tr>
    <td height="16" colspan="6" bgcolor="#e8f2f2" valign="bottom" align="center">
    
<%//其捞瘤 备泅何
	
	int limit = 5 ;   //其捞瘤 府胶飘 俺荐 瘤沥	
	
	int temp =(pageNUM-1) % limit ;	//矫累 其捞瘤 备窍扁
	
	int startPage = pageNUM - temp;

%>

<%// [捞傈] 傅农 眠啊窍扁
 
   if ((startPage-limit)>0){ %>
	
	<a href="<%=pageurl%>&pageNUM=<%=startPage-1%>"><font color="#DB1A00">捞傈</font></a>&nbsp;
   
   <%}
   //其捞瘤 锅龋 唱凯窍扁
  
   if(isNoPage == 0)
   
   {
	
	 for(int i=startPage ; i<(startPage+limit);i++)
    
     {
	  
	   if( i == pageNUM)
	   
	   {%>
			
			<font color="#DB1A00"><b><%=i%></b></font>&nbsp;
	<% }
	   
	   else
	 
	   { %>
			<a href="<%=pageurl%>&pageNUM=<%=i%>"><font color="#DB1A00"><%=i%></font></a>&nbsp;
    <% }
	   
	   if(i >= pagecount) break;
	 
	 }
   
   }
  
   else
	  
	  out.println("钎矫 且 郴侩捞 绝嚼聪促.");
   
   //[促澜] 傅农 眠啊
   
   if((startPage+limit)<=pagecount){ %>
	
	<a href="<%=pageurl%>&pageNUM=<%=(startPage+limit)%>"><font color="#DB1A00">促澜</font></a>&nbsp;
   
   <%}
   
%>	
	</td>
	
  </tr>
			</table>
			<!--其捞瘤 傅农 场-->
</td>
</tr>
	<!--捞傈俊 夯 鸥肺痢 府胶飘 场-->
</table>
</td>
</tr>				
	<tr>
		<td height="7"></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+"/soulmate/soulmate_g.jsp?mphone="+mphone+"&gphone="+gphone;
%>
	
		<!--滚瓢 矫累-->
	<tr> 
		<td>
			<table width="176" height="16" border="0" cellspacing="0" cellpadding="0">	
				<tr>
					<td></td>
					<td width="55" height="16" bgcolor="#c789ff" align="center"><a href="<%=step3%>"><font color="#ffffff">倒酒啊扁</font></a></td>
					<td></td>
				</tr>
			</table>
		</td>
	</tr>
<!--滚瓢 场-->

<!--咯归 矫累-->
  <tr>
    <td height="11"></td>
  </tr>
<!--咯归 场--> 




<!--窍窜 版肺钎矫 矫累-->
	<tr>
		<td>
			<table width="176" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="10" bgcolor="#BBC7C8"></td>
					<td width="156" bgcolor="#DAE6E8" height="15">&nbsp;<a href="<%= step1 %>">权</a>&gt;<a href="<%= step2 %>"><%=username%>丛狼 迄乔</a></td>
					<td width="10" bgcolor="#BBC7C8"></td>
				</tr>
				<tr>
					<td width="10" bgcolor="#BBC7C8"></td>
					<td width="156" bgcolor="#DAE6E8" height="15">&nbsp;&nbsp;&nbsp;&nbsp;&gt;<a href="<%= step3 %>">家匡皋捞飘</a>&gt; 鸥肺痢</td>
					<td width="10" bgcolor="#BBC7C8"></td>
				</tr>	
			</table>
		</td>
	</tr>
<!--窍窜 版肺钎矫 场-->

</table>

<!--窍窜 版肺钎矫 矫累-->
	<%@ include file="../newbottom.jsp"%>
<!--窍窜 版肺钎矫 场-->

</body>
</html>
<%
} catch(Exception e) {
		e.printStackTrace();
	}
 %>

<%!
	public String getTime(String input)
	{
		//System.out.println("input.length" + input.length());
		return new String(input.substring(2, 4)+"/"+input.substring(4, 6)+"/"+input.substring(6, 8));
	}
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -