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


Current Path : /proc/thread-self/root/var/www/oasis/src/
Upload File :
Current File : //proc/thread-self/root/var/www/oasis/src/updateuvcms.php

<?php
function loaduvcms($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
    $collcode = $_SESSION['collcode'];
    $query="SELECT distinct concat(fdegree,' - ',fdescpn) as fdescpn,
    fdegree FROM degree where fadmdeg = 'T'
    and fdegree in(select fdegree from colldeg where fcollcode = '{$collcode}'
    and ifnull(fdeleted,'') <> 'T')
    order by fdegree";
    $lobj_get_data = $aobj_context->mobj_db->GetAll($query);

    if($lobj_get_data)
    {	
        echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_data,0,"success"); 
        return;
    }
    else
    {
        $data = "No data found..!";
        echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
        return;
    }
}

function submithandler($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
    $fdegree=$aobj_context->mobj_data["fdegree"];
    $from=$aobj_context->mobj_data["from"];
    $to=$aobj_context->mobj_data["to"];
    $collcode = $_SESSION['collcode'];

    $query="SELECT IFNULL(fregno,'')AS fregno,
     IFNULL(fname,'')AS fname, IFNULL(fdegree,'')AS fdegree,
    IFNULL(ffatname,'')AS ffatname, IFNULL(fuvcmsregno,'')AS temunivregno FROM student 
    WHERE fregno BETWEEN '{$from}' AND '{$to}' AND fdegree='{$fdegree}'
    and fcollcode = '{$collcode}'";

     $lobj_get_data = $aobj_context->mobj_db->GetAll($query);
     if($lobj_get_data)
    {	
        echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_data,0,"success"); 
        return;
    }
    else
    {
        $data = "No data found..!";
        echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
        return;
    }
}


function save($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
    $fregno=$aobj_context->mobj_data["fregno"];
    $temunivregno=$aobj_context->mobj_data["temunivregno"];

    $query="update student set fuvcmsregno='{$temunivregno}' 
    where fregno='{$fregno}'";
    $lobj_get_data = $aobj_context->mobj_db->Execute($query);
    
    if($lobj_get_data)
    {	
        $arr['msg']="Updated";
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
        return;
    }
    else
    {
        $arr = "failed..!";
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 
        return;
    }
}


?>