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.223.209.114
Current Path : /var/www/oasis/src/ |
| Current File : /var/www/oasis/src/ack_rv_rt_application.php |
<?php
class ack_rv_rt_application
{
function __construct($aobj_context)
{
session_start();
$this->aobj_context=$aobj_context;
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$this->user_id=$_SESSION['user_id'] ;
$this->collcode=$_SESSION['collcode'];
$this->collcode = $_SESSION['collcode'];
$this->univcode = $_SESSION['FUNIVCODE'];
$this->log_name = $_SESSION['usr'];
$this->user_type=$_SESSION['user_type'];
}
function AcknowledgeSelectedApplications()
{
$this->univcode = $_SESSION['FUNIVCODE'];
$checked_app_nos = ($this->aobj_context->mobj_data["checked_app_nos"]);
$exp_arr=explode(",",$checked_app_nos);
foreach($exp_arr as $apk)
{
$update=" update res_stud
set FACKDATE=now(),FACKUSER='{$this->log_name}',
FPAYMENTSTATUS = 'success', FPAYMENTCONFIRM = 'success',
FPAYMENTREMARKS = 'Manaul'
where APPNO='{$apk}'";
$lobj_get_data = $this->aobj_context->mobj_db->Execute($update);
if($this->univcode == '051' || $this->univcode == '050')
{
$update = "insert ignore into tdvs_tabsum(fqpcode,FPACKET,FREGCODE,FVALNO,FYEAR,FEXAMTYPE,fupddate)
select t.fqpcode,'0001',t.fregcode,'R',r.FYEAR,r.FEXAMTYPE, now()
from res_stud r inner join subject s on r.fdegree = s.fdegree
and r.fexamno = s.fexamno and s.fcsubcode = r.fsubcode
inner join tdvs_tabulate t on r.fregno = t.fregno
and s.fqpcode = t.fqpcode
and r.fyear = t.fyear
and r.fexamtype = t.fexamtype
where ifnull(r.fpaymentstatus,'') = 'success'
and r.APPNO='{$apk}'
and r.FCORRTYPE = 'RV'";
$res = $this->aobj_context->mobj_db->Execute($update);
}
}
$data="Application(s) acknowledged successfully.";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success");
}
function DisplayAllAckApplications()
{
session_start();
$FUNIVCODE = $_SESSION['FUNIVCODE'];
$app_no_from = ($this->aobj_context->mobj_data["app_no_from"]);
$app_no_to = ($this->aobj_context->mobj_data["app_no_to"]);
$get_data =" SELECT DISTINCT r.APPNO,DATE_FORMAT(r.FAPPDATE,'%d/%m/%Y') AS FAPPDATE,
r.FREGNO,s.FNAME,r.FDEGREE,r.FTOTAL, r.FEXAMNO,
ifnull(FACKDATE,'') as FACKDATE
FROM res_stud r INNER JOIN student s ON s.FREGNO=r.FREGNO
WHERE r.FCOLLCODE='{$this->collcode}'
and r.APPNO>='{$app_no_from}' and r.APPNO<='{$app_no_to}'";
$lobj_get_data = $this->aobj_context->mobj_db->GetAll($get_data);
$str_reval.="<br>";
$str_reval.="<table style='padding:3px 4px 3px 3px;' class='tr_ventor_row' id='reval_table_data' width='100%' border='0' cellspacing='0' cellpadding='0'>";
$str_reval.="<tr class='tr_bg1'>";
$str_reval.="<td align='center' style=' font-size:12px; font-weight:bold; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
$str_reval.="<td align='center' style=' font-size:12px; font-weight:bold; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Application No</td>";
$str_reval.="<td align='center' style=' font-size:12px; font-weight:bold; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Date</td>";
$str_reval.="<td align='center' style=' font-size:12px; font-weight:bold; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Reg. No.</td>";
$str_reval.="<td align='center' style=' font-size:12px; font-weight:bold; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Student Name</td>";
$str_reval.="<td align='center' style=' font-size:12px; font-weight:bold; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Degree</td>";
$str_reval.="<td align='center' style=' font-size:12px; font-weight:bold; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Amount</td>";
$str_reval.="<td align='center' style=' font-size:12px; font-weight:bold; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Select</td>";
$str_reval.="<td align='center' style=' font-size:12px; font-weight:bold; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Last Date</td>";
$str_reval.="</tr>";
$k=0;
$sl_no=1;
foreach($lobj_get_data as $ak=>$av)
{
$APPNO=$av['APPNO'];
$FREGNO=$av['FREGNO'];
$FAPPDATE=$av['FAPPDATE'];
$FEXAMNO = $av['FEXAMNO'];
$FACKDATE = $av['FACKDATE'];
$FNAME=$av['FNAME'];
$FDEGREE=$av['FDEGREE'];
$FAMOUNT=$av['FTOTAL'];
if($FUNIVCODE == '027')
{
$get_qry ="SELECT CURRENT_DATE AS curr_date,DATE_ADD(GREATEST(FRVLASTDATE,FRTLASTDATE),INTERVAL 2 DAY) AS last_date,
date_format(DATE_ADD(GREATEST(FRVLASTDATE,FRTLASTDATE),INTERVAL 2 DAY),'%d/%m/%Y') AS last_date_ui FROM res_fee
WHERE FCOLLCODE = '{$this->collcode}' AND FDEGREE = '{$FDEGREE}'
AND FREGNO = '{$FREGNO}' AND FEXAMNO = '{$FEXAMNO}' ";
}else
{
$get_qry ="SELECT CURRENT_DATE AS curr_date,
DATE_ADD(GREATEST(FRESULTDATE,FRVLASTDATE,FRTLASTDATE,FXEROXLASTDATE,FCVLASTDATE),INTERVAL 50 DAY)
AS last_date,
date_format(DATE_ADD(GREATEST(FRESULTDATE,FRVLASTDATE,FRTLASTDATE,FXEROXLASTDATE,FCVLASTDATE),
INTERVAL 50 DAY),'%d/%m/%Y') AS last_date_ui
FROM res_fee
WHERE FCOLLCODE='{$this->collcode}'
AND FDEGREE='{$FDEGREE}'
AND FREGNO='{$FREGNO}'";
}
$lobj_get_qry = $this->aobj_context->mobj_db->GetRow($get_qry);
$disabled="";
$disabled_txt="";
if(count($lobj_get_qry)>0)
{
$last_date=$lobj_get_qry['last_date'];
$last_date_ui=$lobj_get_qry['last_date_ui'];
$disabled_txt="<span style='color:green;font_size:8px'> {$last_date_ui}</span>";
$curr_date=$lobj_get_qry['curr_date'];
if($curr_date>$last_date)
{
$disabled=" disabled=true; ";
$disabled_txt="<span style=' color:red;font_size:8px'> {$last_date_ui}</span>";
}
}
if($this->user_type != 'SuperUser')
{
if($av['FPAYMENTYPE'] == 'POSTOFFICE' || $av['FPAYMENTYPE'] == 'DEBIT/CREDIT/NET BANKING')
{
$disabled = 'disabled';
}
}
if($this->user_type == 'SuperUser')
$disabled = 'false';
if($k%2==0)
$class='tbl_row1';
else
$class='tbl_row_alter1';
$str_reval.="<tr>";
$str_reval.="<td class='{$class}' style=' font-size:12px; text-align:center; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >{$sl_no}</td>";
$str_reval.="<td class='{$class}' style=' font-size:12px; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; text-align:center; ' > <a href=# style='color:blue;' onclick='PrintRevaluationApplicationForm(\"{$APPNO}\")'>{$APPNO}</a></td>";
$str_reval.="<td class='{$class}' style=' font-size:12px; text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; text-align:center; ' >{$FAPPDATE} </td>";
$str_reval.="<td class='{$class}' style=' font-size:12px; text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; text-align:center; ' > {$FREGNO}</td>";
$str_reval.="<td class='{$class}' style=' font-size:12px; text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; text-align:center; ' >{$FNAME}</td>";
$str_reval.="<td class='{$class}' style=' font-size:12px; text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; text-align:center; ' >{$FDEGREE}</td>";
$str_reval.="<td class='{$class}' style=' font-size:12px; text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; text-align:center; ' >{$FAMOUNT}</td>";
if($FACKDATE != '')
$str_reval.="<td class='{$class}' align='center' style=' font-size:12px; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-weight:bold;text-align:center;' >Acknowledged</td>";
else
$str_reval.="<td class='{$class}' align='center' style=' font-size:12px; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-weight:bold;text-align:center;' ><input type='checkbox' id='ack_check_box_{$APPNO}' /><input type = 'hidden' id = 'ack_hidden{$sl_no}' value = '{$APPNO}'></td>";
$str_reval.="<td class='{$class}' style=' font-size:12px; text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; text-align:center; ' >{$disabled_txt}</td>";
$str_reval.="</tr>";
$sl_no++;
$k++;
}
$str_reval.="</table>";
$str_reval.="<br>";
$arr['html']=$str_reval;
$arr['count']=$sl_no;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
}
function DisplayAllAckApplications($aobj_context)
{
$class_obj=new ack_rv_rt_application($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->DisplayAllAckApplications();
}
function AcknowledgeSelectedApplications($aobj_context)
{
$class_obj=new ack_rv_rt_application($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->AcknowledgeSelectedApplications();
}
?>
|