📄 myquizanswertakeuping.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"%>
<%@ include file="../common_func.jsp"%>
<%@ include file="formatUtil.jsp"%>
<%@ include file="../makeKOR.jsp"%>
<style type="text/css">
A:hover {
COLOR: #000000; TEXT-DECORATION: underline
}
A:link {
COLOR: #000000; TEXT-DECORATION: underline
}
A:visited {
COLOR: #000000; TEXT-DECORATION: underline
}
</style>
<%
String mphone = request.getParameter("mphone");
String gphone = request.getParameter("gphone");
if(mphone == null){
mphone= "09900100081";
}
if(gphone == null){
gphone = mphone;
}
mphone = getStrPhone(getLong(mphone));
gphone = getStrPhone(getLong(gphone));
String idx = request.getParameter("idx");
String re_idx = request.getParameter("re_idx");
String name = java.net.URLDecoder.decode(makeKOR(request.getParameter("name")));
int upFlag = 0;
/*------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
-------------------------------------------------------------------------------------------------------*/
Connection con = null;
PreparedStatement pstmt=null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageset = null;
/*------------------------------------------------------------------------------------------------------
+ 傈开 函荐
-------------------------------------------------------------------------------------------------------*/
String query1 = null, sql = null,query2=null,query3=null,query4=null;
int id_check =0;
String re_name= null;
String re_phonenum = null;
try
{
%>
<%@ include file="../getConnection.jsp"%>
<%
/*------------------------------------------------------------------------------------------------
* 盲琶篮 累磊狼 name 苞 phonenum 啊廉柯促
-------------------------------------------------------------------------------------------------*/
sql ="SELECT nickname,phonenum FROM GT_NsQuizRe WITH (READUNCOMMITTED) WHERE idx="+re_idx;
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next()){
re_phonenum = rs.getString(2);
re_name = rs.getString(1);
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 盲琶篮 龙巩狼 惑怕甫 函版
-------------------------------------------------------------------------------------------------*/
query1 = "UPDATE GT_NsQuiz SET takeIdx = " +re_idx+" WHERE idx="+idx ;
query1 = query1 +"UPDATE GT_NsQuizRe SET takeFlag = 1 WHERE idx="+re_idx ;
pstmt = con.prepareStatement(query1);
pstmt.executeUpdate();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* GT_NsLevelSet抛捞阂 俊辑 盲琶篮 累磊甫 粮犁 咯何
-------------------------------------------------------------------------------------------------*/
query3="SELECT idx FROM GT_NsLevelset WITH (READUNCOMMITTED) WHERE phonenum=(convert(bigint,"+re_phonenum+"))";
pstmt = con.prepareStatement(query3);
rs = pstmt.executeQuery();
if(rs.next()){id_check=rs.getInt(1);}
if(id_check==0){
query4 ="INSERT INTO GT_NsLevelSet(phonenum, nickname, point_take, point_hit)"+
"VALUES(convert(bigint,"+re_phonenum+"),'"+re_name+"',0,0)";
pstmt = con.prepareStatement(query4);
pstmt.executeUpdate();
pstmt.close();
}
/*------------------------------------------------------------------------------------------------
* 盲琶篮 措函俊 累磊狼 盲琶痢荐 1肺 刘啊
-------------------------------------------------------------------------------------------------*/
query2 = "UPDATE GT_NsLevelset SET point_take = point_take+2 WHERE phonenum ="+re_phonenum;
pstmt = con.prepareStatement(query2);
pstmt.executeUpdate();
pstmt.close();
response.sendRedirect("myQuizView.jsp?mphone="+mphone+"&gphone="+gphone+"&idx="+idx+"&name="+name+"&upFlag="+re_idx);
}
catch(Exception e)
{
throw e;
}
finally
{
if ( rs != null ) { try { rs.close(); } catch ( Exception e ) { } }
if ( stmt != null ) { try { stmt.close(); } catch ( Exception e ) { } }
if ( con != null ) { try { con.close(); } catch ( Exception e ) { } }
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -