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

📄 coupleboard_list.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
字号:
<%@ page contentType='text/html;charset=euc-kr'%><%@ include file="../makeKOR.jsp"%><%
	
	/*------------------------------------------------------------------------------------------------------
	+		Setting Variable
	-------------------------------------------------------------------------------------------------------*/
	String		szDefaultParam	=	"?mphone="+mphone+"&gphone="+gphone+"&game_idx="+game_idx+"&gamePlayType="+gamePlayType;
	String		szPageParam		=	request.getParameter("pageNUM");	// 其捞瘤 颇扼固磐
	String		szPolicePhone	=	"01051767201";							//	脚绊瘤扁
	Long			lMphone			=	Long.parseLong(mphone);
	String		szSQL				=	null;
	

	// 其捞瘤 颇扼固磐 绝阑 矫,
	//
	if( "".equals(szPageParam) || "null".equals(szPageParam) || szPageParam == null)
	{
		szPageParam = "1";
	}
	
	/*------------------------------------------------------------------------------------------------------
	+	八祸绢 汲沥
	-------------------------------------------------------------------------------------------------------*/
	String szSearchWord = request.getParameter("word");
	String szSearchWordParam = null;
	String szSearchSQL1 = null;
	String szSearchSQL2 = null;
	String szSearchSQL3 = null;

	if("".equals(szSearchWord) || "null".equals(szSearchWord) || szSearchWord == null)
	{
		szSearchWord = "";
		szSearchSQL1 = "";
		szSearchSQL2 = "";
		szSearchSQL3 = "";
		szSearchWordParam = "";
	}
	else
	{
		szSearchWord = makeKOR(szSearchWord);
		szSearchWord = szSearchWord.replaceAll("'", "''");
		szSearchSQL1 = " WHERE nickname like '%"+ szSearchWord+"%'";
		szSearchSQL2 = " AND nickname like '%"+ szSearchWord+"%'";
		szSearchSQL3 = " WHERE nickname like '%"+ szSearchWord+"%'";
		szSearchWordParam = "&word=" + java.net.URLEncoder.encode(szSearchWord);
	}


	/*------------------------------------------------------------------------------------------------------
	+		Board Variable
	-------------------------------------------------------------------------------------------------------*/
	int				nPageNum			=	Integer.parseInt(szPageParam);	// 其捞瘤 锅龋
	int				nRecoredMax		=	5;											// 茄 其捞瘤 霸矫拱 俺荐
	int				nTotalCount		=	0;												// 醚 霸矫拱 荐
	int				nRecordCount	=	0;												// 茄其捞瘤 霸矫拱 荐
	int				nPageCount		=	0;												// 其捞隆 荐

	String[]		aszNickName		=	new String[nRecoredMax];
	String[]		aszText				=	new String[nRecoredMax];
	String[]		aszPhoneNum	=	new String[nRecoredMax];
	Date[]		aRegDate			=	new Date[nRecoredMax];
	boolean[]	isMine				=	new boolean[nRecoredMax];
	int[]			anIdx					=	new int[nRecoredMax];
	
	/*------------------------------------------------------------------------------------------------------
	+		醚 霸矫拱 荐
	-------------------------------------------------------------------------------------------------------*/
	szSQL = "SELECT count(idx) FROM GT_coupleBoard"+szSearchSQL1;
	rs=stmt.executeQuery(szSQL);
	if( rs.next() )
	{
		nTotalCount = rs.getInt(1);
	}
	else
	{
		nTotalCount = 0;
	}
	rs.close();


	/*------------------------------------------------------------------------------------------------------
	+	醚其捞瘤 备窍扁, 瘤陛 其捞瘤 备窍扁
	-------------------------------------------------------------------------------------------------------*/
	if( nTotalCount % nRecoredMax == 0)
		nPageCount = nTotalCount/ ( nRecoredMax );
	else
		nPageCount = nTotalCount / ( nRecoredMax ) + 1;
	

	/*------------------------------------------------------------------------------------------------------
	+		霸矫拱 啊廉坷扁
	-------------------------------------------------------------------------------------------------------*/
	szSQL = "SELECT TOP "+nRecoredMax+" idx , phonenum , nickname , text , regdate FROM GT_coupleBoard WHERE idx NOT IN ( SELECT TOP " + ( (nPageNum - 1) * nRecoredMax ) +" idx FROM GT_coupleBoard "+szSearchSQL3+" ORDER BY idx DESC) "+szSearchSQL2+" ORDER BY idx DESC";
	rs=stmt.executeQuery(szSQL);
	
	for(int i = 0 ; rs.next() ; i++)
	{
		anIdx[i]					=		rs.getInt("idx");
		aszNickName[i]		=		rs.getString("nickname");
		aszPhoneNum[i]		=		rs.getString("phonenum");
		aszText[i]				=		rs.getString("text");
		aRegDate[i]			=		rs.getDate("regdate");
		
		// 磊扁 霸矫拱牢瘤,
		//
		if( Long.toString(lMphone).equals(aszPhoneNum[i]) )
		{
			isMine[i]			=		true;
		}
		else
		{
			isMine[i]			=		false;
		}
		
		// 迄锅龋 犁炼钦
		//
		if( "1".equals(aszPhoneNum[i].valueOf(1)))
		{
			aszPhoneNum[i] = "0"+ aszPhoneNum[i];
		}

		nRecordCount++;
	}
	rs.close();
