📄 gamecoupleselect.jsp.svn-base
字号:
<!--------------------------------------------------------
* @ 权 > 霸烙鸥款 > 目敲霸烙>娄茫扁
* @ Author : 弥眠岿 (2008-5-22)
* @ Images : 其捞瘤 救俊 甸绢啊绰 捞固瘤
----------------------------------------------------------->
<%@ page import='java.io.*,java.text.*,java.util.*,java.util.Vector, java.sql.*, com.entaz.lib.db.*, com.entaz.relay.net.*' contentType='text/html;charset=euc-kr'%>
<jsp:directive.page import="java.net.URLDecoder"/>
<%@ include file="../imgpath.jsp"%>
<%@ include file="../common_func.jsp"%>
<%@ include file="../makeKOR.jsp"%>
<%
/***********************************************************************
@ Page Description
目敲霸烙 娄茫扁 其捞瘤
@ Parameter
***********************************************************************/
/*------------------------------------------------------------------------------------------------------
+ 扁夯 颇扼固磐
-------------------------------------------------------------------------------------------------------*/
String mphone= request.getParameter("mphone");
long mmphone = Long.parseLong(mphone);
String gphone= request.getParameter("gphone");
int game_idx=1;
String gamePlayType = null;
if(request.getParameter("gamePlayType")!=null) gamePlayType=request.getParameter("gamePlayType"); else gamePlayType="1";
if(request.getParameter("game_idx")!=null) game_idx=Integer.parseInt(request.getParameter("game_idx"));
String name1=request.getParameter("name1");
String game_title = "";
if(null != request.getParameter("game_title")){
game_title = java.net.URLDecoder.decode(makeKOR(request.getParameter("game_title")));
}
/*------------------------------------------------------------------------------------------------------
+ 傈开 函荐
-------------------------------------------------------------------------------------------------------*/
int sex = -1;
int idx = 1;
int nidx = -1;
String nickname = "";
String rgstrNickName[] = null;
int rgiScore[] = null;
String rgstrPhonenum[] =null;
String pageurl = null;
// 其捞瘤 备泅 眠啊 函荐
int pagesize = 5; // 茄其捞瘤寸 10俺 免仿拱
// 傈开 函荐肺 急攫.. 其捞瘤 备泅 何盒俊 犁荤侩
int pageNUM=1; // 其捞瘤 锅龋
int pagecount=1 ; // 其捞瘤 肮荐 瘤沥 函荐
int absolutepage=1; // 例措 困摹 其捞瘤 锅龋
int num = 0; // DB 救俊 臂 肮荐 历厘 函荐
int isNoPage = 0; //茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
/*------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
-------------------------------------------------------------------------------------------------------*/
PreparedStatement pstmt = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageRs = null;
String query1 = null;
String query2 = null;
if(!gphone.equals(mphone)){
response.sendRedirect(url_path+"/ranking/game_start.jsp?mphone="+mphone+"&gphone="+gphone+"&game_idx="+game_idx+"&gamePlayType=1");
}
try
{
/*------------------------------------------------------------------------------------------------
* DB 目池记
-------------------------------------------------------------------------------------------------*/
%><%@ include file="../getConnection.jsp"%><%
/*------------------------------------------------------------------------------------------------
* 目敲霸烙 娄茫扁
-------------------------------------------------------------------------------------------------*/
query1= "select sex, nickname from gt_user_info where phonenum = '"+mphone+"'";
pstmt = con.prepareStatement(query1);
rs = pstmt.executeQuery();
if(rs.next())
{
sex = rs.getInt("sex");
nickname = rs.getString("nickname");
}
rs.close();
pstmt.close();
if(sex != -1)
{
if(sex == 1)
{
sex = 2;
}
else
{
sex = 1;
}
}
query2 ="select count(a.nickname) as num from gt_gamerank_"+game_idx+" a inner join gt_user_info b on convert(bigint,a.phonenum)=convert(bigint,b.phonenum)"+
" and b.sex=?";
if(name1!=null)
{
query2=query2 +" and a.nickname like '%'+?+'%'";
}
pstmt = con.prepareStatement(query2);
pstmt.setInt(1,sex);
if(name1!=null)
{
pstmt.setString(2,name1);
}
rs = pstmt.executeQuery();
if(rs.next())
{
num = rs.getInt("num");
}
rs.close();
pstmt.close();
if(num%pagesize == 0)
pagecount = num/(pagesize); // 醚 其捞瘤荐 备窍扁
else
pagecount = num/(pagesize)+1; // 醚 其捞瘤荐 备窍扁
if(request.getParameter("pageNUM")!=null)
{
pageNUM=Integer.parseInt(request.getParameter("pageNUM"));//瘤沥等 其捞瘤 焊咯林扁
absolutepage=(pageNUM-1)*pagesize+1;
}
rgstrNickName = new String[num];
rgiScore = new int[num];
rgstrPhonenum = new String[num];
query1="select a.nickname nickname,a.gamerank_score gamerank_score, a.phonenum phonenum from gt_gamerank_"+game_idx+
" a inner join gt_user_info b on convert(bigint,a.phonenum)=convert(bigint,b.phonenum)"+ " and b.sex=?";
if(name1!=null)
{
query1=query1 +" and a.nickname like '%'+?+'%'";
}
query1=query1+" order by a.gamerank_score" ;
pstmt = con.prepareStatement(query1);
pstmt.setInt(1,sex);
if(name1!=null)
{
pstmt.setString(2,name1);
}
pageRs = pstmt.executeQuery();
if(!pageRs.next()) // 蔼捞 绝阑锭
{
isNoPage = 1;
pagesize=0;
}
else // 蔼捞 乐阑锭 //rs.absolute(absolutepage);
{
for(int s=0; s<absolutepage-1; s++)
pageRs.next();
}
%>
<html>
<head>
<link href="../mobile.css" rel="stylesheet" type="text/css">
<title>目敲霸烙 - 娄茫扁</title>
</head>
<body>
<!--剧侥
<tr>
<td>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
-->
<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="#a8bfff"></td>
</tr>
<tr>
<td width="6" height="14" bgcolor="#6a76f2"></td>
<td height="14" bgcolor="#6a76f2"><font color="#ffffff">目敲霸烙 - 娄茫扁</font></td>
</tr>
<tr>
<td colspan="2" height="2" bgcolor="#a8bfff"></td>
</tr>
<tr>
<td colspan="2" height="1" bgcolor="#6a76f2"></td>
</tr>
</table>
</td>
</tr>
<!--鸥捞撇 场-->
<!--咯归 矫累-->
<tr>
<td height="5"></td>
</tr>
<!--咯归 场-->
<!--膏飘 矫累-->
<tr>
<td align="center">
<font color="#7488fe">目敲 霸烙篮 滴 荤恩捞 娄阑<br>
捞风霸 邓聪促. 笛狼 痢荐客 捞秦档甫<br>
钦魂窍咯 目敲珐欧俊 殿废钦聪促.</font>
</td>
</tr>
<!--膏飘 场-->
<!--咯归 矫累-->
<tr>
<td height="5"></td>
</tr>
<!--咯归 场-->
<!--辑宏 鸥捞撇 官 矫累-->
<tr>
<td height="16">
<table width="176" bgcolor="#a8bfff" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3"></td>
<td height="16" align="left"><font color="#ffffff">+ 窃膊且 寸脚狼 娄阑 茫酒焊技夸.</font></td>
<td width="3"></td>
</tr>
</table>
</td>
</tr>
<!--辑宏 鸥捞撇 官 场-->
<!--咯归 矫累-->
<tr>
<td height="3"></td>
</tr>
<!--咯归 场-->
<tr>
<td>
<!--捞傈/促澜 傅农 冠胶 矫累-->
<table width="176" bgcolor="#e5ecff" border="0" cellspacing="0" cellpadding="0">
<tr height="16">
<td bgcolor="#FFe0e4" align="center">
<%
pageurl=url_path+"/ranking/GameCoupleSelect.jsp?mphone="+mphone+"&gphone="+gphone+"&game_idx="+game_idx+"&gamePlayType="+gamePlayType+"&name1="+name1;
out.println(pagePath(pageurl, num, pageNUM, pagecount));
%>
</td>
</tr>
</table>
<!--捞傈/促澜 傅农 冠胶 场-->
</td>
</tr>
<%
int count = 0 ; //其捞瘤 墨款磐 函荐
while(count<pagesize)
{
count++;
String name=pageRs.getString(1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -