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


Current Path : /proc/thread-self/root/var/www/html/pgadm/admin-src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/pgadm/admin-src/collegedetails.php

<?php
function loadCollegeDetails($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
	
	
	
	
	$query1 = "select * from entcoll ";
	// var_dump($query1);
	$result1 = $aobj_context->mobj_db->GetAll($query1);
  // var_dump($result1);
	if($result1)
	{	
		echo $aobj_context->mobj_output->ToJSONEnvelope($result1,0,"success"); 
	}	
	else
	{	
		$arr = "Some Failure as occured";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error"); 
	}
}


function loadDegreeDetails($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
	
	$query1 = "select * from entdeg order by forder";
  $result1 = $aobj_context->mobj_db->GetAll($query1);
  // var_dump($result1);
	if($result1)
	{	
		echo $aobj_context->mobj_output->ToJSONEnvelope($result1,0,"success"); 
	}	
	else
	{	
		$arr = "Some Failure as occured";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error"); 
	}
}

function loadDegreeDropDown($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
	
	$cond = "";
	if($_SESSION['fusertype'] == 'usr') {
		$deg_arr = explode( '*', $_SESSION['FDEGREE']);
		$degrees = implode("','", $deg_arr);
		$cond = "where fdegree in ('{$degrees}')";
	}

	$query1 = "select fdegree, fdescpn from entdeg {$cond} order by forder";
  	$result1 = $aobj_context->mobj_db->GetAll($query1);
  // var_dump($result1);
	if(count($result1) > 0)
	{	
		echo $aobj_context->mobj_output->ToJSONEnvelope($result1,0,"success"); 
	}	
	else
	{	
		$arr = "Some Failure as occured";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error"); 
	}
}

function loadPGAD($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	
	session_start();

	if(!isset($_SESSION['USERNAME']) || !isset($_SESSION['fusertype'])) {
		$arr = "Login to continue";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error");
		return;
	}
	

	$query1 = "select * from message_board where college_code = 'PGAD' and date_format(now(),'%Y-%m-%d') between display_from and display_to"  ;
	  $result1 = $aobj_context->mobj_db->GetRow($query1);
	  
	$query1 = "select * from masuser where fmobileno = '{$_SESSION['MOBILE']}'";
  	$result = $aobj_context->mobj_db->GetRow($query1);
  // var_dump($result1);
	if($result1)
	{	
		$res['message'] = $result1;
		$res['user'] = $result;
		echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success"); 
		return;
	}	
	else
	{	
		$arr = "Some Failure as occured";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error"); 
		return;
	}
}