<%@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 INS = Server.CreateObject("ADODB.Command") INS.ActiveConnection = MM_ADOSQL_STRING INS.CommandText = "dbo._SP_UPDATE_TESTIMONIALS_ADM" INS.CommandType = 4 INS.CommandTimeout = 0 INS.Prepared = true INS.Parameters.Append INS.CreateParameter("@TESID", 3, 1,4,Request("TESID")) INS.Parameters.Append INS.CreateParameter("@Text", 129, 1,8000,Request("Text")) INS.Parameters.Append INS.CreateParameter("@Name", 129, 1,200,Request("Name")) INS.Parameters.Append INS.CreateParameter("@Jobtitle", 129, 1,1000,Request("Jobtitle")) INS.Parameters.Append INS.CreateParameter("@Company", 129, 1,400,Request("Company")) INS.Parameters.Append INS.CreateParameter("@Date", 129, 1,50,Request("Date")) INS.Parameters.Append INS.CreateParameter("@Show", 11, 1,1, Show) INS.Execute() response.redirect "testimonials.asp?msg=" & Server.URLencode("Record Updated Successfully.") End If %> <% If Trim(Request("insert")) = "1" Then Dim INS__Text INS__Text = "" if(Request("Text") <> "") then INS__Text = Request("Text") Dim INS__Name INS__Name = "" if(Request("Name") <> "") then INS__Name = Request("Name") Dim INS__Jobtitle INS__Jobtitle = "" if(Request("Jobtitle") <> "") then INS__Jobtitle = Request("Jobtitle") Dim INS__Company INS__Company = "" if(Request("Company") <> "") then INS__Company = Request("Company") Dim INS__Date INS__Date = "" if(Request("Date") <> "") then INS__Date = Request("Date") Show = "True" If Request("Show") = "" Then Show = "False" Else Show = Request("Show") End If set INS = Server.CreateObject("ADODB.Command") INS.ActiveConnection = MM_ADOSQL_STRING INS.CommandText = "dbo._SP_INSERT_TESTIMONIALS_ADM" INS.CommandType = 4 INS.CommandTimeout = 0 INS.Prepared = true INS.Parameters.Append INS.CreateParameter("@Text", 129, 1,8000,INS__Text) INS.Parameters.Append INS.CreateParameter("@Name", 129, 1,200,INS__Name) INS.Parameters.Append INS.CreateParameter("@Jobtitle", 129, 1,1000,INS__Jobtitle) INS.Parameters.Append INS.CreateParameter("@Company", 129, 1,400,INS__Company) INS.Parameters.Append INS.CreateParameter("@Date", 129, 1,50,INS__Date) INS.Parameters.Append INS.CreateParameter("@Show", 11, 1,1, Show) INS.Execute() response.redirect "testimonials.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_TESTIMONIALS_ADM" DEL.CommandType = 4 DEL.CommandTimeout = 0 DEL.Prepared = true DEL.Parameters.Append DEL.CreateParameter("@TESID", 3, 1,4,Request("TESID")) DEL.Execute() response.redirect "testimonials.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_TESTIMONIALS_ADM" SEL.CommandType = 4 SEL.CommandTimeout = 0 SEL.Prepared = true SEL.Parameters.Append SEL.CreateParameter("RETURN_VALUE", 3, 4) set rsTESTI = SEL.Execute rsTESTI_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rsTESTI_numRows = rsTESTI_numRows + Repeat1__numRows %> ADMIN CONTROL INTERFACE
     
    My Testimonials
 
<% If NOT rsTESTI.EOF Then %> <% Else %> <% End If %> <% Dim EditCounter: EditCounter = 1 While ((Repeat1__numRows <> 0) AND (NOT rsTESTI.EOF)) Dim BGColor if BGColor = "#E8F8FF" then BGColor = "#FFFFFF" else BGColor = "#E8F8FF" end if %> <% EditCounter = EditCounter + 1 Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsTESTI.MoveNext() Wend %>
    1. Click on Open to make changes.  2. Click on New    to add a new record.

Click here to add a new record.
<% =Request("msg")%>
   Name / Company    Inside    Display   
No Records available yet.
  Open to Edit: <%=MakeShort(rsTESTI(" BORDER="0">  );">Delete <%=MakeShort(rsTESTI( ?!" BORDER="0">       <%= StripHTML(rsTESTI.Fields.Item("Name").Value) %> / <%= Left(StripHTML(rsTESTI.Fields.Item("Company").Value),12) %>    <%= MakeShort(StripHTML(rsTESTI.Fields.Item("Text").Value), 42) %>        <% If rsTESTI("Show") = False Then %> This Page is inactive. <% Else %> This page is live. <% End If %>