Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux us-phx-web1202.main-hosting.eu 4.18.0-553.84.1.lve.el8.x86_64 #1 SMP Tue Nov 25 18:33:03 UTC 2025 x86_64
User : u615232177 ( 615232177)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/u615232177/domains/adesmiley.com/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u615232177/domains/adesmiley.com/public_html/book.php
<?php use PHPMailer\PHPMailer\PHPMailer;use PHPMailer\PHPMailer\Exception;use PHPMailer\PHPMailer\SMTP; session_start();
$page_name = basename($_SERVER['PHP_SELF']); 
include("header.php"); ?>
<title><?php echo $company_name; ?>, Book an Appointment</title>
<?php $pics=array("1","2","3");
$random_pic = array_rand($pics);
?>

<?php 
$msg='';$captcha_error=""; $errors=0;;
if (isset($_POST["send_message"])) {
	
//include("captcha_start.php");
if($errors == 0){
	
	$time = mysqli_real_escape_string($con,$_POST['time']);
	$last_name = mysqli_real_escape_string($con,$_POST['last_name']);
	$first_name = mysqli_real_escape_string($con,$_POST['first_name']);
	$email = mysqli_real_escape_string($con,$_POST['email']);
	$date = mysqli_real_escape_string($con,$_POST['date']);

  $message1 = "
  First Name - $first_name <br>
  Last Name - $last_name <br>
  Email - $email <br>
  Time - $time <br>
  Date - $date <br>
  ";
	
	$msg = '';
	require 'PHPMailer/src/PHPMailer.php'; 
	require 'PHPMailer/src/SMTP.php'; 
	require 'PHPMailer/src/Exception.php';

	$mail = new PHPMailer();

  $mail->IsSMTP(); // telling the class to use SMTP
  $mail->SMTPAuth = true; // enable SMTP authentication
  $mail->Host = "smtp.titan.email"; // sets the SMTP server
  $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Set encryption to STARTTLS
    $mail->Port = 587; // Use port 587 for TLS
  $mail->Username = "$no_reply_email"; // SMTP account username
  $mail->Password = "$no_reply_password"; // SMTP account password

  $mail->SetFrom("$no_reply_email", "$company_name");//Use a fixed address in your own domain as the from address
  $mail->AddReplyTo("$email","$email"); //Put the submitter's address in a reply-to header
	$mail->Subject = "$first_name $last_name has booked an appointment";
	$mail->MsgHTML("<html><body>$message1</body></html>");
	$mail->AddAddress("$company_email", "Booking Form");//Send the message to yourself, or whoever should receive contact for submissions
	 
	//$mail->AddAttachment(""); // attachment

		if(!$mail->Send()) {
		//echo "Mailer Error: " . $mail->ErrorInfo;
		$msg = "<div class='alert alert-danger'>
					<a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a>
					<b>Something went wrong, please try again</b>
				</div>";
		} 
		else {
		$msg = "<div class='alert alert-success'>
					<a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a>
					<b>Email Sent</b>
				</div>";
		}
		//email an autoresponse to the person too
	$mail->clearAddresses();
	$mail->clearReplyTos();
	
		$subject1 = "Thank you for booking"; // form field
		$message="";
		$button_link="$link";
		$button_text="Visit Site";
		$email_topic="Thanks for booking";
		include("email_header.php");
		$message .=	"
		Dear $first_name,<br/><br/>
		Thank you for contacting me. Your message means a lot to me. I will get in touch with you soon to confirm the details of your appointment. Stay safe and God bless.
		<br/><br/>
		The $company_name Team.<br/>
		$email_logo
		 ";
		 include("email_footer.php");
$mail->SetFrom("$no_reply_email", "$company_name");//Use a fixed address in your own domain as the from add
$mail->AddAddress("$email", "$email");//Send the message to yourself, or whoever should receive contact for submissions
$mail->AddReplyTo("$company_email", "$company_name"); //Put the submitter's address in a reply-to header
$mail->Subject = "$subject1";
$mail->MsgHTML("<html><body>$message<br></body></html>");
	if(!$mail->Send()) {
	//echo "Mailer Error: " . $mail->ErrorInfo;
	$msg = "Email not sent, please try again Mailer Error: ".$mail->ErrorInfo;
	} 
	else {
	//echo "Thanks for getting in touch, we will get back to ASAP";
	$msg = "<span style='color:steelblue;'>Dear $first_name, your booking request has been received and a response will be sent to you shortly</span>";
	}
}
}
?>
<!-- Page Header Start -->
<div
    class="container-fluid header-bg py-5 mb-5 wow fadeIn"
    data-wow-delay="0.1s">
    <div class="container py-5">
        <h1 class="display-4 text-white mb-3 animated slideInDown">
            Book an Appointment
        </h1>
        <nav aria-label="breadcrumb animated slideInDown">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item">
                    <a class="text-white" href="#">Home</a>
                </li>
                <li class="breadcrumb-item">
                    <a class="text-white" href="#">Pages</a>
                </li>
                <li class="breadcrumb-item text-primary active" aria-current="page">
                    Book an Appointment
                </li>
            </ol>
        </nav>
    </div>
