<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!-- #include file="tc_dv.asp" -->
<!-- #include file="tc_conn.asp" -->
<% 
Response.Buffer=True 
Dvbbs.stats="<a href=plus_tc.asp>社区体彩</a>"
Dvbbs.Nav()
Dvbbs.Head_var 2,0,"",""
if dvbbs.Membername="" then
  Dvbbs.AddErrCode(6)
  Dvbbs.Showerr()
else
	
response.write "<table cellpadding=3 cellspacing=1 align=center class=tableborder1><tr><th valign=middle colspan=2 align=center height=25><b>社区体彩</b></td></tr><tr><td valign=middle class=tablebody1 height=100><CENTER>"
dim showwhat
showwhat=request("show")
%>
<table width="800" border="0" align="center">
  <tr>
    <td>
      <%if showwhat="user" then%>
        <table cellspacing=1 cellpadding=4 width="90%" border=0 align="center">
        <tbody> 
        <tr> 
          <td align=middle height=20 colspan="4"><%=Dvbbs.MyUserInfo(5)%>个人彩票购买情况</td>
        </tr>
        <%
		dim rs0,saywhat
			set rs0=tc_conn.execute("select * from cp_gmxx where gmz='"&Dvbbs.MyUserInfo(5)&"' and qs<"&session("qs")&" order by qs desc")
			do while not rs0.eof
			 
			%>
        <tr> 
          <td valign=center align=left 
            height=26 nowrap width="30%"> 
            <%response.write("第"&rs0("qs")&"期："&rs0("gmhm")&"<br>")%>
          </td>
           
          <td valign=center align=left 
            height=26 nowrap width="20%"> 
            <%
			select case rs0("zj")
			       case 5
				     saywhat="中特等奖"
				   case 4
				   saywhat="中一等奖"
                   case 3
				   saywhat="中二等奖"
				   case 2
				   saywhat="中三等奖"
				   case 1
				   saywhat="无中奖"
				   case 0
				   saywhat="无中奖"
			end select
			response.write(saywhat)
			rs0.movenext
			%>
</td>
			
          <td valign=center align=left nowrap width="30%"><%response.write("第"&rs0("qs")&"期："&rs0("gmhm")&"<br>")%></td>
          <td valign=center align=left nowrap width="20%">          <%
			select case rs0("zj")
			       case 5
				     saywhat="中特等奖"
				   case 4
				   saywhat="中一等奖"
                   case 3
				   saywhat="中二等奖"
				   case 2
				   saywhat="中三等奖"
				   case 1
				   saywhat="无中奖"
				   case 0
				   saywhat="无中奖"
			end select
			response.write(saywhat)%></td>
        </tr><%rs0.movenext
			loop
			rs0.close
			set rs0=nothing
			%>
        <tr align=middle bgcolor=#ffffff> 
          <td valign=center height=17 colspan="4"> 
            <div align="center"><a href="plus_tc.asp">返回</a></div>
          </td>
        </tr>
        </tbody> 
      </table>
 <%end if
 if showwhat="zj" then
 dim intqs 
 intqs=request("qs")
 set rs=tc_conn.execute("select hm, xse from cp_kjxx where qs="&intqs&"")%>
 <table cellspacing=1 cellpadding=4 width="50%" border=0 align="center">
        <tr> 
          <td align=middle height=20 colspan="2">第<%=intqs%>期开奖信息</td>
        </tr>
        <tr bgcolor=#ffffff> 
          <td valign=center align=left 
            height=25 colspan="2"> 
            <%response.write("开奖号码为："&rs("hm")&"      &nbsp; &nbsp; &nbsp;销售额为："&rs("xse"))
			rs.close
		    %>
          </td>
        </tr>
        <tr> 
          <td valign=center align=left 
            height=15 nowrap width="19%">特等奖：</td>
          <td valign=center align=left 
            height=15 nowrap width="81%">
			<%
			set rs=tc_conn.execute("select * from cp_gmxx where qs="&intqs&" and zj=5" )
			do while not rs.eof
			response.write(rs("gmz")&"&nbsp;")
			rs.movenext
			loop
			rs.close
			%>
			</td>
        </tr>
        <tr> 
          <td valign=center align=left 
            height=16 nowrap width="19%">一等奖：</td>
          <td valign=center align=left 
            height=16 nowrap width="81%"><%
			set rs=tc_conn.execute("select * from cp_gmxx where qs="&intqs&" and zj=4" )
			do while not rs.eof
			response.write(rs("gmz")&"&nbsp;")
			rs.movenext
			loop
			rs.close
			%></td>
        </tr>
        <tr> 
          <td valign=center align=left 
            height=15 nowrap width="19%">二等奖：</td>
          <td valign=center align=left 
            height=15 nowrap width="81%"><%
			set rs=tc_conn.execute("select * from cp_gmxx where qs="&intqs&" and zj=3" )
			do while not rs.eof
			response.write(rs("gmz")&"&nbsp;")
			rs.movenext
			loop
			rs.close
			%></td>
        </tr>
        <tr> 
          <td valign=center align=left 
            height=16 nowrap width="19%">三等奖：</td>
          <td valign=center align=left 
            height=16 nowrap width="81%"><%
			set rs=tc_conn.execute("select * from cp_gmxx where qs="&intqs&" and zj=2" )
			do while not rs.eof
			response.write(rs("gmz")&"&nbsp;")
			rs.movenext
			loop
			rs.close
			set rs=nothing
			%></td>
        </tr>
        <tr align=middle bgcolor=#ffffff> 
          <td valign=center height=17 colspan="2"> 
            <div align="center"><a href="plus_tc.asp">返回</a></div>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </tbody> 
</table>
 <%end if%>
    </td>
  </tr>
</table>
<%
response.write "</CENTER></td></tr></table>"
 end if
 call Dvbbs.footer() 
%>
