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

📄 infopressmate_g.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
字号:
<!-------------------------------------------------------------
* @ name: infopressmate_g.jsp
* @ Author : ranxu 
* @ date :2008-06-06
-------------------------------------------------------------->

<%@ page import='java.io.*,java.text.*,java.util.Date,java.util.*, 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:knowmate_s.jap or knowmate_k.jap
	-------------------------------------------------------------------------------------------------------*/
	String hostNickname = java.net.URLDecoder.decode(makeKOR(request.getParameter("nickname")));
	String mphone = request.getParameter("mphone");
	String gphone = request.getParameter("gphone");
	/*------------------------------------------------------------------------------------------------------
	 +	parameter of current page
	 -------------------------------------------------------------------------------------------------------*/
	String guestNickname = "";
	
	/*------------------------------------------------------------------------------------------------------
	 +	DB 
	 -------------------------------------------------------------------------------------------------------*/
	PreparedStatement pstmt = null;
	Connection con = null;
	Statement stmt = null;
	ResultSet rs = null;
	String sql = null;
	int ret = -1;
	
	
	
	try
	{
	
	
	
	/*------------------------------------------------------------------------------------------------
	 *		DB 目池记
	 -------------------------------------------------------------------------------------------------*/
	%><%@ include file="../getConnection.jsp"%><%
	/*------------------------------------------------------------------------------------------------
	 *		All Quiz answerCount
	 -------------------------------------------------------------------------------------------------*/
	
	
	
	
	
	
	/*------------------------------------------------------------------------------------------------------
	 +	guestNickname
	 -------------------------------------------------------------------------------------------------------*/

	//con = DBConnector.getConnection(db_name);
	//if (con == null) {
	//	return;
	//}
	sql = " select nickname from gt_user_info where phonenum='"+mphone+"'";
	pstmt = con.prepareStatement(sql);			
	rs = pstmt.executeQuery();
	if (rs.next()) {
		guestNickname = rs.getString("nickname");
	}
	rs.close();
	pstmt.close();
	
	/*------------------------------------------------------------------------------------------------
			insert  info of the guest who answered all questions  
	 		add by ranxu 2008-06-10
	 -------------------------------------------------------------------------------------------------*/

	if(!guestNickname.equals("")){
		
	 	sql = "insert into gt_lucky_request  (phonenum,guest_phone,nickname) values (?,?,?)";
	
		pstmt = con.prepareStatement(sql);
		
		pstmt.setLong(1,Long.parseLong(gphone));
		
		pstmt.setLong(2,Long.parseLong(mphone));
		
		pstmt.setString(3,guestNickname);
		
		ret = pstmt.executeUpdate();
		if(ret==-1){		
			return;
		}
		pstmt.close();
	}
	
	// QVGA HTML
	//
	if( isQVGA )
	{
		%><%@ include file="/html/infopressmate_g.jsp"%><%
	}
	// QCIF HTML
	//
	else
	{
		%><%@ include file="/html/qcif/infopressmate_g.jsp"%><%
	}
		}
	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 + -