KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/mguerinweb/Offline_Archive/DBAdmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/mguerinweb/Offline_Archive/DBAdmin/ocdFreeInit.asp
<%
'1 Click DB copyright 1997-2002 David Kawliche, AccessHelp.net

'1 Click DB technology is fully protected by international
'laws and treaties.  Never use, distribute, or redistribute
'any software and/or source code in violation of its licensing.

'Use of this software and/or source code is strictly at your own risk.
'All warranties are specifically disclaimed except as required by law.

'IMPORTANT : THIS CODE USES PASS-THROUGH SECURITY !
'
'To enforce application security, set logins and permissions
'for all web server and database users as appropriate.
'
'Use object and configuration properties _only_ to customize 
'application appearance and interactions with other components. 

'For more information see : http://1ClickDB.com
        
'**Start Encode**

option explicit

Response.Buffer = True

response.clear


'Constants
Const ocdNoFrames = 1
Const ocdNoCookies = 16
Const ocdNoJavascript = 256

dim ocdFormNullToken, ocdQuotePrefix, ocdQuoteSuffix, ocdBrandText, ocdBrandLogo, ocdDBTimeout, ocdShowCheckedSearchFields, ocdForceExportDownload, ocdMaxURLLength, ocdAllowExport, ocdReadOnly, ocdDisableTextDriver, ocdAdminPassword, ocdUseCustomEditPages, ocdMultipleFieldSort, ocdDefaultTextCompare, ocdSessionTimeout, ocdShowDefaults, ocdLaunchPage, ocdHeaderHTML, ocdFooterHTML, ocdADOConnection, ocdADOUsername, ocdADOPassword, ocdShowRelatedRecords, ocdSelectForeignKey, ocdCompatibility, ocdMaxURL, ocdComputeTimeOut, ocdHomeAddress, ocdStartTime, ocdEndTime, ocdGridHighlightSelected, ocdDebug, ocdCodePage, ocdCharset, ocdStyleSheet, ocdPageSizeDefault, ocdSessionLCID
'initialize defaults for global variables
ocdSessionLCID = 0
%>
<!--#INCLUDE FILE=FreeConfig.asp-->
<%
'Configure these before compiling release:
'on error resume next 'uncomment for all editions
ocdDebug = False
ocdAppVersion = "4.202115"

dim ocdUseSQLRPC, ocdPageName, ocdIsDemo, ocdDatabaseType, ocdIsHome, ocdIsODBC, ocdDBMSVersion, ocdQSForNoCookie, ocdAppVersion, ocdTestConn, ndnscSQLConnect, ndnscSQLUser, ndnscSQLPass, ndnscCompatibility
ocdUseSQLRPC = True
ocdPageName = mid(Request.ServerVariables("PATH_INFO"),instrRev(Request.ServerVariables("PATH_INFO"),"/") + 1)

'BEGIN SESSION CHECKS
if Not CBool(ocdCompatibility and ocdNoCookies) then
	Select Case Cstr(request.servervariables("server_software"))
		Case "Microsoft-IIS/5.0","Microsoft-IIS/5.1"
			Session.CodePage = ocdCodePage
	End Select
	Session.Timeout = ocdSessionTimeout
	If ocdSessionLCID = 0 Then
		ocdSessionLCID = session.lcid
	Else
		session.lcid = ocdSessionLCID
	End if
	if ocdAdminPassword <> "" Then 'Check for session password
		if Session("ocdAdminAuthorized") = "" and UCASE(ocdPageName) <> "FREELOGON.ASP" and UCase(ocdPageName) <> "FREEHELP.ASP" Then
			Session("ocdSQLConnect") = ""
			Session("ocdSQLUser") = ""
			Session("ocdSQLPass") = ""
			Session("ocdCompatibility") = ""
			response.redirect "freelogon.asp"
		End if
	End if
End if
if ocdADOConnection <> "" Then
	ndnscSQLConnect = ocdADOConnection
	ndnscSQLUser = ocdADOUsername
	ndnscSQLPass = ocdADOPassword
	if UCASE(ocdPageName) = "FREECONNECT.ASP" Then
		response.redirect "FreeSchema.asp"
	End if
Else
	ndnscSQLConnect = Session("ocdSQLConnect")
	ndnscSQLUser = Session("ocdSQLUser")
	ndnscSQLPass = Session("ocdSQLPass")
End if

'END SESSION CHECKS

if ocdADOConnection <> ""  THen
	ocdLaunchPage = ""
End if
IF Request.ServerVariables("LOCAL_ADDR") = ocdHomeAddress Then
	ocdIsHome = True
	ocdDisableTextDriver = True
Else
	ocdIsHome = False
End if
if  (ocdBrandText = "") Then
	ocdBrandText = "1 Click DB"
End if
if (ocdBrandLogo = "") Then
	ocdBrandLogo = ocdBrandLogo & "<A HREF=""http://1clickdb.com/kb/"" "
	ocdBrandLogo = ocdBrandLogo & "target=""_blank"""
	ocdBrandLogo = ocdBrandLogo & " style=""cursor:help"">"
	ocdBrandLogo = ocdBrandLogo & "<STRONG><EM>1 Click DB Free "
	ocdBrandLogo = ocdBrandLogo & "</em></STRONG>"
	ocdBrandLogo = ocdBrandLogo & "</a>"
End if
ocdFooterHTML = ""
ocdFooterHTML = ocdFooterHTML & "<SPAN CLASS=Notice> - powered by  open source </SPAN><A HREF=""http://1ClickDB.com/""  style=""cursor:help""><SPAN CLASS=Notice>1&nbsp;Click&nbsp;DB</SPAN></A> <SPAN CLASS=Notice>"
ocdFooterHTML = ocdFooterHTML &	("&nbsp;" & ocdAppVersion & " software&nbsp;&copy;1997-2002&nbsp;AccessHelp.net&nbsp;Custom&nbsp;Solutions</SPAN>")
'Set response Headers
'Prevent pages from being cached, disable for browse exports to overcome SSL incompatibility
response.charset = ocdcharset
if  UCASE(ocdPageName) <> "FREEBROWSE.ASP" or (UCASE(ocdPageName) = "FREEBROWSE.ASP" and request.querystring("ocdExportFormat_A") = "") Then
	response.Expires = 0
	response.ExpiresAbsolute = Now() - 1
	response.addHeader "pragma","no-cache"
	response.addHeader "cache-control","private"
	Response.CacheControl = "no-cache" 
	Server.ScriptTimeOut = 240
Else 'just set longer timeout for exports
	Server.ScriptTimeOut = 3600
End if
'End set response headers
ocdQSForNoCookie = ""
ocdQUotePrefix = """"
ocdQUoteSuffix = """"
if ndnscCompatibility = "" Then
	ndnscCompatibility = 0
End if
Select Case UCASE(ocdPageName) 
	Case "FREECONNECT.ASP"
	Case "FREEBROWSE.ASP","FREESCHEMA.ASP","FREEEDIT.ASP" 'need to know DB Properties
		if ndnscSQLConnect= "" Then
			response.redirect ("FreeConnect.asp")
		End if
		set ocdTestConn = server.CreateObject("ADODB.Connection")
		ocdTestConn.Mode = 1 'adMode
		call ocdTestConn.Open (ndnscSQLConnect , ndnscSQLUser , ndnscSQLPass)
		if err <>0 then
			call writeheader("NOCONNECT")
			call writefooter("")
		end if
		
		Select Case UCASE(ocdTestConn.Provider)
			Case "ADSDSOOBJECT"
				ocdDatabaseType = "ADSI"
			Case Else
				Select Case UCASE(ocdTestConn.Properties("DBMS Name")) 
					Case "MS SQL SERVER", "MICROSOFT SQL SERVER"
						ocdDatabaseType = "SQLServer"
						ocdDBMSVersion = 7
					Case "MYSQL"
						ocdDatabaseType = "MySQL"
						ocdQuoteSuffix = "`"
						ocdQuotePrefix = "`"
					Case "MS JET", "ACCESS"
						ocdDatabaseType = "Access"
						ocdQuoteSuffix = "]"
						ocdQuotePrefix = "["
					Case "TEXT"
						if ocdDisableTextDriver Then
							Call writeheader("")
							Call writefooteR( "Text Driver Disabled")
							response.end
						End if
					Case Else
						If instr(UCASE(ocdTestConn.Properties("DBMS Name")),"ORAC") =0 Then
							ocdDatabaseType = "Unknown"
						Else
							ocdDatabaseType = "Oracle"
						End if
				End Select
		End Select
		if ocdTestConn.Provider = "MSDASQL.1" Then
			ocdIsODBC = True
		End if
		ocdTestConn.close
		set ocdTestConn = nothing
End Select
sub WriteHeader ( ocdAppStatus )
	response.write (vbCRLF  & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF  & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF & vbCRLF )
	response.write ("<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & vbCRLF )
	response.write ( "<HTML>" & vbCRLF & "<HEAD>" & vbCRLF & "<meta HTTP-EQUIV=""Expires"" CONTENT=""Thu, 01 Dec 1994 16:00:00 GMT"">" & vbCRLF & "<meta HTTP-EQUIV=""Pragma"" CONTENT=""no-cache"">" & vbCRLF & "<meta http-equiv=""Content-Type"" content=""text/html; charset=" & ocdCharSet & """>" & vbCRLF)
	If UCase(ocdPageName) = "FREECONNECT.ASP"  Then
		response.write ("<META http-equiv=""Page-Enter"" CONTENT=""RevealTrans(Duration=.1,Transition=12)"">") & vbCRLF
	End if
	response.write ("<TITLE>" & ocdBrandText & " @ http://" & Request.Servervariables("SERVER_NAME") & "</TITLE>" & vbCRLF)
	response.write ("<LINK rel=stylesheet type=""text/css"" href=""" & ocdStyleSheet & """>" & vbCRLF )
	Select Case UCase(ocdPageName) 
		Case "GENERATOR.ASP","FREECONNECT.ASP"
		Case Else
			if not CBool(CInt(ndnscCompatibility) and ocdNoJavaScript) Then
				response.write ("<SCRIPT TYPE=""text/javascript"" LANGUAGE=""JavaScript"">" & vbCRLF)
				response.write ("  <!--" & vbCRLF)
				response.write ("    function ocdstopError() {" & vbCRLF)
				response.write ("	    return true;" & vbCRLF)
				response.write ("    }" & vbCRLF)
				response.write ("    window.onerror = ocdstopError;" & vbCRLF)
				if ((UCase(ocdPageName) = "BROWSE.ASP" and UCase(request.querystring("ocdGridMode_A")) <> "FILTER"and UCase(request.querystring("ocdGridMode_A")) <> "SEARCH" and UCase(request.querystring("ocdGridMode_A")) <> "PROCESS") or ( UCase(ocdPageName) = "COMMAND.ASP")AND Request("sqltext") <> "" ) THen
					Response.write "	if (parseInt(navigator.appVersion) >= 4) {" & vbCRLF
					Response.write "		document.write('<DIV ID=""loading"" onClick=""FinishLoad()""><TABLE CLASS=Loading><TR><TD ALIGN=CENTER VALIGN=MIDDLE NOWRAP><SPAN CLASS=Information>"
					Response.write "Retrieving Data..."
					Response.write "<\/SPAN><\/TD> <\/TR><\/TABLE><\/DIV>');" & vbCRLF
					Response.write "	}" & vbCRLF
					Response.write "	function FinishLoad() {" & vbCRLF
					response.write "		if (parseInt(navigator.appVersion) >= 4) {" & vbCRLF
					Response.write "		// ALT1: if (document.layers) use netscape" & vbCRLF
					Response.write "		// ALT2: if (document.all) {" & vbCRLF
					Response.write "   		// return document.all[id].style;" & vbCRLF
					Response.write "  		//} else if(document.layers) {'use netscape" & vbCRLF
					Response.write "  		//  return document.layers[id];" & vbCRLF
					Response.write "  		//}" & vbCRLF
					Response.write "			if (navigator.appName == ""Netscape"") {" & vbCRLF
					Response.write "				document.loading.visibility = 'hide';" & vbCRLF
					Response.write "			}" & vbCRLF
					Response.write "			else {" & vbCRLF
					Response.write "			document.all.loading.style.visibility = 'hidden';" & vbCRLF
					Response.write "			}" & vbCRLF
					Response.write "		}" & vbCRLF
					Response.write "		}" & vbCRLF
					if request.querystring("ndreloadtime") <> "" and request.querystring("ndreloadtime") <> "0" and request.querystring("ndreloadaction") <> "Stop" Then
						if isnumeric(request.querystring("ndreloadtime")) then
							response.write ("setTimeout(""reload()"",")
							response.write (CLng(1000 * CLng(request.querystring("ndreloadtime"))))
							response.write (");" & vbCRLF)
						end if
					End if
					Response.write "function reload() {" & vbCRLF
Response.write "location.href = location.href" & vbCRLF
Response.write "}" & vbCRLF
				End if
				response.write ("  // -->" & vbCRLF)
				response.write ("</script>" & vbCRLF)
			End if
	End Select
	response.write ( "</HEAD>" & vbCRLF & "<BODY")
	if ((UCase(ocdPageName) = "BROWSE.ASP" and UCase(request.querystring("ocdGridMode_A")) <> "FILTER"and UCase(request.querystring("ocdGridMode_A")) <> "SEARCH" and UCase(request.querystring("ocdGridMode_A")) <> "PROCESS") or ( UCase(ocdPageName) = "COMMAND.ASP")AND Request("sqltext") <> "" ) THen
		response.write (" onLoad=""javascript:FinishLoad()"" ")
	End if
	response.write (">")

	call writetopmenu()

	response.write (vbCRLF & "<HR>" & vbCRLF)
	
End sub

sub WriteFooter( ocdAppStatus )
	Select case ocdAppStatus 
		Case ""
			Select case err.number
				Case 0
				Case Else
					response.write DrawDialogBox ("warning","Warning Processing Request","<P><SPAN CLASS=Warning>" & Cstr(err.number) & "&nbsp;&nbsp;" & Cstr(err.description) & "</SPAN></P><P>Use your browser's back button to continue or try submitting your request again.")
			End Select		
		Case Else
			response.write DrawDialogBox ("warning","Warning Processing Request","<P>" & ocdAppStatus & "</P><P>Use your browser's back button to continue.")
	End select

	response.write ("<P ALIGN=LEFT><SPAN CLASS=Notice>")

	
	response.write (CStr(Now()))
	response.write (" @ ")
	response.write (request.servervariables("SERVER_NAME"))

	Response.write "</SPAN>  "
	response.write "  "
	
	response.write ""
	response.write ocdFooterHTML
	response.write "</P>"
	response.write "</BODY></HTML>"
	Response.Flush
	Response.clear
	Response.End
end sub
sub writetopmenu()
	dim strATarget
	dim strBTarget
	strATarget="_self"
	strBTarget="_self"
	%>
	<TABLE BORDER="0"><TR><TD VALIGN="MIDDLE">&nbsp;</td><%
	if  (ocdAdminPassword <> "") Then
%><TD VALIGN="MIDDLE"><A HREF="FreeLogon.asp" ><IMG SRC="appStart.gif" BORDER="0" WIDTH="18" HEIGHT="18" ALT="Start"></A></TD><TD VALIGN="MIDDLE"><A CLASS="Menu" HREF="FreeLogon.asp">Start</A></TD><TD>&nbsp;</td><%
End if
if  ocdADOConnection = ""  Then

%><TD VALIGN="MIDDLE"><A HREF="FreeConnect.asp" target="<%=strATarget%>"><IMG SRC="AppConnect.GIF" BORDER="0" WIDTH=18 HEIGHT=18 ALT="Connect to Database"></A></TD><TD VALIGN="MIDDLE"><A CLASS="Menu" HREF="FreeConnect.asp" target="<%=strATarget%>">Connect</A></TD><TD>&nbsp;</TD><%else
end if


if ndnscSQLConnect <> "" Then%><TD VALIGN="MIDDLE"><A HREF="freeschema.asp?show=tables"><IMG SRC="AppTable.gif" BORDER="0" WIDTH="18" HEIGHT="18" ALT="Tables"></A></TD><TD VALIGN="MIDDLE"><A CLASS="Menu" HREF="freeschema.asp?show=tables">Tables</A></TD><TD>&nbsp;</TD>

<TD VALIGN="MIDDLE"><A HREF="freeschema.asp?show=views"><IMG SRC="AppView.gif" BORDER="0" WIDTH="18" HEIGHT="18" ALT="Views"></A></TD><TD VALIGN="MIDDLE"><A CLASS="Menu" HREF="freeschema.asp?show=views">Views</A></TD>
<%end if%>
<TD VALIGN="MIDDLE"><A HREF="freehelp.asp"  style="cursor:help" ><IMG SRC="AppHelp.gif" BORDER="0" WIDTH="18" HEIGHT="18" ALT="Help"></A></TD><TD VALIGN="MIDDLE"><A CLASS="Menu" HREF="freehelp.asp?" style="cursor:help">Help</A></TD><TD ALIGN=RIGHT WIDTH="100%" NOWRAP><%=ocdBrandLogo%></td></TR></TABLE>
<%
end sub
function DrawDialogBox (strType, strCaption, strInfo)
	dim strTemp
	strTemp = "<P ALIGN=CENTER><TABLE "
'	Select Case UCase(strType)
'		Case "WARNING"
			strTemp = strTemp & " WIDTH=""50%"" "
'	End Select
	strTemp = strTemp & "CLASS=""DialogBox""><TR><TH Class=DialogBoxHeader NOWRAP ALIGN=LEFT>" & strCaption & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TH><TR CLASS=DialogBoxRow><TD VALIGN=TOP>"
	select Case UCASE(strType)
		Case "WARNING"
			strTemp = strTemp & "<TABLE><TR><TD VALIGN=TOP><IMG SRC=""AppWarning.gif"" border=0 ALT=""Warning""></td><TD>&nbsp;</td><TD VALIGN=TOP>"
			strTemp = strTemp & strInfo
			strTemp = strTemp & "</TD></TR></TABLE>"
			strTemp = strTemp & "</TD></TR></TABLE></P>"
		Case "DIALOG_START"
		Case "DIALOG_END"
				strTemp = "</TD></TR></TABLE>"
		Case Else
			strTemp = strTemp & strInfo
			strTemp = strTemp & "</TD></TR></TABLE>"
	End Select

	DrawDialogBox = strTemp
end function
%>

Anon7 - 2021