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.191.233.198
var urlarr = window.location.pathname.split('/');
var $url="http://"+window.location.host+"/";
var $hoststr = '';
for(var j=1;j<urlarr.length-1;j++)
{
$hoststr += window.location.pathname.split('/')[j]+"/";
}
$host_url = $url+$hoststr+"app.php?a=";
$image_path = $url+$hoststr+"jqGrid3.5/cmes/tarka/images/";
$(document).ready(function(){
CMS.getheaderdetails();
});
/* function getheaderdetail()
{
$.ajax({
url: $host_url+"getheaderdetails",
success:function(responce)
{
responce = eval('('+responce+')');
if(responce.error_code == 0)
{
setCookie("title",responce.data.FUNIVNAME);
setCookie("datestr",responce.data.datestr);
//document.getElementById("title").innerHTML = responce.data.FUNIVNAME;
//document.getElementById("logo").innerHTML = responce.data.FLOGOPATH;
document.getElementById("datestr").innerHTML = responce.data.datestr;
}
}
});
} */
function newregistration()
{
var myobject;
fldorder = 'T1,T2,T3';
mandfields = 'T1,T2,T3';
myobject = onsavevalidate.call(myobject, 999);
if (myobject != 999)
{
document.getElementById(myobject).focus();
return false;
}
var e = document.createEvent('Event');
emailid = document.getElementById('T2').value;
if(!validateemail(e,emailid))
{
alert('Invalid email id');
document.getElementById('T2').focus();
return false;
}
var username = document.getElementById("T1").value;
var emailid = document.getElementById("T2").value;
var mobileno = document.getElementById("T3").value;
var parameters = "username="+username+"&emailid="+emailid+"&mobileno="+mobileno;
$.ajax({
url: $host_url+"newregistration",
data:parameters,
success: newregistrationResponse
});
}
function newregistrationResponse(responce)
{
responce = eval('('+responce+')');
if(responce.error_code == 0)
{
alert(responce.data);
document.getElementById("T1").value = '';
document.getElementById("T2").value = '';
document.getElementById("T3").value = '';
}
else
{
alert(responce.data);
document.getElementById("T1").focus();
return false;
}
}
function loginvalidate()
{
var myobject;
fldorder = 'T4,T5';
mandfields = 'T4,T5';
myobject = onsavevalidate.call(myobject, 999);
if (myobject != 999)
{
document.getElementById(myobject).focus();
return false;
}
var e = document.createEvent('Event');
var emailid = document.getElementById('T4').value;
if(!validateemail(e,emailid))
{
alert('Invalid email id');
document.getElementById('T4').focus();
return false;
}
var emailid = document.getElementById("T4").value;
var paswrd = document.getElementById("T5").value;
var parameters = "emailid="+emailid+"&paswrd="+paswrd;
$.ajax({
url: $host_url+"loginvalidate",
data:parameters,
success: loginvalidateResponse
});
}
function loginvalidateResponse(responce)
{
responce = eval('('+responce+')');
if(responce.error_code == 0)
{
window.location.href="home.html";
setCookie("userid",responce.data.fuserid);
setCookie("username",responce.data.fusername);
loadhomepage();
}
else
{
alert(responce.data);
document.getElementById("T4").focus();
return false;
}
}
function logoutsession()
{
$.ajax({
url: $host_url+"logoutsession",
success:function(responce)
{
responce = eval('('+responce+')');
window.location.href = "index.html";
}
});
}
function isloggedinvalidate()
{
$.ajax({
type: "POST",
async: false,
url: $host_url+"isloggedinvalidate",
success:function(responce)
{
responce = eval('(' + responce + ')');
if(responce.data['data'] == 0)
{
alert("Please Login");
window.location.href="index.html";
}
else
{
loadhomepage();
document.getElementById("student_sign_upload").value = "";
document.getElementById("student_photo_upload").value = "";
}
}
});
}
function loadhomepage()
{
loadhomedropdown();
document.getElementById("user_name").innerHTML = getCookie("username");
document.getElementById("datestr").innerHTML = getCookie("datestr");
}
|