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 : 3.17.175.167
function validateRegno()
{
if(!$('#validateform').valid()){
return;
}
var parameters = `&mobile=${$('#idmobile').val()}`;
$.ajax({
type: 'post',
url: 'validateRegno.php',
data: parameters,
success: function(response)
{
var {status} = JSON.parse(response);
if(status == 'invalid')
{
var { msg } = JSON.parse(response);
swal({
title: msg,
type: "warning",
showCancelButton: false,
confirmButtonColor: "#5495ff",
confirmButtonText: "OK",
closeOnConfirm: false
});
}
else if(status == 'success')
{
swal({
title: "OTP Sent to your mobile.",
type: "success",
showCancelButton: false,
confirmButtonColor: "#5495ff",
confirmButtonText: "OK",
closeOnConfirm: false
});
// var { fname, femail } = result;
$(".card1").css('margin-top', '0%');
$("#hrule").css('display', 'none');
$('#sign-up-scroll').slimScroll({
height: '650px'
});
$('#perinfo').css('display', 'block');
$('#sendpasswd').css('display', 'none');
$('#sendotp').css('display', 'block');
$("#sendotpform").show();//sendotp
}
}
});
}
function validateInfo()
{
if(!$('#sendotpform').valid()){
return;
}
var parameters = `&mobile=${$('#idmobile').val()}&dob=${$('#dob').val()}
&password=${$('#password').val()}`;
$.ajax({
type: 'post',
url: 'sendMobEmailOTP.php',
data:parameters,
success: function(response)
{
var {status, sms} = JSON.parse(response);
if(sms == 'Sent.')
{
$("#sendotp").html('Re-Send OTP');
$('#mobile').attr('disabled', 'true');
$('#state').attr('disabled', 'true');
$('#univ').attr('disabled', 'true');
$('#dob').attr('disabled', 'true');
$('#password').attr('disabled', 'true');//cpassword
$('#cpassword').attr('disabled', 'true');
}
}
});
}
function signup()
{
if(!$('#sendotpform').valid()){
return;
}
var parameters = `&mobile=${$('#idmobile').val()}&dob=${$('#dob').val()}
&password=${$('#password').val()}&motp=${$('#motp').val()}&name=${$('#idname').val()}
&email=${$('#idemail').val()}`;
$.ajax({
type: 'post',
url: 'signup.php',
data:parameters,
success: function(response)
{
var { status } = JSON.parse(response);
if( status == 'success' )
{
swal({
title: "Your login account created successfully for Ph.D registration.",
text: "Click OK to continue",
type: "success",
showCancelButton: false,
confirmButtonColor: "#5495ff",
confirmButtonText: "OK",
closeOnConfirm: false
}, function () {
window.location.href = 'index.html';
// signInWithSignup($('#idmobile').val(), $('#password').val());
});
}
else
{
swal({
title: "Invalid OTP. Try resend OTP.",
type: "warning",
showCancelButton: false,
confirmButtonColor: "#5495ff",
confirmButtonText: "OK",
closeOnConfirm: false
});
$('#sendotp').css('display', 'block');
}
}
});
}
function signInWithSignup(mobile,passwd)
{
var parameters = "&mobile="+mobile+"&passwd="+passwd.toUpperCase();
$.ajax({
type: 'post',
url: 'signin.php',
data:parameters,
success: function(response)
{
if(response === 'invalid')
{
alert('Invalid Login');
}
else
{
window.location.href = 'instruction.html';
}
}
});
}
|