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


Current Path : /var/www/html/admission/src/
Upload File :
Current File : /var/www/html/admission/src/loadclgdettab.php

<?php
function loadclgdettab($aobj_context)
{
	session_start();
	// $db = $aobj_context->mobj_data["db"];
    $univcode = $aobj_context->mobj_data["univcode"];
    $college = $aobj_context->mobj_data["college"];

    if($college == 'all'){
        $query="SELECT IFNULL(fcollcode,'') AS fcollcode,
        IFNULL(fcollname,'') AS fcollname,
        ifnull(fsspcollcode,'') AS sspcode,
        IFNULL(fsspdistcode,'') AS fsspdistcode,
        IFNULL(fssptalukcode,'') AS fssptalukcode,
        IFNULL(fcolltype,'') AS fcolltype
        FROM college";

       
    }else{
    	$query="SELECT IFNULL(fcollcode,'') AS fcollcode,
        IFNULL(fcollname,'') AS fcollname,
        ifnull(fsspcollcode,'') AS sspcode,
        IFNULL(fsspdistcode,'') AS fsspdistcode,
        IFNULL(fssptalukcode,'') AS fssptalukcode,
        IFNULL(fcolltype,'') AS fcolltype
        FROM college
        where fcollcode = '{$college}'";
    
    
}

$results = $aobj_context->pobj_db->GetAll($query);


	if($results!= 0)	
      echo $aobj_context->mobj_output->ToJSONEnvelope($results,0,"success"); 
    else
      echo $aobj_context->mobj_output->ToJSONEnvelope($results,-1,"Failure");
    return;

}

function saveclgtabdet($aobj_context)
{
	session_start();
	// $db = $aobj_context->mobj_data["db"];
    $univcode = $aobj_context->mobj_data["univcode"];
    $sspcode = $aobj_context->mobj_data["collsspcode"];
    $distsspcode = $aobj_context->mobj_data["distsspcode"];
    $talsspcode = $aobj_context->mobj_data["talsspcode"];
    $colltype = $aobj_context->mobj_data["colltype"];
    $collcode = $aobj_context->mobj_data["collcode"];
    


        $query="UPDATE college
        SET fsspcollcode = '{$sspcode}',
        fsspdistcode='{$distsspcode}', 
        fssptalukcode='{$talsspcode}',
        fcolltype = '{$colltype}'
        where fcollcode = '{$collcode}'";

       
    // var_dump($query);
    // die();
    
    


$results = $aobj_context->pobj_db->Execute($query);


	if($results){
    $data = 'updated successfully';	
      echo $aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 
    }else{
    $data = 'failed to updated';
      echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"Failure");
    return;
}
}


?>