G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php $hid = $_GET['hid']; $cid = $_GET['cid']; include('config.php'); $result = $js->prepare('SELECT * FROM `customer_entry` WHERE `id` = :cid'); $result->execute(array(':cid' => $cid)); while($row = $result->fetch(PDO::FETCH_ASSOC)) { $id = $row['id']; $custname = $row['custname']; $nation = $row['nationality']; $pax = $row['pax']; } $result1 = $js->prepare('SELECT * FROM `hotelreservations` WHERE custid = :cid AND id = :hid'); $result1->execute(array(':cid' => $cid, ':hid' => $hid)); while($row1 = $result1->fetch(PDO::FETCH_ASSOC)) { $id = $row1['id']; $hotel = $row1['hotel']; $result2 = $js->prepare('SELECT * FROM `hotelvendor` WHERE id = :hotel '); $result2->execute(array(':hotel' => $hotel)); while($row2 = $result2->fetch(PDO::FETCH_ASSOC)) { $hotelname = $row2['hotelname']; $location = $row2['location']; $category = $row2['category']; $hotelemail = $row2['hotelemail']; $hotelemails = $row2['salesemail']; } $roomtype = $row1['roomtype']; $addservices = $row1['addservices']; $meals = $row1['meals']; $indate = $row1['cindate']; $outdate = $row1['coutdate']; $rooms = $row1['norooms']; $ebs = $row1['noebs']; if($ebs == '') { $totalacc = $rooms." Room(s)"; } else { $totalacc = $rooms." + ".$ebs."Extra-Bed"; } $days = daysDifference($outdate,$indate); $cindate = date('d-m-Y', strtotime($indate)); $coutdate = date('d-m-Y', strtotime($outdate)); } require("PHPMailer/class.phpmailer.php"); require("PHPMailer/class.smtp.php"); require("language/phpmailer.lang-en.php"); $your_smtp = "relay-hosting.secureserver.net"; $your_smtp_user = "support@thefalconexpeditions.com"; $your_smtp_pass = "Falcon@1234"; $mail = new PHPmailer(); $mail->From = 'reservations@thefalconexpeditions.com'; $mail->FromName = 'Reservations - The Falcon Expeditions'; //$mail->SetFrom("reservations@thefalconexpeditions.com","my name", 0); $mail->isSMTP(); $mail->Host = 'relay-hosting.secureserver.net'; $mail->SMTPAuth = false; $mail->SMTPAutoTLS = false; $mail->Port = 25; $mail->IsHTML(true); $mail->Password = $your_smtp_pass; $mail->Username = $your_smtp_user; $mail->AddAddress($hotelemail, $hotelname); if($hotelemails != ' ') { $mail->AddCC($hotelemails, $hotelname); } $mail->AddBCC('support@thefalconexpeditions.com', 'Sales - The Falcon Expeditions'); $mail->AddBCC('reservations@thefalconexpeditions.com', 'Reservations - The Falcon Expeditions'); $mail->AddCC('james@thefalconexpeditions.com', 'James - The Falcon Expeditions'); //$mail->AddEmbeddedImage('images/falconlogo.png', 'logo'); $mail->Subject = "Room Reservation - $custname X $pax"; $comments = " <html> <head><link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'></head> <body style='color:#0B5394;'> <p>Dear Team</p> <p>Greetings from THE FALCON EXPEDITIONS.<br /> </p> <p>Please confirm the below reservation.</p> <table style='width:100%; border-collapse:collapse;' border='1' cellpadding='5' cellspacing='5'> <tr> <td>Guest Name </td> <td> : $custname</td> </tr> <tr> <td>Nationality</td> <td> : $nation</td> </tr> <tr> <td>No of Pax</td> <td> : $pax</td> </tr> <tr> <td>Location</td> <td> : $location </tr> <tr> <td>Hotel Name</td> <td> : $hotelname</td> </tr> <tr> <td>Check-In Date</td> <td>: $cindate</td> </tr> <tr> <td>Check-Out Date</td> <td>: $coutdate</td> </tr> <tr> <td>No of Nights</td> <td> : $days Night(s)</td> </tr> <tr> <td>Room Type</td> <td> : $roomtype</td> </tr> <tr> <td>No. of Rooms</td> <td> : $totalacc </td> </tr> <tr> <td>Meals Included</td> <td> : $meals </td> </tr> <tr> <td>Additional Services</td> <td>: $addservices</td> </tr> </table> <p> Please CONFIRM the booking and revert with confirmation number and net payable amount at the earliest.</p> <p><br /> </p> <p>Thanking You <br /> </p> <p>Anee<br> Reservations Department<br /> </p> <p>FALCON EXPEDITIONS TRADE LLC.<br aria-hidden='true' /> PO Box: 102 , Postal Code: 114<br aria-hidden='true' /> Muscat, Sultanate of Oman<br aria-hidden='true' /> Contact: + 968 7719 0959 | 941 55255<br aria-hidden='true' /> Email: <a href='mailto:support@thefalconexpeditions.com'>support@thefalconexpeditions.com</a> | <a href='http://www.thefalconexpeditions.com'>www.thefalconexpeditions.com</a></p> </body> </html>"; $res = 'Mail Sent to Hotel'; $sql1 = $js->prepare('UPDATE hotelreservations SET res_status = :res WHERE custid = :cid AND id = :hid'); $status1 = $sql1->execute(array(':res' => $res, ':hid' => $hid, ':cid' => $cid)); echo $comments; $mail->Body = $comments; if (!$mail->Send()) { echo "<p>There was an error in sending mail, please try again at a later time</p>".$mail->ErrorInfo; } else { } // To send HTML mail, the Content-type header must be set /*$headers[] = 'MIME-Version: 1.0'; $headers[] = 'Content-type: text/html; charset=iso-8859-1'; $subject = 'Room Reservation - '.$custname.' X '.$pax; $to = $hotelemail; $headers[] = 'To: '.$hotelname.' <'.$hotelemail.'>'; if($hotelemails != ' ') { $headers[] = 'To: '.$hotelname.' <'.$hotelemails.'>'; } $headers[] = 'From: Reservations - Falcon Expeditions <reservations@thefalconexpeditions.com>'; $headers[] = 'Cc: james@thefalconexpeditions.com'; $headers[] = 'Cc: khalid@thefalconexpeditions.com'; $headers[] = 'BCc: support@thefalconexpeditions.com'; mail($to, $subject, $comments, implode("\r\n", $headers)); */ ?> <script type="text/javascript"> alert("Have sent mail !! "); window.location = "hotelsforcustomers.php?cid=<?php echo $cid?>";</script> <?php function daysDifference($endDate, $beginDate) { //explode the date by "-" and storing to array $date_parts1=explode("-", $beginDate); $date_parts2=explode("-", $endDate); //gregoriantojd() Converts a Gregorian date to Julian Day Count $start_date=gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]); $end_date=gregoriantojd($date_parts2[1], $date_parts2[2], $date_parts2[0]); return $end_date - $start_date; } ?>