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.117.91.116
<?php
function GetCombinationAdm($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$collcode = $_SESSION['collcode'];
$degreecode = $aobj_context->mobj_data["degree"];
$get_honours = "SELECT m.FCOMBCODE as internal_code, m.FCOMBDESC as value from mascomb m
inner join studadm s on m.fcombcode = s.fcombcode
where m.fdegree = '{$degreecode}'
and s.fcollcode = '{$collcode}'
group by m.FCOMBCODE";
$lobj_get_honours = $aobj_context->mobj_db->getAll($get_honours);
$arr['degcomb']=$lobj_get_honours;
if($lobj_get_honours)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else
{
$data = '';
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
}
}
function loaddegreeadm($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$collcode = $_SESSION['collcode'];
$get_honours = "SELECT s.fdegree as internal_code, d.fdescpn as value from degree d
inner join studadm s on d.fdegree = s.fdegree
where s.fcollcode = '{$collcode}'
group by d.fdegree";
$lobj_get_honours = $aobj_context->mobj_db->getAll($get_honours);
$arr['studdeg']=$lobj_get_honours;
if($lobj_get_honours)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else
{
$data = '';
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
}
}
function admupdatedate($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$collcode = $_SESSION['collcode'];
$degcode = trim($aobj_context->mobj_data["degree"]);
$combcode = trim($aobj_context->mobj_data["degcomb"]);
$admlist = "select fappno,fname,date_format(fdob,'%d/%m/%Y') as fdob, fcaste, ftotfee,
date_format(fadmdate,'%d/%m/%Y') as fadmdate
from studadm
where fcollcode = '{$collcode}'
and fdegree = '{$degcode}' and fcombcode = '{$combcode}'
and ifnull(fappstatus,'') = 'verified'
order by fdegree, fcombcode, fname,fappno";
$lobj_admList = $aobj_context->mobj_db->getAll($admlist);
$Table_Header.="<table cellspacing='0'
id = 'admdateupdate' width='98%' class='tr_ventor_row' cellpadding='0' border='0' >";
$Table_Header.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$Table_Header.="<td style='padding:2px; width:50px; border:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Sl. No.</center></td>";
$Table_Header.="<td style='padding:2px; width:60px; border:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Application No.</center></td>";
$Table_Header.="<td style='padding:2px; width:150px; border:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Name</center></td>";
$Table_Header.="<td style='padding:2px; width:30px; border:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Caste</center></td>";
$Table_Header.="<td style='padding:2px; width:30px; border:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Adm. Fee</center></td>";
$Table_Header.="<td style='padding:2px; width:10px; border:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Adm. Date</center></td>";
$Table_Header.="</tr>";
$index=0;
foreach($lobj_admList as $key=>$val)
{
++$index;
$border_bottom="border-bottom:1px solid #ccc;";
$data_details.="<tr class={$class} style='font-size:12px;' >";
$data_details.="<td align=center style='border:1px solid #ccc; {$border_bottom} border-left:1px solid #ccc; padding:2px;font-size:12px;;'>{$index}</td>";
$data_details.="<td align=center style='border:1px solid #ccc; {$border_bottom} border-left:1px solid #ccc; padding:2px;font-size:12px;;'>{$val[fappno]}</td>";
$data_details.="<td align=left style='border:1px solid #ccc; {$border_bottom} border-left:1px solid #ccc; padding:2px;font-size:12px;;'>{$val[fname]}</td>";
$data_details.="<td align='center' style='border:1px solid #ccc; {$border_bottom} solid #ccc; padding:2px;font-size:12px;;'>{$val[fcaste]}</td>";
$data_details.="<td align='center' style='border:1px solid #ccc; {$border_bottom} solid #ccc; padding:2px;font-size:12px;;'>{$val[ftotfee]}</td>";
$data_details.="<td align=center style='{$border_bottom} border:1px solid #ccc; font-size:12px;;'><input type = 'text' value = '{$val[fadmdate]}'
placeholder = 'dd/mm/yyyy' class = 'adm_date'
onkeydown = 'dmydateformat(event,this.id)'
id = '{$val[fappno]}' width:10px;;
maxlength = 10 onchange = 'admdatechange(this.id)'>
<input type = 'hidden' id = 'h_{$val[fappno]}' value = 'F' />
</td>";
$data_details.="</tr>";
$cnt++;
}
$e_data['admtable'] = $Table_Header.$data_details;
$e_data['cnt'] = $index;
echo $aobj_context->mobj_output->ToJSONEnvelope($e_data,0,"success");
}
function saveadmdate($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$collcode = $_SESSION['collcode'];
if($collcode == '')
{
$data = 'Session expired. Please login and try again.';
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
}
$degcode = trim($aobj_context->mobj_data["degree"]);
$combcode = trim($aobj_context->mobj_data["degcomb"]);
$admdateinfo = trim($aobj_context->mobj_data["perinfo"]);
$admdateinfo = json_decode($admdateinfo, true);
$rgPerArray = array();
for($i=0; $i<count($admdateinfo); $i++)
{
$admdate = $admdateinfo[$i]['value'];
$query = "update studadm set fadmdate = DATE_FORMAT(STR_TO_DATE('{$admdate}','%d/%m/%Y'),'%Y-%m-%d') where fappno = '{$admdateinfo[$i]['id']}'
and fcollcode = '{$collcode}' and fdegree = '{$degcode}' and fcombcode = '{$combcode}'";
$results = $aobj_context->mobj_db->Execute($query);
}
if($results)
{
$arr = "Updated successfully.";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else
{
$data = 'Updation failure.';
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
}
}
?>
|