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.117.93.183


Current Path : /var/www/html/studentportal_test/js/
Upload File :
Current File : /var/www/html/studentportal_test/js/MainPage2.js

function loadResults()
{
	var sem1;
	var ufolder;
	var uregno;
	var usem;
	var status;
	$("#loadtab").load('html_modules/results.html?v='+version,function()
	{
		var id = "";
		var dataString = '&id='+id;
		$.ajax({
		type:'post',
		url: "src/results.php",
		data:dataString,
		success: function(response)
		{
			response = eval('(' + response + ')');
			status = response.status;
			if(status === 'success')
			{
				var sem = response.sem;
				usem = response.sem;
				var folder = response.folder;
				ufolder = response.folder;
				var fregno = response.fregno;
				uregno = response.fregno;

				console.log(response);
				
				if(sem.length > 1)
				{
					var list = "";
					var div	 = "";
					for(var i=0;i<sem.length;i++)
					{
						var cat = sem[i];
						sem1 = sem[0].fexamno;
						list += `<li role="presentation" id = "sem_${cat.fexamno}">
								<a href="#${cat.fexamno}"   data-toggle="tab">
									<i class="material-icons">layers</i> ${cat.fexamname}
								</a>
							</li>`;
						div += `<div role="tabpanel" class="tab-pane fade in " id="${cat.fexamno}">
		                        <iframe src="http://results.logisys.org/${ufolder}/result.php?r=${uregno}&e=${cat.fexamno}&ct=" id = "i${cat.fexamno}results" width="100%" height="635px">
								</iframe>
		                </div>`;
					}
					$("#resultslink").html(list);
					$("#divlink").html(div);
					$("#"+sem[0].fexamno).addClass("active");
					$("#sem_"+sem[0].fexamno).addClass("active"); 
				}
				else
				{
					sem1 = sem[0].fexamno;
					$('#results').html(`<iframe src="http://results.logisys.org/${ufolder}/result.php?r=${uregno}&e=${sem1}&ct=" width="100%" style="height:90vh;"></iframe>`);
				}
			}
			else
			{
				swal({
                    title: 'No results found',
                    type: "warning",
                    showCancelButton: false,
                    confirmButtonColor: "#5495ff",
                    confirmButtonText: "OK",
                    closeOnConfirm: false
                }, function(isConfirm){
                    if(isConfirm)
                        swal.close();
                    loadProfile();
                    $("#profile").addClass("active");
                    $("#resultsmenu").removeClass("active");
                });
			}		
			
		}/*
		complete: function () 
		{
			if(status === 'success')
			{
				if(usem.length > 1)
		    		$(`#i${sem1}results`).attr('src', `http://logisys.net.in/results/${ufolder}/result.php?r=${uregno}&e=${sem1}&ct=`);  
		    }
	    }*/
		});
	});
}

function loadHallTicket()
{
	$.blockUI({ message: "<img src='images/Loading_icon.gif' border='0'>" });
	 $.ajax({
      type: 'post',
      url: 'src/hallticket.php',
      //data:parameters,
      success: function(response)
      {
      	$.unblockUI();
        response = JSON.parse(response);
        if(response.status === 'success')
        {
          $('#loadtab').load('html_modules/hallTicket.html?v='+version,function(){
            $('#iframe').attr('src',response.url);
            //$('#objdat').attr('data',response.url);
            $('#ht-download').attr('href',response.durl);
            $('#ht-download').attr('download',response.fileName);
          });
        }else
		{
			swal({
			    title: response.msg,
			    type: "warning",
			    showCancelButton: false,
			    confirmButtonColor: "#5495ff",
			    confirmButtonText: "OK",
			    closeOnConfirm: false
			}, function(isConfirm){
			    if(isConfirm)
			        swal.close();
			    loadProfile();
			    $("#profile").addClass("active");
			    $("#examHtMenu").removeClass("active");
			});
		}	
      }
    });
}

function loadiframeresults(folder,regno,sem)
{
	var loc = "http://logisys.net.in/results/"+folder+"/result.php?r="+regno+"&e="+sem+"&ct=";
	document.getElementById('i'+sem+'results').src = loc;
	
}

function loadchangepassword()
{
	$("#loadtab").load('html_modules/changepassword.html?v='+version,function()
	{
		var id = "";
		var dataString = '&id='+id;
	
		$.ajax({
		type:'post',
		url: "src/changepassword.php",
		data:dataString,
		success: function(response)
		{
			response = JSON.parse(response);
			
		}
		});
	});
			
}

function loadrvguidelines()
{
	$('#loadtab').load('html_modules/rvguidelines.html?v='+version);
}

function loadHelpDesk()
{
	$.blockUI({ message: "<img src='images/Loading_icon.gif' border='0'>" });
	$.ajax({
        type: 'post',
        url: 'src/helpDesk.php',
        //data:parameters,
        success: function(response)
        {
            $.unblockUI();
            response = JSON.parse(response);
            if(response.status === 'success')
            {
                $('#loadtab').load('html_modules/helpDesk.html?v='+version,function(){


                	var colladd = (response.FCOLLADD1 == ''? '' : response.FCOLLADD1 + ", ") + 
        			(response.FCOLLADD2 == ''? '' : response.FCOLLADD2 + ", ") +
        			(response.FCOLLADD3 == ''? '' : response.FCOLLADD3 + ", ") +
        			response.FCOLLADD4;
        			colladd = colladd.replace(/,\s*$/, "");
        			var strContact = (response.phone == ''? '' : response.phone + ", ") + response.FMOBILE;
        			strContact = strContact.replace(/,\s*$/, "");
                    $('#studinfo').html(`<tr>
                        <td width="17%"><b>College Name</b></td>
                        <td width="2%"> : </td>
                        <td width="35%"> ${ response.fcollcode }</td>
                    </tr>
                    <tr>
                        <td><b>College Address</b> </td>
                        <td width="2%"> : </td>
                        <td> ${ colladd } </td>
                        <td></b> </td><td width="2%"></td><td></td>
                    </tr>
                    <tr>
                        <td><b>Contact Number</b></td>
                        <td width="2%"> : </td>
                        <td>${  strContact }</td>
                    </tr>
                    <tr>
                        <td width="17%"><b>Email Id</b> </td><td width="2%"> : </td><td> ${ response.FEMAIL } </td>
                    </tr>
                    <tr>
                        <td><b></b></td><td width="2%"></td><td></td>
                        <td width="17%"><b></b> </td><td width="2%"></td><td></td>
                    </tr>
                    <tr>
                        <td><b></b></td><td width="2%"></td><td></td>
                        <td width="17%"><b></b> </td><td width="2%"></td><td></td>
                    </tr>
                    <tr>
                        <td><b><u>For Technical Assistance </u></b></td><td width="2%"></td><td></td>
                    </tr>
                    <tr>
                        <td><b>Contact Number </b></td><td width="2%"> : </td><td>${ response.ftechcontact }</td>
                    </tr>
                    <tr>
                        <td><b>Email </b></td><td width="2%"> : </td><td>${ response.ftechemail }</td>
                    </tr>`);
                });
            }
            else
            {

            }
        }
    });
}