"; //print_r($_POST); //echo ""; if ($reset == 1){ $_SESSION['id'] = $_GET['id']; $_SESSION['start'] = $_GET['start']; $_SESSION['end'] = $_GET['end']; $_SESSION['birthday'] = ''; } if (!$id || !$start || !$end){ Header ("Location: rent.php"); } $IMAGES_URL = str_replace( $_SERVER["DOCUMENT_ROOT"], "", $PATH_CARS_IMAGES); $IMAGES_URL_TN = str_replace( $_SERVER["DOCUMENT_ROOT"], "", $PATH_CARS_IMAGES_THUMBNAILS); $SELECT_CAR = mysql_query("SELECT * FROM cars WHERE id = '$id' ", $db); $CAR = mysql_fetch_array($SELECT_CAR); if ($_POST['submit'] == '1'){ $ERROR = 0; if ( $_POST['Name'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'Ονοματεπώνυμο'
"; } if ( $_POST['Address'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'Διεύθυνση'
"; } if ( $_POST['City'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'Πόλη'
"; } if ( $_POST['Postal'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'Τ.Κ. (Ταχυδρομικός Κώδικας)'
"; } if ( $_POST['Phone'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'Σταθερό Τηλέφωνο'
"; } if ( $_POST['Email'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'Email'
"; } if ( $_POST['Birth_mixed'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'Ημ. Γέννησης'
"; }else{ $BIRTH = explode ("-", $_POST['Birth_mixed']); $birthday = mktime(0, 0, 0, $BIRTH[1], $BIRTH[2], $BIRTH[0]); if ($birthday > time()-756864000 ){ $ERROR = 1; $msg = "Πρέπει να είστε πάνω από 24 χρονών για να κάνετε κράτηση.
"; } } if ($_POST['company_ok']){ if ( $_POST['Company'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'Επωνυμία'
"; } if ( $_POST['Job'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'Επάγγελμα'
"; } if ( $_POST['Afm'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'ΑΦΜ'
"; } if ( $_POST['Doy'] == '' ){ $ERROR = 1; $msg = "Πρέπει να συμπληρώσετε το πεδίο 'ΔΟΥ'
"; } } $ARRIVAL = explode ("-", $_POST['Arrival_mixed']); $arrival_date = mktime(0, 0, 0, $ARRIVAL[1], $ARRIVAL[2], $ARRIVAL[0]); $DEPARTURE = explode ("-", $_POST['Departure_mixed']); $departure_date = mktime(0, 0, 0, $DEPARTURE[1], $DEPARTURE[2], $DEPARTURE[0]); if ($_POST['Arrival_loc'] == 'myplace'){ $myplace = 1; }elseif ($_POST['Arrival_loc']){ $myplace = 2; }else{ $myplace = 0; } if ($ERROR == 0){ /* Header ("Location: checkout.php?id=$id&start=$start&end=$end&Name=". urlencode($_POST['Name']) . "&Address=". urlencode($_POST['Address']) . "&City=". urlencode($_POST['City']) . "&Postal=". urlencode($_POST['Postal']) . "&Phone=". urlencode($_POST['Phone']) ."&Mobile=". urlencode($_POST['Mobile']) . "&Email=". urlencode($_POST['Email']) . "&birthday=" . urlencode($birthday) . "&company_ok=$_POST[company_ok]&Company=". urlencode($_POST['Company']) . "&Job=". urlencode($_POST['Job']) . "&Afm=". urlencode($_POST['Afm']) . "&Doy=". urlencode($_POST['Doy']) ); */ $_SESSION['id'] = $id; $_SESSION['start'] = $start; $_SESSION['end'] = $end; $_SESSION['Name'] = $_POST['Name']; $_SESSION['Address'] = $_POST['Address']; $_SESSION['City'] = $_POST['City']; $_SESSION['Postal'] = $_POST['Postal']; $_SESSION['Phone'] = $_POST['Phone']; $_SESSION['Mobile'] = $_POST['Mobile']; $_SESSION['Email'] = $_POST['Email']; $_SESSION['birthday'] = $birthday; $_SESSION['company_ok'] = $company_ok; $_SESSION['Company'] = $_POST['Company']; $_SESSION['Job'] = $_POST['Job']; $_SESSION['Afm'] = $_POST['Afm']; $_SESSION['Doy'] = $_POST['Doy']; $_SESSION['Arrival_date'] = $arrival_date; $_SESSION['Arrival_time'] = $_POST['Arrival_time']; $_SESSION['Arrival_loc'] = $_POST['Arrival_loc']; $_SESSION['Departure_loc'] = $_POST['Departure_loc']; $_SESSION['Ship_plane'] = $_POST['Ship_plane']; $_SESSION['Hotel_name'] = $_POST['Hotel_name']; $_SESSION['Hotel_address'] = $_POST['Hotel_address']; $_SESSION['Hotel_telephone'] = $_POST['Hotel_telephone']; $_SESSION['Delivery_time'] = $_POST['Delivery_time']; $_SESSION['Departure_date'] = $departure_date; //$_SESSION['Departure_time'] = $_POST['Departure_time']; $_SESSION['myplace'] = $myplace; Header("Location: checkout.php"); } } function ipologise_price($start, $end, $id){ global $db; //Select car $SELECT_CAR = mysql_query("SELECT * FROM cars WHERE id = '$id' ", $db); $CAR = mysql_fetch_array($SELECT_CAR); //Select Cat Category $SELECT_CAT = mysql_query("SELECT * FROM cars_categories WHERE id = '$CAR[Cat_id]' ", $db); $CAT = mysql_fetch_array($SELECT_CAT); if ( date("F", $start)=='July' || date("F", $start)=='August' || date("F", $end)=='July' || date("F", $end)=='August' ){ $day1_price = $CAT['Day1_high']; $day3_price = $CAT['Day3_high']; $day5_price = $CAT['Day5_high']; $day7_price = $CAT['Day7_high']; $day14_price = $CAT['Day14_high']; $day_extra_price = $CAT['Extra_day_high']; }else{ $day1_price = $CAT['Day1']; $day3_price = $CAT['Day3']; $day5_price = $CAT['Day5']; $day7_price = $CAT['Day7']; $day14_price = $CAT['Day14']; $day_extra_price = $CAT['Extra_day']; } $rent_days_time = $end - $start; $rent_days = $rent_days_time / 86400; if (round ($rent_days) == 1){ $PRICE = $day1_price; $DAYS = 1; }elseif(round ($rent_days) == 2){ $PRICE = $day1_price + $day_extra_price; $DAYS = 2; }elseif(round ($rent_days) == 3){ $PRICE = $day3_price; $DAYS = 3; }elseif(round ($rent_days) == 4){ $PRICE = $day3_price + $day_extra_price; $DAYS = 4; }elseif(round ($rent_days) == 5){ $PRICE = $day5_price; $DAYS = 5; }elseif(round ($rent_days) == 6){ $PRICE = $day5_price + $day_extra_price; $DAYS = 6; }elseif(round ($rent_days) == 7){ $PRICE = $day7_price; $DAYS = 7; }elseif(round ($rent_days) == 8){ $PRICE = $day7_price + $day_extra_price; $DAYS = 8; }elseif(round ($rent_days) == 9){ $PRICE = $day7_price + $day_extra_price + $day_extra_price; $DAYS = 9; }elseif(round ($rent_days) == 10){ $PRICE = $day7_price + $day_extra_price + $day_extra_price + $day_extra_price; $DAYS = 10; }elseif(round ($rent_days) == 11){ $PRICE = $day7_price + $day_extra_price + $day_extra_price + $day_extra_price + $day_extra_price; $DAYS = 11; }elseif(round ($rent_days) == 12){ $PRICE = $day7_price + $day_extra_price + $day_extra_price + $day_extra_price + $day_extra_price + $day_extra_price; $DAYS = 12; }elseif(round ($rent_days) == 13){ $PRICE = $day7_price + $day_extra_price + $day_extra_price + $day_extra_price + $day_extra_price + $day_extra_price + $day_extra_price; $DAYS = 13; }elseif(round ($rent_days) == 14){ $PRICE = $day14_price; $DAYS = 13; }elseif(round ($rent_days) > 14){ $rest_days = round ($rent_days) - 14; for ($i = 1; $i <= $rest_days; $i++) { $rest = $rest + $day_extra_price; } $PRICE = $day14_price + $rest; $DAYS = round ($rent_days); } return $PRICE . "---" . $DAYS; } //echo ipologise_price($start, $end, $id); $PR = explode("---", ipologise_price(urldecode($start), urldecode($end), urldecode($id)) ); $PRICE = $PR[0]; $DAYS = $PR[1]; if ($_SESSION['birthday']){ $Birth_year = date("Y", $_SESSION['birthday']); $Birth_day = date("j", $_SESSION['birthday']); $Birth_month = date("m", $_SESSION['birthday']); $Birth = $Birth_year . "-" . $Birth_month . "-" . $Birth_day; }else{ $Birth_year = ''; $Birth = "1980-01-01"; } //echo $_SESSION['Arrival_date']; //echo "
";
//print_r($_SESSION);
//echo "
"; $Arrival_day = date("j", $arrival_date); $Arrival_month = date("m", $arrival_date); $Arrival_year = date("Y", $arrival_date); if ($Arrival_year == '1970'){ $Arrival_year = date("Y"); } $Arrival = $Arrival_year . "-" . $Arrival_month . "-" . $Arrival_day; $Departure_day = date("j",$departure_date); $Departure_month = date("m", $departure_date); $Departure_year = date("Y", $departure_date); if ($Departure_year == '1970'){ $Departure_year = date("Y"); } $Departure = $Departure_year . "-" . $Departure_month . "-" . $Departure_day; //SET LOW/HIGH SEASON VAR if ( date("F", $start)=='July' || date("F", $start)=='August' || date("F", $end)=='July' || date("F", $end)=='August' ){ $HIGH = 1; }else{ $HIGH = 0; } ?> Skoutelis Rent a car
Skoutelis - Rent a Car

 
Client Details
Fullname*:
Address*:
City*:
Postal Code *:
Telephone*:
Mobile Phone:
E-Mail:
Birthday*:
 
Company Details
I own a company: >
Company Name :
Occupation:
VAT Number:
VAT Agency:
 
Other Details

     » Delivery at your Arrival Place
     (*The delivery at Heraklion from 9:00 until 21:00 is free)

Arrival Date :
Arrival Time :
Arrival Place :
Ship Name or Flight Number:
Departure Place :
Delivery back Time :
Departure Date :
 

     » Delivery at your Accomodation
     (*The delivery at Heraklion from 9:00 until 21:00 is free)

Hotel Name :
Address & City:
Hotel Telephone :
 
 
Rent Details
Rent from: 1, January, 1970
Rent Until : 1, January, 1970
Days of Rent:
Period:
Cost: 0€