|
<%If Not IsObject(Conn) Then
CreateConn = True%>
<%
Response.Expires = 0
ScriptName = Request.ServerVariables("SCRIPT_NAME")
GenericErrorMessage = "An unexpected error occurred while processing your request.\r\rPlease try again later."
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Replace(Server.MapPath("/"), "\www", "\db") & "\Almstead.mdb"
'Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=D:\Websites\DLFwebgroup\Production\almsteadcom\db\Almstead.mdb"
If Len(Session("EmployeeID")) < 1 And UCase(Left(ScriptName, 6)) = "/ADMIN" AND UCase(ScriptName) <> "/ADMIN/LOGIN.ASP" Then
Session("Alert") = "Please log in to continue."
Response.Write ""
Response.End
End If
Function FixStr(strInput)
strInput = Replace(strInput, "'", "''")
'strInput = Replace(strInput, Chr(34), """)
FixStr = strInput
End Function
Function CheckInt(intInput)
If IsNull(intInput) Or Len(intInput) = 0 Or Not IsNumeric(intInput) Then
CheckInt = 0
Else
CheckInt = CInt(intInput)
End If
End Function
Function IsEmail(Email)
If Len(Email) > 0 Then
IsEmail = False
Set RegEx = New RegExp
RegEx.Pattern ="^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$"
RegEx.IgnoreCase = True
IsEmail = RegEx.Test(Email)
Set RegEx = Nothing
Else
IsEmail = False
End If
End Function
Function FormatFileName(FileName)
FileName = Mid(Filename, InstrRev(Filename, "\") + 1)
FileName = Replace(FileName, " ", "")
FileName = Replace(FileName, "-", "_")
FileName = Replace(FileName, "/", "_")
FileName = Replace(FileName, Chr(34), "")
FileName = Replace(FileName, "'", "")
FormatFileName = FileName
End Function
Sub Close_Reload()
Response.Write ""
Response.End
End Sub
Sub CloseWindow()
Response.Write ""
End Sub
Sub GoBack()
Response.Write ""
End Sub
Sub HTMedit(Height,Width,FormName,FieldName,Content)
ON ERROR RESUME NEXT
Set AP = Server.CreateObject("AdminimizerPro.Editor")
If IsObject(AP) Then
AP.ConfigFilePath = Server.MapPath("/Admin/HTMedit") & "\APConfig.txt"
'AP.StyleSheet = "AL.css"
AP.CopyVisible = True
AP.BoldVisible = True
AP.FontComboVisible = True
AP.LinksVisible = True
AP.TableVisible = True
AP.SpanVisible = False
AP.ImageVisible = True
AP.JustifyVisible = True
AP.HelpButtonVisible = True
AP.FormatComboVisible = True
AP.SpellVisible = True
AP.UseWordFontColors = True
AP.UseWordFontFaces = True
AP.UseWordFontSizes = True
AP.UseWordStyles = False
'AP.CustomVisible = True
'AP.ClassNames "Header", "Quotes", "AnyName"
AP.EditorHeight = Height
AP.EditorWidth = Width
AP.FieldName = FieldName
AP.FieldValue = Content
AP.FormName = FormName
AP.ImageEditorName = "ImageBrowser.asp"
AP.ShowEditor
Set AP = Nothing
Else
Response.Write ""
End If
End Sub
Sub NewHTMedit(Height,Width,FormName,FieldName,Content)
Response.Write ""
'Response.Write ""
Response.Write ""
'Response.Write ""
Response.Write " "
Response.Write ""
Response.Write " "
'Response.Write ""
Response.Write ""
'Response.Write ""
'Response.Write ""
Response.Write ""
'Response.Write ""
'Response.Write ""
End Sub
%>
<%End If%>
<%If CreateConn Then%>
<%Conn.Close
Set Conn = Nothing
Response.Write ""
%>
<%End If%>
|