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 : 3.135.214.226


Current Path : /proc/thread-self/root/var/www/html/kus/parikshamitra/js/
Upload File :
Current File : //proc/thread-self/root/var/www/html/kus/parikshamitra/js/home_12062018.js

/* function loadstudenttabs(mode)
{
	document.getElementById("cont_acpt_univ").style.display = "none";
	var services_url = "services.html";
	var examapp_url = "http://www.logisys.net.in/student/"+mode
	var result_url = "http://www.logisys.net.in/student/"+mode
	var tabs = "<button type='submit' class='button button2' onclick=redirectservice('"+mode+"') ><span>Online Services</span></button>";
	tabs += "<button type='submit' class='button button2' onclick=redirectpage('"+examapp_url+"') ><span>Exam Application form</span></button>";
	tabs += "<button type='submit' class='button button2' onclick=redirectpage('"+result_url+"') ><span>Results</span></button>";
	document.getElementById("cont_curr_univ").innerHTML = tabs;
	document.getElementById("cont_curr_univ").style.display = "block";
} */

function loadexamtabs(mode) 
{
	var reurl = "http://student.logisys.org/"+mode;
	window.location.href = reurl;
}

function loadteachertabs(mode)
{
	document.getElementById("cont_acpt_univ").style.display = "none";
	var reurl = "http://oasis.logisys.org/"+mode;
	var tabs = "<button type='submit' class='button button2' onclick=redirectpage('"+reurl+"') ><span>OASIS Login</span></button>";
	document.getElementById("cont_curr_univ").innerHTML = tabs;
	document.getElementById("cont_curr_univ").style.display = "block";
}

function loadoasistabs(mode)
{
	//document.getElementById("cont_acpt_univ").style.display = "none";
	var reurl = "http://oasis.logisys.org/"+mode+"/indexlogin.html";
/* 	var tabs = "<button type='submit' class='button button2' onclick=redirectpage('"+reurl+"') ><span>Results</span></button>";
	document.getElementById("cont_curr_univ").innerHTML = tabs;
	document.getElementById("cont_curr_univ").style.display = "block"; */
	window.location.href = reurl;
}

function loadresultstabs(mode)
{
	//document.getElementById("cont_acpt_univ").style.display = "none";
	var reurl = "http://results.logisys.org/"+mode;
/* 	var tabs = "<button type='submit' class='button button2' onclick=redirectpage('"+reurl+"') ><span>Results</span></button>";
	document.getElementById("cont_curr_univ").innerHTML = tabs;
	document.getElementById("cont_curr_univ").style.display = "block"; */
	window.location.href = reurl;
}

function redirectDegcrtpage(mode)
{
	var redurl = "http://oasis.logisys.org/cnv/"+mode+"/indexpage.php";
	window.location.href = redurl;
}

function redirectpage(redurl)
{
	window.location.href = redurl;
}

function redirectservice(mode,mmode = '')
{
	setCookie("curuniv",mode);
	var manual = 'F';
	if(mmode == 'm')
		manual = 'T';
	//if($('#manual').attr('checked') == 'checked')
		
	setCookie("manual_entry",manual);
	var services_url = "services.html";
	window.location.href = services_url;
	
}

function loadservicepage(mode)
{
	setCookie("curuniv",mode);
	var services_url = "services.html";
	window.location.href = services_url;
}

function redirectCollegepage()
{
	var redurl = "http://oasis.logisys.org/kus";
	window.location.href = redurl;
}

function loadonlineservices()
{
	$("#T5").inputmask("d/m/y", {
		"placeholder": "dd/mm/yyyy"
	});
	$("#T19").inputmask("d/m/y", {
		"placeholder": "dd/mm/yyyy"
	});
	$("#T22").inputmask("d/m/y", {
		"placeholder": "dd/mm/yyyy"
	});
	$("#T25").inputmask("d/m/y", {
		"placeholder": "dd/mm/yyyy"
	});
	var crmode = getCookie("curuniv");
	var manual_entry = getCookie("manual_entry");
	$('#mdegree').hide();
	$('#degree').show();
	if(manual_entry == 'T')
	{
		$('#mdegree').show();
		$('#degree').hide();
		document.getElementById('T2').disabled = false;
		document.getElementById('T3').disabled = false;
		document.getElementById('T4').disabled = false;
	}	
	
	if(trim(crmode) != '')
	{	
		var urlarr = window.location.pathname.split('/');
		var $url="http://"+window.location.host+"/";
		$hoststr = '';
		for(var j=1;j<urlarr.length-1;j++)
		{
			$hoststr += window.location.pathname.split('/')[j]+"/"; 
		}	
		console.log(crmode);
		$host_url = $url+$hoststr+"app.php?cdb="+crmode+"&a=";
		console.log($host_url);
		GetCMSDropDownMenuValues();	
		
	}
	else
	{
		window.location.href = "index.html";
	}	
	
}

function GetCMSDropDownMenuValues()
{
	
	$.ajax({
		type: "POST",
		url:$host_url+'getcmsdropdownmenuvalues',
		success: function GetCMSDropDownMenuValuesResponce(responce)
		{
			try
			{
				
				responce = eval('(' + responce + ')');				
				var serv_arr = responce.data['serv_type'];
				var serv_title = '';
				document.getElementById("T26").value = 0;
				document.getElementById('tran').checked = false;
				FillDropdownValues(serv_arr,'S2',serv_title);
				
				var pay_arr = responce.data['pay_type'];
				var pay_title = '';
				FillDropdownValues(pay_arr,'S3',pay_title);
				
				var category = responce.data['category'];
				var cat_title = '';
				FillDropdownValues(category,'S1',cat_title);
				
				var manual_entry = getCookie("manual_entry");
				if(manual_entry == 'T')
				{	
					var dergee = responce.data['dergee'];
					var deg_title = '';
					FillDropdownValues(dergee,'S10',deg_title);
				}
				
			}	
			catch(err)
			{
				txt= err.message;
				bootbox.alert(txt);
			}	
		}
		});
	
}

