<!--#include file="Inc/StarSetup.asp"-->
<%
Dim GBL_PLUG_HPS_DataOne,GBL_PLUG_HPS_DataTwo
GBL_PLUG_HPS_DataOne = Application(DEF_MasterCookies & "_PLUG_HPS_DAY")
GBL_PLUG_HPS_DataTwo = Application(DEF_MasterCookies & "_PLUG_HPS_OTHER")
Dim GBL_PLUG_HPS_Str1,GBL_PLUG_HPS_Str2
Dim GBL_PLUG_HPS_RefreshEnable
GBL_PLUG_HPS_RefreshEnable = 0

Sub FUN_PLUG_HPS_GetDayStarData
OpenDatabase
	Dim TimeM
	TimeM = Application(DEF_MasterCookies & "_PLUG_HPS_M")
	If isNull(TimeM) or isNumeric(TimeM) = False Then
		TimeM = 0
		TimeM = Minute(DEF_Now)
		Application.Lock
		Application(DEF_MasterCookies & "_PLUG_HPS_M") = TimeM
		Application.UnLock
	Else
		If (GBL_PLUG_HPS_LineFirstType <> GBL_PLUG_HPS_LineSecondType and isArray(GBL_PLUG_HPS_DataTwo) = False and GBL_PLUG_HPS_Str2 <> "") or (isArray(GBL_PLUG_HPS_DataOne) = False and GBL_PLUG_HPS_Str1 <> "") or (Minute(DEF_Now) - TimeM) >= GBL_PLUG_HPS_RefreshSpace or (Minute(DEF_Now) - TimeM) < 0 Then
		Else
			If GBL_PLUG_HPS_RefreshEnable = 0 Then Exit Sub
		End If
	End If

	GBL_PLUG_HPS_RefreshEnable = 1

	Dim SQL,Rs,N
	If GBL_PLUG_HPS_Str1 <> "" Then
		Set Rs = Con.ExeCute(GBL_PLUG_HPS_Str1)
		GBL_DBNum = GBL_DBNum + 1
		If Not Rs.Eof Then
			GBL_PLUG_HPS_DataOne = Rs.GetRows(GBL_PLUG_HPS_TopMax)
			Rs.Close
			Set Rs = Nothing
			For N = 0 To Ubound(GBL_PLUG_HPS_DataOne,2)
				Set Rs = Con.ExeCute("Select Top 1 UserName from LeadBBS_User where ID=" & GBL_PLUG_HPS_DataOne(0,N))
				GBL_DBNum = GBL_DBNum + 1
				If Not Rs.Eof Then
					GBL_PLUG_HPS_DataOne(0,N) = Rs(0)
				Else
					GBL_PLUG_HPS_DataOne(0,N) = ""
				End If
				Rs.Close
				Set Rs = Nothing
			Next
			Application.Lock
			Application(DEF_MasterCookies & "_PLUG_HPS_DAY") = GBL_PLUG_HPS_DataOne
			Application.UnLock
		Else
			Rs.Close
			Set Rs = Nothing
		End If
	End If
	
	If (GBL_PLUG_HPS_LineFirstType <> GBL_PLUG_HPS_LineSecondType and GBL_PLUG_HPS_Str2 <> "") Then
		Set Rs = Con.ExeCute(GBL_PLUG_HPS_Str2)
		GBL_DBNum = GBL_DBNum + 1
		If Not Rs.Eof Then
			GBL_PLUG_HPS_DataTwo = Rs.GetRows(GBL_PLUG_HPS_TopMax)
			Rs.Close
			Set Rs = Nothing
			For N = 0 To Ubound(GBL_PLUG_HPS_DataTwo,2)
				Set Rs = Con.ExeCute("Select Top 1 UserName from LeadBBS_User where ID=" & GBL_PLUG_HPS_DataTwo(0,N))
				GBL_DBNum = GBL_DBNum + 1
				If Not Rs.Eof Then
					GBL_PLUG_HPS_DataTwo(0,N) = Rs(0)
				Else
					GBL_PLUG_HPS_DataTwo(0,N) = ""
				End If
				Rs.Close
				Set Rs = Nothing
			Next
			Application.Lock
			Application(DEF_MasterCookies & "_PLUG_HPS_OTHER") = GBL_PLUG_HPS_DataTwo
			Application.UnLock
		Else
			Rs.Close
			Set Rs = Nothing
		End If
	End If

	Application.Lock
	Application(DEF_MasterCookies & "_PLUG_HPS_M") = Minute(DEF_Now)
	Application.UnLock

End Sub

Sub LeadBBSHomePageStar()

	If GBL_PLUG_HPS_ShowType < 1 and CheckSupervisorUserName = 0 Then Exit Sub
	
	If ((GBL_PLUG_HPS_ShowType = 1 or GBL_PLUG_HPS_ShowType = 3) and (GBL_PLUG_HPS_LineSecondType > 1 or GBL_TodayAnnounce > 0)) or ((GBL_PLUG_HPS_ShowType = 1 or GBL_PLUG_HPS_ShowType = 2) and (GBL_PLUG_HPS_LineFirstType > 1 or GBL_TodayAnnounce > 0)) Then
	Else
		Exit Sub
	End If

	Response.Write "<br>"
	If GBL_TableHeadString <> "" Then
		Response.Write "<table width=" & DEF_BBS_ScreenWidth & " border=0 cellspacing=0 cellpadding=0 align=center><tr><td>"
		Response.Write GBL_TableHeadString
		Response.Write "</td></tr></table>"
	End If
	%>
	<table width=<%=DEF_BBS_ScreenWidth%> border=0 cellspacing=1 cellpadding=5 align=center bgcolor=<%= DEF_BBS_DarkColor %> class=TBone>
	<tr bgcolor=<%=DEF_BBS_LightDarkColor%> >
		<td class=TBHead colSpan=4><img src=images/blank.gif width=2 height=3 colspan=16><br><b><font color=ffffff class=HeadFont>社区明星</font><b>
	<%
	'If Request("action1") = "HomePageStar" Then
	'	Response.Write "[<a href=boards.asp?action1=&action="&Request("action")&" class=HeadFont>看看有没有我</a>]</th></tr>"
	'Else
	'	Response.Write "[<a href=boards.asp?action="&Request("action")&"&action1=HomePageStar class=HeadFont>我不想看到他们</a>]</th></tr>"
	'End If
	%>
		</td>
	</tr>
	<% 
	If Request("action1") <> "HomePageStar" and (GBL_PLUG_HPS_ShowType = 1 or GBL_PLUG_HPS_ShowType = 2) and (GBL_PLUG_HPS_LineFirstType > 1 or GBL_TodayAnnounce > 0) Then
		Call FUN_PLUG_HPS_HomePageStar()
	End If

	If (GBL_PLUG_HPS_ShowType = 1 or GBL_PLUG_HPS_ShowType = 3) and (GBL_PLUG_HPS_LineSecondType > 1 or GBL_TodayAnnounce > 0) Then
	%>
	<tr bgcolor=<%=DEF_BBS_LightestColor%> class=TBBG9>
		<TD colspan=4><%FUN_PLUG_HPS_HomePageStarTop%>
		</td>
	</tr>
	<%
	End If
	If CheckSupervisorUserName = 1 Then%>
	<tr bgcolor=<%=DEF_BBS_LightestColor%> class=TBBG9>
		<td colspan=4 align=right>
			<a href=plug-ins/HomePageStar/admin_HomePageStar.asp >显示方式设置</a>
		</td>
	</tr>
	<%End If%> 
	</table>
    <%
	If GBL_TableBottomString <> "" Then
		%><table width=<%=DEF_BBS_ScreenWidth%> border=0 cellspacing=0 cellpadding=0 align=center><tr><td><%=GBL_TableBottomString%></td></tr></table><%
	End If

End Sub

Sub FUN_PLUG_HPS_HomePageStar()

	'头部文件
	Response.Write("<tr bgcolor='"&DEF_BBS_LightestColor&"' align=center width='"&DEF_AllFaceMaxWidth&"' class=TBBG9>")

	Dim SQL,Rs,F_or_M,UserName,AnnounceNum,TempLinStr,UserID,UserID2,AnnounceNum2,UserName2
	Dim NTime,WTime,YTime,MTime

	'每日发帖
	NTime = cCur(Left(GetTimeValue(DEF_Now),8) & "000000")

	'每周灌水
	WTime = cCur(Left(GetTimeValue(DateAdd("d",0-WeekDay(DEF_Now,2),DEF_Now)),8) & "000000")

	'本年发帖
	YTime = cCur(Left(GetTimeValue(DEF_Now),4) & "0000000000")

	'本月发帖
	MTime = cCur(Left(GetTimeValue(DEF_Now),6) & "00000000")
	'显示第一列的头像
	Select Case GBL_PLUG_HPS_LineFirstType
		Case 1
			TempLinStr = "今日"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & NTime & " Group By UserID Order by Count(UserID) DESC"
		Case 2
			TempLinStr = "本周"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & WTime & " Group By UserID Order by Count(UserID) DESC"
		Case 3
			TempLinStr = "本月"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & MTime & " Group By UserID Order by Count(UserID) DESC"
		Case 4
			TempLinStr = "今年"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & YTime & " Group By UserID Order by Count(UserID) DESC"
		Case 5
			TempLinStr = "真正"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " ID,AnnounceNum from [LeadBBS_User] Order By AnnounceNum DESC"
		'Case 6
		'	TempLinStr = "帅哥"
		'		SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " ID,AnnounceNum ID from [LeadBBS_User] Where Sex='男' Order By AnnounceNum DESC"
		'Case 7
		'	TempLinStr = "靓妹"
		'	SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " ID,AnnounceNum from [LeadBBS_User] Where Sex='女' Order By AnnounceNum DESC"
		Case Else
			GBL_PLUG_HPS_LineFirstType = 1
			TempLinStr = "今日"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & NTime & " Group By UserID Order by Count(UserID) DESC"
	End Select
	GBL_PLUG_HPS_Str1 = SQL
	FUN_PLUG_HPS_GetDayStarData

	Dim GetData,GetDataUserData1,GetDataUserData2
	GetData = GBL_PLUG_HPS_DataOne

	If isArray(GetData) = False Then
		Response.Write("<TD Valign=middle align=middle width='5%' class=tablebody2> <IMG height=21 src='" & DEF_BBS_HomeUrl & "images/sxmg/Male.gif' width=23 align=absMiddle>")
		Response.Write("</TD>")
		Response.Write("<TD Valign=top align=middle width='45%' class=tablebody1>")
		Response.Write("<table border=0 width='100%'>")
		Response.Write("<tr>")
		Response.Write("<td width=44% Valign=top> <strong>")
		Response.Write(TempLinStr & "灌水状元")
		Response.Write("</strong> <font color=blue class=BlueFont>照片-=></font><br><img src=images/null.gif width=170 height=8><br>")
		Response.Write("姓　　名：<font color=blue class=BlueFont>等你来改写</font> <br>")
		'======================================================================================
		Response.Write "社区等级：<img src='" & DEF_BBS_HomeUrl & "images/lvstar/level0.gif' border=0>"
		Response.Write "<br>" & TempLinStr & "发帖：<img src=bar1.gif width=5 height=8 alt='<font color=blue class=BlueFont>零</font> 篇'>"
		Response.Write "<br>个人财产：<img src=bar3.gif  width=5 height=8 alt='未知'>"
		Response.Write "<br>个人魅力：<img src=bar3.gif  width=5 height=8 alt='未知'>"
        Response.Write "<br>个人威望：<img src=bar3.gif width=5 height=8 alt='未知'>"
		Response.Write "<br>社区经验：<img src=bar3.gif width=5 height=8 alt='未知'>"
		'========================================================================================
		Response.Write("<br>E&nbsp;-&nbsp;Mail：<font color=#ff0000>空</font>")
		Response.Write("</td><td width=50% Valign=middle align=center><img src='" & DEF_BBS_HomeUrl & "images/face/0000.gif' border=0></td></table></TD>")
	Else
		Dim Flag,LoopN
		Flag = 0

		For LoopN = 0 to 2
			If LoopN > Ubound(GetData,2) or Flag = 2 Then Exit For
			If Flag = 1 Then
				UserName2 = GetData(0,LoopN)
				AnnounceNum2 = cCur("0" & GetData(1,LoopN))
				SQL = "Select Top 1 Mail,Sex,UserPhoto,UserLevel,Points,OnlineTime,AnnounceNum,FaceWidth,FaceHeight,CharmPoint,FaceUrl,CachetValue,UserName,ID from [LeadBBS_User] Where UserName='" & Replace(UserName2,"'","''") & "'"
				Set Rs = Con.ExeCute(SQL)
				GBL_DBNum = GBL_DBNum + 1
				If Not Rs.Eof Then
					GetDataUserData2 = Rs.GetRows(1)
					Flag = 2
				Else
					Flag = 1
				End If
			ElseIf Flag = 0 Then
				UserName = GetData(0,LoopN)
				AnnounceNum = cCur("0" & GetData(1,LoopN))
				SQL = "Select Top 1 Mail,Sex,UserPhoto,UserLevel,Points,OnlineTime,AnnounceNum,FaceWidth,FaceHeight,CharmPoint,FaceUrl,CachetValue,UserName,ID from [LeadBBS_User] Where UserName='" & Replace(UserName,"'","''") & "'"
				Set Rs = Con.ExeCute(SQL)
				GBL_DBNum = GBL_DBNum + 1
				If Not Rs.Eof Then
					GetDataUserData1 = Rs.GetRows(1)
					Flag = 1
				Else
					Flag = 0
				End If
			End If
		Next

		Dim Mail,Sex,UserPhoto,UserLevel,Points,OnlineTime,FaceWidth,FaceHeight,CharmPoint,FaceUrl,CachetValue
		If isArray(GetDataUserData1) Then
			Mail = GetDataUserData1(0,0)
			Sex = GetDataUserData1(1,0)
			UserPhoto = GetDataUserData1(2,0)
			UserLevel = GetDataUserData1(3,0)
			Points = GetDataUserData1(4,0)
			OnlineTime = GetDataUserData1(5,0)
			'AnnounceNum = GetDataUserData1(6,0)
			FaceWidth = GetDataUserData1(7,0)
			FaceHeight = GetDataUserData1(8,0)
			CharmPoint = GetDataUserData1(9,0)
			FaceUrl = GetDataUserData1(10,0)
			CachetValue = GetDataUserData1(11,0)
		Else
			Exit Sub
		End If

		If Sex = "男" Then
			F_or_M = DEF_BBS_HomeUrl & "images/sxmg/Male.gif"
		ElseIf Sex = "女" Then
			F_or_M = DEF_BBS_HomeUrl & "images/sxmg/FeMale.gif"
        Else
			F_or_M = DEF_BBS_HomeUrl & "images/sxmg/Male.gif"
		End If
		Response.Write("<TD Valign=middle align=middle width='5%' bgcolor='"&DEF_BBS_LightColor&"' class=TBBG1> <IMG height=21 src='"&F_or_M&"' width=23 align=absMiddle>")
		Response.Write("</TD>")
		Response.Write("<TD Valign=top align=middle width='45%' class=tablebody1>")
		Response.Write("<table border=0 width='100%'>")
		Response.Write("<tr>")
		Response.Write("<td width=50% Valign=top> <strong>")
        Response.Write(TempLinStr & "灌水状元")
        Response.Write("</strong> <font color=blue class=BlueFont>照片-=></font><br><img src=images/null.gif width=170 height=8><br>")
		Response.Write("姓　　名：<font color=blue class=BlueFont>"&UserName&"</font> <br>")
		'==============================================================
		Response.Write "社区等级：<img src=images/" & GBL_DefineImage & "lvstar/level" & UserLevel & ".gif align=absmiddle width=110 height=11><br>"
		Response.Write TempLinStr & "发帖：<font color=blue class=BlueFont>" & AnnounceNum & "</font> 篇"
		'power
ShowStartInfo Points,CharmPoint,OnlineTime
'power
		'If cCur(Points) > 15000 Then
			'Response.Write "<br>个人积分：" & cCur(Points)
		'Else
			'Response.Write "<br>个人积分：<img src=plug-ins/HomePageStar/pic/bar1.gif width=" & (cCur(Points)*0.005)+5 & " height=8 alt=" & cCur(Points) & ">"
		'End If
		'If cCur(CharmPoint) > 15000 Then
		'	Response.Write "<br>个人魅力：" & CharmPoint
		'Else
		'	Response.Write "<br>个人魅力：<img src=plug-ins/HomePageStar/pic/bar3.gif width=" & (cCur(CharmPoint)*0.005)+5 & " height=8 alt=" & CharmPoint & ">"
		'End If
        If CachetValue <> 0 Then
			If CachetValue > 127 Then
				CachetValue = 127-CachetValue
			Else
				CachetValue = "<font color=blue class=BlueFont>＋" & CachetValue & "</font>"
			End If
		Else
			CachetValue = "还需多加努力！" 
		End If
		Response.Write "个人威望：" & CachetValue & " "

		'If Fix(cCur(OnlineTime)/60) > 15000 Then
			'Response.Write "<br>社区经验：" & Fix(cCur(OnlineTime)/60)
		'Else
		'	Response.Write "<br>社区经验：<img src=plug-ins/HomePageStar/pic/bar10.gif width=" & (Fix(cCur(OnlineTime)/60)*0.005)+5 & " height=8 alt=" & Fix(cCur(OnlineTime)/60) & ">"
		'End If	
		'==============================================================	
		Response.Write("<br>E&nbsp;-&nbsp;Mail：")
		If Trim(Mail) <> "" Then
			Response.Write("<a href='Mailto:" & Mail & "'><font color=Green class=GreenFont>飞鸽传书</font></a>")
		End If
		%>
		</td><td width=40% Valign=middle align=center> <a href="User/LookUserInfo.asp?name=<%=UserName%>" target="_blank" hidefocus="true" ><img border=0 src=
		<%
		If FaceWidth > DEF_AllFaceMaxWidth Then FaceWidth = DEF_AllFaceMaxWidth
		If FaceHeight > DEF_AllFaceMaxWidth*2 Then FaceHeight = DEF_AllFaceMaxWidth
		If DEF_AllDefineFace <> 0 and FaceUrl <> "" Then
			If Lcase(Left(FaceUrl,5)) <> "http:" Then
				FaceUrl = DEF_BBS_HomeUrl & "Announce/" & htmlencode(FaceUrl)
			Else
				FaceUrl = htmlencode(FaceUrl)
			End If
			Response.Write Chr(34) & FaceUrl & Chr(34) & " width=" & FaceWidth & " height=" & FaceHeight & " border=0 alt='看什么看，偶是" & DEF_SiteNameString & "的" & TempLinStr & "明星！有本事将俺赶走啊！我等着你哦！呵呵！'>"
		Else
			Response.Write "images/face/" & String(4-len(CStr(UserPhoto)),"0") & UserPhoto & ".gif border=0 width=62 height=62 alt='看什么看，偶是" & DEF_SiteNameString & "的" & TempLinStr & "明星！有本事将俺赶走啊！我等着你哦！呵呵！' >"
		End If%> 
		</a></td></table></TD><%
	End If

	If isArray(GetDataUserData2) = False Then
		Response.Write("<TD Valign=middle align=middle width='5%' class=tablebody2> <IMG height=21 src='" & DEF_BBS_HomeUrl & "images/sxmg/FeMale.gif' width=23 align=absMiddle>")
		Response.Write("</TD>")
		Response.Write("<TD Valign=top align=middle width='45%' class=tablebody1>")
		Response.Write("<table border=0 width='100%'>")
		Response.Write("<tr>")
		Response.Write("<td width=44% Valign=top> <strong>")
		Response.Write(TempLinStr & "灌水榜眼")
		Response.Write("</strong> <font color=blue class=BlueFont>照片-=></font><br><img src=images/null.gif width=170 height=8><br>")
		Response.Write("姓　　名：<font color=blue class=BlueFont>等你来改写</font> <br>")
		'======================================================================================
		Response.Write "社区等级：<img src='" & DEF_BBS_HomeUrl & "images/lvstar/level0.gif' border=0>"
		Response.Write "<br>" & TempLinStr & "发帖：<img src=bar1.gif width=5 height=8 alt='零 篇'>"
		Response.Write "<br>个人财产：<img src=bar3.gif width=5 height=8 alt='未知'>"
		Response.Write "<br>个人魅力：<img src=bar3.gif width=5 height=8 alt='未知'>"
        Response.Write "<br>个人威望：<img src=bar3.gif width=5 height=8 alt='未知'>"
		Response.Write "<br>社区经验：<img src=bar3.gif width=5 height=8 alt='未知'>"
		'========================================================================================
		Response.Write("<br>E&nbsp;-&nbsp;Mail：<font color=#ff0000>空</font>")
		Response.Write("</td><td width=50% Valign=middle align=center><img src='" & DEF_BBS_HomeUrl & "images/face/0000.gif' border=0></td></table></TD>")
  	Else
		AnnounceNum = AnnounceNum2
		UserName = UserName2
		If isArray(GetDataUserData2) Then
			Mail = GetDataUserData2(0,0)
			Sex = GetDataUserData2(1,0)
			UserPhoto = GetDataUserData2(2,0)
			UserLevel = GetDataUserData2(3,0)
			Points = GetDataUserData2(4,0)
			OnlineTime = GetDataUserData2(5,0)
			'AnnounceNum = GetDataUserData2(6,0)
			FaceWidth = GetDataUserData2(7,0)
			FaceHeight = GetDataUserData2(8,0)
			CharmPoint = GetDataUserData2(9,0)
			FaceUrl = GetDataUserData2(10,0)
			CachetValue = GetDataUserData2(11,0)
		Else
			Exit Sub
		End If

		If Sex = "男" Then
			F_or_M = DEF_BBS_HomeUrl & "images/sxmg/Male.gif"
		ElseIf Sex = "女" Then
			F_or_M = DEF_BBS_HomeUrl & "images/sxmg/FeMale.gif"
		Else
			F_or_M = DEF_BBS_HomeUrl & "images/sxmg/Male.gif"
		End If
		Response.Write("<TD Valign=middle align=middle width='5%' bgcolor='"&DEF_BBS_LightColor&"' class=TBBG1> <IMG height=21 src='"&F_or_M&"' width=23 align=absMiddle>")
		Response.Write("</TD>")
		Response.Write("<TD Valign=top align=middle width='45%' class=tablebody1>")
		Response.Write("<table border=0 width='100%'>")
		Response.Write("<tr>")
		Response.Write("<td width=50% Valign=top> <strong>")
		Response.Write(TempLinStr & "灌水榜眼")
		Response.Write("</strong> <font color=blue class=BlueFont>照片-=></font><br><img src=images/null.gif width=170 height=8><br>")
		Response.Write("姓　　名：<font color=blue class=BlueFont>"&UserName&"</font> <br>")
		'==============================================================
		Response.Write "社区等级：<img src=images/" & GBL_DefineImage & "lvstar/level" & UserLevel & ".gif align=absmiddle width=110 height=11><br>"
		Response.Write TempLinStr & "发帖：<font color=blue class=BlueFont>" & AnnounceNum & "</font> 篇"
		
		ShowStartInfo Points,CharmPoint,OnlineTime
		'If cCur(Points)>15000 Then
		'	Response.Write "<br>个人积分："&cCur(Points)
		'Else
		'	Response.Write "<br>个人积分：<img src=plug-ins/HomePageStar/pic/bar1.gif width=" & (cCur(Points)*0.005)+5 & " height=8 alt="&cCur(Points)&">"
		'End If
		'If cCur(CharmPoint)>15000 Then
		'	Response.Write "<br>个人魅力：" & CharmPoint
		'Else		
		'	Response.Write "<br>个人魅力：<img src=plug-ins/HomePageStar/pic/bar3.gif width=" & (cCur(CharmPoint)*0.005)+5 & " height=8 alt=" & CharmPoint & ">"
		'End If
		'If Fix(cCur(OnlineTime)/60)>15000 Then
		'	Response.Write "<br>社区经验：" & Fix(cCur(OnlineTime)/60)
		'Else
		'	Response.Write "<br>社区经验：<img src=plug-ins/HomePageStar/pic/bar10.gif width=" & (Fix(cCur(OnlineTime)/60)*0.005)+5 & " height=8 alt=" & Fix(cCur(OnlineTime)/60) & ">"
		'End If	
	
		If CachetValue <> 0 Then
			If CachetValue > 127 Then
				CachetValue = 127-CachetValue
			Else
				CachetValue = "<font color=blue class=BlueFont>＋" & CachetValue & "</font>"
			End If
		Else
			CachetValue = "还需多加努力！"   
		End If
		Response.Write "个人威望：" & CachetValue & " " 
		'==============================================================	
		Response.Write("<br>E&nbsp;-&nbsp;Mail：")
		If Trim(Mail) <> "" Then
	  		Response.Write("<a href='Mailto:" & Mail & "'><font color=Green class=GreenFont>飞鸽传书</font></a>")
		End If
		%>
		</td><td width=40% Valign=middle align=center> <a href="User/LookUserInfo.asp?name=<%=UserName%>" target="_blank" hidefocus="true" ><img border=0 src=<% 
		If FaceWidth > DEF_AllFaceMaxWidth Then FaceWidth = DEF_AllFaceMaxWidth
		If FaceHeight > DEF_AllFaceMaxWidth*2 Then FaceHeight = DEF_AllFaceMaxWidth
		If DEF_AllDefineFace <> 0 and FaceUrl <> "" Then
			If Lcase(Left(FaceUrl,5)) <> "http:" Then
				FaceUrl = DEF_BBS_HomeUrl & "Announce/" & htmlencode(FaceUrl)
			Else
				FaceUrl = htmlencode(FaceUrl)
			End If
			Response.Write Chr(34) & FaceUrl & Chr(34) & " width=" & FaceWidth & " height=" & FaceHeight & " border=0 alt='看什么看，偶是" & DEF_SiteNameString & "的" & TempLinStr & "明星！有本事将俺赶走啊！我等着你哦！呵呵！'>"
		Else
			Response.Write "images/face/" & String(4-len(CStr(UserPhoto)),"0") & UserPhoto & ".gif border=0 width=62 height=62 alt='看什么看，偶是" & DEF_SiteNameString & "的" & TempLinStr & "明星！有本事将俺赶走啊！我等着你哦！呵呵！' >"
		End If%>         
		</a></td></table></TD><%
	End If

	'尾部文件
	Response.Write("</TR>")

End Sub 

Sub FUN_PLUG_HPS_HomePageStarTop

	Dim NTime,WTime,YTime,MTime,SQL

	'每日发帖
	NTime = cCur(Left(GetTimeValue(DEF_Now),8) & "000000")

	'每周灌水
	WTime = cCur(Left(GetTimeValue(DateAdd("d",0-WeekDay(DEF_Now,2),DEF_Now)),8) & "000000")

	'本年发帖
	YTime = cCur(Left(GetTimeValue(DEF_Now),4) & "0000000000")

	'本月发帖
	MTime = cCur(Left(GetTimeValue(DEF_Now),6) & "00000000")
	'显示第一列的头像
	Dim TempLinStr
	Select Case GBL_PLUG_HPS_LineSecondType
		Case 1
			TempLinStr = "今日"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & NTime & " Group By UserID Order by Count(UserID) DESC"
		Case 2
			TempLinStr = "本周"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & WTime & " Group By UserID Order by Count(UserID) DESC"
		Case 3
			TempLinStr = "本月"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & MTime & " Group By UserID Order by Count(UserID) DESC"
		Case 4
			TempLinStr = "今年"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & YTime & " Group By UserID Order by Count(UserID) DESC"
		Case 5
			TempLinStr = "真正"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " ID,AnnounceNum from [LeadBBS_User] Order By AnnounceNum DESC"
		'Case 6
		'	TempLinStr = "帅哥"
		'		SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " ID,AnnounceNum from [LeadBBS_User] Where Sex='男' Order By AnnounceNum DESC"
		'Case 7
		'	TempLinStr = "靓妹"
		'	SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " ID,AnnounceNum from [LeadBBS_User] Where Sex='女' Order By AnnounceNum DESC"
		Case Else
			GBL_PLUG_HPS_LineSecondType = 1
			TempLinStr = "今日"
			SQL = "Select Top " & GBL_PLUG_HPS_TopMax & " UserID,Count(UserID) from LeadBBS_Announce Where NDateTime>=" & NTime & " Group By UserID Order by Count(UserID) DESC"
	End Select
	GBL_PLUG_HPS_Str2 = SQL
	If GBL_PLUG_HPS_LineFirstType <> GBL_PLUG_HPS_LineSecondType Then
		FUN_PLUG_HPS_GetDayStarData
	Else
		GBL_PLUG_HPS_DataTwo = GBL_PLUG_HPS_DataOne
	End If

	If isArray(GBL_PLUG_HPS_DataTwo) = False Then Exit Sub
	Dim N
	%>
			<table border=0 cellspacing=0 cellpadding=0 width=100%>
			<tr>
			<td width=85>
			<img src="plug-ins/HomePageStar/pic/list.gif"  align="absmiddle"><%=TempLinStr%>灌水榜
			</td>
			<td>>>>&nbsp;
	<%
	For N = 0 to Ubound(GBL_PLUG_HPS_DataTwo,2)
	dim WaterOrder
	WaterOrder="第<font color=green class=GreenFont>"&N+1&"</font>名"
	select case N
	case 0
	WaterOrder="<font color=Red class=RedFont>状元</font>"
	case 1
	WaterOrder="<font color=blue class=blueFont>榜眼</font>"
	case 2
	WaterOrder="<font color=green class=GreenFont>探花</font>"
	end select
		Response.Write " ["&WaterOrder&"]<a href=User/LookUserInfo.asp?name=" & GBL_PLUG_HPS_DataTwo(0,N) & " target=_blank title=""查看该用户个人资料及最新发帖一览"">" & GBL_PLUG_HPS_DataTwo(0,N) & "</a>(<font color=gray class=grayFont>" & GBL_PLUG_HPS_DataTwo(1,N) & "</font>)"
	Next%>
				</td>
			</tr>
			</table>
	<%
End Sub

'显示明星信息 柏图设计 -http://www.bootu.com/bbs
sub ShowStartInfo(UserPoints,UserCharmPoint,UserOnlineTime)
%>
<TABLE cellSpacing=0 cellPadding=0 width=167 border=0>
 <TBODY>
  <TR>
   <TD width=63 height=9>个人财产：</TD>
   <TD width=100 height=9>
   <%If cCur(UserPoints) > 15000 Then
			Response.Write  cCur(UserPoints)
	 Else
   %>
                  <TABLE cellSpacing=0 cellPadding=0 width=96 border=0>
                    <TBODY>
                    <TR>
                      <TD width=3 height=13><IMG height=13 
                        src="plug-ins/HomePageStar/pic/img_left.gif" width=3></TD>
                      <TD align=left width=90 
                      background=plug-ins/HomePageStar/pic/img_backing.gif 
                        height=13><IMG height=9 alt="<%=cCur(UserPoints)%>" 
                        src="plug-ins/HomePageStar/pic/bar3.gif" width="<%=(cCur(UserPoints)*0.005)+5%>"><IMG height=9 
                        src="plug-ins/HomePageStar/pic/bar3_1.gif" border=0></TD>
                      <TD width=3 height=13><IMG height=13 
                        src="plug-ins/HomePageStar/pic/img_right.gif" 
                    width=3></TD></TR>
					</TBODY>
					</TABLE>
	<%End If%>
   </TD>
  </TR>
 </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=167 border=0>
 <TBODY>
  <TR>
   <TD width=63 height=9>个人魅力：</TD>
   <TD width=100 height=9>
   <%If cCur(UserCharmPoint) > 15000 Then
			Response.Write  UserCharmPoint
	 Else
   %>
                  <TABLE cellSpacing=0 cellPadding=0 width=96 border=0>
                    <TBODY>
                    <TR>
                      <TD width=3 height=13><IMG height=13 
                        src="plug-ins/HomePageStar/pic/img_left.gif" width=3></TD>
                      <TD align=left width=90 
                      background=plug-ins/HomePageStar/pic/img_backing.gif 
                        height=13><IMG height=9 alt="<%=UserCharmPoint%>" 
                        src="plug-ins/HomePageStar/pic/bar4.gif" width="<%=(cCur(UserCharmPoint)*0.005)+5%>"><IMG height=9 
                        src="plug-ins/HomePageStar/pic/bar4_1.gif" border=0></TD>
                      <TD width=3 height=13><IMG height=13 
                        src="plug-ins/HomePageStar/pic/img_right.gif" 
                    width=3></TD></TR>
					</TBODY>
					</TABLE>
	<%End If%>
   </TD>
  </TR>
 </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=167 border=0>
 <TBODY>
  <TR>
   <TD width=63 height=9>社区经验：</TD>
   <TD width=100 height=9>
   <%If Fix(cCur(UserOnlineTime)/60) > 15000 Then
			Response.Write  Fix(cCur(UserOnlineTime)/60)
	 Else
   %>
                  <TABLE cellSpacing=0 cellPadding=0 width=96 border=0>
                    <TBODY>
                    <TR>
                      <TD width=3 height=13><IMG height=13 
                        src="plug-ins/HomePageStar/pic/img_left.gif" width=3></TD>
                      <TD align=left width=90 
                      background=plug-ins/HomePageStar/pic/img_backing.gif 
                        height=13><IMG height=9 alt="<%=Fix(cCur(UserOnlineTime)/60)%>" 
                        src="plug-ins/HomePageStar/pic/bar5.gif" width="<%=(Fix(cCur(UserOnlineTime)/60))*0.005+5%>"><IMG height=9 
                        src="plug-ins/HomePageStar/pic/bar5_1.gif" border=0></TD>
                      <TD width=3 height=13><IMG height=13 
                        src="plug-ins/HomePageStar/pic/img_right.gif" 
                    width=3></TD></TR>
					</TBODY>
					</TABLE>
	<%End If%>
   </TD>
  </TR>
 </TBODY>
</TABLE>
<%end Sub%>