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

📄 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");

	/*------------------------------------------------------------------------------------------------------
	+	傈开 函荐
	-------------------------------------------------------------------------------------------------------*/
	String		sql					= null;
	String		strNickname			= null;
	String		strOppNickname		= null;
	String		strGuestNickName	= null;
	String		strGuestNickNameOne	= null;
	String		strGuestNickNameTwo	= null;
	String		regDate				= null;
	String		text				= null;
	String taroId = "";
	String taro_idx = "";
	String taro_card_idx = "";
	String taro_phonenum = "";
	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;
	String      loveGuestPhone          = "";
	String      loveGuestPhoneOne          = "";
	String      loveGuestPhoneTwo          = "";
	
	
	
	/*------------------------------------------------------------------------------------------------------
	+	DB 包访 函荐
	-------------------------------------------------------------------------------------------------------*/
	Connection				con		= null;
	PreparedStatement		pstmt	= null;
	Statement				stmt	= null;
	ResultSet				rs		= null;
	ResultSet				rsrs1   = null;
	
	try
	{
	
	
	
	/*------------------------------------------------------------------------------------------------
	 *		DB 目池记
	 -------------------------------------------------------------------------------------------------*/
	%><%@ include file="../getConnection.jsp"%><%
	/*------------------------------------------------------------------------------------------------
	 *		All Quiz answerCount
	 -------------------------------------------------------------------------------------------------*/

	sql = " select count(distinct(guest_phone)) answerCount  from GT_LUCKY_QUIZ_MYLOG  WITH (READUNCOMMITTED) 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  WITH (READUNCOMMITTED) 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  WITH (READUNCOMMITTED)  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  WITH (READUNCOMMITTED),gt_lucky_quiz b  WITH (READUNCOMMITTED),gt_lucky_quiz_mylog c  WITH (READUNCOMMITTED) ";
	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  WITH (READUNCOMMITTED) 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  WITH (READUNCOMMITTED)where a.phonenum ="+Long.parseLong(mphone)+" and a.guest_phone =" ; 

	sql = sql + "(select top 1 guest_phone from GT_LUCKY_QUIZ_MYLOG  WITH (READUNCOMMITTED) 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+1) age,attention_point ";
	sql = sql+" from Gt_user_info a WITH (READUNCOMMITTED), gt_lucky_attention_point b  WITH (READUNCOMMITTED) 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 WITH (READUNCOMMITTED) 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  WITH (READUNCOMMITTED)  WHERE   phonenum=" ; 

	sql = sql + "(select top 1 guest_phone from GT_LUCKY_QUIZ_MYLOG WITH (READUNCOMMITTED)  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();
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<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 colspan="3">
						<table width="240" bgcolor="#eeeeee" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td colspan="5" height="3"></td>
							</tr>
							<tr>
								<td width="3"></td>
								<td width="18">
									<%if(sex ==1) { %> 
										<img src="<%=img_path%>images/soulmate/icon_01.png">
									<%}else{ %>
										<img src="<%=img_path%>images/soulmate/m.png">
									 <%}%>
								</td>
								<td><font color="#545454"><b><a href="<%=url_path+"/soulmate/QuizView_zp.jsp?mphone="+mphone+"&gphone="+strGuestphone%>"><%=strOppNickname%></a></b></font>&nbsp;
									<font color="#c085ed" size="3"><%if(sex == 1){ %>
									(咯己 <%=age%>技)
									<%}else{ %>
									(巢己 <%=age%>技)
									<%} %>
									</font></td>
								<td width="65" align="right"><font color="#909090" size="3"></font></td>
								<td width="7"></td>
							</tr>
							<tr>
								<td colspan="5" height="3"></td>
							</tr>

							<!--概莫 郴侩 矫累-->
							<tr>
								<td colspan="5">
									<table width="240" bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td colspan="3" height="3"></td>
										</tr>
										<tr>
											<td width="15"></td>
											<td width="210"><font color="#ff6b94" size="3"><%=strOppNickname%>丛俊 措茄 包缴档</font>&nbsp;
												<font color="#ff6b94"><%
												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><br>
												<font color="#7b7b7b"><%=strOppNickname%>丛俊 措茄</font>&nbsp;<font color="#9819e9">捞秦档 
												<%int kkk;if((int)(((float)oppRightCount/(float)questionCount)*100)>100){kkk = 100;}else{kkk = (int)(((float)oppRightCount/(float)questionCount)*100);} %>
												<%=kkk%>%</font><br>
												<font color="#ababab" size="3">( <%=oppRightCount%>俺 巩力 沥翠 / 醚 <%=questionCount%>俺 巩力 钱捞 )</font><br>
												<font color="#7b7b7b"><%=strOppNickname%>丛苞 唱客狼</font>&nbsp;<font color="#9819e9">概莫档 
												<%int jjj; if((int)(((float)oppRightCount/(float)oppCount)*100)>100){jjj=100;}else{jjj = (int)(((float)oppRightCount/(float)oppCount)*100);} %>
												<%=(int)(((float)oppRightCount/(float)oppCount)*100)%>%</font><br>
												<font color="#ababab" size="3">( <%=oppRightCount%>俺 老摹 / 醚 <%=oppCount%>俺 )</font>
											</td>
											<td width="15"></td>
										</tr>
										<tr>
											<td colspan="3" height="3"></td>
										</tr>
									</table>
								</td>
							</tr>
							<!--概莫 郴侩 场-->
						</table>
					</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>&nbsp;</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>&nbsp;</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>
					<td width="3"></td>
					<td height="2" bgcolor="#ecaaff"></td>
					<td width="3"></td>
				</tr>

⌨️ 快捷键说明

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