⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ranking_game_lhl.jsp.svn-base

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 SVN-BASE
字号:
<%@ page language="java" pageEncoding="EUC-KR"%>
<%@ page import="java.io.*,java.text.*,java.util.Date,java.util.Vector, java.sql.*, com.entaz.lib.db.*, com.entaz.relay.net.* "%>
<%@ include file="../imgpath.jsp"%>
<%@ include file="../common_func.jsp"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	
	// 其捞瘤 备泅 眠啊 函荐 
	int pagesize = 5;  // 茄其捞瘤寸 10俺 免仿拱

	// 傈开 函荐肺 急攫.. 其捞瘤 备泅 何盒俊 犁荤侩
	int pageNUM=1;    // 其捞瘤 锅龋
	int pagecount=1 ; // 其捞瘤 肮荐 瘤沥 函荐

	int absolutepage=1;  // 例措 困摹 其捞瘤 锅龋
    int dbcount=0 ;   //  DB 救俊 臂 肮荐 历厘 函荐
	int isNoPage = 0;	//茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
	String 	pageurl	= null;
	
	Connection con = null;
	PreparedStatement pstmt	= null;
	Statement stmt = null;
	ResultSet rs = null;
	ResultSet pageset = null;
	
	Map mapDTGAC = null;
	
	String tableGT_GameChampion = "GT_GameChampion";
	String tableGT_GameChampionLog = "GT_GameChampionLog";
	String mphone = request.getParameter("mphone");
	String gphone = request.getParameter("gphone");
	String phonenum = "";
	String titkePage = "";
	//String mphone = "13366103";		//test db
	//String gphone = "13793284";		//test db
	if(mphone.equals(gphone))
	{
		phonenum = mphone;
		titkePage = "GameMy.jsp";
	}
	else
	{
		phonenum = gphone;
		titkePage = "game_yourspage.jsp";
	}
	String username = "";
	String YourStrname = "";
	try {
%>
<%@ include file="../getConnection.jsp"%>

<html>
<head>
<title>ranking_game</title>
<link href="<%=img_path%>/user/mobile.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="176" border="0" cellspacing="0" cellpadding="0">
	<!--鸥捞撇 矫累-->
	<tr>
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="2" height="2" bgcolor="#a8bfff"></td>
				</tr>
				<tr>
					<td width="6" height="14" bgcolor="#6a76f2"></td>
					<td height="14" bgcolor="#6a76f2"><font color="#ffffff">快铰郴开</font></td>
				</tr>
				<tr>
					<td colspan="2" height="2" bgcolor="#a8bfff"></td>
				</tr>
				<tr>
					<td colspan="2" height="1" bgcolor="#6a76f2"></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
<%
		
		stmt = con.createStatement();
		
		
		
		
		
		String query1 = "select nickname,sex from GT_user_info where phonenum = '"+phonenum+"'";
		rs=stmt.executeQuery(query1);
		
		if(rs.next())
		{
			YourStrname = rs.getString("nickname");
		}
		rs.close();
		
		
		
		
		String sqlGAC = "SELECT GT_GameChampion.No1,GT_GameChampion.No2,GT_GameChampion.No3 FROM GT_GameChampion WHERE GT_GameChampion.phonenum='" + phonenum + "'" ;
		String sqlDTGAC = "SELECT GT_GameChampionLog.regdate,GT_game.game_title,GT_GameChampionLog.win FROM GT_GameChampionLog,GT_game WHERE GT_GameChampionLog.game_idx=GT_game.game_Idx AND  GT_GameChampionLog.phonenum='" + phonenum + "'";
		String sqlName = "SELECT name FROM GT_user_info WHERE phonenum='" + phonenum + "'";
		rs = stmt.executeQuery(sqlGAC);
		int No1 = 0;
		int No2 = 0;
		int No3 = 0;
		int sumNo1 = 0;
		int sumNo2 = 0;
		int sumNo3 = 0;
		while(rs.next())
		{
			No1 = rs.getInt("No1");
			No2 = rs.getInt("No2");
			No3 = rs.getInt("No3");
			sumNo1 += No1;
			sumNo2 += No2;
			sumNo3 += No3;
		}
		rs.close();
		
%>
	<tr>
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="5"></td>
					<td align="left">
						<img src="<%=img_path%>images/game/medal_01.bmp"><font color="#ff3300"> 陛概崔 - <%=sumNo1%></font><br>
						<img src="<%=img_path%>images/game/medal_02.bmp"><font color="#ffb500"> 篮皋崔 - <%=sumNo2%></font><br>
						<img src="<%=img_path%>images/game/medal_03.bmp"><font color="#99cc00"> 悼概崔 - <%=sumNo3%></font><br>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	
<%	
		String sqlDTGACCount = "SELECT GT_GameChampionLog.phonenum,GT_GameChampionLog.regdate,GT_game.game_title,GT_GameChampionLog.win FROM GT_GameChampionLog,GT_game WHERE GT_GameChampionLog.game_idx=GT_game.game_Idx AND  GT_GameChampionLog.phonenum='" + phonenum + "'";
		String szCount = " SELECT count(phonenum) countNum  FROM ("+sqlDTGACCount+") countNum";
		
		pstmt = con.prepareStatement(szCount);
		
		pageset = pstmt.executeQuery();
		
		if(pageset.next()){
			dbcount = pageset.getInt("countNum");  // 臂 醚 肮荐
			pageset.close();
		}
		if(dbcount%pagesize == 0)
			pagecount = dbcount/(pagesize); // 醚 其捞瘤荐 备窍扁
		else
			pagecount = dbcount/(pagesize)+1; // 醚 其捞瘤荐 备窍扁
	
		if(request.getParameter("pageNUM")!=null)
		{
			pageNUM=Integer.parseInt(request.getParameter("pageNUM"));//瘤沥等 其捞瘤 焊咯林扁
			absolutepage=(pageNUM-1)*pagesize+1;
		}
		
		String regdate = "";
		String game_title = "";
		String win = "";
		rs = stmt.executeQuery(sqlDTGAC);
		
		if(!rs.next()) // 蔼捞 绝阑锭
		{
			isNoPage = 1;
			pagesize=0;
		}
		else         // 蔼捞 乐阑锭	//rs.absolute(absolutepage);
		{				
			for(int s=0; s<absolutepage-1; s++)
				rs.next();
		}
%>
		
	<tr>
		<td>
			<!--捞傈/促澜 傅农 冠胶 矫累-->
			<table width="176" bgcolor="#e5ecff" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="16" align="left">
	<%
		pageurl=url_path+"/ranking/ranking_game_lhl.jsp?mphone="+mphone+"&gphone="+gphone;
		out.println(pagePath(pageurl, dbcount, pageNUM, pagecount));
	%>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="4"></td>
	</tr>
<%
		int count = 0 ; //其捞瘤 墨款磐 函荐
		
		while(count<pagesize)
		{
			count++;
			regdate = rs.getString("regdate");
			game_title = rs.getString("game_title");
			win = rs.getString("win");
%>
	<tr>
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr height="14">
					<td width="5"></td>
					<td align="left"><font color="#6466ff"><%=getTime(regdate)%></font><font color="#6466ff"> : <%=game_title%> &gt;</font>&nbsp;<img src="<%=img_path%><%=getWin(win)%>"></td>
					<td width="10"></td>
				</tr>
			</table>
		</td>
	</tr>
<%
			if(rs.isLast())
			{ //盖 付瘤阜 饭内靛 老版快
				break;
			}
			else
			{
				rs.next();
			}
		}
		rs.close();
		
		rs = stmt.executeQuery(sqlName);
		while(rs.next())
		{
			username = rs.getString("name");
		}
		rs.close();
		
		stmt.close();
		con.close();
	}
	catch(Exception e) {
		e.printStackTrace();
	}
%>	
	<tr>
		<td>
			<!--其捞瘤 傅农 矫累-->
			<table width="176" bgcolor="#e5ecff" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="16">
						<table width="176" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center"><font color="#6466ff" size="3">
<%//其捞瘤 备泅何
	int limit = 5 ;   //其捞瘤 府胶飘 俺荐 瘤沥	
	int temp =(pageNUM-1) % limit ;	//矫累 其捞瘤 备窍扁
	int startPage = pageNUM - temp;
%>
<%// [捞傈] 傅农 眠啊窍扁
   if ((startPage-limit)>0){ %>
	<a href="<%=pageurl%>&pageNUM=<%=startPage-1%>"><font color="#DB1A00">捞傈</font></a>&nbsp;
   <%}
   //其捞瘤 锅龋 唱凯窍扁
   if(isNoPage == 0)
   {
	 for(int i=startPage ; i<(startPage+limit);i++)
     {
	   if( i == pageNUM)
	   {%>
			<font color="#DB1A00"><b><%=i%></b></font>&nbsp;
	<% }
	   else
	   { %>
			<a href="<%=pageurl%>&pageNUM=<%=i%>"><font color="#DB1A00"><%=i%></font></a>&nbsp;
    <% }
	   if(i >= pagecount) break;
	 }
   }
   else
	  out.println("钎矫 且 郴侩捞 绝嚼聪促.");
   //[促澜] 傅农 眠啊
   if((startPage+limit)<=pagecount){ %>
	<a href="<%=pageurl%>&pageNUM=<%=(startPage+limit)%>"><font color="#DB1A00">促澜</font></a>&nbsp;
   <%}
