⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 z_bank.asp

📁 功能强大的一个b/s工作站
💻 ASP
📖 第 1 页 / 共 5 页
字号:
						sql2="select * from [message]"      
						rs2.open sql2,conn,1,3      
						rs2.addnew      
						rs2("sender")="银行行长"      
						rs2("incept")=rs(1)      
						rs2("title")="社区银行给您奖励"+cstr(money)+"元"      
						rs2("content")="社区很行给于您"+cstr(money)+"元奖励。奖励理由:"+liyou      
						rs2("flag")=0      
						rs2("issend")=1      
						rs2.update      
						rs2.close      
					rs.movenext      
            	loop      
             end if      
		else      
			
        	classuser=checkStr(trim(request.form("username")))
        	set rs=server.createobject("adodb.recordset")      
     		sql="select userwealth,username from [user] where username='"&classuser&"'"      
     		rs.open sql,conn,1,3 
			if rs.bof and rs.eof then
				Errmsg=Errmsg+"<br>"+"<li>论坛上没有["&classuser&"]这个用户"
				call bank_err()
				rs.close
				exit sub
			end if					     
        	rs(0)=rs(0)+money       
        	rs.update      
				set rs2=server.createobject("adodb.recordset")      
				sql2="select * from [message]"      
				rs2.open sql2,conn,1,3      
				rs2.addnew      
				rs2("sender")="银行行长"      
				rs2("incept")=rs(1)      
				rs2("title")="社区银行给您奖励"+cstr(money)+"元"      
				rs2("content")="社区很行给于您"+cstr(money)+"元奖励。奖励理由:"+liyou  
				rs2("flag")=0      
				rs2("issend")=1      
				rs2.update      
				rs2.close      
end if      
rs.close      
     set rs=server.createobject("adodb.recordset")      
     sql="select * from [bbsnews]"      
     rs.open sql,conn,1,3      
        rs.addnew      
        rs("boardid")=0      
     	if  classid=20 then      
        	rs("title")="银行奖励所有管理员"  
			content="奖励所有管理员"    
     	elseif classid=19 then      
        	rs("title")="银行奖励所有贵宾" 
			content="奖励所有贵宾"      
        elseif classid=18 then      
        	rs("title")="银行奖励所有超级版主"  
			content="奖励所有超级版主"       
        elseif classid=17 then      
        	rs("title")="银行奖励所有版主"      
			content="奖励所有版主"   
        elseif classid=1 then      
        	rs("title")="银行奖励所有会员"      
			content="奖励所有会员"   
        else
			classuser=checkStr(trim(request.form("username")))
        	rs("title")="银行奖励用户 "&classuser     
			content="奖励用户" &classuser		
		end if      
        rs("content")="奖励理由:"+liyou      
        rs("username")="银行行长"      
        rs.update      
        rs.close
		
		if cint(log_setting(0))=1 and cint(log_setting(3))=1 then
			content=content&" " &money&" 元,奖励理由:"+liyou
			call logs("管理","银行管理中心",membername)
			sucmsg=sucmsg+"<br>"+"<li>您的操作信息已经记录在案"
		end if
				  
	   sucmsg=sucmsg+"<br>"+"<li>您已经完成了奖励会员的操作,请返回"
	   call bank_suc()       
end sub 

sub savelogsetting() 
'我来了 2002.12.01   保存事件设置
'logstate logfuwu logrecordcount logadmin loguse logminmoney  loguselook
	if not master then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>您没有进入银行基本设置的权限。"      
	else
		if request.form("logrecordcount")="" or (not isnumeric(request.form("logrecordcount"))) then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>保存最新事件条数必须为数字"
		elseif request.form("logrecordcount")<0 then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>保存最新事件条数不能为负数"			
		end if	 
		if request.form("logminmoney")="" or (not isnumeric(request.form("logminmoney"))) then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>记录储户事件(银行事件)的限制金额必须为数字" 
		elseif request.form("logminmoney")<0 then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>记录储户事件(银行事件)的限制金额不能为负数"		
		end if	
	end if	
	if founderr then      
		call bank_err()
	else
		dim log_settings
		log_settings=request.Form("logstate") & "," & request.Form("logfuwu")& "," & request.Form("logrecordcount")& "," & request.Form("logadmin")& "," & request.Form("loguse")& "," & request.Form("logminmoney")& "," & request.Form("loguselook")
		conn1.execute("update bankconfig set log_setting='"&log_settings&"'")
		
		if cint(log_setting(0))=1 and cint(log_setting(3))=1 then
			content="修改事件设置"
			call logs("管理","银行管理中心",membername)
			sucmsg=sucmsg+"<br>"+"<li>您的操作信息已经记录在案"
		end if
				
		sucmsg=sucmsg+"<br>"+"<li>银行事件设置完成,请返回进行其他操作"
		call bank_suc()		  
	end if      
end sub

'----------------------------浏览银行事件------------------------------------------------
sub banklog()
'我来了 2002.12.01   查看事件记录
	if (not master) and cint(log_setting(6))=0 then   
		Errmsg=Errmsg+"<br>"+"<li>您没有浏览银行事件记录的权限,请与管理员联系"   
		call bank_err()      
		exit sub
	end if
	
	if clng(log_setting(2))<>0 then        '如果指定保留最新的N条事件,则删除多余的事件记录
		conn1.execute("delete from log where id not in (select top "&clng(log_setting(2))&" id from log order by id desc)")
	end if
		      
	if request("action")="dellog" then
		call batch()
	else
		call logeven()
	end if
	if founderr then call bank_err()
end sub
sub logeven()
'我来了 2002.12.01   显示事件		
	dim endpage
	dim totalrec
	dim n
	dim currentpage,page_count,Pcount
		
	currentPage=request("page")
	if currentpage="" or not isInteger(currentpage) then
		currentpage=1
	else
		currentpage=clng(currentpage)
	end if	
	if master then
		response.write "<div align=center>管理员请点击操作时间切换到管理状态</div>"
		response.write "<div align=center>管理状态下点击操作者查看该操作者的所有事件</div>"
	else
		response.write "<div align=center>浏览银行操作事件记录</div>"
	end if
	response.write "<div align=center>点击具体的类型可以浏览相同类型的操作事件记录</div>"
%>	
	<form action=Z_bank.asp?menu=13&action=dellog method=post name=even>
	<table cellpadding=3 cellspacing=1 align=center class=tableborder1 style="width:97%"> 
		<tr>
			<th width=5% height=25>类型</th>
			<th width=15%>标题</th>
			<th width=50% id=tabletitlelink>事件内容(<a href=Z_bank.asp?menu=13 title=点击查看全部事件>查看全部事件</a>)</th>
			<th width=20% id=tabletitlelink><a href=Z_bank.asp?menu=13&action=batch&page=<%=currentpage%> title=点击切换到管理状态>操作时间</a></th>
			<th width=10%>操作人</th> 
		</tr>
<%
	set rs=server.createobject("adodb.recordset")
	if request("reaction")="银行" then
		sql="select * from log where class='银行' order by DateAndTime desc"
	elseif request("reaction")="服务" then
		sql="select * from log where class='服务' order by DateAndTime desc"
	elseif request("reaction")="管理" then	
		sql="select * from log where class='管理' order by DateAndTime desc"
	elseif request("reaction")="操作者" and trim(request("name"))<>"" then	
		sql="select * from log where UserName='"&checkStr(trim(request("name")))&"' order by DateAndTime desc"		
	else		
		sql="select * from log order by DateAndTime desc" 
	end if	
	'response.Write(sql)
	rs.open sql,conn1,1,1
	if rs.bof and rs.eof then
		response.write "<tr><td class=tablebody1 colspan=5 height=25>暂时没有任何事件</td></tr></table><br>"
	else
		rs.PageSize = Forum_Setting(11)
		rs.AbsolutePage=currentpage
		page_count=0
      	totalrec=rs.recordcount
		while (not rs.eof) and (not page_count = rs.PageSize)
			response.write "<tr>"
			response.write "<td class=tablebody1 align=center height=24><a href=Z_bank.asp?menu=13&reaction="&rs("class")&" title=""点击查看所有["&rs("class")&"]事件"">"&rs("class")&"</a></td>"
			response.write "<td class=tablebody1>"&htmlencode(rs("title"))&"</td>"
			response.write "<td class=tablebody1>"&rs("content")&"</td>"
			response.write "<td class=tablebody1>"
			if request("action")="batch" and master then
				response.write "<input type=checkbox name=lid value="&rs("id")&">"
			end if
			response.write rs("DateAndTime")
			response.write "</td>"
			response.write "<td align=center class=tablebody1>"
			if master then
				if request("action")="batch" then
					response.write "<a href=Z_bank.asp?menu=13&reaction=操作者&name="&htmlencode(rs("UserName"))&" title=""操作者IP:"&rs("IP")&"[点击查看该操作者的所有操作记录]"">"
				else
					response.write "<a href=dispuser.asp?name="&htmlencode(rs("UserName"))&" target=_blank title=""操作者IP:"&rs("IP")&"[点击查看操作者的资料]"">"			
				end if
			else
				response.write "<a href=dispuser.asp?name="&htmlencode(rs("UserName"))&" target=_blank>"
			end if
			response.write htmlencode(rs("UserName"))&"</a></td>"	
			response.write "</tr>"
			page_count = page_count + 1
			rs.movenext
		wend
								
		if request("action")="batch" and master then
			response.write "<tr><td class=tablebody2 colspan=5>请选择要删除的事件,<input type=checkbox name=chkall value=on onclick=""CheckAll(this.form)"">全选 <input type=submit name=Submit value=执行  onclick=""{if(confirm('您确定执行的操作吗?')){this.document.even.submit();return true;}return false;}""></td></tr>"
		end if
		response.write "</table>"
		
		if totalrec mod Forum_Setting(11)=0 then
				Pcount= totalrec \ Forum_Setting(11)
		else
				Pcount= totalrec \ Forum_Setting(11)+1
		end if
		response.write "<table border=0 cellpadding=0 cellspacing=3 width=""97%"" align=center>"
		response.write "<tr><td valign=middle nowrap>"
		response.write "页次:<b>"&currentpage&"</b>/<b>"&Pcount&"</b>页"
		response.write "&nbsp;每页<b>"&Forum_Setting(11)&"</b> 总数<b>"&totalrec&"</b></td>"
		response.write "<td valign=middle nowrap align=right>分页:"
		if currentpage > 4 then
			if request("reaction")="操作者" then
				response.write "<a href=""?menu=13&reaction=操作者&name="&request("name")&"&page=1"">[1]</a> ..."
			else
				response.write "<a href=""?menu=13&page=1"">[1]</a> ..."
			end if 
		end if
		if Pcount>currentpage+3 then
			endpage=currentpage+3
		else
			endpage=Pcount
		end if
		for i=currentpage-3 to endpage
			if not i<1 then
				if i = clng(currentpage) then
					response.write " <font color="&Forum_body(8)&">["&i&"]</font>"
				else
					if request("reaction")="操作者" then
						response.write "<a href=""?menu=13&reaction=操作者&name="&request("name")&"&page="&i&""">["&i&"]</a>"
					else
						response.write " <a href=""?menu=13&page="&i&""">["&i&"]</a>"
					end if 				
					
				end if
			end if
		next
		if currentpage+3 < Pcount then 
			response.write "... <a href=""?menu=13&page="&Pcount&""">["&Pcount&"]</a>"
		end if
		response.write "</td></tr></table>"
	end if	
	rs.close
	set rs=nothing		
end sub
sub batch()
	dim lid
	if not founduser then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>请登陆后进行操作。"
	end if
	if not master then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>您不是系统管理员,不能管理所有日志。"
	end if

	if request.form("lid")="" then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>请指定相关事件。"
	else
		lid=replace(request.Form("lid"),"'","")
	end if
	if founderr then exit sub
	conn1.execute("delete from log where id in ("&lid&")")
	
	if cint(log_setting(0))=1 and cint(log_setting(3))=1 then
		content="删除指定事件"
		call logs("管理","银行事件管理",membername)
		sucmsg=sucmsg+"<br>"+"<li>您的操作信息已经记录在案"
	end if	
	
	sucmsg="<li>删除指定事件成功"
	call bank_suc()
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -