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


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

<?php

function getTeacherDet($aobj_context)
{

    $univcode = $aobj_context->mobj_data["univcode"];
    $techerid = $aobj_context->mobj_data["techerid"];


    $aobj_context->pobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
    $query = "SELECT IFNULL(m.fteachname, '') AS fteachname ,
    IFNULL(m.fteachcode, '') AS fteachcode,
    IFNULL(DATE_FORMAT(m.fdob,'%d/%m/%Y'),'') AS fdob,
    concat(m.fcollcode,' - ',c.fcollname,', ',c.ftown) AS fcollcode
    FROM masteach m inner join college c on m.fcollcode = c.fcollcode
    WHERE fteachcode = '{$techerid}'";

    
    $result = $aobj_context->pobj_db->GetRow($query);
    $db = $result['fdbname'];
    
  
    
    if ($result) {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
        return;
    } else {
        $arr['msg'] = 'Teacher Code is not found';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
        return;
    }
}


function updatenewcollcode($aobj_context)
{

  

    $univcode = $aobj_context->mobj_data["univcode"];
    $newcollcode = $aobj_context->mobj_data["newcollcode"];
    $techerid = $aobj_context->mobj_data["techerid"];

   
    $query ="select * from college where fcollcode = '{$newcollcode}' 
    and ifnull(fdeleted,'F') <> 'T'";
    $result = $aobj_context->pobj_db->GetRow($query);

    if($result)
    {

    }else {
        
        $arr['msg'] = 'Invaild College Code';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
        return;
    }
   
    $query = "UPDATE masteach
    SET fcollcode = '{$newcollcode}'
    WHERE fteachcode = '{$techerid}'";
    $result = $aobj_context->pobj_db->Execute($query);
    
    if ($result) {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
        return;
    } else {
        $arr['msg'] = 'College Code is not found';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
        return;
    }
}

?>