<!-- #include file="../conn.asp" -->
<!-- #include file="../cls_main.asp" -->
<% MyDbPath = "../"
dim obj
set obj = New admin_Database
	obj.AspInit()
set obj = nothing

Class admin_Database
	Private isEdit, y, ishion
	Private Sub Class_Initialize()
		Set ishion = New Cls_Main
	End Sub
	Private Sub Class_Terminate()
		Set ishion = Nothing
	End Sub
	Public Sub AspInit()
	Server.ScriptTimeout = 9999999
		Response.Write "<HTML><HEAD><TITLE>数据库管理</TITLE>" & vbCrLf
		Response.Write "<META http-equiv=Content-Type content=""text/html; charset=gb2312"">" & vbCrLf
		Response.Write "<LINK href=""admin.css"" type=text/css rel=stylesheet>" & vbCrLf
		Response.Write "</HEAD>" & vbCrLf
		Response.Write "<BODY leftmargin=""1"" topmargin=""1"">" & vbCrLf
		Call ishion.LoadSetting()
		If ishion.adminName = "" Then
			ishion.strMsg = "<li>非法操作：登录超时或你没有以管理员身份登录系统，<a href=""../admin_login.asp"" target=_top>点此进入管理员登录界面</a>。"
			Call ishion.SystemMsg
		ElseIf ishion.checkPermission(ishion.adminName, "54") = False Then
			ishion.strMsg = "<li>非法操作：你没有权限进行此项操作，请联系管理员！"
			Call ishion.SystemMsg
		Else
			Call Main
		End If
		Response.Write "</BODY></HTML>" & vbCrLf
	
	End Sub

	Private Sub Main()
		Select Case Request("action")
		Case "accessBackup"
			Call accessBackup
		Case "accessRestore"
			Call accessRestore
		Case "accessCompact"
			Call accessCompact
		Case "sqlBackup"
			Call sqlBackup
		Case "sqlRestore"
			Call sqlRestore
		Case "executesql"
			Call ExecuteSQL
		Case Else
			If IsSqlDataBase = 1 Then
				Call sqlMain
				Call ExecuteSQlMain
			Else
				Call accessMain
				Call ExecuteSQlMain
			End If
		End Select
	End Sub
	Private Sub accessBackup()
		
		Dim Dbpath,bakName,bakDir,fso
		bakName = Trim(Request.Form("bakName"))
		Dbpath = Server.MapPath(MyDbPath & db)
		bakDir = Trim(Request.Form("bakDir"))
		Set fso = Server.CreateObject(ishion.Setting(23))
		if fso.fileexists(Dbpath) then
			If CheckDir(bakDir) = True Then
				fso.copyfile dbpath,bakDir& "\"& bakName
			else
				MakeNewsDir bakDir
			fso.copyfile dbpath,bakDir& "\"& bakName
			end if
			ishion.strMsg = "备份数据库成功，您备份的数据库路径为：" &bakDir& "\"& bakName
		Else
			ishion.strMsg = "找不到您所需要备份的文件。"
		End if
		Call ishion.SystemMsg()
	End Sub
	'------------------检查某一目录是否存在-------------------
	Private Function CheckDir(FolderPath)
		dim fso1
		Set fso1 = CreateObject(ishion.Setting(23))
		If fso1.FolderExists(FolderPath) then
		   '存在
		   CheckDir = True
		Else
		   '不存在
		   CheckDir = False
		End if
		Set fso1 = nothing
	End Function
	'-------------根据指定名称生成目录-----------------------
	Function MakeNewsDir(foldername)
		
		dim f,fso1
		Set fso1 = CreateObject(ishion.Setting(23))
			Set f = fso1.CreateFolder(foldername)
			MakeNewsDir = True
		Set fso1 = nothing
	End Function
	Private Sub accessRestore()
			Dim ResPath,BakPath
			ResPath = Request.form("ResPath")
			BakPath = Request.form("BakPath")
			If BakPath = "" or BakPath = "" then
				Response.write "请输入您要恢复成的数据库全名"
				Exit Sub
			end if		
			Set Fso=server.createobject(ishion.Setting(23))
			if fso.fileexists(BakPath) then  					
				fso.copyfile BakPath,ResPath
				ishion.strMsg = "成功恢复数据！"
			else
				ishion.strMsg = "备份目录下并无您的备份文件！"	
			end if
			Set Fso = Nothing
			Call ishion.SystemMsg
			
	End Sub
	
	Private Sub accessCompact()
		dim fso,dbPath,boolIs97,Engine
		boolIs97 = Request.Form("boolIs97")
		dbPath = Request.Form("dbPath")
		Set Fso=server.createobject(ishion.Setting(23))
		if fso.fileexists(dbPath) then  					
			fso.copyfile dbPath,Replace(dbPath,".mdb","")&"_OK.mdb"
			
			Set Engine = CreateObject("JRO.JetEngine")
			If boolIs97 = "True" Then
				Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Replace(dbPath,".mdb","")&"_OK.mdb", _
				"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Replace(dbPath,".mdb","")&"_OK.mdb" & "_temp.mdb;" _
				& "Jet OLEDB:Engine Type=" & JET_3X
			Else
				Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Replace(dbPath,".mdb","")&"_OK.mdb", _
				"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Replace(dbPath,".mdb","")&"_OK.mdb" & "_temp.mdb"
			End If
			fso.CopyFile Replace(dbPath,".mdb","")&"_OK.mdb" & "_temp.mdb",Replace(dbPath,".mdb","")&"_OK.mdb"
			fso.DeleteFile(Replace(dbPath,".mdb","")&"_OK.mdb" & "_temp.mdb")
			ishion.strMsg = "压缩数据操作完成！压缩后的数据库为："&Replace(dbPath,".mdb","")&"_OK.mdb"			
		else
			ishion.strMsg = "没有找到指定的数据库文件！"	
		end if
		Set fso = nothing

		Call ishion.SystemMsg
	End Sub

	Private Sub ExecuteSQL()
		ishion.Execute (Request.Form("SQLStr"))
		ishion.strMsg = "执行SQL语句操作完成。"
		Call ishion.SystemMsg
	End Sub
	Private Sub sqlBackup()
		Dim FileName, sqlserver, sqluserid, sqlpassword, sqlLoginTimeout, databasename
		FileName = Request.Form("filename")
		sqlserver = Request.Form("sqlServer")
		sqluserid = Request.Form("sqlUserID")
		sqlpassword = Request.Form("sqlPassword")
		databasename = Request.Form("DatabaseName")
		sqlLoginTimeout = 15
		If FileName <> "" And sqlserver <> "" And sqluserid <> "" And sqlpassword <> "" And databasename <> "" Then
			Dim srv, bak
			Set srv = Server.CreateObject("SQLDMO.SQLServer")
			srv.LoginTimeout = sqlLoginTimeout
			srv.Connect sqlserver, sqluserid, sqlpassword
			Set bak = Server.CreateObject("SQLDMO.Backup")
			bak.Database = databasename
			bak.Devices = Files
			bak.Files = Server.MapPath(FileName)
			bak.sqlBackup srv
			If Err.Number > 0 Then
				ishion.strMsg = Err.Number & "<font color=red><br>" & Err.Description & "</font>"
				Set srv = Nothing
				Set bak = Nothing
				Call ishion.SystemMsg
				Exit Sub
			End If
			ishion.strMsg = "<li><font color=green>备份成功！</font><li><a href=""" & FileName & """>点击此处下载备份文件：" & FileName & "</a>"
			Set srv = Nothing
			Set bak = Nothing
			Call ishion.SystemMsg
		Else
			ishion.strMsg = "请将数据库相关项目填写完整！"
			Call ishion.SystemMsg
		End If
	End Sub

	Private Sub sqlRestore()
		Dim FileName, sqlserver, sqluserid, sqlpassword, sqlLoginTimeout, databasename
		FileName = Request.Form("filename")
		sqlserver = Request.Form("sqlServer")
		sqluserid = Request.Form("sqlUserID")
		sqlpassword = Request.Form("sqlPassword")
		databasename = Request.Form("DatabaseName")
		sqlLoginTimeout = 15
		If FileName <> "" And sqlserver <> "" And sqluserid <> "" And sqlpassword <> "" And databasename <> "" Then
			Dim srv, rest
			Set srv = Server.CreateObject("SQLDMO.SQLServer")
			srv.LoginTimeout = sqlLoginTimeout
			srv.Connect sqlserver, sqluserid, sqlpassword
			Set rest = Server.CreateObject("SQLDMO.Restore")
			rest.Action = 0 ' full db restore
			rest.Database = databasename
			rest.Devices = Files
			rest.Files = Server.MapPath(FileName)
			rest.ReplaceDatabase = True 'Force restore over existing database
			If Err.Number > 0 Then
				ishion.strMsg = Err.Number & "<font color=red><br>" & Err.Description & "</font>"
				Set srv = Nothing
				Set rest = Nothing
				Call ishion.SystemMsg
				Exit Sub
			End If
			rest.sqlRestore srv
			ishion.strMsg = "<font color=green>恢复成功！</font>"
			Set srv = Nothing
			Set rest = Nothing
			Call ishion.SystemMsg
		Else
			ishion.strMsg = "请将数据库相关项目填写完整！"
			Call ishion.SystemMsg
		End If
	End Sub
	Private Sub sqlMain()
		Response.Write "<table width=""100%""  border=""0"" cellpadding=""3"" cellspacing=""1"">" & vbCrLf
		Response.Write "<form action=""admin_Database.asp"" name=""Database"" method=""post"">" & vbCrLf
		Response.Write "<input name=""action"" type=""hidden"" value=""sqlBackup"">" & vbCrLf
		Response.Write "  <tr align=""center"" class=""tdbg2"">" & vbCrLf
		Response.Write "    <td colspan=""2"">数据库备份操作（SQLServer）</td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg3"">" & vbCrLf
		Response.Write "    <td align=""right"">备份文件的路径和文件名：</td>" & vbCrLf
		Response.Write "    <td><input name=""filename"" type=""text"" size=""65"" maxlength=""150"" value=""../dataBackup/" & DelHtml(ishion.FormatMyDate(Now(), "{Y}-{d}-{d}_{h}{mi}{s}")) & ".bak""></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">SQL服务器：</td>" & vbCrLf
		Response.Write "    <td><input name=""sqlServer"" type=""text"" size=""65"" maxlength=""150"" value=""(local)""></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">SQL用户名：</td>" & vbCrLf
		Response.Write "    <td><input name=""sqlUserID"" type=""text"" size=""65"" maxlength=""150""  value=""" & sqlUserName & """></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">SQL密码：</td>" & vbCrLf
		Response.Write "    <td><input name=""sqlPassword"" type=""password"" size=""65"" maxlength=""150"" value=""" & sqlPassword & """></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">数据库名称：</td>" & vbCrLf
		Response.Write "    <td><input name=""DatabaseName"" type=""text"" size=""65"" maxlength=""150"" value=""" & sqlDatabaseName & """></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg3"">" & vbCrLf
		Response.Write "    <td>&nbsp;</td>" & vbCrLf
		Response.Write "    <td><input type=""submit"" name=""Submit"" value=""执行操作""></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "</form>" & vbCrLf
		Response.Write "<form action=""admin_Database.asp"" name=""Database"" method=""post"">" & vbCrLf
		Response.Write "<input name=""action"" type=""hidden"" value=""sqlRestore"">" & vbCrLf
		Response.Write "  <tr align=""center"" class=""tdbg2"">" & vbCrLf
		Response.Write "    <td colspan=""2"">数据库还原操作（SQLServer）</td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg3"">" & vbCrLf
		Response.Write "    <td align=""right"">还原文件的路径和文件名：</td>" & vbCrLf
		Response.Write "    <td><input name=""filename"" type=""text"" size=""65"" maxlength=""100"" value=""../dataBackup/{填写备份文件名}""></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">SQL服务器：</td>" & vbCrLf
		Response.Write "    <td><input name=""sqlServer"" type=""text"" size=""65"" maxlength=""150"" value=""(local)""></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">SQL用户名：</td>" & vbCrLf
		Response.Write "    <td><input name=""sqlUserID"" type=""text"" size=""65"" maxlength=""150"" value=""" & sqlUserName & """></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">SQL密码：</td>" & vbCrLf
		Response.Write "    <td><input name=""sqlPassword"" type=""password"" size=""65"" maxlength=""150"" value=""" & sqlPassword & """></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">数据库名称：</td>" & vbCrLf
		Response.Write "    <td><input name=""DatabaseName"" type=""text"" size=""65"" maxlength=""150"" value=""" & sqlDatabaseName & """></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg3"">" & vbCrLf
		Response.Write "    <td>&nbsp;</td>" & vbCrLf
		Response.Write "    <td><input type=""submit"" name=""Submit"" value=""执行操作""></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "</form>" & vbCrLf
		Response.Write "</table>" & vbCrLf
	End Sub
	Private Sub accessMain()
		Response.Write "<table width=""100%""  border=""0"" cellpadding=""3"" cellspacing=""1"">" & vbCrLf
		Response.Write "  <form action=""admin_Database.asp"" name=""Database"" method=""post"">" & vbCrLf
		Response.Write "    <input name=""action"" type=""hidden"" value=""accessBackup"">" & vbCrLf
		Response.Write "    <tr align=""center"" class=""tdbg2"">" & vbCrLf
		Response.Write "      <td colspan=""2""><b>数据库备份操作（Access）</b></td>" & vbCrLf
		Response.Write "    </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg3"">" & vbCrLf
		Response.Write "    <td align=""right"">当前数据库路径(相对)：</td>" & vbCrLf
		Response.Write "    <td><input name=""db"" type=""text"" size=""65"" maxlength=""100"" value="""&Server.MapPath(MyDbPath & db)&"""></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">备份数据库目录(相对)：</td>" & vbCrLf
		Response.Write "    <td><input name=""bakDir"" type=""text"" size=""65"" maxlength=""100"" value="""&Server.MapPath("../dataBackup/")&"""> 如目录不存在，程序将自动创建</td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg3"">" & vbCrLf
		Response.Write "    <td align=""right"">备份数据库名称：</td>" & vbCrLf
		Response.Write "    <td><input name=""bakName"" type=""text"" size=""65"" maxlength=""100"" value=""" & DelHtml(ishion.FormatMyDate(Now(), "{Y}-{d}-{d}_{h}{mi}{s}")) & ".mdb""> </td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "    <tr class=""tdbg2"">" & vbCrLf
		Response.Write "      <td  colspan=""2"">　　您可以用这个功能来备份您的常规数据，以保证您的数据安全！<br>　　注意：所有路径都是相对与程序空间根目录的相对路径</td>" & vbCrLf
		Response.Write "    </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg3"">" & vbCrLf
		Response.Write "    <td>&nbsp;</td>" & vbCrLf
		Response.Write "    <td><input type=""submit"" name=""Submit"" value=""执行操作""></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  </form>" & vbCrLf
		Response.Write "  <form action=""admin_Database.asp"" name=""Database"" method=""post"">" & vbCrLf
		Response.Write "    <input name=""action"" type=""hidden"" value=""accessRestore"">" & vbCrLf
		Response.Write "    <tr align=""center"" class=""tdbg2"">" & vbCrLf
		Response.Write "      <td colspan=""2""><b>数据库还原操作（Access）</b></td>" & vbCrLf
		Response.Write "    </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td align=""right"">备份数据库路径(相对)：</td>" & vbCrLf
		Response.Write "    <td><input name=""BakPath"" type=""text"" size=""65"" maxlength=""150"" value=""" & Server.MapPath("../dataBackup/") & "\"">　请填写备份数据库文件名</td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg3"">" & vbCrLf
		Response.Write "    <td align=""right"">目标数据库路径(相对)：</td>" & vbCrLf
		Response.Write "    <td><input name=""ResPath"" type=""text"" size=""65"" maxlength=""150"" value=""" & Server.MapPath(MyDbPath & db) & """></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "    <tr class=""tdbg2"">" & vbCrLf
		Response.Write "      <td  colspan=""2"">　　填写您当前使用的数据库路径，如不想覆盖当前文件，可自行命名（注意路径是否正确），然后修改conn.asp文件，如果目标文件名和当前使用数据库名一致的话，不需修改conn.asp文件。</td>" & vbCrLf
		Response.Write "    </tr>" & vbCrLf
		Response.Write "    <tr class=""tdbg3"">" & vbCrLf
		Response.Write "      <td>&nbsp;</td>" & vbCrLf
		Response.Write "      <td><input type=""submit"" name=""Submit"" value=""执行操作""></td>" & vbCrLf
		Response.Write "    </tr>" & vbCrLf
		Response.Write "  </form>" & vbCrLf
		Response.Write "  <form action=""admin_Database.asp"" name=""Database"" method=""post"">" & vbCrLf
		Response.Write "    <input name=""action"" type=""hidden"" value=""accessCompact"">" & vbCrLf
		Response.Write "    <tr align=""center"" class=""tdbg2"">" & vbCrLf
		Response.Write "      <td colspan=""2""><b>数据库压缩操作（Access）</b></td>" & vbCrLf
		Response.Write "    </tr>" & vbCrLf
		Response.Write "    <tr class=""tdbg3"">" & vbCrLf
		Response.Write "      <td colspan=""2""><b>注意：</b>输入数据库所在相对路径,并且输入数据库名称<br>压缩数据库： <input type=""text"" name=""dbpath"" value="""&Server.MapPath(MyDbPath & db)&""" size=""65"" maxlength=""150""><input type=""submit"" name=""Submit"" value=""开始压缩""><br><input type=""checkbox"" name=""boolIs97"" value=""True"">如果使用 Access 97 数据库请选择，(默认为 Access 2000 数据库)</td>" & vbCrLf
		Response.Write "    </tr>" & vbCrLf
		Response.Write "  </form>" & vbCrLf
		Response.Write "</table>" & vbCrLf
	End Sub
	Private Sub ExecuteSQlMain()
		Response.Write "<table width=""100%""  border=""0"" cellpadding=""3"" cellspacing=""1"">" & vbCrLf
		Response.Write "  <form action=""admin_Database.asp"" name=""Database"" method=""post"">" & vbCrLf
		Response.Write "    <input name=""action"" type=""hidden"" value=""executesql"">" & vbCrLf
		Response.Write "    <tr align=""center"" class=""tdbg2"">" & vbCrLf
		Response.Write "      <td colspan=""2"">执行SQL语句操作</td>" & vbCrLf
		Response.Write "    </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg3"">" & vbCrLf
		Response.Write "    <td align=""right"">SQL语句：</td>" & vbCrLf
		Response.Write "    <td><textarea name=""SQLStr"" cols=""65"" rows=""7"" id=""SQLStr""></textarea></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "    <tr class=""tdbg2"">" & vbCrLf
		Response.Write "      <td>&nbsp;</td>" & vbCrLf
		Response.Write "      <td><input type=""submit"" name=""Submit"" value=""执行操作"" onclick=""{if(confirm('您确定执行的操作吗?')){this.document.myform.submit();return true;}return false;}""></td>" & vbCrLf
		Response.Write "    </tr>" & vbCrLf
		Response.Write "  </form>" & vbCrLf
		Response.Write "</table>" & vbCrLf
	End Sub
	
	


    Public Function DbExists(ByVal dbPath)
        ''查找数据库文件是否存在
        On Error Resume Next
        Dim c
        Set c = Server.CreateObject("ADODB.Connection")
        c.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath
        If Err.Number <> 0 Then
            Err.Clear
            DbExists = False
        Else
            DbExists = True
        End If
        Set c = Nothing
    End Function

    Public Function AppPath()
    ''取当前真实路径
        AppPath = Server.MapPath("./")
    End Function

    Public Function AppName()
        ''取当前程序名称
        AppName = Mid(Request.ServerVariables("SCRIPT_NAME"), (InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/", -1, 1)) + 1, Len(Request.ServerVariables("SCRIPT_NAME")))
    End Function

    Public Function DeleteFile(filespec)
    ''删除一个文件
        Dim fso
        Set fso = CreateObject(ishion.Setting(23))
        If Err.Number <> 0 Then
            Response.Write ("删除文件发生错误!请查看错误信息" & Err.Number & " " & Err.Description)
            Err.Clear
            DeleteFile = False
        End If
        Call fso.DeleteFile(filespec)
        Set fso = Nothing
        DeleteFile = True
    End Function

    Public Function RenameFile(filespec1, filespec2)
    ''修改一个文件
        Dim fso
        Set fso = CreateObject(ishion.Setting(23))
        If Err.Number <> 0 Then
            Response.Write ("修改文件名时发生错误!请查看错误信息" & Err.Number & " " & Err.Description)
            Err.Clear
            RenameFile = False
        End If
        Call fso.CopyFile(filespec1, filespec2, True)
        Call fso.DeleteFile(filespec1)
        Set fso = Nothing
        RenameFile = True
    End Function

    Public Function DelHtml(strHtml)
        Dim strPatrn
            strPatrn = "<.*?>"
        Dim regEx
        Set regEx = New RegExp
        regEx.Pattern = strPatrn
        regEx.IgnoreCase = True
        regEx.Global = True
        DelHtml = regEx.Replace(strHtml, "")
        Set regEx = Nothing
    End Function
	Public Sub OnEndPage()
		Response.Write ishion.CopyRight
	End Sub ' OnEndPage


End Class %>

