Compare commits
6 Commits
bcab4da5b5
...
main
Author | SHA1 | Date | |
---|---|---|---|
593ded873b | |||
74918dacd7 | |||
07aa3e1643 | |||
f3e88e83a9 | |||
db1ebe2088 | |||
bce46e1ad5 |
@ -9,6 +9,12 @@
|
|||||||
# RewriteCond %{THE_REQUEST} \s/+(.*?)\.php[\s?] [NC]
|
# RewriteCond %{THE_REQUEST} \s/+(.*?)\.php[\s?] [NC]
|
||||||
# RewriteRule ^ /%1 [R=301,L,NE]
|
# RewriteRule ^ /%1 [R=301,L,NE]
|
||||||
|
|
||||||
|
<Files "mailBooking.php">
|
||||||
|
RewriteEngine Off
|
||||||
|
</Files>
|
||||||
|
<Files "mailContact.php">
|
||||||
|
RewriteEngine Off
|
||||||
|
</Files>
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
DirectoryIndex index.php
|
DirectoryIndex index.php
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<p>Fill your requirement to us. We will check your request and contact you soon.</p>
|
<p>Fill your requirement to us. We will check your request and contact you soon.</p>
|
||||||
</div>
|
</div>
|
||||||
<form action="mailBooking.php" id="contact-form" method="POST" class="contact-form-items">
|
<form action="mailBooking.php" id="contact-form" method="POST" class="contact-form-items">
|
||||||
</form>
|
|
||||||
<input type="hidden" name="car_name" value="beetle">
|
<input type="hidden" name="car_name" value="beetle">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Name Field -->
|
<!-- Name Field -->
|
||||||
@ -115,7 +115,7 @@
|
|||||||
<div class="car-image">
|
<div class="car-image">
|
||||||
<img src="img/Cars/beetle.jpg" alt="Peugeot 308">
|
<img src="img/Cars/beetle.jpg" alt="Peugeot 308">
|
||||||
</div>
|
</div>
|
||||||
<div class="car-content">
|
<!-- <div class="car-content">
|
||||||
<div class="star">
|
<div class="star">
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
@ -131,7 +131,7 @@
|
|||||||
themselves.
|
themselves.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -113,8 +113,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="social-icon d-flex align-items-center">
|
<div class="social-icon d-flex align-items-center">
|
||||||
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
||||||
<a href="https://www.viber.com/" target="blank"><i class="fab fa-viber"></i></a>
|
<a href="viber://add?number=9801136594" target="blank" onclick="window.location.href='https://www.viber.com/download/'; return false;"><i class="fab fa-viber"></i></a>
|
||||||
<a href="https://www.whatsapp.com/" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
<a href="https://wa.me/9801136594" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -499,3 +499,6 @@ a:hover {
|
|||||||
width: 100%; /* Adjust the width */
|
width: 100%; /* Adjust the width */
|
||||||
height: 100%; /* Maintain aspect ratio */
|
height: 100%; /* Maintain aspect ratio */
|
||||||
}
|
}
|
||||||
|
footer a:hover{
|
||||||
|
text-decoration: underline !important;
|
||||||
|
}
|
@ -15,8 +15,8 @@
|
|||||||
<div class="social-icon d-flex align-items-center wow fadeInUp" data-wow-delay="
|
<div class="social-icon d-flex align-items-center wow fadeInUp" data-wow-delay="
|
||||||
.5s">
|
.5s">
|
||||||
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
||||||
<a href="https://www.viber.com/" target="blank"><i class="fab fa-viber"></i></a>
|
<a href="viber://add?number=9801136594" target="blank" onclick="window.location.href='https://www.viber.com/download/'; return false;"><i class="fab fa-viber"></i></a>
|
||||||
<a href="https://www.whatsapp.com/" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
<a href="https://wa.me/9801136594" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -47,8 +47,8 @@
|
|||||||
<div class="social-icon d-flex align-items-center wow fadeInUp" data-wow-delay="
|
<div class="social-icon d-flex align-items-center wow fadeInUp" data-wow-delay="
|
||||||
.5s">
|
.5s">
|
||||||
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
||||||
<a href="https://www.viber.com/" target="blank"><i class="fab fa-viber"></i></a>
|
<a href="viber://add?number=9801136594" target="blank" onclick="window.location.href='https://www.viber.com/download/'; return false;"><i class="fab fa-viber"></i></a>
|
||||||
<a href="https://www.whatsapp.com/" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
<a href="https://wa.me/9801136594" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
<div class="car-image">
|
<div class="car-image">
|
||||||
<img src="img/Cars/ford_ecosport_trend.jpg" alt="Peugeot 308">
|
<img src="img/Cars/ford_ecosport_trend.jpg" alt="Peugeot 308">
|
||||||
</div>
|
</div>
|
||||||
<div class="car-content">
|
<!-- <div class="car-content">
|
||||||
<div class="star">
|
<div class="star">
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
@ -131,6 +131,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -151,8 +151,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="social-icon d-flex align-items-center">
|
<div class="social-icon d-flex align-items-center">
|
||||||
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
||||||
<a href="https://www.viber.com/" target="blank"><i class="fab fa-viber"></i></a>
|
<a href="viber://add?number=9801136594" target="blank" onclick="window.location.href='https://www.viber.com/download/'; return false;"><i class="fab fa-viber"></i></a>
|
||||||
<a href="https://www.whatsapp.com/" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
<a href="https://wa.me/9801136594" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -185,8 +185,8 @@
|
|||||||
</ul> -->
|
</ul> -->
|
||||||
<div class="social-icon d-flex align-items-center">
|
<div class="social-icon d-flex align-items-center">
|
||||||
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
||||||
<a href="https://www.viber.com/" target="blank"><i class="fab fa-viber"></i></a>
|
<a href="viber://add?number=9801136594" target="blank" onclick="window.location.href='https://www.viber.com/download/'; return false;"><i class="fab fa-viber"></i></a>
|
||||||
<a href="https://www.whatsapp.com/" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
<a href="https://wa.me/9801136594" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
<div class="car-image">
|
<div class="car-image">
|
||||||
<img src="img/Cars/honda city.jpg" alt="Peugeot 308">
|
<img src="img/Cars/honda city.jpg" alt="Peugeot 308">
|
||||||
</div>
|
</div>
|
||||||
<div class="car-content">
|
<!-- <div class="car-content">
|
||||||
<div class="star">
|
<div class="star">
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
@ -123,7 +123,7 @@
|
|||||||
To deliver on the promise of technology and human We help our clients become sions of themselves.
|
To deliver on the promise of technology and human We help our clients become sions of themselves.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -203,7 +203,6 @@ HTML;
|
|||||||
<p><strong>Pickup Date:</strong> {$pickup_date}</p>
|
<p><strong>Pickup Date:</strong> {$pickup_date}</p>
|
||||||
<p><strong>Drop-off Date:</strong> {$dropoff_date}</p>
|
<p><strong>Drop-off Date:</strong> {$dropoff_date}</p>
|
||||||
<p><strong>Subject:</strong> {$subject}</p>
|
<p><strong>Subject:</strong> {$subject}</p>
|
||||||
<p><strong>Message:</strong><br>{$message}</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<a href="mailto:{$user_email}?subject=Re: {$subject}" class="btn btn-primary btn-reply">Reply to {$name}</a>
|
<a href="mailto:{$user_email}?subject=Re: {$subject}" class="btn btn-primary btn-reply">Reply to {$name}</a>
|
||||||
@ -244,7 +243,7 @@ HTML;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Include header after potential redirects
|
// Include header after potential redirects
|
||||||
include('header.php');
|
// include('header.php');
|
||||||
|
|
||||||
// Handle status messages (this part is optional if you want to display messages on the referring page)
|
// Handle status messages (this part is optional if you want to display messages on the referring page)
|
||||||
if (isset($_GET['status'])) {
|
if (isset($_GET['status'])) {
|
||||||
|
@ -193,7 +193,7 @@ HTML;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Include header after potential redirects
|
// Include header after potential redirects
|
||||||
include('header.php');
|
// include('header.php');
|
||||||
|
|
||||||
// Handle status messages
|
// Handle status messages
|
||||||
if (isset($_GET['status'])) {
|
if (isset($_GET['status'])) {
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
<div class="car-image">
|
<div class="car-image">
|
||||||
<img src="img/car/02.jpg" alt="Peugeot 308">
|
<img src="img/car/02.jpg" alt="Peugeot 308">
|
||||||
</div>
|
</div>
|
||||||
<div class="car-content">
|
<!-- <div class="car-content">
|
||||||
<div class="star">
|
<div class="star">
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
@ -123,7 +123,7 @@
|
|||||||
To deliver on the promise of technology and human We help our clients become sions of themselves.
|
To deliver on the promise of technology and human We help our clients become sions of themselves.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
<div class="car-image">
|
<div class="car-image">
|
||||||
<img src="img/Cars/mitsubhi.jpg" alt="Peugeot 308">
|
<img src="img/Cars/mitsubhi.jpg" alt="Peugeot 308">
|
||||||
</div>
|
</div>
|
||||||
<div class="car-content">
|
<!-- <div class="car-content">
|
||||||
<div class="star">
|
<div class="star">
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
@ -123,7 +123,7 @@
|
|||||||
To deliver on the promise of technology and human We help our clients become sions of themselves.
|
To deliver on the promise of technology and human We help our clients become sions of themselves.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
<div class="car-image">
|
<div class="car-image">
|
||||||
<img src="img/Cars/navara.jpg" alt="Peugeot 308">
|
<img src="img/Cars/navara.jpg" alt="Peugeot 308">
|
||||||
</div>
|
</div>
|
||||||
<div class="car-content">
|
<!-- <div class="car-content">
|
||||||
<div class="star">
|
<div class="star">
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
@ -122,7 +122,7 @@
|
|||||||
To deliver on the promise of technology and human We help our clients become sions of themselves.
|
To deliver on the promise of technology and human We help our clients become sions of themselves.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="social-share d-flex align-items-center">
|
<div class="social-share d-flex align-items-center">
|
||||||
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
||||||
<a href="https://www.viber.com/" target="blank"><i class="fab fa-viber"></i></a>
|
<a href="viber://add?number=9801136594" target="blank" onclick="window.location.href='https://www.viber.com/download/'; return false;"><i class="fab fa-viber"></i></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="social-share d-flex align-items-center">
|
<div class="social-share d-flex align-items-center">
|
||||||
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
||||||
<a href="https://www.viber.com/" target="blank"><i class="fab fa-viber"></i></a>
|
<a href="viber://add?number=9801136594" target="blank" onclick="window.location.href='https://www.viber.com/download/'; return false;"><i class="fab fa-viber"></i></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="social-share d-flex align-items-center">
|
<div class="social-share d-flex align-items-center">
|
||||||
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
||||||
<a href="https://www.viber.com/" target="blank"><i class="fab fa-viber"></i></a>
|
<a href="viber://add?number=9801136594" target="blank" onclick="window.location.href='https://www.viber.com/download/'; return false;"><i class="fab fa-viber"></i></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
330
optional.php
330
optional.php
@ -1,99 +1,273 @@
|
|||||||
<!-- <?php
|
<?php
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
use PHPMailer\PHPMailer\Exception;
|
use PHPMailer\PHPMailer\Exception;
|
||||||
|
require 'vendor/autoload.php';
|
||||||
|
|
||||||
// Start session to store messages
|
#you are required to change these credential only
|
||||||
session_start();
|
$company_name= 'Bohara Rental Team';
|
||||||
|
$support_name= 'Bohara Rental Support';
|
||||||
|
$company_address = 'Kathmandu, Nepal';
|
||||||
|
$company_email = 'subedigokul119@gmail.com';
|
||||||
|
$company_phone = +9779800000000;
|
||||||
|
$sending_email = 'noreply.notification.developer@gmail.com';
|
||||||
|
$app_password= 'uuky rjvm expm notx';
|
||||||
|
|
||||||
require 'src/Exception.php';
|
var_dump($_SERVER['REQUEST_METHOD']);
|
||||||
require 'src/PHPMailer.php';
|
exit;
|
||||||
require 'src/SMTP.php';
|
// Enable error reporting
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
|
||||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
// A helper function to build the redirect URL with a status parameter
|
||||||
// Collect form data
|
function buildRedirectUrl($status, $extra = '')
|
||||||
$name = htmlspecialchars($_POST['name']);
|
{
|
||||||
$email = htmlspecialchars($_POST['email']);
|
// If HTTP_REFERER isn't set, use a default page
|
||||||
$subject = htmlspecialchars($_POST['subject']);
|
$redirect = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'car-grid.php';
|
||||||
$phone = htmlspecialchars($_POST['phone']);
|
|
||||||
$message = htmlspecialchars($_POST['message']);
|
|
||||||
|
|
||||||
// Gmail credentials
|
// Check if the URL already has query parameters
|
||||||
$gmailUser = 'subashgiri939@gmail.com'; // Replace with your Gmail address
|
$separator = (strpos($redirect, '?') !== false) ? '&' : '?';
|
||||||
$gmailPassword = 'tbub jgpc jmwp iznl'; // Replace with your Gmail app password
|
|
||||||
|
|
||||||
// Create a new PHPMailer instance
|
// Build and return the new URL
|
||||||
$mail = new PHPMailer(true);
|
return $redirect . $separator . "status=" . $status . $extra;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
// Get form data and sanitize inputs
|
||||||
|
$name = htmlspecialchars(trim($_POST['name']));
|
||||||
|
$car_name = htmlspecialchars(trim($_POST['car_name']));
|
||||||
|
$location = htmlspecialchars(trim($_POST['location']));
|
||||||
|
$pickup_date = htmlspecialchars(trim($_POST['pickup_date']));
|
||||||
|
$dropoff_date = htmlspecialchars(trim($_POST['dropoff_date']));
|
||||||
|
$user_email = filter_var(trim($_POST['email']), FILTER_SANITIZE_EMAIL);
|
||||||
|
$phone = htmlspecialchars(trim($_POST['phone']));
|
||||||
|
$subject = $car_name . " Booking";
|
||||||
|
|
||||||
|
// Check if all required fields are provided
|
||||||
|
if (
|
||||||
|
!empty($name) && !empty($user_email)
|
||||||
|
&& !empty($location) && !empty($pickup_date) && !empty($dropoff_date) && !empty($phone)
|
||||||
|
) {
|
||||||
try {
|
try {
|
||||||
// Server settings
|
/*** User Confirmation Email ***/
|
||||||
$mail->isSMTP();
|
$userMail = new PHPMailer(true);
|
||||||
$mail->Host = 'smtp.gmail.com';
|
|
||||||
$mail->SMTPAuth = true;
|
|
||||||
$mail->Username = $gmailUser;
|
|
||||||
$mail->Password = $gmailPassword;
|
|
||||||
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
|
|
||||||
$mail->Port = 465;
|
|
||||||
|
|
||||||
// Send email to the customer (thank you message)
|
// SMTP Configuration
|
||||||
$mail->setFrom($gmailUser, 'Bohora Car Rental');
|
$userMail->isSMTP();
|
||||||
$mail->addAddress($email, $name); // Send to the customer's email address
|
$userMail->Host = 'smtp.gmail.com';
|
||||||
$mail->isHTML(true);
|
$userMail->SMTPAuth = true;
|
||||||
$mail->Subject = 'Thanks for Contacting Us!';
|
$userMail->Username = $sending_email;
|
||||||
$mail->Body = "
|
$userMail->Password = $app_password;
|
||||||
<h3>Thank you for contacting Bohora Car Rental:</h3>
|
$userMail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
||||||
<p>Dear $name,</p>
|
$userMail->Port = 587;
|
||||||
<p>We have received your contact form submission, and our team will get back to you as soon as possible.</p>
|
|
||||||
<p><strong>Subject:</strong> $subject</p>
|
|
||||||
<p><strong>Message:</strong> $message</p>
|
|
||||||
<p><strong>Phone:</strong> $phone</p>
|
|
||||||
<p>Thank you for reaching out!</p>
|
|
||||||
";
|
|
||||||
$mail->AltBody = "
|
|
||||||
Thank you for contacting Bohora Car Rental:
|
|
||||||
Dear $name,
|
|
||||||
We have received your contact form submission, and our team will get back to you as soon as possible.
|
|
||||||
Subject: $subject
|
|
||||||
Message: $message
|
|
||||||
Phone: $phone
|
|
||||||
Thank you for reaching out!
|
|
||||||
";
|
|
||||||
|
|
||||||
$mail->send();
|
// User Email Configuration
|
||||||
|
$userMail->setFrom($sending_email, $support_name);
|
||||||
|
$userMail->addAddress($user_email);
|
||||||
|
$userMail->isHTML(true);
|
||||||
|
$userMail->Subject = "Thank you for contacting ". $support_name;
|
||||||
|
|
||||||
// Send email to your Gmail (admin's email)
|
// Embed logo
|
||||||
$mail->clearAddresses(); // Clear the previous recipient (customer)
|
$userMail->addEmbeddedImage('img/logo/logo-trans.png', 'logo_cid');
|
||||||
$mail->addAddress($gmailUser, 'Bohora Car Rental'); // Send to your company email
|
|
||||||
|
|
||||||
$mail->Subject = 'New Contact Request';
|
// User Email Template (Responsive & clean design)
|
||||||
$mail->Body = "
|
$userMail->Body = <<<HTML
|
||||||
<h3>You have received a new contact request:</h3>
|
<!DOCTYPE html>
|
||||||
<p><strong>Name:</strong> $name</p>
|
<html lang="en">
|
||||||
<p><strong>Email:</strong> $email</p>
|
<head>
|
||||||
<p><strong>Phone:</strong> $phone</p>
|
<meta charset="UTF-8">
|
||||||
<p><strong>Subject:</strong> $subject</p>
|
<title>Booking Confirmation</title>
|
||||||
<p><strong>Message:</strong> $message</p>
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<p>Please review the details for further action.</p>
|
<style>
|
||||||
";
|
.email-container {
|
||||||
$mail->AltBody = "
|
max-width: 600px;
|
||||||
You have received a new contact request:
|
margin: 0 auto;
|
||||||
Name: $name
|
font-family: Arial, sans-serif;
|
||||||
Email: $email
|
padding: 1rem;
|
||||||
Phone: $phone
|
}
|
||||||
Subject: $subject
|
.header {
|
||||||
Message: $message
|
text-align: center;
|
||||||
Please review the details for further action.
|
padding-bottom: 1rem;
|
||||||
";
|
}
|
||||||
|
.details {
|
||||||
|
background: #f8f9fa;
|
||||||
|
padding: 1.5rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 1rem 0;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: #666;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="email-container">
|
||||||
|
<div class="header">
|
||||||
|
<img src="cid:logo_cid" alt="Company Logo" style="max-height: 80px;">
|
||||||
|
<h2 class="mt-3">Booking Confirmation</h2>
|
||||||
|
</div>
|
||||||
|
<p>Dear {$name},</p>
|
||||||
|
<p>Thank you for reaching out to $support_name. We have received your booking request. Below are your booking details:</p>
|
||||||
|
<div class="details">
|
||||||
|
<h4>Booking Details</h4>
|
||||||
|
<p><strong>Car Name:</strong> {$car_name}</p>
|
||||||
|
<p><strong>Drop-off Location:</strong> {$location}</p>
|
||||||
|
<p><strong>Pickup Date:</strong> {$pickup_date}</p>
|
||||||
|
<p><strong>Drop-off Date:</strong> {$dropoff_date}</p>
|
||||||
|
</div>
|
||||||
|
<p>Our team will contact you shortly to confirm your booking and provide further details.</p>
|
||||||
|
<p>If you have any questions, please reply to this email.</p>
|
||||||
|
<p>Best regards,<br>$support_name Team</p>
|
||||||
|
<div class="footer">
|
||||||
|
<p>{$company_name} | {$company_address}</p>
|
||||||
|
<p>Email: {$company_email} | Phone: {$company_phone}</p>
|
||||||
|
</div>
|
||||||
|
<p class="mb-0"><em>If you didn't initiate this booking, please ignore this email. This may have been sent in error.</em></p>
|
||||||
|
|
||||||
$mail->send();
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
HTML;
|
||||||
|
|
||||||
// Redirect to a thank you page or your contact page
|
/*** Admin Notification Email ***/
|
||||||
|
$adminMail = new PHPMailer(true);
|
||||||
|
|
||||||
|
// SMTP Configuration
|
||||||
|
$adminMail->isSMTP();
|
||||||
|
$adminMail->Host = 'smtp.gmail.com';
|
||||||
|
$adminMail->SMTPAuth = true;
|
||||||
|
$adminMail->Username = $sending_email;
|
||||||
|
$adminMail->Password = $app_password;
|
||||||
|
$adminMail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
||||||
|
$adminMail->Port = 587;
|
||||||
|
|
||||||
|
$adminMail->setFrom($sending_email, $support_name);
|
||||||
|
$adminMail->addAddress($company_email);
|
||||||
|
$adminMail->addReplyTo($user_email, $name);
|
||||||
|
$adminMail->isHTML(true);
|
||||||
|
$adminMail->Subject = "New Booking Request: {$subject}";
|
||||||
|
|
||||||
|
// Embed logo for admin email
|
||||||
|
$adminMail->addEmbeddedImage('img/logo/logo-trans.png', 'logo_cid');
|
||||||
|
|
||||||
|
$currentDateTime = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
// Admin Email Template (all details nicely presented)
|
||||||
|
$adminMail->Body = <<<HTML
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>New Booking Request</title>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
.email-container {
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.details {
|
||||||
|
background: #f8f9fa;
|
||||||
|
padding: 1.5rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 1rem 0;
|
||||||
|
}
|
||||||
|
.details h4 {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.details p {
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: #666;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
.btn-reply {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="email-container">
|
||||||
|
<div class="header">
|
||||||
|
<img src="cid:logo_cid" alt="Company Logo" style="max-height: 80px;">
|
||||||
|
<h2 class="mt-3">New Booking Request Received</h2>
|
||||||
|
</div>
|
||||||
|
<div class="details">
|
||||||
|
<h4>Booking Information</h4>
|
||||||
|
<p><strong>Full Name:</strong> {$name}</p>
|
||||||
|
<p><strong>Email:</strong> {$user_email}</p>
|
||||||
|
<p><strong>Phone Number:</strong> {$phone}</p>
|
||||||
|
<p><strong>Car Name:</strong> {$car_name}</p>
|
||||||
|
<p><strong>Drop-off Location:</strong> {$location}</p>
|
||||||
|
<p><strong>Pickup Date:</strong> {$pickup_date}</p>
|
||||||
|
<p><strong>Drop-off Date:</strong> {$dropoff_date}</p>
|
||||||
|
<p><strong>Subject:</strong> {$subject}</p>
|
||||||
|
<p><strong>Message:</strong><br>{$message}</p>
|
||||||
|
</div>
|
||||||
|
<div class="text-center">
|
||||||
|
<a href="mailto:{$user_email}?subject=Re: {$subject}" class="btn btn-primary btn-reply">Reply to {$name}</a>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
<p>{$company_name} | {$company_address}</p>
|
||||||
|
<p>Email: {$company_email} | Phone: {$company_phone}</p>
|
||||||
|
<p>Received on: {$currentDateTime}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
HTML;
|
||||||
|
|
||||||
|
// Send the emails
|
||||||
|
$userMail->send();
|
||||||
|
$adminMail->send();
|
||||||
|
|
||||||
|
// Redirect back to the referring page with a success status
|
||||||
|
$redirectUrl = buildRedirectUrl('success');
|
||||||
|
header("Location: $redirectUrl");
|
||||||
exit();
|
exit();
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// Redirect to an error page if something goes wrong
|
// On error, encode the message and redirect back with the error status
|
||||||
|
$errorMessage = "&message=" . urlencode($e->getMessage());
|
||||||
|
$redirectUrl = buildRedirectUrl('error', $errorMessage);
|
||||||
|
header("Location: $redirectUrl");
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Missing fields: redirect back with missing_fields status
|
||||||
|
$redirectUrl = buildRedirectUrl('missing_fields');
|
||||||
|
header("Location: $redirectUrl");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
echo 'Invalid request method.';
|
|
||||||
}
|
}
|
||||||
?> -->
|
|
||||||
|
// Include header after potential redirects
|
||||||
|
include('header.php');
|
||||||
|
|
||||||
|
// Handle status messages (this part is optional if you want to display messages on the referring page)
|
||||||
|
if (isset($_GET['status'])) {
|
||||||
|
switch ($_GET['status']) {
|
||||||
|
case 'success':
|
||||||
|
echo "<p class='alert alert-success'>✅ Your message has been sent successfully!</p>";
|
||||||
|
break;
|
||||||
|
case 'error':
|
||||||
|
$error = isset($_GET['message']) ? htmlspecialchars($_GET['message']) : "There was an error sending your message. Please try again.";
|
||||||
|
echo "<p class='alert alert-danger'>❌ $error</p>";
|
||||||
|
break;
|
||||||
|
case 'missing_fields':
|
||||||
|
echo "<p class='alert alert-warning'>⚠️ Please fill in all the required fields.</p>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -46,7 +46,8 @@
|
|||||||
Welcome to Bohora Car Rentals
|
Welcome to Bohora Car Rentals
|
||||||
</h4>
|
</h4>
|
||||||
<h1 class="text-white" data-animation="fadeInUp" data-delay="1.3s">
|
<h1 class="text-white" data-animation="fadeInUp" data-delay="1.3s">
|
||||||
Your Trusted Travel Companion in Nepal
|
May your trip be pleasant.
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
<p class="text-white mt-3" data-animation="fadeInUp" data-delay="1.5s">
|
<p class="text-white mt-3" data-animation="fadeInUp" data-delay="1.5s">
|
||||||
Discover Nepal with Comfort and Trust.
|
Discover Nepal with Comfort and Trust.
|
||||||
@ -82,8 +83,8 @@
|
|||||||
तपाईंको यात्रा सुखद र अविस्मरणीय रहोस्।
|
तपाईंको यात्रा सुखद र अविस्मरणीय रहोस्।
|
||||||
</h1>
|
</h1>
|
||||||
<p class="text-white mt-3" data-animation="fadeInUp" data-delay="1.5s">
|
<p class="text-white mt-3" data-animation="fadeInUp" data-delay="1.5s">
|
||||||
हाम्रो देश प्राकृतिक सौन्दर्य, सांस्कृतिक विविधता, र अद्वितीय अतिथिसत्कारको लागि
|
आराम र विश्वास संग नेपाल पत्ता लगाउनुहोस्।
|
||||||
प्रसिद्ध छ।
|
|
||||||
</p>
|
</p>
|
||||||
<a href="car-grid.php" data-animation="fadeInUp" data-delay="1.5s">
|
<a href="car-grid.php" data-animation="fadeInUp" data-delay="1.5s">
|
||||||
<button class="pickup-btn animated-btn" type="submit">
|
<button class="pickup-btn animated-btn" type="submit">
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
<div class="social-icon d-flex align-items-center wow fadeInUp" data-wow-delay="
|
<div class="social-icon d-flex align-items-center wow fadeInUp" data-wow-delay="
|
||||||
.5s">
|
.5s">
|
||||||
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
<a href="https://www.facebook.com/" target="blank"><i class="fab fa-facebook-f"></i></a>
|
||||||
<a href="https://www.viber.com/" target="blank"><i class="fab fa-viber"></i></a>
|
<a href="viber://add?number=9801136594" target="blank" onclick="window.location.href='https://www.viber.com/download/'; return false;"><i class="fab fa-viber"></i></a>
|
||||||
<a href="https://www.whatsapp.com/" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
<a href="https://wa.me/9801136594" target="blank"><i class="fa-brands fa-whatsapp"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,31 +9,34 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xl-3 col-lg-4 col-md-6 wow fadeInUp" data-wow-delay=".2s">
|
<div class="col-xl-3 col-lg-4 col-md-6 wow fadeInUp" data-wow-delay=".2s">
|
||||||
<div class="how-works-items">
|
<div class="how-works-items">
|
||||||
<h6 class="title"><a href="car-grid.php">ConTact</a></h6>
|
<h6 class="title"><a href="car-grid.php"> Search</a></h6>
|
||||||
<div class="icon-box">
|
|
||||||
<div class="icon">
|
|
||||||
<img src="img/how-work/icon-2.png" alt="img" class="icon-1">
|
|
||||||
<img src="img/how-work/icon-22.png" alt="img" class="icon-2">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
Contact Us via phone, website, email, or WhatsApp.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xl-3 col-lg-4 col-md-6 wow fadeInUp" data-wow-delay=".4s">
|
|
||||||
<div class="how-works-items">
|
|
||||||
<h6 class="title"><a href="car-grid.php">Search</a></h6>
|
|
||||||
<div class="icon-box">
|
<div class="icon-box">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<img src="img/how-work/icon-1.png" alt="img" class="icon-1">
|
<img src="img/how-work/icon-1.png" alt="img" class="icon-1">
|
||||||
<img src="img/how-work/icon-11.png" alt="img" class="icon-2">
|
<img src="img/how-work/icon-11.png" alt="img" class="icon-2">
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
Search through our luxurious and comfortable cars.
|
Search through our luxurious and comfortable cars.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-3 col-lg-4 col-md-6 wow fadeInUp" data-wow-delay=".4s">
|
||||||
|
<div class="how-works-items">
|
||||||
|
<h6 class="title"><a href="car-grid.php">ConTact</a></h6>
|
||||||
|
<div class="icon-box">
|
||||||
|
<div class="icon">
|
||||||
|
|
||||||
|
<img src="img/how-work/icon-2.png" alt="img" class="icon-1">
|
||||||
|
<img src="img/how-work/icon-22.png" alt="img" class="icon-2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
Contact Us via phone, website, email, or WhatsApp.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -53,7 +56,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-xl-3 col-lg-4 col-md-6 wow fadeInUp" data-wow-delay=".8s">
|
<div class="col-xl-3 col-lg-4 col-md-6 wow fadeInUp" data-wow-delay=".8s">
|
||||||
<div class="how-works-items">
|
<div class="how-works-items">
|
||||||
<h6 class="title"><a href="car-grid.php">Enjoy</a></h6>
|
<h6 class="title"><a href="car-grid.php">Travel</a></h6>
|
||||||
<div class="icon-box ">
|
<div class="icon-box ">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<img src="img/how-work/icon-4.png" alt="img" class="icon-1">
|
<img src="img/how-work/icon-4.png" alt="img" class="icon-1">
|
||||||
|
@ -19,21 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="faq-accordion mt-4 mt-md-0">
|
<div class="faq-accordion mt-4 mt-md-0">
|
||||||
<div class="accordion" id="accordion">
|
<div class="accordion" id="accordion">
|
||||||
<div class="accordion-item mb-4 wow fadeInUp" data-wow-delay=".3s">
|
|
||||||
<h5 class="accordion-header">
|
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
|
||||||
data-bs-target="#faq1" aria-expanded="true" aria-controls="faq1">
|
|
||||||
Professional Drivers
|
|
||||||
</button>
|
|
||||||
</h5>
|
|
||||||
<div id="faq1" class="accordion-collapse collapse" data-bs-parent="#accordion">
|
|
||||||
<div class="accordion-body">
|
|
||||||
Our drivers are experienced, soft-spoken, and well-trained to ensure your safety
|
|
||||||
and comfort on every journey. With in-depth knowledge of Nepal’s roads, we
|
|
||||||
navigate everything from rough terrains to smooth highways with expertise.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="accordion-item mb-4 wow fadeInUp" data-wow-delay=".5s">
|
<div class="accordion-item mb-4 wow fadeInUp" data-wow-delay=".5s">
|
||||||
<h5 class="accordion-header">
|
<h5 class="accordion-header">
|
||||||
<button class="accordion-button" type="button" data-bs-toggle="collapse"
|
<button class="accordion-button" type="button" data-bs-toggle="collapse"
|
||||||
@ -49,6 +35,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="accordion-item mb-4 wow fadeInUp" data-wow-delay=".3s">
|
||||||
|
<h5 class="accordion-header">
|
||||||
|
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#faq1" aria-expanded="true" aria-controls="faq1">
|
||||||
|
Professional Drivers
|
||||||
|
</button>
|
||||||
|
</h5>
|
||||||
|
<div id="faq1" class="accordion-collapse collapse" data-bs-parent="#accordion">
|
||||||
|
<div class="accordion-body">
|
||||||
|
Our drivers are experienced, soft-spoken, and well-trained to ensure your safety
|
||||||
|
and comfort on every journey. With in-depth knowledge of Nepal’s roads, we
|
||||||
|
navigate everything from rough terrains to smooth highways with expertise.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="accordion-item wow mb-4 fadeInUp" data-wow-delay=".7s">
|
<div class="accordion-item wow mb-4 fadeInUp" data-wow-delay=".7s">
|
||||||
<h5 class="accordion-header">
|
<h5 class="accordion-header">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
<div class="car-image">
|
<div class="car-image">
|
||||||
<img src="img/Cars/peugeot_308.jpg" alt="Peugeot 308">
|
<img src="img/Cars/peugeot_308.jpg" alt="Peugeot 308">
|
||||||
</div>
|
</div>
|
||||||
<div class="car-content">
|
<!-- <div class="car-content">
|
||||||
<div class="star">
|
<div class="star">
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
<i class="fa-solid fa-star"></i>
|
<i class="fa-solid fa-star"></i>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
themselves.
|
themselves.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user