<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/plus_check.asp"-->
<!--#include file="Plus_ForumOffice_Const.Asp"-->

<%
Dim Rs,SQL,ErrCodes
Dim Page,MaxRows,Endpage,CountNum,i

If Dvbbs.UserID=0 Then

	Dvbbs.AddErrCode(6)
	Dvbbs.Showerr()

Else
	XiaoLu.PlusInfo()
	Call Main
End If

Sub Main()
	Dv_Plus.Name = "Plus_ForumOffice"
	
	Select Case request("Action")

		Case "UserInfo"
			UserInfo()
		Case "UserPay"
			UserPay()

		'//=======日志调用部分=======

		Case "WordEnd" '回复
			WordEnd()
		Case "WordNot"
			WordNot()

		Case "PgEnd" '投诉
			PgEnd()
		Case "PgNot"
			PgNot()

		Case "EgEnd" '奖励
			EgEnd()
		Case "EgNot"
			EgNot()

		'//=======日志调用部分=======

		Case "UserLeave" '消假提示
			UserLeave()
		Case "LeaveSave" '消假提交
			LeaveSave()

		'//=======投票调用部分=======
		Case "UserVoteSave" '投票提交
			UserVoteSave()
		Case"UserVote" '投票确认提示
			UserVote()
		Case"VoteInfo" '投票信息查看
			VoteInfo()
		'//=======投票调用部分=======

		Case "UserEg"
			UserEg()
		Case "EgSave"
			EgSave()
		
		Case "UserPg"
			UserPg()
		Case "PgSave"
			PgSave()

		Case "UserLeaveWord"
			UserLeaveWord()
		Case "LeaveWordSave"
			LeaveWordSave()

		Case Else		
			Main_Index()
	End Select
		Dvbbs.footer()

End Sub

Sub UserLeave()

		Dvbbs.stats="消假"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
		Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1 Style=""Width:75%"">"
		Response.Write "<tr><th height=25 class=tablebody2>友情提示"
		Response.Write "</th></tr>"
		Response.Write "<tr><td height=30 class=tablebody1><li><Font Color=red>您当前还属于请假状态,只有消假后才可以正常使用论坛</font></td></tr>"

		Response.Write "<form name=LeaveSave method=post action=""?Action=LeaveSave"">"
		Response.Write "<tr><td class=tablebody2 align=center><input type=submit name=Submit1 value="" 我确认我需要消假 , 提交"" /></td></tr></Form>"
		Response.Write "</table>"

End Sub

Sub LeaveSave()

			Dvbbs.stats="成功消假"
			Dvbbs.LoadTemplates("")
			Dvbbs.Nav()
			Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
			Set Rs=Dvbbs.Plus_Execute("update [Dv_LuZiOffice_User] set UserFettle=0 Where UserName='"&XiaoLu.UserName&"'")

			Set Rs=Dvbbs.Plus_Execute("update [Dv_LuZiPlus_Log] set ClassId=3 Where UserName='"&XiaoLu.UserName&"' and ClassId=2")

			Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1 Style=""Width:75%"">"
			Response.Write "<tr><th height=25 class=tablebody2>友情提示"
			Response.Write "</th></tr>"
			Response.Write "<tr><td height=30 class=tablebody1><li><Font Color=Blue>恭喜您,您已成功消除请假.</font></td></tr>"

			Response.Write "<tr><td class=tablebody2 align=center><A href=Index.asp>返回论坛首页</A></td></tr>"
			Response.Write "</table>"

End Sub

'//团队列表
Sub Main_Index()
	XiaoLu.PageConst(8)
	Dvbbs.stats="团队列表"
	Dvbbs.LoadTemplates("")
	Dvbbs.Nav()
	Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
	XiaoLu.LogChannel()

	Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1>"
	Response.Write "<tr><td class=tablebody1 height=25 colspan=8><Font Color=Red>注：排行将按照支持率的多少从多到少，若票数相等将上任时间作为排行。</Font></td></tr>"
	Response.Write "<tr><th width=* height=25>用户名称</th>"
	Response.Write "<th width=""10%"">支持率</th>"
	Response.Write "<th width=""10%"">被投诉</th>"
	Response.Write "<th width=""10%"">被奖励</th>"
	Response.Write "<th width=""10%"">请假次数</th>"
	Response.Write "<th width=""15%"">注册时间</th>"
	Response.Write "<th width=""15%"">上任时间</th>"
	Response.Write "</tr>"

	SQL="Select * from [Dv_LuZiOffice_User] order by UserVote desc"
	Set Rs = Server.CreateObject ("adodb.recordset")
		If Cint(Dvbbs.Forum_Setting(92))=1 Then
			If Not IsObject(Plus_Conn) Then Plus_ConnectionDatabase
			Rs.Open Sql,Plus_Conn,1,1
		Else
			If Not IsObject(Conn) Then ConnectionDatabase
			Rs.Open Sql,conn,1,1
		End If 


		If Not (Rs.Eof And Rs.Bof) Then
			CountNum = Rs.RecordCount
				If CountNum Mod MaxRows=0 Then
					Endpage = CountNum \ MaxRows
				Else
					Endpage = CountNum \ MaxRows+1
				End If
			Rs.MoveFirst
			If Page > Endpage Then Page = Endpage
				If Page < 1 Then Page = 1
					If Page >1 Then 				
						Rs.Move (Page-1) * MaxRows
					End if
				SQL=Rs.GetRows(MaxRows)
		For i=0 To Ubound(SQL,2)

			Response.Write "<td height=25 class=tablebody2 align=center><A Href=dispuser.asp?Name="&SQL(1,i)&" Title=""查看 "&SQL(1,i)&" 个人资料"" target=_blank>"&SQL(1,i)&"</A> [<A Href=?Action=VoteInfo&Name="&Trim(SQL(1,i))&" Title=""查看 "&SQL(1,i)&" 支持率情况"">查看支持率</a>]</td>"
			Response.Write "<td class=tablebody1 align=center><Font Color=Red>"&SQL(12,i)&"</Font></td>"
			Response.Write "<td class=tablebody1 align=center>"&SQL(2,i)&"</td>"
			Response.Write "<td class=tablebody1 align=center>"&SQL(5,i)&"</td>"
			Response.Write "<td class=tablebody1 align=center>"&SQL(4,i)&"</td>"
			Response.Write "<td class=tablebody2 align=center>"&SQL(11,i)&"</td>"
			Response.Write "<td class=tablebody2 align=center>"&SQL(10,i)&"</td></tr>"
			Response.Write "<tr>"
			Response.Write "<td height=25 class=tablebody1 colspan=8>"&SQL(1,i)&"的留言:"
			Response.Write "<div style=""overflow : auto ;padding:4px 5px 4px 5px;height:50px;line-height:20px;text-align : left;border:1px inset;background-color: #fff;"">"
				

				If Len(SQL(13,i)) <= 3 Then

					Response.Write "<Font Color=Red>这人真懒,连一个签名都不认真填写,这说明态度不正,哎,BS一下</Font>"

				Else

					Response.Write ""&XiaoLu.HTMLCode(XiaoLu.Checkstr(SQL(13,i)))&""
				
				End If

			Response.Write "</div>"

			Response.Write "<div class=info Align=Right>"

			Set Rs=Dvbbs.Plus_Execute("select * from [Dv_LuZiOffice_User] where UserName = '"&SQL(1,i)&"' ")
				If XiaoLu.UserName = Rs("UserName") Then
				Else
					Response.Write "[<A href=?Action=UserEg&Name="&Trim(SQL(1,i))&" Title=""我要奖励 "&Trim(SQL(1,i))&"版主"">奖励版主</A>]"
					Response.Write "[<A href=?Action=UserPg&Name="&Trim(SQL(1,i))&" Title=""我要投诉 "&Trim(SQL(1,i))&" 版主"">投诉此人</A>]"
					Response.Write "[<A href=?Action=UserLeaveWord&Name="&Trim(SQL(1,i))&" Title=""给 "&Trim(SQL(1,i))&" 版主留言"">给他留言</A>]"
				End If

			Response.Write "[<A href=?Action=UserVote&Name="&Trim(SQL(1,i))&" Title=""给 "&Trim(SQL(1,i))&" 投上您的支持票"">投上一票</A>]"
			Response.Write "[<A Href=?Action=UserInfo&Name="&SQL(1,i)&" Title=查看"&SQL(1,i)&"详细资料><Font Color=Red>查看 "&SQL(1,i)&" 斑竹评定资料</Font></A>]"
			Response.Write "</Div></td>"
			Response.Write "</tr>"

			Response.Write "<tr>"
			Response.Write "<td height=5 class=tablebody2 colspan=8></td>"
			Response.Write "</tr>"

		Next
			Response.Write "<SCRIPT>PageList("&Page&",10,"&MaxRows&","&CountNum&","""",1);</SCRIPT>"
		Else
			Response.Write "</tr><td Height=25 class=tablebody1 colspan=8 Align=center><Font Color=red>数据库内暂时无法找到您的内容</Font></td></tr>"
		End If

	Rs.Close
	Set Rs=Nothing
	Response.Write "</Table>"
End Sub

'//版主评定资料
Sub UserInfo()
	Dvbbs.stats="版主资料"
	Dvbbs.LoadTemplates("")
	Dvbbs.Nav()
	Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"

	Set Rs=Dvbbs.Plus_Execute("select * from [Dv_LuZiOffice_User] where UserName = '"&request("Name")&"' ")
		
	If Rs.Eof Then

		ErrCodes=ErrCodes + "<li>" + "暂时无法找到您输入的用户资料"
		Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
	Else
		'//==== 查找斑竹资料列表 ====
		Dim RegTime,UserName,NewTime,UserVote,UserPay,UserEncouragement,UserAppeal,UserEg,UserPg,UserOnLeave,UserResume,UserFettle

			UserName = ""&Rs("UserName")&""  '//用户名称
			NewTime = ""&Rs("NewTime")&"" '//上任时间
			UserVote = ""&Rs("UserVote")&"" '//支持率
			UserEncouragement = ""&Rs("UserEncouragement")&"" '//奖励次数
			UserAppeal = ""&Rs("UserAppeal")&"" '//投诉次数
			UserEg = ""&Rs("UserEg")&"" '//奖励金币
			UserPg = ""&Rs("UserPg")&"" '//被扣金币
			UserOnLeave = ""&Rs("UserOnLeave")&"" '//请假
			UserResume = ""&Rs("UserResume")&"" '//版主签名
			UserFettle = ""&Rs("UserFettle")&"" '//请假状态
			UserPay = ""&Rs("UserPay")&"" '//工资
			RegTime = DateDiff("d", Rs("NewTime") , Now())

		'//==== 查找工资列表 ====
		Dim PayMaintenance,PayLogin,PayPunish,PayPost,PayEncouragement,PayTime
		Set Rs=Dvbbs.Plus_Execute("select Top 1 PayMaintenance,PayLogin,PayPunish,PayPost,PayEncouragement,PayTime from [Dv_LuZiOffice_Pay] where PayName = '"&UserName&"' ")

			If rs.eof then
				PayMaintenance = 0 '维护
				PayLogin = 0 '登录
				PayPunish = 0 '投诉
				PayPost = 0 '发帖子
				PayEncouragement = 0 '奖励次数
				PayTime = XiaoLu.Setting(18) '上次发布时间
			Else
				PayMaintenance = ""&Cint(Rs("PayMaintenance"))&"" '维护
				PayLogin = ""&Cint(Rs("PayLogin"))&"" '登录
				PayPunish = ""&Cint(Rs("PayPunish"))&"" '投诉
				PayPost = ""&Cint(Rs("PayPost"))&"" '发帖子
				PayEncouragement = ""&Cint(Rs("PayEncouragement"))&"" '奖励次数
				PayTime = DateDiff("d",Rs("PayTime"),Now()) '//上次发薪时间
			End If

		Rs.Close

		'//===会员资料===
		Dim usermoney,LastTime,UserPost,UserClass,JoinDate,UserLogins,LastLogin
		Set Rs=Dvbbs.Execute("Select * from [Dv_User] where UserName = '"&UserName&"' ")
			
			usermoney = ""&Rs("usermoney")&"" '//金币数
			LastTime = ""&Rs("LastLogin")&"" '//上次登陆时间
			LastLogin = DateDiff("d" , Rs("LastLogin") , Now()) '//N久未登陆
			UserPost = ""&Rs("UserPost")&"" '//发帖数
			UserClass = ""&Rs("UserClass")&"" '//等级
			JoinDate = ""&Rs("JoinDate")&"" '//积分
			UserLogins = ""&Rs("UserLogins") - Cint(PayMaintenance)&"" '//登陆次数
		Rs.Close

		'//==== 查找维护日志 ====
		Dim UserLog
		Set Rs=Dvbbs.Execute("select count(*) from [Dv_Log] where l_username = '"&UserName&"' ")

			If rs.eof then
				UserLog = 0 '维护量
			Else
				UserLog = ""&Cint(Rs(0))&""
			End If
		Rs.Close

		'//评定显示开始
		Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1>"
		Response.Write "<tr><th height=25 align=left colspan=10>"
			Response.Write "<table border=0 cellpadding=0 cellspacing=0 width=""100%"">"
			Response.Write "<tr><td align=left width=*><Font Color=#FFFFFF><b>用户名称:"&UserName&" 等级：["&Trim(UserClass)&"]</b></td>"
			Response.Write "<td width=""50%"" Align=Right><Font Color=#FFFFFF><b>上任时间:"&NewTime&"</b></Font></td></tr></table>"
		Response.Write "</th></tr>"

		Response.Write "<tr>"
		Response.Write "<td class=tablebody2 width=""9%"" align=center height=25><B>支持率</B></td>"
		Response.Write "<td class=tablebody2 width=""9%"" align=center><B>被奖励</B></td>"
		Response.Write "<td class=tablebody2 width=""9%"" align=center><B>被投诉</B></td>"
		Response.Write "<td class=tablebody2 width=""9%"" align=center><B>维护量</B></td>"
		Response.Write "<td class=tablebody2 width=""10%"" align=center><B>奖励金币</B></td>"
		Response.Write "<td class=tablebody2 width=""10%"" align=center><B>被扣金币</B></td>"
		Response.Write "<td class=tablebody2 width=""10%"" align=center><B>请假次数</B></td>"
		Response.Write "<td class=tablebody2 width=""10%"" align=center><B>登陆次数</B></td>"
		Response.Write "<td class=tablebody2 width=""10%"" align=center><B>发帖数量</B></td>"
		Response.Write "<td class=tablebody2 width=""14%"" align=center><B>注册时间</B></td>"
		Response.Write "</th></tr>"
		
		Response.Write "<tr>"
		Response.Write "<td class=tablebody1 align=center><Font Color=Red>"&Cint(UserVote)&" 票</Font></td>"
		Response.Write "<td class=tablebody1 align=center>"&Cint(UserEncouragement)&"</td>"
		Response.Write "<td class=tablebody1 align=center><Font Color=Blue>"&Cint(UserAppeal)&"<Font></td>"
		Response.Write "<td class=tablebody1 align=center>"&Cint(UserLog - PayMaintenance)&"</td>"
		Response.Write "<td class=tablebody1 align=center>"&Cint(UserEg)&"</td>"
		Response.Write "<td class=tablebody1 align=center>"&Cint(UserPg)&"</td>"
		Response.Write "<td class=tablebody1 align=center>"&Cint(UserOnLeave)&"</td>"
		Response.Write "<td class=tablebody1 align=center>"&Cint(UserLogins)&"</td>"
		Response.Write "<td class=tablebody1 align=center>"&Cint(UserPost)&"</td>"
		Response.Write "<td class=tablebody1 align=center><Font Color=#990000>"&JoinDate&"</Font></td>"
		Response.Write "</tr>"
		Response.Write "</table><br />"

		Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1>"
		Response.Write "<tr><td class=tablebody2 height=25><B>"&Trim(UserName)&" 的版主签名:</B></td></tr>"
		Response.Write "<tr><td class=tablebody1 height=25><u>内容</u>：<br />"
		Response.Write "<div style=""overflow : auto ;padding:4px 20px 4px 20px;height:50px;line-height:20px;text-align : left;border:1px inset;background-color: #fff;"">"
		Response.Write "<Font Color=Blue>"
		
				If Len(UserResume) <= 3 Then
					Response.Write "<Font Color=Red>这人真懒,连一个签名都不认真填写,这说明态度不正,哎,BS一下</Font>"
				Else
					Response.Write ""&XiaoLu.HTMLCode(XiaoLu.Checkstr(Trim(UserResume)))&""
				End If

		Response.Write "</Font>"
		Response.Write "</Div></td></tr>"
		Response.Write "</table><br />"

		Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1>"
		Response.Write "<tr><td class=tablebody2 height=25><B>"&Trim(UserName)&" 的评定结果:</B></td></tr>"
		Response.Write "<tr><td class=tablebody1 height=25 Style=""line-height:22px"">"
		Response.Write "本会员上次登陆时间："&LastTime&"<br />"
		
		Set Rs=Dvbbs.Plus_Execute("Select * from [Dv_LuZiPlus_Log] where UserName = '"&UserName&"' And ClassId=2 ")

			Dim UserRemark,UserLogin
			If Rs.Eof Then
				UserRemark = 0
			Else
				UserRemark = ""&Rs("UserRemark")&""
			End If

			UserLogin = ""&Cint(Cint(LastLogin) - Cint(UserRemark))&""

		Response.Write "<u>当前状态</u>:"
			
			If UserLogin = 0 Then

				Response.Write "版主今天才登陆的，工作非常积极。我愿意 <A Href=?Action=UserVote&Name="&UserName&"><Font Color=Red>投票</Font></a> 支持他"

			ElseIf UserLogin > 0 Then

				Response.Write "工作表现比较认真积极，已有 "&UserLogin&" 天没登陆论坛。"

			ElseIf UserLogin <= 4 Then

				Response.Write "工作表现开始变的懒散，而且目前已经有 "&UserLogin&" 天没登陆论坛了。"
			
			ElseIf UserLogin <= 8 Then
				
				Response.Write "此人已经目无规矩了，目前已经有 "&UserLogin&" 天没登陆论坛了，管理员开始考虑是否找个替换他的人了"
				Set Rs=Dvbbs.Execute("insert into dv_message(sender,incept,title,content,sendtime,issend) values('办公室' , '"&XiaoLu.Setting(17)&"' , '版主失职' ,  '"&UserName&"已有 "&UserLogin&" 未登陆了，请考虑是否撤消他的版主职位' , '"&now()&"' , '1')")

			ElseIf UserLogin <= 12 Then
			
				Response.Write "该版主已经 "&UserLogin&" 天没登陆论坛了，已经<u>严重失职</u>，论坛将准备替换掉他."
				Set Rs=Dvbbs.Execute("insert into dv_message(sender,incept,title,content,sendtime,issend) values('办公室' , '"&XiaoLu.Setting(17)&"' , '版主失职' ,  '"&UserName&"已有 "&UserLogin&" 未登陆了，请考虑是否撤消他的版主职位' , '"&now()&"' , '1')")
			
			ElseIf CInt(UserFettle) = 1 Then

					Response.Write "<Font Color=red>请假中...</Font>"

			End If
		Response.Write "<br />"
		Response.Write "从上任起到至今共获得支持票数："&UserVote&""
		Response.Write "</td></tr></table>"
		'//评定显示结束

		'//工资显示开始
		If Cint(XiaoLu.Setting(18)) <= Cint(RegTime) Then

			If Cint(XiaoLu.Setting(18)) <= Cint(PayTime) Then
				
				If XiaoLu.Setting(4) = XiaoLu.UserName Then

					Dim Pay_Log,Pay_Login,Pay_Punish,Pay_Post,Pay_Encouragement,EGross,PGross,PayGross

					Pay_Log = ""&Cint(UserLog - PayMaintenance)/20&"" '//维护量  除20
					Pay_Login = ""&Cint(UserLogins) - Cint(PayLogin)&"" '登录
					Pay_Punish = ""&Cint(UserAppeal) - Cint(PayPunish)&"" '投诉
					Pay_Post = ""&Cint(UserPost) - Cint(PayLogin)&"" '发帖子
					Pay_Encouragement = ""&Cint(PayEncouragement) - Cint(UserEncouragement)&"" '奖励次数
					
					'//附加奖励值
					EGross = ""&Cint(Cint(Pay_Log) + Cint(Cint(Pay_Login)/5) + Cint(Cint(Pay_Post)/50) + Cint(Pay_Encouragement))&""

					'//附加处罚值
					PGross = ""&Cint(Cint(Pay_Punish)*20)&""

					'总额(附加奖励值+附加处罚值+基本工资)
					PayGross = ""&Cint(EGross) - Cint(PGross) + Cint(XiaoLu.Setting(5))&""

					Response.Write "<br /><table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1>"
					Response.Write "<tr><th height=25 colspan=2 align=left>工资发放说明</th></tr>"
					Response.Write "<tr>"
					Response.Write "<td height=25 colspan=2 class=tablebody1 Style=""line-height:22px"">"
					Response.Write ""&XiaoLu.HTMLCode(XiaoLu.Checkstr(XiaoLu.Setting(12)))&""
					Response.Write "</td></tr>"
					Response.Write "<form name=SignIn method=post action=""?Action=UserPay"">"
					Response.Write "<tr><th height=25 colspan=2 align=left>工资发放</th></tr>"
					Response.Write "<tr>"
					Response.Write "<td height=25 colspan=2 class=tablebody2>"
					Response.Write ""&Trim(UserName)&" 本期工资结算[总额：<Font Color=red><b>"&Cint(PayGross)&"</b></Font> 金币（<u>未计算本期奖金和扣除工资数</u>）]：<br />"
					Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1、基本工资：<Font Color=Blus><b>"&Cint(XiaoLu.Setting(5))&"</b></Font> 个金币；<br />"
					Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2、附加奖励值：<Font Color=#006699><b>"&Cint(EGross)&"</b></Font> 个金币；<br />"
					Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3、附加处罚值：<Font Color=#990099><b>"&Cint(PGross)&"</b></Font> 个金币；"
					Response.Write "</td></tr>"
					Response.Write "<tr>"
					Response.Write "<td height=25 width=""50%"" class=tablebody1><u>本期奖金</u><br />在工资总额：<Font Color=red><b></b></Font> 个金币的基础上添加工资奖金</td>"
					Response.Write "<td width=""50%"" class=tablebody1>"
					Response.Write "<input name=PayBonus type=text size=4  value=0 /> 个金币</td>"
					Response.Write "</tr>"
					Response.Write "<tr>"
					Response.Write "<td height=25 width=""50%"" class=tablebody2><u>扣除工资</u><br />在工资总额：<Font Color=red><b></b></Font> 个金币的基础上扣除工资金额</td>"
					Response.Write "<td width=""50%"" class=tablebody2>"
					Response.Write "<input name=PayDecrease type=text size=4  value=0 /> 个金币</td>"
					Response.Write "</tr>"
					Response.Write "<tr>"
					Response.Write "<td height=25 width=""50%"" class=tablebody1 Valign=top><u>操作原由</u><br />请写清扣除工资的理由，方便管理员和版主的查看</td>"
					Response.Write "<td width=""50%"" class=tablebody1 Valign=top>"
					Response.Write "<textarea name=PayAction cols=45 rows=3>0</textarea></td>"
					Response.Write "</tr>"
					Response.Write "<tr>"
					Response.Write "<td height=25 width=""50%"" class=tablebody2></td>"
					Response.Write "<td width=""50%"" class=tablebody2>"

					Response.Write "<input name=""PayName"" type=""hidden"" value="&UserName&" />"  '用户名
					Response.Write "<input name=""PayReportForms"" type=""hidden"" value=""您本期工资总额："&Cint(PayGross)&" 金币；其中附加奖励值: "&Cint(EGross)&" ；附加处罚值 :"&Cint(PGross)&"。如果对本期有疑问请于网站管理员联系"" />"  '工资报表
					Response.Write "<input name=""PayBase"" type=""hidden"" value="&Cint(XiaoLu.Setting(5))&" />"  '基本工资
					Response.Write "<input name=""PayEg"" type=""hidden"" value="&Cint(EGross)&" />"  '附加奖励值
					Response.Write "<input name=""PayPg"" type=""hidden"" value="&Cint(PGross)&" />"  '附加处罚值
					Response.Write "<input name=""PayEncouragement"" type=""hidden"" value="&Pay_Encouragement&" />"  '奖励次数
					Response.Write "<input name=""PayPunish"" type=""hidden"" value="&Pay_Punish&" />"  '投诉次数
					Response.Write "<input name=""PayLogin"" type=""hidden"" value="&Pay_Login&" />"  '登录次数
					Response.Write "<input name=""PayPost"" type=""hidden"" value="&Pay_Post&" />"  '帖子
					Response.Write "<input name=""PayMaintenance"" type=""hidden"" value="&UserLog&" />"  '维护量
					Response.Write "<input name=""PayManipulator"" type=""hidden"" value="&XiaoLu.UserName&" />"  '操作人
					Response.Write "<input name=""UserPay"" type=""hidden"" value="&Cint(usermoney) + Cint(PayGross)&" />"  '总额
					Response.Write "<input name=""UserPay2"" type=""hidden"" value="&Cint(UserEg) + Cint(PayGross)&" />"  '总额2
					Response.Write "<input name=""UserPay3"" type=""hidden"" value="&Cint(UserPay)&" />"  '总额3
					Response.Write "<input name=""UserPg2"" type=""hidden"" value="&Cint(UserPg)&" />"  '被扣金币

					Response.Write "<input type=submit name=Submit1 value="" 填写完毕 , 提交"" />"
					Response.Write "</td></tr></Form></table>"
				End If
			End If
		End If
		'//工资显示结束
	'//结束If
	End If
End Sub

'//工资提交
Sub UserPay()

	If Not (isNumeric(Request("PayBonus"))) Then

		ErrCodes=ErrCodes + "<li>" + "[本期奖金] 必须为整数,否则系统不允许提交"
		Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"

	ElseIf Not (isNumeric(Request("PayDecrease"))) Then

		ErrCodes=ErrCodes + "<li>" + "[扣除工资] 必须为整数,否则系统不允许提交"
		Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
	
	ElseIf Request("PayAction") = "" Then

		ErrCodes=ErrCodes + "<li>" + "[操作原由] 为必填项,不能为空,否则系统不允许提交"
		Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"

	Else

		Dvbbs.stats="工资发放"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"

		
		Set Rs=Dvbbs.Plus_Execute("insert into [Dv_LuZiOffice_Pay](PayBonus,PayDecrease,PayAction,PayName,PayReportForms,PayBase,PayEg,PayPg,PayEncouragement,PayPunish,PayLogin,PayPost,PayMaintenance,PayManipulator) Values('"&request("PayBonus")&"','"&request("PayDecrease")&"','"&request("PayAction")&"','"&request("PayName")&"','"&request("PayReportForms")&"','"&request("PayBase")&"','"&request("PayEg")&"','"&request("PayPg")&"','"&request("PayEncouragement")&"','"&request("PayPunish")&"','"&request("PayLogin")&"','"&request("PayPost")&"','"&request("PayMaintenance")&"','"&request("PayManipulator")&"')")
		
		Set Rs=Dvbbs.Execute("update [Dv_User] set usermoney='" & Cint(Cint(Request.Form("UserPay")) + Cint(Request.Form("PayBonus")) - Cint(Request.Form("PayDecrease"))) & "' Where UserName='"&Request("PayName")&"'")
		
		Set Rs=Dvbbs.Plus_Execute("update [Dv_LuZiOffice_User] set UserPay= '" & Cint(Cint(Request.Form("UserPay3")) + Cint(Request.Form("UserPay2")) + Cint(Request.Form("PayBonus"))) - Cint(Cint(Request.Form("PayDecrease")) + Cint(Request.Form("UserPg2")))&"' , UserEg='" & Cint(Request.Form("UserPay2")) + Cint(Request.Form("PayBonus"))& "' , UserPg = '" & Cint(Request.Form("PayDecrease")) + Cint(Request.Form("UserPg2")) & "' Where UserName='"&Request("PayName")&"'")

		Set Rs=Dvbbs.Execute("insert into dv_message(sender,incept,title,content,sendtime,issend) values('财务总监' , '"&Request("PayName")&"' , '您"&now()&"的工资报表' , '您的工资已发放,"&request("PayReportForms")&"' , '"&now()&"' , '1')")

		Dvbbs.Dvbbs_Suc("<li>该斑竹工资已提交成功</li>")

	End If
End Sub

'//投票
Sub UserVote()
Dim LuRs,VoteDate

	Set Rs=Dvbbs.Plus_Execute("Select top 1 * from [Dv_LuZiPlus_Log] Where ClassId=19 And Manipulator='"&XiaoLu.UserName&"'")

	If Rs.Eof Then

		VoteDate = Cint(XiaoLu.Setting(9))

	Else

		VoteDate = DateDiff("d", Rs(5), Now())
		
	End If

Rs.Close
Set Rs = Nothing

Set Rs=Dvbbs.Execute("Select UserPost from [Dv_User] Where UserName = '"&XiaoLu.UserName&"'")

Dim UserPost
UserPost = ""&Cint(Rs("UserPost"))&""

	If Cint(UserPost) < Cint(XiaoLu.Setting(10)) Then

			ErrCodes=ErrCodes + "<li>" + "您的发帖量不足系统要求的 "&Cint(XiaoLu.Setting(10))&" ,请灌满再来。 "
			Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
	Else
		If Cint(VoteDate) < Cint(XiaoLu.Setting(9)) Then

			ErrCodes=ErrCodes + "<li>" + "相隔 "&XiaoLu.Setting(9)&" 天才能投一次票，请您下次再来。"
			Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"


			Else

			Dvbbs.stats="投票确认"
			Dvbbs.LoadTemplates("")
			Dvbbs.Nav()
			Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.asp"
			XiaoLu.LogChannel()

			Set Rs=Dvbbs.Plus_Execute("select * from [Dv_LuZiOffice_User] where UserName = '"&request("Name")&"' ")

			If Rs.Eof Then
					ErrCodes=ErrCodes + "<li>" + "数据库内暂无此会员名单"
					Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
			Else
					Response.Write "<br /><form action=""?Action=UserVoteSave"" method=""post"">"
					Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1 Style=""Width:75%"">"
					Response.Write "<tr><th height=25 class=tablebody2>友情提示"
					Response.Write "</th></tr>"
					Response.Write "<tr><td height=30 class=tablebody1><li><Font Color=Blue>您确定要给 "&Trim(Rs("UserName"))&" 投票吗？</font></td></tr>"
					Response.Write "<input name=UserName type=hidden value="&Trim(Rs("UserName"))&" />"
					Response.Write "<input name=Manipulator type=hidden value="&Trim(XiaoLu.UserName)&" />"
					Response.Write "<input name=UserVote type=hidden value="&Cint(Rs("UserVote")) + 1 &" />"
					Response.Write "<tr><td class=tablebody2 align=center><input type=submit name=Submit1 value="" 确定投票 , 提交"" /></td></tr>"
					Response.Write "</table></Form>"
			End If
		End If
	End If
End Sub

'//投票提交
Sub UserVoteSave()

Dim LuRs,VoteDate

	Set Rs=Dvbbs.Plus_Execute("Select top 1 * from [Dv_LuZiPlus_Log] Where ClassId=19 And Manipulator='"&XiaoLu.UserName&"'")

	If Rs.Eof Then
		VoteDate = Cint(XiaoLu.Setting(9))
	Else
		VoteDate = DateDiff("d", Rs(5), Now())
		
	End If

Rs.Close
Set Rs = Nothing

Set Rs=Dvbbs.Execute("Select UserPost from [Dv_User] Where UserName = '"&XiaoLu.UserName&"'")

Dim UserPost
UserPost = ""&Cint(Rs("UserPost"))&""

	If Cint(UserPost) < Cint(XiaoLu.Setting(10)) Then

			ErrCodes=ErrCodes + "<li>" + "您的发帖量不足系统要求的 "&Cint(XiaoLu.Setting(10))&" ,请灌满再来。 "
			Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
	Else
		If Cint(VoteDate) < Cint(XiaoLu.Setting(9)) Then

			ErrCodes=ErrCodes + "<li>" + "相隔 "&XiaoLu.Setting(9)&" 天才能投一次票，请您下次再来。"
			Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
			Response.End()

		Else
			Dvbbs.stats="投票提交"
			Dvbbs.LoadTemplates("")
			Dvbbs.Nav()
			Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.asp"
			XiaoLu.LogChannel()

			Set Rs=Dvbbs.Plus_Execute("Update [Dv_LuZiOffice_User] Set UserVote = "&Request("UserVote")&" Where UserName = '"&Request("UserName")&"'")
			Set Rs=Dvbbs.Plus_Execute("insert into [Dv_LuZiPlus_Log](UserName,Manipulator,ClassId) Values('"&request("UserName")&"','"&request("Manipulator")&"',19)")
			
			Set Rs=Dvbbs.Execute("insert into dv_message(sender,incept,title,content,sendtime,issend) values('办公室' , '"&Request("UserName")&"' , '投票信息' , '"&Request("UserName")&"，"&request("Manipulator")&"在管理团队中给您投上了一条支持票，快去看看吧。' , '"&now()&"' , '1')")

				Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1 Style=""Width:75%"">"
				Response.Write "<tr><th height=25 class=tablebody2>友情提示"
				Response.Write "</th></tr>"
				Response.Write "<tr><td height=30 class=tablebody1><li>恭喜您，这次投票成功。</td></tr>"
				Response.Write "<tr><td class=tablebody2 align=center><A href=Plus_ForumOffice_Team.Asp>返回团队首页</a></td></tr>"
				Response.Write "</table></Form>"
		End If
	End If
End Sub

'//自持率查看
Sub VoteInfo()
		XiaoLu.PageConst(15)
		Dvbbs.stats="支持率情况查看"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.asp"

		SQL="Select * from [Dv_LuZiPlus_Log] where ClassId = 19 And UserName = '"&Trim(Request("Name"))&"'"
		Set Rs = Server.CreateObject ("adodb.recordset")
				If Cint(Dvbbs.Forum_Setting(92))=1 Then
					If Not IsObject(Plus_Conn) Then Plus_ConnectionDatabase
					Rs.Open Sql,Plus_Conn,1,1
				Else
					If Not IsObject(Conn) Then ConnectionDatabase
					Rs.Open Sql,conn,1,1
				End If 

		If Request("Name") <> "" Then

			If Rs.Eof Then

				ErrCodes=ErrCodes + "<li>" + "数据库内法找到投票记录，数据为空。"
				Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
				
			Else
				Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1 Style=""Width:75%"">"
				Response.Write "<tr>"
				Response.Write "<th height=25 colspan=2>"&Trim(Rs("UserName"))&" 的支持情况</th>"
				Response.Write "</tr>"
				Response.Write "<tr>"
				Response.Write "<td height=25 class=tablebody2 Width = *>投票人</td>"
				'Response.Write "<td height=25 class=tablebody2></td>"
				Response.Write "<td height=25 class=tablebody2 Width = ""30%"">投票时间</td>"
				Response.Write "</tr>"

						CountNum = Rs.RecordCount
							If CountNum Mod MaxRows=0 Then
								Endpage = CountNum \ MaxRows
							Else
								Endpage = CountNum \ MaxRows+1
							End If
						Rs.MoveFirst
						If Page > Endpage Then Page = Endpage
							If Page < 1 Then Page = 1
								If Page >1 Then 				
									Rs.Move (Page-1) * MaxRows
								End if
							SQL=Rs.GetRows(MaxRows)
					For i=0 To Ubound(SQL,2)
					
						'//内容
				Response.Write "<tr>"
				Response.Write "<td height=25 class=tablebody1>"&Trim(SQL(10,i))&"</td>"
				Response.Write "<td height=25 class=tablebody1 Width = ""30%"">"&SQL(5,i)&"</td>"
				Response.Write "</tr>"
				Response.Write "<tr>"
				Response.Write "<td height=5 class=tablebody2 colspan=2></td>"
				Response.Write "</tr>"
						'//内容结束
				Next
					Response.Write "<table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder Style=""Width:75%"">"
					Response.Write "<tr><td>"
					Response.Write "<SCRIPT>PageList("&Page&",10,"&MaxRows&","&CountNum&",""Action=VoteInfo"",1);</SCRIPT>"
					Response.Write "</td></tr></table>"

					Rs.Close
				Set Rs=Nothing
				Response.Write "</table>"
			End If
		Else
				ErrCodes=ErrCodes + "<li>" + "错误ID，请输入正确。"
				Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
		End If
End Sub

Sub EgEnd()
		XiaoLu.PageConst(10)
		Dvbbs.stats="奖励已审核日志"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
		XiaoLu.LogChannel()

				SQL="Select * from [Dv_LuZiPlus_Log] Where Manipulator='"&XiaoLu.UserName&"' And ClassId=5 Or Manipulator='"&XiaoLu.UserName&"' And ClassId=6 order by ID desc"
	
			Set Rs = Server.CreateObject ("adodb.recordset")
			If Cint(Dvbbs.Forum_Setting(92))=1 Then
				If Not IsObject(Plus_Conn) Then Plus_ConnectionDatabase
				Rs.Open Sql,Plus_Conn,1,1
			Else
				If Not IsObject(Conn) Then ConnectionDatabase
				Rs.Open Sql,conn,1,1
			End If 


			If Not (Rs.Eof And Rs.Bof) Then
				CountNum = Rs.RecordCount
					If CountNum Mod MaxRows=0 Then
						Endpage = CountNum \ MaxRows
					Else
						Endpage = CountNum \ MaxRows+1
					End If
				Rs.MoveFirst
				If Page > Endpage Then Page = Endpage
					If Page < 1 Then Page = 1
						If Page >1 Then 				
							Rs.Move (Page-1) * MaxRows
						End if
					SQL=Rs.GetRows(MaxRows)
			For i=0 To Ubound(SQL,2)

				Call EPgConst()
			
		Next

			Response.Write "<SCRIPT>PageList("&Page&",10,"&MaxRows&","&CountNum&",""Action=PgEnd"",1);</SCRIPT>"
		Else
			Response.Write "<tr><td class=TableBody1 Height=25 align=center colspan=3><Font Color=red>数据库内暂时无法找到您的内容</Font></td></tr>"
		End If
			Rs.Close
		Set Rs=Nothing
		Response.Write "</table>"
End Sub

Sub EgNot()
		XiaoLu.PageConst(10)
		Dvbbs.stats="奖励未审核日志"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
		XiaoLu.LogChannel()

		SQL="Select * from [Dv_LuZiPlus_Log] Where Manipulator='"&XiaoLu.UserName&"' And ClassId=4 order by ID desc"
	
			Set Rs = Server.CreateObject ("adodb.recordset")
			If Cint(Dvbbs.Forum_Setting(92))=1 Then
				If Not IsObject(Plus_Conn) Then Plus_ConnectionDatabase
				Rs.Open Sql,Plus_Conn,1,1
			Else
				If Not IsObject(Conn) Then ConnectionDatabase
				Rs.Open Sql,conn,1,1
			End If 


			If Not (Rs.Eof And Rs.Bof) Then
				CountNum = Rs.RecordCount
					If CountNum Mod MaxRows=0 Then
						Endpage = CountNum \ MaxRows
					Else
						Endpage = CountNum \ MaxRows+1
					End If
				Rs.MoveFirst
				If Page > Endpage Then Page = Endpage
					If Page < 1 Then Page = 1
						If Page >1 Then 				
							Rs.Move (Page-1) * MaxRows
						End if
					SQL=Rs.GetRows(MaxRows)
			For i=0 To Ubound(SQL,2)

				Call EPgConst()
			
		Next

			Response.Write "<SCRIPT>PageList("&Page&",10,"&MaxRows&","&CountNum&",""Action=PgEnd"",1);</SCRIPT>"
		Else
			Response.Write "<tr><td class=TableBody1 Height=25 align=center colspan=3><Font Color=red>数据库内暂时无法找到您的内容</Font></td></tr>"
		End If
			Rs.Close
		Set Rs=Nothing
		Response.Write "</table>"
End Sub

Sub PgEnd()
		XiaoLu.PageConst(10)
		Dvbbs.stats="投诉已审核日志"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
		XiaoLu.LogChannel()

		
		SQL="Select * from [Dv_LuZiPlus_Log] Where Manipulator='"&XiaoLu.UserName&"' And ClassId=8 or Manipulator='"&XiaoLu.UserName&"' And ClassId=9 order by ID desc"
	
			Set Rs = Server.CreateObject ("adodb.recordset")
			If Cint(Dvbbs.Forum_Setting(92))=1 Then
				If Not IsObject(Plus_Conn) Then Plus_ConnectionDatabase
				Rs.Open Sql,Plus_Conn,1,1
			Else
				If Not IsObject(Conn) Then ConnectionDatabase
				Rs.Open Sql,conn,1,1
			End If 


			If Not (Rs.Eof And Rs.Bof) Then
				CountNum = Rs.RecordCount
					If CountNum Mod MaxRows=0 Then
						Endpage = CountNum \ MaxRows
					Else
						Endpage = CountNum \ MaxRows+1
					End If
				Rs.MoveFirst
				If Page > Endpage Then Page = Endpage
					If Page < 1 Then Page = 1
						If Page >1 Then 				
							Rs.Move (Page-1) * MaxRows
						End if
					SQL=Rs.GetRows(MaxRows)
			For i=0 To Ubound(SQL,2)

				Call EPgConst()
			
		Next

			Response.Write "<SCRIPT>PageList("&Page&",10,"&MaxRows&","&CountNum&",""Action=PgEnd"",1);</SCRIPT>"
		Else
			Response.Write "<tr><td class=TableBody1 Height=25 align=center colspan=3><Font Color=red>数据库内暂时无法找到您的内容</Font></td></tr>"
		End If
			Rs.Close
		Set Rs=Nothing
		Response.Write "</table>"
End Sub

Sub PgNot()
		XiaoLu.PageConst(10)
		Dvbbs.stats="投诉未审核日志"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
		XiaoLu.LogChannel()

		SQL="Select * from [Dv_LuZiPlus_Log] Where Manipulator='"&XiaoLu.UserName&"' And ClassId=7 order by ID desc"
	
			Set Rs = Server.CreateObject ("adodb.recordset")
			If Cint(Dvbbs.Forum_Setting(92))=1 Then
				If Not IsObject(Plus_Conn) Then Plus_ConnectionDatabase
				Rs.Open Sql,Plus_Conn,1,1
			Else
				If Not IsObject(Conn) Then ConnectionDatabase
				Rs.Open Sql,conn,1,1
			End If 


			If Not (Rs.Eof And Rs.Bof) Then
				CountNum = Rs.RecordCount
					If CountNum Mod MaxRows=0 Then
						Endpage = CountNum \ MaxRows
					Else
						Endpage = CountNum \ MaxRows+1
					End If
				Rs.MoveFirst
				If Page > Endpage Then Page = Endpage
					If Page < 1 Then Page = 1
						If Page >1 Then 				
							Rs.Move (Page-1) * MaxRows
						End if
					SQL=Rs.GetRows(MaxRows)
			For i=0 To Ubound(SQL,2)

				Call EPgConst()
			
		Next

			Response.Write "<SCRIPT>PageList("&Page&",10,"&MaxRows&","&CountNum&",""Action=PgNot"",1);</SCRIPT>"
		Else
			Response.Write "<tr><td class=TableBody1 Height=25 align=center colspan=3><Font Color=red>数据库内暂时无法找到您的内容</Font></td></tr>"
		End If
			Rs.Close
		Set Rs=Nothing
Response.Write "</table>"
End Sub

Sub WordEnd()
		XiaoLu.PageConst(5)
		Dvbbs.stats="已回复留言"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
		XiaoLu.LogChannel()

		SQL="Select * from [Dv_LuZiPlus_Log] Where Manipulator='"&XiaoLu.UserName&"' And ClassId=11 order by ID desc"
	
			Set Rs = Server.CreateObject ("adodb.recordset")
			If Cint(Dvbbs.Forum_Setting(92))=1 Then
				If Not IsObject(Plus_Conn) Then Plus_ConnectionDatabase
				Rs.Open Sql,Plus_Conn,1,1
			Else
				If Not IsObject(Conn) Then ConnectionDatabase
				Rs.Open Sql,conn,1,1
			End If 


			If Not (Rs.Eof And Rs.Bof) Then
				CountNum = Rs.RecordCount
					If CountNum Mod MaxRows=0 Then
						Endpage = CountNum \ MaxRows
					Else
						Endpage = CountNum \ MaxRows+1
					End If
				Rs.MoveFirst
				If Page > Endpage Then Page = Endpage
					If Page < 1 Then Page = 1
						If Page >1 Then 				
							Rs.Move (Page-1) * MaxRows
						End if
					SQL=Rs.GetRows(MaxRows)
			For i=0 To Ubound(SQL,2)

		Call WordConst()

		Next

			Response.Write "<SCRIPT>PageList("&Page&",10,"&MaxRows&","&CountNum&",""Action=WordEnd"",1);</SCRIPT>"
		Else
			Response.Write "<tr><td class=TableBody1 Height=25 align=center colspan=3><Font Color=red>数据库内暂时无法找到您的留言内容</Font></td></tr>"
		End If
			Rs.Close
		Set Rs=Nothing


	Response.Write "</Table>"
End Sub

Sub WordNot()
		XiaoLu.PageConst(5)
		Dvbbs.stats="未回复留言"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
		XiaoLu.LogChannel()
		
		SQL="Select * from [Dv_LuZiPlus_Log] Where Manipulator='"&XiaoLu.UserName&"' And ClassId=10 order by ID desc"
	
			Set Rs = Server.CreateObject ("adodb.recordset")
			If Cint(Dvbbs.Forum_Setting(92))=1 Then
				If Not IsObject(Plus_Conn) Then Plus_ConnectionDatabase
				Rs.Open Sql,Plus_Conn,1,1
			Else
				If Not IsObject(Conn) Then ConnectionDatabase
				Rs.Open Sql,conn,1,1
			End If 


			If Not (Rs.Eof And Rs.Bof) Then
				CountNum = Rs.RecordCount
					If CountNum Mod MaxRows=0 Then
						Endpage = CountNum \ MaxRows
					Else
						Endpage = CountNum \ MaxRows+1
					End If
				Rs.MoveFirst
				If Page > Endpage Then Page = Endpage
					If Page < 1 Then Page = 1
						If Page >1 Then 				
							Rs.Move (Page-1) * MaxRows
						End if
					SQL=Rs.GetRows(MaxRows)
			For i=0 To Ubound(SQL,2)

		Call WordConst()

		Next

			Response.Write "<SCRIPT>PageList("&Page&",10,"&MaxRows&","&CountNum&",""Action=WordNot"",1);</SCRIPT>"
		Else
			Response.Write "<tr><td class=TableBody1 Height=25 align=center colspan=3><Font Color=red>数据库内暂时无法找到您的留言内容</Font></td></tr>"
		End If
			Rs.Close
		Set Rs=Nothing


	Response.Write "</Table>"
End Sub

Sub WordConst()
	Response.Write "<table border=0 cellspacing=1 cellpadding=3  align=center class=tableBorder1>"
	Response.Write "<tr><td height=25 class=tablebody2 colspan=3>"

	Response.Write "<table width=""100%"" border=0 cellpadding=0 cellspacing=0>"
	Response.Write "<tr>"
	Response.Write "<td Width=*>标题：（"&Trim(SQL(1,i))&"）<u>"
	
		if Len(SQL(11,i)) > 50 Then
			Response.write ""&left(XiaoLu.Checkstr(Trim(SQL(11,i))),30)&" ....... "&Right(XiaoLu.Checkstr(Trim(SQL(11,i))),8)&"[长]"
		Else
			Response.Write ""&SQL(11,i)&""
		End If

	Response.Write "</u></td>"
	Response.Write "<td Width=""30%"" align=Right>"

	Response.Write "</td></tr></table>"
	
	Response.Write "<tr><td height=25 class=tablebody1 colspan=3>"
	
	Response.Write "<div style=""overflow : auto ;padding:4px 20px 4px 20px;height:50px;line-height:20px;text-align : left;border:1px inset;background-color: #fff;"">"
	Response.Write ""&XiaoLu.Checkstr(Trim(SQL(2,i)))&""
	Response.Write "</Div>"
		
		If Len(XiaoLu.Checkstr(Trim(SQL(12,i)))) => 2 Then
			Response.Write "<div style=""overflow : auto ;padding:4px 20px 4px 20px;height:40px;line-height:20px;text-align : left;border:1px inset;background-color: #fff;"">"
			Response.Write "<Font Color=Red><u>"&SQL(1,i)&"</u>的回复:"&XiaoLu.HTMLCode(XiaoLu.Checkstr(Trim(SQL(12,i))))&"</Font>"
			Response.Write "</Div>"
		End If
	

	Response.Write "<div class=info Align=Right>编号："&SQL(0,i)&""

	Response.Write " 留言时间："&SQL(5,i)&"</div>"

	Response.Write "<tr><th height=5></th></tr>"
	
	Response.Write "</td></tr></Table>"
End Sub


Sub EPgConst()
	Response.Write "<table border=0 cellspacing=1 cellpadding=3  align=center class=tableBorder1>"
	Response.Write "<tr><td height=25 class=tablebody2 colspan=3>"

	Response.Write "<table width=""100%"" border=0 cellpadding=0 cellspacing=0>"
	Response.Write "<tr>"
	Response.Write "<td Width=*>操作对象："&Trim(SQL(1,i))&"[涉及金币:"&SQL(8,i)&"]"

				Response.Write " 日志状态:["
			If Cint(SQL(6,i)) = 5 Or Cint(SQL(6,i)) = 8 Then

				Response.Write "<Font Color=Blue>审核已通过</Font>"

			ElseIf Cint(SQL(6,i)) = 6 Or Cint(SQL(6,i)) = 9 Then

				Response.Write "<Font Color=Red>审核已拒绝</Font>"
			ElseIf Cint(SQL(6,i)) = 4 Or Cint(SQL(6,i)) = 7 Then
				Response.Write "<Font Color=Red>未审核</Font>"
			End If
				Response.Write "]"
	
	Response.Write "</td>"
	Response.Write "<td Width=""30%"" align=Right>"&SQL(5,i)&""

	Response.Write "</td></tr></table>"
	
	Response.Write "<tr><td height=25 class=tablebody1 colspan=3>"
	
	Response.Write "<div style=""overflow : auto ;padding:4px 20px 4px 20px;height:30px;line-height:20px;text-align : left;border:1px inset;background-color: #fff;"">"
	Response.Write "内容:"&XiaoLu.HTMLCode(XiaoLu.Checkstr(Trim(SQL(2,i))))&""
	Response.Write "</Div>"
		
		If Len(XiaoLu.Checkstr(Trim(SQL(11,i)))) => 2 Then
			Response.Write "<div style=""overflow : auto ;padding:4px 20px 4px 20px;height:30px;line-height:20px;text-align : left;border:1px inset;background-color: #fff;"">"
			Response.Write "<Font Color=Red><u>"&SQL(1,i)&"</u>的回复:"&XiaoLu.HTMLCode(XiaoLu.Checkstr(Trim(SQL(11,i))))&"</Font>"
			Response.Write "</Div>"
		End If
	
	Response.Write "<tr><th height=5></th></tr>"
	
	Response.Write "</td></tr></Table>"
End Sub


'//奖励部分
Sub UserEg()	
	Set Rs=Dvbbs.Plus_Execute("select * from [Dv_LuZiOffice_User] where UserName = '"&Request("Name")&"' ")

		If XiaoLu.UserName = Rs("UserName") Then

			ErrCodes=ErrCodes + "<li>" + "非法进入。"
			Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"

		Else
			Dvbbs.stats="奖励填写"
			Dvbbs.LoadTemplates("")
			Dvbbs.Nav()
			Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
			XiaoLu.LogChannel()
				Response.Write "<br /><table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1>"
				Response.Write "<form name=SignIn method=post action=""?Action=EgSave"">"
				Response.Write "<tr><th height=25 colspan=2 align=left>我要奖励 "&Request("Name")&" 版主</th></tr>"
				Response.Write "<td class=tablebody1 height=25 width=""50%"" Valign=top>"
				Response.Write "<u>奖励原由</u>：<br />请写清楚为什么要奖励此版主.</td>"
				Response.Write "<td class=tablebody1 height=25 width=""50%"">"			
				Response.Write "<textarea name=UserAction cols=55 rows=3></textarea>"
				Response.Write "</td></tr>"
				Response.Write "<tr><td class=tablebody2 height=25 width=""50%"" Valign=top>"
				Response.Write "<u>给于奖励</u>：<br />填写奖励金币的数量.</td>"
				Response.Write "<td class=tablebody2 height=25 width=""50%"">"			
				Response.Write "<input name=UserG type=text size=4 /> 个金币"
				Response.Write "</td></tr>"
				Response.Write "<tr><td class=tablebody1 height=25 width=""50%"" Valign=top>"
				Response.Write "<u>显示选择</u>：<br />选择是否告诉对方您的用户名称.</td>"
				Response.Write "<td class=tablebody1 height=25 width=""50%"">"
				Response.Write "<input type=radio name=UserRemark value=1  /> 愿意 <input type=radio name=UserRemark value=0 checked /> 不愿意"
				Response.Write "</td></tr><tr>"
				Response.Write "<td class=tablebody2 height=25 width=""50%"" Valign=top></td>"
				Response.Write "<td class=tablebody2 height=25 width=""50%"">"
				Response.Write "<input name=""Manipulator"" type=""hidden"" value="&XiaoLu.UserName&" />"
				Response.Write "<input name=""UserName"" type=""hidden"" value="&Request("Name")&" />"
				Response.Write "<input name=""ClassId"" type=""hidden"" value=4 />"
				Response.Write "<input type=submit name=Submit1 value="" 填写完毕 , 提交"" />"
				Response.Write "</td></tr></Form></table>"
	End If
End Sub

Sub EgSave()

	If Not (isNumeric(Request("UserG"))) Then

		ErrCodes=ErrCodes + "<li>" + "输入的奖励金币值必须是整数"
		Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"

	ElseIf Request("UserAction") = "" Then

		ErrCodes=ErrCodes + "<li>" + "[奖励原由] 不能为空,否则系统不允许提交"
		Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"

	Else

		Dvbbs.stats="奖励版主"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
		
		Set Rs=Dvbbs.Plus_Execute("insert into [Dv_LuZiPlus_Log](ClassId,UserName,UserAction,UserG,UserRemark,Manipulator) Values('"&request("ClassId")&"','"&request("UserName")&"','"&request("UserAction")&"','"&request("UserG")&"','"&request("UserRemark")&"','"&request("Manipulator")&"')")

		Dvbbs.Dvbbs_Suc("<li>奖励资料提交成功,等待管理员的审核......</li>")
	End If
End Sub

Sub UserPg()


	Set Rs=Dvbbs.Plus_Execute("select * from [Dv_LuZiOffice_User] where UserName = '"&Request("Name")&"' ")

		Dim UserName
		UserName = ""&Rs("UserName")&""

		If XiaoLu.UserName = UserName Then

			ErrCodes=ErrCodes + "<li>" + "非法进入。"
			Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"

		Else
			Dvbbs.stats="投诉版主"
			Dvbbs.LoadTemplates("")
			Dvbbs.Nav()
			Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
			XiaoLu.LogChannel()
			'//投诉部分
			Response.Write "<br /><table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1>"
			Response.Write "<form name=SignIn method=post action=""?Action=PgSave"">"
			Response.Write "<tr><th height=25 colspan=2 align=left>我要投诉 "&Rs("UserName")&" 版主</th></tr>"
			Response.Write "<td class=tablebody1 height=25 width=""50%"" Valign=top>"
			Response.Write "<u>投诉原由</u>：<br />请写清楚为什么投诉此版主,以便管理员进行调查.</td>"
			Response.Write "<td class=tablebody1 height=25 width=""50%"">"			
			Response.Write "<textarea name=UserAction cols=45 rows=3></textarea>"
			Response.Write "</td></tr>"
			Response.Write "<tr><td class=tablebody2 height=25 width=""50%"" Valign=top>"
			Response.Write "<u>给于扣除</u>：<br />填写扣除金币的数量.</td>"
			Response.Write "<td class=tablebody2 height=25 width=""50%"">"			
			Response.Write "<input name=UserG type=text size=4 /> 个金币"
			Response.Write "</td></tr>"
			Response.Write "<tr><td class=tablebody1 height=25 width=""50%"" Valign=top>"
			Response.Write "<u>显示选择</u>：<br />选择是否告诉对方您的用户名称."
			Response.Write "</td><td class=tablebody1 height=25 width=""50%"">"			
			Response.Write "<input type=radio name=UserRemark value=1  /> 愿意 <input type=radio name=UserRemark value=0 checked /> 不愿意"
			Response.Write "</td></tr><tr>"
			Response.Write "<td class=tablebody2 height=25 width=""50%"" Valign=top></td>"
			Response.Write "<td class=tablebody2 height=25 width=""50%"">"			
			Response.Write "<input name=""Manipulator"" type=""hidden"" value="&XiaoLu.UserName&" />"
			Response.Write "<input name=""UserName"" type=""hidden"" value="&UserName&" />"
			Response.Write "<input name=""ClassId"" type=""hidden"" value=7 />"
			Response.Write "<input type=submit name=Submit1 value="" 填写完毕 , 提交"" />"
			Response.Write "</td></tr></Form></table>"
		End If
End Sub

Sub PgSave()

		If Not (isNumeric(Request("UserG"))) Then
			ErrCodes=ErrCodes + "<li>" + "输入的投诉金币值必须是整数"
			Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
		ElseIf Request("UserAction") = "" Then
			ErrCodes=ErrCodes + "<li>" + "[投诉原由] 不能为空,否则系统不允许提交"
			Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
		Else
			Dvbbs.stats="投诉提交"
			Dvbbs.LoadTemplates("")
			Dvbbs.Nav()
			Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
			Set Rs=Dvbbs.Plus_Execute("insert into [Dv_LuZiPlus_Log](ClassId,UserName,UserAction,UserG,UserRemark,Manipulator) Values('"&request("ClassId")&"','"&request("UserName")&"','"&request("UserAction")&"','"&request("UserG")&"','"&request("UserRemark")&"','"&request("Manipulator")&"')")
			Dvbbs.Dvbbs_Suc("<li>投诉资料提交成功,等待管理员的审核......</li>")
		End If
	
End Sub


Sub UserleaveWord()

	Set Rs=Dvbbs.Plus_Execute("select * from [Dv_LuZiOffice_User] where UserName = '"&Request("Name")&"' ")

		Dim UserName
		UserName = ""&Rs("UserName")&""

		If XiaoLu.UserName = UserName Then

			ErrCodes=ErrCodes + "<li>" + "非法进入。"
			Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"

		Else
			Dvbbs.stats="填写留言"
			Dvbbs.LoadTemplates("")
			Dvbbs.Nav()
			Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
			XiaoLu.LogChannel()
			'//留言部分
			Response.Write "<br /><table border=0 cellpadding=3 cellspacing=1 align=center class=Tableborder1>"
			Response.Write "<form name=SignIn method=post action=""?Action=LeaveWordSave"">"
			Response.Write "<tr><th height=25 colspan=2 align=left>我要 "&Rs("UserName")&" 版主留言</th></tr>"			
			Response.Write "<tr><td class=tablebody1 height=25 width=""50%""><u>留言标题</u></td>"
			Response.Write "<td class=tablebody1 height=25 width=""50%"">"		
			Response.Write "<input name=UserTitle type=text size=25 />"
			Response.Write "</td></tr><tr>"
			Response.Write "<td class=tablebody2 height=25 width=""50%"" Valign=top>"
			Response.Write "<u>留言内容</u>：<br />请详细填写清楚留言内容."			
			Response.Write "</td>"
			Response.Write "<td class=tablebody2 height=25 width=""50%"">"		
			Response.Write "<textarea name=UserAction cols=45 rows=3></textarea>"
			Response.Write "</td></tr><tr>"
			Response.Write "<td class=tablebody1 height=25 width=""50%"" Valign=top>"
			Response.Write "<u>显示选择</u>：<br />选择是否告诉对方您的用户名称."			
			Response.Write "</td>"
			Response.Write "<td class=tablebody1 height=25 width=""50%"">"			
			Response.Write "<input type=radio name=UserRemark value=1  /> 愿意 <input type=radio name=UserRemark value=0 checked /> 不愿意"
			Response.Write "</td></tr><tr>"
			Response.Write "<td class=tablebody2 height=25 width=""50%"" Valign=top></td>"
			Response.Write "<td class=tablebody2 height=25 width=""50%"">"
			Response.Write "<input name=""Manipulator"" type=""hidden"" value="&XiaoLu.UserName&" />"
			Response.Write "<input name=""UserName"" type=""hidden"" value="&UserName&" />"
			Response.Write "<input name=""ClassId"" type=""hidden"" value=10 />"			
			Response.Write "<input type=submit name=Submit1 value="" 填写完毕 , 提交"" />"
			Response.Write "</td></tr></table>"
		End If
End Sub

Sub LeaveWordSave()

	If Request("UserAction") = "" Then

		ErrCodes=ErrCodes + "<li>" + "[留言内容] 不能为空,否则系统不允许提交"
		Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
	ElseIf Request("UserTitle") = "" Then

		ErrCodes=ErrCodes + "<li>" + "[留言标题] 不能为空,否则系统不允许提交"
		Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"

	Else
		Dvbbs.stats="版主留言"
		Dvbbs.LoadTemplates("")
		Dvbbs.Nav()
		Dvbbs.Head_var 0,0,"管理团队","Plus_ForumOffice_Team.Asp"
	
		Set Rs=Dvbbs.Plus_Execute("insert into [Dv_LuZiPlus_Log](UserTitle,ClassId,UserName,UserAction,UserRemark,Manipulator) Values('"&request("UserTitle")&"','"&request("ClassId")&"','"&request("UserName")&"','"&request("UserAction")&"','"&request("UserRemark")&"','"&request("Manipulator")&"')")
		'//短信通知
		Set Rs=Dvbbs.Execute("insert into dv_message(sender,incept,title,content,sendtime,issend) values('办公室' , '"&Request("UserName")&"' , '留言信息' ,  '您有新的留言信息，请点击： [URL=Plus_ForumOffice_Index.asp?Action=Suggestion]我的留言本[/URL] 查看。' , '"&now()&"' , '1')")
		Dvbbs.Dvbbs_Suc("<li>版主留言提交成功,等待版主给您回复......</li>")

	End If
End Sub
%>