#!/usr/bin/ruby require 'cgi' cgi = CGI.new("html4Tr") params = cgi.params errors = [] firstname = params['firstname'].first rescue '' lastname = params['lastname'].first rescue '' email = params['email'].first rescue '' confirmemail = params['confirmemail'].first rescue '' besttimestocontactyou = params['besttimestocontactyou'].first rescue '' company = params['company'].first rescue '' budget = params['budget'].first rescue '' worked_agency = params['worked_agency'].first rescue 'Yes' worked_agency = 'Yes' if !worked_agency month_budget = params['month_budget'].first rescue '' typeofbusiness = params['typeofbusiness'].first rescue '' phone = params['phone'].first rescue '' address = params['address'].first rescue '' city = params['city'].first rescue '' state = params['state'].first rescue '' comments = params['comments'].first rescue '' services1 = [['Ad Campaigns','typeChkAd'], ['Market Strategy','typeChkMarket'], ['Public Relations','typeChkPublic'], ['Branding / Corp ID','typeChkBranding'], ['Annual Reports','typeChkAnnual'], ['Product Packaging','typeChkProduct'], ['Radio','typeChkRadio'], ['TV','typeChkTV'], ['Media Planning / Buys','typeChkMedia'], ['Brochures / Catalogues','typeChkBrochures'], ['Magazine and Print Ads','typeChkMagazine'], ['Direct Mail','typeChkDirect']].freeze services2 = [['Web Development','typeChkWeb'], ['Online Marketing / SEM','typeChkOnline'], ['Paid Search','typeChkPaid'], ['SEO / Search Engine Optimization','typeChkSearchEngine'], ['Search Informed Market Research','typeChkSearchInformed'], ['Lead Generation','typeChkLead'], ['Trade Show Exhibits','typeChkTrade'], ['Magazine Publishing','typeChkMagazine'], ['Multimedia Presentations','typeChkMultimedia'], ['Photography','typeChkPhotography'], ['Green Printing Options','typeChkGreen'], ['Printing','typeChkPrinting']].freeze if cgi.request_method == 'POST' if '' == firstname || firstname !~ /^[\w .']*$/ errors << "First Name cannot be blank or contain invalid characters" end if '' == lastname || lastname !~ /^[\w .']*$/ errors << "Last Name cannot be blank or contain invalid characters" end if '' == email || email !~ /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/ errors << "Invalid email address" end if '' == confirmemail || email != confirmemail errors << "Please confirm email address" end if '' == phone || phone !~ /^[0-9-]*$/ errors << "Invalid phone number" end if errors.empty? selected_services = '' services1.each {|s| if params[s[1]].first selected_services << s[0] + "\r\n" end } services2.each {|s| if params[s[1]].first selected_services << s[0] + "\r\n" end } mailto = "execadmin@revenuecycleinc.com" mailcc = "" mailbcc = "" mailfrom = email $message=" Name: $name\n E-mail: $em\n Facility/Practice Name: $fpn\n Address: $caddress\n City: $city\n State: $state\n Zip: $zip\n Phone: $phone\n Best time to contact: $time\n Question: $question\n Mail Opt-in: $optinmail\n Email Opt-in: $optinemail\n\n"; $headers = "From: rciwebform@spamscanner.revenuecycleinc.com"; header('location: contact-thankyou.htm'); ##########################33 ## testing mailto = "rick@pocketknifesoftware.com" # mailcc = '' # mailbcc = '' subject = "Revenue Cycle - Contact Us" message = < Content-Type: text/plain; charset=utf-8 EOF message << "Name: " + name + "\r\n" + "Email: " + email + "\r\n" + "Facility/Practice Name: " + company + "\r\n" + "Address: " + address + "\r\n" + "City: " + city + "\r\n" + "State: " + state + "\r\n" + "Zip: " + zip + "\r\n" + "Best time to contact: " + besttime + "\r\n" + "Question: " + question + "\r\n" + "Mailing List: " + mailinglist + "\r\n" + "Email List: " + emaillist + "\r\n" + "http://www.revenuecycleinc.com/contact/optin.xls\r\n" + "Time Stamp: " + Time.now.to_s require 'net/smtp' Net::SMTP.start('localhost',25) do |m| m.send_message message,mailfrom,mailto end done = true end #if no errors end #if post puts cgi.header("charset" => "iso-8859-1") puts < Revenue Cycle Inc. – Contact Us
Vendor login
Consulting client login
Contact Revenue Cycle Inc.

At Revenue Cycle Inc., our clients are the most important part of our business. We value your communication, questions, comments and feedback, so let us hear from you. We promise fast, focused solutions to any and all of your radiation and medical oncology consulting needs.

Revenue Cycle Inc.
Address:
1817 West Braker Lane
Building F, Suite 200
Austin, TX 78758
Phone: 512-583-2000
Fax: 512-583-2001

Please fill in all Required (*) Fields:


Name*:
E-mail*:
Phone*:
Facility/Practice Name*:
Address*:
City*:
State*:
Zip*:
Best time to contact:
Question*:
Yes, please send me Revenue Cycle Inc. mailings to receive the Latest News, Coding Tips, Events Schedule and more. Please add me to your:

Mailing List   Email List

EOF