����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 162.0.232.25  /  Your IP : 3.138.67.56
Web Server : LiteSpeed
System : Linux premium276.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : kwacuqig ( 988)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/kwacuqig/maso-awards.live/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/kwacuqig/maso-awards.live/donate.php
<?php
session_start();
include 'php/connect.php';
// Generate a CSRF token if it doesn't exist
if (empty($_SESSION['csrf_token'])) {
    $_SESSION['csrf_token'] = bin2hex(random_bytes(32));  // Generate a random 32-byte CSRF token
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">

    <title>Maso Awards - Donate</title>
    <meta content="" name="description">
    <meta content="" name="keywords">

    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800" rel="stylesheet">

    <!-- Vendor CSS Files -->
    <link href="assets/vendor/aos/aos.css" rel="stylesheet">
    <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
    <link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
    <link rel="stylesheet" href="./css/main.css">
    <link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
    <link href="./assets/img/maso.png" rel="icon">

    <!-- Template Main CSS File -->
    <link href="assets/css/style.css" rel="stylesheet">

    <!-- Sweet Alert -->
    <script src="./js/sweetalert.min.js"></script>

    <!--og codes-->
    <meta property="og:url" content="https://maso-awards.com/index.php" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="<?php echo "MASO AWARDS"; ?>" />
    <meta property="og:image" content="https://maso-awards.live/assets/img/maso-og.jpg" />
    <meta property="og:description" content="BuyTicket" />
    <meta property="fb:app_id" content="197362031139140" />

    <style>
        .navbar>ul>li>a::before {
            display: none !important;
        }

        .navbar a:hover,
        .navbar .active,
        .navbar .active:focus,
        .navbar li:hover>a {
            color: rgba(202, 206, 221, 0.8) !important;
        }
    </style>
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>

<body>

    <?php include './header.php'; ?>

    <!-- ======= Ticket Section ======= -->
    <section id="hero-1">
        <div class="hero-container" data-aos="zoom-in" data-aos-delay="100">
            <h1 class="mb-5 pb-0">Donate</h1>
        </div>
    </section><!-- End Ticket Section -->

    <main id="main">
        <!-- ======= Contact Section ======= -->
        <section class="section-bg">

            <div class="container" data-aos="fade-up">

                <div id="contact" class="form">

                    <?php
                    if (isset($_COOKIE['success'])) {
                    ?>
                        <h4 class="text-success"><b>Payment Successful!</b></h4>
                        <p>Thank you for supporting Maso Awards! Your donation helps us make a meaningful impact.
                        <p>
                        <p>Please check your email for more details about your contribution and how it supports our mission.</p>
                        <p>We deeply appreciate your kindness and commitment.</p>
                    <?php
                    }
                    ?>
                    <form class="php-email-form mt-3">
                        <div class="label">Full Name</div>
                        <div class="form-group mt-3 mb-4">
                            <input type="text" class="form-control" id="name" placeholder="Full Name">
                        </div>
                        <div class="label">Mobile</div>
                        <div class="form-group mt-3 mb-4">
                            <input type="number" class="form-control" id="mobile" placeholder="265xxxxxxxxx">
                        </div>
                        <div class="label">Email</div>
                        <div class="form-group mt-3 mb-4">
                            <input type="email" class="form-control" id="email" placeholder="Email">
                        </div>
                        <div class="label">Amount</div>
                        <div class="form-group mt-3 mb-4">
                            <input type="text" class="form-control" id="amount" placeholder="xxx.xx">
                        </div>
                        <div class="label">Operator</div>
                        <div class="form-group mt-3 mb-4">
                            <div class="row">
                                <div class="col-6">
                                    <div class="mno-option" id="airtelOption">
                                        <img src="./images/airtel-money.png" alt="Airtel Money">
                                    </div>
                                </div>
                                <div class="col-6">
                                    <div class="mno-option" id="mpambaOption">
                                        <img src="./images/mpamba.png" alt="Mpamba">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <input type="hidden" id="hidden_provider" name="provider" value="">
                        <input type="hidden" id="csrf_token" value="<?php echo $_SESSION['csrf_token']; ?>">
                        <div class="text-center"><button type="button" id="pay_button">Pay</button></div>
                    </form>
                    <img src="./images/please-wait.gif" id="loadingMessage" alt="Please Wait...">
                    <p class="text-center mt-4">For enquires, please contact <a href="https://wa.me/+265998412421?text=Hie">+265 998 412 421</a></p>
                </div>
            </div>
        </section><!-- End Contact Section -->

    </main><!-- End #main -->
    <div class="container-fluid footer-menu">
        <div class="row">
            <div class="col text-center">
                <div class="d-flex justify-content-around">
                    <a href="home" class="mx-2">
                        <i class="fas fa-home icon"></i>
                        <div>Home</div>
                    </a>
                    <a href="vote" class="mx-2">
                        <i class="fas fa-th-list icon"></i>
                        <div>Categories</div>
                    </a>
                    <a href="buy-ticket" class="mx-2">
                        <i class="fas fa-ticket-alt icon"></i>
                        <div>Tickets</div>
                    </a>
                    <a href="donate" class="mx-2 active">
                        <i class="fas fa-hand-holding-heart icon"></i>
                        <div>Donate</div>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <!-- ======= Footer ======= -->
    <footer id="footer">
        <div class="footer-top">
            <div class="container">
                <div class="row">
                    <div class="col-lg-4 col-md-6 footer-links">
                        <h4>Useful Links</h4>
                        <ul>
                            <li><i class="bi bi-chevron-right"></i> <a href="#about">About Us</a></li>
                            <li><i class="bi bi-chevron-right"></i> <a href="#hotels">News</a></li>
                            <li><i class="bi bi-chevron-right"></i> <a href="buy-ticket">Buy Ticket</a></li>
                            <li><i class="bi bi-chevron-right"></i> <a href="#vote">Vote</a></li>
                        </ul>
                    </div>

                    <div class="col-lg-4 col-md-6 footer-info">
                        <img src="assets/img/maso.png" alt="TheEvenet">
                    </div>

                    <div class="col-lg-4 col-md-6 footer-contact">
                        <h4>Contact Us</h4>
                        <p>
                            Chichiri<br>
                            Blantyre<br>
                            Malawi <br>
                            <strong>Phone:</strong> +265 884 41 21 72 / +265 994 61 91 94<br>
                            <strong>Email:</strong> info@maso-awards.live<br>
                        </p>

                        <div class="social-links">
                            <a href="#" class="twitter"><i class="bi bi-twitter"></i></a>
                            <a href="#" class="facebook"><i class="bi bi-facebook"></i></a>
                            <a href="#" class="instagram"><i class="bi bi-instagram"></i></a>
                            <a href="#" class="google-plus"><i class="bi bi-instagram"></i></a>
                            <a href="#" class="linkedin"><i class="bi bi-linkedin"></i></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="container">
            <div class="copyright">
                &copy; Copyright <strong>MASO Awards</strong>. All Rights Reserved
            </div>
        </div>
    </footer><!-- End  Footer -->
    <div class="footer-tolerance"></div>

    <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>

    <!-- Vendor JS Files -->
    <script src="assets/vendor/aos/aos.js"></script>
    <script src="./js/all.min.js"></script>
    <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
    <script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <!-- Template Main JS File -->
    <script src="assets/js/main.js"></script>
    <script>
        var links = document.querySelectorAll("ul li a.nav-link");
        var count = links.length;

        for (var i = 0; i < count; i++) {
            var previousLink = links[i].getAttribute("href");
            links[i].setAttribute("href", "home" + previousLink);
        }
    </script>
    <script>
        document.addEventListener("DOMContentLoaded", function() {
            var data = {
                provider: null,
                price: null,
                phone: null,
                description: null,
            };

            // Get references to form elements
            var name = document.getElementById('name');
            var email = document.getElementById('email');
            var phoneInput = document.getElementById('mobile');
            var amount = document.getElementById('amount');
            var errorSpan = document.getElementById('error');
            var hiddenProviderInput = document.getElementById('hidden_provider');
            var airtelOption = document.getElementById('airtelOption');
            var mpambaOption = document.getElementById('mpambaOption');

            function selectProvider(provider) {
                data.provider = provider;
                hiddenProviderInput.value = provider;

                // Remove 'selected' class from all options
                airtelOption.classList.remove('selected');
                mpambaOption.classList.remove('selected');

                // Add 'selected' class to the selected option
                if (provider === 'Airtel') {
                    airtelOption.classList.add('selected');
                } else if (provider === 'Tnm') {
                    mpambaOption.classList.add('selected');
                }
            }

            // Add click event listeners to the provider options
            airtelOption.addEventListener('click', function() {
                selectProvider('Airtel');
            });

            mpambaOption.addEventListener('click', function() {
                selectProvider('Tnm');
            });

            // Pay function
            function pay() {
                data.phone = phoneInput.value;
                data.description = "Donation";
                data.price = amount.value;

                if (!name.value) {
                    swal("", "Please enter your name", "warning");
                    return;
                }

                if (!data.phone) {
                    swal("", "Please enter your phone number", "warning");
                    return;
                }

                if (!email.value) {
                    swal("", "Please enter your email", "warning");
                    return;
                }

                if (!amount.value) {
                    swal("", "Please enter your amount", "warning");
                    return;
                }

                if (!data.provider) {
                    swal("", "Please select a provider", "warning");
                    return;
                }

                console.log(data);
                data.action = "pay";
                var formData = new FormData();
                for (var key in data) {
                    if (data.hasOwnProperty(key)) {
                        formData.append(key, data[key]);
                    }
                }

                document.getElementById('loadingMessage').style.display = 'block';

                axios.post('./pawapay/process-pawapay.php', formData)
                    .then(function(res) {
                        console.log(res.data);
                        var credit = res.data;

                        if (credit.error == null) {
                            if (credit.response.status == "ACCEPTED") {
                                checkStatus(credit.response.depositId);

                            } else if (credit.response.status == "REJECTED") {

                            }
                        } else {
                            swal("ERROR", credit.error, "error");
                        }
                    });
            }

            //check Status Function
            function checkStatus(id) {
                data.action = "get-status";
                data.id = id;
                const formData = new FormData();
                for (const key in data) {
                    formData.append(key, data[key]);
                }

                axios
                    .post("./pawapay/process-pawapay.php", formData)
                    .then(function(res) {
                        console.log("Get Response:", res.data[0]); // Debugging
                        if (res.data[0].status == "COMPLETED") { //if payment was successful by pawapay
                            fetch("./pawapay/add-transaction.php", {
                                    method: "POST",
                                    headers: {
                                        "Content-Type": "application/json",
                                    },
                                    body: JSON.stringify(res.data[0]),
                                })
                                .then((response) => response.json())
                                .then((data) => {
                                    if (data.status == "success") {
                                        const csrfToken = document.getElementById('csrf_token');
                                        document.getElementById("loadingMessage").style.display = "block";

                                        fetch("./php/donate-form.php", {
                                                method: "POST",
                                                headers: {
                                                    "Content-Type": "application/json",
                                                },
                                                body: JSON.stringify({
                                                    id: id,
                                                    name: name.value,
                                                    number: phoneInput.value,
                                                    email: email.value,
                                                    csrf_token: csrfToken.value
                                                }),
                                            })
                                            .then((response) => {
                                                if (!response.ok) {
                                                    throw new Error("Network response was not ok");
                                                }
                                                return response.json();
                                            })
                                            .then((data) => {
                                                console.log(data);
                                                if (data.status == "success") {
                                                    window.location = 'donate';
                                                } else if (data.status == "error") {
                                                    swal("", data.message, "error");
                                                }
                                            })
                                            .catch((error) => {
                                                console.error("Error:", error);
                                            });

                                    }
                                })
                                .catch((error) => console.error(error));
                        } else if (res.data[0].status == "FAILED") { //assumming payment failed
                            swal("", "Payment Failed", "error");
                            document.getElementById("loadingMessage").style.display = "none";
                        } else {
                            setTimeout(checkStatus(id), 1000); //recheck status
                        }
                    })
                    .catch((error) => {
                        console.error("Payment error:", error);
                        setTimeout(checkStatus(id), 1000); //recheck status
                    });
            }

            // Event listener for the Pay button
            document.getElementById('pay_button').addEventListener('click', pay);
        });
    </script>
    <script>
        // Disable right-click context menu
        document.addEventListener('contextmenu', function(event) {
            event.preventDefault();
        });

        // Disable specific keyboard shortcuts
        document.addEventListener('keydown', (e) => {
            if (e.ctrlKey && (e.key === 'u' || e.key === 'U' || e.key === 'i' || e.key === 'I')) {
                e.preventDefault();
            }
        });
    </script>
</body>

</html>

Youez - 2016 - github.com/yon3zu
LinuXploit