<!-- #include file=../../inc/BBSsetup.asp -->
<!-- #include file=../../inc/Board_Popfun.asp -->
<!-- #include file=../../inc/User_Setup.ASP -->
<!-- #include file=xzconn.asp -->

<%
Response.Buffer=True

DEF_BBS_HomeUrl = "../../"
const npage = 2

GBL_CHK_TempStr=""
OpenDatabase
CheckUserOnline

	Dim Temp
	If GBL_SiteHeadString = "" and GBL_SiteBottomString = "" Then
		'针对多个版面不同风格需求 Temp = Left(Request.Cookies(DEF_MasterCookies & "style")("border" & GBL_board_ID),14)
		Temp = Left(Request.Cookies(DEF_MasterCookies & "style")("border"),14)
		If isNumeric(Temp) = 0 or Temp="" Then Temp = -1
		Temp = cCur(Temp)
		If Temp >= 0 and Temp <= DEF_BoardStyleStringNum Then GBL_Board_BoardStyle = Temp
	End If

	If GBL_Board_BoardStyle > DEF_BoardStyleStringNum Then GBL_Board_BoardStyle = DEF_BoardStyleStringNum
	GBL_Board_BoardStyle = cCur(GBL_Board_BoardStyle)

	Temp = application(DEF_MasterCookies & "Style" & GBL_Board_BoardStyle)
	If isArray(Temp) = False Then
		If Temp & "" <> "yes" Then
			If GBL_ConFlag = 1 Then ReloadBoardStyleInfo(GBL_Board_BoardStyle)
			Temp = application(DEF_MasterCookies & "Style" & GBL_Board_BoardStyle)
		End If
	End If
	If isArray(Temp) = True Then
		DEF_BBS_ScreenWidth = RTrim(Temp(1,0))
		DEF_BBS_DisplayTopicLength = Temp(2,0)
		GBL_DefineImage = Temp(3,0)
		If GBL_DefineImage = True or GBL_DefineImage = 1 Then
			GBL_DefineImage = "Skin/" & GBL_Board_BoardStyle & "/"
		Else
			GBL_DefineImage = ""
		End If
		If GBL_SiteHeadString = "" Then GBL_SiteHeadString = Temp(4,0)
		If GBL_SiteBottomString = "" Then GBL_SiteBottomString = Temp(5,0)
		GBL_TableHeadString = Temp(6,0)
		GBL_TableBottomString = Temp(7,0)
		GBL_ShowBottomSure = Temp(8,0)
		GBL_TempletID = cCur("0" & Temp(9,0))
		GBL_TempletFlag = cCur("0" & Temp(10,0))
	End If
    response.write "<link rel=stylesheet type=text/css href="&DEF_BBS_homeUrl&"inc/style"&GBL_Board_BoardStyle&".css>"
dim headvar
headvar="&nbsp>>&nbsp<a href=xzindex.asp><font class=NavColor>社区勋章</font></a>"
BBS_SiteHead DEF_SiteNameString&" 社区勋章",GBL_board_ID,headvar
dim membername
membername=GBL_CHK_User'tinder
if membername="" then
		response.write "<CENTER><table width="&DEF_BBS_ScreenWidth&" border='0' cellspacing='1' cellpadding='4' class=TBone ><tr><td width= 100% valign=center align=middle height=27 class=TBHead><font color=red><b>您还没有登录，不能查看此页面，请先登录！</b></font></td></tr></table></CENTER>"
else


	dim rs,nm,i,sql,TotalRec,Pcount,Orders,Page,TempStr

dim themenu,menu(8)
	
	menu(0)="勋章介绍"
	menu(1)="获得勋章名单"
	menu(2)="颁发勋章"
	menu(3)="勋章管理"
	menu(4)="事件察看"
    menu(6)="勋章申请"

 if request.querystring("menu")="" then
		themenu=0
	else
		themenu=request.querystring("menu")
	end if	

  
  sub xztitle
  dim pass
	set rs=xzconn.execute("select * from xzuser where username='"&GBL_CHK_User&"' and pass like '1' order by id desc;")

	response.write "<table width='100%' border='0' cellspacing='1' cellpadding='4' class=TBone>"
	response.write "	<tr>"
	response.write "		<td align=center valign=middle class=TBHead>&nbsp;&nbsp;&nbsp;&nbsp;"
	response.write "		<a href=xzindex.asp><font class=HeadFont><b>勋章介绍</b></font></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;"
	response.write "		<a href=xzindex.asp?menu=6><font class=HeadFont><b>申请勋章</b></font></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;"
	response.write "		<a href=xzindex.asp?menu=1><font class=HeadFont><b>获得勋章名单</b></font></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;"
	If CheckSupervisorUserName = 1 Then
	response.write "		<a href=xzindex.asp?menu=2><font class=HeadFont><b>颁发勋章</b></font></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;"
	response.write "		<a href=xzindex.asp?menu=3><font class=HeadFont><b>勋章管理</b></font></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;"
	end if
	response.write "		<a href=xzindex.asp?menu=4><font class=HeadFont><b>事件察看</b></font></a> "
	response.write "		</th>"
	response.write "	</tr> "
	response.write "</table>"
	response.write "<br>"
	'response.write "<table width='70%' align=center cellpadding=3 cellspacing=1 class=tableborder2>"
	
	response.write "<tr>"
    response.write "<td height=1 align=center class=tablebody2>欢迎您：["&GBL_CHK_User&"]，您现在获得的勋章："
    
    '###########################
dim xzrs,xzid,xzname,xzsm,xzpicurl,xzdata,xzq
if not rs.eof then
do while not rs.eof 
	xzq=rs("xzkind")
                if xzq<>"0" then
		set xzrs=xzconn.execute("select * from xzdata where xzid="&xzq)
		xzid=xzrs("xzid")
		xzname=xzrs("xzname")
		xzsm=xzrs("xzsm")
		xzpicurl=xzrs("xzpicurl")
		response.write "&nbsp;&nbsp;<img src=pic/"&xzrs("xzpicurl")&" title="&xzname&":"&xzsm&">"
		end if
rs.movenext
loop
else
response.write "<font color=red>您要努力哦！你暂时没有什么勋章！</font>"

end if
'###########################
    
    
	response.write "</td></tr>"
	response.write "<tr>"
	response.write "<th height=25></td>"
	response.write "</tr>"
end sub

call main()
end if


SiteBottom
If GBL_SiteBottomString <> "" Then Response.Write GBL_SiteBottomString

sub main()

  

%>
<table width=<%=DEF_BBS_ScreenWidth%>  border="0" align="center" cellpadding="3" cellspacing="1" class=tableborder1>
  <tr> 
  
	<td>
<% Call xztitle()%>

    </td>
  </tr>
  <tr>
    <td class=tablebody1> <%select case themenu

	case 0
	Call menu0()
	case 1
	Call menu1()
	case 2
	Call menu2()
	case 3
	Call menu3()
	case 4
	Call menu4()
	case 5
	Call menu5()
	case 6
	call menu6()
	end select
%>
	  </td>
	</tr>
	</table>
<%
end sub

sub menu0()
%>
  

<table width='100%' border='0' cellspacing='1' cellpadding='4' class=TBone bgcolor=<%=DEF_BBS_DarkColor%>>
	<tr bgcolor=<%=DEF_BBS_LightDarkColor%>>
		<td colspan=3 align="center"  class=TBHead><font class=HeadFont><b>勋章办法介绍</b></font></td>
	</tr>
	<tr > 
					<Td align="center"  class=TBHead width=20%><font class=HeadFont>勋章名称</font></Td>
					<Td align="center"  class=TBHead width=60%><font class=HeadFont>说明</font></Td>
					<Td align="center"  class=TBHead width=20%><font class=HeadFont>勋章图示</font></Td>
				</TR>
	<%
	dim rs,sql
    Set Rs=Server.CreateObject("ADODB.RecordSet")
			sql="select * from xzdata order by xzid desc"
	Rs.Open SQL,xzConn,1,1
	if rs.eof then
	%>
	<tr bgcolor=<%=DEF_BBS_LightestColor%> class=TBBG9><td colspan=3 class=TableTitle29>还没有记录</td></tr>
	<%
	else
       '分页代码开始
	dim pagecount,fen,count,totalpage
	   fen=10'设置每页要显示的记录条数
       Count=RS.RecordCount
       If Count/fen > (Count\fen) then
       TotalPage=(Count\fen)+1 
       else 
	   TotalPage=(Count\fen)
       End If

       PageCount= 0
       RS.MoveFirst
       if Request("Page")<>"" then PageCount = cint(Request("Page"))
       if PageCount <1 then PageCount = 1
       if PageCount > TotalPage then PageCount = TotalPage
	   RS.Move (PageCount-1) * fen
       '分页代码结束
nm=1
do while not rs.eof and nm<=fen
	%>
				<TR bgcolor=<%=DEF_BBS_LightestColor%> class=TBBG9>
					<TD class=tablebody2 align="center"><%=rs("xzname")%></TD>
					<TD class=tablebody2 align="center"><%=rs("xzsm")%></TD>
					<TD class=tablebody2 align="center"><img src=pic/<%=rs("xzpicurl")%>></TD>
				</TR>
	<%
			nm=nm+1
rs.movenext
loop
	%>
	  <tr>
	        <td colspan=3 class=tbbg9 align="left">
			<%if pagecount=1 then%><font color=darkgray>首页&nbsp;上一页</font><%else%><a href=xzindex.asp?page=1>首页</a>&nbsp;
			<a href=xzindex.asp?page=<%=pagecount-1%>>上一页</a><%end if%>&nbsp;
			<%if pagecount=totalpage then%><font color=darkgray>下一页&nbsp;尾页</font><%else%><a href=xzindex.asp?page=<%=pagecount+1%>>下一页</a>&nbsp;
			<a href=xzindex.asp?page=<%=TotalPage%>>尾页</a><%end if%>&nbsp;
			&nbsp;共&nbsp;<b><%=Count%></b>&nbsp;个勋章&nbsp;&nbsp;第&nbsp;<b><%=PageCount%></b>/<b><%=TotalPage%></b>&nbsp;页&nbsp;&nbsp;每页<b><%=fen%></b>个
			</td>
    </tr>
	<%end if%>
</table>
<%
rs.close
set rs=nothing
end sub






sub menu1()
%>
<table width='100%' border='0' cellspacing='1' cellpadding='4' class=TBone bgcolor=<%=DEF_BBS_DarkColor%>>
<tr  align=center  class=tbbg9 bgcolor=<%=DEF_BBS_DarkColor%>>
<td class=TBHead>
<font class=HeadFont><b>姓名</b></font>
</td>
<td class=TBHead>
<font class=HeadFont><b>勋章一</b></font>
</td>
<td class=TBHead>
<font class=HeadFont><b>勋章二</b></font>
</td>
<td class=TBHead>
<font class=HeadFont><b>勋章三</b></font>
</td>
<td class=TBHead>
<font class=HeadFont><b>勋章四</b></font>
</td>
<td class=TBHead>
<font class=HeadFont><b>勋章五</b></font>
</td>
</tr>
<%
dim pass,user
Set Rs=Server.CreateObject("ADODB.RecordSet")
			sql="select distinct username from xzuser where pass like '1';"
	Rs.Open SQL,xzConn,1,1

	If Rs.Eof And Rs.Bof Then
		response.write "<tr><td align=center colspan=6 class=tbbg9>　　还没有任何用户数据。</font></td></tr>"
	Else
	       '分页代码开始
	dim pagecount,fen,count,totalpage
	   fen=10'设置每页要显示的记录条数
       Count=RS.RecordCount
       If Count/fen > (Count\fen) then
       TotalPage=(Count\fen)+1 
       else 
	   TotalPage=(Count\fen)
       End If

       PageCount= 0
       RS.MoveFirst
       if Request("Page")<>"" then PageCount = cint(Request("Page"))
       if PageCount <1 then PageCount = 1
       if PageCount > TotalPage then PageCount = TotalPage
	   RS.Move (PageCount-1) * fen
       '分页代码结束
	 dim a
	 a=0
	do while not Rs.Eof and a<fen
%>
<tr class=tbbg9>
<td align=left width=20%>&nbsp;<a href=<%=DEF_BBS_HomeUrl%>Plug-ins/xunzhang/xzindex.asp?menu=5&name=<%=rs("username")%> title=查看更多获奖信息><%=rs("username")%></a></td>

<%
    '###########################
dim xzkinds,xzrs,xzid,xzname,xzsm,xzpicurl,xzdata,xzq
        xzname=rs("username")
		set xzkinds=xzconn.execute("select top 5 * from xzuser where username='"&xzname&"' and pass like '1'")
		dim i
		i=0
		do while not xzkinds.eof
		i=i+1
        response.write "<td align=center width=16% >"
        response.write "<table><tr><td align=center>"
		xzq=xzkinds("xzkind")
                if xzq<>"0" then
		set xzrs=xzconn.execute("select * from xzdata where xzid="&xzq)
		xzid=xzrs("xzid")
		xzname=xzrs("xzname")
		xzsm=xzrs("xzsm")
		xzpicurl=xzrs("xzpicurl")
		response.write "<img src=pic/"&xzrs("xzpicurl")&" title="&xzsm&">"
        response.write "</td></tr><tr><td align=center>"
        response.write ""&xzname&""
        response.write "</td></tr></table></td>"
        end if
	    xzkinds.movenext
	    loop
        xzkinds.close
		do while i<5
		i=i+1
        response.write "<td align=center width=16% > </td>"
		loop

    
%>
</tr>
<%
a=a+1
rs.movenext
loop
rs.close
%>
<tr>
    <td colspan=6 class=tbbg9 align="left"><%if pagecount=1 then%><font color=darkgray>首页&nbsp;上一页</font><%else%><a href=xzindex.asp?page=1&menu=1>首页</a>&nbsp;
			<a href=xzindex.asp?page=<%=pagecount-1%>&menu=1>上一页</a><%end if%>&nbsp;
			<%if pagecount=totalpage then%><font color=darkgray>下一页&nbsp;尾页</font><%else%><a href=xzindex.asp?page=<%=pagecount+1%>&menu=1>下一页</a>&nbsp;
			<a href=xzindex.asp?page=<%=TotalPage%>&menu=1>尾页</a><%end if%>&nbsp;
			&nbsp;共&nbsp;<b><%=Count%></b>&nbsp;条信息&nbsp;&nbsp;第&nbsp;<b><%=PageCount%></b>/<b><%=TotalPage%></b>&nbsp;页&nbsp;&nbsp;每页<b><%=fen%></b>条</td>
</tr>
</table>
<%
End If
end sub

sub menu2()
%>
       <table width='100%' border="0" align="center" cellpadding="3" cellspacing="1">
        <tr >
          <td align="center" height=510 class=TableBody1><IFRame marginwidth=0 marginheight=0  width=100% height=100% src=xzup_admin.asp frameborder=0 scrolling=no></iframe></td>
        </tr>
		<tr>
		  <td align="center">

    
		  </td>
		</tr>
      </table>
<%
end sub

sub menu3()
%>
      <table width='100%' border="0" align="center" cellpadding="3" cellspacing="1">
        <tr >
          <td align="center" height=510><IFRame marginwidth=0 marginheight=0  width=100% height=100% src=xzmanager_admin.asp frameborder=0 scrolling=NO></iframe></td>
        </tr>
		<tr>
		  <td align="center">

    <p style="margin-top: 0; margin-bottom: 0"><b>注意</b>：<br>
    ①、编号中必须添入数值，否则不能保存。<br>
    ②、请完整填写所有数据，然后进行保存。<br>
    ③、点击[<b><font color="#FF0000">添加奖项</font></b>]切换到奖项添加页面。</p>
    
		  </td>
		</tr>
      </table>
<%
    
end sub

sub menu4()
	Dim Page
	Dim select1,select2
	Dim TempStr
	Dim TotalRec,i,Pcount

	TotalRec=0
	Page=request("page")
	If Page="" Or Not IsNumerIc(Page) Then Page=1
	Page=Clng(Page)

	'sql="select * from xz_log "

	sql="select xz_date,xz_owner,xz_user,xz_pos,xz_level,xz_why from xz_log order by xz_date desc"

%>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="1"  class=TBone bgcolor=#cccccc>

<tr align=center class=TBBG9 bgcolor=<%=DEF_BBS_DarkColor%>> 
<td class=TBHead><font class=HeadFont><b>日期时间</b></font></td>
<td class=TBHead><font class=HeadFont><b>执行者</b></font></td>
<td class=TBHead><font class=HeadFont><b>被颁发者</b></font></td>
<td class=TBHead><font class=HeadFont><b>结果</b></font></td>
<td class=TBHead><font class=HeadFont><b>对应勋章</b></font></td>
<td class=TBHead><font class=HeadFont><b>原因</b></font></td>
</tr>
<%

	Set Rs=Server.CreateObject("ADODB.RecordSet")
	If Not IsObject(xzConn) Then ConnectionDatabase
	Rs.Open SQL,xzConn,1,1
	If Not Rs.Eof Then TotalRec=Rs.RecordCount


	If Rs.Eof And Rs.Bof Then
		response.write "<tr><td colspan=6  class=tbbg9>　　还没有任何事件。</font></td></tr>"
	Else
	DEF_MaxListNum =10  '设置每页要显示的记录条数
		If TotalRec Mod DEF_MaxListNum=0 Then
			Pcount= TotalRec \ DEF_MaxListNum
		Else
			Pcount= TotalRec \ DEF_MaxListNum+1
		End If
		RS.MoveFirst
		if Page > Pcount then Page = Pcount
		if Page < 1 then Page=1
		RS.Move (Page-1) * DEF_MaxListNum
		SQL=Rs.GetRows(DEF_MaxListNum)
		Set Rs=Nothing
	'rank_date=0,rank_owner=1,rank_user=2,rank_pos=3,rank_level=4,Rank_url=5,rank_why=6
		For i = 0 To Ubound(SQL,2)
	%>
<tr class=TBBG9>
<td align=center width='15%'><%=Mid(SQL(0,i),1,10)%></td>
<td align=center width='15%'><%=SQL(2,i)%></td>
<td align=center width='15%'><a href=xzindex.asp?menu=5&name=<%=SQL(1,i)%>><%=SQL(1,i)%></a></td>
<td align=center width='15%'><%=SQL(3,i)%></td>
<%
dim rsa,rsasql
set rsa=Server.CreateObject("ADODB.RecordSet")
	rsasql="select xzname,xzsm from xzdata where xzid="&SQL(4,i)
	Rsa.Open rsaSQL,xzConn,1,1
%>
<td align=center width='15%'><img border=0 src="pic/<%=SQL(4,i)%>.gif" title=<%=rsa("xzname")%>：<%=rsa("xzsm")%>></td>
<%
rsa.close
set rsa=nothing
%>
<td align=left width='25%'><%=SQL(5,i)%></td>
</tr>
<%
		Next
%>
<tr>
     <td colspan=6 class=TBBG9 align="left"><%if Page=1 then%><font color=darkgray>首页&nbsp;上一页</font><%else%><a href=xzindex.asp?page=1&menu=4>首页</a>&nbsp;
			<a href=xzindex.asp?page=<%=Page-1%>&menu=4>上一页</a><%end if%>&nbsp;
			<%if Page=Pcount then%><font color=darkgray>下一页&nbsp;尾页</font><%else%><a href=xzindex.asp?page=<%=Page+1%>&menu=4>下一页</a>&nbsp;
			<a href=xzindex.asp?page=<%=Pcount%>&menu=4>尾页</a><%end if%>&nbsp;
			&nbsp;共&nbsp;<b><%=TotalRec%></b>&nbsp;条事件&nbsp;&nbsp;第&nbsp;<b><%=Page%></b>/<b><%=Pcount%></b>&nbsp;页&nbsp;&nbsp;每页<b><%=DEF_MaxListNum%></b>条</td>
</tr>
<%end if%>
</table>
<%
end sub

sub menu5()
dim usernames
usernames=request.querystring("name")
if usernames="" then
response.write "查看的用户名不能为空"
else
%>
<table width='100%' border='0' cellspacing='1' cellpadding='4' class=TBone>
<tr  align=center  class=tbbg9>
<td class=TBHead width=20%>
<font class=HeadFont><b>姓名</b></font>
</td>
<td class=TBHead width=80%>
<font class=HeadFont><b>获得勋章</b></font>
</td>
</tr>
<tr>
<td class=tbbg9>
<a href=<%=DEF_BBS_HomeUrl%>user/LookUserInfo.asp?name=<%=usernames%> title=查看个人信息><%=usernames%></a>
</td>
<%
dim rsa,rsasql,xzrs,xzid,xzname,xzpicurl,xzsm,pass
Set Rsa=Server.CreateObject("ADODB.RecordSet")
			rsasql="select distinct id,xzkind,username from xzuser where username='"&usernames&"' and pass like '1';"
	Rsa.Open rsaSQL,xzConn,1,1
%>
<td align="center" class=tbbg9>
<%  if rsa.eof then
        response.write"此用户没获得勋章记录"
		else
        do while not rsa.eof
		set xzrs=xzconn.execute("select * from xzdata where xzid="&rsa("xzkind"))
		xzid=xzrs("xzid")
		xzname=xzrs("xzname")
		xzsm=xzrs("xzsm")
		xzpicurl=xzrs("xzpicurl")
		response.write "&nbsp;&nbsp;<img src=pic/"&xzrs("xzpicurl")&" title="&xzname&"："&xzsm&">"
	    If CheckSupervisorUserName = 1 Then
        response.write "<a href=xzup_admin.asp?action=del&id="&rsa("id")&"><font color=red>取消</font></a>"
       end if
	    rsa.movenext
	    loop
      end if
%>
</td>
<%
rsa.close
set rsa=nothing
%>
</tr>
</table>
<%
end if
end sub

sub menu6()
dim passuser
passuser=trim(request.form("passed"))
if passuser="yes" then
 userpassyes
else

%>
<table width='100%' border='0' cellspacing='1' cellpadding='4' class=TBone bgcolor=<%=DEF_BBS_DarkColor%>>
<form name="form" method="post" action="xzindex.asp?menu=6">
<tr  align=center bgcolor=<%=DEF_BBS_DarkColor%>>
<td class=TBHead colspan="6">
<font class=HeadFont><b>勋章申请要求</b></font>
</td>
</tr>
<tr align=center class=TBHead>
    <td width=100 ></td>
	<td width='15%'><font class=HeadFont><b><%=DEF_PointsName%></b></font></td>
	<td width='15%'><font class=HeadFont><b>发贴量</b></font></td>
    <td width='15%'><font class=HeadFont><b>魅力</b></font></td>
    <td width='15%'><font class=HeadFont><b>经验</b></font></td>
    <td width='25%'><font class=HeadFont><b>等级</b></font></td>
</tr>
<%
dim rsa,rsasql,jifen,fatie,meili,jingyan,dengji
Set Rsa=Server.CreateObject("ADODB.RecordSet")
			rsasql="select * from xzpass"
	Rsa.Open rsaSQL,xzConn,1,1
	jifen=rsa("jifen")
	fatie=rsa("fatie")
	meili=rsa("meili")
	jingyan=rsa("jingyan")
	dengji=rsa("dengji")
	rsa.close
set rsa=nothing
%>
<tr class=tbbg9 align=center>
    <td>申请要求</td>
	<td><b><%=jifen%></b></td>
	<td><b><%=fatie%></b></td>
    <td><b><%=meili%></b></td>
    <td><b><%=jingyan%></b></td>
    <td><b><img src=../../images/lvstar/level<%=dengji%>.gif title="级别：<%=DEF_UserLevelString(dengji)%>"></b></td>
</tr>
<%
Set Rsa=Server.CreateObject("ADODB.RecordSet")
			rsasql="select points,AnnounceNum,charmpoint,onlinetime,userlevel from LeadBBS_User where username='"&GBL_CHK_User&"'"
	Rsa.Open rsaSQL,Conn,1,1
%>
<script language=javascript>
<!--
var DEF_UserLevelString=new Array(<%
    dim N
	Response.Write """" & DEF_UserLevelString(0) & """"
	for n = 1 to DEF_UserLevelNum
		Response.Write ",""" & DEF_UserLevelString(n) & """"
	Next
%>);
-->
</script>
<tr class=tbbg9 align=center>
    <td>你的状态</td>
	<td><%=rsa("points")%></td>
	<td><%=rsa("AnnounceNum")%></td>
    <td><%=rsa("charmpoint")%></td>
    <td><%=CLng(cCur(rsa("onlinetime"))/60)%></td>
    <td><img src=../../images/lvstar/level<%=rsa("userlevel")%>.gif title="级别：<%=DEF_UserLevelString(rsa("userlevel"))%>"></td>
</tr>
<tr class=tbbg9 align=center>
    <td>是否满足</td>
	<td><%if rsa("points")>=jifen then%><font color=#FF0066>√</font><%else%>×<%end if%></td>
	<td><%if rsa("AnnounceNum")>=fatie then%><font color=#FF0066>√</font><%else%>×<%end if%></td>
    <td><%if rsa("charmpoint")>=meili then%><font color=#FF0066>√</font><%else%>×<%end if%></td>
    <td><%if CLng(cCur(rsa("onlinetime"))/60)>=jingyan then%><font color=#FF0066>√</font><%else%>×<%end if%></td>
    <td><%if rsa("userlevel")>=dengji then%><font color=#FF0066>√</font><%else%>×<%end if%></td>
</tr>
<%
dim passflag
if rsa("points")>=jifen and rsa("AnnounceNum")>=fatie and rsa("charmpoint")>=meili and CLng(cCur(rsa("onlinetime"))/60)>=jingyan and rsa("userlevel")>=dengji then
passflag="yes"
else
passflag="NO"
end if
%>
<tr class=tbbg9 align=center>
    <td colspan="6"><input name="passed" type="hidden" id="name" value="yes"><input name=submit type=submit value=" 申  请 " <%if passflag<>"yes" then%>disabled<%end if%> class=fmbtn></td>
</tr>
</form>
</table>
<%
end if
end sub

Function userpassyes
dim rsa,rsasql,jifen,fatie,meili,jingyan,dengji
Set Rsa=Server.CreateObject("ADODB.RecordSet")
			rsasql="select * from xzpass"
	Rsa.Open rsaSQL,xzConn,1,1
	jifen=rsa("jifen")
	fatie=rsa("fatie")
	meili=rsa("meili")
	jingyan=rsa("jingyan")
	dengji=rsa("dengji")
	rsa.close
set rsa=nothing
Set Rsa=Server.CreateObject("ADODB.RecordSet")
			rsasql="select points,AnnounceNum,charmpoint,onlinetime,userlevel from LeadBBS_User where username='"&GBL_CHK_User&"'"
	Rsa.Open rsaSQL,Conn,1,1
dim passflag
if rsa("points")<jifen and rsa("AnnounceNum")<fatie and rsa("charmpoint")<meili and CLng(cCur(rsa("onlinetime"))/60)<jingyan and rsa("userlevel")<dengji then
%>
<SCRIPT language=JavaScript>
alert('你没有达到要求,请返回!');
this.location.href='zxindex.asp';
</SCRIPT>
<%
rsa.close
set rsa=nothing
response.end
end if
rsa.close
set rsa=nothing
%>
<table width='100%' border='0' cellspacing='1' cellpadding='4' class=TBone bgcolor=<%=DEF_BBS_DarkColor%>>
<form name="form" method="post" action="xzsq.asp">
<tr  align=center  class=tbbg9 bgcolor=<%=DEF_BBS_DarkColor%>>
<td class=TBHead colspan="2">
<font class=HeadFont><b>勋章申请</b></font>
</td>
</tr>
<tr class=tbbg9>
    <td width="35%" align="right">论坛用户：</td>
    <td width="65%"><input name="textfield" type="text" size="20" value="<%=GBL_CHK_User%>" readonly><input name="name" type="hidden" id="name" value="<%=GBL_CHK_User%>"></td>
</tr>
  <tr class=tbbg9>
    <td align="right">选择勋章：</td>
<%
Set Rsa=Server.CreateObject("ADODB.RecordSet")
			rsasql="select xzid,xzname from xzdata"
	Rsa.Open rsaSQL,xzConn,1,1
%>
    <td>
	<select name="xzsq" class=TBBG9>
  <option value="" selected>请选择勋章</option>
	<%
	if not rsa.eof then
	while not rsa.eof
	%>
  <option value="<%=rsa("xzid")%>"><%=rsa("xzname")%></option>
  <%
  rsa.movenext
  wend
  end if
  %>
</select>
</td>
<%
rsa.close
set rsa=nothing
%>
  </tr>
  <tr class=tbbg9>
    <td align="right" valign="top">申请理由：</td>
    <td><textarea name="xzliyou" cols="50" rows="4"></textarea></td>
  </tr>
  <tr align="center" class=tbbg9>
    <td colspan="2"><input type="submit" name="Submit" value="确定" class=fmbtn>&nbsp;&nbsp;&nbsp;
    <input type="reset" name="Submit" value="取消" class=fmbtn></td>
  </tr>
</form>
</table>
<%
end Function
%>
