📄 soulmate_zp.jsp.svn-base
字号:
<!--------------------------------------------------------------------------------------------------------------
*@霸烙皋牢
*@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 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();
%>
<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>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<!--鸥捞撇 矫累-->
<tr>
<td>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="2" bgcolor="#c789ff"></td>
</tr>
<tr>
<td width="6" height="14" bgcolor="#9819e9"></td>
<td height="14" 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="4"></td>
</tr>
<!--咯归 场-->
<!--唱俊 措茄 巩力甫 钱绢夯 模备甸 冠胶 矫累-->
<tr>
<td>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<!--鸥捞撇 矫累-->
<tr>
<td width="3"></td>
<td height="17">
<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="176" bgcolor="#eeeeee" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="3"></td>
</tr>
<tr>
<td width="15">
<%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>
<font color="#c085ed">
<%
if (sex == 1) {
%> 咯己 <%=age%>技 <%
} else {
%> 巢己 <%=age%>技 <%
}
%>
</font>
</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -