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

📄 questionself.jsp.svn-base

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 SVN-BASE
字号:
<!-----------------------------------------------------------
* @ 权> Xxx丛狼 迄乔 > 家匡皋捞飘 > 鸥肺痢
* @ Author : 碍辑康 ( 2008-05-21 )
* @ Images : 
-------------------------------------------------------------->
<%@ 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"%>
<%!
	public static String isNull(String str) 
	{ 
		if (str == null) 
		return ""; 
		else 
		return str;
	} 
%>
<%

	/*------------------------------------------------------------------------------------------------------
	+	扁夯 颇扼固磐
	-------------------------------------------------------------------------------------------------------*/
	
	String mphone = request.getParameter("mphone");
	String gphone = request.getParameter("gphone");
	
	/*------------------------------------------------------------------------------------------------------
	+	其捞瘤 函荐
	-------------------------------------------------------------------------------------------------------*/	
	
	int pageNUM=1;    // 其捞瘤 锅龋
	int absolutepage=1;  // 例措 困摹 其捞瘤 锅龋
    int dbcount=0 ;   //  DB 救俊 臂 肮荐 历厘 函荐
	int isNoPage = 0;	//茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
	int recordCount=0; //其捞隆 且 饭内靛 墨款飘
	int pagesize=10;		//其捞瘤 府胶飘 荐
	int pagecount=1;		//其捞瘤 荐
	int gotoPage=1;		//其捞瘤 逞滚
	
	
	/*------------------------------------------------------------------------------------------------------
	+	DB 包访 函荐
	-------------------------------------------------------------------------------------------------------*/	
	
	Connection con = null;
	PreparedStatement pstmt=null;
	Statement stmt = null;
	ResultSet rs = null;
	ResultSet pageset = null;

	/*------------------------------------------------------------------------------------------------------
	+	傈开 函荐
	-------------------------------------------------------------------------------------------------------*/
	String query1=null , query2 = null ,sql = null;
	int idx = 0;
	int phonenum = 0;
	String text = "";
	String username = "";
	int sex = 0;
	int	comment = 0;
	int age = 0 ;
	Calendar calendar=Calendar.getInstance(); 
	int now=calendar.get(Calendar.YEAR); 
	int date = 0;
	int questionCount = 0 ;
	String szCount ="";
	String name = "";
	String pageurl = url_path+"/soulmate/questionList.jsp?mphone="+mphone+"&gphone="+gphone;
 %>


