//include("inc/smtp.php"); include("inc/smtp_sendgrid.php"); include_once("inc/big5_func/big5_func.inc"); session_start(); $tid= session_id().date('YmdHis'); date_default_timezone_set( "Asia/Hongkong" ); $today = date("Y-m-d H:i:s",mktime (date(H), date(i), date(s), date(m), date(d), date(Y))); $today2 = date("Y-m-d",mktime (date(H), date(i), date(s), date(m), date(d), date(Y))); //$rentaltype["Chauffeur"]=array("rentaltype","periodfrom","periodfromtime","periodto","periodtotime","chauffeur_Cartype","Pickup_Address_Chauffeur","Dropoff_Address_Chauffeur","passengers","title","firstname","lastname","company","areacode","contactno","email"); $rentaltype["Chauffeur"]=array("rentaltype","Chauffeur_periodfrom","Chauffeur_periodfromtime","Chauffeur_periodto","Chauffeur_periodtotime","Chauffeur_carmodel","Pickup_Address_Chauffeur","passengers","title","firstname","lastname","company","areacode","contactno","email"); $rentaltype["Long Term Lease"]=array("rentaltype","periodfrom","noofyear","prefer","title","firstname","lastname","company","areacode","contactno","email"); $rentaltype["Vehicle rental"]=array("rentaltype","pickup","Delivery_Address","drop","Return_Address","carmodel","specialrequest","car_rental_Special_request_box","car_rental_periodfrom","car_rental_periodfromtime","car_rental_periodto","car_rental_periodtotime","title","firstname","lastname","company","areacode","contactno","email"); $rentaltype["Point-to-point"]=array("rentaltype","p2p_periodfrom","p2p_periodfromtime","p2p_carmodel","Pickup_Address_p2p","Dropoff_Address_p2p","passengers","title","firstname","lastname","company","areacode","contactno","email"); $rentaltype["Macau-HK Limo Service"]=array("rentaltype","HMZ_periodfrom","HMZ_periodfromtime","chauffeur_Cartype","HMZ_Pickup_Address","HMZ_Dropoff_Address","title","firstname","lastname","company","areacode","contactno","email"); $message = '
Hi,
'; $status=0; $count =0; $valid=0; $rentaltype_key = $_POST['rentaltype']; $ip = $_SERVER['REMOTE_ADDR']; $REFERER = $_SERVER['HTTP_REFERER']; $message .= 'Order '.$today.':
'; $message .= 'IP from ['.$ip.']
'; $message .= 'Long IP from ['.ip2long($ip).']
'; $message .= 'REFERER ['.$REFERER.']
'; if($rentaltype_key == "Vehicle rental"){ //自駕租車 $strStart = $_POST['car_rental_periodfrom'].$_POST['car_rental_periodfromtime']; $strEnd = $_POST['car_rental_periodto'].$_POST['car_rental_periodtotime']; $date1=date_create($strStart); $date2=date_create($strEnd); $diff=date_diff($date1,$date2); $message .=$diff->format("%R%a day(s) %h hour(s) Booking"); } if($rentaltype_key == "Chauffeur"){ //Chauffeur $strStart = $_POST['periodfrom'].$_POST['periodfromtime']; $strEnd = $_POST['periodto'].$_POST['periodtotime']; $date1=date_create($strStart); $date2=date_create($strEnd); $diff=date_diff($date1,$date2); $message .=$diff->format("%R%a day(s) %h hour(s) Booking"); } $message .= '| '.$key.' | '; if (is_array($value)){ $message .= '';
foreach ($value as $sub_key => $sub_value){
$message .= $sub_value.' '; } $message .= ' | ';
}else {
$message .= ''.$value.' | '; } $message .= '