📄 notmember_two_list.jsp
字号:
<%@ 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 : cui qiuyue ( qycui@isoftstone.com )
* @ last modified : 2008-04-29
*/
/*------------------------------------------------------------------------------------------------------
+ �⺻ �Ķ����
-------------------------------------------------------------------------------------------------------*/
String mphone = request.getParameter("mphone");
String gphone = request.getParameter("gphone");
int nIdx = 0;
int nCafeIdx =0;
String strCafeName = null;
int nIssueIdx =0;
String strIssueTitle = null;
int nKthemaIdx =0;
String strKthemaTitle = null;
String szCount = null;
String szQuery = null;
Connection con = null;
PreparedStatement pstmt = null;
Statement stmt = null;
ResultSet rs = null;
try
{
/*------------------------------------------------------------------------------------------------
* DB Ŀ�ؼ�
-------------------------------------------------------------------------------------------------*/
%><%@ include file="../getConnection.jsp"%><%
/*------------------------------------------------------------------------------------------------
* Ÿ�� ī��
-------------------------------------------------------------------------------------------------*/
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() )
{
nKthemaIdx = rs.getInt("kthema_idx");
strKthemaTitle = rs.getString("kthema_title");
}
rs.close();
pstmt.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/Notmember_two_list.jsp"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -