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

📄 lovemng_zp.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<!--------------------------------------------------------------------------------------------------------------
*@霸烙皋牢
*@Author : zhou peng(2008-06-05)


--------------------------------------------------------------------------------------------------------------->

<%@ 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"%>
<%@ include file="../common_func.jsp"%>
<%!
	public static String isNull(String str) 
	{ 
		if (str == null) 
		return ""; 
		else 
		return str;
	} 
%>
<%
/**
	 *	
	 *
	 *	@ version			:	1.0.0
	 *	@ author			:	zhou peng ( pengzhou@isoftstone.com )
	 *	@ last modified	:	2008-05-23
	 */
	/*------------------------------------------------------------------------------------------------------
	+		扁夯 颇扼固磐
	-------------------------------------------------------------------------------------------------------*/
	String mphone= request.getParameter("mphone");
	String gphone= request.getParameter("gphone");
	//mphone = "1020591111";
	//gphone = "1020592222";



	/*------------------------------------------------------------------------------------------------------
	+	傈开 函荐
	-------------------------------------------------------------------------------------------------------*/
	String		sql					= null;
	String		strNickname			= null;
	String		strOppNickname		= null;
	int			age					= 0;
	int			sex					= 1;
	int			sysYear				= 0;
	int			answerCount			= 0;
	int			questionCount		= 0;
	int			oppCount			= 0;
	int			taroCount			= 0;
	int			oppRightCount		= 0;
	String		strGuestphone		= null;
	int 		attentionPoint 		= 0;
	int			myAttentionPoint	= 0;
	String		title				= null;
	String		answer				= null;
	String		regdate				= null;
	String		guestPhone			= null;
	String		text				= null;
	// 其捞瘤 备泅 眠啊 函荐 
	int 		pagesize 			= 4;  // 茄其捞瘤寸 10俺 免仿拱

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

	int 		absolutepage		= 1;  // 例措 困摹 其捞瘤 锅龋
    int 		dbcount				= 0;   //  DB 救俊 臂 肮荐 历厘 函荐
	int 		isNoPage 			= 0;	//茄俺档 绝蠢衬.. 绝栏搁0, 乐栏搁1
	String		szCount				= null;
	String 		pageurl 			= null;
	int queryCondition = 0;
	
	if(request.getParameter("queryCondition")!=null) queryCondition=Integer.parseInt(request.getParameter("queryCondition")); else queryCondition=0;
	
	
	/*------------------------------------------------------------------------------------------------------
	+	DB 包访 函荐
	-------------------------------------------------------------------------------------------------------*/
	Connection				con		= null;
	PreparedStatement		pstmt	= null;
	Statement				stmt	= null;
	ResultSet				rs		= null;
	ResultSet 				pageset = null;
	ResultSet				rs1		= null;
	
	try
	{
	
	/*------------------------------------------------------------------------------------------------
	 *		DB 目池记
	 -------------------------------------------------------------------------------------------------*/
	%><%@ include file="../getConnection.jsp"%><%
	/*------------------------------------------------------------------------------------------------
	 *		My nickName
	 -------------------------------------------------------------------------------------------------*/

	sql = " select  nickname from GT_User_Info WITH (READUNCOMMITTED) WHERE   phonenum='"+mphone+"'" ; 

	pstmt = con.prepareStatement(sql);
	
	rs = pstmt.executeQuery();
		 
	if( rs.next() )
	{
		strNickname = rs.getString("nickname");
	}else{
		strNickname = "绝澜";
	}
	rs.close();
	pstmt.close();
	/*------------------------------------------------------------------------------------------------
	 *		pageCount
	 -------------------------------------------------------------------------------------------------*/
	sql = "select count(*) dbcount  from ( ";
	sql = sql +" select a.sex , a.phonenum , a.nickname , (substring(convert(varchar(8),getDate(),112),0,5)-a.year+1) age , max(b.text) text , max(b.regdate) regdate   from  gt_lucky_love b WITH (READUNCOMMITTED), GT_User_Info a WITH (READUNCOMMITTED)";
	sql = sql + "where (a.phonenum in (select phonenum from gt_lucky_love where phonenum!="+Long.parseLong(mphone)+" and guest_phone="+Long.parseLong(mphone)+") or a.phonenum in (select guest_phone from  gt_lucky_love WITH (READUNCOMMITTED) where phonenum="+Long.parseLong(mphone)+" and guest_phone!="+Long.parseLong(mphone)+"))";
	sql = sql +" group by a.phonenum , a.nickname ,a.year , a.sex) m WITH (READUNCOMMITTED) left join gt_lucky_attention_point n WITH (READUNCOMMITTED) on m.phonenum = n.guest_phone where n.phonenum ="+Long.parseLong(mphone);
	
	pstmt = con.prepareStatement(sql);
	
	pageset = pstmt.executeQuery();
	
	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;
	}
	/*------------------------------------------------------------------------------------------------
	 *		guestPhone List
	 -------------------------------------------------------------------------------------------------*/
	 //sql = "select us.nickname,us.sex,(substring(convert(varchar(8),getDate(),112),0,5)-us.year) age,co.phonenum,convert(char(10),co.regdate,102) regdate,ta.text  ";
		//sql = sql +" from gt_lucky_taro ta,gt_lucky_taro_comment co,GT_User_Info us where ta.idx=co.taro_idx and us.phonenum=co.phonenum and ta.phonenum='"+mphone+"' order by co.regdate desc" ; 
		sql = "select m.sex , m.phonenum , m.nickname ,m.age,m.text ,convert(char(10),m.regdate,102) regdate ,isNull(n.attention_point,0) attention_point  from ( ";
		sql = sql +" select a.sex , a.phonenum , a.nickname , (substring(convert(varchar(8),getDate(),112),0,5)-a.year+1) age , max(b.text) text , max(b.regdate) regdate   from  gt_lucky_love b WITH (READUNCOMMITTED), GT_User_Info a WITH (READUNCOMMITTED)";
		sql = sql + "where (a.phonenum in (select phonenum from gt_lucky_love WITH (READUNCOMMITTED) where phonenum!="+Long.parseLong(mphone)+" and guest_phone="+Long.parseLong(mphone)+") or a.phonenum in (select guest_phone from  gt_lucky_love WITH (READUNCOMMITTED) where phonenum="+Long.parseLong(mphone)+" and guest_phone!="+Long.parseLong(mphone)+"))";
	
	if (queryCondition == 0){
	
		sql = sql +" group by a.phonenum , a.nickname ,a.year , a.sex) m left join gt_lucky_attention_point n on m.phonenum = n.guest_phone where n.phonenum ="+Long.parseLong(mphone)+" order by regdate asc ";
		
	}else if (queryCondition == 1){
	
		sql = sql +" group by a.phonenum , a.nickname ,a.year , a.sex) m left join gt_lucky_attention_point n on m.phonenum = n.guest_phone  order by  where n.phonenum ="+Long.parseLong(mphone)+" attention_point desc ";
		
	}else if (queryCondition == 2){
		
		sql = sql +" group by a.phonenum , a.nickname ,a.year , a.sex) m left join gt_lucky_attention_point n on m.phonenum = n.guest_phone  order by  where n.phonenum ="+Long.parseLong(mphone)+" attention_point asc ";
		
	}else if (queryCondition == 3){
	
		sql = sql +" group by a.phonenum , a.nickname ,a.year , a.sex) m left join gt_lucky_attention_point n on m.phonenum = n.phonenum  where n.guest_phone ="+Long.parseLong(mphone)+" order by attention_point desc";
		
	}else if (queryCondition == 4){
	
		sql = sql +" group by a.phonenum , a.nickname ,a.year , a.sex) m left join gt_lucky_attention_point n on m.phonenum = n.phonenum where n.guest_phone ="+Long.parseLong(mphone)+"   order by attention_point asc ";
				
	}
	pstmt = con.prepareStatement(sql);
	
	rs = pstmt.executeQuery();
	
	if(!rs.next()) // 蔼捞 绝阑锭
	{
		isNoPage = 1;
		pagesize=0;
	}
	else         // 蔼捞 乐阑锭	//rs.absolute(absolutepage);
	{				
		for(int s=0; s<absolutepage-1; s++)
			rs.next();
	}
 %>

<html>
<head>
	<link href="http://entaz.mugeta.com/client/mugeta_v2_test/web/user/mobile.css" rel="stylesheet" type="text/css">
	<title>权 > <%=strNickname%>丛狼 迄乔 > 家匡皋捞飘 > 局沥</title>
</head>
<body>
<form name="form1" action="LoveMng_zp.jsp" method="post">
<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="#c789ff"></td>
				</tr>
				<tr>
					<td width="6" height="14" bgcolor="#9819e9"></td>
					<td height="14" bgcolor="#9819e9"><font color="#ffffff">公霸鸥 局沥 包府</font></td>
				</tr>
				<tr>
					<td colspan="2" height="2" bgcolor="#c789ff"></td>
				</tr>
				<tr>
					<td colspan="2" height="1" bgcolor="#9819e9"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--鸥捞撇 场-->

	<!--咯归 矫累-->
	<tr>
		<td height="4"></td>
	</tr>
	<!--咯归 场-->
	
	<!--沥纺 急琶 矫累-->
	<tr>
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="5"></td>
					<td width="95" align="center">
						<input name="mphone" type="hidden" value="<%=mphone%>">
						<select name="queryCondition" size="1">
							<option value="0" <%if(queryCondition==0) out.print("selected"); %>> 弥辟 局沥 夯 </option>
							<option value="1" <%if(queryCondition==1) out.print("selected"); %>> 郴霸 包缴档 臭篮 </option>
							<option value="2" <%if(queryCondition==2) out.print("selected"); %>> 郴霸 包缴档 撤篮 </option>
							<option value="3" <%if(queryCondition==3) out.print("selected"); %>> 郴啊 包缴 腹篮 </option>
							<option value="4" <%if(queryCondition==4) out.print("selected"); %>> 郴啊 包缴 利篮 </option>
						</select>
					</td>
					<td width="15"></td>
					<td width="60" align="center" bgcolor="#c789ff"><font color="#ffffff"><a href="javascript:document.form1.submit()">鉴栏肺 焊扁</a></font></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--沥纺 急琶  场-->
	
	<!--咯归 矫累-->
	<tr>
		<td height="5"></td>
	</tr>
	<!--咯归 场-->

	<tr>
		<td>
			<!--捞傈/促澜 傅农 冠胶 矫累-->
			<table width="176" bgcolor="#e8f2f2" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="10" bgcolor="#e8f2f2" align="center">
					<%
				    pageurl=url_path+"/soulmate/LoveMng_zp.jsp?mphone="+mphone;
				    out.println(pagePath(pageurl, dbcount, pageNUM, pagecount));
				   	%>
					</td>
				</tr>
			</table>
			<!--捞傈/促澜 傅农 冠胶 场-->
		</td>
	</tr>
	
	<!--咯归 矫累-->
	<tr>
		<td height="5"></td>
	</tr>
	<!--咯归 场--> 
	<%

⌨️ 快捷键说明

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