function FillDropdownValues(arr,ele_name,def_title)
{
	document.getElementById(ele_name).options.length=0;
	var op = new Option('  Select  '+def_title, '#');
	op.id='00';
	document.getElementById(ele_name).options.add(op);
	jQuery.each(arr, function(k, v) 
	{	 
		var op = new Option(v['val'], v['int_code']);
		op.id=v['int_code'];
		document.getElementById(ele_name).options.add(op);
	});
}

function saveservicedetails()
{
	//////To read Multiple Records///////	
	
	var inputFileds = document.getElementsByTagName('input');
	var chkCnt = 0;
	var rowCnt = 0;
	var service_arr = {};
	for (var counter=0; counter < inputFileds.length; counter++) 
	{       
		if ( inputFileds[counter].type.toUpperCase()=='TEXT'  && inputFileds[counter].name == "servicedet" )
		{   
			++rowCnt;
			if(document.getElementById(rowCnt+'AT6').value != 'T')
			{
				++chkCnt; 
				service_arr[chkCnt] = new Object();
				service_arr[chkCnt]['code'] = document.getElementById(rowCnt+'AT1').value;
				service_arr[chkCnt]['name'] = document.getElementById(rowCnt+'AT2').value;
				service_arr[chkCnt]['proc']   = document.getElementById(rowCnt+'AT3').value;
				service_arr[chkCnt]['days']  = document.getElementById(rowCnt+'AT4').value;
				service_arr[chkCnt]['order']  = document.getElementById(rowCnt+'AT5').value;
			} 	
		}
	}
	
	var dataString ="&service_arr="+encodeURIComponent(JSON.stringify(service_arr));
	$.ajax({
	type:"POST",
	url:$host_url+"saveservicedetails",
	data:dataString,
	cache:false,
	success:function($responce)
	{	
		$responce = eval('('+$responce+')');
		if($responce.error_code == 0)
		{
			alert($responce.data);
		}
		else
			alert($responce.data);
	}	
	});
}

function savefeeheaddetails()
{
	//////To read Multiple Records///////	
	var inputFileds = document.getElementsByTagName('input');
	var chkCnt = 0;
	var rowCnt = 0;
	var fee_arr = {};
	for (var counter=0; counter < inputFileds.length; counter++) 
	{       
		if ( inputFileds[counter].type.toUpperCase() == 'TEXT'  && inputFileds[counter].name == "feeheaddet" )
		{   
			++rowCnt;
			if(document.getElementById(rowCnt+'BT5').value != 'T')
			{
				++chkCnt; 
				fee_arr[chkCnt] = new Object();
				fee_arr[chkCnt]['code'] = document.getElementById(rowCnt+'BT1').value;
				fee_arr[chkCnt]['fee'] = document.getElementById(rowCnt+'BT2').value;
				fee_arr[chkCnt]['desc']   = document.getElementById(rowCnt+'BT3').value;
				fee_arr[chkCnt]['order']  = document.getElementById(rowCnt+'BT4').value;
			} 	
		}
	}
	var dataString ="&fee_arr="+encodeURIComponent(JSON.stringify(fee_arr));
	$.ajax({
	type:"POST",
	url:$host_url+"savefeeheaddetails",
	data:dataString,
	cache:false,
	success:function($responce)
	{	
		$responce = eval('('+$responce+')');
		if($responce.error_code == 0)
		{
			alert($responce.data);
		}
		else
			alert($responce.data);
	}	
	});
	
}

function saveservfeedetails()
{
	//////To read Multiple Records///////	
	var inputFileds = document.getElementsByTagName('input');
	var chkCnt = 0;
	var rowCnt = 0;
	var sfee_arr = {};
	for (var counter=0; counter < inputFileds.length; counter++) 
	{       
		if ( inputFileds[counter].type.toUpperCase() == 'TEXT'  && inputFileds[counter].name == "feeheaddet" )
		{   
			++rowCnt;
			if(document.getElementById(rowCnt+'CT5').value != 'T')
			{
				++chkCnt; 
				sfee_arr[chkCnt] = new Object();
				sfee_arr[chkCnt]['deg'] = document.getElementById(rowCnt+'CT1').value;
				sfee_arr[chkCnt]['cat'] = document.getElementById(rowCnt+'CT2').value;
				sfee_arr[chkCnt]['fcd']   = document.getElementById(rowCnt+'CT3').value;
				sfee_arr[chkCnt]['fee']  = document.getElementById(rowCnt+'CT4').value;
			} 	
		}
	}
	var dataString ="&sfee_arr="+encodeURIComponent(JSON.stringify(sfee_arr));
	$.ajax({
	type:"POST",
	url:$host_url+"saveservfeedetails",
	data:dataString,
	cache:false,
	success:function($responce)
	{	
		$responce = eval('('+$responce+')');
		if($responce.error_code == 0)
		{
			alert($responce.data);
		}
		else
			alert($responce.data);
	}	
	});
	
}