⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myqamatchmate.jsp.svn-base

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 SVN-BASE
📖 第 1 页 / 共 2 页
字号:
<!--
*@目敲霸烙 娄茫扁 
*@Author : 弥眠岿 (2008-6-06)
*@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");
	
	String name= java.net.URLDecoder.decode(makeKOR(request.getParameter("name")));
	
	String panduan= request.getParameter("panduan");
	
	String ox[] = new String[5];
	
	String qa[] = new String[5];
	
	String qidx[]=new String [5];
	
	/*------------------------------------------------------------------------------------------------------
	+	傈开 函荐
	-------------------------------------------------------------------------------------------------------*/
	long Guest_phone = 0;
	
	int Attention_point = 0;
	
	String nickname = "";
	
	String dianhua = "";
	
	int sex =0;
	
	int year =0;
	
	int nyear =0;
	
	int age =0;
	
	int Match_point = 0;
	
	double answercount =0.0;
	
	int cont1 =0;
	
	double allcont =0.0;
	
	int starAttentionfull =0;
	
	int starAttentionemp = 0;
	
	int starMatchfull =0;
	
	int starMatchemp =0;
	
	double percent =0;
	
	String[] title =new String[5];
	
	String[] quizidx = new String[5];
	
	int flag =0;
	
	int idx = 0;
 	
     /*------------------------------------------------------------------------------------------------------
	+	DB 包访 函荐
	-------------------------------------------------------------------------------------------------------*/
	PreparedStatement pstmt = null;
	
	Connection con = null;
	
	Statement stmt = null;
	
	ResultSet rs = null;
	
	String query1 = null;
	
	String riqi = null;
	int intRiqi = 0;
	
	Date regdater = new Date();
	SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
	riqi = sf.format(regdater);

	intRiqi = Integer.parseInt(riqi.replace("-",""));

	
	
	try
	{

	/*------------------------------------------------------------------------------------------------
	 *		DB 目池记
	 -------------------------------------------------------------------------------------------------*/
	%><%@ include file="../getConnection.jsp"%><%
	/*------------------------------------------------------------------------------------------------
	 *
	 -------------------------------------------------------------------------------------------------*/
	    for(int i=0;i<5;i++)
	    {
	      if(request.getParameter("ox"+i)!=null){
	      	
	     
	      ox[i]=request.getParameter("ox"+i);
	      
	      qa[i] = makeKOR(request.getParameter("qa"+i));
	    
	      qidx[i] = request.getParameter("qidx"+i);

	     query1="insert into GT_LUCKY_QUIZ_MYLOG (Quiz_idx,title,answer,phonenum,Guest_phone,regdate,nregdate)"+
	                  "values(?,?,?,?,?,?,?)";
	                  
	     pstmt= con.prepareStatement(query1);
	     
	     pstmt.setInt(1,Integer.parseInt(qidx[i]));
	     
	     pstmt.setString(2,qa[i]);
	     
	     pstmt.setInt(3,Integer.parseInt(ox[i]));
	     
	     pstmt.setLong(4,Long.parseLong(mphone));
	    
	     pstmt.setLong(5,Long.parseLong(mphone));
	     
	     pstmt.setString(6,riqi);	
	     
		 pstmt.setInt(7,intRiqi);
	     
	     pstmt.executeUpdate();
	     
	     pstmt.close();
	     
	    }
	    
	 }
	 
	/*------------------------------------------------------------------------------------------------
	 *	唱客 嘎绰 荤恩
	 -------------------------------------------------------------------------------------------------*/
	 query1 = "select  top 1 Guest_phone,Attention_point from GT_LUCKY_ATTENTION_POINT WITH (READUNCOMMITTED) where Guest_phone in("+
	                " select distinct Guest_phone from gt_lucky_quiz_mylog WITH (READUNCOMMITTED) where phonenum =? and Guest_phone != ?) "+" order by Attention_point desc";
	 
	 pstmt = con.prepareStatement(query1);
	 
	 pstmt.setLong(1,Long.parseLong(mphone));
	 pstmt.setLong(2,Long.parseLong(mphone));
	 
	 rs = pstmt.executeQuery();
	 
	 if(rs.next())
	 {
	  Guest_phone = rs.getLong("Guest_phone");

	  Attention_point = rs.getInt("Attention_point");
	  
	 }
	 starAttentionfull = Attention_point/4;
	 
	 starAttentionemp = (Attention_point%4)/2;
	 
	 rs.close();
	 
	 pstmt.close();
	 
	 /*------------------------------------------------------------------------------------------------
	 *	唱客 嘎绰 荤恩狼 扁夯 沥焊 
	 -------------------------------------------------------------------------------------------------*/
	 query1="select nickname,sex,year,phonenum from gt_user_info WITH (READUNCOMMITTED) where phonenum = '0"+Guest_phone+"'";
	 
	 pstmt = con.prepareStatement(query1);
	 
	 rs = pstmt.executeQuery();
	 
	 if(rs.next())
	 {
	  nickname = rs.getString("nickname");
	  
	  sex = rs.getInt("sex");
	  
	  year = rs.getInt("year");
	  
	  dianhua = rs.getString("phonenum");
	  
	 }
	 
	 rs.close();
	 
	 pstmt.close();
	 
	 Calendar calendar=Calendar.getInstance();
	 
	 nyear=calendar.get(Calendar.YEAR);
	 
	 age = nyear-year;
	 
	  /*------------------------------------------------------------------------------------------------
	 *	唱客 嘎绰 荤恩狼 概莫档 
	 -------------------------------------------------------------------------------------------------*/
	 query1="select Match_point from GT_LUCKY_MATCH_POINT WITH (READUNCOMMITTED) where phonenum =? and Guest_phone = ?";
	 
	 pstmt = con.prepareStatement(query1);
	 
	 pstmt.setLong(1,Long.parseLong(mphone));
	 
	 pstmt.setLong(2,Guest_phone);
	 
	 rs = pstmt.executeQuery();
	 
	 if(rs.next())
	 {
	  
	  Match_point = rs.getInt("Match_point");
	  
	 }
	starMatchfull = ((Match_point*24)/4)/100;
	
	starMatchemp = (((Match_point*24)%4)/2)/100;
	
	 rs.close();
	 
	 pstmt.close();

	  /*------------------------------------------------------------------------------------------------
	 *	唱客 嘎绰 荤恩 沥翠 荐  
	 -------------------------------------------------------------------------------------------------*/
	 query1 = " select count(a.idx) answercount from gt_lucky_quiz_mylog a WITH (READUNCOMMITTED),gt_lucky_quiz_mylog c WITH (READUNCOMMITTED)"+
		  " where  a.quiz_idx=c.quiz_idx and a.answer = c.answer"+
		  " and a.phonenum =? and a.guest_phone =?"+
		  " and c.phonenum =?"+" and c.guest_phone =?";
	 
	 pstmt = con.prepareStatement(query1);
	 
	 pstmt.setLong(1,Long.parseLong(mphone));
	 
	 pstmt.setLong(2,Guest_phone);
	 
	 pstmt.setLong(3,Long.parseLong(mphone));
	 
	 pstmt.setLong(4,Long.parseLong(mphone));
	 
	 rs = pstmt.executeQuery();
	 
	 if(rs.next())
	 {
	  
	  answercount = rs.getInt("answercount");
	  
	 }
	
	 rs.close();
	 
	 pstmt.close();

	 /*------------------------------------------------------------------------------------------------
	 *	唱客 嘎绰 荤恩 翠函  荐  
	 -------------------------------------------------------------------------------------------------*/
	 query1="select  count(idx) as allcont  from GT_LUCKY_QUIZ_MYLOG WITH (READUNCOMMITTED) where phonenum =? and Guest_phone =? ";
	 
	 pstmt = con.prepareStatement(query1);
	 
	 pstmt.setLong(1,Long.parseLong(mphone));
	 
	 pstmt.setLong(2,Guest_phone);
	 
	 rs = pstmt.executeQuery();
	 
	 if(rs.next())
     {
       allcont = rs.getInt("allcont");
     }	 
	 
	 percent = (answercount/allcont) * 100;
	 if(percent > 100){
	 	percent = 100;
	 }
	 
	  
	 /*------------------------------------------------------------------------------------------------
	 *	唱客 嘎绰 荤恩 荐  
	 -------------------------------------------------------------------------------------------------*/
	 query1="select count(distinct Guest_phone)as cont1  from gt_lucky_quiz_mylog WITH (READUNCOMMITTED) where phonenum =?  and guest_phone != ?";
	 
	 pstmt = con.prepareStatement(query1);
	 
	 pstmt.setLong(1,Long.parseLong(mphone));
	 
	 pstmt.setLong(2,Long.parseLong(mphone));
	 
	 rs = pstmt.executeQuery();
	 
	 if(rs.next())
	 {
	   cont1 = rs.getInt("cont1");
	 }
	 
	 rs.close();
	 
	 pstmt.close();
	 
     /*------------------------------------------------------------------------------------------------
	 *	 钱绢焊瘤 臼篮 巩力  
	 -------------------------------------------------------------------------------------------------*/
	//query1 = "select distinct top 5  a.title,a.idx from GT_LUCKY_QUIZ a,GT_LUCKY_QUIZ_MYLOG b where a.idx = b.Quiz_idx"+
    //               " and a.flag = 1 and b.Quiz_idx not in(select quiz_idx from GT_LUCKY_QUIZ_MYLOG where Guest_phone =?)"+
    //              " order by a.idx desc";

	 query1 = "select distinct top 5 title,idx from GT_LUCKY_QUIZ WITH (READUNCOMMITTED) where flag = 1 and idx not in(select quiz_idx from GT_LUCKY_QUIZ_MYLOG WITH (READUNCOMMITTED) where phonenum = ? and Guest_phone = ?) order by idx desc";
	 
	 pstmt = con.prepareStatement(query1);
	 
	 pstmt.setLong(1,Long.parseLong(mphone));
	 pstmt.setLong(2,Long.parseLong(mphone));
	 
	 rs = pstmt.executeQuery();
	 
	 for(int i=0;rs.next();i++)
	 {
	   title[i] = rs.getString("title");
	   
	   quizidx[i] = rs.getString("idx");
	   
	   flag = i+1;
	 }
	 
	 rs.close();
	 
	 pstmt.close();
	 
	%>
	

	<html>
<head>
	<link href="../mobile.css" rel="stylesheet" type="text/css">
	<title>权 > <%=name %>丛狼 迄乔包府 > 家匡皋捞飘 > 龙巩措翠</title>
</head>
<body>

<!--剧侥
  <tr>
     <td>
          <table width="176" border="0" cellspacing="0" cellpadding="0">
             <tr>  
  	    <td></td>
      	   </tr>
          </table>
     </td>
  </tr>
-->
<form name="form1" action="MYQAmatchMate.jsp" method="post">
<input type="hidden" name="name" value="<%=name%>"/>
<input type="hidden" name="mphone" value="<%=mphone%>"/>
<input type="hidden" name="gphone" value="<%=gphone%>"/>
<input type="hidden" name="panduan" value="<%=panduan%>" />

<%if(flag!=0){for(int i=0;i<flag;i++){ %>
<input type="hidden" name="qidx<%=i %>" value="<%=quizidx[i]%>" />
<input type="hidden" name="qa<%=i %>" value="<%=title[i]%>" />	
<%}} %>

<table width="176" border="0" cellspacing="0" cellpadding="0">
	<!--鸥捞撇 矫累-->
	<tr>
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="2" height="2" bgcolor="#c789ff"></td>
				</tr>
				<tr>
					<td width="6" height="14" bgcolor="#9819e9"></td>
					<td height="14" bgcolor="#9819e9">
						<font color="#ffffff">
							<%if(panduan.equals("1")){ %>
								龙巩措翠 搬苞焊扁
							<%}else{ %>
								龙巩措翠 钱绢焊扁
							<%} %>
						</font>
					</td>
				</tr>
				<tr>
					<td colspan="2" height="2" bgcolor="#c789ff"></td>
				</tr>
				<tr>
					<td colspan="2" height="1" bgcolor="#9819e9"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--鸥捞撇 场-->

	<!--咯归 矫累-->
	<tr>
		<td height="4"></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -