📄 play_gameranking.jsp.svn-base
字号:
<%@ 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"%>
<% //2,3焙
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 mphone = request.getParameter("mphone");
String gphone = request.getParameter("mphone");//抗寇利栏肺 vm俊辑 逞绢棵锭 mphone阑 持绢霖促. 捞 其捞瘤俊辑父 弊犯促.
String query1=null, query2=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 = 3; // 茄其捞瘤寸 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;//雀盔, 厚雀盔 敲贰弊
game_idx = Integer.parseInt(request.getParameter("game_idx"));//柳楼
boardname = "GT_gamerank_"+game_idx; //柳楼
//朝楼 包访
Timestamp di_date=null;
Date today = new Date();
SimpleDateFormat timeform;
timeform = new SimpleDateFormat("yy斥/mm岿/dd老");
//di_date = rs.getTimestamp(3); //朝楼啊廉坷扁
//<%=timeform.format(di_date); //朝楼 谎府扁
int isTop=0; //1困啊 粮犁窍搁 1, 粮犁窍瘤 臼栏搁 0
int topScore = 0;
String topPhone = "";
String topNickname = "";
int isMonthTop=0; //1困啊 粮犁窍搁 1, 粮犁窍瘤 臼栏搁 0
int monthTopScore = 0;
String monthTopPhone = "";
String monthTopNickname = "";
%>
<%
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();
//霸烙 力格 啊廉坷扁
query1 = "select game_title from GT_game where game_idx="+game_idx;
rs = stmt.executeQuery(query1);
if(rs.next())
game_title = rs.getString(1);
//傈眉 1困甫 啊廉柯促.
query1 = "select top 1 phonenum, nickname, gamerank_score from GT_gamerank_"+game_idx+" order by gamerank_score desc , gamerank_date desc";//1困
rs = stmt.executeQuery(query1);
if(rs.next())
{
isTop=1;
topPhone=rs.getString(1);
topNickname=rs.getString(2);
topScore=rs.getInt(3);
}
//捞崔狼 1困甫 啊廉柯促. and MONTH(gamerank_date) = MONTH(GETDATE())
query1 = "select top 1 phonenum, nickname, gamerank_score from GT_gamerank_"+game_idx+" where MONTH(gamerank_date) = MONTH(GETDATE()) order by gamerank_score desc , gamerank_date desc";//1困
rs = stmt.executeQuery(query1);
if(rs.next())
{
isMonthTop=1;
monthTopPhone=rs.getString(1);
monthTopNickname=rs.getString(2);
monthTopScore=rs.getInt(3);
}
//郴 喊疙, 郴痢荐 啊廉柯促.
query1 = "select nickname from GT_user_info where phonenum="+mphone;
rs=stmt.executeQuery(query1);
if(rs.next())
{
isMember = 1;
myNickname = rs.getString(1);
}
else//厚雀盔捞促
{
myNickname = "";
}
if(isMember == 1)//雀盔老 版快促.
{
//郴 痢荐甫 啊廉柯促.
String str2 = "select gamerank_score ";
str2 = str2 + " from "+boardname+" where phonenum="+mphone;
rs = stmt.executeQuery(str2);
if(rs.next())
{
myScore = rs.getInt(1); //痢荐 啊廉柯促.
}
str2 = "select gamerank_idx, phonenum from "+boardname+" where gamerank_score>="+myScore+" order by gamerank_score desc, gamerank_date desc";
rs = stmt.executeQuery(str2);
int stopFlag = 1;
String myRankPhone="";
while(stopFlag==1)
{
if(rs.next())
{
myRankPhone = rs.getString(2);
if(myRankPhone.equals(mphone))
{
stopFlag=0;
}
myRank++;
}
else
{
stopFlag=0;
}
}
if(myRank==0) myRank=1;
}
else//厚雀盔老 版快促. 鉴困绰 绝绊 痢荐父 谎妨霖促.
{
myScore=0;
}
}
catch (Exception e)
{
out.println(e);
}
%>
<html>
<head>
<title>::: 霸烙 - 霸烙珐欧 :::</title>
</head>
<body>
<!--// title //-->
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr height="2">
<td width="8" bgcolor="#C789FF"></td>
<td width="168" bgcolor="#C789FF"></td>
</tr>
<tr height="15">
<td width="7" bgcolor="#9819E9"></td>
<td width="168" bgcolor="#9819E9" align="left" valign="middle">
<font color="#FFFFFF"><%=game_title%></font>
</td>
</tr>
<tr height="2">
<td width="8" bgcolor="#C789FF"></td>
<td width="168" bgcolor="#C789FF" align="left" valign="middle"></td>
</tr>
<tr height="1">
<td width="8" bgcolor="#9819E9"></td>
<td width="168" bgcolor="#9819E9"></td>
</tr>
<tr height="5">
<td width="8"></td>
<td width="168"></td>
</tr>
</table>
<!--// picture frame //-->
<%
if(isTop==1)//粮犁茄促搁..
{
%>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr height="11">
<td width="5"></td>
<td width="20"></td>
<td width="6"></td>
<td width="114" height="16" rowspan="3">
<img src="<%=img_path%>images/202img/202_game/frame_no1.png" width="114" height="26" border="0">
</td>
<td width="6"></td>
<td width="20"></td>
<td width="5"></td>
</tr>
<tr height="2">
<td width="5"></td>
<td width="20" bgcolor="#FFFFA9"></td>
<td width="6" bgcolor="#FFFFA9"></td>
<td width="6" bgcolor="#FFFFA9"></td>
<td width="20" bgcolor="#FFFFA9"></td>
<td width="5"></td>
</tr>
<tr height="13">
<td width="5"></td>
<td width="26" height="26" colspan="2" rowspan="2">
<img src="<%=img_path%>images/202img/202_game/frame_1.png" width="26" height="26" border="0">
</td>
<td width="26" height="26" colspan="2" rowspan="2">
<img src="<%=img_path%>images/202img/202_game/frame_2.png" width="26" height="26" border="0">
</td>
<td width="5"></td>
</tr>
<tr height="13">
<td width="5"></td>
<td width="114" bgcolor="#FFFFA9"></td>
<td width="5"></td>
</tr>
</table>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr height="204">
<td width="5"></td>
<td width="2" bgcolor="#FFFFA9"></td>
<td width="1" bgcolor="#F26522"></td>
<td width="16" bgcolor="#FFFFA9"></td>
<td width="128">
<table width="128" border="0" cellspacing="0" cellpadding="0">
<tr height="203">
<td width="1" bgcolor="#D3E2E5"></td>
<td width="126">
<img src="<%=ava_path%>display_movata.jsp?mphone=<%=topPhone%>" border="0">
</td>
<td width="1" bgcolor="#D3E2E5"></td>
</tr>
<tr height="1">
<td width="1" bgcolor="#D3E2E5"></td>
<td width="126" bgcolor="#D3E2E5"></td>
<td width="1" bgcolor="#D3E2E5"></td>
</tr>
</table>
</td>
<td width="16" bgcolor="#FFFFA9"></td>
<td width="1" bgcolor="#F26522"></td>
<td width="2" bgcolor="#FFFFA9"></td>
<td width="5"></td>
</tr>
<tr height="10">
<td width="5"></td>
<td width="2" bgcolor="#FFFFA9"></td>
<td width="1" bgcolor="#F26522"></td>
<td width="16" bgcolor="#FFFFA9"></td>
<td width="128" bgcolor="#FFFFA9"></td>
<td width="16" bgcolor="#FFFFA9"></td>
<td width="1" bgcolor="#F26522"></td>
<td width="2" bgcolor="#FFFFA9"></td>
<td width="5"></td>
</tr>
<tr height="18">
<td width="5"></td>
<td width="2" bgcolor="#FFFFA9"></td>
<td width="1" bgcolor="#F26522"></td>
<td width="16" bgcolor="#FFFFA9"></td>
<td width="128" bgcolor="#FFFFA9" align="center" valign="middle">
<a href="<%=url_path+"/mypage/my_confirm.jsp?mphone="+mphone+"&gphone="+topPhone%>"><%=topNickname%></a> <font color="#BE0500">丛</font>
</td>
<td width="16" bgcolor="#FFFFA9"></td>
<td width="1" bgcolor="#F26522"></td>
<td width="2" bgcolor="#FFFFA9"></td>
<td width="5"></td>
</tr>
</table>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr height="26">
<td width="5"></td>
<td width="26">
<img src="<%=img_path%>images/202img/202_game/frame_3.png" width="26" height="26" border="0">
</td>
<td width="114" bgcolor="#FFFFA9">
<table width="114" border="0" cellspacing="0" cellpadding="0">
<tr height="18">
<td width="114" bgcolor="#FFFFA9" align="center" valign="middle">
<font color="#FF9100"><%=topScore%></font> <font color="#BE0500">痢</font>
</td>
</tr>
<tr height="5">
<td width="114" bgcolor="#FFFFA9"></td>
</tr>
<tr height="1">
<td width="114" bgcolor="#F26522"></td>
</tr>
<tr height="2">
<td width="114" bgcolor="#FFFFA9"></td>
</tr>
</table>
</td>
<td width="26">
<img src="<%=img_path%>images/202img/202_game/frame_4.png" width="26" height="26" border="0">
</td>
<td width="5"></td>
</tr>
</table>
<!--// top-rankded user on a monthly //-->
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr height="5">
<td width="31"></td>
<td width="114"></td>
<td width="31"></td>
</tr>
<tr height="26">
<td width="31"></td>
<td width="114">
<img src="<%=img_path%>images/202img/202_game/white_monthly.png" width="114" height="26" border="0">
</td>
<td width="31"></td>
</tr>
</table>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr height="2">
<td width="61"></td>
<td width="3"></td>
<td width="48"></td>
<td width="3"></td>
<td width="61"></td>
</tr>
<tr height="3">
<td width="61"></td>
<td width="3" bgcolor="#DAE6E8"></td>
<td width="48" bgcolor="#DAE6E8"></td>
<td width="3" bgcolor="#DAE6E8"></td>
<td width="61"></td>
</tr>
<tr height="54">
<td width="61"></td>
<td width="3" bgcolor="#DAE6E8"></td>
<td width="48">
<img src="<%=ava_path%>display_thumb.jsp?mphone=<%=monthTopPhone%>" width="48" height="54" border="0">
</td>
<td width="3" bgcolor="#DAE6E8"></td>
<td width="61"></td>
</tr>
<tr height="3">
<td width="61"></td>
<td width="3" bgcolor="#DAE6E8"></td>
<td width="48" bgcolor="#DAE6E8"></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -