<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Option Explicit %> <% Dim Conn, SQL, SQLa, RS_Insert, TestiName, Testimonial, ID, Action, RS_Edit, Faction Action = Request("Action") Faction = Request.Form("Faction") If Request.Form("AddCat") = "Add" Then TestiName = Request.Form("TestiName") Testimonial = Request.Form("Testimonial") Set Conn=Server.CreateObject("ADODB.Connection") Conn.Open MM_HNISVRNODSN_STRING SQL = "Insert Into "&strTablePrefix&"_Testimonials " SQL = SQL&"(TestiName, " SQL = SQL&"Testimonial) " SQL = SQL&"Values" SQL = SQL&"('"&ChkString(TestiName)&"', " SQL = SQL&"'"&ChkString(Testimonial)&"') " Set RS_Insert=Conn.Execute(SQL) Set RS_Insert=Nothing Conn.Close Set Conn = Nothing Response.Redirect("/testimonials/view.asp") End If If Action <> "Add" Then ID = Request("ID") set RS_Edit = Server.CreateObject("ADODB.Recordset") RS_Edit.ActiveConnection = MM_HNISVRNODSN_STRING SQL="SELECT TestiName, Testimonial FROM "&strTablePrefix&"_Testimonials WHERE (ID ='"&ID&"')" 'Set RS_Edit = Conn.Execute(SQL) RS_Edit.Open(SQL) End IF If Faction = "Edit" Then Set Conn=Server.CreateObject("ADODB.Connection") Conn.Open MM_HNISVRNODSN_STRING TestiName = Request.Form("TestiName") Testimonial = Request.Form("Testimonial") SQLa = "UPDATE "&strTablePrefix&"_Testimonials " SQLa = SQLa&"SET TestiName = '"&ChkString(TestiName)&"' " SQLa = SQLa&", Testimonial = '"&ChkString(Testimonial)&"' " SQLa = SQLa&"WHERE ID = '"&ID&"'" Set RS_Insert=Conn.Execute(SQLa) Set RS_Insert=Nothing Conn.Close Set Conn = Nothing Response.Redirect("/testimonials/view.asp") End If 'This will Delete the Category If Faction = "Delete" Then ID = Request.Form("ID") TestiName = Request.Form("TestiName") Set Conn=Server.CreateObject("ADODB.Connection") Conn.Open MM_HNISVRNODSN_STRING Dim RS_Delete SQL = "DELETE FROM "&strTablePrefix&"_Testimonials " SQL = SQL&" WHERE (ID = '"&ID&"') AND (TestiName = '"&TestiName&"')" Set RS_Delete = Conn.Execute(SQL) Set RS_Delete = Nothing Conn.Close Set Conn = Nothing Set RS_Delete = Nothing Response.Redirect("/testimonials/view.asp") End If %> Testimonials Intranet

MKS Intranet
Testimonials Management

<% If Action = "Add" OR Action = "Edit" Then %>
Name "> Name of the person who is being quoted.
Testimonial:

<% If Action = "Add" Then %>

<% End If %>
  <% If Action = "Edit" Then %>


<% End If %> <% End If %> <% If Action = "Delete" Then %> ">

CAUTION:
This action cannot be undone!
<% End If %>