#!/usr/bin/perl #------- AJOUT MESSAGE use DBI; use CGI qw(:standard); use strict; # Now redirect errors to file #open (STDERR, ">test.stderr") || die ("open STDERR output file test.stderr failed"); # -------------------------------------------------------------------------- # Lit les variables CGI # -------------------------------------------------------------------------- my $Code = param ("Code"); (my $dbh = DBI->connect( "DBI:mysql:pariserve:localhost", "xorne", "klm")) or (print ("ERREUR DANS L'OUVERTURE DE BASE: Contacter l'administrateur merci.") and die "##### ERREUR DANS L'EXECUTE ##### : $DBI::errstr\n"); my $cursor = $dbh->prepare( "SELECT code, nom, area, etoile, name1, prix1, name2, prix2, name3, prix3, name4, prix4, name5, prix5, name6, prix6 FROM hotelny WHERE code='$Code'"); ($cursor->execute) or (print ("ERREUR DANS LA REQUETE (select_hotelny) : Contacter l'administrateur Merci.") and die "##### ERREUR DANS L'EXECUTE ##### : $DBI::errstr\n"); (my $code, my $nom, my $area, my $etoile, my $name1, my $prix1, my $name2, my $prix2, my $name3, my $prix3, my $name4, my $prix4, my $name5, my $prix5, my $name6, my $prix6) = $cursor->fetchrow; # ----------------------------------------------------------------------- # set level debugging du DBI. Set to 0 .. 4. # ----------------------------------------------------------------------- # DBI->internal->{DebugDispatch} = 1; #------------- PAGE HTML ET REQUETES ------------------------------------ #my $Design2 = $Design; #$Design2 =~ s/ /%20/g; # remplace les espaces par des %20 #$Design2 =~ s/\+/%2B/g; # remplace les espaces par des %20 print < Reservation Form




Please fill up this form. Your request will be processed within 24 hours (48 hours during week-end) and you will receive a confirmation by E-Mail or by fax.
IMPORTANT: this form is secured. All the informations are encrypted.
Reservation depending on the hotel must generaly be cancelled 48 hours before your arrival


Last Name	: 
First Name	: 
Company		: 
Adress		: 
Zip Code    	: 
City		: 
Country		: 
Tel		: 
Fax		: 
E-mail		: 

HOTEL NAME : $nom
FIN_HTML

if ($prix1 > 0) {
    print("Number of $name1 rooms : ");
    print("  (list price for info : $prix1 USD)
"); } if ($prix2 > 0) { print("Number of $name2 rooms : "); print(" (list price for info : $prix2 USD)
"); } if ($prix3 > 0) { print("Number of $name3 rooms : "); print(" (list price for info : $prix3 USD)
"); } if ($prix4 > 0) { print("Number of $name4 rooms : "); print(" (list price for info : $prix4 USD)
"); } if ($prix5 > 0) { print("Number of $name5 rooms : "); print(" (list price for info : $prix5 USD)
"); } if ($prix6 > 0) { print("Number of $name6 rooms : "); print(" (list price for info : $prix6 USD)
"); } print < Number of Child. : (under 12)

ARRIVAL DATE :
DEPARTURE DATE :
Special request : FIN_HTML print("

"); print("

");