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

📄 infolovematch_g.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
字号:
<!-------------------------------------------------------------
* @ name: infolovematch_g.jsp
* @ Author : ranxu 
* @ date :2008-06-11
-------------------------------------------------------------->
<%@ 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"%>
<%@ include file="../makeKOR.jsp"%>
<%
/*------------------------------------------------------------------------------------------------------
	 parameter from last page
	-------------------------------------------------------------------------------------------------------*/
	
	String hostNickname = java.net.URLDecoder.decode(makeKOR(request.getParameter("hostNickname")));
	String mphone = request.getParameter("mphone");
	String gphone = request.getParameter("gphone");
	String str_lovePoint = java.net.URLDecoder.decode(makeKOR(request.getParameter("lovePoint")));
	int lovePoint = Integer.parseInt(str_lovePoint);
	
	boolean str_Flag = true;
	
	
	String riqi = null;
	
	Date regdater = new Date();
	SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
	riqi = sf.format(regdater);
	
	
	boolean haveDateOne = true;
	boolean haveDate = true;
	
	
	//System.out.println(lovePoint+"==lp");
	
	/*------------------------------------------------------------------------------------------------------
	 +	DB 
	 -------------------------------------------------------------------------------------------------------*/
	PreparedStatement pstmt = null;
	Connection con = null;
	Statement stmt = null;
	ResultSet rs = null;
	String sql = null;
	int ret = -1;
	
	/*------------------------------------------------------------------------------------------------------
	 +	parameter of current page
	 -------------------------------------------------------------------------------------------------------*/
	 String comment = hostNickname+"丛苞 公霸鸥 局沥款阑 焊聪 漂喊洒<br> 亮篮 款捞 唱客辑 青款阑 唱床 靛妨夸.<br><br>"+
	 				  "*努肺滚 "+((lovePoint+1)/2)+"俺甫 辑肺 罐栏继嚼聪促.";
	 String hostText = "公霸鸥 局沥 唱串";
	 String guestText = "公霸鸥 局沥 唱串";
	 long hostPhone_db = 0;
	 long guestPhone_db = 0;
	/*------------------------------------------------------------------------------------------------------
	 +	send message
	 -------------------------------------------------------------------------------------------------------*/
	 
	 
	 
	 try
	{
	
	
	
	/*------------------------------------------------------------------------------------------------
	 *		DB 目池记
	 -------------------------------------------------------------------------------------------------*/
	%><%@ include file="../getConnection.jsp"%><%
	/*------------------------------------------------------------------------------------------------
	 *		All Quiz answerCount
	 -------------------------------------------------------------------------------------------------*/
	
	
	
	
	
	
	sql = "SELECT * FROM GT_LUCK_POINT_DATE WHERE mphone = ? and gphone = ?";
	pstmt = con.prepareStatement(sql);
	pstmt.setLong(1,Long.parseLong(mphone));
	pstmt.setLong(2,Long.parseLong(gphone));
	rs=pstmt.executeQuery();
	if(rs.next()){
		
	}else{
		haveDateOne = false;
	}
	rs.close();
	pstmt.close();
	
	
	if(haveDateOne){
		sql = "SELECT * FROM GT_LUCK_POINT_DATE WHERE mphone = ? and gphone = ? and left(send_point_date,10) > left(getdate()-2,10)";
		pstmt = con.prepareStatement(sql);
		pstmt.setLong(1,Long.parseLong(mphone));
		pstmt.setLong(2,Long.parseLong(gphone));
		rs=pstmt.executeQuery();
		if(rs.next()){
			haveDate = false;
			str_Flag = false;
		}
		rs.close();
		pstmt.close();
		
		
		if(haveDate){
			sql = "UPDATE GT_LUCK_POINT_DATE SET send_point_date = getdate() WHERE gphone = ? and mphone = ?";
			pstmt = con.prepareStatement(sql);
			pstmt.setLong(1,Long.parseLong(gphone));
			pstmt.setLong(2,Long.parseLong(mphone));
			ret = pstmt.executeUpdate();
			pstmt.close();
		}
	}else{
		sql = "insert into gt_luck_point_date (mphone,gphone,send_point_date) values (?,?,getdate())";
		pstmt = con.prepareStatement(sql);
		pstmt.setLong(1,Long.parseLong(mphone));
		pstmt.setLong(2,Long.parseLong(gphone));
		ret = pstmt.executeUpdate();
		pstmt.close();
	}
	
	
	
	
	
	
	//sql="select * from GT_paper_recv where (phonenum = ? and phonenum_my = ?) or (phonenum = ? and phonenum_my = ?)";
	
	//pstmt = con.prepareStatement(sql);
	//pstmt.setLong(1, Long.parseLong(mphone));
	//pstmt.setLong(2, Long.parseLong(gphone));
	//pstmt.setLong(3, Long.parseLong(gphone));
	//pstmt.setLong(4, Long.parseLong(mphone));
	//rs = pstmt.executeQuery();
	//if (rs.next()) {
	//	str_Flag = false;
	//}
	//rs.close();
	//pstmt.close();
	
	
	
	 
	 if(haveDate){
	 	
	 
	 
		//con = DBConnector.getConnection(db_name);
		//if (con == null) {
		//	return;
		//}
		sql="exec GT_SendMessage2_beta ?,?,?,?,?";
		pstmt = con.prepareStatement(sql);
		pstmt.setString(1, mphone);
		pstmt.setString(2, gphone);
		pstmt.setString(3, "公霸鸥 局沥款 嘎眠扁");
		pstmt.setString(4, comment);
		pstmt.setInt(5, 0);
		ret = pstmt.executeUpdate();
		pstmt.close();
		/*------------------------------------------------------------------------------------------------------
		 +	 guest  lovePoint/2
		 -------------------------------------------------------------------------------------------------------*/
		sql="exec GT_money_input ?,?,?";
		pstmt = con.prepareStatement(sql);
		pstmt.setLong(1, Long.parseLong(mphone));
		pstmt.setString(2, guestText);
		pstmt.setInt(3,((lovePoint+1)/2));
		ret = pstmt.executeUpdate();
		//System.out.println("ret1==="+ret);
		pstmt.close();
		/*------------------------------------------------------------------------------------------------------
		 +	host lovePoint/2 
		 -------------------------------------------------------------------------------------------------------*/
		sql="exec GT_money_input ?,?,?";
		pstmt = con.prepareStatement(sql);
		pstmt.setLong(1, Long.parseLong(gphone));
		pstmt.setString(2, hostText);
		pstmt.setInt(3,((lovePoint+1)/2));
		ret = pstmt.executeUpdate();
		//System.out.println("ret2==="+ret);
		pstmt.close();
		/*------------------------------------------------------------------------------------------------------
		 +	gt_lucky_love:update flag 0 --> 1 
		 -------------------------------------------------------------------------------------------------------*/
		 if( Long.parseLong(mphone)>Long.parseLong(gphone)){
		 	hostPhone_db = Long.parseLong(mphone);
		 	guestPhone_db = Long.parseLong(gphone);
		 }else{
		 	hostPhone_db = Long.parseLong(gphone);
		 	guestPhone_db = Long.parseLong(mphone);
		 }
		sql="update gt_lucky_love set flag = 1 where phonenum =? and guest_phone = ?";
		pstmt = con.prepareStatement(sql);
		pstmt.setLong(1, hostPhone_db);
		pstmt.setLong(2, guestPhone_db);	
		ret = pstmt.executeUpdate();
		//System.out.println("ret3==="+ret);
		pstmt.close();
		
		sql = "select * from gt_lucky_attention_point WITH (READUNCOMMITTED) where phonenum=? and guest_phone=? ";
		pstmt = con.prepareStatement(sql);
		pstmt.setLong(1,Long.parseLong(gphone));
		pstmt.setLong(2,Long.parseLong(mphone));
		rs=pstmt.executeQuery();
		if(rs.next()){
			sql = "update gt_lucky_attention_point set attention_point=attention_point+2 where phonenum=? and guest_phone=?";
			pstmt = con.prepareStatement(sql);
			pstmt.setLong(1,Long.parseLong(gphone));
			pstmt.setLong(2,Long.parseLong(mphone));
			ret = pstmt.executeUpdate();
			pstmt.close();
		}else{
			sql = "insert into gt_lucky_attention_point (phonenum,guest_phone,attention_point,attention_point_old,regdate) values (?,?,?,?,?)";
			pstmt = con.prepareStatement(sql);
			pstmt.setLong(1,Long.parseLong(gphone));
			pstmt.setLong(2,Long.parseLong(mphone));
			pstmt.setLong(3,2);
			pstmt.setLong(4,0);
			pstmt.setString(5,riqi);
			ret = pstmt.executeUpdate();
			pstmt.close();
		}
		rs.close();
	
	}
 %>
<html>
<head>
	<link href="http://entaz.mugeta.com/client/mugeta_v2_test/web/user/mobile.css" rel="stylesheet" type="text/css">
	<title>权> 公霸鸥 局沥 嘎眠扁</title>
</head>
<body>

<!--剧侥
  <tr>
     <td>
          <table width="176" border="0" cellspacing="0" cellpadding="0">
             <tr>  
  	    <td></td>
      	   </tr>
          </table>
     </td>
  </tr>
-->
<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"  bgcolor="#dae6e8"" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="3" height="3"></td>
				</tr>
				<tr>
					<td width="3"></td>
					<td>
						<table width="170"  bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td colspan="3" height="15"></td>
							</tr>

							<!--臂郴侩 矫累-->
							<%if(str_Flag){ %>
								<tr>
									<td></td>
									<td  width="156" align="center"><font color="#9819e9"><%=hostNickname %></font>丛俊霸<br>
																																			公霸鸥 局沥 搬苞客 鞍捞<br>
																																			努肺滚甫 唱穿绢 靛啡嚼聪促.<br><br>
																																			坷疵档 榴芭款 窍风 登技夸.^^</td>
									<td></td>
								</tr>
							<%}else{ %>
								<tr>
									<td></td>
									<td  width="156" align="center">捞固 <font color="#9819e9"> <%=hostNickname %></font>丛俊霸<br>
																																			公霸鸥 局沥 搬苞客 鞍捞<br>
																																			努肺滚甫 唱穿绢  靛啡绢夸~<br><br>
																																			坷疵档 榴芭款 窍风 登技夸.^^</td>
									<td></td>
								</tr>
							<%} %>
							<!--臂郴侩 场-->

							<tr>
								<td colspan="3" height="15"></td>
							</tr>
						</table>
					</td>
					<td width="3"></td>
				</tr>
				<tr>
					<td colspan="3" height="3"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--臂 冠胶 场-->

	<tr>
		<td height="3"></td>
	</tr>
	
	<!--滚瓢 矫累-->
	<tr> 
		<td>
			<table width="176" height="16" border="0" cellspacing="0" cellpadding="0">	
				<tr>
					<td></td>
					<td width="35" height="16" bgcolor="#bd7eff" align="center"><a href="<%=url_path%>/soulmate/soulmate_g.jsp?mphone=<%=mphone%>&gphone=<%=gphone %>"><font color="#ffffff">犬牢</font></a></td>
					<td></td>
				</tr>
			</table>
		</td>
	</tr>
<!--滚瓢 场-->

<!--咯归 矫累-->
  <tr>
    <td height="13"></td>
  </tr>
<!--咯归 场--> 

<!--窍窜 版肺钎矫 矫累-->
	<tr>
		<td>
			<table width="176" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="10" bgcolor="#BBC7C8"></td>
					<td width="156" bgcolor="#DAE6E8" height="15">&nbsp;<a href="<%=url_path+"/main.jsp?mphone="+mphone+"&gphone="+gphone%>">权</a>&gt;
																		<a href="<%=url_path%>/mypage/my_confirm.jsp?mphone=<%=mphone%>&gphone=0<%=gphone%>"><%=hostNickname%>丛狼 迄乔</a></td>
					<td width="10" bgcolor="#BBC7C8"></td>
				</tr>
				<tr>
					<td width="10" bgcolor="#BBC7C8"></td>
					<td width="156" bgcolor="#DAE6E8" height="15">&nbsp;&nbsp;&nbsp;&nbsp;&gt;<a href="<%=url_path%>/soulmate/soulmate_g.jsp?mphone=<%=mphone%>&gphone=<%=gphone %>">家匡皋捞飘</a>&gt;局沥</td>
					<td width="10" bgcolor="#BBC7C8"></td>
				</tr>
			</table>
		</td>
	</tr>
<!--窍窜 版肺钎矫 场-->

</table>
<!--窍窜 版肺钎矫 矫累-->
		<%@ include file="../newbottom.jsp"%>
<!--窍窜 版肺钎矫 场-->
</body>
</html>



<%
		}
	catch(Exception e)
	{
		throw e;
	}
	finally
	{ 
		if ( rs != null ) { try { rs.close(); } catch ( Exception e ) { } }
		if ( stmt != null ) { try { stmt.close(); } catch ( Exception e ) { } }
		if ( con != null ) { try { con.close(); } catch ( Exception e ) { } }
	}
%>

⌨️ 快捷键说明

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