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.219.107.243
Current Path : /var/www/oasis/src_old/ |
| Current File : /var/www/oasis/src_old/ack_application.php |
<?php
class ack_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->log_name = $_SESSION['usr'];
$this->user_type=$_SESSION['user_type'];
}
function SaveAckApplications()
{
$checked_app_nos = ($this->aobj_context->mobj_data["checked_app_nos"]);
$unchecked = ($this->aobj_context->mobj_data["unchecked"]);
$exp_arr="'" . str_replace(",", "','", $checked_app_nos) . "'";
$exp_arr1="'" . str_replace(",", "','", $unchecked) . "'";
if($checked_app_nos)
$query="update res_stud set FACKDATE =NOW(),FACKUSER = '{$this->log_name}', fpaymentstatus = 'success',fpaymentconfirm='success',FPAYMENTREMARKS='College Bank' where APPNO in($exp_arr)";
else
$query="update res_stud set FACKDATE =null,FACKUSER = '{$this->log_name}', fpaymentstatus = 'pending',fpaymentconfirm= 'pending',FPAYMENTREMARKS='null' where APPNO in($exp_arr1)";
$lobj_get_data = $this->aobj_context->mobj_db->Execute($query);
$data="Application(s) Save successfully.";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success");
}
function DisplayAckApplications()
{
session_start();
$FUNIVCODE = $_SESSION['FUNIVCODE'];
$app_no_from = ($this->aobj_context->mobj_data["app_from"]);
$app_no_to = ($this->aobj_context->mobj_data["app_to"]);
$deg_type = ($this->aobj_context->mobj_data["deg_type"]);
$degree = ($this->aobj_context->mobj_data["degree"]);
$exam = ($this->aobj_context->mobj_data["exam"]);
$payment_type = ($this->aobj_context->mobj_data["payment_type"]);
if($payment_type == 'All')
$cnd = "";
else
$cnd = "and ifnull(r.fpaymentstatus,'Pending') = '{$payment_type}'";
$get_data="SELECT distinct(r.appno) as appno,r.fappdate,r.fdegree,r.fexamno,d.fdeggrp,r.fregno,s.fname,r.ftotal,
r.fpaymentype,IFNULL(r.fpaymentstatus,'Pending') AS paymentstatus FROM res_stud r
INNER JOIN student s ON s.fdegree=r.fdegree AND s.fregno=r.fregno AND
s.fcollcode=r.fcollcode INNER JOIN
degree d ON d.fdegree=r.fdegree AND d.fexamno=r.fexamno WHERE d.fdeggrp='{$deg_type}' and r.fdegree='{$degree}' and r.fexamno='{$exam}'
AND r.appno>='{$app_no_from}' AND r.appno<='{$app_no_to}' and r.fpaymentype='College Bank' and r.FCOLLCODE='{$this->collcode}' {$cnd} order by appno,r.fregno";
//var_dump($get_data);
$lobj_get_data = $this->aobj_context->mobj_db->GetAll($get_data);
//var_dump($lobj_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;'>Applied 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;'>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;'>Status</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;'>Payment Type</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.="</tr>";
$sl_no=1;
foreach ($lobj_get_data as $key => $value)
{
$APPNO=$value['appno'];
$FAPPDATE=$value['fappdate'];
$FREGNO=$value['fregno'];
$FNAME=$value['fname'];
$FAMOUNT=$value['ftotal'];
$paymentstatus=$value['paymentstatus'];
$fpaymentype=$value['fpaymentype'];
$disabled="";
if($paymentstatus == 'success')
$disabled = "checked = true";
else
$disabled = "";
$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; ' >{$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; ' >{$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; ' >{$FAMOUNT}</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; ' >{$fpaymentype}</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; ' >{$paymentstatus}</td>";
$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' {$disabled} id='ack_check_box_{$APPNO}' check='checked' onchange='CheckedValue(\"$APPNO\")'/><input type='hidden' id='h_{$APPNO}' value ='F' /><input type='hidden' id='h1_{$APPNO}' value ='F' /></td>";
$str_reval.="</tr>";
$sl_no++;
}
$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 DisplayAckApplications($aobj_context)
{
$class_obj=new ack_application($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->DisplayAckApplications();
}
function SaveAckApplications($aobj_context)
{
$class_obj=new ack_application($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->SaveAckApplications();
}
?>
|