📄 game_recordmsg_insert.jsp.svn-base
字号:
<%@ page import='java.io.*, 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"%>
<%@ include file="../common_func.jsp"%>
<%!
public static String isNull(String str)
{
if (str == null)
return "";
else
return str;
}
%>
<%
/***********************************************************************
@ Page Description
档惯厘 静扁 贸府 其捞瘤
@ Parameter
***********************************************************************/
/*------------------------------------------------------------------------------------------------------
+ 扁夯 颇扼固磐
-------------------------------------------------------------------------------------------------------*/
String mphone= request.getParameter("mphone");
String gphone= request.getParameter("gphone");
String gamePlayType = null;
String recordmsg = null;
String game_idx = null;
if(request.getParameter("gamePlayType")!=null) gamePlayType=request.getParameter("gamePlayType"); else gamePlayType="0";
if(!isNull(request.getParameter("recordmsg")).equals("")){ recordmsg = makeKOR(request.getParameter("recordmsg")); }
else{ recordmsg="模备啊 寸脚狼 痢荐甫 玻嚼聪促."; }
if(request.getParameter("game_idx")!=null) game_idx=request.getParameter("game_idx");
/*------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
-------------------------------------------------------------------------------------------------------*/
PreparedStatement pstmt = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String query1 = null;
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 ===========================
/*------------------------------------------------------------------------------------------------------
+ 雀盔啊涝 咯何 犬牢
-------------------------------------------------------------------------------------------------------*/
query1 = "select nickname from GT_user_info where phonenum="+"'"+mphone+"'";
if(rs != null) rs.close();
if(pstmt != null) pstmt.close();
pstmt = con.prepareStatement(query1);
rs = pstmt.executeQuery();
if(!rs.next())
{
response.sendRedirect(url_path+"/user_info/regist_notice.jsp?mphone="+mphone+"&gphone="+gphone);
return;
}
recordmsg = StrConvert(recordmsg);
/*------------------------------------------------------------------------------------------------------
+ 傍归 犬牢
-------------------------------------------------------------------------------------------------------*/
/*
if(recordmsg.equals(""))//傍归涝仿
{
//response.sendRedirect(url_path+"/town_g/gong_error.jsp?mphone="+mphone+"&gphone="+gphone+"&type=3");
return;
}
*/
/*------------------------------------------------------------------------------------------------------
+ 臂 涝仿
-------------------------------------------------------------------------------------------------------*/
query1 = "select gamemsg_idx from GT_gamemsg where phonenum='"+mphone+"'";
if(rs != null) rs.close();
if(pstmt != null) pstmt.close();
pstmt = con.prepareStatement(query1);
rs = pstmt.executeQuery();
if(rs.next())
{
query1 = "update GT_gamemsg set phonenum=?,msg_text=? ";//涝仿
}
else
{
query1 = "insert into GT_gamemsg (phonenum,msg_text) values(?,?)";//涝仿
}
if(pstmt != null) pstmt.close();
pstmt = con.prepareStatement(query1);
pstmt.setString(1,mphone);
pstmt.setString(2,recordmsg);
pstmt.executeUpdate();
response.sendRedirect(url_path+"/ranking/game_gamename.jsp?mphone="+mphone+"&gphone="+gphone+"&gamePlayType="+gamePlayType+"&game_idx="+game_idx);
if(rs != null) rs.close();
if(pstmt != null) pstmt.close();
if(stmt != null) stmt.close();
// if(con != null) con.close();
}
catch(Exception e)
{
out.println(e);
out.println("<font color=red size=10>DB Connect Failed </font>");
//臂磊荐 檬苞 版绊芒 傅农
response.sendRedirect(url_path+"/db_insert_error.jsp?mphone="+mphone+"&gphone="+gphone);
}
finally
{
if(rs != null) try{ rs.close(); }catch(Exception se){}
if(pstmt != null) try{ pstmt.close(); }catch(Exception se){}
if(stmt != null) try{ stmt.close(); }catch(Exception se){}
if(con != null) try{ con.close(); }catch(Exception se){}
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -