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.116.80.252
<?php
function viewstuddetadmissionorder($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fdegree = $aobj_context->mobj_data["fdegree"];
$fpaytype = $aobj_context->mobj_data["fpaytype"];
// var_dump('hii');
// die();
if($fpaytype == 'All'){
$cnd = '';
}else{
$cnd = "and s.fpaytype = '{$fpaytype}'";
}
$query1 = "select s.fappno, s.fregno, e.fname ,concat(s.fcollcode,'-',c.fcollname) as fcollname, s.fpamount,ifnull(fpaymentstatus,'') as fpaymentstatus,
ifnull(fpaymentid,'') as fpaymentid,ifnull(date_format(fpaymentdate,'%d/%m/%Y'),'') as fpaymentdate,ifnull(s.fpaytype,'') as fpaytype
from entseatallot s
inner join entstudadm e on s.fappno = e.fappno and s.fregno =e.fregno
inner join entcoll c on c.fcollcode = s.fcollcode
where s.fdegree = '{$fdegree}' {$cnd}";
// var_dump($query1);
// die();
$result1 = $aobj_context->mobj_db->GetAll($query1);
$html = '<table border = "1" style = "text-align:center;border: 1px solid black;
border-collapse: collapse;border-spacing: 2px;">
<thead >
<tr>
<th style = "width:5%;text-align:center;"> Sl. No. </th>
<th style = "width:5%;text-align:center;"> App. No. </th>
<th style = "width:5%;text-align:center;"> Reg. No. </th>
<th style = "width:10%;text-align:center;"> Name</th>
<th style = "width:15%;text-align:center;"> College </th>
<th style = "width:5%;text-align:center;">Amount </th>
<th style = "width:10%;text-align:center;"> Payment ID </th>
<th style = "width:10%;text-align:center;"> Parment Date </th>
<th style = "width:5%;text-align:center;"> Action </th>
<th style = "width:5%;text-align:center;"> Adm. Order </th>
</tr>
</thead>
<tbody>
';
$i =1;
// var_dump($result1);
foreach($result1 as $value){
$regno = $value['fregno'];
$fappno = $value['fappno'];
if($value['fpaytype'] == 'Online'){
$dis = 'disabled';
}else{
$dis = '';
}
$html .= "<tr>
<td>$i</td>
<td id='appno_$regno' style = 'padding:2px;'>".$value['fappno']."</td>
<td style = 'padding:2px;'>".$value['fregno']."</td>
<td style = 'text-align:left;padding:2px;'>".$value['fname']."</td>
<td style = 'text-align:left;'>".$value['fcollname']."</td>
<td>".$value['fpamount']."</td>
<td><input id='payid_$fappno' {$dis} value='".$value['fpaymentid']."' class='form-control '></input></td>
<td><div class='daterange'><input type='text' {$dis} name='date'placeholder='dd/mm/yyyy' id='paydate_$fappno' value='".$value['fpaymentdate']."' class='form-control date'></input></div></td>
<td><button
type='button'
class='btn btn-primary waves-effect'
{$dis}
onclick=\"saveadmorder('{$fappno}')\"
>
Save
</button></td>
<td><button
type='button'
class='btn btn-primary waves-effect'
onclick=\"printadorder_ru('{$fappno}')\"
>
Print
</button></td>
</tr>";
$i++;
}
$html .= '</tbody></table>';
if($result1){
$data['studdata'] = $result1;
$data['html'] = $html;
echo $aobj_context->mobj_output->TOJSONEnvelope($data,0,"success");
}
else{
$arr['msg']="Failed to load";
echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failed");
}
}
function saveadmorder($aobj_context)
{
$appno = $aobj_context->mobj_data["appno"];
$payid = $aobj_context->mobj_data["payid"];
$paydate = $aobj_context->mobj_data["paydate"];
if($_SESSION['USERNAME'] == NULL || $_SESSION['USERNAME'] == '')
{
$arr = "Please login";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error");
return;
}
$user = $_SESSION['USERNAME'];
$query = "update entseatallot set fpaymentstatus = 'success', fpaymentid = '{$payid}',
fpaymentdate = date_format(str_to_Date('{$paydate}','%d/%m/%Y'),'%Y-%m-%d'),
fchallanupd = now()
where fappno = '{$appno}'
and fpaytype = 'Challan'";
$result1 = $aobj_context->mobj_db->Execute($query);
if($result1){
$data = "Updated Successfully";
echo $aobj_context->mobj_output->TOJSONEnvelope($data,0,"success");
return;
}
else{
$arr['msg']="Failed to load";
echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failed");
}
}
|