📄 answerdetail.jsp
字号:
<!------------------------------------------------------------------
* @ 权> Xxx丛狼 迄乔 > 家匡皋捞飘 > 鸥肺痢
* @ Author : cm ( 2008-05-21 )
* @ Images : temp_01.png - 墨靛
temp_03.png - 酒官鸥
--------------------------------------------------------------------->
<%@ 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;
}
%>
<%
/*------------------------------------------------------------------------------------------------------
+ 扁夯 颇扼固磐
-------------------------------------------------------------------------------------------------------*/
String mphone = request.getParameter("mphone");
String gphone = request.getParameter("gphone");
String id1 = request.getParameter("idx");
int idx = Integer.parseInt(id1);
/*------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
-------------------------------------------------------------------------------------------------------*/
Connection con = null;
PreparedStatement pstmt=null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageset = null;
/*------------------------------------------------------------------------------------------------------
+ 傈开 函荐
-------------------------------------------------------------------------------------------------------*/
String query1=null , query2 = null ,query3 = null,sql = null;
int phonenum = 0;
String text = "";
String friendName = "";
String friendNickName = null;
int friendNum = 0;
String cardName = null;
String answer = null;
int cardIdx = 0;
String explan = null;
int date = 0;
String str_date = null;
String year = null;
String month = null;
String day = null;
String name = "";
%>
<%
try
{
/*------------------------------------------------------------------------------------------------
* DB 目池记
-------------------------------------------------------------------------------------------------*/
%><%@ include file="../getConnection.jsp"%><%
con.setAutoCommit(false);
stmt=con.createStatement();
/*------------------------------------------------------------------------------------------------
* 匙 name 阑 啊廉柯促
-------------------------------------------------------------------------------------------------*/
sql = "select name from GT_user_info where phonenum = '"+ mphone+"'";
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next()){
name = rs.getString(1);
}
/*------------------------------------------------------------------------------------------------
* 龙巩 惑技
-------------------------------------------------------------------------------------------------*/
query1 = "select nregdate ,text from GT_LUCKY_TARO where idx = "+idx;
pstmt = con.prepareStatement(query1);
rs = pstmt.executeQuery();
if(rs.next()){
date = rs.getInt(1);
text = rs.getString(2);
str_date = String.valueOf(date);
year = str_date.substring(0,4);
month = str_date.substring(4,6);
day = str_date.substring(6,str_date.length());
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 翠函 惑技
-------------------------------------------------------------------------------------------------*/
query2 ="select D.cardname,D.idx as cardidx,D.explan,T.Taro_card_idx " +
" from GT_taro_db as D inner join GT_LUCKY_TARO_COMMENT as T " +
" on D.idx = T.Taro_card_idx" +
" where T.Taro_idx="+idx;
pstmt = con.prepareStatement(query2);
rs = pstmt.executeQuery();
if(rs.next()){
cardName = rs.getString(1);
cardIdx = rs.getInt(2);
explan = rs.getString(3);
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 翠函磊 惑技
-------------------------------------------------------------------------------------------------*/
query3 = "select U.name,T.text as answer ,T.phonenum as friendNum ,U.nickname as friendNickname" +
" from GT_user_info as U inner join GT_LUCKY_TARO_COMMENT as T "+
" on convert(bigint,U.phonenum)= T.phonenum "+
" where T.Taro_idx="+idx ;
pstmt = con.prepareStatement(query3);
rs = pstmt.executeQuery();
if(rs.next()){
friendName = rs.getString(1);
answer = rs.getString(2);
friendNum = rs.getInt(3);
friendNickName = rs.getString(4);
}
// QVGA HTML
//
if( isQVGA )
{
%><%@ include file="/html/answerDetail.jsp"%><%
}
// QCIF HTML
//
else
{
%><%@ include file="/html/qcif/answerDetail.jsp"%><%
}
}
catch (Exception e)
{
out.println(e);
}
finally
{
if(rs != null) try{rs.close();}catch(Exception se){}
if(pageset != null) try{pageset.close();}catch(Exception se){}
if(pstmt != null) try{pstmt.close();}catch(Exception es){}
if(stmt != null) try{stmt.close();}catch(Exception es){}
if(con != null) try{con.close();}catch(Exception es){}
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -