📄 ranking_cafe.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;
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;
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 救俊 臂 肮荐 历厘 函荐
//登倒酒哎 傅农
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>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
-->
<table width="240" border="0" cellspacing="0" cellpadding="0">
<!--鸥捞撇 矫累-->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="2" bgcolor="#ffaec5"></td>
</tr>
<tr>
<td width="8" height="14" bgcolor="#ff4759"></td>
<td height="15" bgcolor="#ff4759"><font color="#ffffff">霸烙珐欧</font></td>
</tr>
<tr>
<td colspan="2" height="3" bgcolor="#ffaec5"></td>
</tr>
<tr>
<td colspan="2" height="1" bgcolor="#ff4759"></td>
</tr>
</table>
</td>
</tr>
<!--鸥捞撇 场-->
<!--膏飘 郴侩 矫累-->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="7"></td>
</tr>
<tr>
<td></td>
<td width="190" align="center">
<font color="#9d9d9d">霸烙阑 急琶窍矫搁<br>
秦寸 霸烙狼 珐欧阑 焊角荐 乐绢夸~<br>
∝ 300困鼻 观篮 焊咯瘤瘤 臼嚼聪促.</font>
</td>
<td></td>
</tr>
<tr>
<td colspan="3" height="7"></td>
</tr>
</table>
</td>
</tr>
<!--膏飘 郴侩 矫累-->
<!--珐欧急琶 焊扁 矫累-->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="17">
<td width="25"></td>
<td width="4"></td>
<td align="center">
<select name="game_idx">
<%
gameArrIndex = 0;
while(gameArrIndex < gameNameCnt)
{
if(game_idx==gameIdx[gameArrIndex])
out.println("<option selected value='"+gameIdx[gameArrIndex]+"' >"+gameNameList[gameArrIndex]+"</option>");
else
out.println("<option value='"+gameIdx[gameArrIndex]+"'>"+gameNameList[gameArrIndex]+"</option>");
gameArrIndex++;
}
%>
</select>
</td>
<td width="35" bgcolor="#ff82ab"><div align="center"><a href="javascript:form.submit()"><font color="#ffffff">焊扁</font></a></div></td>
<td width="25"></td>
</tr>
</table>
</td>
</tr>
<!--珐欧急琶 焊扁 场-->
<tr>
<td height="8"></td>
</tr>
<!--膏飘 郴侩 矫累-->
<tr>
<td>
<table width="240" bgcolor="#ff9dac" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="7"></td>
</tr>
<tr>
<td colspan="3" height="7"></td>
</tr>
<!--痢急扼牢 矫累-->
<tr height="2">
<td colspan="3" width="150" background="http://entaz.mugeta.com/client/FTP_Working_Folder//web/images/ranking/tab_02.png"></td>
</tr>
<!--痢急扼牢 场-->
</table>
</td>
</tr>
<!--膏飘 郴侩 矫累-->
<tr>
<td height="13"></td>
</tr>
<!-- 坷疵/穿利 & 惑困 / 磊脚 官 矫累-->
<tr>
<%
String datePath = url_path+"/ranking/ranking_cafe.jsp?mphone="+mphone+"&gphone="+gphone+"&rankType="+rankType+"&pageType="+pageType+"&dateFlag=";
%>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="22"></td>
<% if(dateFlag != 1){%>
<td width="55" align="center"><a href="<%=datePath%>1"><img src="http://entaz.mugeta.com/client/FTP_Working_Folder//web/images/ranking/ico_02.png"></a></td>
<% }else{ %>
<td width="55" align="center"><img src="http://entaz.mugeta.com/client/FTP_Working_Folder//web/images/ranking/ico_02.png"></td>
<% } %>
<% if(dateFlag != 3){%>
<td width="55" align="center"><a href="<%=datePath%>3"><img src="http://entaz.mugeta.com/client/FTP_Working_Folder//web/images/ranking/ico_06.png"></td>
<% }else{ %>
<td width="55" align="center"><img src="http://entaz.mugeta.com/client/FTP_Working_Folder//web/images/ranking/ico_06.png"></td>
<% } %>
<td></td>
</tr>
<tr>
<td height="1" bgcolor="#ff788f"></td>
<td width="55" align="center"></td>
<td width="55" align="center" bgcolor="#ff788f"></td>
<td bgcolor="#ff788f"></td>
</tr>
<tr>
<td height="17"></td>
<td width="40" align="center" colspan="2">
<font color="#f60000" size="3"><b>惑困</b></font>
<font color="#ff788f" size="3"> | </font>
<font color="#ff788f" size="3"><a href="<%=url_path%>/ranking/ranking_mycaferanking.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&rankType=<%=rankType%>&pageType=<%=pageType%>&dateFlag=<%=dateFlag%>">磊脚</a></font>
</td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!-- 坷疵/穿利 & 惑困 / 磊脚 官 矫累-->
<%
//霸矫拱 肮荐 备窍扁
query1="select count(*) from GT_cafe";
if(stmt != null) stmt.close();
if(pageset != null) pageset.close();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -