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.146.255.135


Current Path : /proc/thread-self/root/var/www/html/gcg/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/gcg/src/receive_rv_rt_application.php

<?php
class receive_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->log_name = $_SESSION['usr'];			
		}
		 function ReceivceSelectedApplications()
		{
			  
			 $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 FUNIVRECDATE=now() 
								where FDOCNO='{$apk}'";
					$lobj_get_data = $this->aobj_context->mobj_db->Execute($update);			
				}
			$data="Documents(s) has been Received successfully.";
		echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 
 		}	 	 
		function DisplayAllReceivceDocs()
		{
			  
			  
			 	$doc_no_from = ($this->aobj_context->mobj_data["doc_no_from"]);
			 	$doc_no_to = ($this->aobj_context->mobj_data["doc_no_to"]);
			 	$college_code_from = ($this->aobj_context->mobj_data["college_code_from"]);
			 	$college_code_to = ($this->aobj_context->mobj_data["college_code_to"]);
				$searchType = ($this->aobj_context->mobj_data["ackType"]);
				$cond="";
	
				if($searchType == 'REUNIV')
				{
					$search_cond="and IFNULL(FDOCDATE,'') <>'' and IFNULL(FUNIVRECDATE,'')<>'' ";
				} 
				else if($searchType == 'NOTREUNIV')
				{
					$search_cond="and IFNULL(FDOCDATE,'') <>'' and IFNULL(FUNIVRECDATE,'')='' ";
				}
				else if($searchType == 'ALL')
				{
					$search_cond="and IFNULL(FDOCDATE,'') <>''";
				}
				
				$get_data=" SELECT  IF(IFNULL(FUNIVRECDATE,'')='','Not Received','Received') AS doc_status,
							FDOCNO, DATE_FORMAT(IFNULL(FDOCDATE,'0000-00-00'),'%d/%m/%Y') AS FDOCDATE,
							FCOLLCODE,FCHALLANNO,DATE_FORMAT(IFNULL(FCHALLANDATE,'0000-00-00'),'%d/%m/%Y') AS FCHALLANDATE,
							SUM(FAMOUNT) AS FAMOUNT,COUNT(DISTINCT APPNO) AS no_of_app,
							DATE_FORMAT(IFNULL(FDOCDATE,'0000-00-00'),'%d/%m/%Y') AS challan_prepared_date
							FROM res_stud 	 
							WHERE IFNULL(FDOCNO,'') <>''
							and FCHALLANDATE IS NOT NULL
							AND FCOLLCODE>='{$college_code_from}' AND FCOLLCODE<='{$college_code_to}'
							AND FDOCNO>='{$doc_no_from}' AND FDOCNO<='{$doc_no_to}' {$search_cond}
							 GROUP BY FDOCNO	 ";	
											
					$lobj_get_data = $this->aobj_context->mobj_db->GetAll($get_data);
 		 
		$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:11px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl No</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Doc. No</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Doc. Date</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>College</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Challan No </td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Challan Date</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Amount</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>No of Appl.</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Challan Date</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Status</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Print</td>";
		$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'> Receive</td>"; 
		$str_reval.="</tr>";
	 
			$k=0;
			$sl_no=1;
			foreach($lobj_get_data as $ak=>$av)
			{
				$FDOCNO=$av['FDOCNO'];
				$FDOCDATE=$av['FDOCDATE'];
				$FCOLLCODE=$av['FCOLLCODE'];
				$doc_status=$av['doc_status'];
				$challan_prepared_date=$av['challan_prepared_date'];
				$no_of_app=$av['no_of_app'];
				$FAMOUNT=$av['FAMOUNT'];
				$FCHALLANDATE=$av['FCHALLANDATE'];
				$FCHALLANNO=$av['FCHALLANNO'];
				$div_class="red_corner_div";
				 $receive_checkbox="<input type='checkbox'  id='receive_check_box_{$FDOCNO}'>";
				if($doc_status=="Received")
				{
				$receive_checkbox="<input type='checkbox' checked disabled=true>";
				$div_class="green_corner_div";
				}
				$new_doc_status='<div style=  margin: 0 auto; " class="'.$div_class.'">
								<span style="  color:#FFFFFF;line-height: 19px;font-size:11px;font-weight:bold;"  >'.$doc_status.'</span>
								</div>'; 
				if($k%2==0)
				$class='tbl_row1';
				else
				$class='tbl_row_alter1';
				$str_reval.="<tr>";		
				$str_reval.="<td class='{$class}' style='text-align:center; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >{$sl_no}</td>";
				$str_reval.="<td class='{$class}' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:center; ' > {$FDOCNO}</td>";
				$str_reval.="<td class='{$class}' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:center; ' > {$FDOCDATE}</td>";
				$str_reval.="<td class='{$class}' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:center; ' > {$FCOLLCODE}</td>";
				$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;  ;text-align:center;  ' >{$FCHALLANNO}&nbsp;</td>";
				$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;  ;text-align:center;  ' > {$FCHALLANDATE}</td>";
				$str_reval.="<td class='{$class}' style='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='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;  ;text-align:center; ' >{$no_of_app}</td>";
				$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;  ;text-align:center; ' >{$challan_prepared_date}</td>";
				$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;  ;text-align:center; ' >{$new_doc_status}</td>";
				$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;text-align:center; cursor:pointer; ' ><img  onclick='PrintChallanEntryDetailsFromUniLogin(\"{$FDOCNO}\",\"{$searchType}\")'  src='img/Print_New.jpg'    /> </td>";
			
				$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;text-align:center; cursor:pointer; ' >{$receive_checkbox}</td>";
				$str_reval.="</tr>";
				$sl_no++;
				$k++;
			}			
		$str_reval.="</table>";
		$arr['html']=$str_reval;
		echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 	
			 
		}
		 
 }
	
function DisplayAllReceivceDocs($aobj_context)
{
    $class_obj=new receive_rv_rt_application($aobj_context);
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	$class_obj->DisplayAllReceivceDocs();
}  function ReceivceSelectedApplications($aobj_context)
{
    $class_obj=new receive_rv_rt_application($aobj_context);
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	$class_obj->ReceivceSelectedApplications();
}  
 
?>