📄 game_gamename.jsp
字号:
<!--------------------------------------------------------------------------------------------------------------
*@霸烙皋牢>霸烙侵郴侩
*@Author : 冠惑辣(2007-12-23)
*@Images : 其捞瘤 救俊 甸绢啊绰 捞固瘤
1) title_01.png : 霸烙皋牢 鸥捞撇
2) gameicon_5.png : 具荐倔澜柄扁 捞固瘤
--------------------------------------------------------------------------------------------------------------->
<%@ 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"%>
<%
/***********************************************************************
@ Page Description
阿 霸烙 其捞瘤(老馆,目敲,模备)
@ Parameter
***********************************************************************/
/*------------------------------------------------------------------------------------------------------
+ 扁夯 颇扼固磐
-------------------------------------------------------------------------------------------------------*/
String vmtype = request.getParameter("vmtype") == null ? "":request.getParameter("vmtype").substring(0,1);
String vGameTableName = null;
if(vmtype.equals("b")){ vGameTableName = "GT_game_brew"; }else{ vGameTableName = "GT_game_wipi"; }
String mphone = request.getParameter("mphone");
String gphone = request.getParameter("mphone");
String search_field = null;
String orderby_field = null;
String gamePlayType = null;
int ngamePlayType=0;
int game_idx=0;
if(request.getParameter("search_field")!=null) search_field=convKOR(request.getParameter("search_field")); else search_field="";
if(request.getParameter("orderby_field")!=null) orderby_field=request.getParameter("orderby_field"); else orderby_field="game_hit";
if(request.getParameter("gamePlayType")!=null) gamePlayType=request.getParameter("gamePlayType"); else gamePlayType="0";
ngamePlayType = Integer.parseInt(gamePlayType);
if(request.getParameter("game_idx")!=null) game_idx=Integer.parseInt(request.getParameter("game_idx"));
/*------------------------------------------------------------------------------------------------------
+ 傈开 函荐
-------------------------------------------------------------------------------------------------------*/
int adver_idx = 0;
String adver_img = null;
String adver_link = null;
String news_title=null;
String game_title=null;
String game_text=null;
String game_img_path=null;
String game_path=null;
String game_type=null;
int total_count=0;
int rank=0;
String nickname = null;
int sex = 0;
String couplephone = null;
String couplenickname = null;
int friendCnt = 0;
int score = 0;
String friendphone = null;
String friendnickname = null;
/*------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
-------------------------------------------------------------------------------------------------------*/
PreparedStatement pstmt = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
Statement stmt2 = null;
ResultSet rs2 = null;
ResultSet pageset = null;// 其捞瘤 备泅 眠啊 函荐 ---------
String query1 = null;
String query2 = null;
/*------------------------------------------------------------------------------------------------------
+ 其捞瘤 备泅 眠啊 函荐
-------------------------------------------------------------------------------------------------------*/
int pagesize = 4; // 茄其捞瘤寸 10俺 免仿拱
int pageNUM=1; // 其捞瘤 锅龋
int pagecount=1 ; // 其捞瘤 肮荐 瘤沥 函荐
int absolutepage=0; // 例措 困摹 其捞瘤 锅龋
int dbcount=0 ; // DB 救俊 臂 肮荐 历厘 函荐
int isNoPage = 0; //茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
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();
/**************************************
1.霸烙沥焊
***************************************/
query1 = " SELECT game_title,game_text,qcif_img,game_path,game_type";
query1 = query1 +" ,total_count=";
query1 = query1 + " (SELECT COUNT(game_idx) FROM "+vGameTableName+" ";
query1 = query1 + " WHERE game_new=2)";
query1 = query1 + " ,rank=";
query1 = query1 + " (SELECT COUNT(game_idx)+1 FROM "+vGameTableName+" ";
query1 = query1 + " WHERE game_new=2 ";
query1 = query1 + " AND a.game_hit<game_hit OR (a.game_hit=game_hit AND a.game_date<game_date))";
query1 = query1 + " FROM "+vGameTableName+" a ";
query1 = query1 + " WHERE game_idx="+game_idx;
rs=stmt.executeQuery(query1);
if(rs.next())
{
game_title=rs.getString("game_title");
game_text=rs.getString("game_text");
game_img_path=rs.getString("qcif_img");
game_type=rs.getString("game_type");
game_path=rs.getString("game_path");
total_count=rs.getInt("total_count");
rank=rs.getInt("rank");
}
rs.close();
//out.println(url_path+"/ranking/game_start.jsp?game_idx="+game_idx+"&mphone="+mphone+"&gphone="+gphone);
%>
<html>
<head>
<title>霸烙汲疙</title>
<link href="mobile.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3" bgcolor="#A8BFFF"></td>
</tr>
<tr>
<td height="13" bgcolor="#6A76F2"> <font color="#ffffff"><%=game_title%></font></td>
</tr>
<tr>
<td height="3" bgcolor="#A8BFFF"></td>
</tr>
<tr>
<td height="1" bgcolor="#6A76F2"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="8"></td>
</tr>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr height="64">
<td width="11"></td>
<td width="156" bgcolor="#dae6e8">
<table border="0" cellspacing="0" cellpadding="0">
<tr height="6">
<td colspan="4"></td>
</tr>
<tr height="52">
<td width="6"></td>
<td width="27" valign="top">
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr height="2">
<td width="2"></td>
<td width="23"></td>
<td width="2"></td>
</tr>
<tr height="48">
<td width="2"></td>
<td width="23"><img src="<%=img_path%>images/game/<%=game_img_path%>" width="23" height="48" border="0"></td>
<td width="2"></td>
</tr>
<tr height="2">
<td width="2"></td>
<td width="23"></td>
<td width="2"></td>
</tr>
</table>
</td>
<td width="6"></td>
<td width="116" valign="top"><font color="#616667"><%=game_text%></font></td>
</tr>
<tr height="6">
<td colspan="4"></td>
</tr>
</table>
</td>
<td width="11"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="7"></td>
</tr>
<%
switch(ngamePlayType)
{
/*------------------------------------------------------------------------------------------------------
+ 老馆霸烙
-------------------------------------------------------------------------------------------------------*/
case 0:
%>
<tr>
<td align="center">
<table width="124" border="0" cellpadding="0" cellspacing="0">
<tr height="17">
<td width="61" bgcolor="#a8bfff" align="center"><a href="<%=url_path%>/ranking/game_start.jsp?game_idx=<%=game_idx%>&mphone=<%=mphone%>&gphone=<%=gphone%>&gamePlayType=<%=gamePlayType%>"><font color="#ffffff">霸烙矫累</font></a></td>
<td width="2"></td>
<td width="61" bgcolor="#a8bfff" align="center"><a href="<%=url_path%>/ranking/game_help.jsp?game_idx=<%=game_idx%>&mphone=<%=mphone%>&gphone=<%=gphone%>"><font color="#ffffff">霸烙汲疙</font></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="2"></td>
</tr>
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr height="17">
<td width="26"></td>
<td width="124" bgcolor="#a8bfff" align="center"><a href="<%=url_path+"/ranking/game_result.jsp?mphone="+mphone+"&gphone="+gphone+"&game_idx="+game_idx%>"><font color="#ffffff">珐欧</font></a></td>
<td width="26"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="2"></td>
</tr>
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr height="17">
<td width="26"></td>
<td width="124" bgcolor="#a8bfff" align="center"><a href="<%=url_path+"/game/GameUserMent_write.jsp?mphone="+mphone+"&gphone="+gphone+"&game_idx="+game_idx+"&gamePlayType="+gamePlayType%>"><font color="#ffffff">珐欧内膏飘静扁</font></a></td>
<td width="26"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="2"></td>
</tr>
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr height="17">
<td width="26"></td>
<td width="124" bgcolor="#a8bfff" align="center"><a href="<%=url_path+"/ranking/game_search.jsp?mphone="+mphone+"&gphone="+gphone%>"><font color="#ffffff">霸烙傈眉焊扁</font></a></td>
<td width="26"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="2"></td>
</tr>
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr height="17">
<td width="26"></td>
<td width="124" bgcolor="#a8bfff" align="center"><a href="<%=url_path+"/ranking/game.jsp?mphone="+mphone+"&gphone="+gphone+"&linkFlag=0"%>"><font color="#ffffff">霸烙皋牢啊扁</font></a></td>
<td width="26"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="79"></td>
</tr>
<%
break;
/*------------------------------------------------------------------------------------------------------
+ 目敲霸烙
-------------------------------------------------------------------------------------------------------*/
case 1:
query1 = "select phonenum_man,nickname_man,phonenum_woman,nickname_woman from GT_gamecouple where phonenum_man = '"+mphone+"' or phonenum_woman = '"+mphone+"'";
rs=stmt.executeQuery(query1);
if(rs.next())
{
nickname = rs.getString(2);
couplephone = rs.getString(1);
if(couplephone.equals(mphone))
couplephone = rs.getString(3);
couplenickname = rs.getString(4);
rs.close();
}
else
{
rs.close();
/**************************************
2.目敲急沥
***************************************/
query1 = "select nickname,sex from GT_user_info where phonenum = '"+mphone+"'";
rs=stmt.executeQuery(query1);
if(!rs.next())
{
response.sendRedirect(url_path+"/user_info/regist_notice.jsp?mphone="+mphone+"&gphone="+gphone);
return;
}
else
{
nickname = rs.getString(1);
sex = rs.getInt(2);
}
rs.close();
int rsFlag = 0;
query1 = "select nickname_man, nickname_woman,(gamescore_man+gamescore_woman)score from GT_gamecouple where game_idx = "+game_idx+" and (phonenum_man = '"+mphone+"' or phonenum_woman = '"+mphone+"')";
rs=stmt.executeQuery(query1);
//out.println(query1);
if(!rs.next())
{
// mynickname = rs.getString(1);
// mycouplenickname = rs.getString(2);
// myscore = rs.getInt(3);
rsFlag = 1;
}
rs.close();
if(rsFlag == 1)
{
if(sex == 1)//咯磊
query1 = "select top 1 phonenum,nickname from GT_user_info where sex = 2 and phonenum not in (select phonenum_woman from GT_gamecouple) order by newid()";
else
query1 = "select top 1 phonenum,nickname from GT_user_info where sex = 1 and phonenum not in (select phonenum_man from GT_gamecouple) order by newid()";
rs=stmt.executeQuery(query1);
if(rs.next())
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -