<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%> <% // *** Edit Operations: declare variables // set the form action variable var MM_editAction = Request.ServerVariables("SCRIPT_NAME"); if (Request.QueryString) { MM_editAction += "?" + Server.HTMLEncode(Request.QueryString); } // boolean to abort record edit var MM_abortEdit = false; // query string to execute var MM_editQuery = ""; %> <% // *** Insert Record: set variables if (String(Request("MM_insert")) == "form1") { var MM_editConnection = MM_cnnMtn_STRING; var MM_editTable = "tblSwaps"; var MM_editRedirectUrl = "mtn_swp_list.asp"; var MM_fieldsStr = "itemName|value|Description|value|City|value|State|value|Price|value|firstName|value|lastName|value|Phone|value|Email|value|authorizationNbr|value"; var MM_columnsStr = "ItemName|',none,''|Description|',none,''|City|',none,''|State|',none,''|Price|none,none,NULL|firstName|',none,''|lastName|',none,''|Phone|',none,''|Email|',none,''|authorizationNbr|none,none,NULL"; // create the MM_fields and MM_columns arrays var MM_fields = MM_fieldsStr.split("|"); var MM_columns = MM_columnsStr.split("|"); // set the form values for (var i=0; i+1 < MM_fields.length; i+=2) { MM_fields[i+1] = String(Request.Form(MM_fields[i])); } // append the query string to the redirect URL if (MM_editRedirectUrl && Request.QueryString && Request.QueryString.Count > 0) { MM_editRedirectUrl += ((MM_editRedirectUrl.indexOf('?') == -1)?"?":"&") + Request.QueryString; } } %> <% // *** Insert Record: construct a sql insert statement and execute it if (String(Request("MM_insert")) != "undefined") { // create the sql insert statement var MM_tableValues = "", MM_dbValues = ""; for (var i=0; i+1 < MM_fields.length; i+=2) { var formVal = MM_fields[i+1]; var MM_typesArray = MM_columns[i+1].split(","); var delim = (MM_typesArray[0] != "none") ? MM_typesArray[0] : ""; var altVal = (MM_typesArray[1] != "none") ? MM_typesArray[1] : ""; var emptyVal = (MM_typesArray[2] != "none") ? MM_typesArray[2] : ""; if (formVal == "" || formVal == "undefined") { formVal = emptyVal; } else { if (altVal != "") { formVal = altVal; } else if (delim == "'") { // escape quotes formVal = "'" + formVal.replace(/'/g,"''") + "'"; } else { formVal = delim + formVal + delim; } } MM_tableValues += ((i != 0) ? "," : "") + MM_columns[i]; MM_dbValues += ((i != 0) ? "," : "") + formVal; } MM_editQuery = "insert into " + MM_editTable + " (" + MM_tableValues + ") values (" + MM_dbValues + ")"; if (!MM_abortEdit) { // execute the insert var MM_editCmd = Server.CreateObject('ADODB.Command'); MM_editCmd.ActiveConnection = MM_editConnection; MM_editCmd.CommandText = MM_editQuery; MM_editCmd.Execute(); MM_editCmd.ActiveConnection.Close(); emailOK=swap_email(String(Request.Form("authorizationNbr")),String(Request.Form("Email"))); if (MM_editRedirectUrl) { MM_editRedirectUrl += ((MM_editRedirectUrl.indexOf('?') == -1)?"?":"&") + "emailOK="+emailOK; //Response.Write('MM_editRedirectUrl '+MM_editRedirectUrl) Response.Redirect(MM_editRedirectUrl); } } function swap_email(auth,towhom) { var emailOK=false; if (towhom != 'undefined' && towhom){ var mailObj = Server.CreateObject("Persits.MailSender") ; mailObj.Host = '63.119.175.19'; // var attachfile = '';//new Array(); var subject, body, extName, displayemailresult;//contactme="contact me"; mailObj.FromName = "Mountain Sports' Trading Places"; mailObj.From = "mtnsports@quintanna.com"; mailObj.AddReplyTo("mtnsports@quintanna.com") ; if (auth) { mailObj.AddAddress(towhom); mailObj.AddBcc("mtnsports@quintanna.com"); // as feedback so know if mailing fails body="Thanks for adding an item to Trading Places.\n\nPlease save your Authorization Number :: "+auth+" :: as you will need it to edit the Item '"+ (String(Request.Form("itemName"))) +"' and to remove it from the Trading Places list when it has been sold! All items older than 30 days are automatically removed. Thanks again and good luck!";//getBody(shortname); subject="Here is your Mountain Sports' Trading Places Authorization Number."; emailOK=true; } else { mailObj.AddAddress("mtnsports@quintanna.com"); body="Failed to generate an Authorization Number for "+towhom; subject="Error occured CREATING authorization number. "; } mailObj.Subject = subject; mailObj.Body = body; try {mailObj.Send();} catch(e) { //displayemailresult="An error occured when we tried to send\n\nthe Authorization Number to your email address.\n\nPlease contact us."; mailObj.Reset(); mailObj.AddAddress("mtnsports@quintanna.com"); body="An email error occured when we tried to send Authorization Number "+auth+" to "+towhom; subject="Error occured SENDING authoriaation number email."; mailObj.Body = body; mailObj.Subject = subject; mailObj.Send(); } //if (!displayemailresult) displayemailresult="We've sent you the Extension via email.
If it does not arrive
in your mailbox shortly,
please "+contactme+".

"; //displayemailresult=displayemailresult+"
A receipt for your purchase has
been emailed to you by PayPal.
You may log into your account
at www.paypal.com to view details
of this transaction.

"; } // if auth return emailOK; } // func } %> Add a Trading Places Item

 

 

A fun-n'free place to buy, sell, and trade your seldom used paddling gear.

Mountain Sports is providing Trading Places as a courtesy to its customers and the paddling public.  All resulting transactions are between the buyers and sellers at their sole risk and expense.  Buyers should make their own independent evaluation of the sellers' claims and the quality/condition of the goods offered for sale.
By accessing and/or using the Trading Places portion of this website, buyers and users release and hold harmless, and acknowledge that Mountain Sports, its officers, directors and employees make no representation or warranty of any kind, express or implied, concerning the sellers or goods offered for sale through Trading Places.

Commercial announcements will not be accepted.  Mountain Sports reserves the right to refuse submissions.
All ads will be displayed for 30 days from time of posting.

 



 

Add Item Information

 

Item:
Description:
Location: City   State
Price: $
   
  -- Contact --
First Name:
Last Name:
Phone: (optional)
Email:
 
 
   

 

 

PaddleSports



Contact Us

Weather

 

Home