<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<% '=========================================================
' File: klatchlist.asp
' Version:3.0
' Date: 2005-8-19
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
dim City,typeid,action,sqls
response.buffer=true
City=checkStr(Request("City"))
typeid=checkStr(Request("typeid"))
action=trim(Request("action"))
if action="" then
stats="全部聚会列表"
elseif action="webklatch" then
stats="网站活动列表"
elseif action="search" then''聚会搜索处理
stats="搜索结果列表"
if City="" and typeid="" then
Errmsg=Errmsg+"<br>"+"<li>对不起，搜索条件不足。"
	founderr=true
end if
if City<>"" and strLength(City)>50 then
Errmsg=Errmsg+"<br>"+"<li>对不起，输入的城市长度大于50个字符。"
	founderr=true
end if
if city<>"" then
sqls=sqls&" and city='"&City&"' "
end if
if typeid<>"" then
sqls=sqls&" and Typeid="&typeid&" "
end if
end if
call nav()
if not founduser then
	Errmsg=Errmsg+"<br>"+"<li>您还没有登陆，请登陆后进行修改。"
	founderr=true
end if

if founderr then
	call head_var("","")
	call Mslove_error()
else
	call head_var("聚会大厅","klatch.asp")
call tumppages()'翻页处理
strFileName="klatchlist.asp?action="&action&"&Typeid="&typeid&""
call main()
end if
call activeonline()
call footer()

sub main()%>
  
<table width="100%" align=center cellpadding=3 cellspacing=1 class=tableborder1>
    <tr> 
      <th height="28" colspan="7" align="center"  class=tablebody1><%=stats%></th>
    </tr>
    <tr> 
      <td width="6%" height="29" align="center"  class=tablebody2>邀请</td>
      <td width="11%" align="center"  class=tablebody2>类 型</td>
      <td width="42%" align="center"  class=tablebody2>主 　　题</td>
      <td width="9%" align="center"  class=tablebody2>城市</td>
      
    <td width="8%" align="center"  class=tablebody2>参加人数</td>
      <td width="16%" align="center"  class=tablebody2>结束时间</td>
      <td width="8%" align="center"  class=tablebody2>人气</td>
    </tr>
	<%dim Checked,id,Typeid
	set rs=server.createobject("adodb.recordset")
	if action="" then
	sql="select Checked,Kid,Typeid,Title,City,Joinnum,Enddate,hits,Quota from [Ms_klatch] where Checked=1 and Typeid<>7 order by Kid"
	elseif action="webklatch" then
	sql="select Checked,Kid,Typeid,Title,City,Joinnum,Enddate,hits,Quota from [Ms_klatch] where Typeid=7 order by Kid"
	elseif action="search" then
	sql="select Checked,Kid,Typeid,Title,City,Joinnum,Enddate,hits,Quota from [Ms_klatch] where Checked=1 "&sqls&" order by Kid"
	end if	
rs.Open sql,conn,1,1
if not (rs.eof and rs.bof) then
call rspages()
do while not rs.eof and page_count<Cint(MaxPerPage)
checked=rs("Checked")
id=rs("Kid")
Typeid=rs("Typeid")
%>
    <tr> 
      <td height="26" align="center"  class=tablebody1><%=rs("Quota")%></td>
      <td height="26" align="center"  class=tablebody1><%
	  Select Case Typeid
	Case 1
	response.Write("周末闲聊")
	Case 2
	response.Write("酒吧畅饮")
	Case 3
	response.Write("郊外远足")
	Case 4
	response.Write("游戏切磋")
	Case 5
	response.Write("逛街看戏")
	Case 6
	response.Write("白领聚会")
	Case 7
	response.Write("网站活动")
	End Select%></td>
      <td height="26"  class=tablebody1><a href=klview.asp?id=<%=id%>><%=rs("Title")%></a></td>
      <td height="26" align="center"  class=tablebody1><%=rs("City")%></td>
      <td height="26" align="center"  class=tablebody1><%=rs("Joinnum")%></td>
      <td height="26" align="center"  class=tablebody1><%=rs("Enddate")%></td>
      <td height="26" align="center"  class=tablebody1><%=rs("hits")%></td>
    </tr>
	<%page_count=page_count+1
  rs.movenext
  loop
  end if
  %>
    <tr> 
      <td colspan="7" align="center"  class=tablebody2><%if totalrec>0 then
		  	call showpage(strFileName)
		  end if%></td>
    </tr>
    <tr> 
      <td colspan="7" align="left"  class=tablebody1>&nbsp;</td>
    </tr>
</table>
<%
rs.close
end sub
%>   
</body>
</html> 