%@LANGUAGE="VBSCRIPT"%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="SA"
MM_authFailedURL="default.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
'response.write request.form
'response.end
If Trim(Request("update")) = "1" Then
Dim Show: Show = "True"
If Request("Show") = "" Then
Show = "False"
Else
Show = Request("Show")
End If
set UPT = Server.CreateObject("ADODB.Command")
UPT.ActiveConnection = MM_ADOSQL_STRING
UPT.CommandText = "dbo._SP_UPDATE_SERVICES_ADM"
UPT.CommandType = 4
UPT.CommandTimeout = 0
UPT.Prepared = true
UPT.Parameters.Append UPT.CreateParameter("@SERID", 3, 1,4,Request("SERID"))
UPT.Parameters.Append UPT.CreateParameter("@ServiceTitle", 129, 1,1000,Request("ServiceTitle"))
UPT.Parameters.Append UPT.CreateParameter("@ServiceDescription", 129, 1,8000,Request("ServiceDescription"))
UPT.Parameters.Append UPT.CreateParameter("@Keywords", 129, 1,8000,Request("Keywords"))
UPT.Parameters.Append UPT.CreateParameter("@Show", 11, 1,1,Show)
UPT.Execute()
response.redirect "services.asp?msg=" & Server.URLencode("Record Updated Successfully.")
End If
%>
<%
If Trim(Request("insert")) = "1" Then
Show = "True"
If Request("Show") = "" Then
Show = "False"
Else
Show = Request("Show")
End If
set UPT = Server.CreateObject("ADODB.Command")
UPT.ActiveConnection = MM_ADOSQL_STRING
UPT.CommandText = "dbo._SP_INSERT_SERVICES_ADM"
UPT.CommandType = 4
UPT.CommandTimeout = 0
UPT.Prepared = true
UPT.Parameters.Append UPT.CreateParameter("@ServiceTitle", 129, 1,1000,Request("ServiceTitle"))
UPT.Parameters.Append UPT.CreateParameter("@ServiceDescription", 129, 1,8000,Request("ServiceDescription"))
UPT.Parameters.Append UPT.CreateParameter("@Keywords", 129, 1,8000,Request("Keywords"))
UPT.Parameters.Append UPT.CreateParameter("@Show", 11, 1,1,Show)
UPT.Execute()
response.redirect "services.asp?msg=" & Server.URLencode("New Record Added Successfully.")
End If
%>
<%
If TRIM(Request("delete")) = "1" Then
set DEL = Server.CreateObject("ADODB.Command")
DEL.ActiveConnection = MM_ADOSQL_STRING
DEL.CommandText = "dbo._SP_DELETE_SERVICES_ADM"
DEL.CommandType = 4
DEL.CommandTimeout = 0
DEL.Prepared = true
DEL.Parameters.Append DEL.CreateParameter("@SERID", 3, 1,4,Request("SERID"))
DEL.Execute()
response.redirect "services.asp?msg=" & Server.URLencode("Record has been deleted.")
End If
%>
<%
set SEL = Server.CreateObject("ADODB.Command")
SEL.ActiveConnection = MM_ADOSQL_STRING
SEL.CommandText = "dbo._SP_SELECT_SERVICES_ADM"
SEL.CommandType = 4
SEL.CommandTimeout = 0
SEL.Prepared = true
SEL.Parameters.Append SEL.CreateParameter("RETURN_VALUE", 3, 4)
set rsSERVICE = SEL.Execute
rsSERVICE_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsSERVICE_numRows = rsSERVICE_numRows + Repeat1__numRows
%>
ADMIN CONTROL INTERFACE
My
Services
1.
Click on Open
to make changes. 2.
Click on New
to add a new record.
<% =Request("msg")%>
<% If NOT rsSERVICE.EOF Then %>
Headline
Inside
Date
Added
Display
<% Else %>
No Records available
yet.
<% End If %>
<%
Dim EditCounter: EditCounter = 1
While ((Repeat1__numRows <> 0) AND (NOT rsSERVICE.EOF))
Dim BGColor
if BGColor = "#E8F8FF" then
BGColor = "#FFFFFF"
else
BGColor = "#E8F8FF"
end if
%>