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.146.178.220
<?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";
$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 loadPGAD($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
if($_SESSION['USERNAME'] == NULL || $_SESSION['USERNAME'] == '')
{
$arr = "Please login";
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 fusername = '{$_SESSION['USERNAME']}'";
$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");
}
else
{
$arr = "Some Failure as occured";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error");
}
}
function logout($aobj_context)
{
session_start();
session_unset();
session_destroy();
$res['msg'] = "success";
echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success");
}
|