📄 ranking_mycaferanking.jsp
字号:
<!--------------------------------------------------------------------------------------------------------------
*@鸥款珐欧>墨其珐欧>雀盔炉>穿利惑困
*@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 + -