📄 researchplayerlist.jsp.svn-base
字号:
<!--------------------------------------------------------------------------------------------------------------
*@霸烙皋牢
*@Author : zhou peng(2008-06-23)
--------------------------------------------------------------------------------------------------------------->
<%@ 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>
<%!
public static String isNull(String str)
{
if (str == null)
return "";
else
return str;
}
public static String splitLongWord(String String1, int int2)
{
if( String1 == null )
return null;
else
{
int int3 = String1.length();
StringBuffer StringBuffer4 = new StringBuffer();
int int5 = 0;
int int6;
for( int6 = 0; int6 < int3; ++int6 )
{
char char7 = String1.charAt( int6 );
StringBuffer4.append( char7 );
if( char7 == 32 )
int5 = 0;
else if( ++int5 > int2 )
{
StringBuffer4.append( "<br>" );
int5 = 0;
}
}
return StringBuffer4.toString();
}
}
%>
<%
/**
* @ version : 1.0.0
* @ author : zhou peng ( pengzhou@isoftstone.com )
* @ last modified : 2008-06-23
*/
/*------------------------------------------------------------------------------------------------------
+ 扁夯 颇扼固磐
-------------------------------------------------------------------------------------------------------*/
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 sql = null;
String strNickname = null;
String strGuestNickName = null;
String strGuestPhoneNum = null;
String strText = null;
String guestPhone = null;
String strTitle = null;
int reCount = 0;
String regdate = null;
String strProvision1 = null;
String strProvision2 = null;
String strProvision3 = null;
String strProvision4 = null;
String strProvision5 = null;
int provision1Cnt = 0;
int provision2Cnt = 0;
int provision3Cnt = 0;
int provision4Cnt = 0;
int provision5Cnt = 0;
int provisionNum = 0;
int maxProvisionCnt = 0;
String maxProvisionCntName = null;
int maxProvisionCntNum = 0;
String levelImgPath1 = null;
String levelImgPath2 = null;
String levelImgPath3 = null;
String levelImgPath4 = null;
String levelImgPath5 = null;
String levelBoardColor1 = null;
String levelBoardColor2 = null;
String levelBoardColor3 = null;
String levelBoardColor4 = null;
String levelBoardColor5 = null;
String linkBoardColor1 = null;
String linkBoardColor2 = null;
String linkBoardColor3 = null;
String linkBoardColor4 = null;
String linkBoardColor5 = null;
int re_titleIdx = 0 ;
int lastTitleIdx = 0;
int nextTitleIdx = 0;
int myLastTitleIdx = 0;
int myNextTitleIdx = 0;
int lastTitleCnt = 0;
int nextTitleCnt = 0;
String lastTitle = null;
String nextTitle = null;
int upFlag = 0;
String placeTopColor = null;
int id_check = 0;
String re_name = null;
String re_phonenum = null;
String actionName = null;
int takeFlag = 0;
if(request.getParameter("actionName")!=null) actionName=request.getParameter("actionName"); else actionName="";
int titleIdx = 0;
if(request.getParameter("titleIdx")!=null) titleIdx=Integer.parseInt(request.getParameter("titleIdx")); else titleIdx=0;
String strProvision = null;
if(request.getParameter("provisionNum")!=null) provisionNum=Integer.parseInt(request.getParameter("provisionNum")); else provisionNum=0;
String researchText = null;
/*------------------------------------------------------------------------------------------------------
+ Page Split
-------------------------------------------------------------------------------------------------------*/
String pageurl = null;
// 其捞瘤 备泅 眠啊 函荐
int pagesize = 6; // 茄其捞瘤寸 10俺 免仿拱
// 傈开 函荐肺 急攫.. 其捞瘤 备泅 何盒俊 犁荤侩
int pageNUM = 1; // 其捞瘤 锅龋
int pagecount = 1 ; // 其捞瘤 肮荐 瘤沥 函荐
int absolutepage = 1; // 例措 困摹 其捞瘤 锅龋
int dbcount = 0; // DB 救俊 臂 肮荐 历厘 函荐
int isNoPage = 0; //茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
/*--------------------------------------------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
---------------------------------------------------------------------------------------------------------------------------------------------*/
Connection con = null;
PreparedStatement pstmt = null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageset = null;
ResultSet rsDate = null;
try
{
/*--------------------------------------------------------------------------------------------------------------------------------------
* DB 目池记
---------------------------------------------------------------------------------------------------------------------------------------*/
%>
<%@ include file="../getConnection.jsp"%>
<%@ include file="bgColor.jsp"%>
<%
/*--------------------------------------------------------------------------------------------------------------------------------------
* Host nickName
---------------------------------------------------------------------------------------------------------------------------------------*/
sql = " SELECT nickname FROM GT_User_Info WITH (READUNCOMMITTED) WHERE phonenum='"+gphone+"'" ;
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if( rs.next() )
{
strNickname = rs.getString("nickname");
}else{
strNickname = "绝澜";
}
rs.close();
pstmt.close();
/*--------------------------------------------------------------------------------------------------------------------------------------
* upFlag Check
---------------------------------------------------------------------------------------------------------------------------------------*/
sql = " SELECT takeIdx FROM gt_NsResearch WITH (READUNCOMMITTED) WHERE idx="+titleIdx;
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if( rs.next() )
{
upFlag = rs.getInt("takeIdx");
}else{
upFlag = 0;
}
rs.close();
pstmt.close();
/*--------------------------------------------------------------------------------------------------------------------------------------
* Action Checked and Implement
---------------------------------------------------------------------------------------------------------------------------------------*/
if (actionName.equals("placeTop")){
if(request.getParameter("re_titleIdx")!=null) re_titleIdx=Integer.parseInt(request.getParameter("re_titleIdx")); else re_titleIdx=0;
/*------------------------------------------------------------------------------------------------
* 盲琶篮 累磊狼 name 苞 phonenum 啊廉柯促
-------------------------------------------------------------------------------------------------*/
if(request.getParameter("re_phonenum")!=null) re_phonenum=request.getParameter("re_phonenum"); else re_phonenum="";
if(request.getParameter("re_name")!=null) re_name=java.net.URLDecoder.decode(makeKOR(request.getParameter("re_name"))); else re_name="";
/*------------------------------------------------------------------------------------------------
* 盲琶篮 NsResearch 惑怕甫 函版
-------------------------------------------------------------------------------------------------*/
sql = "UPDATE gt_NsResearch SET takeIdx = "+re_titleIdx+" WHERE idx="+titleIdx ;
pstmt = con.prepareStatement(sql);
pstmt.executeUpdate();
pstmt.close();
sql = "UPDATE gt_NsResearchRe SET takeFlag = 1 WHERE idx="+re_titleIdx ;
pstmt = con.prepareStatement(sql);
pstmt.executeUpdate();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* GT_NsLevelSet 抛捞阂 俊辑 盲琶篮 累磊甫 粮犁 咯何
-------------------------------------------------------------------------------------------------*/
sql="SELECT idx FROM GT_NsLevelset WITH (READUNCOMMITTED) WHERE phonenum="+Long.parseLong(re_phonenum);
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
id_check=rs.getInt(1);
}else{
id_check = 0;
}
if(id_check==0){
sql ="INSERT INTO GT_NsLevelSet(phonenum, nickname, point_take, point_hit , regdate)"+
"VALUES("+Long.parseLong(re_phonenum)+" , '"+re_name+"',0,0,getdate())";
pstmt = con.prepareStatement(sql);
pstmt.executeUpdate();
pstmt.close();
/*--------------------------------------------------------------------------------------------------------------------------------------
* upFlag Check
---------------------------------------------------------------------------------------------------------------------------------------*/
sql = " SELECT takeIdx FROM gt_NsResearch WITH (READUNCOMMITTED) WHERE idx="+titleIdx;
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if( rs.next() )
{
upFlag = rs.getInt("takeIdx");
}else{
upFlag = 0;
}
rs.close();
pstmt.close();
}
/*------------------------------------------------------------------------------------------------
* 盲琶篮 措函俊 累磊狼 盲琶痢荐 1肺 刘啊
-------------------------------------------------------------------------------------------------*/
sql = "UPDATE GT_NsLevelset SET point_take = point_take+2 WHERE phonenum ="+Long.parseLong(re_phonenum);
pstmt = con.prepareStatement(sql);
pstmt.executeUpdate();
pstmt.close();
response.sendRedirect("ResearchResult.jsp?mphone="+mphone+"&gphone="+gphone+"&titleIdx="+titleIdx+"&upFlag="+re_titleIdx);
}
/*--------------------------------------------------------------------------------------------------------------------------------------
* Provision List
---------------------------------------------------------------------------------------------------------------------------------------*/
sql = "SELECT title,Provision1,Provision2,Provision3,Provision4,Provision5 ,(Provision1Cnt+Provision2Cnt+Provision3Cnt+Provision4Cnt+Provision5Cnt) reCount ,";
sql = sql + " Provision1Cnt,Provision2Cnt,Provision3Cnt,Provision4Cnt,Provision5Cnt ,maxProvisionCnt=(SELECT max(Provision1Cnt) FROM ( ";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -