?? ranking_mycaferanking.jsp.svn-base
字號:
<!--------------------------------------------------------------------------------------------------------------
*@鷗款琺歐>墨其琺歐>雀盔爐>穿利惑困
*@Author : 冠惑辣(2007-10-24)
*@Images : 其撈瘤 救俊 甸絹啊綽 撈固瘤
1) bg_01.png - 拋撈喉 彌惑竄 硅版撈固瘤
2) tab_01.png - 坷疵,林埃,穿利 滾瓢 劇糠 角急釬矯
3) tab_02.png - 俏農禍 痢急扼牢 釬矯
4) tab_03.png - 八瀝禍 痢急扼牢 釬矯
5) temp_02.png - 瀝葷阿屈 某腐磐 弊覆
6) temp_03.png - 陛皋崔 弊覆
7) temp_04.png - 籃皋崔 弊覆
8) temp_05.png - 悼皋崔 弊覆
9) ico_01.png - 坷疵滾瓢 厚勸己 酒撈能
10) ico_02.png - 坷疵滾瓢 勸己 酒撈能
11) ico_03.png - 林埃滾瓢 厚勸己 酒撈能
12) ico_04.png - 林埃滾瓢 勸己 酒撈能
13) ico_05.png - 穿利滾瓢 厚勸己 酒撈能
14) ico_06.png - 穿利滾瓢 勸己 酒撈能
--------------------------------------------------------------------------------------------------------------->
<%@ page import='java.io.*, java.util.Vector, java.util.*, 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"%>
<%!
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");
//int rankType= Integer.parseInt(request.getParameter("rankType"));//雀盔爐 1, 霸矯爐 2.
//int dateFlag = 1;//坷疵 1, 林埃 2, 穿利 3
//if(!isNull(request.getParameter("dateFlag")).equals("")){ dateFlag= Integer.parseInt(request.getParameter("dateFlag")); }
int pageType = 0;//絹叼輯 吭綽瘤(琺歐, 墨其)
if(!isNull(request.getParameter("pageType")).equals("")){ pageType= Integer.parseInt(request.getParameter("pageType")); }
/*------------------------------------------------------------------------------------------------------
+ 傈開 函薦
-------------------------------------------------------------------------------------------------------*/
int maxRank = 300; //300困鱉瘤 八禍
int [] mycafe_idx = null;//郴墨其 格廢
int mycafeCnt = 0;//郴 墨其 骯薦
int cnt = 0;
int rankCnt = 0;//鑒困 釬矯
String sql = null, query1=null ,pagesql = null;
String dateColName = null;//函版 拿煩 撈撫
//阿 拿煩 歷厘 函薦
int cafe_idx = 0;
String cafe_name = null;
String cafe_intro = null;
String calumCnt = null;
int gamerank_score = 0;
String cafe_phonenum = null;
//gameid
int game_idx=0;
String game_title=null;
String boardname=null;
String qvga_img=null;
String[] gameNameList = null;
int[] gameIdx=null;
int gameNameCnt = 0;
int gameArrIndex = 0;
String columnName = null;
int own_field=1; //(磊腳1,惑困0)
if(request.getParameter("own_field")!=null) own_field=Integer.parseInt(request.getParameter("own_field"));
/*------------------------------------------------------------------------------------------------------
+ DB 包訪 函薦
-------------------------------------------------------------------------------------------------------*/
Connection con = null;
PreparedStatement pstmt=null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageset = null;
/*------------------------------------------------------------------------------------------------------
+ 其撈瘤 備泅 眠啊 函薦
-------------------------------------------------------------------------------------------------------*/
int pagesize = 4; // 茄其撈瘤寸 4俺 免仿拱
int pageNUM=1; // 其撈瘤 鍋齲
int pagecount=1 ; // 其撈瘤 骯薦 瘤瀝 函薦
int absolutepage=0; //例措 困摹 其撈瘤 鍋齲
int dbcount=0 ; // DB 救俊 臂 骯薦 歷厘 函薦
//坷疵,穿利
int searchRange = 1;// 坷疵:1, 穿利:2
if(!isNull(request.getParameter("searchRange")).equals("") )//茫扁肺 甸絹柯 版快促.
{
searchRange = Integer.parseInt(convKOR(request.getParameter("searchRange")));
}
else searchRange = 1;//扁夯籃 撈鍋崔撈促.
String pageurl = url_path+"/ranking/ranking_mycaferanking.jsp?mphone="+mphone+"&gphone="+gphone+"&game_idx="+game_idx+"&searchRange="+searchRange+"&own_field="+own_field;
if(searchRange == 1)//坷疵
{
turmText = "坷疵";
columnName = "gamerank_today";
whereStr = " and datediff(day,gamerank_date,getdate())=0";
}
else if(searchRange == 2)//撈鍋崔
{
columnName = "gamerank_score";
turmText = "穿利";
whereStr = " ";
}
String link2=url_path+"/ranking/ranking_main.jsp?mphone="+mphone+"&gphone="+mphone;//鷗款琺歐啪 欄肺
String RangeLink1 = "";
String RangeLink2 = "";
RangeLink1 = url_path+"/ranking/ranking_mycaferanking.jsp?mphone="+mphone+"&gphone="+gphone+"&game_idx="+game_idx+"&searchRange=1&own_field="+own_field;//坷疵
RangeLink2 = url_path+"/ranking/ranking_mycaferanking.jsp?mphone="+mphone+"&gphone="+gphone+"&game_idx="+game_idx+"&searchRange=2&own_field="+own_field;//撈鍋崔
//登倒酒哎 傅農
String link2=null;
if(pageType == 0)
link2=url_path+"/ranking/ranking_main.jsp?mphone="+mphone+"&gphone="+mphone;
else
link2=url_path+"/cafe/cafe_town_main.jsp?mphone="+mphone+"&gphone="+mphone;
//鷗款琺歐 皋春 傅農=====
String goGameLink =url_path+"/ranking/ranking_game.jsp?mphone="+mphone+"&gphone="+gphone;//霸烙琺歐
String goMyLink =url_path+"/ranking/ranking_people.jsp?mphone="+mphone+"&gphone="+gphone+"&subto=1";//myranking
String goCafeLink =url_path+"/ranking/ranking_mycaferanking.jsp?mphone="+mphone+"&gphone="+gphone+"&rankType=1&pageType="+pageType;//墨其
String goKnowLink =url_path+"/ranking/ranking_myknowranking.jsp?mphone="+mphone+"&gphone="+gphone+"&rankType=1";//瘤僥
String goGongLink =url_path+"/ranking/ranking_mygongamranking.jsp?mphone="+mphone+"&gphone="+gphone+"&rankType=1";//傍埃
//輛幅喊 拿煩 搬瀝
switch(dateFlag)
{
case 1://老埃
if(rankType == 1)//雀盔爐
dateColName = "cafe_join_number_day";
else//霸矯爐
dateColName = "cafe_book_count_day";
break;
case 2://林埃
if(rankType == 1)
dateColName = "cafe_join_number_week";
else
dateColName = "cafe_book_count_week";
break;
}
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 count(cafe_idx) from GT_mycafe where phonenum='"+mphone+"'";
if(pstmt != null) pstmt.close();
if(rs != null) rs.close();
pstmt = con.prepareStatement(query1);
rs = pstmt.executeQuery();
if(rs.next())
{
mycafeCnt = rs.getInt(1);
mycafe_idx = new int[mycafeCnt];
}
if(rs != null) rs.close();
if(pstmt != null) pstmt.close();
//gameid
if(!isNull(request.getParameter("game_idx")).equals("") )//茫扁肺 甸絹柯 版快促.
{
game_idx = Integer.parseInt(request.getParameter("game_idx"));
}
else game_idx = 1;
boardname = "GT_gamerank_"+game_idx;
String vmtype = request.getParameter("vmtype") == null ? "":request.getParameter("vmtype").substring(0,1);
String vGameTableName = "";
if(vmtype.equals("b")){ vGameTableName = "GT_game_brew"; }else{ vGameTableName = "GT_game_wipi"; }
sql = "select count(game_idx) from "+vGameTableName+" ";
if(pstmt != null) pstmt.close();
if(rs != null) rs.close();
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
gameNameCnt = rs.getInt(1);
gameIdx = new int[gameNameCnt];
gameNameList = new String[gameNameCnt];
}
rs.close();
pstmt.close();
sql = "select game_idx, game_title from "+vGameTableName+" ";
if(pstmt != null) pstmt.close();
if(rs != null) rs.close();
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
while(rs.next())
{
gameIdx[gameArrIndex] = rs.getInt(1);
gameNameList[gameArrIndex] = rs.getString(2);
gameArrIndex++;
}
rs.close();
pstmt.close();
//郴啊 啊澇茄 墨其 牢鄲膠 備竅扁
if(mycafeCnt > 0)
{
query1="select cafe_idx from GT_mycafe where phonenum='"+mphone+"'";
if(pstmt != null) pstmt.close();
if(rs != null) rs.close();
pstmt = con.prepareStatement(query1);
rs = pstmt.executeQuery();
cnt = 0;
while(rs.next())
{
mycafe_idx[cnt] = rs.getInt(1);
cnt++;
}
}
%>
<html>
<head>
<link href="http://entaz.mugeta.com/client/mugeta_v2_test/web/user/mobile.css" rel="stylesheet" type="text/css">
<title>霸烙琺歐</title>
</head>
<body>
<form name="form" method="post" action="<%=url_path%>/ranking/ranking_cafe.jsp">
<input type="hidden" name="mphone" value="<%=mphone%>">
<input type="hidden" name="gphone" value="<%=gphone%>">
<input type="hidden" name="pageType" value="<%=pageType%>">
<input type="hidden" name="rankType" value="1">
<input type="hidden" name="own_field" value="<%=own_field%>">
<!--劇僥
<tr>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -