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

📄 play_gamelist.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
字号:






<%@ 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"%>

<%	//4焙	己龋
	response.setHeader("cache-control","no-cache");
	response.setHeader("expires","0");
	response.setHeader("pragma","no-cache");

	Connection con = null;
	PreparedStatement pstmt=null;
	Statement stmt = null;
	ResultSet rs = null;
	ResultSet pageset = null;

	//String imageUrl=img_path+"images";
	
	String vmtype = request.getParameter("vmtype") == null ? "":request.getParameter("vmtype").substring(0,1);
	String vGameTableName = null;
	if(vmtype.equals("b")){ vGameTableName = "GT_game_brew";	}else{ vGameTableName = "GT_game_wipi"; }


	String mphone = request.getParameter("mphone");
	String gphone = request.getParameter("gphone");

	String query1=null, query2=null, goGameDetel = null;
	//String typeSendUrl = "paper_home.jsp?paperType=0", typeRecvUrl = "paper_home.jsp?paperType=1";	//价荐脚 url

	String game_title, game_text, game_date, nickname="", game_img_path = null, game_path = null;
	String strDel=null, strShow=null;
	String strwritelink=null, boardname=null;
	int game_idx =0, game_hit = 0, game_new = 0;

	// 其捞瘤 备泅 眠啊 函荐 
	int pagesize = 4;  // 茄其捞瘤寸 10俺 免仿拱

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

	int absolutepage=1;  // 例措 困摹 其捞瘤 锅龋
    int dbcount=0 ;   //  DB 救俊 臂 肮荐 历厘 函荐
	int isNoPage = 0;	//茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1

	
	String gameTable = ""+vGameTableName+"";
	//if(request.getParameter("paperType")!=null)
	//{
	//	paperType=Integer.parseInt(request.getParameter("paperType"));//价荐脚 敲贰弊.
	//}

	//朝楼 包访	
	Timestamp di_date=null;
	Date today = new Date();
	SimpleDateFormat timeform;
	timeform = new SimpleDateFormat("yy斥/mm岿/dd老");

	//di_date 		= 	rs.getTimestamp(3); //朝楼啊廉坷扁
	//<%=timeform.format(di_date);		//朝楼 谎府扁
%>




<html>

<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>格废其捞瘤</title>
<meta name="generator" content="Namo WebEditor v6.0">
<link href="mobile.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="blue" vlink="purple" alink="red">
<!--<img   spritesrc="<%=spr_path%>ranking/ranking.spr">-->
<%
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 ===========================




	// 其捞瘤 函荐蔼 荤侩窍扁 困秦辑 DB俊辑 眠免窍绰 何盒
	stmt = con.createStatement(); 

	query1 = "select count(game_idx) from "+gameTable + " where game_new=2 ";
	pageset = stmt.executeQuery(query1);


	if(pageset.next()){
		dbcount = pageset.getInt(1);  // 臂 醚 肮荐
		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 str = "select game_idx, game_date, game_title, game_text, game_hit, game_img_path, game_path, game_new";
	str = str + " from "+gameTable+" where game_new=2 order by game_idx desc";

	rs = stmt.executeQuery(str);	
	if(!rs.next()) // 蔼捞 绝阑锭
	{
		isNoPage = 1;
		pagesize=0;
	}
	else         // 蔼捞 乐阑锭	//rs.absolute(absolutepage);
	{				
		for(int s=0; s<absolutepage-1; s++)
			rs.next();
	}
%>
<table cellpadding="0" cellspacing="0" width="240" height="296">
  <tr>
    <td width="7" height="20" background="<%=img_path%>images/296_bar/violet.png"></td>
    <td width="233" colspan="5"height="20" background="<%=img_path%>images/296_bar/violet.png"><font color="#FFFFFF">霸烙</font> </td>
  </tr>
  <tr>
    <td width="7" height="5"></td>
    <td width="233" colspan="5" height="5"></td>
  </tr>

<%
	int count = 0 ; //其捞瘤 墨款磐 函荐
	while(count < pagesize)
	{ 
		game_idx=rs.getInt(1);			//霸烙id
		di_date=rs.getTimestamp(2);		//朝楼啊廉坷扁
		game_title=rs.getString(3);		//臂力格
		game_text=rs.getString(4);		//臂郴侩
		game_hit=rs.getInt(5);		//洒飘荐
		game_img_path=rs.getString(6);	//捞固瘤 菩胶
		game_path=rs.getString(7);		//霸烙 菩胶
		game_new = rs.getInt(8);		//脚痹霸烙捞搁 1捞 甸绢乐促.

		goGameDetel = url_path+"/ranking/play_gamename.jsp?game_idx="+game_idx+"&mphone="+mphone+"&gphone="+gphone;//霸烙技何傅农.
%>	
  <tr>
    <td width="7" height="21" bgcolor="#D3E2E5"></td>
    <td width="233" colspan="5" height="21" bgcolor="#D3E2E5" valign="bottom">
	<%
			if(game_new == 1)
			{
				String tag = "<img src="+img_path+"images/296img/296_game/new.png width=19 height=9 border=0>";
				out.println(tag);
			}
			%>
	<a href="<%=goGameDetel%>"><font color="#130073"><%=game_title%></font></a>
	</td>
  </tr>
  <tr>
    <td height="40" bgcolor="#D3E2E5" colspan="6"><table cellpadding="0" cellspacing="0" width="224" height="39" bgcolor="#FFFFFF" align="center">
      <tr>
        <td width="6" height="6"></td>
        <td width="208" height="6"></td>
        <td width="8" height="6"></td>
      </tr>
      <tr>
        <td width="6" height="28"></td>
        <td width="208" height="28" valign="top"><font color="#848284"><%=game_text%></font></td>
        <td width="8" height="28"></td>
      </tr>
      <tr>
        <td width="6" height="6"></td>
        <td width="208" height="6"></td>
        <td width="8" height="6"></td>
      </tr>
    </table></td>
  </tr>
<%
		if(rs.isLast())
		{ //盖 付瘤阜 饭内靛 老版快
			 break;
		}
		else
		{
			rs.next();
		}
		count++;
	}//end_while

	if(rs != null) rs.close();
	if(stmt != null) stmt.close();
	if(con != null) con.close();
}
catch (Exception e) 
{
	out.println(e);
}
finally
{
	if(rs != null)      try{rs.close();}catch(Exception se){}
	if(pageset != null) try{pageset.close();}catch(Exception se){}
	if(pstmt != null)   try{pstmt.close();}catch(Exception es){}
	if(stmt != null)    try{stmt.close();}catch(Exception es){}
	if(con != null)		try{con.close();}catch(Exception es){}
}
%>
  




  <tr>
    <td width="7" height="9" bgcolor="#D3E2E5"></td>
    <td colspan="5" width="233" height="9" bgcolor="#D3E2E5"></td>
  </tr>
  <tr>
    <td width="7" height="3"></td>
    <td colspan="5" width="233" height="3"></td>
  </tr>
  <tr>
    <td height="4" colspan="6"></td>
  </tr>
  <tr>
    <td height="19" colspan="6" bgcolor="#FEF4C2" valign="bottom" align="center">
<%//其捞瘤 备泅何
	int limit = 4 ;   //其捞瘤 府胶飘 俺荐 瘤沥	
	int temp =(pageNUM-1) % limit ;	//矫累 其捞瘤 备窍扁
	int startPage = pageNUM - temp;
	String pageurl = url_path+"/ranking/play_gamelist.jsp?mphone="+mphone+"&gphone="+gphone;
%>
<%// [捞傈] 傅农 眠啊窍扁
   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;
   <%}
%>	
	</td>
  </tr>
  <tr>
    <td height="7" width="7"></td>
    <td colspan="5" width="233"></td>

  </tr>
</table>
<%
String step1=url_path+"/main.jsp?mphone="+mphone+"&gphone="+mphone;//权
String step2=url_path+"/ranking/game.jsp?mphone="+mphone+"&gphone="+mphone;//霸烙
%>
<table width="240" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="10" bgcolor="#BBC7C8"></td>
        <td bgcolor="#DAE6E8">
			<table width="100%" border="0" cellspacing="3" cellpadding="0">
				<tr>
					<td><a href="<%=step1%>">权</a>&gt;<a href="<%=step2%>">霸烙</a>&gt;霸烙格废</td>
				</tr>
			</table>
		</td>
        <td width="10" bgcolor="#BBC7C8"></td>
	</tr>
</table>
<%@ include file="../newbottom.jsp"%>
		              
</body>

</html>

⌨️ 快捷键说明

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