📄 myfortuneview.jsp.svn-base
字号:
<!--------------------------------------------------------------------------------------------------------------
*@目敲霸烙 娄茫扁
*@Author : 弥眠岿 (2008-6-05)
*@Images : 其捞瘤 救俊 甸绢啊绰 捞固瘤
1) bg_01.png - 抛捞喉 弥惑窜 硅版捞固瘤(仟弗祸)
--------------------------------------------------------------------------------------------------------------->
<%@ page import='java.io.*,java.text.*,java.util.Date,java.util.Vector, javax.servlet.http.HttpSession,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="../makeKOR.jsp"%>
<%
/***********************************************************************
@ Page Description
霸烙 皋牢 其捞瘤
@ Parameter
***********************************************************************/
/*------------------------------------------------------------------------------------------------------
+ 扁夯 颇扼固磐
-------------------------------------------------------------------------------------------------------*/
String mphone= request.getParameter("mphone");
String gphone= request.getParameter("gphone");
int sign = Integer.parseInt(request.getParameter("sign"));
String nickname = java.net.URLDecoder.decode(makeKOR(request.getParameter("nickname")));
/*------------------------------------------------------------------------------------------------------
+ 傈开 函荐
-------------------------------------------------------------------------------------------------------*/
int sY = 0;
int sM =0;
int sD= 0;
int year = 0;
int month = 0;
int day = 0;
int idx = 0;
String todaytext = "" ;
String weektext = "" ;
String monthtext = "" ;
/*------------------------------------------------------------------------------------------------------
+ DB 包访 函荐
-------------------------------------------------------------------------------------------------------*/
PreparedStatement pstmt = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String query1 = null;
try
{
/*------------------------------------------------------------------------------------------------
* DB 目池记
-------------------------------------------------------------------------------------------------*/
%><%@ include file="../getConnection.jsp"%><%
/*------------------------------------------------------------------------------------------------
* 蜡历狼 积斥岿老 坷疵 朝楼
-------------------------------------------------------------------------------------------------*/
query1 = "select year,month,day from gt_user_info where phonenum = '"+mphone+"'";
pstmt = con.prepareStatement(query1);
rs= pstmt.executeQuery();
if(rs.next())
{
year = rs.getInt("year");
month = rs.getInt("month");
day = rs.getInt("day");
}
Calendar calendar=Calendar.getInstance();
sY=calendar.get(Calendar.YEAR);
sM=calendar.get(Calendar.MONTH)+1;
sD=calendar.get(Calendar.DATE);
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* day text : ((蜡历狼 积斥滴磊府) + (蜡历狼 积岿) + (蜡历狼 积老) + (瘤陛 岿) + (瘤陛 老) ) x 7 / 120 = 唱赣瘤俊 秦寸窍绰 idx 免仿
-------------------------------------------------------------------------------------------------*/
idx = ((year+month+day+sM+sD) * 7)%120;
query1="select text from gt_luck_today where idx=?";
pstmt = con.prepareStatement(query1);
pstmt.setInt(1,idx);
rs = pstmt.executeQuery();
if(rs.next()){
todaytext = rs.getString("text");
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* week text : ((蜡历狼 积斥滴磊府) + (蜡历狼 积岿) + (蜡历狼 积老) + (瘤陛 岿) + (瘤陛 老) ) x 6 / 73 = 唱赣瘤俊 秦寸窍绰 idx 免仿
-------------------------------------------------------------------------------------------------*/
Calendar cal = new GregorianCalendar();
int curDay = cal.get(Calendar.DAY_OF_WEEK);
if(sD>=curDay)
{
sD= sD - curDay+1;
}
else {
sM=sM -1;
sD = sD+30 - curDay+1;
}
idx = ((year+month+day+sM+sD) * 6)%73;
query1="select text from gt_luck_week where idx=?";
pstmt = con.prepareStatement(query1);
pstmt.setInt(1,idx);
rs = pstmt.executeQuery();
if(rs.next()){
weektext = rs.getString("text");
}
rs.close();
pstmt.close();
/*------------------------------------------------------------------------------------------------
* month text : : ((蜡历狼 积斥滴磊府) + (蜡历狼 积岿) + (蜡历狼 积老) + (瘤陛 岿) ) x 6 / 70 = 唱赣瘤俊 秦寸窍绰 idx 免仿
-------------------------------------------------------------------------------------------------*/
idx = ((year+month+day+sM) * 6)%70;
query1="select text from gt_luck_month where idx=?";
pstmt = con.prepareStatement(query1);
pstmt.setInt(1,idx);
rs = pstmt.executeQuery();
if(rs.next()){
monthtext = rs.getString("text");
}
rs.close();
pstmt.close();
// QVGA HTML
//
if( isQVGA )
{
%><%@ include file="/html/MyFortuneView.jsp"%><%
}
// QCIF HTML
//
else
{
%><%@ include file="/html/qcif/MyFortuneView.jsp"%><%
}
}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){}
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -