📄 multe_lhl.jsp
字号:
<%@ page language="java" pageEncoding="EUC-KR"%>
<%@ page import="java.io.*,java.text.*,java.util.Date,java.util.Vector, java.sql.*, com.entaz.lib.db.*, com.entaz.relay.net.* "%>
<%@ include file="../imgpath.jsp"%>
<%@ include file="../common_func.jsp"%>
<%
String mphone = request.getParameter("mphone");
String gphone = request.getParameter("gphone");
String taroid = request.getParameter("idx");
String picid = request.getParameter("picid");
int picidx = 0;
// if(picid != "" && picid != null){
// picidx = Integer.parseInt(picid);
// }
String picnum = request.getParameter("picnum");
//String mphone = "13366103"; //test db fang ke
//String gphone = "1020591111"; //test db zu ren
//String isTrue = "true";
String tableGT_LUCKY_TARO = "GT_LUCKY_TARO";
String tableGT_LUCKY_TARO_COMMENT = "GT_LUCKY_TARO_COMMENT";
String falseUrl = "tarofornoquestion_lhl.jsp?mphone="+mphone+"&gphone="+gphone+"&picnum="+picnum;
String trueUrl = "taroforhavequestion_lhl.jsp?mphone="+mphone+"&gphone="+gphone+"&taroid="+taroid+"&picnum="+picnum;
String picidUrl = "";
String flagUrl = "";
//System.out.println("mphone=" + mphone);
//System.out.println("gphone=" + gphone);
//System.out.println("isTrue=" + isTrue);
Connection con = null;
PreparedStatement pstmt = null;
Statement stmt = null;
ResultSet rs = null;
ResultSet pageset = null;
boolean flagtrao = true;
int txtid = 0 ;
int taroFlag = 0;
try {
%>
<%@ include file="../getConnection.jsp"%>
<%
String SqlFlagTaro = "SELECT * FROM GT_TAROR_FLAG WITH (READUNCOMMITTED) WHERE mphone=? and gphone=? and title_idx=?";
pstmt = con.prepareStatement(SqlFlagTaro);
pstmt.setLong(1,Long.parseLong(mphone));
pstmt.setLong(2,Long.parseLong(gphone));
pstmt.setInt(3,Integer.parseInt(taroid));
rs = pstmt.executeQuery();
if(rs.next()){
flagtrao = false;
picnum = rs.getString("picnum");
taroid = String.valueOf(rs.getInt("title_idx"));
picidx = rs.getInt("taro_idx");
taroFlag = rs.getInt("flag");
}
rs.close();
pstmt.close();
picidUrl = "taroforviewinfo_lhl.jsp?mphone="+mphone+"&gphone="+gphone+"&picnum="+picnum+"&taroid="+taroid+"&picid="+picidx;
flagUrl = "taroforanswer_lhl.jsp?mphone="+mphone+"&gphone="+gphone+"&taroID="+picidx+"&taroidda="+taroid+"&picnum="+picnum;
String sqlComment0 = "select * from GT_LUCKY_TARO_COMMENT WITH (READUNCOMMITTED) where taro_idx = " + taroid + " and convert(bigint,phonenum) = convert(bigint,"+mphone+")";
stmt = con.createStatement();
rs = stmt.executeQuery(sqlComment0);
while(rs.next())
{
txtid = rs.getInt("Taro_idx");
}
if(flagtrao){
request.getRequestDispatcher(trueUrl).forward(request,response);
}else{
if(taroFlag == 1){
request.getRequestDispatcher(picidUrl).forward(request,response);
}else if(taroFlag == 2){
if(txtid == 0){
request.getRequestDispatcher(flagUrl).forward(request,response);
}else{
request.getRequestDispatcher(falseUrl).forward(request,response);
}
}
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
e.printStackTrace();
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -