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

📄 quizlistview_zp.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
📖 第 1 页 / 共 2 页
字号:
		questionCount = rs2.getInt("questionCount");
	}else{
		questionCount = 0;
	}

	/*------------------------------------------------------------------------------------------------
	 *		Quiz opponent's Right answercount
	 -------------------------------------------------------------------------------------------------*/

	String sql3 = " select count(*) oppRightCount from gt_lucky_quiz_mylog a,gt_lucky_quiz b,gt_lucky_quiz_mylog c ";
	sql3 = sql3 + "where   a.quiz_idx = b.idx and b.flag=1 and a.quiz_idx=c.quiz_idx and a.answer = c.answer ";
	sql3 = sql3 + "and a.phonenum = "+Long.parseLong(mphone)+" and a.guest_phone ="+Long.parseLong(mphone);
	sql3 = sql3 + "and c.phonenum = "+Long.parseLong(mphone)+" and c.guest_phone ="+Long.parseLong(guestPhone) ; 
	
	pstmt = con.prepareStatement(sql3);
	
	rs3 = pstmt.executeQuery();
		 
	if( rs3.next() )
	{
		oppRightCount = rs3.getInt("oppRightCount");
	}else{
		oppCount = 0;
	}

	/*------------------------------------------------------------------------------------------------
	 *		Quiz opponent's answercount
	 -------------------------------------------------------------------------------------------------*/

	String sql4 = " select count(distinct a.idx)oppCount from gt_lucky_quiz_mylog a where a.phonenum ="+Long.parseLong(mphone)+" and a.guest_phone ="+Long.parseLong(guestPhone) ; 
	
	pstmt = con.prepareStatement(sql4);
	
	rs4 = pstmt.executeQuery();
		 
	if( rs4.next() )
	{
		oppCount = rs4.getInt("oppCount");
	}else{
		oppCount = 0;
	}

	/*------------------------------------------------------------------------------------------------
	 *		Quiz opponent's attentionPoint
	 -------------------------------------------------------------------------------------------------*/
	String sql5 = " select nickname,sex,(substring(convert(varchar(8),getDate(),112),0,5)-year) age,attention_point "
		+" from Gt_user_info a, gt_lucky_attention_point b where convert(bigint,a.phonenum)=b.phonenum and convert(bigint,a.phonenum)="+Long.parseLong(mphone)+" and b.guest_phone ="+Long.parseLong(guestPhone);
	pstmt = con.prepareStatement(sql5);
	
	rs5 = pstmt.executeQuery();
	if(rs5.next()){
		attentionPoint = rs5.getInt("attention_point");
	}

	/*------------------------------------------------------------------------------------------------
	 *		Quiz opponent's Info
	 -------------------------------------------------------------------------------------------------*/

	String sql6 = " select  nickname,sex,year,(substring(convert(varchar(8),getDate(),112),0,5)-year+1) age ,phonenum from GT_User_Info  WHERE   convert(bigint,phonenum)="+Long.parseLong(guestPhone) ; 
	
	pstmt = con.prepareStatement(sql6);
	
	rs6 = pstmt.executeQuery();
	
	if( rs6.next() )
	{
		strOppNickname = rs6.getString("nickname");
		sex = rs6.getInt("sex");
		age = rs6.getInt("age");
		strGuestphone = rs6.getString("phonenum");
	}else{
		strOppNickname = "绝澜";
		sex = 1;
		age = 0;
		strGuestphone = "";
	}
	 %>
	<!--咯归 矫累-->
	<tr>
		<td height="3"></td>
	</tr>
	<!--咯归 场--> 
	
	<!--府胶飘 冠胶1 矫累-->
	<tr>
		<td >
			<table width="240" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="3" height="3"></td>
				</tr>
				<!--鸥捞撇 场-->

				<!--唱俊 措茄 巩力甫 钱绢夯 模备甸  郴侩 矫累-->
				<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><a href="<%=url_path+"/soulmate/QuizView_zp.jsp?mphone="+mphone+"&gphone="+strGuestphone%>"><%=strOppNickname%>丛</b></td>
											<td valign="top"><font color="#909090"><%=regdate%></font></td>
										</tr>
										<tr>
											<td width="5"></td>
											<td colspan="2"><font color="#909090">
											<%if(sex == 1){ %>
											咯己 (<%=age%>技)
											<%}else{ %>
											巢己 (<%=age%>技)
											<%} %>
											</font><br>
																			 <font color="#909090">包缴档 </font><font color="#ffa6d6"><%
											if(attentionPoint>=24){
											%>
												<%=strOppNickname %>丛阑 亮酒窍绊 乐绢夸~
											<%												
											}else if(attentionPoint>=20 && attentionPoint<=23){
											%>
												<%=strOppNickname %>丛俊霸 包缴捞 乐绢夸~
											<%
											}else{
											
												for(int j=0;j<attentionPoint/4;j++){
											%>
											<%
												}
												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>
							<!--备盒急 矫累-->
							<tr>
								<td width="3"></td>
								<td colspan="2" height="1" bgcolor="#d5d1be"></td>
								<td width="3"></td>
							</tr>
							<!--备盒急 场-->
						</table>
					</td>
					<td width="3"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--府胶飘 冠胶1 场-->
	<%
			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%>&queryCondition=<%=queryCondition%>"><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%>&queryCondition=<%=queryCondition%>"><font color="#DB1A00"><%=i%></font></a>&nbsp;
    <% }
	   if(i >= pagecount) break;
	 }
   }
   else
	  out.println("钎矫 且 郴侩捞 绝嚼聪促.");
   //[促澜] 傅农 眠啊
   if((startPage+limit)<=pagecount){ %>
	<a href="<%=pageurl%>&pageNUM=<%=(startPage+limit)%>&queryCondition=<%=queryCondition%>"><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>
<!--咯归 场--> 

<!--窍窜 版肺钎矫 矫累-->
	<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="<%=url_path+"/main.jsp?mphone="+mphone+"&gphone="+mphone%>">权</a>&gt;<a href="<%=url_path%>/mypage/my_confirm.jsp?mphone=<%=mphone%>&gphone=0<%=mphone%>"><%=strNickname%>丛狼 迄乔</a>&gt;<a href="<%=url_path%>/soulmate/Soulmate_zp.jsp?mphone=<%=mphone%>&gphone=<%=mphone %>">家匡皋捞飘</a>&gt;龙巩措翠</td>
					<td width="10" bgcolor="#BBC7C8"></td>
				</tr>
			</table>
		</td>
	</tr>
<!--窍窜 版肺钎矫 场-->

</table>
<!--窍窜 版肺钎矫 矫累-->
	<%@ include file="../newbottom.jsp"%>
<!--窍窜 版肺钎矫 场-->
</body>
</html>
<%
		}
	catch(Exception e)
	{
		throw e;
	}
	finally
	{ 
		if ( rs != null ) { try { rs.close(); } catch ( Exception e ) { } }
		if ( stmt != null ) { try { stmt.close(); } catch ( Exception e ) { } }
		if ( con != null ) { try { con.close(); } catch ( Exception e ) { } }
	}
%>

⌨️ 快捷键说明

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