<%@LANGUAGE="VBSCRIPT"%> <% If Session("UserID") = "" Then Response.Redirect "Login.asp" End If %> <% ' *** Insert Record: construct a sql insert statement and execute it MM_editAction = CStr(Request("URL")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryString End If If (CStr(Request("MM_insert")) <> "") Then MM_tableName = "tblAds" MM_fields = "hiddenField,nUserID,none,none,NULL,txtTitle,cTitle,',none,'',txtShortDescription,cShortDescription,',none,'',txtDescription,cDescription,',none,'',sltCategory,cCategory,',none,'',selectSubCategory,cSubCategory,',none,'',Country,cCountry,',none,'',City,cCity,',none,'',txtContact,cContact,',none,'',dExpired,dExpiryDate,',none,'',cNetAddress,cNetAddress,',none,''" MM_redirectPage = "ModifyAds.asp?nUserID=" & Session("UserID") ' create the insert sql statement MM_tableValues = "" MM_dbValues = "" MM_fieldsArray = Split(MM_fields, ",") For i = LBound(MM_fieldsArray) To UBound(MM_fieldsArray) Step 5 FormVal = CStr(Request.Form(MM_fieldsArray(i))) Delim = MM_fieldsArray(i+2) If (Delim = "none") Then Delim = "" AltVal = MM_fieldsArray(i+3) If (AltVal = "none") Then AltVal = "" EmptyVal = MM_fieldsArray(i+4) If (EmptyVal = "none") Then EmptyVal = "" If (FormVal = "") Then FormVal = EmptyVal Else If (AltVal <> "") Then FormVal = AltVal ElseIf (Delim = "'") Then ' escape quotes FormVal = "'" & Replace(FormVal,"'","''") & "'" Else FormVal = Delim + FormVal + Delim End If End If If (i <> LBound(MM_fieldsArray)) Then MM_tableValues = MM_tableValues & "," MM_dbValues = MM_dbValues & "," End if MM_tableValues = MM_tableValues & MM_fieldsArray(i+1) MM_dbValues = MM_dbValues & FormVal Next MM_insertStr = "insert into " & MM_tableName & " (" & MM_tableValues & ") values (" & MM_dbValues & ")" ' finish the sql and execute it Set MM_insertCmd = Server.CreateObject("ADODB.Command") MM_insertCmd.ActiveConnection = strConn MM_insertCmd.CommandText = MM_insertStr MM_insertCmd.Execute ' redirect with URL parameters If (MM_redirectPage = "") Then MM_redirectPage = CStr(Request("URL")) End If If (InStr(1, MM_redirectPage, "?", vbTextCompare) = 0 And (Request.QueryString <> "")) Then MM_redirectPage = MM_redirectPage & "?" & Request.QueryString End If Call Response.Redirect(MM_redirectPage) End If %> Motorcycle Accessory Centre GoldWing Classifieds
 

 


Browse Ads | Post A New Ad | Edit Profile | ">List/Edit Ads

Post A New Ad

If you would like to include a photo, first fill out this form and then email the photo to us in .jpg or .gif format, with a size of 280 X 180 pixels. We will then post it within a few days.

<% set rsCategory = Server.CreateObject("ADODB.Recordset") rsCategory.ActiveConnection = strConn rsCategory.Source = "SELECT cCategory FROM tblCategory" rsCategory.CursorType = 0 rsCategory.CursorLocation = 2 rsCategory.LockType = 3 rsCategory.Open rsCategory_numRows = 0 %> <% set rsSubCategory = Server.CreateObject("ADODB.Recordset") rsSubCategory.ActiveConnection = strConn rsSubCategory.Source = "SELECT cSubCategory FROM tblSubCategory" rsSubCategory.CursorType = 0 rsSubCategory.CursorLocation = 2 rsSubCategory.LockType = 3 rsSubCategory.Open rsSubCategory_numRows = 0 %>
">  
TITLE  
SHORT DESCRIPTION  
DESCRIPTION  
CATEGORY <% rsCategory.Close Set rsCategory = Nothing %>  
Sub-CATEGORY  
COUNTRY  
CITY  
CONTACT
enter your email address or phone number
 
 

 

 
<% Set MM_insertCmd = Nothing %>

 


101, 5701 - 17th Ave. S.E. Calgary, Alberta T2A 0W3
ph (403)248-0988    toll free orders (800)293-6453    fax (403)248-6035
motorcycle.stuff@cia.com
For questions or comments about the website, contact the webmaster.