<!-- #Include File="../Include/Skin.asp" -->
<!-- #Include File="../Include/Cls_pagecute.asp" -->
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V3.0》，简称“AsaiMHV3”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

Dim sql_add,sql_order
tit_fir="用户中心"
Select Case LCase(Action)
Case "emoney"
	sql_order="emoney desc"
	tit="财富排行"
Case "top"
	sql_order="bbs_counter desc"
	tit="发贴排行"
Case "integral"
	sql_order="integral desc"
	tit="积分排行"
Case "strength"
	sql_order="strength desc"
	tit="体力排行"
Case "expression"
	sql_order="expression desc"
	tit="经验排行"
Case Else
	sql_order="id desc"
	tit="用户列表"
End Select
Call DoWebHead(0,0)
call User_Help_Action()
Call DoWebEnd()
Sub User_Help_Action()
    Dim obj_page,tmp1
    dim TrHtml
    Cls.ReadPage "user_action"
    TrHtml = Cls.CutFixContent(NewContent, "[Repeat]" , "[/Repeat]", 0)
	Set obj_page=new Cls_PageCute
	obj_page.pageurl="?action="&action&"&"			'链接
	obj_page.nummer=Format_Mid_Num(12)					'调用个数
	obj_page.page_t=1									'两种样式
	obj_page.page_p=5									'翻页显示的个数
	obj_page.page_unit="位"
	obj_page.page_tit="用户"
	obj_page.v_id="id"
	Call obj_page.p_init("id,username,power,sex,bbs_counter,integral,emoney,strength,expression,tim","AsaiMHUserData","hidden=1",sql_order)
	SQL = obj_page.sql_count
	Set rs=Cls.Exec(SQL,1)
	obj_page.rssum=rs(0)
	Rs.Close
	Call obj_page.p_main("id,username,power,sex,bbs_counter,integral,emoney,strength,expression,tim","AsaiMHUserData","hidden=1",sql_order)
	For i=1 To obj_page.page_num
	 tmp1=tmp1&AsaiMHUserAction(i+obj_page.page_now,Rs("Username"),Rs("Power"),Rs("Sex"),Rs("bbs_counter"),Rs("Integral"),Rs("Emoney"),Rs("Strength"),Rs("Expression"),Cls.time_type(Rs("Tim"),4),TrHtml)
		Rs.Movenext
	Next
	Rs.Close
  NewContent = Replace(NewContent,"[Repeat]"&TrHtml&"[/Repeat]",tmp1)
  Cls.HtmlRcod "img_user",img_user()
  Cls.HtmlRcod "web_unit",Cls.web_unit
  Cls.HtmlRcod "ends","<tr class=tr0><td colspan=10><div id=asaipage>"&obj_page.page_var&" "&obj_page.page_cute&" "&obj_page.page_shortcut&"</tdiv></td></tr>"
  Cls.HtmlRcod "m_help2",img_skin("m_help2")
  Cls.HtmlRcod "tit",tit
  Cls.OutPage
  set obj_page=nothing
End Sub
Function AsaiMHUserAction(u_i,u_username,u_power,u_sex,u_bbs_counter,u_integral,u_emoney,u_strength,u_expression,u_tim,u_TrHtml)
	Dim HtmlStr:HtmlStr=u_TrHtml
    HtmlStr = Replace(HtmlStr,"{$u_i}",u_i)
    HtmlStr = Replace(HtmlStr,"{$u_reusername}",format_user_name(u_username,0,""))
    HtmlStr = Replace(HtmlStr,"{$u_power}",Format_UserPower(u_power))
    HtmlStr = Replace(HtmlStr,"{$u_sex}",Format_UserSex(u_sex))
    HtmlStr = Replace(HtmlStr,"{$u_integral}",u_integral)
    HtmlStr = Replace(HtmlStr,"{$u_bbs_counter}",u_bbs_counter)
    HtmlStr = Replace(HtmlStr,"{$u_emoney}",u_emoney)
    HtmlStr = Replace(HtmlStr,"{$img_emoney}","<img src='"&Cls.web_skindir&"sys/emoney.gIf' border=0 width=14 title='"&Cls.web_unit&"支付' align=absmiddle>")
    HtmlStr = Replace(HtmlStr,"{$u_expression}",u_expression)
    HtmlStr = Replace(HtmlStr,"{$u_strength}",u_strength)
    HtmlStr = Replace(HtmlStr,"{$u_tim}",u_tim)
    HtmlStr = Replace(HtmlStr,"{$u_username}",u_username)
    AsaiMHUserAction = HtmlStr
End Function
Function Format_UserPower(u_power)
	Dim fi,pdim,pnum,temp1
	temp1="<font class=Gys>err</font>"
	pdim=Cls.Cache_Get("User_Group")
	pnum=Ubound(pdim,2)
	For fi=0 To pnum
		If pdim(0,fi)<>"" Or Cls.Is_Null(pdim(0,fi))<>"" Then
			If u_power=pdim(0,fi) Then
				temp1="<img src='"&Cls.web_skindir&"sys/icon_"&u_power&".gif' border=0 title='"&pdim(1,fi)&"'>"
				Exit For
			End If
		End If
	Next
	If IsArray(pdim) Then Erase pdim
	Format_UserPower=temp1
End Function
Function Format_UserSex(u_sex)
	Dim temp1
	temp1="<img src='"&Cls.web_skindir&"sys/boy.gif' title='"&Cls.Web_Boy&"' border=0>"
	If Not u_sex Then temp1="<img src='"&Cls.web_skindir&"sys/girl.gif' title='"&Cls.Web_girl&"' border=0>"
	Format_UserSex=temp1
End Function
%>
