📄 start_game.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"%>
<% //己龋
//泅犁 弥绊 痢荐客 努肺滚 俺荐甫 啊廉坷绊, 霸烙 洒飘荐甫 棵赴促.
Connection con = null;
PreparedStatement pstmt=null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageset = null;
response.setHeader("cache-control","no-cache");
response.setHeader("expires","0");
response.setHeader("pragma","no-cache");
String mphone = request.getParameter("mphone");
String gphone = mphone;
// VM Type阑 啊廉柯促 - Applet阑 角青且 版肺啊 VM Type俊 蝶扼 搬沥等促.
String vmtype = request.getParameter("vmtype");
String game_idx = request.getParameter("game_idx");
int myScore=0, myClover=0;
String query1=null;
int isHave=0;
int play_first=0, play_second=0, play_third=0;
int isGuest = 0;//雀盔啊涝 救窍绊 霸烙窍绰 蜡历.
String gameTitle="";
String game_explain = "";
String game_limit_image = "";
String game_loading_image = "";
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 ===========================
// con.setAutoCommit(false);
stmt=con.createStatement();
/**************************************
1.坷疵狼霸烙 HIT 荐 棵府扁 20071026 眠啊
***************************************/
query1="select game_idx from GT_today_game where game_idx="+game_idx+" and datediff(day,regdate,getdate())=0";
rs=stmt.executeQuery(query1);
if(!rs.next())
{
query1="Insert into GT_today_game(game_idx) values("+game_idx+")";
stmt.executeUpdate(query1);
}
else
{
query1="update GT_today_game SET game_hit=game_hit+1 where game_idx="+game_idx;
stmt.executeUpdate(query1);
}
rs.close();
//霸烙 洒飘荐 棵府扁
query1 = "update GT_game set game_hit=game_hit+1 where game_Idx="+game_idx;
stmt.executeUpdate(query1);
//雀盔, 厚雀盔
rs = stmt.executeQuery("select phonenum from GT_user_info where phonenum='"+mphone+"'");
if(!rs.next())
{
isGuest = 1;
response.sendRedirect(url_path+"/user_info/regist_notice.jsp?mphone="+mphone+"&gphone="+gphone);
if (true) return;
}
else
{
//郴 痢荐 啊廉坷扁
query1 = " select gamerank_score from GT_gamerank_"+game_idx+" where phonenum='"+mphone+"'";
rs=stmt.executeQuery(query1);
if(rs.next())
myScore = rs.getInt(1);
//郴 努肺滚 啊廉坷扁
query1 = "select top 1 moneybook_total_clover from GT_moneybook where phonenum='"+mphone+"' order by moneybook_idx desc";
rs=stmt.executeQuery(query1);
if(rs.next())
myClover = rs.getInt(1);
//GT_gameplay_info俊 insert 窍扁
query1 = "select play_idx, play_first, play_second, play_third from GT_gameplay_info where phonenum='"+mphone+"'";
rs=stmt.executeQuery(query1);
if(rs.next()==true)//粮犁茄促
{
isHave=1;
play_first=rs.getInt("play_first");
play_second=rs.getInt("play_second");
play_third=rs.getInt("play_third");
if((Integer.parseInt(game_idx) != play_first) && (Integer.parseInt(game_idx) != play_second) && (Integer.parseInt(game_idx) != play_third))// 瘤陛窍绰 霸烙捞 郴开俊 绝促搁..沥焊盎脚
{
query1 = "update GT_gameplay_info set play_first= ? , play_second= ? , play_third=? where phonenum= ? ";
pstmt= con.prepareStatement(query1);
pstmt.setInt(1, Integer.parseInt(game_idx));
pstmt.setInt(2, play_first);
pstmt.setInt(3, play_second);
pstmt.setString(4, mphone);
pstmt.executeUpdate();
}
}
else//粮犁窍瘤 臼绰促.
{
if(isGuest == 0)//粮犁窍瘤 臼歹扼档 沥雀盔牢版快俊父 历厘茄促.
{
query1 = "insert into GT_gameplay_info (play_first, phonenum) values( ? , ? )";
pstmt= con.prepareStatement(query1);
pstmt.setInt(1, Integer.parseInt(game_idx));
pstmt.setString(2, mphone);
pstmt.executeUpdate();
}
}
} //雀盔 厚雀盔
//霸烙 沥焊 (肺爹拳搁俊 鞘夸茄)
query1 = "SELECT game_idx, game_title, game_text, game_img_path, game_tip1, game_limit_image, game_loading_image FROM GT_game ";
query1 = query1 + " WHERE game_idx=?";
pstmt = con.prepareStatement(query1);
pstmt.setInt(1,Integer.parseInt(game_idx));
rs = pstmt.executeQuery();
if(rs.next())
{
gameTitle = rs.getString(2); //霸烙力格
game_explain = rs.getString("game_tip1"); //霸烙 眠啊 汲疙(肺爹吝老锭 唱坷绰 咆胶飘)
game_limit_image = rs.getString(6); //康殿困 捞固瘤
game_loading_image = rs.getString(7); //肺爹 捞固瘤
}
// con.commit();
}
catch (Exception e)
{
// con.rollback();
out.println(e);
}
finally
{
// con.setAutoCommit(true);
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>
<body>
<object src="public.spr" version="3">
</object>
<embed appletid="<%=game_idx%>" src="<%=game_idx%>.spr"
nextpagesrc="<%=url_path%>/ranking/ranking_result.jsp?game_idx=<%=game_idx%>" messagepagesrc="<%=url_path%>/ranking/savescore.jsp?game_idx=<%=game_idx%>&score=%d&addClover=%d"
maxclover="<%= myClover%>" maxscore="<%= myScore%>" delaysec="3">
</embed>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3"></td>
</tr>
<tr>
<td>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr height="33">
<td width="137"></td>
<td width="18"><img src="<%=img_path%>images/202img/202_loading/<%=game_limit_image%>"></td>
<td width="2"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="9"></td>
</tr>
<tr>
<!-- 捞固瘤 荐沥何何 : 捞 何盒 "temp_箭磊.png"颇老阑 05锅何磐 19锅鳖瘤 霸烙俊 蝶扼 捞固瘤 榜扼持栏搁 凳 -->
<td height="35"><img src="<%=img_path%>images/202img/202_loading/<%=game_loading_image%>"></td>
<!-- 捞固瘤 荐沥何盒 场 -->
</tr>
<tr>
<td height="15"></td>
</tr>
<tr>
<td height="50" bgcolor="#e6e6e6">
<b>⒀ 霸烙 屏!!</b><br>
<%=game_explain%></td>
</tr>
<tr>
<td height="75"></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -