#!/usr/bin/perl -T use Mysql; use CGI qw(:escapeHTML); $| = 1; use DBI; print "Content-type: text/html\n\n"; print "before db"; &require_supporting_libraries (__FILE__, __LINE__, "mercurytrip.setup.db"); print "after db"; &require_supporting_libraries (__FILE__, __LINE__, "$sc_cgi_lib_path", "$sc_html_setup_file_path", "$sc_mail_lib_path"); # $conn = Pg::connectdb("dbname=mercurytrip user=postgres"); #$conn = Pg::connectdb("dbname=mercurytrip user=mercury password=coral123"); &read_and_parse_form_data; $page = $form_data{'page'}; $page =~ /([\w\-\=\+\/]+)\.(\w+)/; $page = "$1.$2"; $page = "" if ($page eq "."); $page =~ s/^\/+//; # Get rid of any residual / prefix $oldPATH = $ENV{"PATH"}; $ENV{"PATH"} = "/bin:/usr/bin:/usr/ucb"; $toDate = trim(`date '+%l:%M %p %Z, %a %b %e'`); $ENV{"PATH"} = $oldPATH; &error_check_form_data; &security_test; # Sundeep, Test to see if someone else is not using your # server to post their form. if ($form_data{'getFaresQuote'} ne "") { &process_get_fares_quotes; exit; } elsif ($form_data{'submit_feedback_button'} ne "") { &process_feedback_form; exit; } elsif ($form_data{'invite'} ne "") { &require_supporting_libraries (__FILE__, __LINE__, "$location_of_cgi_sol", "$sc_html_setup_file_path"); &process_tell_friend; exit; } else { &output_frontpage; exit; } sub process_get_fares_quotes { @form_variables = split (/\|/, $form_data{'variable_order'}); @required_variables = split (/\|/, $form_data{'required_variables'}); local($req_var) = ""; foreach $variable (@required_variables) { if ($form_data{$variable} eq "") { $req_var = $req_var . "$variable
"; } } # End of foreach $variable (@required_variables) if ($req_var ne "") { $sc_error_msg = "Please fill in all the details to better assist you"; &output_frontpage; } else { local($emailid) = $form_data{'emailAddr'}; local($d2) = $form_data{'contactName'}; local($d3) = $form_data{'emailAddr'}; local($d4) = $form_data{'phoneNumber'}; local($d5) = $form_data{'de_month'}; local($d6) = $form_data{'de_day'}; local($d7) = $form_data{'re_month'}; local($d8) = $form_data{'re_day'}; local($d9) = $form_data{'fromCity'}; local($d10) = $form_data{'toCity'}; local($d11) = $form_data{'airlines'}; local($d12) = $form_data{'agent'}; local($d13) = $form_data{'pcode'}; local($d14) = $form_data{'otherDetails'}; local($dbh) = DBI->connect("dbi:mysql:mercurytrip","mercury","coral123") or die("Couldn't connect"); local($sth) = $dbh->prepare("insert into emaillist(emailid,dateofrequest,source,destination,smonth,sdate,emonth,edate,contactname,contactnumber,agentname,prefairline,faretobeat,notes) VALUES ('$emailid','$toDate','$d9','$d10','$d5','$d6','$d7','$d8','$d2','$d4','$d12','$d11','$d13','$d14')") or die("Couldn't prepare"); $sth->execute(); $sth->errstr(); $sth->finish; local($isCanada) = $form_data{'isCanada'}; $sc_success_msg = " Thank you for your inquiry. We truly appreciate your business, a travel consultant will contact you shortly."; $email_body = "This data was submitted on:"; $email_body .= $toDate; $email_body .=" requestid: $requestid \n\n"; $email_body .="Dear Travel Consultant,\n\n"; $email_body .="Here is a request for travel tickets. Please let the client know the lowest possible fares for the dates of travel.\n\n"; $email_body .="Contact Name: $form_data{'contactName'}\n"; $email_body .="E-mail Address: $form_data{'emailAddr'}\n"; $email_body .="Contact Phone: $form_data{'phoneNumber'}\n"; $email_body .="Travel Dates: $form_data{'de_month'} $form_data{'de_day'} - $form_data{'re_month'} $form_data{'re_day'}\n"; $email_body .= "From City - To City: $form_data{'fromCity'} - $form_data{'toCity'}\n"; $email_body .= " Canada Origin: $isCanada\n"; $email_body .= "Preferred Airlines: $form_data{'airlines'}\n"; $email_body .= "Preferred agent: $form_data{'agent'}\n"; $email_body .= "Price to Beat: $form_data{'pcode'}\n"; $email_body .= "Special Request : $form_data{'otherDetails'}\n\n"; $email_body .= "Thank You.\n\n"; $email_body .= "Regards,\nYour Web Service"; # For every form variable, we should add the variable name and their # values in the order specified by $form_data{'variable_order'}. # foreach $variable (@form_variables) # { # $email_body .= "$variable = $form_data{$variable}\n"; # } &output_frontpage; # print "isCanada=$isCanada"; local($a_email) = $sc_travel_admin_email; local($subject) = "Travel on $form_data{'de_month'} $form_data{'de_day'} from $form_data{'fromCity'} to $form_data{'toCity'} for $form_data{'contactName'}"; &send_mail("$sc_admin_email","efarequote\@mercurytrip.com","$subject", "$email_body"); &send_mail("$sc_admin_email","travel\@mercurytrip.com","$subject", "$email_body"); $a_email = $form_data{'emailAddr'}; $email_body = "This data was submitted on: "; $email_body .= $toDate; $email_body .="\n\n"; $email_body .="Dear Valued Customer,\n\n"; $email_body .="Here is a request we have received for your travel tickets. We appreciate your interest in our services. We are working on your request and one of our travel agents will reply back to you soon. \nIf you have already recived the quotes over the phone , below is the request along with the agent's name and our contact details. Please feel free to contact us if you have any further questions.\n\n"; $email_body .="Contact Name: $form_data{'contactName'}\n"; $email_body .="E-mail Address: $form_data{'emailAddr'}\n"; $email_body .="Contact Phone: $form_data{'phoneNumber'}\n"; $email_body .="Travel Dates: $form_data{'de_month'} $form_data{'de_day'} - $form_data{'re_month'} $form_data{'re_day'}\n"; $email_body .= "From City - To City: $form_data{'fromCity'} - $form_data{'toCity'}\n"; $email_body .= " Canada Origin: $isCanada\n"; $email_body .= "Preferred Airlines: $form_data{'airlines'}\n"; $email_body .= "Preferred agent: $form_data{'agent'}\n"; $email_body .= "Price to Beat: $form_data{'pcode'}\n"; $email_body .= "Special Request = $form_data{'otherDetails'}\n\n"; $email_body .= "*************\n"; $email_body .= "Book Online at http://www.mercurytrip.com/online/Search.htm \n"; $email_body .= "*************\n"; $email_body .= "Quick Getaway TOURS in India at http://www.mercurytrip.com/Tours.html \n"; $email_body .= "*************\n\n"; $email_body .= "WE WILL GET YOU THE BEST DEAL. \nWE STRIVE FOR BEST CUSTOMER SERVICE IN INTERNATIONAL TRAVEL PLANNING \n"; $email_body .= "http://www.mercurytrip.com \n"; $email_body .= "510 573 5053 OR 408 432 TRIP(8747) OR 510 573 5053 \n"; $email_body .= "Regards,\nMercuryTrip.com eService"; local($agent_email) = $form_data{'agent'}; &send_mail("eFareQuote\@mercurytrip.com","$a_email","MercuryTrip Your Request for Lowest Fare Quote", "$email_body"); if ($agent_email ne "") { $agent_email .= "\@mercurytrip.com"; $subject = "PHONE REQUEST "; $subject .= $form_data{'contactName'}; &send_mail("$sc_admin_email","$agent_email","$subject", "$email_body");} } } sub output_frontpage { &display_page("Output Frontpage", __FILE__, __LINE__); } sub display_page { local ($routine, $file, $line) = @_; # print "$page, $page_num "; if ($page eq "") { $page = "home.html"; } $subname = $sc_display_page{"$page"}; &display_mercury_begin_page($page); # print "$subname"; &$subname; &display_mercury_end_page; } sub display_mercury_begin_page { local($page) = @_; print qq~ Travel India, Cheap tickets to India, Online India flight Tickets Bargain Airfares, Tour & Travel Agents India : MercuryTrip
MercuryTrip
Speak to our consultants  +1 408.432.8747
                                               +1 510.573.5053
Home  | Contact Us  | Online Reservation   Radio Interview  

We specialize in cheap tickets from USA to India Europe Australia China Middle East
Urgent tickets are no problem
Business and corporate travel made easy with cheap fares and 24X7 support
We can get tickets for your family from anywhere in India to USA
We offer many customized tours within India
We can also get domestic USA tickets

Home   | Online Booking   New!   | Corporate Travel program   | India Tours and Hotels   | SOTC tours   | We are Hiring
~; } sub display_home_page { print qq~
~; &display_halfprice_promotion; print qq~
~; &display_get_quotes_form; print qq~ ~; &display_destinations_module; print qq~ ~; &display_deals_module; print qq~
~; } sub display_destinations_module { print qq~ We deal with ALL Airlines from USA to India Europe Australia China Middle East and other destinations
Special international airfares announced to India from USA this Month
Boston-Kolkata-Boston for USD 590 + taxes
Richmond-Chennai-Richmond for USD 460 + taxes
New York-Delhi-New York for USD 370 + taxes
Washington-Kolkata-Washington for USD 530 + taxes
Detroit-Mumbai-Detroit for USD 590 + taxes
Chicago -Bangalore-Chicago for USD 560 + taxes
Los Angeles-Bangalore-Los Angeles for USD 760 + taxes
Atlanta-Bangalore-Atlanta for USD 590 + taxes
Albany-Ahmedabad-Albany for USD 470 + taxes
Philadelphia-Chennai-Philadelphia for USD 599 + taxes
San Francisco-Delhi-San Francisco for USD 720 + taxes
Middle East USD 720 + taxes
Atlanta Austin Bay Area
Boston Chicago Dallas
Denver Houston Los Angeles
Miami New York Philielphia
Raleigh SFO Seattle
Washington
Special international airfares announced from India this Month
Delhi Mumbai Bangalore
Delhi Chennai Calcutta
~; } sub display_get_quotes_form { local($fromCity) = &escapeHTML($form_data{'fromCity'}); local($toCity) = &escapeHTML($form_data{'toCity'}); local($de_month) = $form_data{'de_month'}; local($de_day) = $form_data{'de_day'}; local($re_month) = $form_data{'re_month'}; local($re_day) = $form_data{'re_day'}; local($airlines) = &escapeHTML($form_data{'airlines'}); local($agent) = &escapeHTML($form_data{'agent'}); local($pcode) = &escapeHTML($form_data{'pcode'}); local($contactName) = &escapeHTML($form_data{'contactName'}); local($emailAddr) = &escapeHTML($form_data{'emailAddr'}); local($phoneNumber) = &escapeHTML($form_data{'phoneNumber'}); local($otherDetails) = &escapeHTML($form_data{'otherDetails'}); local($de_year) = ""; local($re_year) = ""; local($isCanada) = $form_data{'isCanada'}; local($cayes) = ""; local($cano) = ""; if ($isCanada eq "Yes") { $cayes = "checked"; } else { $cano = "checked"; } $oldPATH = $ENV{"PATH"}; $ENV{"PATH"} = "/bin:/usr/bin:/usr/ucb"; if ($form_data{'getFaresQuote'} eq "") { $de_month = `date +%b`; $de_day = `date +%e`; $de_year = `date +%Y`; $re_month = $de_month; $re_day = $de_day + 7; # use Date::Calc qw(Add_Delta_Days); # ($re_year, $re_month, $re_day) = Add_Delta_Days($de_year, $de_month, $de_day, 7); } $ENV{"PATH"} = $oldPATH; &display_success_msg; &display_error; # &display_notice; # &display_target_market; if ($sc_success_msg ne "") { $fromCity = $toCity = $airlines = $contactName = $emailAddr = ""; $phoneNumber = $otherDetails = ""; } print qq~
Please Send a webrequest to our travel consultants to Get You The Lowest Fares . They can get you SPECIAL INVENTORY seats on various airlines only available to Mercury Trip. We will get back to you within 24 hours.
Assumed travel years are 2009 to 2010
Fields marked with * are required to complete your request
*From City *Departure Date
*To City *Return Date
*Your E-mail *Contact Phone numbers
Contact Name Preferred Airline(s)
Preferred Agent Fare to Beat
Please enter "mar2010" for a chance to win a free ticket.
Other Details
If you have any specific requirements, such as, One Way travel, Stopovers, Business or First Class booking, etc, please provide that here.
$sc_small_font_end
$sc_medium_font_begin $sc_medium_font_end
TRANSIT VISA Details PLEASE CHECK TRANSIT VISA REQUIREMENTS DIRECTLY WITH THE AIRLINES BEFORE SELECTING ANY PARTICULAR AIRLINE. MERCURY TRIP WILL NOT GIVE VISA REQUIREMENT DETAILS.
$sc_small_font_end
~; } sub display_jobs_page { print qq~
~; &display_halfprice_promotion; print qq~ JOBS AT MERCURY TRIP
If you reside in the Bay area, come and join us
Travel Agent Position :
•  Exciting job opportunity with excellent Pay.
•  Professional work environment.
•  We will train you and help you get started.

Office Manager Position :
•  Manage the day to day to operations of the office.
•  Exciting job opportunity with excellent Pay.
•  Should have experience working in the travel industry for atleast 2 years.
•  We will train you and help you get started.

Volunteer for Website development:
•  Working knowledge of cgi perl and databases .

Email your resume to travel\@mercurytrip.com
~; } sub display_privacy_page { print qq~
~; &display_halfprice_promotion; print qq~ $sc_page_header_font_begin Privacy Policy

$sc_page_header_font_end $sc_medium_font_begin Mercury Trip respects privacy of our customers. We guarantee that individual personal information, such as but not limited to, email address, name, birth dates, personal interests or suggestions will not be sold or shared with anyone.

Mercury Trip will not gather any personal information unless it is knowingly given by you. The given personal information will not be used in ways to which you have not consented.

Mercury Trip will send you promotional travel and tours offers. In a case when you do not wish to receive promotional emails than simply send email to, webmaster\@mercurytrip.com and type 'unsubscribe' in subject line. $sc_medium_font_end

~; } sub display_about_page { print qq~
~; &display_halfprice_promotion; print qq~ $sc_page_header_font_begin About MercuryTrip

$sc_page_header_font_end $sc_medium_font_begin Mercury Trip was founded to meet the demands of rapidly increasing travel needs. Our goal is to provide courteous services with quick turnaround time, make your travel selections a pleasant experience and become your travel partner for ever. We have special consolidated rates to major destinations in Sout east Asia, India , China , Europe and all major destinations in the world. We have offices in The US, canada and India and can provide competitive rates for your journey starting from these countries

Mercury Trip has relationships with most of the major airlines in the world and we are committed to provide you with the best fares available for your favorite destinations.

Mercury Trip is a preferred travel services vendor with many bay area business For more information on our corporate program please contact us
email - travel\@mercurytrip.com
Phone - 408-432-TRIP
Phone - 510-573-5053
Cell - 408-828-5550
IM - mercury_trip\@yahoo.com

$sc_medium_font_end

~; } sub display_terms_page { print qq~
~; &display_halfprice_promotion; print qq~ $sc_page_header_font_begin Terms

$sc_page_header_font_end $sc_medium_font_begin

Mercury Trip reserves the rights to refuse service to any customer without prior notification. Verification of information may be required prior to the acceptance of any purchases.

All the information provided on this Web site including but not limited to, text, graphics and links are provided on an 'AS IS' basis with no warranty.

Travel bookings are done by Mercury Trip travel consultants are valid but are subject to names being correct. Please review your itineraries, either printed or e-mailed to you, check the names, spellings of each passenger, times and dates of travel, etc. Please verify flight times before departure. All the fares and related taxes are subject to change until ticketed. Although your tickets and seats are confirmed, schedule changes by the airline, weather patterns and other acts of God may change your travel times; therefore, it is highly recommended that you re-confirm with the airline directly 72 hours prior to the departure date. Although we do our best to accommodate any special requests, please re-confirm with the airline about special arrangements like special meals, wheelchair, etc.

The Best Fares are intended to be an indicator of the lowest fares published by the airlines. Fares may not be available on all flights, are subject to availability, and are subject to change without notice. Other restrictions may apply. Remember, the lowest fares are usually sold in limited quantities, so book quickly. Mercury Trip does not warrant or guarantee that the fares shown are the lowest fares available.
Mercury Trip disclaims all the responsibilities to the fullest extent permitted by the law for any misrepresentation of information on this Web site or the sites it is linked to. In addition, Mercury Trip does not warrant that the information provided by this Web site or a travel consultant is accurate, current or complete.

Mercury Trip reserves the rights to modify these Terms of Use. You may not want to use this Web site or services provided by travel consultants, if you do not agree with these Terms of Use. $sc_medium_font_end

~; } sub display_contact_page { print qq~
~; &display_halfprice_promotion; print qq~
$sc_page_header_font_begin Contact Information $sc_page_header_font_end
$sc_medium_font_begin USA Locations:
Mail To:
Mercury Trip
Phone: (408) 432 8747
Phone: (510) 573 5053
Email: travel\@mercurytrip.com
Mercury Trip
1901 O'Toole Way
San Jose, CA 95131
Phone: (408) 432 8747
Phone: (510) 573 5053
Email: travel\@mercurytrip.com
$sc_medium_font_end
$sc_medium_font_begin India Location:
Mail To:
Mercury Air Trip Pvt. Ltd
Address : Plot No 917, Tulsi Tower, Shop No 1, Near DLF Phase 4, Gurgaon-122002, Haryana ph: 99-99-012-123
For General enquiry or Suggestions:
travel@\mercurytrip.com
Phone:
Phone: (510) 573 5053
Phone: (011 91) 99-99-012-123
$sc_medium_font_end
~; } sub display_linktous_page { print qq~
$sc_page_header_font_begin Link To Us $sc_page_header_font_end
$sc_medium_font_begin Link to Mercury Trip, one of the largest provider of Travel related services to India, China, Europe and other destinations of the world. Use the following graphics logo and HTML snippet and include that in your web page. $sc_medium_font_end
$sc_medium_font_begin Use the following snippet to include in your web page. Replace the appropriate '.gif' filename with the one you have selected. $sc_medium_font_end

    <a href="http://www.mercurytrip.com/">
    <img src="http://www.mercurytrip.com/html/images/mercurytrip_ad.gif"
    width="180" height="90" alt="Mercury Trip" border="0"></a>
    
~; } sub display_advertise_page { print qq~
~; &display_halfprice_promotion; print qq~
$sc_page_header_font_begin Advertise With Us $sc_page_header_font_end
$sc_medium_font_begin Mercury Trip, is the premier site for Travel related services to India, China, Europe, South America and other destinations in the world. Advertise your banner here to reach people of India origin and those affiliated with its great traditions in USA, Canada, UK, India and rest of the world. Banner opportunities are available on all Mercury Trip pages.

The advertisement is targeted by the demographic data collected while providing travel services. It is specific to each individual and based on the actual subscriber profile. The advertisement program enables you to reach your customer base by Affinity Group, Hobbies, Habits and Editorial Preferences which can make a big difference in success of your program.

Contact today travel\@mercurytrip.com for further information and rates plan. $sc_medium_font_end

~; } sub display_feedback_page { local($email) = &escapeHTML($form_data{'email'}); local($subject) = &escapeHTML($form_data{'subject'}); local($message) = &escapeHTML($form_data{'message'}); local($name) = &escapeHTML($form_data{'name'}); print qq~
$sc_page_header_font_begin Feedback $sc_page_header_font_end
$sc_medium_font_begin We really appreciate your time for giving us your valuable feedback. We are eager to hear from you to help us improve our services to make your experience at this site a pleasant one. If you are a happy customer, we still want to hear from you. $sc_medium_font_end

~; &display_error; &display_success_msg; if ($sc_success_msg ne "") { $name = $email = $subject = $message = ""; } print qq~
$sc_medium_font_begin Name*: $sc_medium_font_end
$sc_medium_font_begin Your E-mail*: $sc_medium_font_end
$sc_medium_font_begin Subject: $sc_medium_font_end
$sc_medium_font_begin Enter your message here*: $sc_medium_font_end
$sc_medium_font_begin     Fields marked by * are required. $sc_medium_font_end
~; } sub process_feedback_form { @form_variables = split (/\|/, $form_data{'variable_order'}); @required_variables = split (/\|/, $form_data{'required_variables'}); local($req_var) = ""; foreach $variable (@required_variables) { if ($form_data{$variable} eq "") { $req_var = $req_var . "$variable
"; } } # End of foreach $variable (@required_variables) if ($req_var ne "") { $sc_error_msg = "Please provide the following required information:
$req_var"; &output_frontpage; exit; } local($email) = &escapeQuote($form_data{'email'}); local($name) = &escapeQuote($form_data{'name'}); local($subject) = &escapeQuote($form_data{'subject'}); local($message) = &escapeQuote($form_data{'message'}); if ($should_i_mail eq "yes") { $email_body = "This data was submitted on: "; $email_body .= $toDate; $email_body .="\n\n"; foreach $variable (@form_variables) { $email_body .= "$variable = $form_data{$variable}\n"; } &send_mail("feedback\@mercurytrip.com","travel\@mercurytrip.com", "$subject", "$email_body"); } # End of if ($should_i_mail eq "yes") $sc_success_msg = "Thank you for your feedback. We appreciate your time and efforts for providing us very useful suggestions to help us improve our services."; &output_frontpage; } sub display_tell_your_friends_module { print qq~
Tell Your Friends
~; } sub display_tell_friend_page { local($invitees) = &escapeHTML(trim($form_data{'invitees'})); local($invite_msg) = &escapeHTML(trim($form_data{'invite_message'})); local($user_and_email) = &escapeHTML(trim($form_data{'invited_by'})); if ($user_and_email eq "") { $user_and_email = "$user_first $user_mi $user_last"; if ($user_email ne "") { $user_and_email .= " <$user_email>"; } } if ($invitees ne "" ) { $invitees =~ "s/\\@/\@/g"; } print qq~
$sc_page_header_font_begin Tell Your Friends$sc_page_header_font_end
~; &display_error; &display_success_msg; if ($sc_success_msg ne "") { $invitees = $invite_msg = $user_and_email = ""; } print qq~
$sc_medium_font_begin Invite others to get their next travel tickets at unbelievably low price with guranteed satisfaction. $sc_medium_font_en
$sc_medium_font_begin To: $sc_medium_font_end
$sc_small_font_begin Enter mutiple e-mail addresses separated by commas. $sc_small_font_end
$sc_medium_font_begin Subject: $sc_medium_font_end $sc_medium_font_begin $sc_tell_friend_subject $sc_medium_font_end
$sc_medium_font_begin From: $sc_medium_font_end
$sc_medium_font_begin Message: $sc_medium_font_end $sc_medium_font_begin Optional - insert your own note here:

$sc_tell_friend_msg

Thank You,
The Mercury Trip Team $sc_medium_font_end
 
~; } sub process_tell_friend { local($invite_list) = $form_data{'invitees'}; local($invite_msg) = $form_data{'invite_message'}; local($subject) = $form_data{'tell_friend_subject'}; local($invited_by) = $form_data{'invited_by'}; if ($invite_list eq "") { $sc_error_msg = "Please enter at least one e-mail address"; &display_mercury_begin_page; &display_tell_friend_page; &display_mercury_end_page; exit; } elsif ($invited_by eq "") { $sc_error_msg = "Please enter inviter's name or e-mail address"; &display_mercury_begin_page; &display_tell_friend_page; &display_mercury_end_page; exit; } local(@invitees) = split(/\,/, $invite_list); # add all invitees in the customer table with subscription bit set local($count) = 0; foreach $invitee (@invitees) { &send_mail("$sc_travel_admin_email", "$invitee", "$sc_tell_friend_subject", "Invitation from " . $invited_by . ":\n\n" . "$invite_msg" . "\n\n" . $sc_tell_friend_msg . "\n\n" . "Thank You,\n" . "The Mercury Trip Team"); $count += 1; if ($count > 10) { # send only 10 e-mails at a time. exit; } } $sc_success_msg = "Invitation has been sent to the recipients. Thank you for spreading the word about Mercury Trip! Please click here to return to the Home page."; &display_mercury_begin_page; &display_tell_friend_page; &display_mercury_end_page; } sub display_error { if ($sc_error_msg ne "") { print qq~
Please provide the required values. The request cannot be processed without this information
~ } } sub display_success_msg { if ($sc_success_msg ne "") { print qq~
$sc_success_msg
~ } } sub display_target_market { if ($sc_success_msg eq "" && $sc_error_msg eq "") { print qq~

$sc_small_font_begin We offer competitive pricing into these markets
and more!
$sc_small_font_end
$sc_small_font_begin
  • Travel originating in Canada to India.   >>>
  • Reverse Travel from India to USA.   <<<
  • Travel from USA to India and Indian Sub-continents.
  • Buy Travel Insurance from us for peace of your mind.
  • Travel and Tours in India.
$sc_small_font_end

~ } } sub display_notice { if ($sc_success_msg eq "" && $sc_error_msg eq "") { print qq~

$sc_medium_font_begin Due to large number of fares quote requests our response time will be at least 24 hours. We will get back to you in the order we have received the requests. We truly appreciate your patience. $sc_medium_font_end

~ } } sub display_halfprice_promotion { print qq~
 Useful Travel Info.
FAQs
SPECIALS THIS MONTH
Airline Tollfree Numbers
CONTACT US
Feedback
Privacy Policy
Terms of use
IMPORTANT Travel Information
We are consolidators for most major airlines including
AIR INDIA
EMIRATES AIRLINES
JET AIRWAYS
KOREAN AIRWAYS
SINGAPORE AIRLINES
KINGFISHER

Mercury Trip - Travel Agency with best air fares. Mercury Trip is based in San Jose, the heart of Bay Area. The agency strives hard to get cheap tickets for our customers traveling to India China Middle East Europe Australia. Travel to India like a Maharaja and leave the flight arrangements with Mercury Trip. Corporate and business travel made easy with cheap tickets and 24X7 support. We can book hotels flights and short tours to any place in India with the best rates available.
Travel to Europe and book vacation packages from SOTC or Taj Tours with us and receive huge discounts. We pass on the discounts to the public with special negotiated rates due to the volume of the tickets we sell.
India Tour and Travel - Visit the exotic places in India (Kerala Backwaters, Bangalore, Delhi, Bombay/Mumbai, Chennai/Madras) and let Merury Trip be your tour guide. For great air fare deals on Emirates, Air France, Air India, Singapore Airlines, Lufthansa, Cathay Pacific or any other internaltional airlines or for tour packages to India please call the San Jose travel agency at 408 432 8747 or 510 573 5053.

~ } sub display_services_module { print qq~ ~; } sub display_deals_module { print qq~ Contact Information
Phone : 408 432 8747
Phone : 510 573 5053
India : 011 99 99 799963
travel@\mercurytrip.com
Join our Mailing List
Enter your email

Check Our Newsletters with current news and views from our experienced staff.
Follow us on Twitter for latest fare updates

~; local $pingboxid =0; local($dbh) = DBI->connect("dbi:mysql:mercurytrip","mercury","coral123") or die("Couldn't connect"); local($sth) = $dbh->prepare("select currentrequestid from currentrequest") or die("Couldn't prepare"); $sth->execute(); if($sth->rows == 0) { $sth = $dbh->prepare("insert into currentrequest select requestid from request where dateofrequest = current_date") or die("Couldn't prepare"); $sth->execute(); $sth->finish; } else { local ($resptr) = $sth->fetchrow_hashref(); $pingboxid = $resptr->{"currentrequestid"}; $sth->finish; $sth = $dbh->prepare("delete from currentrequest where currentrequestid = $pingboxid") or die("Couldn't prepare"); $sth->execute(); $sth->finish; } if ($pingboxid == 1) { print qq~ ~; } if ($pingboxid == 2) { print qq~ ~; } if ($pingboxid == 3) { print qq~ ~; } if ($pingboxid == 4) { print qq~ ~; } if ($pingboxid == 5) { print qq~ ~; } print qq~
~; } sub display_mercury_end_page { print qq~

Cheapest Airline Tickets   Cheap Airline Tickets to India   Cheap Airline Tickets to Bombay
Discount Air travel to India   Airfares to India   Cheap Airline Tickets to Hyderabad
Travel to India   Cheap Airfares to Madras   Discount International Airfares
Cheap flights to India   Cheap Airline tickets to Dubai   Discount Travel

Home
 | About Us  | Contact Us  | Privacy Policy  | Terms of Use  | WE ARE HIRING
Address : 1901 O'Toole Way, San Jose, CA 95131 Near San Jose Airport ph: 408 432 8747
Address : Mercury Air Trip Pvt. Ltd Plot No 917, Tulsi Tower, Shop No 1, Near DLF Phase 4, Gurgaon-122002, Haryana ph: 99-99-012-123
Copyright © 2005 Mercury TripTM. All rights reserved. MercuryTrip logo is a trademark of Mercury TripTM in the U.S. and other countries.
Mercury Trip is Registered with State of California as a Seller of Travel.
Mercury Trip is IATAN certified.
Mercury Trip is ARC accredited.
~; } sub require_supporting_libraries { print "require_supporting_libraries"; # The incoming file and line arguments are split into # the local variables $file and $line while the file list # is assigned to the local list array @require_files. # # $require_file which will just be a temporary holder # variable for our foreach processing is also defined as a # local variable. local ($file, $line, @require_files) = @_; local ($require_file); print "require_supporting_libraries end1"; # Next, the script checks to see if every file in the # @require_files list array exists (-e) and is readable by # it (-r). If so, the script goes ahead and requires it. local $i =0 print "Start $i"; foreach $require_file (@require_files) { print "$i test"; i++; } foreach $require_file (@require_files) { if (-e "$require_file" && -r "$require_file") { require "$require_file"; } # If not, the scripts sends back an error message that # will help the admin isolate the problem with the script. else { print "I am sorry but I was unable to require $require_file at line $line in $file. Would you please make sure that you have the path correct and that the permissions are set so that I have read access? Thank you."; exit; } } # End of foreach $require_file (@require_files) print "require_supporting_libraries end2"; } # End of sub require_supporting_libraries sub read_and_parse_form_data { &ReadParse(*form_data); } sub error_check_form_data { foreach $file_extension (@acceptable_file_extensions_to_display) { if ($page =~ /$file_extension/ || $page eq "") { $valid_extension = "yes"; } } if ($valid_extension ne "yes") { print "$sc_page_load_security_warning"; &update_error_log("PAGE LOAD WARNING", __FILE__, __LINE__); exit; } } sub update_error_log { local ($type_of_error, $file_name, $line_number) = @_; local ($log_entry, $email_body, $variable, @env_vars); # The list of the HTTP environment variables are culled # into the @env_vars list array and get_date is used to # assign the current date to $date @env_vars = keys(%ENV); $date = &get_date; # Now, if the admin has instructed the script to log # errors by setting $sc_shall_i_log_errors in # web_store.setup, the script will create an error log # entry. if ($sc_shall_i_log_errors eq "yes") { # First, the new log entry row is created as a pipe # delimited list beginning with the error type, filename, # line number and current date. $log_entry = "$type_of_error\|FILE=$file_name\|LINE=$line_number\|"; $log_entry .= "DATE=$date\|"; # Then the error log file is opened securely by using the # lock file routines in get_file_lock discussed later. &get_file_lock("$sc_error_log_path.lockfile"); open (ERROR_LOG, ">>$sc_error_log_path") || &CgiDie ("The Error Log could not be opened"); # Now, the script adds to the log entry row, the values # associated with all of the HTTP environment variables # and prints the whole row to the log file which it then # closes and opens for use by other instances of this # script by removing the lock file. foreach $variable (@env_vars) { $log_entry .= "$ENV{$variable}\|"; } print ERROR_LOG "$log_entry\n"; close (ERROR_LOG); &release_file_lock("$sc_error_log_path.lockfile"); } # End of if ($sc_shall_i_log_errors eq "yes") # Next, the script checks to see if the admin has # instructed it to also send an email error notification # to the admin by setting the $sc_shall_i_email_if_error # in web_store.setup. # # If so, it prepares an email with the same info contained # in the log file row and mails it to the admin using the # send_mail routine in mail-lib.pl. Note that a common # source of email errors lies in the admin not setting the # correct path for sendmail in mail-lib.pl on line 42. # Make sure that you set this variable there if you are # not receiving your mail and you are using the sendmail # version of the mail-lib package. if ($sc_shall_i_email_if_error eq "yes") { $email_body = "$type_of_error\n\n"; $email_body .= "FILE = $file_name\n"; $email_body .= "LINE = $line_number\n"; $email_body .= "DATE=$date\|"; foreach $variable (@env_vars) { $email_body .= "$variable = $ENV{$variable}\n"; } &send_mail("$sc_admin_email", "travel\@mercurytrip.com", "Web Store Error", "$email_body"); } # End of if ($sc_shall_i_email_if_error eq "yes") } sub get_date { # The subroutine begins by defining some local working # variables local ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst,$date); local (@days, @months); @days = ('Sunday','Monday','Tuesday','Wednesday','Thursday', 'Friday','Saturday'); @months = ('January','February','March','April','May','June','July', 'August','September','October','November','December'); # Next, it uses the localtime command to get the current # time, from the value returned by the time # command, splitting it into variables. ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); # Then the script formats the variables and assign them to # the final $date variable. Note that $sc_current_century # is defined in web_store.setup. Since the 20th century # is really 1900-1999, we'll need to subtract 1 from this # value in order to format the year correctly. if ($hour < 10) { $hour = "0$hour"; } if ($min < 10) { $min = "0$min"; } if ($sec < 10) { $sec = "0$sec"; } $year = ($sc_current_century-1) . "$year"; $date = "$days[$wday], $months[$mon] $mday, $year at $hour\:$min\:$sec"; return $date; } sub get_file_lock { local ($lock_file) = @_; local ($endtime); $endtime = 20; $endtime = time + $endtime; # We set endtime to wait 20 seconds. If the lockfile has # not been removed by then, there must be some other # problem with the file system. Perhaps an instance of # the script crashed and never could delete the lock file. while (-e $lock_file && time < $endtime) { sleep(1); } open(LOCK_FILE, ">$lock_file") || &CgiDie ("I could not open the lock file: $lock_file"); # Note: If flock is available on your system, feel free to # use it. flock is an even safer method of locking your # file because it locks it at the system level. The above # routine is "pretty good" and it will server for most # systems. But if you are lucky enough to have a server # with flock routines built in, go ahead and uncomment # the next line and comment the one above. # flock(LOCK_FILE, 2); # 2 exclusively locks the file } sub release_file_lock { local ($lock_file) = @_; # flock(LOCK_FILE, 8); # 8 unlocks the file # As we mentioned in the discussion of get_file_lock, # flock is a superior file locking system. If your system # has it, go ahead and use it instead of the hand rolled # version here. Uncomment the above line and comment the # two that follow. close(LOCK_FILE); unlink($lock_file); } sub security_test { # Next let's figure out where the form that is requesting our attention # is located. We'll do this by accessing the environment variable # $ENV{'HTTP_REFERER'} which is equal to the url of the form in question # (ie: http://www.foobar.com/Feedback/feedback.html). We are going to take # that value and split it up into separate variables for every occurance of # "/". We do this in order to isolate www.foobar.com which we can compare # to the value of $your_server_name. Thus $referring_server is the # only varriable here we actually give a hoot about. If they are # not the same, the script # is being accessed by a form on another server. ($http, $empty, $referring_server, @path) = split (/\//, $ENV{'REFERER'}); # Now if the $restricted_use has been set to yes, "and" the # $referring_server is not the same as $your_server_name it means that we # have had an illegal attempted access and we will deny the use of this # script. if ($restricted_use eq "yes") { if ($referring_server ne "$your_server_name") { # &html_header("Form Error - Wrong Server"); &display_mercury_begin_page; print "I'm sorry, you are not allowed to use this form processing script from a server other than $your_server_name

"; print "As far as I can tell, you are coming from: $referring_server"; print "

$restricted_use = restricted use
"; &display_mercury_end_page; #print ""; exit; } } } # End of security_test