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

📄 soulmate_g.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<!-------------------------------------------------------------
* @ name: soulmate_g.jsp
* @ Author : ranxu 
* @ date :2008-06-04
-------------------------------------------------------------->
<%@ 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"%>
<%! 
	int SEX_MALE = 1;
	int SEX_FEMALE = 2;
	
	public String getSex(int key) 
	{
		String ret = "";
		if(key==SEX_MALE){
			ret = "巢己";
		}else if(key==SEX_FEMALE){
			ret = "咯己"; 
		}
		return ret;
	}	
%>
<%
	
    /*------------------------------------------------------------------------------------------------------
	 parameter from last page:knowmate_s.jap or knowmate_k.jap
	 -------------------------------------------------------------------------------------------------------*/
	String mphone= request.getParameter("mphone");
	String gphone= request.getParameter("gphone");
	System.out.println(mphone+"===mphone");
	
	/*------------------------------------------------------------------------------------------------------
	+	DB 
	-------------------------------------------------------------------------------------------------------*/
	PreparedStatement pstmt = null;
	Connection con = null;
	Statement stmt = null;
	ResultSet rs = null;
	String sql = null;
	int ret = -1;
	/*------------------------------------------------------------------------------------------------------
	 +	init parameter of current page
	 -------------------------------------------------------------------------------------------------------*/
	String nickname = "";
	int age = 0;
	int sex = 0;
	int attentionPoint = 0;
	String title = "";
	String title_taro ="";
	int idx_taro = 0;
	/*-------------------------------------------------------------------------------------------------------
	+	host's info
	-------------------------------------------------------------------------------------------------------*/		
	con = DBConnector.getConnection(db_name);
	if( con == null )
	{		
		return;
	}	
	sql = " select nickname,sex,(substring(convert(varchar(8),getDate(),112),0,5)-year+1) age,attention_point "
		+" from Gt_user_info a, gt_lucky_attention_point b where a.phonenum=b.phonenum and a.phonenum=?";//'"+gphone+"'";	
	pstmt = con.prepareStatement(sql); 
	pstmt.setString(1,gphone);
	rs=pstmt.executeQuery();	
	if(rs.next()){
		nickname = rs.getString("nickname");
		sex = rs.getInt("sex");
		age = rs.getInt("age");
		attentionPoint = rs.getInt("attention_point");
	}
	rs.close();
	pstmt.close();
	
	/*-------------------------------------------------------------------------------------------------------
	+	unanswered title
	-------------------------------------------------------------------------------------------------------*/	
	con = DBConnector.getConnection(db_name);
	if( con == null )
	{		
		title="";
		return;		
	}
	sql = " select top 1 a.* from gt_lucky_quiz_mylog a,gt_lucky_quiz b"+
		  " where a.quiz_idx = b.idx and b.flag=1 "+
		  " and a.phonenum =? and a.guest_phone=? "+
		  " and a.quiz_idx not in "+
		  " (select distinct a.quiz_idx from gt_lucky_quiz_mylog a,gt_lucky_quiz b"+
		  " where  a.quiz_idx = b.idx and b.flag=1 "+
		  " and a.phonenum =? and a.guest_phone =? "+
		  " )order by a.idx desc";
	pstmt = con.prepareStatement(sql);
	pstmt.setLong(1,Long.parseLong(gphone));
	pstmt.setLong(2,Long.parseLong(gphone));
	pstmt.setLong(3,Long.parseLong(gphone));
	pstmt.setLong(4,Long.parseLong(mphone));
	rs=pstmt.executeQuery();
	if(rs.next()){
		title = rs.getString("title");
		
	}
	rs.close();
	pstmt.close();
	
	/*-------------------------------------------------------------------------------------------------------
	+	unanwered taro title
	-------------------------------------------------------------------------------------------------------*/	
	con = DBConnector.getConnection(db_name);
	if( con == null )
	{		
		title_taro="";
		return;		
	}
	 
	sql = " select top 1 a.* from gt_lucky_taro a,gt_lucky_taro_comment b"+
		  " where  a.phonenum= ?"+//gphone
		  // " and b.phonenum !=? "+
		  " order by a.idx desc ";//mphone
	pstmt = con.prepareStatement(sql);
	pstmt.setLong(1,Long.parseLong(gphone));
	//pstmt.setLong(2,Long.parseLong(mphone));
	rs=pstmt.executeQuery();
	if(rs.next()){
		idx_taro = rs.getInt("idx");
		title_taro = rs.getString("text");		
	}
	rs.close();
	pstmt.close();
 %>
<html>
<head>
	<link href="http://entaz.mugeta.com/client/mugeta_v2_test/web/user/mobile.css" rel="stylesheet" type="text/css">
	<title>权> <%=nickname%>丛狼 迄乔 > 家匡皋捞飘</title>
</head>
<body>

<!--剧侥
  <tr>
     <td>
          <table width="240" border="0" cellspacing="0" cellpadding="0">
             <tr>  
  	    <td></td>
      	   </tr>
          </table>
     </td>
  </tr>
-->
<form name="form1" action="knowmate_s.jsp" method="post">
<input type="hidden" name="mphone" value="<%=mphone%>">
<input type="hidden" name="gphone" value="<%=gphone%>">
<input type="hidden" name="nickname" value="<%=nickname%>">
<input type="hidden" name="status" value="insertOne">
<table width="240" border="0" cellspacing="0" cellpadding="0">
	<!--鸥捞撇 矫累-->
	<tr>
		<td>
			<table width="240" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="2" height="2" bgcolor="#c789ff"></td>
				</tr>
				<tr>
					<td width="10" height="15" bgcolor="#9819e9"></td>
					<td height="15" 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="8"></td>
	</tr>
	<!--咯归 场-->
	
	<!--家匡皋捞飘 冠胶1 矫累-->
	<tr>
		<td >
			<table width="240" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="7"></td>
					<td width="226">
						<table width="226" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<!--酒官鸥 矫累-->
								<td width="54">
									<table width="54" bgcolor="#e8f2f2" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td colspan="3" height="3"></td>
										</tr>
										<tr>
											<td width="3"></td>
											<td valign="top"><img src="<%=ava_path%>display_thumb.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>" width="48" height="54"></td>
											<td width="3"></td>
										</tr>
										<tr>
											<td colspan="3" height="3"></td>
										</tr>
									</table>
								</td>
								<!--酒官鸥 场-->

								<!--郴侩 矫累-->
								<td width="172">
									<table width="172" border="0" cellspacing="0" cellpadding="0">	
										<tr>
											<td width="5"></td>
											<td width="107" height="17"><b><%=nickname%></b></td>
											<td><font color="#909090"><%=getSex(sex) %> (<%=age %>)</font></td>
										</tr>
										<tr>
											<td width="5"></td>
											<td colspan="2"><font color="#909090"><%=nickname%>丛俊 措茄 包缴档</font><br>
											<font color="#ffa6d6">
											<%
											if(attentionPoint>=24){
											%>
												<%=nickname %>丛阑 亮酒窍绊 乐绢夸~
											<%												
											}else if(attentionPoint>=20 && attentionPoint<=23){
											%>
												<%=nickname %>丛俊霸 包缴捞 乐绢夸~
											<%
											}else{
											
												for(int i=0;i<attentionPoint/4;i++){
											%>
											<%
												}
												if(attentionPoint%4>=2){
											%>
											<% 
												}
											}
											%>											
											</font></td>
										</tr>
									</table>
								</td>
								<!--郴侩 场-->
							</tr>
						</table>
					</td>
					<td width="7"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--家匡皋捞飘 冠胶1 场-->
	
	<!--咯归 矫累-->
	<tr>
		<td height="8"></td>
	</tr>
	<!--咯归 场-->
	
	<!--龙巩/措翠 冠胶 矫累-->
	<tr>
		<td>
			<table width="240"  bgcolor="#ecaaff" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="3" height="3"></td>
				</tr>
				<tr>
					<td width="3"></td>
					<td>
						<!--殿废等 龙巩 郴侩 矫累-->
						<table width="234"  bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td colspan="3" height="5"></td>
							</tr>
							<tr>
								<td colspan="3" align="center"><font color="#9819e9"><b><%=nickname %>丛苞 唱客狼 龙巩 措翠!</b></font></td>
							</tr>

							<!--备盒扼牢 矫累-->
							<tr>
								<td></td>
								<td align="center"><font color="#cccccc" size="3">············································</font></td>
								<td></td>
							</tr>
							<!--备盒扼牢 场-->
							
							<!--龙巩郴侩 矫累-->
							<tr>
								<td width="5"></td>
								<td>
								<%if(title==""){
								%>
									<center><font color="#9819e9"><%=nickname%>丛捞</font></center>
									<font color="#9819e9"><center>钱绢夯 柠令啊 歹 绝匙夸.</center></font>
									<font color="#9819e9"><center>T_T</center></font>			
								<%

⌨️ 快捷键说明

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