📄 30q&a_you_show.jsp.svn-base
字号:
<!-------------------------------------------------------------
* @ name: 30q&a_You_Show.jsp
* @ Author : linaZhou
* @ date :2008-06-26
-------------------------------------------------------------->
<%@ 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="appConstants.jsp"%>
<%@ include file="formatUtil.jsp"%>
<%@ include file="../makeKOR.jsp"%>
<style type="text/css">
A:hover {
COLOR: #000000; TEXT-DECORATION: underline
}
A:link {
COLOR: #000000; TEXT-DECORATION: underline
}
A:visited {
COLOR: #000000; TEXT-DECORATION: underline
}
</style>
<%!
public static String isNull(String str){
if (str == null)
return "";
else
return str;
}
public static String formatDate(Date date,String format){
SimpleDateFormat sdf = new SimpleDateFormat(format);
Calendar cal = Calendar.getInstance();
cal.setTime(date);
return sdf.format(cal.getTime());
}
%>
<%
/*------------------------------------------------------------------------------------------------------
+ 扁夯 颇扼固磐
-------------------------------------------------------------------------------------------------------*/
String mphone = request.getParameter("mphone");
String gphone = request.getParameter("gphone");
if(mphone == null){
mphone= "09900100081";
}
if(gphone == null){
gphone = mphone;
}
mphone = getStrPhone(getLong(mphone));
gphone = getStrPhone(getLong(gphone));
/*------------------------------------------------------------------------------------------------------
+ 傈开 函荐
-------------------------------------------------------------------------------------------------------*/
int idx = 0;
int idx_previous = 0;
int idx_next = 0;
String date_previous = "";
String date_next = "";
int phonenum = 0;
String nickname = "";
int reCnt = 0;
String regdate = "";
int type = 0;
String questions[] = new String[30];
String answers[] = new String[30];
idx = Integer.parseInt(request.getParameter("idx"));
/*------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
-------------------------------------------------------------------------------------------------------*/
PreparedStatement pstmt = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String query1 = null;
String sql = null;
/*------------------------------------------------------------------------------------------------------
+ 朝楼 包访
-------------------------------------------------------------------------------------------------------*/
Timestamp di_date = null;
Date today = new Date();
SimpleDateFormat timeform;
timeform = new SimpleDateFormat("MM/dd HH:mm");
try
{
/*------------------------------------------------------------------------------------------------
* DB 目池记
-------------------------------------------------------------------------------------------------*/
%>
<%@ include file="../getConnection.jsp"%>
<%@ include file="bgColor.jsp"%>
<%
/*------------------------------------------------------------------------------------------------
* getnickname
-------------------------------------------------------------------------------------------------*/
sql = " SELECT nickname FROM GT_User_Info WITH (READUNCOMMITTED) WHERE phonenum='"+gphone+"'" ;
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if( rs.next() )
{
nickname = rs.getString("nickname");
}else{
nickname = "绝澜";
}
rs.close();
pstmt.close();
/**************************************
search previous idx by idx!
***************************************/
stmt = con.createStatement();
query1=" SELECT TOP 1 idx,regdate FROM GT_Ns30question WITH (READUNCOMMITTED) WHERE idx<'"+idx+"' AND phonenum='"+gphone+"' ORDER BY regdate DESC";
rs=stmt.executeQuery(query1);
if(rs.next()){
idx_previous = rs.getInt("idx");
date_previous = formatDate((Date)rs.getTimestamp("regdate"),"MM/dd");
}
if(rs != null) rs.close();
/**************************************
search next idx by idx!
***************************************/
stmt = con.createStatement();
query1=" SELECT TOP 1 idx,regdate FROM GT_Ns30question WITH (READUNCOMMITTED) WHERE idx>'"+idx+"' AND phonenum='"+gphone+"' ORDER BY regdate ASC";
rs=stmt.executeQuery(query1);
if(rs.next()){
idx_next = rs.getInt("idx");
date_next = formatDate((Date)rs.getTimestamp("regdate"),"MM/dd");
}
if(rs != null) rs.close();
/**************************************
胶鸥客 嘎苗焊绰 矾宏款技!
***************************************/
stmt = con.createStatement();
query1=" SELECT * FROM GT_Ns30question WITH (READUNCOMMITTED) WHERE idx = '"+idx+"'";
rs=stmt.executeQuery(query1);
if(rs.next()){
idx = rs.getInt("idx");
phonenum = rs.getInt("phonenum");
reCnt = rs.getInt("reCnt");
type = rs.getInt("type");
questions[0] = rs.getString("question1");
questions[1] = rs.getString("question2");
questions[2] = rs.getString("question3");
questions[3] = rs.getString("question4");
questions[4] = rs.getString("question5");
questions[5] = rs.getString("question6");
questions[6] = rs.getString("question7");
questions[7] = rs.getString("question8");
questions[8] = rs.getString("question9");
questions[9] = rs.getString("question10");
questions[10] = rs.getString("question11");
questions[11] = rs.getString("question12");
questions[12] = rs.getString("question13");
questions[13] = rs.getString("question14");
questions[14] = rs.getString("question15");
questions[15] = rs.getString("question16");
questions[16] = rs.getString("question17");
questions[17] = rs.getString("question18");
questions[18] = rs.getString("question19");
questions[19] = rs.getString("question20");
questions[20] = rs.getString("question21");
questions[21] = rs.getString("question22");
questions[22] = rs.getString("question23");
questions[23] = rs.getString("question24");
questions[24] = rs.getString("question25");
questions[25] = rs.getString("question26");
questions[26] = rs.getString("question27");
questions[27] = rs.getString("question28");
questions[28] = rs.getString("question29");
questions[29] = rs.getString("question30");
answers[0] = rs.getString("anser1");
answers[1] = rs.getString("anser2");
answers[2] = rs.getString("anser3");
answers[3] = rs.getString("anser4");
answers[4] = rs.getString("anser5");
answers[5] = rs.getString("anser6");
answers[6] = rs.getString("anser7");
answers[7] = rs.getString("anser8");
answers[8] = rs.getString("anser9");
answers[9] = rs.getString("anser10");
answers[10] = rs.getString("anser11");
answers[11] = rs.getString("anser12");
answers[12] = rs.getString("anser13");
answers[13] = rs.getString("anser14");
answers[14] = rs.getString("anser15");
answers[15] = rs.getString("anser16");
answers[16] = rs.getString("anser17");
answers[17] = rs.getString("anser18");
answers[18] = rs.getString("anser19");
answers[19] = rs.getString("anser20");
answers[20] = rs.getString("anser21");
answers[21] = rs.getString("anser22");
answers[22] = rs.getString("anser23");
answers[23] = rs.getString("anser24");
answers[24] = rs.getString("anser25");
answers[25] = rs.getString("anser26");
answers[26] = rs.getString("anser27");
answers[27] = rs.getString("anser28");
answers[28] = rs.getString("anser29");
answers[29] = rs.getString("anser30");
}
if(rs != null) rs.close();
%>
<html>
<head>
<title></title>
<link href="http://entaz.mugeta.com/client/mugeta_v2_test/web/user/mobile.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<!-- 鸥捞撇 矫累 -->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="19">
<td width="8" bgcolor="<%=mainBgColor%>"></td>
<td bgcolor="<%=mainBgColor%>"><font color="#ffffff"><%=nickname%>丛狼30巩30翠</font></td>
</tr>
</table>
</td>
</tr>
<!-- 鸥捞撇 场 -->
<!-- 咯归 矫累 -->
<tr height="8">
<td></td>
</tr>
<!-- 咯归 场 -->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<!-- 1巩 : 10巩 矫累 -->
<%
int k=0;
for(int i=0;i<questions.length;i++){
if(!answers[i].trim().equals("")){
if(k==10 || k==20){
%>
<tr height="8">
<td colspan="5"></td>
</tr>
<tr height="1">
<td width="4"></td>
<td colspan="3" bgcolor="efebd5"></td>
<td width="4"></td>
</tr>
<tr height="8">
<td colspan="5"></td>
</tr>
<%
}
k++;
%>
<tr>
<td width="4"></td>
<td width="6"></td>
<td><font color="#928279"><%=k%>. <%=questions[i]%></font><font color="<%=mainBgColor%>"><%=answers[i]%></font><br></td>
<td width="6"></td>
<td width="4"></td>
</tr>
<%
}
}
%>
<tr height="8">
<td colspan="5"></td>
</tr>
<!-- 1巩 : 10巩 场 -->
</table>
</td>
</tr>
<!-- 其捞瘤 傅农 矫累 -->
<tr>
<td bgcolor="<%=pageBgColor%>">
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="16">
<%if(date_previous ==null || date_previous.equals("")){ %>
<td></td>
<%}else{ %>
<td align="left"><font color="#716e63" size="3">⒏</font><a href="<%=url_path%>/news/30q&a_You_Show.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&idx=<%=idx_previous%>"><font color="<%=pageFNFontColor %>" size="3">捞傈:<%=date_previous%></font></a></td>
<% } %>
<td width="20"></td>
<%if(date_next == null || date_next.equals("")){ %>
<td></td>
<%}else{ %>
<td align="right"><a href="<%=url_path%>/news/30q&a_You_Show.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&idx=<%=idx_next%>"><font color="<%=pageFNFontColor %>" size="3">促澜:<%=date_next%></font></a><font color="#716e63" size="3">⒑</font></td>
<% } %>
</tr>
</table>
</td>
</tr>
<!-- 其捞瘤 傅农 场 -->
<!-- 咯归 矫累 -->
<tr height="8">
<td></td>
</tr>
<!-- 咯归 场 -->
<!-- 滚瓢 矫累 -->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="17">
<td></td>
<td width="60" bgcolor="<%=mainBgColor%>" align="center" ><a href="<%=url_path%>/news/30q&a_You_reple.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&idx=<%=idx%>"><font color="#ffffff">乞啊窍扁</font></a></td>
<td width="2"></td>
<td width="60" bgcolor="<%=mainBgColor%>" align="center" ><a href="<%=url_path%>/news/30q&a_repleList.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&idx=<%=idx%>"><font color="#ffffff">乞啊焊扁</font></a></td>
<td></td>
</tr>
<tr height="2">
<td colspan="5"></td>
</tr>
<tr height="17">
<td></td>
<td width="60" bgcolor="<%=mainBgColor%>" align="center" ><a href="<%=url_path%>/news/answerList_You.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>&type=<%=type%>&idx=<%=idx%>"><font color="#ffffff">巩翠格废</font></a></td>
<td width="2"></td>
<td width="60" bgcolor="<%=mainBgColor%>" align="center" ><a href="javascript:history.back()"><font color="#ffffff">倒酒啊扁</font></a></td>
<td></td>
</tr>
</table>
</td>
</tr>
<!-- 滚瓢 场 -->
<!-- 咯归 矫累 -->
<tr height="11">
<td></td>
</tr>
<!-- 咯归 场 -->
<!--版肺钎矫 矫累-->
<tr>
<td>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr height="19">
<td width="10" bgcolor="#BBC7C8"></td>
<td bgcolor="#DAE6E8">
<a href="<%=url_path%>/main.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>">权</a>><a href="<%=url_path%>/mypage/my_confirm.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>"><%=nickname%>丛狼迄乔</a>><a href="<%=url_path%>/news/NewsMain.jsp?mphone=<%=mphone%>&gphone=<%=gphone%>">春胶</a>><%=nickname%>丛狼30巩30翠
</td>
<td width="10" bgcolor="#BBC7C8"></td>
</tr>
</table>
</td>
</tr>
<!--版肺钎矫 场-->
</table>
<!--窍窜 版肺钎矫 矫累-->
<%@ include file="../newbottom.jsp"%>
<!--窍窜 版肺钎矫 场-->
</body>
</html>
<%
}catch(Exception e){
System.out.println(e);
}finally{
if(rs != null) try{ rs.close(); }catch(Exception se){}
if(pstmt != null) try{ pstmt.close(); }catch(Exception se){}
if(stmt != null) try{ stmt.close(); }catch(Exception se){}
if(con != null) try{ con.close(); }catch(Exception se){}
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -