0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.221.221.171


Current Path : /var/www/html/gcg/adm/admin/js/
Upload File :
Current File : /var/www/html/gcg/adm/admin/js/sign-up.js

/*$(function () {
    $('#sign_up').validate({
        rules: {
            'terms': {
                required: true
            },
            'confirm': {
                equalTo: '[name="password"]'
            }
        },
        highlight: function (input) {
            console.log(input);
            $(input).parents('.form-line').addClass('error');
        },
        unhighlight: function (input) {
            $(input).parents('.form-line').removeClass('error');
        },
        errorPlacement: function (error, element) {
            $(element).parents('.input-group').append(error);
            $(element).parents('.form-group').append(error);
        }
    });
});*/

var mobile;
var regno;
function sendpassword()
{
    if(!$('#otpform').valid()){
        console.log('invalid');
        return;
    }
    mobile = document.getElementById("mobile").value;  
    $("#otpmsg").append('<img src="loding.gif" height="40" width="40"> SENDING OTP');
    var parameters = "&mobile="+mobile+"&regno="+regno;
    $.ajax({
        type: 'post',
        url: 'sendotp.php',
        data:parameters,
        success: showOtpStatus
    });
    
}
function showOtpStatus(response)
{
    $("#otpmsg").html("");
    response = $.trim(response);
    if(response == 'sent')
    {
        $("#otpmsg").append("OTP SENT");
        $("#sendpasswd").html('Re-Send OTP');
    }
    else
    {
        $("#otpmsg").html(response);
        $("#sendpasswd").html('Re-Send OTP');
    }
}

function signup()
{
    if(!$('#otpform').valid()){
        console.log('invalid');
        return;
    }
    var emailid = document.getElementById("email").value;
    var mobile = document.getElementById("mobile").value;
    var motp = document.getElementById("motp").value;    
    var parameters = "&mobile="+mobile+"&email="+emailid
                        +"&motp="+motp;
    $("#confirm").append('<img src="loding.gif" height="40" width="40"> Confirming');
    $.ajax({
        type: 'post',
        url: 'signup.php',
        data:parameters,
        success: showPassword 
    });
}

function showPassword(response)
{
    if(response == "inserted")
    {
        $("#confirm").html("Check your Email For Registeration");
        
    }
    else
    {
        $("#confirm").html(response);
    }
}

function loadmaster()
{
    $("#success").hide();
}

function sendEmail()
{
    var emailid = document.getElementById("email").value;
    var parameters = "&email="+emailid+"&regno="+regno;
    $.ajax({
        type: 'post',
        url: 'sendEmail.php',
        data:parameters,
        success: function(response)
        {
            if(response == 'inserted')
            {
                $("#email").prop('disabled', true);
                $("#sendemailbtn").prop('disabled', true);
                $("#msg").html('signup was successfull check your email inbox');
            }
        } 
    });
}