%>		
									</font>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	
	<tr>
		<td height="4"></td>
	</tr>

    <tr> 
		<td>
			<table width="176" height="16" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td></td>
					<td width="55" height="16" bgcolor="#a8bfff" align="center">
					
<%

	if(mphone.equals(gphone))
	{
%>
			<a href="<%=url_path%>/ranking/GameMy.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>"><font color="#ffffff" size="2">倒酒啊扁</font></a>
<%
	}
	else
	{
%>
			<a href="<%=url_path%>/ranking/game_yourspage.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>"><font color="#ffffff"size="2">倒酒啊扁</font></a>
<%
	}
%>
					     </td>
     <td></td>

    </tr>
   </table>
  </td>
 </tr>




 <!--咯归 矫累-->
  <tr>
    <td height="11"></td>
  </tr>
<!--咯归 场--> 
 
 
<!--窍窜 版肺钎矫 矫累-->
	<tr>
		<td>
			<table width="176" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="10" bgcolor="#BBC7C8"></td>
					<td width="176" bgcolor="#DAE6E8" height="19">&nbsp;<a href="<%=url_path+"/main.jsp?mphone="+mphone+"&gphone="+gphone%>"> 权</a>&gt; <a href="<%=url_path%>/mypage/my_confirm.jsp?mphone=<%=mphone%>&gphone=0<%=gphone%>"><%=YourStrname%>丛 迄乔</a>&gt;<a href="<%=url_path%>/ranking/<%=titkePage%>?mphone=<%=mphone%>&gphone=<%=gphone%>">霸烙</a>&gt;快铰郴开</td>
					<td width="10" bgcolor="#BBC7C8"></td>
				</tr>
			</table>
		</td>
	</tr>
<!--窍窜 版肺钎矫 场-->


</table>
 <%@ include file="../newbottom.jsp"%>
</body>
</html>

<%!
	public String getTime(String input)
	{
		return new String(input.substring(2, 4)+"/"+input.substring(5, 7)+"/"+input.substring(8, 10));
	}
	
	public String getWin(String input)
	{
		//String gold = "陛皋崔";
		//String argentine = "篮皋崔";
		//String copper = "悼皋崔";
		if(input.equals("1"))
			return "images/game/medal_01.bmp";
		if(input.equals("2"))
			return "images/game/medal_02.bmp";
		if(input.equals("3"))
			return "images/game/medal_03.bmp";
		return input;
	}
 %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -