本程序采用ACC数据核心构件!! 功能介绍: 程序代码重新设计与优化

源代码在线查看: admin_sql.asp

软件大小: 1066 K
上传用户: guigui2008q
关键词: ACC 程序 数据 代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
				
				
				
								Server.ScriptTimeout	=500						
				Action					= Request("Action")
				dbSql="../database/klfsd#SqlIn.asa" '防注入程序数据库路径。如果路径变动,请修改此处。
				
				dim conn,connstr 
				'On Error Resume Next
				Set conn = Server.CreateObject("ADODB.Connection")
				connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbsql)
				conn.Open connstr
				If Err Then
					err.Clear
					Set conn = Nothing
					Response.Write "数据库连接出错,请检查连接字串。"
					Response.End
				End If
				
				If Action="del" Then
					Call Delip()
				ElseIf Action="lock" Then
					Call lockIP()
				ElseIf Action="ulock" Then
					Call ulockip()
				Else
					Call Main()
				End If
				
				Sub Delip()
				dim id 
				id = clng(request("id"))
				conn.execute("delete from SqlIn where id="&id)
				Call Main()
				End sub
				
				Sub Lockip()
				id = clng(request("id"))
				conn.execute("update SqlIn set Kill_ip=true where id="&id)
				Call Main()
				End sub
				
				Sub ulockip()
				id = clng(request("id"))
				conn.execute("update SqlIn set Kill_ip=False where id="&id)
				Call Main()
				End sub
				
				Sub Main()
				%>
				
				
				
				
				
				
				
				
				
								sql="select * from SqlIn order by id desc"
				set rs=server.createobject("adodb.recordset")
				rs.open sql,conn,1,1
				if rs.eof and rs.bof then
				response.write "暂无内容"
				else
				'分页的实现 
				listnum=10
				Rs.pagesize=listnum
				page=Request("page")
				if (page-Rs.pagecount) > 0 then
				page=rs.pagecount
				elseif page = "" or page < 1 then
				page = 1
				end if
				rs.absolutepage=page
				'编号的实现
				j=rs.recordcount
				j=j-(page-1)*listnum
				i=0
				nn=request("page")
				if nn="" then
				n=0
				else
				nn=nn-1
				n=listnum*nn
				end if%>
				
				编号
				操作IP
				状态
				页面
				时间
				方式
				参数
				数据
				操作
				
								n=n+1%>
				
				
				
											response.write "已锁定"
						else
							response.write "未锁定"
						end if
					%>
				
				
				
				
				
				删除 
				 							response.write "锁定IP"
						else
							response.write "解锁IP"
						end if
					%> 
				
								i=i+1 
				j=j-1
				loop%>
				
				
				 条记录   条记录/页  共  页 
				      
				      
				      |				      				      []
				      []
					  
				      []
				      >>
				      
				>>|
				    
				 
				
				
				
				Copyright (c) 2005-2006 XunCms.Cn. All Rights Reserved .
				
				
				Powered by:讯图设计 XunCms Version 3.0.0 SP1
				
				
				
				
								end sub
				%>
							

相关资源