?? fortunetip_flower.jsp.svn-base
字號:
<!------------------------------------------------------------------
* @ 權(quán)> Xxx叢狼 迄喬 > 家匡皋撈飄 > 款技屏
* @ Author : 林妨唱 ( 2008-06-06 )
* @ Images :
--------------------------------------------------------------------->
<%@ 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"%>
<%!
public static String isNull(String str)
{
if (str == null)
return "";
else
return str;
}
%>
<%
/*------------------------------------------------------------------------------------------------------
+ 扁夯 頗扼固磐
-------------------------------------------------------------------------------------------------------*/
String mphone= request.getParameter("mphone");
//if(mphone == null){
// mphone= "13269404505";
//}
String gphone= request.getParameter("gphone");
if(null == gphone){
gphone = mphone;
}
/*------------------------------------------------------------------------------------------------------
+ 傈開 函薦
-------------------------------------------------------------------------------------------------------*/
String user_name = "";
int user_year = 0;
int user_month = 0;
int user_day = 0;
int now_month = 0;
int now_day = 0;
int result01 = 0;
int result02 = 0;
int result03 = 0;
String detail = "";
String rgTitle[] = new String[3];
String rgTableName[] = new String[3];
int n=0;
/*------------------------------------------------------------------------------------------------------
+ DB 包訪 函薦
-------------------------------------------------------------------------------------------------------*/
PreparedStatement pstmt = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String query1 = null;
String ssql = null;
/*------------------------------------------------------------------------------------------------------
+ 朝樓 包訪
-------------------------------------------------------------------------------------------------------*/
Timestamp di_date=null;
Date today = new Date();
SimpleDateFormat timeform;
timeform = new SimpleDateFormat("MM/dd HH:mm");
try
{
/*------------------------------------------------------------------------------------------------
* DB 目池記
-------------------------------------------------------------------------------------------------*/
%><%@ include file="../getConnection.jsp"%><%
/**************************************
膠鷗客 嘎苗焊綽 礬宏款技!
***************************************/
stmt = con.createStatement();
query1="select nickname,year,month,day from GT_user_Info where phonenum = '"+mphone+"'";
rs=stmt.executeQuery(query1);
if(rs.next())
{
user_name = rs.getString("nickname");
user_year = Integer.parseInt(String.valueOf(rs.getInt("year")).substring(2,4));
//System.out.println("user_year:"+user_year);
user_month = rs.getInt("month");
user_day = rs.getInt("day");
}
if(rs != null) rs.close();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Date now= new Date();
String date=df.format(now);
int yyyy,mm,dd = 0;
//now_year = Integer.parseInt(date.substring(0,4));
now_month = Integer.parseInt(date.substring(5,7));
now_day = Integer.parseInt(date.substring(8,date.length()));
result01 = user_year+user_month+user_day+now_month+now_day;
result02 = result01*5;
result03 = result02%71;
//System.out.println("result01:"+result01);
//System.out.println("result02:"+result02);
//System.out.println("result03:"+result03);
query1="select detail from GT_LUCK_FLOWER where idx="+result03;
rs=stmt.executeQuery(query1);
if(rs.next())
{
detail = rs.getString("detail");
}
if(rs != null) rs.close();
/*------------------------------------------------------------------------------------------------
* 款技屏.
-------------------------------------------------------------------------------------------------*/
query1 = "select top 2 title,tablest from gt_luck_title order by newid()";
pstmt = con.prepareStatement(query1);
rs = pstmt.executeQuery();
for(int i=0;rs.next();i++)
{
rgTitle[i]=rs.getString("title");
rgTableName[i]=rs.getString("tablest");
n=i+1;
}
rs.close();
pstmt.close();
}catch(Exception e){
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){}
}
// QVGA HTML
//
if( isQVGA )
{
%><%@ include file="/html/fortunetip_flower.jsp"%><%
}
// QCIF HTML
//
else
{
%><%@ include file="/html/qcif/fortunetip_flower.jsp"%><%
}
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -