%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim products__MMColParam products__MMColParam = "888888" If (Request("MM_EmptyValue") <> "") Then products__MMColParam = Request("MM_EmptyValue") End If %> <% set products = Server.CreateObject("ADODB.Recordset") products.ActiveConnection = MM_connect1_STRING products.Source = "SELECT * FROM products WHERE ID = " + Replace(products__MMColParam, "'", "''") + " ORDER BY ID DESC" products.CursorType = 0 products.CursorLocation = 2 products.LockType = 3 products.Open() products_numRows = 0 %> <% If (products.EOF) Then Response.Redirect("http://www.litespot.com") End If 'MagicBeat Server Behavior - 1014 - by Jag S. Sidhu - www.magicbeat.com %> <% FUNCTION CropSentence(strText, intLength, strTrial) Dim wsCount Dim intTempSize Dim intTotalLen Dim strTemp wsCount = 0 intTempSize = 0 intTotalLen = 0 intLength = intLength - Len(strTrial) strTemp = "" IF Len(strText) > intLength THEN arrTemp = Split(strText, " ") FOR EACH x IN arrTemp IF Len(strTemp) <= intLength THEN strTemp = strTemp & x & " " END IF NEXT CropSentence = Left(strTemp, Len(strTemp) - 1) & strTrial ELSE CropSentence = strText END IF END FUNCTION %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 main_cat_numRows = main_cat_numRows + Repeat1__numRows %> <% Dim Repeat2__numRows Repeat2__numRows = -1 Dim Repeat2__index Repeat2__index = 0 company_numRows = company_numRows + Repeat2__numRows %> <% Dim Repeat4__numRows Repeat4__numRows = 6 Dim Repeat4__index Repeat4__index = 0 products_numRows = products_numRows + Repeat4__numRows %> <% Dim Repeat3__numRows Repeat3__numRows = 3 Dim Repeat3__index Repeat3__index = 0 latest_numRows = latest_numRows + Repeat3__numRows %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each Item In Request.QueryString NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item)) End If Next ' add the Form variables to the MM_keepForm string For Each Item In Request.Form NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %>