📄 infolovematch_g.jsp.svn-base
字号:
<!-------------------------------------------------------------
* @ 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);
//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
-------------------------------------------------------------------------------------------------------*/
System.out.println(((lovePoint+1)/2)+"===((lovePoint+1)/2)");
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
-------------------------------------------------------------------------------------------------*/
//con = DBConnector.getConnection(db_name);
//if (con == null) {
// return;
//}
sql="exec GT_SendMessage ?,?,?,?";
pstmt = con.prepareStatement(sql);
pstmt.setLong(1, Long.parseLong(mphone));
pstmt.setLong(2, Long.parseLong(gphone));
pstmt.setString(3, "公霸鸥 局沥款 嘎眠扁");
pstmt.setString(4, comment);
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();
// QVGA HTML
//
if( isQVGA )
{
%><%@ include file="/html/infolovematch_g.jsp"%><%
}
// QCIF HTML
//
else
{
%><%@ include file="/html/qcif/infolovematch_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 + -