<!--#include file="z_MingXing_Const.asp"-->
<%function MingXing()%>
	<!--#include file="admin/z_MingXing.inc"-->
	<%Dim Strings,TempStr,isFlag
	
	if dvbbs.UserID>0 and MXFlag=1 then
		Dvbbs.Name="MingXing"
		If Dvbbs.ObjIsEmpty() Then
			Call UpdateMingXing(MXFlag,mx_moren,mingxing_1,mingxing_2,mingxing_3,max_Money,max_cp,max_ep,min_disp,isxingxiang1,isxingxiang2,isxingxiang3,isnengliang1,isnengliang2,isnengliang3,TopMax)
		End If
		Strings=Dvbbs.Value
		Strings=split(Strings,"$$")
		If Not IsDate(Strings(0)) or ubound(Strings)<>44 Then Strings(0)=Now()-1
		If CDate(Strings(0)) <> Date() Then 
			Call UpdateMingXing(MXFlag,mx_moren,mingxing_1,mingxing_2,mingxing_3,max_Money,max_cp,max_ep,min_disp,isxingxiang1,isxingxiang2,isxingxiang3,isnengliang1,isnengliang2,isnengliang3,TopMax)
			Strings=Dvbbs.Value
			Strings=split(Strings,"$$")
		End If
		if request("mingxing")="" then
			if mx_moren=0 then
				TempStr=template.html(MX_TemplateHtml2)
				isFlag=False
			elseif mx_moren=1 then
				TempStr=template.html(MX_TemplateHtml1)
				isFlag=True
			end if
		else
			if request("mingxing")="0" then
				TempStr=template.html(MX_TemplateHtml1)
				isFlag=True
			else
				TempStr=template.html(MX_TemplateHtml2)
				isFlag=False
			end if
		end if
		if isFlag then
			TempStr=Replace(TempStr,"{$mx_usersex1}",Strings(1))
			TempStr=Replace(TempStr,"{$mx_type1}",Strings(4))
			TempStr=Replace(TempStr,"{$mx_title1}",Strings(5))
			TempStr=Replace(TempStr,"{$mx_name1}",Strings(6))
			TempStr=Replace(TempStr,"{$mx_msg1}",Strings(7))
			TempStr=Replace(TempStr,"{$mx_logo1}",Strings(8))
			TempStr=Replace(TempStr,"{$mx_class1}",Strings(9))
			TempStr=Replace(TempStr,"{$mx_score1}",Strings(10))
			TempStr=Replace(TempStr,"{$mx_wealth1}",Strings(11))
			TempStr=Replace(TempStr,"{$mx_cp1}",Strings(12))
			TempStr=Replace(TempStr,"{$mx_ep1}",Strings(13))
			TempStr=Replace(TempStr,"{$mx_email1}",Strings(14))
			TempStr=Replace(TempStr,"{$mx_style1}",Strings(2))
			TempStr=Replace(TempStr,"{$mx_color1}",Strings(3))
			TempStr=Replace(TempStr,"{$mx_usersex2}",Strings(15))
			TempStr=Replace(TempStr,"{$mx_type2}",Strings(18))
			TempStr=Replace(TempStr,"{$mx_title2}",Strings(19))
			TempStr=Replace(TempStr,"{$mx_name2}",Strings(20))
			TempStr=Replace(TempStr,"{$mx_msg2}",Strings(21))
			TempStr=Replace(TempStr,"{$mx_logo2}",Strings(22))
			TempStr=Replace(TempStr,"{$mx_class2}",Strings(23))
			TempStr=Replace(TempStr,"{$mx_score2}",Strings(24))
			TempStr=Replace(TempStr,"{$mx_wealth2}",Strings(25))
			TempStr=Replace(TempStr,"{$mx_cp2}",Strings(26))
			TempStr=Replace(TempStr,"{$mx_ep2}",Strings(27))
			TempStr=Replace(TempStr,"{$mx_email2}",Strings(28))
			TempStr=Replace(TempStr,"{$mx_style2}",Strings(16))
			TempStr=Replace(TempStr,"{$mx_color2}",Strings(17))
			TempStr=Replace(TempStr,"{$mx_usersex3}",Strings(29))
			TempStr=Replace(TempStr,"{$mx_type3}",Strings(32))
			TempStr=Replace(TempStr,"{$mx_title3}",Strings(33))
			TempStr=Replace(TempStr,"{$mx_name3}",Strings(34))
			TempStr=Replace(TempStr,"{$mx_msg3}",Strings(35))
			TempStr=Replace(TempStr,"{$mx_logo3}",Strings(36))
			TempStr=Replace(TempStr,"{$mx_class3}",Strings(37))
			TempStr=Replace(TempStr,"{$mx_score3}",Strings(38))
			TempStr=Replace(TempStr,"{$mx_wealth3}",Strings(39))
			TempStr=Replace(TempStr,"{$mx_cp3}",Strings(40))
			TempStr=Replace(TempStr,"{$mx_ep3}",Strings(41))
			TempStr=Replace(TempStr,"{$mx_email3}",Strings(42))
			TempStr=Replace(TempStr,"{$mx_style3}",Strings(30))
			TempStr=Replace(TempStr,"{$mx_color3}",Strings(31))
		end if
		TempStr=Replace(TempStr,"{$mx_list}",Strings(43))
		TempStr=Replace(TempStr,"{$mx_num}",Strings(44))
		MingXing=TempStr
	end if
End function

function UpdateMingXing(MXFlag,mx_moren,mingxing_1,mingxing_2,mingxing_3,max_Money,max_cp,max_ep,min_disp,isxingxiang1,isxingxiang2,isxingxiang3,isnengliang1,isnengliang2,isnengliang3,TopMax)
	Dim TempSQL,TempRs,MingXing_1_type,MingXing_2_type,MingXing_3_type,Strings
	
	'显示第一列的头像
	select case MingXing_1
  case 1
		MingXing_1_type="今日"
		TempSQL="select top 1 username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date() group by username order by count(username) desc"
  case 2
  	MingXing_1_type="本周"
		TempSQL="select top 1 username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date()-weekday(date(),2) group by username order by count(username) desc"
  case 3
  	MingXing_1_type="本月"
  	TempSQL="select top 1 username,count(username) from "&Dvbbs.NowUseBBS&" where year(DateAndTime)=year(date()) and Month(DateAndTime)=month(Date()) group by username order by count(username) desc"
  case 4
  	MingXing_1_type="今年"
  	TempSQL="select top 1 username,count(username) from "&Dvbbs.NowUseBBS&" where year(DateAndTime)=year(Date()) group by username order by count(username) desc"
  case 5
  	MingXing_1_type="真正"
  	TempSQL="select top 1 username,userpost from [Dv_user] order by userpost desc"
  case 6
  	MingXing_1_type="帅哥"
  	TempSQL="select top 1 username,userpost from [Dv_user] where usersex=1 order by userpost desc"
  case 7
  	MingXing_1_type="靓妹"
  	TempSQL="select top 1 username,userpost from [Dv_user] where usersex=0 order by userpost desc"
  case else
  	MingXing_1_type="今日"
		TempSQL="select top 1 username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date() group by username order by count(username) desc"
	end select
	set TempRs=Dvbbs.execute(TempSQL)
	if TempRs.eof then
		Strings=ShowMingXing("",0,MingXing_1_Type,isNengLiang1,isXingXiang1,MingXing_1,MingXing_2,MingXing_3,1,Max_Money,Max_CP,Max_EP,Min_Disp)
  else
		Strings=ShowMingXing(TempRs(0),TempRs(1),MingXing_1_Type,isNengLiang1,isXingXiang1,MingXing_1,MingXing_2,MingXing_3,1,Max_Money,Max_CP,Max_EP,Min_Disp)
	end if
	
	'显示第二列的头像
	select case MingXing_2
  case 1
  	MingXing_2_type="今日"
		TempSQL="select top 2 username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date() group by username order by count(username) desc"
  case 2
  	MingXing_2_type="本周"
		TempSQL="select top 2 username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date()-weekday(date(),3) group by username order by count(username) desc"
  case 3
  	MingXing_2_type="本月"
  	TempSQL="select top 2 username,count(username) from "&Dvbbs.NowUseBBS&" where year(DateAndTime)=year(date()) and Month(DateAndTime)=month(Date()) group by username order by count(username) desc"
  case 4
  	MingXing_2_type="今年"
  	TempSQL="select top 2 username,count(username) from "&Dvbbs.NowUseBBS&" where year(DateAndTime)=year(Date()) group by username order by count(username) desc"
  case 5
  	MingXing_2_type="真正"
  	TempSQL="select top 2 username,userpost from [Dv_user] order by userpost desc"
  case 6
  	MingXing_2_type="帅哥"
  	TempSQL="select top 2 username,userpost from [Dv_user] where usersex=1 order by userpost desc"
  case 7
  	MingXing_2_type="靓妹"
  	TempSQL="select top 2 username,userpost from [Dv_user] where usersex=0 order by userpost desc"
  case else
  	MingXing_2_type="今日"
		TempSQL="select top 2 username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date() group by username order by count(username) desc"
	end select
	set TempRs=Dvbbs.execute(TempSQL)
	if (not TempRs.eof) and MingXing_1=MingXing_2 then
		TempRs.movenext
	end if	
	if TempRs.eof then
		Strings=Strings&"$$"&ShowMingXing("",0,MingXing_2_Type,isNengLiang2,isXingXiang2,MingXing_1,MingXing_2,MingXing_3,2,Max_Money,Max_CP,Max_EP,Min_Disp)
  else
		Strings=Strings&"$$"&ShowMingXing(TempRs(0),TempRs(1),MingXing_2_Type,isNengLiang2,isXingXiang2,MingXing_1,MingXing_2,MingXing_3,2,Max_Money,Max_CP,Max_EP,Min_Disp)
	end if
	
	'显示第三列的头像
	select case MingXing_3
  case 1
  	MingXing_3_type="今日"
		TempSQL="select top 3 username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date() group by username order by count(username) desc"
  case 2
  	MingXing_3_type="本周"
		TempSQL="select top 3 username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date()-weekday(date(),2) group by username order by count(username) desc"
  case 3
  	MingXing_3_type="本月"
  	TempSQL="select top 3 username,count(username) from "&Dvbbs.NowUseBBS&" where year(DateAndTime)=year(date()) and Month(DateAndTime)=month(Date()) group by username order by count(username) desc"
  case 4
  	MingXing_3_type="今年"
  	TempSQL="select top 3 username,count(username) from "&Dvbbs.NowUseBBS&" where year(DateAndTime)=year(Date()) group by username order by count(username) desc"
  case 5
  	MingXing_3_type="真正"
  	TempSQL="select top 3 username,userpost from [Dv_user] order by userpost desc"
  case 6
  	MingXing_3_type="帅哥"
  	TempSQL="select top 3 username,userpost from [Dv_user] where usersex=1 order by userpost desc"
  case 7
  	MingXing_3_type="靓妹"
  	TempSQL="select top 3 username,userpost from [Dv_user] where usersex=0 order by userpost desc"
  case else
  	MingXing_3_type="今日"
		TempSQL="select top 3 username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date() group by username order by count(username) desc"
	end select
	set TempRs=Dvbbs.execute(TempSQL)
	if (not TempRs.eof) and MingXing_2=MingXing_3 then
		TempRs.movenext
		if (not TempRs.eof) and MingXing_1=MingXing_3 then
			TempRs.movenext
		end if
	elseif (not TempRs.eof) and MingXing_1=MingXing_3 then
		TempRs.movenext
		if (not TempRs.eof) and MingXing_2=MingXing_3 then
			TempRs.movenext
		end if
	end if
	if TempRs.eof then
		Strings=Strings&"$$"&ShowMingXing("",0,MingXing_3_Type,isNengLiang3,isXingXiang2,MingXing_1,MingXing_2,MingXing_3,3,Max_Money,Max_CP,Max_EP,Min_Disp)
  else
		Strings=Strings&"$$"&ShowMingXing(TempRs(0),TempRs(1),MingXing_3_Type,isNengLiang3,isXingXiang3,MingXing_1,MingXing_2,MingXing_3,3,Max_Money,Max_CP,Max_EP,Min_Disp)
	end if
	TempRs.close
	TempSQL="select top "&TopMax&" username,count(username) from "&Dvbbs.NowUseBBS&" where DateAndTime>Date() group by username order by count(username) desc"
	set TempRs=Dvbbs.execute(TempSQL)
	if TempRs.eof then
		Strings=Strings&"$$"&"今日暂时无人发贴" 
	else
		Dim c,TempStr
		c=0
		TempStr=""
		do while not TempRs.eof
			TempStr=TempStr&"<font face=Wingdings color=blue>v</font> <a href=dispuser.asp?name="&TempRs(0)&" target=_blank title=""查看该用户个人资料及最新发帖一览"">"&TempRs(0)&"</a>[<font color="&dvbbs.mainsetting(1)&">"&TempRs(1)&"</font>]&nbsp;&nbsp;"
			TempRs.movenext
			c=c+1
			if c-TopMax=0 then exit do
		loop
		Strings=Strings&"$$"&TempStr
	end if
	TempRs.close
	set TempRs=nothing
	Strings=Strings&"$$"&TopMax
	Dvbbs.Name="MingXing"
	Dvbbs.Value=Date()&"$$"&Strings
End function

Function ShowMingXing(UserName,Article,MingXing_Type,isNengLiang,isXingXiang,MingXing_1,MingXing_2,MingXing_3,MingXing_Pos,Max_Money,Max_CP,Max_EP,Min_Disp)
	Dim MingXingSQL,MingXingRs,F_or_M,Strings,tempface,userface
	
	if UserName<>"" then
		MingXingSQL="select UserClass,UserWealth,UserEmail,UserFace,UserWidth,UserHeight,UserSex,UserCP,UserEP,UserAvaSetting,UserIsAva from [Dv_user] where username='"&username&"'"
		set MingXingRs=Dvbbs.execute(MingXingSQL)
		MingXingSQL=MingXingRs.GetRows(1)
		tempface=split(MingXingSQL(3,0),"|")
		If Ubound(tempface)>0 Then
			userface=tempface(1)
		else
			userface=tempface(0)
		end if

		if MingXingSQL(6,0)="1" then
			F_or_M="Male.gif"
		else
			F_or_M="FeMale.gif"
		end if
	else
		F_or_M="FeMale.gif"
	end if
	Strings="images/img_MingXing/"&F_or_M
	if MingXing_Pos=1 then
		Strings=Strings&"$$"&"filter:glow(color="&dvbbs.mainsetting(9)&",strength=2)"
		Strings=Strings&"$$"&dvbbs.mainsetting(8)
	elseif MingXing_Pos=2 then
		Strings=Strings&"$$"&"filter:glow(color="&dvbbs.mainsetting(11)&",strength=2)"
		Strings=Strings&"$$"&dvbbs.mainsetting(10)
	else
		Strings=Strings&"$$"&"filter:glow(color="&dvbbs.mainsetting(5)&",strength=2)"
		Strings=Strings&"$$"&dvbbs.mainsetting(4)
	end if
	Strings=Strings&"$$"&MingXing_Type
	if MingXing_Pos=1 then
		Strings=Strings&"$$"&"状元"
	elseif MingXing_Pos=2 then
		if MingXing_1=MingXing_2 then
			Strings=Strings&"$$"&"榜眼"
		else
			Strings=Strings&"$$"&"状元"
		end if
	elseif MingXing_Pos=3 then
		if MingXing_1=MingXing_3 and MingXing_2=MingXing_3 then
			Strings=Strings&"$$"&"探花"
		elseif MingXing_1=MingXing_3 or MingXing_2=MingXing_3 then
			Strings=Strings&"$$"&"榜眼"
		else
			Strings=Strings&"$$"&"状元"
		end if
	end if
	if UserName<>"" then
		Strings=Strings&"$$"&"<a href='dispuser.asp?name="&username&"' target='_blank'><font color={$mx_color"&MingXing_Pos&"}><b>"&username&"</b></font></a>"
	else
		Strings=Strings&"$$"&"<font color={$mx_color"&MingXing_Pos&"} style=cursor:hand title=等你来改写>等你来改写</font>"
	end if
	if UserName<>"" then
		if MingXingSQL(4,0)>80 then
			MingXingSQL(5,0)=(MingXingSQL(5,0)/MingXingSQL(4,0))*80
			MingXingSQL(4,0)=80
		end if
		if MingXingSQL(5,0)>120 then
			MingXingSQL(4,0)=(MingXingSQL(4,0)/MingXingSQL(5,0))*120
			MingXingSQL(5,0)=120
		end if
	end if
	if UserName<>"" then
		Strings=Strings&"$$"&"看什么看，偶是"&dvbbs.Forum_info(0)&MingXing_Type&"明星！有本事将俺赶走啊！我等着你哦！"
		if (MingXingSQL(10,0)=1 or dvbbs.Forum_Setting(82)<>"0") and isxingxiang then
			Strings=Strings&"$$"&"<script language='javascript' src='Dv_Plus/Avatar/Plus_Avatar_Show.js'></script><script language=javascript>DvbbsShowAvatar('"&MingXingSQL(9,0)&"','"&MX_AvatarIsAllow&"','1','2','"&MX_AvatarWidth&"','"&MX_AvatarHeight&"','"&MX_AvatarInnerLeft1&"','"&MX_AvatarInnerTop1&"','"&MX_AvatarInnerWidth1&"','"&MX_AvatarInnerHeight1&"','"&MX_AvatarInnerLeft2&"','"&MX_AvatarInnerTop2&"','"&MX_AvatarInnerWidth2&"','"&MX_AvatarInnerHeight2&"','','"&MX_AvatarLocalPic&"','"&MX_AvatarPicPath&"','0','0','"& UserName &"的虚拟形象','');</script>"
		else
			Strings=Strings&"$$"&"<a href='dispuser.asp?name="&UserName&"' target='_blank'><img border=0 src='"&userface&"' width='"&MingXingSQL(4,0)&"' height='"&MingXingSQL(5,0)&"'></a>"
		end if
	else
		Strings=Strings&"$$"&"等你成为"&dvbbs.Forum_info(0)&MingXing_Type&"明星，这个位置就是你的！"
		Strings=Strings&"$$"&"<img src='images/img_MingXing/nomx.gif' border=0>"
	end if
	if UserName<>"" then
		Strings=Strings&"$$"&"<b>"&MingXingSQL(0,0)&"</b>"
	else
		Strings=Strings&"$$"&"无"
	end if
	if UserName<>"" then
		Strings=Strings&"$$"&"<b>"&Article&"</b>"
	else
		Strings=Strings&"$$"&"0"
	end if
	if IsNengLiang=0 then
		if UserName<>"" then
			Strings=Strings&"$$"&"<font color={$mx_color"&MingXing_Pos&"}><b>"&MingXingSQL(1,0)&"</b>"
		else
			Strings=Strings&"$$"&"<font color={$mx_color"&MingXing_Pos&"} style=cursor:hand title=等你来改写>0</font>"
		end if
	else
		if UserName<>"" then
			if MingXingSQL(1,0)>max_Money*0.9 then
				Strings=Strings&"$$"&"<table cellspacing=0 cellpadding=0 width=95% border=0 style=Cursor:hand title="&MingXingSQL(1,0)&"><tbody><col width=3><col width="&min_disp&"><col width=*><col width=3><tr><td height=13><img height=13 src=images/img_MingXing/img_left.gif width=3></td><td background=images/img_MingXing/img_backing.gif><img src=images/img_MingXing/bar4.gif width="&min_disp&" height=9></td><td background=images/img_MingXing/img_backing.gif><table border=0 cellpadding=0 cellspacing=0><col width="&(90+int(10*(MingXingSQL(1,0)-max_Money*0.9)/(max_Money*0.9)))&"% ><col width=*><col width="&(10-int(10*(MingXingSQL(1,0)-max_Money*0.9)/(max_Money*0.9)))&"% ><tr><td background=images/img_MingXing/bar4.gif style=line-height:9px>&nbsp;</td><td><img src=images/img_MingXing/bar4_1.gif width=6 height=9></td><td style=line-height:9px>&nbsp;</td></tr></table></td><td height=13><img height=13 src=images/img_MingXing/img_right.gif width=3></td></tr></tbody></table>"
			else
				Strings=Strings&"$$"&"<table cellspacing=0 cellpadding=0 width=95% border=0 style=Cursor:hand title="&MingXingSQL(1,0)&"><tbody><col width=3><col width="&min_disp&"><col width=*><col width=3><tr><td height=13><img height=13 src=images/img_MingXing/img_left.gif width=3></td><td background=images/img_MingXing/img_backing.gif><img src=images/img_MingXing/bar4.gif width="&min_disp&" height=9></td><td background=images/img_MingXing/img_backing.gif><table border=0 cellpadding=0 cellspacing=0><col width="&int(MingXingSQL(1,0)/max_Money*100)&"% ><col width=*><col width="&(100-int(MingXingSQL(1,0)/max_Money*100))&"% ><tr><td background=images/img_MingXing/bar4.gif style=line-height:9px>&nbsp;</td><td><img src=images/img_MingXing/bar4_1.gif width=6 height=9></td><td style=line-height:9px>&nbsp;</td></tr></table></td><td height=13><img height=13 src=images/img_MingXing/img_right.gif width=3></td></tr></tbody></table>"
			end if
		else
			Strings=Strings&"$$"&"<table cellspacing=0 cellpadding=0 width=95% border=0 style=cursor:hand title=等你来改写><tbody><col width=3><col width="&min_disp&"><col width=*><col width=3><tr><td height=13><img height=13 src=images/img_MingXing/img_left.gif width=3></td><td background=images/img_MingXing/img_backing.gif><img src=images/img_MingXing/bar4.gif width="&min_disp&" height=9></td><td background=images/img_MingXing/img_backing.gif><table border=0 cellpadding=0 cellspacing=0><col width=1% ><col width=*><col width=98% ><tr><td background=images/img_MingXing/bar4.gif style=line-height:9px>&nbsp;</td><td><img src=images/img_MingXing/bar4_1.gif width=6 height=9></td><td style=line-height:9px>&nbsp;</td></tr></table></td><td height=13><img height=13 src=images/img_MingXing/img_right.gif width=3></td></tr></tbody></table>"
		end if
	end if
	if IsNengLiang=0 then
		if UserName<>"" then
			Strings=Strings&"$$"&"<font color={$mx_color"&MingXing_Pos&"}><b>"&MingXingSQL(8,0)&"</b></font>"
		else
			Strings=Strings&"$$"&"<font color={$mx_color"&MingXing_Pos&"} style=cursor:hand title=等你来改写>0</font>"
		end if
	else
		if UserName<>"" then
			if MingXingSQL(8,0)>max_CP*0.9 then
				Strings=Strings&"$$"&"<table cellspacing=0 cellpadding=0 width=95% border=0 style=Cursor:hand title="&MingXingSQL(8,0)&"><tbody><col width=3><col width="&min_disp&"><col width=*><col width=3><tr><td height=13><img height=13 src=images/img_MingXing/img_left.gif width=3></td><td background=images/img_MingXing/img_backing.gif><img src=images/img_MingXing/Bar5.gif width="&min_disp&" height=9></td><td background=images/img_MingXing/img_backing.gif><table border=0 cellpadding=0 cellspacing=0><col width="&(90+int(10*(MingXingSQL(8,0)-max_CP*0.9)/(max_CP*0.9)))&"% ><col width=*><col width="&(10-int(10*(MingXingSQL(8,0)-max_CP*0.9)/(max_CP*0.9)))&"% ><tr><td background=images/img_MingXing/Bar5.gif style=line-height:9px>&nbsp;</td><td><img src=images/img_MingXing/Bar5_1.gif width=6 height=9></td><td style=line-height:9px>&nbsp;</td></tr></table></td><td height=13><img height=13 src=images/img_MingXing/img_right.gif width=3></td></tr></tbody></table>"
			else
				Strings=Strings&"$$"&"<table cellspacing=0 cellpadding=0 width=95% border=0 style=Cursor:hand title="&MingXingSQL(8,0)&"><tbody><col width=3><col width="&min_disp&"><col width=*><col width=3><tr><td height=13><img height=13 src=images/img_MingXing/img_left.gif width=3></td><td background=images/img_MingXing/img_backing.gif><img src=images/img_MingXing/Bar5.gif width="&min_disp&" height=9></td><td background=images/img_MingXing/img_backing.gif><table border=0 cellpadding=0 cellspacing=0><col width="&int(MingXingSQL(8,0)/max_CP*100)&"% ><col width=*><col width="&(100-int(MingXingSQL(8,0)/max_CP*100))&"% ><tr><td background=images/img_MingXing/Bar5.gif style=line-height:9px>&nbsp;</td><td><img src=images/img_MingXing/Bar5_1.gif width=6 height=9></td><td style=line-height:9px>&nbsp;</td></tr></table></td><td height=13><img height=13 src=images/img_MingXing/img_right.gif width=3></td></tr></tbody></table>"
			end if
		else
			Strings=Strings&"$$"&"<table cellspacing=0 cellpadding=0 width=95% border=0 style=cursor:hand title=等你来改写><tbody><col width=3><col width="&min_disp&"><col width=*><col width=3><tr><td height=13><img height=13 src=images/img_MingXing/img_left.gif width=3></td><td background=images/img_MingXing/img_backing.gif><img src=images/img_MingXing/Bar5.gif width="&min_disp&" height=9></td><td background=images/img_MingXing/img_backing.gif><table border=0 cellpadding=0 cellspacing=0><col width=1% ><col width=*><col width=98% ><tr><td background=images/img_MingXing/Bar5.gif style=line-height:9px>&nbsp;</td><td><img src=images/img_MingXing/Bar5_1.gif width=6 height=9></td><td style=line-height:9px>&nbsp;</td></tr></table></td><td height=13><img height=13 src=images/img_MingXing/img_right.gif width=3></td></tr></tbody></table>"
		end if
	end if
	if IsNengLiang=0 then
		if UserName<>"" then
			Strings=Strings&"$$"&"<font color={$mx_color"&MingXing_Pos&"}><b>"&MingXingSQL(7,0)&"</b></font>"
		else
			Strings=Strings&"$$"&"<font color={$mx_color"&MingXing_Pos&"} style=cursor:hand title=等你来改写>0</font>"
		end if
	else
		if UserName<>"" then
			if MingXingSQL(7,0)>Max_EP*0.9 then
				Strings=Strings&"$$"&"<table cellspacing=0 cellpadding=0 width=95% border=0 style=Cursor:hand title="&MingXingSQL(7,0)&"><tbody><col width=3><col width="&min_disp&"><col width=*><col width=3><tr><td height=13><img height=13 src=images/img_MingXing/img_left.gif width=3></td><td background=images/img_MingXing/img_backing.gif><img src=images/img_MingXing/Bar3.gif width="&min_disp&" height=9></td><td background=images/img_MingXing/img_backing.gif><table border=0 cellpadding=0 cellspacing=0><col width="&(90+int(10*(MingXingSQL(7,0)-Max_EP*0.9)/(Max_EP*0.9)))&"% ><col width=*><col width="&(10-int(10*(MingXingSQL(7,0)-Max_EP*0.9)/(Max_EP*0.9)))&"% ><tr><td background=images/img_MingXing/Bar3.gif style=line-height:9px>&nbsp;</td><td><img src=images/img_MingXing/Bar3_1.gif width=6 height=9></td><td style=line-height:9px>&nbsp;</td></tr></table></td><td height=13><img height=13 src=images/img_MingXing/img_right.gif width=3></td></tr></tbody></table>"
			else
				Strings=Strings&"$$"&"<table cellspacing=0 cellpadding=0 width=95% border=0 style=Cursor:hand title="&MingXingSQL(7,0)&"><tbody><col width=3><col width="&min_disp&"><col width=*><col width=3><tr><td height=13><img height=13 src=images/img_MingXing/img_left.gif width=3></td><td background=images/img_MingXing/img_backing.gif><img src=images/img_MingXing/Bar3.gif width="&min_disp&" height=9></td><td background=images/img_MingXing/img_backing.gif><table border=0 cellpadding=0 cellspacing=0><col width="&int(MingXingSQL(7,0)/Max_EP*100)&"% ><col width=*><col width="&(100-int(MingXingSQL(7,0)/Max_EP*100))&"% ><tr><td background=images/img_MingXing/Bar3.gif style=line-height:9px>&nbsp;</td><td><img src=images/img_MingXing/Bar3_1.gif width=6 height=9></td><td style=line-height:9px>&nbsp;</td></tr></table></td><td height=13><img height=13 src=images/img_MingXing/img_right.gif width=3></td></tr></tbody></table>"
			end if
		else
			Strings=Strings&"$$"&"<table cellspacing=0 cellpadding=0 width=95% border=0 style=cursor:hand title=等你来改写><tbody><col width=3><col width="&min_disp&"><col width=*><col width=3><tr><td height=13><img height=13 src=images/img_MingXing/img_left.gif width=3></td><td background=images/img_MingXing/img_backing.gif><img src=images/img_MingXing/Bar3.gif width="&min_disp&" height=9></td><td background=images/img_MingXing/img_backing.gif><table border=0 cellpadding=0 cellspacing=0><col width=1% ><col width=*><col width=98% ><tr><td background=images/img_MingXing/Bar3.gif style=line-height:9px>&nbsp;</td><td><img src=images/img_MingXing/Bar3_1.gif width=6 height=9></td><td style=line-height:9px>&nbsp;</td></tr></table></td><td height=13><img height=13 src=images/img_MingXing/img_right.gif width=3></td></tr></tbody></table>"
		end if
	end if
	if UserName<>"" then
		Strings=Strings&"$$"&"<a href=javascript:openScript('messanger.asp?action=new&touser="&UserName&"',500,400)><font color={$mx_color"&MingXing_Pos&"}><b>论坛短消息</b></font></a>"
	else
		Strings=Strings&"$$"&"<font color={$mx_color"&MingXing_Pos&"} style=cursor:hand title=等你来改写>无</font>"
	end if
	ShowMingXing=Strings	
End Function%>