%>

<tr>
<td>
	<table width="176" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td colspan="3" align="center">⒔目敲俊霸 傈且 富阑 巢败林技夸!&nbsp;</td>
		</tr>
		<tr height="4">
			<td colspan="3"></td>
		</tr>
		<tr>
			<td></td>
			<td width="46" bgcolor="#eee2ff" height="16" align="center"><a href="<%=url_path%>/game/coupleBoard_write.jsp<%=szDefaultParam%>"><font color="#9819e9">臂静扁</font></a></td>
			<td></td>
		</tr>
		<tr height="3">
			<td colspan="3"></td>
		</tr>
	</table>
</td>
</tr>

<tr>
	<td height="5"></td>
</tr>


<%
	// 霸矫拱 府胶飘 矫累
	//
	for(int i = 0 ; i < nRecordCount ; i++)
	{
%>

<tr>
	<td bgcolor="#e5ecff">
		<table>
			<tr>
				<td width="3" height="22"></td>
				<td><font color="#666666"><b><a href="<%=url_path+"/mypage/my_confirm.jsp?mphone="+mphone+"&gphone="+aszPhoneNum[i]%>"><%=aszNickName[i]%></a></b></font></td>
				<td width="60" align="right">
				<!-- 郴巴捞芭唱 脚绊瘤扁老 版快, 荐沥 昏力 啊瓷 -->
				<% if(  isMine[i] || szPolicePhone.equals(mphone) ) { %>
					<font color="#6a76f2">
						<a href="<%=url_path%>/game/coupleBoard_modify.jsp<%=szDefaultParam%>&idx=<%=anIdx[i]%>&gamePlayType=1">荐沥</a>
						/
						<a href="<%=url_path%>/game/coupleBoard_delete.jsp<%=szDefaultParam%>&idx=<%=anIdx[i]%>&gamePlayType=1">昏力</a>
					</font>
				<% } %>
				</td>
				<td width="3"></td>
			</tr>

			<tr>
				<td width="3" height="20"></td>
				<td colspan="2" bgcolor="#ffffff">

					<table width="176" cellpadding="0" cellspacing="0" border="0">
						<tr height="3">
							<td colspan="3"></td>
						</tr>
						<tr>
							<td width="3"></td>
							<td><font color="#666666">
								<%=StrConvert(aszText[i])%>
							</font></td>
							<td width="3"></td>
						</tr>
						<tr height="3">
							<td colspan="3"></td>
						</tr>
					</table>

				</td>
				<td width="3"></td>
			</tr>

			<tr>
				<td colspan="4" height="3"></td>
			</tr>

			<tr>
				<td colspan="4" bgcolor="#ffffff" height="3"></td>
			</tr>
		</table>
	</td>
</tr>
<%
	}
%>


<tr>
	<td height="19" bgcolor="#e5ecff" align="center">
	<%
		// 其捞隆
		//
		String szPageURL		=	url_path+"/ranking/game_gamename.jsp"+szDefaultParam+szSearchWordParam;
		String szPagingCode	=	pagePath(szPageURL,nTotalCount,nPageNum,nPageCount);
		out.println(szPagingCode);
	%>
	</td>
</tr>

<tr>
	<td height="5"></td>
</tr>

<!--霸烙疙 八祸 矫累-->
<tr>
	<td height="8"></td>
</tr>
  <tr>
     <td width="240">
		   
		<form method="post" name="form1" action="<%=url_path%>/ranking/game_gamename.jsp">

		<input type="hidden" name="mphone" value="<%=mphone%>">
		<input type="hidden" name="gphone" value="<%=gphone%>">
		<input type="hidden" name="game_idx" value="<%=game_idx%>">
		<input type="hidden" name="gamePlayType" value="<%=gamePlayType%>">

          <table width="240" border="0" align="center" cellpadding="0" cellspacing="0">

	     <tr> 
	       <td width="38"></td>
	       <td width="44" height="21">
                     <table width="44" border="0" align="center" cellpadding="0" cellspacing="0">	
		     <tr>
		        <td width="44" height="20" bgcolor="#ffffff" align="center">葱匙烙</td>
		     </tr>	      
		  </table>   
                 </td>

	       <td width="72" align="right"><input height="24" width="72" type="text" name="word" size="17" defaultimemode="1" imemode="9" maxlength="20"></td>

	       <td width="3"></td>

                 <td width="40" height="14" valign="middle" align="center" bgcolor="#ff8eab"><font color="#ffffff"><a href="javascript:form.submit()">八祸</a></font></td>

	       <td width="30"></td>
	     </tr>

		</table>
		</form>

     </td>
  </tr>
<tr>
	<td height="7"></td>
</tr>
<!--霸烙疙 八祸 场-->

⌨️ 快捷键说明

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