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.21.247.221
<?php
function saveparticularmicdetails($aobj_context){
// $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$appno=$_SESSION["APPNO"];
$title=$aobj_context->mobj_data["title"];
$journal=$aobj_context->mobj_data["journal"];
$place=$aobj_context->mobj_data["place"];
$fid=$aobj_context->mobj_data["fid"];
$qry = "select fappno,fid from phdpub
where fappno = '{$appno}' and fid = '{$fid}' ";
$rlt = $aobj_context->mobj_db->GetRow($qry);
if($rlt['fappno'] == ""){
$query="insert into phdpub (FAPPNO,ftitle,fjournal,fplace)
values('{$appno}','{$title}','{$journal}','{$place}')";
$run = $aobj_context->mobj_db->Execute($query);
}else{
$query = "update phdpub set ftitle = '{$title}',fjournal = '{$journal}',
fplace = '{$place}' where fappno = '{$appno}' and fid = '{$fid}'";
$run = $aobj_context->mobj_db->Execute($query);
}
if($run)
{
$arr['msg']="Success";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr['msg'] = "Fail to save";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
function loadparticularmicdetails($aobj_context)
{
$appno=$_SESSION["APPNO"];
$qry = "select ifnull(ftitle,'') as ftitle,ifnull(fjournal,'') as fjournal,
ifnull(fplace,'') as fplace,ifnull(fid,'') as fid from phdpub
where fappno = '{$appno}'";
$rltdata = $aobj_context->mobj_db->GetAll($qry);
$qry1 = "select ifnull(FPAYSTATUS,'') as FPAYSTATUS
from phdstudadm
where fappno = '{$appno}'";
$rlt1 = $aobj_context->mobj_db->GetRow($qry1);
if($rltdata) {
$arr['part'] = $rltdata;
$arr['success'] = $rlt1;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else {
$arr['msg'] = 'Failed to save';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
function editpartdet($aobj_context)
{
$appno=$_SESSION["APPNO"];
$fid=$aobj_context->mobj_data["id"];
$qry = "select ifnull(ftitle,'') as ftitle,ifnull(fjournal,'') as fjournal,
ifnull(fplace,'') as fplace,ifnull(fid,'') as fid from phdpub
where fappno = '{$appno}' and fid = '{$fid}'";
$rltdata = $aobj_context->mobj_db->GetRow($qry);
// var_dump($qry);
// die();
if($rltdata) {
echo $aobj_context->mobj_output->ToJSONEnvelope($rltdata,0,"success");
}
else {
$arr['msg'] = 'Failed';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
function deletepartdet($aobj_context)
{
$appno=$_SESSION["APPNO"];
$fid=$aobj_context->mobj_data["id"];
$qry = "delete from phdpub
where fappno = '{$appno}' and fid = '{$fid}'";
$rltdata = $aobj_context->mobj_db->Execute($qry);
// var_dump($rltdata);
// die();
if($rltdata) {
$arr['msg'] = "Deleted Successfully..!";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else {
$arr['msg'] = 'Failed';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
?>
|