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

📄 ranking_searchresult.jsp.svn-base

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


<%@ page import='java.io.*,java.text.*,java.util.*, java.util.Vector, java.sql.*, com.entaz.lib.db.*, com.entaz.relay.net.*' contentType='text/html;charset=euc-kr'%>

<%@ include file="../imgpath.jsp"%>
<%@ include file="../makeKOR.jsp"%>
<%@ include file="../common_func.jsp"%>

<%! 	 
	public static String isNull(String str) 
	{ 
		if (str == null) 
			return ""; 
		else 
			return str; 
	} 

%>

<%//4焙 己龋
Connection con = null;
PreparedStatement pstmt=null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageset = null;

//String imageUrl= img_path+"images";

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

String serchNickname = null; //茫阑 喊疙
String sql=null, wheresql="",countsql=null;

//八祸狼 搬苞甫 淬阑 函荐甸
String linkStr = null;
String tmpPhonenum = null;
String tmpNickname = null;
String tmpIntro = null;
int	tmpFace = 0;

String boardname="GT_user_info";

//朝楼 包访
Calendar now = Calendar.getInstance();
int thisYear = now.get(Calendar.YEAR);

// 其捞瘤 备泅 眠啊 函荐 
int pagesize = 4;  // 茄其捞瘤寸 10俺 免仿拱
int pageNUM=1;    // 其捞瘤 锅龋
int pagecount=1 ; // 其捞瘤 肮荐 瘤沥 函荐

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

String nextPageParm=null;
String orderbyStr = "";
String serchTemp = "";
int noWord=0;

//八祸俊 荤侩登绰 函荐甸..
if(!isNull(request.getParameter("nickname")).equals("") )	
{
	serchTemp = request.getParameter("nickname");		//其捞瘤俊 逞败淋
	serchNickname = makeKOR(  request.getParameter("nickname")  );
	serchNickname = StrConvert(serchNickname);//0701
	if(serchNickname.equals("")) noWord=1;

}
else serchNickname="";



//促澜其捞瘤 逞辨锭.. 颇扼皋磐 逞败林扁
nextPageParm = "&nickname="+serchNickname;
//八祸 孽府	
sql = "select  top 100 phonenum, nickname, intro, face from GT_user_info where nickname LIKE '%"+serchNickname+"%'";
countsql = "select  top 100 count(phonenum) from GT_user_info where nickname LIKE '%"+serchNickname+"%'";

sql = sql + wheresql + orderbyStr;	//沥焊甫 啊廉坷绰 孽府巩
countsql = countsql + wheresql;	//肮荐甫 啊廉坷绰 孽府巩

%>

<%


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 ===========================



	stmt = con.createStatement();  
	
	pageset = stmt.executeQuery(countsql);
	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;
	}
	
	rs = stmt.executeQuery(sql);	
	if(!rs.next()) // 蔼捞 绝阑锭
	{
		isNoPage = 1;
		pagesize=0;
	}
	else         // 蔼捞 乐阑锭	//rs.absolute(absolutepage);
	{				
		for(int s=0; s<absolutepage-1; s++)
			rs.next();
	}

	if(isNoPage == 1 || noWord == 1)//八祸等 其捞瘤啊 绝栏骨肺 其捞瘤 绝澜 其捞瘤肺 捞悼矫挪促.
	{
		serchTemp = java.net.URLEncoder.encode(serchNickname);
		String goNoPage = url_path+"/ranking/ranking_searchno.jsp?mphone="+mphone+"&gphone="+gphone+"&searchText="+serchTemp;
		response.sendRedirect(goNoPage);
	}

%>



<html>
<head>
	<title>八祸搬苞_202</title>
</head>
<body>

<table width="176" border="0" cellpadding="0" cellspacing="0">
	
	<!-- 鸥捞撇 -->
	<tr>
	  <td width="168" height="19" colspan='2' background="<%=img_path%>images/202img/202_bar/red.png"><font color="#ffffff">八祸搬苞</font></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<!-- 鸥捞撇 场-->
</table>

<table width="176" border="0" cellpadding="0" cellspacing="0">

<%	
	int count = 0 ; //其捞瘤 墨款磐 函荐 phonenum, nickname, intro
	int sizeCvt = 26;
	while(count < pagesize)
	{

		tmpPhonenum = rs.getString(1);//迄锅龋
		tmpNickname = rs.getString(2);//葱匙烙
		tmpIntro = rs.getString(3);//牢飘肺
		tmpIntro = ( (tmpIntro.length()>20) ? tmpIntro.substring(0,20)+"..." : tmpIntro );
		tmpFace = rs.getInt(4);//倔奔
		linkStr = url_path+"/ranking/ranking_mypeopleranking.jsp?"+"mphone="+mphone+"&gphone="+tmpPhonenum+"&subto=1";//ranking_mypeopleranking 傅农甫 楷搬茄促
%>
	<tr>
		<td bgcolor="#DAE6E8" align="center">
			<table width="176" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td  width="54" height="58" align="center" valign="middle">
					<img src="<%=ava_path%>display_thumb.jsp?mphone=<%=tmpPhonenum%>&face=<%=tmpFace%>" ></td>
					<td  width="3"></td>
					<td>
						<table width="122" border="0" cellpadding="0" cellspacing="0">
							<tr><td><a href="<%=linkStr%>"><font color="#7C8889"><%=tmpNickname%></font></a></td></tr>
							<tr>	
								<td><font color="gray"></font></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr><td colspan="3" height="1"></td></tr>				
				<tr>
					<td colspan="3" align="center"  valign="top"  height="65">
						<table width="170" border="0" cellpadding="0" cellspacing="0">
							<tr><td height="3" bgcolor="white"></td></tr>
							<tr>
								<td valign="top" bgcolor="white" height="60"><%=tmpIntro%></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td height="3"></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 height="15" align="center" bgcolor="#FEDFE3">
<%//其捞瘤 备泅何
	int limit = 4 ;   //其捞瘤 府胶飘 俺荐 瘤沥	
	int temp =(pageNUM-1) % limit ;	//矫累 其捞瘤 备窍扁
	int startPage = pageNUM - temp;
	String pageurl=url_path+"/ranking/ranking_searchresult.jsp?mphone="+mphone+"&gphone="+gphone + nextPageParm;
	
%>
<%// [捞傈] 傅农 眠啊窍扁
   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="3"></td></tr>
<%
String step1=url_path+"/main.jsp?mphone="+mphone+"&gphone="+gphone;//权
String step2=url_path+"/ranking/ranking_main.jsp?mphone="+mphone+"&gphone="+mphone;//
%>
</table>

<table width="176" border="0" cellspacing="0" cellpadding="0">
  <tr height="15">
    <td width="7" bgcolor="#BBC7C8"></td>
    <td width="162" bgcolor="#DAE6E8"><a href="<%=step1%>">权</a>&gt;<a href="<%=step2%>">鸥款珐欧</a>&gt;模备珐欧茫扁</td>
    <td width="7" bgcolor="#BBC7C8"></td>
  </tr>
</table>
<%@ include file="../newbottom.jsp"%>
</body>
</html>

⌨️ 快捷键说明

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