</div>
<!-- Page Header End -->

<!-- Contact Start -->
<div class="container-xxl py-5">
    <div class="container">

        <div class="row g-5">
            <div class="col-lg-6">
                <div
                    class="bg-primary h-100 d-flex align-items-center py-4 px-4 px-sm-5">
                    <i class="fa fa-3x fa-mobile-alt text-white"></i>
                    <div class="ms-4">
                        <p class="text-white mb-0">Call for more info</p>
                        <h2 class="text-white mb-0"><?php echo $company_phone; ?></h2>
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div
                    class="bg-primary h-100 d-flex align-items-center py-4 px-4 px-sm-5">
                    <i class="fab fa-3x fa-whatsapp text-white"></i>
                    <div class="ms-4">
                        <p class="text-white mb-0">Whatsapp Chat</p>
                        <h2 class="text-white mb-0"><?php echo $company_whatsapp; ?></h2>
                    </div>
                </div>
            </div>
            <div class="col-lg-12 wow fadeInUp" data-wow-delay="0.1s">
                <p><span class="text-primary me-2">#</span>Book an Appointment</p>
                <h1 class="display-5 mb-4">Take action today and reserve your session by filling the form below:</h1>

                <p class="mb-4"><?php echo $msg; ?></p>
                <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
                    <div class="row g-3">
                        <div class="col-md-6">
                            <div class="form-floating">
                                <input
                                    type="text"
                                    class="form-control bg-light border-0"
                                    id="name"
                                    placeholder="First Name"
                                    name='first_name'
                                    required />
                                <label for="name">First Name</label>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-floating">
                                <input
                                    type="text"
                                    class="form-control bg-light border-0"
                                    id="last_name"
                                    placeholder="Last Name"
                                    name='last_name'
                                    required />
                                <label for="last_name">Last Name</label>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-floating">
                                <input
                                    type="email"
                                    class="form-control bg-light border-0"
                                    id="email"
                                    name='email'
                                    placeholder="Your Email"
                                    required />
                                <label for="email">Your Email</label>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-floating">
                                <input
                                    type="time"
                                    class="form-control bg-light border-0"
                                    id="time"
                                    name="time" min="09:00" max="18:00"
                                    required />
                                <label for="time">Choose Time</label>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-floating">
                                <input
                                    type="date"
                                    class="form-control bg-light border-0"
                                    id="date"
                                    name="date"
                                    required />
                                <label for="date">Choose Date</label>
                            </div>
                        </div>
                        <div class="col-12">
                            <button class="btn btn-primary w-100 py-3" name='send_message' type="submit">
                                Book
                            </button>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
</div>
<!-- Contact End -->
<?php include("footer.php"); ?>

Al-HUWAITI Shell