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

📄 inc_debug.asp

📁 1] 校友多种方式注册认证[直接注册,答问注册,认证注册] 2] 校友论坛 小巧而实用的论坛,支持UBB标签,快速回复,帖子搜索,灵活的将帖子置顶,设置精华 3] 校友相册 相片上传[方便上传
💻 ASP
字号:
<%

'===================================================================
'= ASP FILENAME	: /inc/inc_debug.asp
'= CREATED TIME : Oct,06,2004
'= LAST MODIFIED: Oct,06,2004
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION  : Debug
'= Change Log:
'===================================================================
'===================================================================
'= Function    : ShowDBDebug() 
'= Time	       : Created At Oct,06,2004
'= Input       : None
'= Description : show db debug
'===================================================================
Function ShowDBDebug(objDB)
	Dim strHtmlCode
	Dim i
	Dim TotalTime
	Dim TotalRs

	TotalTime = 0
	TotalRs = 0

	If  IsObject(objDB) Then
		strHtmlCode = "<table border=0 cellspacing=1 cellpadding=0 width=100% style='background:#828284;word-break: break-all'>"
		strHtmlCode = strHtmlCode & "<tr width=100%  style='background:#666699;height:30px;Color:White'>"
		strHtmlCode = strHtmlCode & "<th width=10% >Oprt</th><th width=60% >SQL</th><th width=10% >Affected</th><th width=10% >Error</th><th width=10% >Time(Ms)</th></tr>"

		For i = Lbound(objDB.arrDBDebug) To UBound(objDB.arrDBDebug)
			If Not IsEmpty(objDB.arrDBDebug(i,1)) Then
				TotalTime = TotalTime + objDB.arrDBDebug(i,4)
				TotalRs = TotalRs + objDB.arrDBDebug(i,2)
				strHtmlCode = strHtmlCode & "<tr  style='background:#EEEEEE;Height:25;Text-Align:center'>"
				strHtmlCode = strHtmlCode & "<td >" & objDB.arrDBDebug(i,0) & "</td>"
				strHtmlCode = strHtmlCode & "<td >" & objDB.arrDBDebug(i,1) & "</td>"
				strHtmlCode = strHtmlCode & "<td >" & objDB.arrDBDebug(i,2) & "</td>"
				strHtmlCode = strHtmlCode & "<td >" & objDB.arrDBDebug(i,3) & "</td>"
				strHtmlCode = strHtmlCode & "<td >" & objDB.arrDBDebug(i,4) & "</td>"
				strHtmlCode = strHtmlCode & "</tr>"
			End If
		Next

		strHtmlCode = strHtmlCode & "<tr width=100% style='background:#EEEEEE;Height:25;Text-Align:center'>"
		strHtmlCode = strHtmlCode & "<td width=100% colspan=5 align=center>Total Affected Record:"
		strHtmlCode = strHtmlCode & TotalRs
		strHtmlCode = strHtmlCode & ",Total Execute Time:"
		strHtmlCode = strHtmlCode & TotalTime & "Ms</td></tr></table>"
		GBL_strDBDebug = strHtmlCode
	End If

	If  GBL_strDBDebug <> "" Then
		Response.Write GBL_strDBDebug
	End If

End Function

'== 错误调试
Function ShowErrorDebug()
	Response.Write "Error Id = " & GBL_objException.getErrId()
	Response.Write "Error Info = " & GBL_objException.getErrInfo()
End Function


'== 显示环境变量
Function ShowEnv()
	Dim strHeader, strFooter,Item
	strHeader = "<table border=0 cellspacing=1 align=center cellpadding=0 width=80% style='background:#828284;word-break: break-all'>"
	strFooter = "</table>"
	Response.Write("<p align=center> Cookies </p>" & strHeader)

	For Each Item In Request.Cookies 
		Response.Write("<tr style='background:#EEEEEE;Height:25;Text-Align:center'><td style='background:#666699;height:25px;Color:White' width=30% >" & Item & "</td><td >" & Request.Cookies(Item) & "</td>")
	Next

	Set Item = Nothing

	Response.Write(strFooter & "<p align=center> Server vars</p>" & strHeader)
	For Each Item In Request.servervariables
		Response.Write("<tr style='background:#EEEEEE;Height:25;Text-Align:center'><td style='background:#666699;height:25px;Color:White' width=30% >" & Item & "</td><td>" & Request.ServerVariables(Item) & "</td></tr>")
	Next

	Response.Write(strFooter & "<p align=center>Session contents</p>" & strHeader)

	For Each Item In Session.contents
		Response.Write("<tr style='background:#EEEEEE;Height:25;Text-Align:center'><td style='background:#666699;height:25px;Color:White' width=30% >" & Item & "</td><td>" & Session(item) & "</td></tr>")
	Next

	Response.write(strFooter & "<p align=center>Application contents</p>" & strHeader)
	For Each Item In Application.contents
		If IsObject(Application(Item)) Or IsArray(Application(Item)) Then
			Response.Write("<tr style='background:#EEEEEE;Height:25;Text-Align:center'><td style='background:#666699;height:25px;Color:White' width=30% >" & Item & "</td><td>" & "Object Or Array" & "</td></tr>")
		Else
			Response.Write("<tr style='background:#EEEEEE;Height:25;Text-Align:center'><td style='background:#666699;height:25px;Color:White' width=30% >" & Item & "</td><td>" & Application(Item) & "</td></tr>")
		End If
	Next


End Function


%>

⌨️ 快捷键说明

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