📄 ranking_mypeopleranking.jsp
字号:
<%@ 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="../makeKOR.jsp"%>
<%!
public static String isNull(String str)
{
if (str == null)
return "";
else
return str;
}
%>
<% //4焙 荤侩窃.
// 橇肺配鸥涝. 牢拱 辆钦珐欧捞促.. my牢拱珐欧, 惑措规牢拱珐欧
// 珐欧八祸_牢拱珐欧_qvga.bmp , my珐欧_牢拱珐欧_qvga.bmp 0607
response.setHeader("cache-control","no-cache");
response.setHeader("expires","0");
response.setHeader("pragma","no-cache");
Connection con = null;
PreparedStatement pstmt=null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageset = null;
//String imageUrl=img_path+"images";
String mphone = request.getParameter("mphone");
String gphone = request.getParameter("gphone");//抗寇利栏肺 vm俊辑 逞绢棵锭 mphone阑 持绢霖促. 捞 其捞瘤俊辑父 弊犯促.
String subto = makeKOR(request.getParameter("subto"));
String query1=null, query2=null, sql=null, goUserHome = null;
String phonenum=null, nickname=null;
String strDel=null, strShow=null;
String boardname=null;
String myNickname=null;
int gamerank_idx=0, gamerank_score=0, myScore=0, myRank=0;
String game_title=null;
int game_idx=0; //霸烙 绊蜡锅龋
// 其捞瘤 备泅 眠啊 函荐
int pagesize = 4; // 茄其捞瘤寸 10俺 免仿拱
// 傈开 函荐肺 急攫.. 其捞瘤 备泅 何盒俊 犁荤侩
int pageNUM=1; // 其捞瘤 锅龋
int pagecount=1 ; // 其捞瘤 肮荐 瘤沥 函荐
int absolutepage=1; //例措 困摹 其捞瘤 锅龋
int dbcount=0 ; // DB 救俊 臂 肮荐 历厘 函荐
int isNoPage = 0; //茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
int rankCnt =1; //珐欧鉴困 1,2,3困
int isMember = 0;//雀盔, 厚雀盔 敲贰弊
//朝楼 包访
Timestamp di_date=null;
Date today = new Date();
SimpleDateFormat timeform;
timeform = new SimpleDateFormat("yy斥/mm岿/dd老");
int[] rankScore = new int[4];//阿 盒具喊 痢荐甫 规巩,模备,瘩臂,老扁
int[] rankSunwi = new int[4];//阿 盒具喊 殿荐 规巩,模备,瘩臂,老扁
String tphone="";
int isMe = 1;
if(mphone.equals(gphone))
{
isMe = 1;//唱促.
tphone = mphone;
}
else
{
isMe = 0;//促弗荤恩捞促.
tphone = gphone;
}
String goMoblog = url_path+"/mypage/my_confirm.jsp?mphone="+mphone+"&gphone="+gphone;
String link2=url_path+"/ranking/ranking_main.jsp?mphone="+mphone+"&gphone="+mphone;//鸥款珐欧啪 栏肺
%>
<%
try
{
//=========================== 傍烹函券累诀 : 2008-01-21 ===========================
/**
* 公丰霸烙鸥款 矫胶袍痢八 棺 喉发蜡历 八免
*
* @ date ?8-01-21
* @ version 1.2.0
*/
String SYSTEM_PARAMETER_SET = "?mphone="+request.getParameter("mphone")+"&gphone="+request.getParameter("mphone");
String SYSTEM_PHONE_NUMBER = request.getParameter("mphone");
// 矫胶袍 痢八 眉农
//
if(IS_SYSTEM_CHECK)
{
if( ! IS_TESTER_MODE )
{
response.sendRedirect(url_path+"/system_notice.jsp"+SYSTEM_PARAMETER_SET);
return;
}
}
// DB 楷搬捞 登瘤 臼阑 锭, 救郴芒栏肺 捞悼
//
con = DBConnector.getConnection(db_name);
if( con == null )
{
response.sendRedirect(url_path+"/system_notice2.jsp"+SYSTEM_PARAMETER_SET);
return;
}
// 矫胶袍痢八 吝捞咯档 抛胶磐绰 荤侩啊瓷
//
if( IS_TESTER_MODE )
{
boolean isTester = DBConnector.chkTester( con, SYSTEM_PHONE_NUMBER );
if( ! isTester )
{
response.sendRedirect(url_path+"/system_notice.jsp"+SYSTEM_PARAMETER_SET);
return;
}
}
// 喉发蜡历牢瘤 眉农,
//
boolean isBlackUser = DBConnector.chkBlackList( con, SYSTEM_PHONE_NUMBER );
if( isBlackUser )
{
response.sendRedirect(url_path+"/bad_member.jsp"+SYSTEM_PARAMETER_SET);
return;
}
//=========================== 傍烹函券累诀 : 2008-01-21 ===========================
stmt = con.createStatement();
int stopFlag = 1;
String myRankPhone="";
//喊疙
sql = "select nickname from GT_user_info where phonenum="+tphone;
rs=stmt.executeQuery(sql);
if(rs.next())
{
isMember = 1;
myNickname = rs.getString(1);
}
else//厚雀盔捞促. 绝促.
{
myNickname = "厚雀盔";
response.sendRedirect(url_path+"/user_info/regist_notice.jsp?mphone="+mphone+"&gphone="+mphone);
}
//规巩炉 鉴困 备窍扁-----------------------------------------------------------------------------
sql = "SELECT ranker_guest FROM GT_ranker WHERE phonenum = ? ";
pstmt = con.prepareStatement(sql);
pstmt.setString(1,tphone);
rs = pstmt.executeQuery();
if(rs.next())
{
rankScore[0] = rs.getInt(1);
}
sql = "SELECT phonenum FROM GT_ranker WHERE ranker_guest >= ? order by ranker_guest desc, ranker_idx asc";
pstmt = con.prepareStatement(sql);
pstmt.setInt(1,rankScore[0]);
rs = pstmt.executeQuery();
stopFlag = 1;
myRankPhone="";
while(stopFlag==1)
{
if(rs.next())//饭内靛啊 粮犁茄促.
{
myRankPhone = rs.getString(1);
if(myRankPhone.equals(tphone))
{
stopFlag=0;
}
rankSunwi[0]++;
}
else //饭内靛啊 粮犁窍瘤 臼绰促. 郴啊 1困促.
{
rankSunwi[0]=1;
stopFlag=0;
}
}
//模备炉 鉴困 备窍扁----------------------------------------------------------------------------
sql = "SELECT ranker_friend_cnt FROM GT_ranker WHERE phonenum = ?";
pstmt = con.prepareStatement(sql);
pstmt.setString(1,tphone);
rs = pstmt.executeQuery();
if(rs.next())
{
rankScore[1] = rs.getInt(1);
}
sql = "SELECT phonenum FROM GT_ranker WHERE ranker_friend_cnt >= ? order by ranker_friend_cnt desc, ranker_idx asc";
pstmt = con.prepareStatement(sql);
pstmt.setInt(1,rankScore[1]);
rs = pstmt.executeQuery();
stopFlag = 1;
myRankPhone="";
while(stopFlag==1)
{
if(rs.next())//饭内靛啊 粮犁茄促.
{
myRankPhone = rs.getString(1);
if(myRankPhone.equals(tphone))
{
stopFlag=0;
}
rankSunwi[1]++;
}
else //饭内靛啊 粮犁窍瘤 臼绰促. 郴啊 1困促.
{
rankSunwi[1]=1;
stopFlag=0;
}
}
//瘩臂炉 鉴困 备窍扁-----------------------------------------------------------------------------
sql = "SELECT ranker_reply FROM GT_ranker WHERE phonenum = ?";
pstmt = con.prepareStatement(sql);
pstmt.setString(1,tphone);
rs = pstmt.executeQuery();
if(rs.next())
{
rankScore[2] = rs.getInt(1);
}
sql = "SELECT phonenum FROM GT_ranker WHERE ranker_reply >= ? order by ranker_reply desc, ranker_idx asc";
pstmt = con.prepareStatement(sql);
pstmt.setInt(1,rankScore[2]);
rs = pstmt.executeQuery();
stopFlag = 1;
myRankPhone="";
while(stopFlag==1)
{
if(rs.next())//饭内靛啊 粮犁茄促.
{
myRankPhone = rs.getString(1);
if(myRankPhone.equals(tphone))
{
stopFlag=0;
}
rankSunwi[2]++;
}
else //饭内靛啊 粮犁窍瘤 臼绰促. 郴啊 1困促.
{
rankSunwi[2]=1;
stopFlag=0;
}
}
//老扁炉 鉴困 备窍扁-----------------------------------------------------------------------------
sql = "SELECT ranker_diary FROM GT_ranker WHERE phonenum = ?";
pstmt = con.prepareStatement(sql);
pstmt.setString(1,tphone);
rs = pstmt.executeQuery();
if(rs.next())
{
rankScore[3] = rs.getInt(1);
}
sql = "SELECT phonenum FROM GT_ranker WHERE ranker_diary >= ? order by ranker_diary desc, ranker_idx asc";
pstmt = con.prepareStatement(sql);
pstmt.setInt(1,rankScore[3]);
rs = pstmt.executeQuery();
stopFlag = 1;
myRankPhone="";
while(stopFlag==1)
{
if(rs.next())//饭内靛啊 粮犁茄促.
{
myRankPhone = rs.getString(1);
if(myRankPhone.equals(tphone))
{
stopFlag=0;
}
rankSunwi[3]++;
}
else //饭内靛啊 粮犁窍瘤 臼绰促. 郴啊 1困促.
{
rankSunwi[3]=1;
stopFlag=0;
}
}
if(rs != null) rs.close();
if(stmt != null) stmt.close();
if(con != null) con.close();
}
catch (Exception e)
{
out.println(e);
}
finally
{
if(rs != null) try{rs.close();}catch(Exception se){}
if(pageset != null) try{pageset.close();}catch(Exception se){}
if(pstmt != null) try{pstmt.close();}catch(Exception es){}
if(stmt != null) try{stmt.close();}catch(Exception es){}
if(con != null) try{con.close();}catch(Exception es){}
}
%>
<html>
<head>
</head>
<body>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<!-- 惑窜 官 -->
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="<%=img_path%>images/202img/202_bar/red.png" width="176" height="19"><font color="#ffffff"><%=myNickname%>丛狼 珐欧</font></td>
</tr>
</table>
<!-- 惑窜 官 场 -->
</td>
</tr>
<tr>
<td height="8"></td>
</tr>
<tr>
<td align="center"><font color="#909090">墨抛绊府甫<br>急琶窍矫搁 弊 墨抛绊府狼 珐欧阑<br>焊角 荐 乐绢夸~</font></td>
</tr>
<tr>
<td height="3"></td>
</tr>
<tr>
<td width="176">
<form name="form" method="post" action="<%=url_path%>/ranking/ranking_subto.jsp">
<input type="hidden" name="mphone" value="<%=mphone%>">
<input type="hidden" name="gphone" value="<%=gphone%>">
<input type="hidden" name="searchTo" value="0">
<table width="176" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="35"></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -