0xV3NOMx
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.142.42.247


Current Path : /proc/thread-self/root/var/www/oasis/src_old/
Upload File :
Current File : //proc/thread-self/root/var/www/oasis/src_old/ack_registration.php

<?php
class ack_exam_app_form
{
    
	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 acknowledgeSelectedRegistration()
	{
	 	$checked_app_nos = trim($this->aobj_context->mobj_data["checked_app_nos"]);
		$examno = trim($this->aobj_context->mobj_data["examno"]);
		$exp_arr=explode(",",$checked_app_nos);
		
		$exp_arr = implode("','", $exp_arr);

		if($examno == 'A')
		{
			$update="update studadm 
				set FACKDATE=now(),FACKUSER='{$this->log_name}', 
				FAPPSTATUS = 'Acknowledged'
				where FAPPNO in ('{$exp_arr}')
				and FCOLLCODE='{$this->collcode}'";
		}
		else
		{
			$update="update candsum 
				set FACKDATE=now(),FACKUSER='{$this->log_name}', 
				FAPPSTATUS = 'Acknowledged'
				where FAPPNO in ('{$exp_arr}')
				and FCOLLCODE='{$this->collcode}'";
		}

		$lobj_get_data = $this->aobj_context->mobj_db->Execute($update);

		if($lobj_get_data)
		{
			$data="Application(s) acknowledged successfully.";
		}
		else
		{
			$data="Error while updating.";
		}
		
		echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 		
 	}
		
		
	function DisplayAckRegistration()
	{
	 	$app_no_from = trim($this->aobj_context->mobj_data["app_no_from"]);
		$app_no_from=str_pad($app_no_from, 11, "0", STR_PAD_LEFT);
		
		$app_no_to = trim($this->aobj_context->mobj_data["app_no_to"]);
		$app_no_from=str_pad($app_no_from, 11, "0", STR_PAD_LEFT);
		
		$ack_type = trim($this->aobj_context->mobj_data["ack_type"]);
		
		$examno = trim($this->aobj_context->mobj_data["year"]);

		if($ack_type == 'Pending')
		{
			$ref = "AND (FACKDATE IS NULL OR FACKDATE='')";
		}
		else if($ack_type == 'Acknowledged')
		{
			$ref = "AND ifnull(FACKDATE,'') <> ''";
		}
		else
		{
			$ref = "";
		}

		if($examno == 'A')
		{
			$get_data = "SELECT FAPPNO, ifnull(FPAYMENTTYPE,'') as FPAYMENTTYPE, 
			ifnull(DATE_FORMAT(FACKDATE,'%d/%m/%Y'),'') as FACKDATE,
			DATE_FORMAT(left(FLOGDATE,10),'%d/%m/%Y') AS FAPPDATE,
			ifnull(FREGNO,'') as FREGNO,FNAME,FDEGREE,TOTAL_FEE 
			FROM studadm 
			WHERE FCOLLCODE= '{$this->collcode}' 
			AND LPAD(FAPPNO,11,'0')>='{$app_no_from}' {$ref}
			AND LPAD(FAPPNO,11,'0')<='{$app_no_to}' order by FAPPNO";
		}
		else
		{
			$get_data = "SELECT CS.FAPPNO, ifnull(FADMPAYMENTTYPE,'') as FPAYMENTTYPE, 
			ifnull(DATE_FORMAT(CS.FACKDATE,'%d/%m/%Y'),'') as FACKDATE,
			DATE_FORMAT(left(CS.FREGDATE,10),'%d/%m/%Y') AS FAPPDATE, 
			ifnull(CS.FREGNO,'') as FREGNO,ST.FNAME,
			CS.FDEGREE, CS.FREGFEE AS TOTAL_FEE
			FROM candsum CS INNER JOIN student ST
			ON ST.FREGNO = CS.FREGNO
			WHERE CS.FCOLLCODE = '{$this->collcode}'
			AND LPAD(CS.FAPPNO,11,'0')>='{$app_no_from}' {$ref}
			AND LPAD(CS.FAPPNO,11,'0')<='{$app_no_to}' order by CS.FAPPNO";
		}
		
		$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='840px;' 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.="</tr>";
 
		$k=0;
		$sl_no=1;
		foreach($lobj_get_data as $ak=>$av)
		{
			$strPos = strpos($this->collcode,'P');
			
			$APPNO=$av['FAPPNO'];
			$FREGNO=$av['FREGNO'];
			$FAPPDATE=$av['FAPPDATE'];
			$FNAME=$av['FNAME'];
			$FDEGREE=$av['FDEGREE'];
			$FAMOUNT=$av['TOTAL_FEE'];
			$FACKDATE = $av['FACKDATE'];

			if($FACKDATE != '')
			{
				$disabled = 'disabled';
				$checked = "checked='true'";
			}
			else
			{
				$disabled = '';
				$checked = '';
			}
			
			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; ' >&nbsp;<a href=# style='color:blue;' onclick='PrintApplicationFormPOSTOFFICE(\"{$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}&nbsp;</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;  ' >&nbsp;{$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:left; ' >{$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>";
			$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} {$checked} id='ack_check_box_{$APPNO}' /></td>"; 

			$str_reval.="</tr>";
			$sl_no++;
			$k++;
		}			
		$str_reval.="</table>";
		$str_reval.="<br>";
		$arr['html']=$str_reval;
		echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 	
			 
	}
		 
 }
	
function DisplayAckRegistration($aobj_context)
{
    $class_obj=new ack_exam_app_form($aobj_context);
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	$class_obj->DisplayAckRegistration();
} 

function acknowledgeSelectedRegistration($aobj_context)
{
    $class_obj=new ack_exam_app_form($aobj_context);
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	$class_obj->acknowledgeSelectedRegistration();
} 
 

?>