📄 member_list.jsp.svn-base
字号:
<%@ page
import="java.lang.*,java.io.*,java.net.*,java.awt.*,java.util.Vector,javax.imageio.*,java.sql.*,com.entaz.lib.db.*"
contentType="text/html;charset=euc-kr"%>
<%@ include file="../imgpath.jsp"%>
<%@ include file="../definePath.jsp"%>
<%@ include file="../makeKOR.jsp"%>
<%@ include file="../common_func.jsp"%>
<%@ include file="define.jsp"%>
<%
response.setHeader("cache-control", "no-cache");
response.setHeader("expires", "0");
response.setHeader("pragma", "no-cache");
%>
<%
/**
*
*
* @ version : 1.0.0
* @ author : chengwang ( chengwang@isoftstone.com )
* @ last modified : 2008-04-29
*/
/*------------------------------------------------------------------------------------------------------
+ 占썩본 占식띰옙占쏙옙占�
-------------------------------------------------------------------------------------------------------*/
String mphone = request.getParameter("mphone");
String gphone = request.getParameter("gphone");
String szCount = null;
String szQuery = null;
int nFriendCount = 0;
int nPaperCount = 0;
int nGuestBook = 0;
String[] rgstrFriendName = new String[3];
int[] rgiDiaryCount = new int[3];
String[] rgstrDiaryTitle = new String[5];
String[] rgstrLastVisit = new String[5];
String[] rgstrCoffeeTitle = new String[5];
String[] rgstrCoffeeTime = new String[5];
int[] rgiCoffeeCount = new int[5];
int[] rgiSex = new int[5];
String[] rgstrGuestName = new String[5];
String[] rgstrGuestTime = new String[5];
int nLongs = 0;
int nFriendLongs = 0;
int nDiaryLongs = 0;
int nVisitLongs = 0;
int nNewsLongs = 0;
int nIdx = 0;
int nCafeIdx = 0;
String strCafeName = null;
int nIssueIdx = 0;
String strIssueTitle = null;
int nNoticeIdx = 0;
String strNoticeTitle = null;
int[] rgiNewsKind = new int[6];
String[] rgstrNewsTitle = new String[6];
Connection con = null;
PreparedStatement pstmt = null;
Statement stmt = null;
ResultSet rs = null;
try {
/*------------------------------------------------------------------------------------------------
* DB 커占쌔쇽옙
-------------------------------------------------------------------------------------------------*/
%>
<%@ include file="../getConnection.jsp"%>
<%
/*------------------------------------------------------------------------------------------------
* 친占쏙옙占쏙옙청 占실쇽옙
-------------------------------------------------------------------------------------------------*/
szCount = " SELECT COUNT(friend_idx) AS fCount from GT_friend WHERE friend_flag=2 AND phonenum=?";
pstmt = con.prepareStatement(szCount);
pstmt.setString(1, mphone);
rs = pstmt.executeQuery();
if (rs.next()) {
nFriendCount = rs.getInt("fCount");
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 占쏙옙占쏙옙占쏙옙 占실쇽옙
-------------------------------------------------------------------------------------------------*/
szCount = " SELECT COUNT(paper_idx) AS pCount from GT_paper_recv WHERE "+
"paper_flag=1 AND paper_check_flag=2 and phonenum_my = ?";
pstmt = con.prepareStatement(szCount);
pstmt.setString(1, mphone);
rs = pstmt.executeQuery();
if (rs.next()) {
nPaperCount = rs.getInt("pCount");
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 占쏙옙占쏙옙 占쏙옙占�占쏙옙占쏙옙占�
-------------------------------------------------------------------------------------------------*/
szCount = " SELECT ranker_guestbook AS guBook FROM GT_ranker WHERE phonenum = ?";
pstmt = con.prepareStatement(szCount);
pstmt.setString(1, mphone);
rs = pstmt.executeQuery();
if( rs.next() )
{
nGuestBook = rs.getInt("guBook");
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 친占쏙옙占쏙옙占쏙옙 占쌍깍옙 占싹깍옙
-------------------------------------------------------------------------------------------------*/
szCount = " SELECT TOP 3 Max(r.news_idx),count(r.phonenum) as cnt,r.nickname as nickname,r.phonenum "+
" FROM GT_recentry AS r inner join GT_friend AS f on r.phonenum = CAST(f.guest_phone as bigint)"+
" WHERE r.news_flag=0 AND f.diary_flag = 1 and f.phonenum = ?"+
" AND f.friend_flag=1 GROUP BY r.nickname,r.phonenum ORDER BY Max(r.news_idx) DESC ";
pstmt = con.prepareStatement(szCount);
pstmt.setString(1, mphone);
rs = pstmt.executeQuery();
for(int i = 0 ; rs.next() ; i++){
rgstrFriendName[i] = rs.getString("nickname");
rgiDiaryCount[i] = rs.getInt("cnt");
nFriendLongs = i;
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 占쏙옙占싹깍옙占쌍근듸옙占쏙옙
-------------------------------------------------------------------------------------------------*/
szCount = " SELECT TOP 4 diary_idx,phonenum_my,diary_title ,phonenum,last_visit from GT_diary "+
"WHERE diary_readflag=0 AND phonenum_my= ?";
pstmt = con.prepareStatement(szCount);
pstmt.setString(1, mphone);
rs = pstmt.executeQuery();
for(int i = 0 ; rs.next() ; i++){
rgstrDiaryTitle[i] = rs.getString("diary_title");
rgstrLastVisit[i] = rs.getString("last_visit");
nDiaryLongs = i;
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 占쏙옙占쏙옙占쏙옙 카占쏙옙占쏙옙 占쌍깍옙 占쏙옙
-------------------------------------------------------------------------------------------------*/
szCount = " SELECT TOP 4 Max(r.news_idx),count(r.phonenum) AS cnt,r.nickname AS coffeetitle,Max(r.phonenum),"+
"Max(r.news_date)AS coffeetime,Max(r.content_idx),Max(r.cafebook_idx)AS coffeecount "+
" FROM GT_recentry_cafe AS r inner join GT_mycafe AS m on r.content_idx = m.cafe_idx "+
" WHERE m.phonenum2 = ?"+ " AND m.mypageNew_flag = 1 AND r.news_flag=1 "+
" GROUP BY r.nickname ORDER BY Max(r.news_idx) DESC ";
pstmt = con.prepareStatement(szCount);
pstmt.setString(1, mphone);
rs = pstmt.executeQuery();
for(int i = 0 ; rs.next() ; i++){
rgstrCoffeeTitle[i] = rs.getString("coffeetitle");
rgstrCoffeeTime[i] = rs.getString("coffeetime");
rgiCoffeeCount[i] = rs.getInt("coffeecount");
nLongs = i;
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 占쌍근놂옙占쏙옙占실울옙占쌕녀간占쏙옙占�
-------------------------------------------------------------------------------------------------*/
szCount = "SELECT top 5 guest.guest_phone,uinfo.nickname AS name,guest.guest_date AS time,uinfo.face,"+
"uinfo.sex AS sex FROM GT_guest AS guest INNER JOIN GT_user_info AS uinfo ON "+
"CAST(guest.guest_phone AS bigint) = uinfo.phonenum2 AND guest.phonenum2 = ?" +
" ORDER BY guest.guest_date DESC";
pstmt = con.prepareStatement(szCount);
pstmt.setString(1, mphone);
rs = pstmt.executeQuery();
for(int i = 0 ; rs.next() ; i++)
{
rgstrGuestName[i] = rs.getString("name");
rgiSex[i] = rs.getInt("sex");
rgstrGuestTime[i] = rs.getString("time");
nVisitLongs = i;
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 占쏙옙占쏙옙占�타占쏙옙 占싱쏙옙 -- 타占쏙옙 카占쏙옙
-------------------------------------------------------------------------------------------------*/
szCount = " SELECT top 1 idx FROM GT_t_1 WHERE flag = 5 ORDER BY newid()";
pstmt = con.prepareStatement(szCount);
rs = pstmt.executeQuery();
if( rs.next() )
{
nIdx = rs.getInt("idx");
szQuery ="SELECT cafe_idx,cafe_name FROM GT_cafe WHERE cafe_idx = ?" ;
pstmt = con.prepareStatement(szQuery);
pstmt.setInt(1, nIdx);
}
else
{
szQuery ="SELECT top 1 cafe_idx,cafe_name FROM GT_cafe ORDER BY cafe_idx DESC";
pstmt = con.prepareStatement(szQuery);
}
rs = pstmt.executeQuery();
if( rs.next() )
{
nCafeIdx = rs.getInt("cafe_idx");
strCafeName = rs.getString("cafe_name");
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 占쏙옙占쏙옙占�타占쏙옙 占싱쏙옙 -- 타占쏙옙 占쏙옙
-------------------------------------------------------------------------------------------------*/
szCount = "SELECT top 1 idx from GT_t_1 WHERE flag = 4 ORDER BY newid()";
pstmt = con.prepareStatement(szCount);
rs = pstmt.executeQuery();
if( rs.next() )
{
nIdx = rs.getInt("idx");
szQuery ="SELECT issue_title,issue_idx FROM GT_issue WHERE issue_idx = ?";
pstmt = con.prepareStatement(szQuery);
pstmt.setInt(1, nIdx);
}
else
{
szQuery ="SELECT top 1 issue_title,issue_idx FROM GT_issue ORDER BY issue_idx DESC";
pstmt = con.prepareStatement(szQuery);
}
rs = pstmt.executeQuery();
if( rs.next() )
{
nIssueIdx = rs.getInt("issue_idx");
strIssueTitle = rs.getString("issue_title");
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 占쏙옙占쏙옙占�타占쏙옙 占싱쏙옙 -- 타占쏙옙 占쏙옙占쏙옙
-------------------------------------------------------------------------------------------------*/
szCount = "SELECT top 1 idx FROM GT_t_1 WHERE flag = 1 OR flag = 2 ORDER BY newid()";
pstmt = con.prepareStatement(szCount);
rs = pstmt.executeQuery();
if( rs.next() )
{
nIdx = rs.getInt("idx");
szQuery ="SELECT kthema_idx,kthema_title,phonenum FROM GT_kthema WHERE kthema_idx=?" ;
pstmt = con.prepareStatement(szQuery);
pstmt.setInt(1, nIdx);
}
else
{
szQuery ="SELECT top 1 kthema_idx,kthema_title,phonenum FROM GT_kthema ORDER BY kthema_idx DESC";
pstmt = con.prepareStatement(szQuery);
}
rs = pstmt.executeQuery();
if( rs.next() )
{
nNoticeIdx = rs.getInt("kthema_idx");
strNoticeTitle = rs.getString("kthema_title");
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* 타占쏙옙 NEW
-------------------------------------------------------------------------------------------------*/
szQuery = " SELECT TOP 6 notice_idx,notice_main_flag_idx,notice_date,notice_kind,notice_text,"+
"notice_head,notice_path FROM GT_notice ORDER BY notice_main_flag_idx ASC ";
pstmt = con.prepareStatement(szQuery);
rs = pstmt.executeQuery();
for(int i = 0 ; rs.next() ; i++)
{
rgstrNewsTitle[i] = rs.getString("notice_head");
rgiNewsKind[i] = rs.getInt("notice_kind");
nNewsLongs = i;
}
rs.close();
pstmt.close();
con.close();
} 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) {
}
}
}
%>
<%@include file="HTML/Member_list.jsp"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -