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

📄 soulmate_zp.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<!--------------------------------------------------------------------------------------------------------------
*@霸烙皋牢
*@Author : zhou peng(2008-06-04)


--------------------------------------------------------------------------------------------------------------->

<%@ 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;
	} 
%>
<%
    /**
	 *	
	 *
	 *	@ version			:	1.0.0
	 *	@ author			:	zhou peng ( pengzhou@isoftstone.com )
	 *	@ last modified	:	2008-05-23
	 */
	/*------------------------------------------------------------------------------------------------------
	+		扁夯 颇扼固磐
	-------------------------------------------------------------------------------------------------------*/
	String mphone= request.getParameter("mphone");
	String gphone= request.getParameter("gphone");
	//mphone = "1020591111";
	//gphone = "1051697";



	/*------------------------------------------------------------------------------------------------------
	+	傈开 函荐
	-------------------------------------------------------------------------------------------------------*/
	String		sql					= null;
	String		strNickname			= null;
	String		strOppNickname		= null;
	String		strGuestNickName	= null;
	String		regDate				= null;
	String		text				= null;
	int			age					= 0;
	int			sex					= 1;
	int			sysYear				= 0;
	int			answerCount			= 0;
	int			questionCount		= 0;
	int			oppCount			= 0;
	int			taroCount			= 0;
	int			oppRightCount		= 0;
	String		strGuestphone		= null;
	int 		attentionPoint 		= 0;
	
	
	
	/*------------------------------------------------------------------------------------------------------
	+	DB 包访 函荐
	-------------------------------------------------------------------------------------------------------*/
	Connection				con		= null;
	PreparedStatement		pstmt	= null;
	Statement				stmt	= null;
	ResultSet				rs		= null;
	
	try
	{
	
	
	
	/*------------------------------------------------------------------------------------------------
	 *		DB 目池记
	 -------------------------------------------------------------------------------------------------*/
	%><%@ include file="../getConnection.jsp"%><%
	/*------------------------------------------------------------------------------------------------
	 *		All Quiz answerCount
	 -------------------------------------------------------------------------------------------------*/

	sql = " select count(distinct(guest_phone)) answerCount  from GT_LUCKY_QUIZ_MYLOG where phonenum!=guest_phone and phonenum="+Long.parseLong(mphone) ; 
	pstmt = con.prepareStatement(sql);
	
	rs = pstmt.executeQuery();
		 
	if( rs.next())
	{
		answerCount = rs.getInt("answerCount");
	}else{
		answerCount = 0;
	}
	rs.close();
	pstmt.close();

	/*------------------------------------------------------------------------------------------------
	 *		My Question Count
	 -------------------------------------------------------------------------------------------------*/

	sql = " select count(distinct(quiz_idx)) questionCount from GT_LUCKY_QUIZ_MYLOG where phonenum="+Long.parseLong(mphone) +"and guest_phone="+Long.parseLong(mphone); 

	pstmt = con.prepareStatement(sql);
	
	rs = pstmt.executeQuery();
		 
	if( rs.next() )
	{
		questionCount = rs.getInt("questionCount");
	}else{
		questionCount = 0;
	}
	rs.close();
	pstmt.close();
	/*------------------------------------------------------------------------------------------------
	 *		My nickName
	 -------------------------------------------------------------------------------------------------*/

	sql = " select  nickname from GT_User_Info  WHERE   phonenum='"+mphone+"'" ; 

	pstmt = con.prepareStatement(sql);
	
	rs = pstmt.executeQuery();
		 
	if( rs.next() )
	{
		strNickname = rs.getString("nickname");
	}else{
		strNickname = "绝澜";
	}
	rs.close();
	pstmt.close();
	/*------------------------------------------------------------------------------------------------
	 *		Quiz opponent's Right answercount
	 -------------------------------------------------------------------------------------------------*/

	sql = " select count(distinct(a.quiz_idx)) oppRightCount from gt_lucky_quiz_mylog a,gt_lucky_quiz b,gt_lucky_quiz_mylog c ";
	sql = sql + "where   a.quiz_idx = b.idx and b.flag=1 and a.quiz_idx=c.quiz_idx and a.answer = c.answer ";
	sql = sql + "and a.phonenum = "+Long.parseLong(mphone)+" and a.guest_phone ="+Long.parseLong(mphone);
	sql = sql + "and c.phonenum = "+Long.parseLong(mphone)+" and c.guest_phone =" ; 
	sql = sql + "(select top 1 guest_phone from GT_LUCKY_QUIZ_MYLOG where phonenum<>guest_phone and phonenum="+Long.parseLong(mphone)+" order by regdate desc)" ; 
	
	pstmt = con.prepareStatement(sql);
	
	rs = pstmt.executeQuery();
		 
	if( rs.next() )
	{
		oppRightCount = rs.getInt("oppRightCount");
	}else{
		oppCount = 0;
	}
	rs.close();
	pstmt.close();
	/*------------------------------------------------------------------------------------------------
	 *		Quiz opponent's answercount
	 -------------------------------------------------------------------------------------------------*/

	sql = " select count(distinct a.idx)oppCount from gt_lucky_quiz_mylog a where a.phonenum ="+Long.parseLong(mphone)+" and a.guest_phone =" ; 

	sql = sql + "(select top 1 guest_phone from GT_LUCKY_QUIZ_MYLOG where phonenum<>guest_phone and phonenum="+Long.parseLong(mphone)+" order by regdate desc)" ; 
	
	pstmt = con.prepareStatement(sql);
	
	rs = pstmt.executeQuery();
		 
	if( rs.next() )
	{
		oppCount = rs.getInt("oppCount");
	}else{
		oppCount = 0;
	}
	rs.close();
	pstmt.close();
	/*------------------------------------------------------------------------------------------------
	 *		Quiz opponent's attentionPoint
	 -------------------------------------------------------------------------------------------------*/
	sql = " select nickname,sex,(substring(convert(varchar(8),getDate(),112),0,5)-year) age,attention_point ";
	sql = sql+" from Gt_user_info a, gt_lucky_attention_point b where a.phonenum=b.phonenum and a.phonenum='"+mphone+"' and b.guest_phone =";
	sql = sql + "(select top 1 guest_phone from GT_LUCKY_QUIZ_MYLOG where phonenum="+Long.parseLong(mphone)+" order by regdate desc)" ; 
	pstmt = con.prepareStatement(sql);
	
	rs = pstmt.executeQuery();
	if(rs.next()){
		attentionPoint = rs.getInt("attention_point");
	}
	rs.close();
	pstmt.close();
	/*------------------------------------------------------------------------------------------------
	 *		Quiz opponent's Info
	 -------------------------------------------------------------------------------------------------*/

	sql = " select  nickname,sex,year,(substring(convert(varchar(8),getDate(),112),0,5)-year+1) age ,phonenum from GT_User_Info  WHERE   phonenum=" ; 

	sql = sql + "(select top 1 guest_phone from GT_LUCKY_QUIZ_MYLOG where phonenum<>guest_phone and phonenum="+Long.parseLong(mphone)+" order by regdate desc)" ; 
	
	pstmt = con.prepareStatement(sql);
	
	rs = pstmt.executeQuery();
		 
	if( rs.next() )
	{
		strOppNickname = rs.getString("nickname");
		sex = rs.getInt("sex");
		age = rs.getInt("age");
		strGuestphone = rs.getString("phonenum");
	}else{
		strOppNickname = "绝澜";
		sex = 1;
		age = 0;
		strGuestphone = "";
	}
	rs.close();
	pstmt.close();
	
%>
<html>
<head>
	<link href="http://entaz.mugeta.com/client/mugeta_v2_test/web/user/mobile.css" rel="stylesheet" type="text/css">
	<title>权 > <%=strNickname%>丛狼 迄乔包府 > 家匡皋捞飘</title>
</head>
<body>

<!--剧侥
  <tr>
     <td>
          <table width="240" border="0" cellspacing="0" cellpadding="0">
             <tr>  
  	    <td></td>
      	   </tr>
          </table>
     </td>
  </tr>
-->
<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="5"></td>
	</tr>
	<!--咯归 场-->

	<!--唱俊 措茄 巩力甫 钱绢夯 模备甸 冠胶 矫累-->
	<tr>
		<td >
			<table width="240" border="0" cellspacing="0" cellpadding="0">
				<!--鸥捞撇 矫累-->
				<tr>
					<td width="3"></td>
					<td height="19"><font color="#c789ff"><b>♂</b></font><font color="#7c7c7c"><b> 唱俊 措茄 巩力甫 钱绢夯 模备甸</b></font></td>
					<td width="3"></td>
				</tr>

				<!--备盒急 矫累-->
				<tr>
					<td width="3"></td>
					<td height="2" bgcolor="#ecaaff"></td>
					<td width="3"></td>
				</tr>
				<!--备盒急 场-->
				<tr>
					<td colspan="3" height="3"></td>
				</tr>
				<!--鸥捞撇 场-->

				<!--唱俊 措茄 巩力甫 钱绢夯 模备甸  郴侩 矫累-->
				<%if(answerCount != 0){ %>
				<tr>	
					<td width="3"></td>
					<td width="234">
						<table width="234" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="3"></td>
								<!--酒官鸥 矫累-->
								<td width="54">
									<table width="54" bgcolor="#e8f2f2" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td colspan="3" height="3"></td>
										</tr>
										<tr>
											<td width="3"></td>
											<td valign="top"><img src="<%=ava_path%>display_thumb.jsp?mphone=<%=mphone%>&gphone=<%=strGuestphone%>" width="48" height="54"></td>
											<td width="3"></td>
										</tr>
										<tr>
											<td colspan="3" height="3"></td>
										</tr>
									</table>
								</td>
								<!--酒官鸥 场-->

								<!--郴侩 矫累-->
								<td width="174">
									<table width="174" border="0" cellspacing="0" cellpadding="0">	
										<tr>
											<td width="5"></td>
											<td width="107" height="20" valign="top"><b><%=strOppNickname%></b></td>
											<%if(sex == 1){ %>
											<td  valign="top"><font color="#909090">咯己 (<%=age%>技)</font></td>
											<%}else{ %>
											<td  valign="top"><font color="#909090">巢己 (<%=age%>技)</font></td>
											<%} %>
										</tr>
										<tr>
											<td width="5"></td>
											<td colspan="2"><font color="#909090"><%=strOppNickname%>丛俊 措茄 包缴档</font><br>
																			 <font color="#ffa6d6"><%
											if(attentionPoint>=24){
											%>
												<%=strNickname %>丛阑 亮酒窍绊 乐绢夸~
											<%												
											}else if(attentionPoint>=20 && attentionPoint<=23){
											%>
												<%=strNickname %>丛俊霸 包缴捞 乐绢夸~
											<%
											}else{
											
												for(int i=0;i<attentionPoint/4;i++){
											%>
											<%
												}
												if(attentionPoint%4>=2){
											%>
											<% 
												}
											}
											%></font></td>
										</tr>
									</table>
								</td>
								<td width="3"></td>
								<!--郴侩 场-->
							</tr>
							
							<tr>
								<td colspan="4" height="3"></td>
							</tr>
							<!--乞啊 郴侩 矫累-->
							<tr>
								<td width="3"></td>
								<td colspan="2" align="center"><%=strOppNickname%>丛俊 措茄 <font color="#ff6c78">捞秦档 <%=(int)(((float)oppRightCount/(float)questionCount)*100)%>%</font><br>
																							<font color="#909090" size="3">( <%=oppRightCount%>俺 巩力 沥翠 / 醚 <%=questionCount%>俺 巩力 钱捞 )</font></td>
								<td width="3"></td>
							</tr>
							<tr>
								<td colspan="4" height="3"></td>
							</tr>
							<tr>
								<td width="3"></td>
								<td colspan="2" align="center"><%=strOppNickname%>丛苞 唱客狼 <font color="#ff6c78">概莫档 <%=(int)(((float)oppRightCount/(float)oppCount)*100)%>%</font><br>
																							<font color="#909090" size="3">( <%=oppRightCount%>俺 老摹 / 醚 <%=oppCount%>俺 )</font></td>
								<td width="3"></td>
							</tr>
							<!--乞啊 郴侩 矫累-->

							<tr>
								<td colspan="4" height="5"></td>
							</tr>
						</table>
					</td>
					<td width="3"></td>
				</tr>
				<tr>
					<td width="3"></td>
					<td align="right"><font color="#c789ff" size="3"><a href="<%=url_path%>/soulmate/QuizListView_zp.jsp?mphone=<%=mphone%>&gphone=<%=mphone %>">傈眉焊扁 (醚<%=answerCount%>疙) ⒑</a></font></td>
					<td width="3"></td>
				</tr>
				<%}else if(answerCount ==0 ){ %>
				<tr>
					<td colspan="3">
						<table width="240" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="7"></td>
								<td align="left"><font color="#909090">弥辟俊 巩力甫 钱绢夯 模备甸捞 绝绢夸.</font></td>
								<td width="7"></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="3" height="7"></td>
				</tr>
				<tr>
					<td width="3"></td>
					<td align="right"><font color="#c789ff" size="3"><a href="<%=url_path%>/soulmate/QuizListView_zp.jsp?mphone=<%=mphone%>&gphone=<%=mphone %>">傈眉焊扁 (醚<%=answerCount%>疙) ⒑</a></font></td>
					<td width="3"></td>
				</tr>
				<%} %>
				<!--唱俊 措茄 巩力甫 钱绢夯 模备甸 郴侩 场-->
			</table>
		</td>
	</tr>
	<!--唱俊 措茄 巩力甫 钱绢夯 模备甸 冠胶 场-->

	<tr>
		<td height="3"></td>
	</tr>

	<!--公霸鸥 局沥 包府 冠胶 矫累-->
	<tr>
		<td >
			<table width="240" border="0" cellspacing="0" cellpadding="0">
				<!--鸥捞撇 矫累-->
				<tr>
					<td width="3"></td>
					<td height="19"><font color="#c789ff"><b>♂</b></font><font color="#7c7c7c"><b> 公霸鸥 局沥 包府!</b></font></td>
					<td width="3"></td>
				</tr>

				<!--备盒急 矫累-->
				<tr>

⌨️ 快捷键说明

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