<%
try
{
	/*------------------------------------------------------------------------------------------------
	 *		DB 目池记
	 -------------------------------------------------------------------------------------------------*/
%><%@ include file="../getConnection.jsp"%><%
	
	con.setAutoCommit(false);
	stmt=con.createStatement();
	


	/*------------------------------------------------------------------------------------------------
	 *		郴 鸥肺  龙巩  饭内靛
	 -------------------------------------------------------------------------------------------------*/
	 query1 = "select count(idx) as questioncount from  GT_LUCKY_TARO where  phonenum = "+ mphone ;
	 pstmt = con.prepareStatement(query1);
	 rs = pstmt.executeQuery();
	 if(rs.next()){
	 	questionCount = rs.getInt("questioncount");
	 }
	 rs.close();
	 pstmt.close();	
	/*------------------------------------------------------------------------------------------------
	 *		其捞瘤 
	 -------------------------------------------------------------------------------------------------*/	 
	 
	szCount = query1;
	pstmt = con.prepareStatement(szCount);
	pageset = pstmt.executeQuery();
	if(pageset.next()){
		dbcount = pageset.getInt(1);  // 臂 醚 肮荐
		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;
	}
	
	/*------------------------------------------------------------------------------------------------
	 *		匙  name 啊廉坷促 
	 -------------------------------------------------------------------------------------------------*/
	sql = "select  name  from GT_user_info  where  phonenum = '"+mphone+"'";
	pstmt = con.prepareStatement(sql);
	rs = pstmt.executeQuery();
	if(rs.next()){
	name = rs.getString(1);
	}
 %>

<html>
<head>
	<link href="http://entaz.mugeta.com/client/mugeta_v2_test/web/user/mobile.css" rel="stylesheet" type="text/css">
	<title>权> <%=name %>丛狼 迄乔 > 家匡皋捞飘 > 鸥肺痢</title>
</head>
<body>

<table width="240" border="0" cellspacing="0" cellpadding="0">
	<!--鸥捞撇 矫累-->
	<tr>
		<td>
			<table width="240" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="2" height="2" bgcolor="#c789ff"></td>
				</tr>
				<tr>
					<td width="10" height="15" bgcolor="#9819e9"></td>
					<td height="15" 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="8"></td>
	</tr>
	<!--咯归 场-->

	<tr>
		<td>
			<!--捞傈/促澜 傅农 冠胶 矫累-->
				<table width="240" bgcolor="#c789ff" border="0" cellspacing="0" cellpadding="0">
					<tr height="19">
					  <td bgcolor="#e8f2f2" align="center">
						<%
						    pageurl=url_path+"/soulmate/questionself.jsp?mphone="+mphone;
						    out.println(pagePath(pageurl, dbcount, pageNUM, pagecount));
						 %>
					  </td>
					 </tr>
				</table>
			
			<!--捞傈/促澜 傅农 冠胶 场-->
		</td>
	</tr>
	
	<!--咯归 矫累-->
	<tr>
		<td height="8"></td>
	</tr>
	<!--咯归 场-->
<%
	if(questionCount == 0){
%>

				<tr>
					<td>
						<table width="240" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="7"></td>
								<td width="226"><font size="3">钎矫且 郴侩捞 绝嚼聪促.</font></td>
								<td width="7"></td>
							</tr>
							<tr>
								<td colspan="3" height="3"></td>
							</tr>
						</table>
						<!--龙巩郴侩1 冠胶 场-->
					</td>
				</tr>
				<tr>
					<td height="3"></td>
				</tr>	
	
<%}else{
	query2 ="SELECT U.name,U.sex,T.text,T.comment,T.idx,U.year "+
			" From GT_user_info AS  U inner join GT_LUCKY_TARO AS T "+
			"ON U.phonenum = T.phonenum "+
			"WHERE T.phonenum = '"+mphone+"'";
	pstmt = con.prepareStatement(query2);
	rs = pstmt.executeQuery();
	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)
	{
		count++;
		username = rs.getString(1);
		sex = rs.getInt(2);
		text = rs.getString(3);
		comment = rs.getInt(4);
		idx = rs.getInt(5);
		age = (now - rs.getInt(6))+1 ;
	
%>
	
	<tr>
		<td>
			<!--龙巩郴侩 冠胶1 矫累-->
			<table width="240" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="7"></td>
					
					<%
						if (sex == 2){
					 %>
						<td width="170" valign="top"><font color="#545454"><%=username %> 丛</font>&nbsp;
													<font color="#909090" size="3">咯己(<%=age %>技)</font></td>
					<%
						}else{
					 %>			
					 	<td width="170" valign="top"><font color="#545454"><%=username %> 丛</font>&nbsp;
					 								<font color="#909090" size="3">巢己(<%=age %>技)</font></td>
					 <%
					 	}
					  %>								
					 								
					 <%
					 	if(comment == 0) {
					  %>								
					<td align="right"><font color="#ff6c78">(固翠函)</font></td>
					<%
						}else{
					 %>
					 <td align="right"><font color="#ff6c78">(翠函肯丰)</font></td>
					 <%
					 	}
					  %>
					<td width="7"></td>
				</tr>
				
				
				<tr>
					<td colspan="4" height="5"></td>
				</tr>
				
				
				<tr>
					<td width="7"></td>
					<% if(comment == 0){ %>
					<td colspan="2"><font color="#c789ff"><%=text%></font></td>
					<%}else{ %>
					<intput type="hidden"  name ="idx"  value="<%=idx%>"/>
					<td colspan="2"><a href="<%=url_path%>/soulmate/answerDetail.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&idx=<%=idx%>"><font color="#c789ff"><%=text%></font></a></td>
					<%	} %>
					<td width="7"></td>
				</tr>
				<tr>
					<td colspan="4" height="5"></td>
				</tr>
			    <tr>
					<td width="7"></td>
				</tr>
				<tr>
					<td colspan="4" height="5"></td>
				</tr>
				<!--备盒 扼牢 矫累-->
				<tr>
					<td width="7"></td>
					<td colspan="2" width="226">
						<table width="226" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td></td>
								<td width="216" height="1" bgcolor="#f7d9ff"></td>
								<td></td>
							</tr>
						</table>
					</td>
					<td></td>
				</tr>
				<!--备盒 扼牢 场-->
			</table>
			<!--龙巩郴侩 冠胶1 场-->
		</td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	
<%
		if(rs.isLast())
			{ //盖 付瘤阜 饭内靛 老版快
				 break;
			}
			else
			{
				rs.next();
			}
		}
	}	
%>
	
	<tr>
		<td>
			<!--其捞瘤 傅农 矫累-->
				<table width="240" bgcolor="#e8f2f2" border="0" cellspacing="0" cellpadding="0">
				<tr>
				    <td height="19" 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>

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

	<!--滚瓢 矫累-->
	<tr> 
		<td>
			<table width="240" height="17" border="0" cellspacing="0" cellpadding="0">	
				<tr>
					<td></td>
					<td width="60" height="17" bgcolor="#c789ff" align="center"><a href="<%=url_path%>/soulmate/Soulmate_zp.jsp?mphone=<%=mphone%>&gphone=<%=mphone%>"><font color="#ffffff">倒酒啊扁</font></a></td>
					<td></td>
				</tr>
			</table>
		</td>
	</tr>
<!--滚瓢 场-->

<!--咯归 矫累-->
  <tr>
    <td height="11"></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_zp.jsp?mphone="+mphone+"&gphone="+gphone;
%>

<!--窍窜 版肺钎矫 矫累-->
	<tr>
		<td>
			<table width="240" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="10" bgcolor="#BBC7C8"></td>
					<td width="220" bgcolor="#DAE6E8" height="19">&nbsp;<a href="<%=step1%>">权</a>&gt;<a href="<%=step2%>"><b><%=name%></b>&nbsp;&nbsp;丛狼 迄乔</a>&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) 
{
	out.println(e);
}
finally
{
	if(rs != null)      try{rs.close();}catch(Exception se){}
	if(pageset != null) try{pageset.close();}catch(Exception se){}
	if(pstmt != null)   try{pstmt.close();}catch(Exception es){}
	if(stmt != null)    try{stmt.close();}catch(Exception es){}
	if(con != null)		try{con.close();}catch(Exception es){}
}
%>

⌨️ 快捷键说明

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