HEX
Server: nginx/1.24.0
System: Linux webserver-one 6.8.0-101-generic #101-Ubuntu SMP PREEMPT_DYNAMIC Mon Feb 9 10:15:05 UTC 2026 x86_64
User: www-data (33)
PHP: 8.4.18
Disabled: NONE
Upload Files
File: /srv/www/rectt-csmcri.res.in/public_html/js/login.js
$(document).ready(function () {

    $("#submit").click(function (e) {
        e.preventDefault();  // Prevent default form submission
        var email = $("#myemail").val();
        var password = $("#mypassword").val();
        var ad_id = $("#ad_id").val();

        if ((email == "") || (password == "") || (ad_id === "")) {
            $("#message").html("<div class=\"alert alert-danger alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>Please fill all the fields including advertisement selection</div>");
        }
        else {
            $.ajax({
                type: "POST",
                url: "checklogin.php",
                data: { myemail: email, mypassword: password, ad_id: ad_id },
                success: function (html) {
                    if (html.trim() === "<!-- <!DOCTYPE html> -->true") {
                        window.location.href = "primary.php";
                    } else {
                        $("#message").html(html); // Display error message
                    }
                }

                ,
                beforeSend: function () {
                }
            });
        }
        return false;
    });

});