📄 quizlistview_zp.jsp.svn-base
字号:
String sql2 = " 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(sql2);
rs2 = pstmt.executeQuery();
if( rs2.next() )
{
questionCount = rs2.getInt("questionCount");
}else{
questionCount = 0;
}
/*------------------------------------------------------------------------------------------------
* Quiz opponent's Right answercount
-------------------------------------------------------------------------------------------------*/
String sql3 = " select count(*) oppRightCount from gt_lucky_quiz_mylog a WITH (READUNCOMMITTED),gt_lucky_quiz b WITH (READUNCOMMITTED),gt_lucky_quiz_mylog c WITH (READUNCOMMITTED) ";
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 WITH (READUNCOMMITTED) 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 WITH (READUNCOMMITTED), gt_lucky_attention_point b WITH (READUNCOMMITTED) 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 WITH (READUNCOMMITTED) 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>
<!--咯归 场-->
<tr>
<td>
<table width="176" bgcolor="#eeeeee" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="2"></td>
</tr>
<tr>
<td width="15" height="15">
<%if(sex ==1) { %>
<img src="<%=img_path%>images/soulmate/icon_01.png">
<%}else{ %>
<img src="<%=img_path%>images/soulmate/m.png">
<%}%>
</td>
<td width="150"><font color="#545454"><b><a href="<%=url_path+"/soulmate/QuizView_zp.jsp?mphone="+mphone+"&gphone="+strGuestphone%>"><%=strOppNickname%>丛</a></b></font>
<font color="#c085ed"><%if(sex == 1){ %>
咯己 <%=age%>技
<%}else{ %>
巢己 <%=age%>技
<%} %>
</font></td>
</tr>
<tr>
<td width="15"></td>
<td><font color="#909090"><%=regdate.substring(0,regdate.indexOf(" "))%></font></td>
</tr>
<tr>
<td colspan="2" height="3"></td>
</tr>
<!--概莫 郴侩 矫累-->
<tr>
<td colspan="2">
<table width="176" bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="3"></td>
</tr>
<tr>
<td width="15"></td>
<td><font color="#ff6b94">包缴档</font> <font color="#ff6b94" size="5"><%
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><br>
<font color="#7b7b7b"><%=strOppNickname%>丛俊 措茄</font><br>
<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">(<%=oppRightCount%>俺 巩力 沥翠 / 醚 <%=questionCount%>俺 巩力 钱捞)</font>
<font color="#7b7b7b"><%=strOppNickname%>丛苞 唱客狼</font><br>
<font color="#9819e9">概莫档
<%int jjj;if((int)(((float)oppRightCount/(float)oppCount)*100)>100){jjj=100;}else{jjj=(int)(((float)oppRightCount/(float)oppCount)*100);} %>
<%=jjj%>%
</font><br>
<font color="#ababab">( <%=oppRightCount%>俺 老摹 / 醚 <%=oppCount%>俺 )</font>
</td>
</tr>
<tr>
<td colspan="2" height="9"></td>
</tr>
</table>
</td>
</tr>
<!--概莫 郴侩 场-->
</table>
</td>
</tr>
<%
if(rs.isLast())
{ //盖 付瘤阜 饭内靛 老版快
break;
}
else
{
rs.next();
}
}
%>
<tr>
<td>
<!--其捞瘤 傅农 矫累-->
<table width="176" height="16" bgcolor="#e8f2f2" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="16" 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>
<%}
//其捞瘤 锅龋 唱凯窍扁
if(isNoPage == 0)
{
for(int i=startPage ; i<(startPage+limit);i++)
{
if( i == pageNUM)
{%>
<font color="#DB1A00"><b><%=i%></b></font>
<% }
else
{ %>
<a href="<%=pageurl%>&pageNUM=<%=i%>&queryCondition=<%=queryCondition%>"><font color="#DB1A00"><%=i%></font></a>
<% }
if(i >= pagecount) break;
}
}
else
out.println("钎矫 且 郴侩捞 绝嚼聪促.");
//[促澜] 傅农 眠啊
if((startPage+limit)<=pagecount){ %>
<a href="<%=pageurl%>&pageNUM=<%=(startPage+limit)%>&queryCondition=<%=queryCondition%>"><font color="#DB1A00">促澜</font></a>
<%}
%>
</td>
</tr>
</table>
<!--其捞瘤 傅农 场-->
</td>
</tr>
<tr>
<td height="5"></td>
</tr>
<!--滚瓢 矫累-->
<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="<%=url_path%>/soulmate/MySoulmate.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="176" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10" bgcolor="#BBC7C8"></td>
<td width="156" bgcolor="#DAE6E8" height="15"> <a href="<%=url_path+"/main.jsp?mphone="+mphone+"&gphone="+mphone%>">权</a>><a href="<%=url_path%>/mypage/my_confirm.jsp?mphone=<%=mphone%>&gphone=<%=mphone%>"><%=strNickname%>丛狼 迄乔</a></td>
<td width="10" bgcolor="#BBC7C8"></td>
</tr>
<tr>
<td width="10" bgcolor="#BBC7C8"></td>
<td width="156" bgcolor="#DAE6E8" height="15"> ><a href="<%=url_path%>/soulmate/Soulmate_zp.jsp?mphone=<%=mphone%>&gphone=<%=mphone %>">家匡皋捞飘</a>>龙巩措翠</td>
<td width="10" bgcolor="#BBC7C8"></td>
</tr>
</table>
</td>
</tr>
<!--窍窜 版肺钎矫 场-->
</table>
<!--窍窜 版肺钎矫 矫累-->
<%@ include file="../newbottom.jsp"%>
<!--窍窜 版肺钎矫 场-->
</form>
</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 + -