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


Current Path : /proc/thread-self/root/proc/thread-self/root/var/www/oasis/src/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/var/www/oasis/src/ack_exam_app_form.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 AcknowledgeSelectedExamApplications()
		{
			  
			 	$checked_app_nos = ($this->aobj_context->mobj_data["checked_app_nos"]);
				$exp_arr=explode(",",$checked_app_nos);
				foreach($exp_arr as $apk)
				{
					$update=" update appcandsum 
								set FACKDATE=now(),FACKUSER='{$this->log_name}', FPAYMENTCONFIRM = 'success', 
								FPAYMENTSTATUS = 'success'
								where APPNO='{$apk}'
								and FCOLLCODE='{$this->collcode}'
								";
					$lobj_get_data = $this->aobj_context->mobj_db->Execute($update);
					$this->UpdateCandSumCandDet($apk);					
					$this->UpdateStudeFee($apk);					
				}
				$data="Application(s) acknowledged successfully.";
		echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 		
 		}	
		function UpdateStudeFee($apk)
		{
			$get_app_stud_fee="SELECT  FDEGREE,FEXAMNO,FCOLLCODE,FREGNO,FFEECODE,FAMOUNT,fyear,fexamtype
										FROM appstudfee  WHERE   APPNO='{$apk}'
									and FCOLLCODE='{$this->collcode}' ";
			$lobj_get_app_stud_fee = $this->aobj_context->mobj_db->GetAll($get_app_stud_fee);	
		  
			foreach($lobj_get_app_stud_fee as $ak=>$av)
			{
					$FCOLLCODE=$av['FCOLLCODE'];
					$FDEGREE=$av['FDEGREE'];
					$FEXAMNO=$av['FEXAMNO'];
					$FREGNO=$av['FREGNO'];
					$FFEECODE=$av['FFEECODE'];
					$FAMOUNT=$av['FAMOUNT'];
					$fyear=$av['fyear'];
					$fexamtype=$av['fexamtype'];
					$get_dup_cnt="SELECT  count(1) as dup_cnt
												FROM studfee
												where FDEGREE='{$FDEGREE}'
												AND FEXAMNO='{$FEXAMNO}'
												AND FCOLLCODE='{$FCOLLCODE}'
												AND FREGNO='{$FREGNO}'
												AND FFEECODE='{$FFEECODE}' and FCOLLCODE='{$this->collcode}'";
					$lobj_get_dup_cnt = $this->aobj_context->mobj_db->GetRow($get_dup_cnt);	
					//echo "<br>".$get_dup_cnt;
					$dup_cnt=$lobj_get_dup_cnt['dup_cnt'];
					if($dup_cnt==0)
					{
						$insert_into_student_fee="insert into studfee
										(
										FDEGREE,FEXAMNO,FCOLLCODE,FREGNO,FFEECODE,FAMOUNT,FLOGNAME,FLOGDATE,fyear,fexamtype
										) VALUES
										(
										'{$FDEGREE}',
										'{$FEXAMNO}',
										'{$this->collcode}',
										'{$FREGNO}',
										'{$FFEECODE}',
										'{$FAMOUNT}',
										'{$this->log_name}',
										NOW(),'{$fyear}','{$fexamtype}'
										)";
										$lobj_insert_into_student_fee = $this->aobj_context->mobj_db->Execute($insert_into_student_fee);
							//echo $insert_into_student_fee."<br>";			 
						 				
					}
					else
					{
						$update="	update   studfee set FAMOUNT={$FAMOUNT},
												FLOGNAME='{$this->log_name}',FLOGDATE=now()
												where FDEGREE='{$FDEGREE}'
												AND FEXAMNO='{$FEXAMNO}'
												AND FCOLLCODE='{$FCOLLCODE}'
												AND FREGNO='{$FREGNO}'
												AND FFEECODE='{$FFEECODE}'
												and FCOLLCODE='{$this->collcode}'";
					 					
						$lobj_update = $this->aobj_context->mobj_db->Execute($update);							
					}
			}			
		}
		function UpdateCandSumCandDet($apk)
		{

			$FUNIVCODE = $_SESSION['FUNIVCODE'];
			if($FUNIVCODE == '051')
			{
				$update_cand_sum="UPDATE appcandsum a,candsum c
				SET 
				c.FEXAMFEEA=if(ifnull(c.FEXAMFEEA,0) <=0,ifnull(a.FEXAMFEEA,0),ifnull(c.FEXAMFEEA,0)),
				c.FEXAMFEEB=if(ifnull(c.FEXAMFEEB,0) <=0,ifnull(a.FEXAMFEEB,0),ifnull(c.FEXAMFEEB,0)),
				c.FEXAMFEEC=if(ifnull(c.FEXAMFEEC,0) <=0,ifnull(a.FEXAMFEEC,0),ifnull(c.FEXAMFEEC,0)),
				c.FEXAMFEED=if(ifnull(c.FEXAMFEED,0) <=0,ifnull(a.FEXAMFEED,0),ifnull(c.FEXAMFEED,0)),
				c.FEXAMFEEE=if(ifnull(c.FEXAMFEEE,0) <=0,ifnull(a.FEXAMFEEE,0),ifnull(c.FEXAMFEEE,0)),
				c.FEXAMFEEF=if(ifnull(c.FEXAMFEEF,0) <=0,ifnull(a.FEXAMFEEF,0),ifnull(c.FEXAMFEEF,0)),
				c.FEXAMFEEG=if(ifnull(c.FEXAMFEEG,0) <=0,ifnull(a.FEXAMFEEG,0),ifnull(c.FEXAMFEEG,0)),
				c.FEXAMFEEH=if(ifnull(c.FEXAMFEEH,0) <=0,ifnull(a.FEXAMFEEH,0),ifnull(c.FEXAMFEEH,0)),
				c.FEXAMFEEI=if(ifnull(c.FEXAMFEEI,0) <=0,ifnull(a.FEXAMFEEI,0),ifnull(c.FEXAMFEEI,0)),
				c.FEXAMFEEJ=if(ifnull(c.FEXAMFEEJ,0) <=0,ifnull(a.FEXAMFEEJ,0),ifnull(c.FEXAMFEEJ,0)),
				c.FTOTALFEE='1',
				c.frecptdate = date(a.FACKDATE)
				WHERE a.fregno=c.FREGNO
				AND a.APPNO='{$apk}' and a.FCOLLCODE='{$this->collcode}'";
			}else
			{
				$update_cand_sum="UPDATE appcandsum a,candsum c
				SET 
				c.FEXAMFEEA=if(ifnull(c.FEXAMFEEA,0) <=0,ifnull(a.FEXAMFEEA,0),ifnull(c.FEXAMFEEA,0)),
				c.FEXAMFEEB=if(ifnull(c.FEXAMFEEB,0) <=0,ifnull(a.FEXAMFEEB,0),ifnull(c.FEXAMFEEB,0)),
				c.FEXAMFEEC=if(ifnull(c.FEXAMFEEC,0) <=0,ifnull(a.FEXAMFEEC,0),ifnull(c.FEXAMFEEC,0)),
				c.FEXAMFEED=if(ifnull(c.FEXAMFEED,0) <=0,ifnull(a.FEXAMFEED,0),ifnull(c.FEXAMFEED,0)),
				c.FEXAMFEEE=if(ifnull(c.FEXAMFEEE,0) <=0,ifnull(a.FEXAMFEEE,0),ifnull(c.FEXAMFEEE,0)),
				c.FEXAMFEEF=if(ifnull(c.FEXAMFEEF,0) <=0,ifnull(a.FEXAMFEEF,0),ifnull(c.FEXAMFEEF,0)),
				c.FEXAMFEEG=if(ifnull(c.FEXAMFEEG,0) <=0,ifnull(a.FEXAMFEEG,0),ifnull(c.FEXAMFEEG,0)),
				c.FEXAMFEEH=if(ifnull(c.FEXAMFEEH,0) <=0,ifnull(a.FEXAMFEEH,0),ifnull(c.FEXAMFEEH,0)),
				c.FEXAMFEEI=if(ifnull(c.FEXAMFEEI,0) <=0,ifnull(a.FEXAMFEEI,0),ifnull(c.FEXAMFEEI,0)),
				c.FEXAMFEEJ=if(ifnull(c.FEXAMFEEJ,0) <=0,ifnull(a.FEXAMFEEJ,0),ifnull(c.FEXAMFEEJ,0)),
				c.FTOTALFEE=a.FTOTALFEE,
				c.frecptdate = date(a.FACKDATE)
				WHERE a.fregno=c.FREGNO
				AND a.APPNO='{$apk}' and a.FCOLLCODE='{$this->collcode}'";

			}
			
			$lobj_update_cand_sum = $this->aobj_context->mobj_db->Execute($update_cand_sum);
		 
			$get_app_cand_det="SELECT FDEGREE,FEXAMNO,FCOLLCODE,FREGNO,FSUBCODE,FINSERTED,FPRESENT,FYEAR,FEXAMTYPE
								FROM appcanddet
								WHERE APPNO='{$apk}'";	
			$lobj_get_app_cand_det = $this->aobj_context->mobj_db->GetAll($get_app_cand_det);
			foreach($lobj_get_app_cand_det as $ak=>$av)
			{
					$FCOLLCODE=$av['FCOLLCODE'];
					$FDEGREE=$av['FDEGREE'];
					$FEXAMNO=$av['FEXAMNO'];
					$FREGNO=$av['FREGNO'];
					$FSUBCODE=$av['FSUBCODE'];
					$FINSERTED=$av['FINSERTED'];
					$FPRESENT=$av['FPRESENT'];
					$FYEAR=$av['FYEAR'];
					$FEXAMTYPE=$av['FEXAMTYPE'];
					$get_cand_det_cnt="select count(1) as cnt from canddet
										where    FDEGREE='{$FDEGREE}'
										 AND FEXAMNO='{$FEXAMNO}'
										 AND FCOLLCODE='{$FCOLLCODE}'
										 AND FREGNO='{$FREGNO}'
										 AND FSUBCODE='{$FSUBCODE}'";
					$lobj_get_cand_det_cnt = $this->aobj_context->mobj_db->GetRow($get_cand_det_cnt);	
					$cnt=$lobj_get_cand_det_cnt['cnt'];
					if($cnt>0)
					{
						$update=" update canddet 
									set FINSERTED='{$FINSERTED}',
									FPRESENT='{$FPRESENT}'
									where FDEGREE='{$FDEGREE}'
									AND FEXAMNO='{$FEXAMNO}'
									AND FCOLLCODE='{$FCOLLCODE}'
									AND FREGNO='{$FREGNO}'
									AND FSUBCODE='{$FSUBCODE}'
									and ifnull(FPRESENT,'') <> 'P'
								";
						$lobj_update = $this->aobj_context->mobj_db->Execute($update);		 
					}
					else
					{
						$insert="
							INSERT INTO  canddet 
							(FDEGREE, 
							FEXAMNO, 
							FCOLLCODE, 
							FREGNO, 
							FSUBCODE, 
							FINSERTED, 
							FPRESENT, 
							FYEAR, 
							FEXAMTYPE
							)
							values
							(
							'{$FDEGREE}',
							'{$FEXAMNO}',
							'{$FCOLLCODE}',
							'{$FREGNO}',
							'{$FSUBCODE}',
							'{$FINSERTED}',
							'{$FPRESENT}',
							'{$FYEAR}',
							'{$FEXAMTYPE}' 
							)";
						 	
							$lobj_insert = $this->aobj_context->mobj_db->Execute($insert);		 	
					}
					
					$get_app_cand_det="SELECT FDEGREE,FFRESHEXAM,FCOLLCODE,FREGNO
								FROM appcandsum
								WHERE APPNO='{$apk}'";	
					$res = $this->aobj_context->mobj_db->GetRow($get_app_cand_det);
					$degree = $res['FDEGREE'];
					$FFRESHEXAM = $res['FFRESHEXAM'];
					$collcode = $res['FCOLLCODE'];
					$regno = $res['FREGNO'];

					$get_app_cand_det="insert ignore into marks (FDEGREE, FEXAMNO, FCOLLCODE, FREGNO, FSUBCODE, fmarks, fyear, fexamtype,FMODIFYDATE1)
				select c.fdegree,c.fexamno,c.fcollcode,c.fregno,
				s.fcsubcode,'-1', c.fyear,c.fexamtype,now()
				from canddet c inner join 
				subject s on c.fdegree = s.fdegree and c.fexamno = s.fexamno 
				and c.fsubcode = s.FSUBCODE	
				where c.fregno = '{$regno}' and c.fexamno = '{$FFRESHEXAM}' 
				and c.fcollcode = '{$collcode}' and c.fdegree = '{$degree}'
				and s.fintass = 'T' and s.fretain = 'T'";
				$res1 = $this->aobj_context->mobj_db->Execute($get_app_cand_det);
				
				$FUNIVCODE = $_SESSION['FUNIVCODE'];
				
				if($FUNIVCODE == '050' || $FUNIVCODE == '051')
				{
					
					$get_app_cand_det="insert ignore into marks (FDEGREE, FEXAMNO, FCOLLCODE, FREGNO, FSUBCODE, fmarks, fyear, fexamtype,FMODIFYDATE1)
					select c.fdegree,c.fexamno,c.fcollcode,c.fregno,
					s.fcsubcode,'-1', c.fyear,c.fexamtype,now()
					from canddet c inner join 
					subject s on c.fdegree = s.fdegree and c.fexamno = s.fexamno 
					and c.fsubcode = s.FSUBCODE	
					where c.fexamno = '{$FFRESHEXAM}' 
					and c.fcollcode = '{$collcode}' and c.fdegree = '{$degree}'
					and s.fintass = 'T' and ifnull(s.FCODENO,'F') = 'F'";
					$res1 = $this->aobj_context->mobj_db->Execute($get_app_cand_det);

					$query1 = "insert ignore into collia(fdegree,fexamno,fcollcode,fsubcode,FCREATEUSER)
                    select distinct fdegree,fexamno,fcollcode,fsubcode,'A' from marks";
					$res2 = $this->aobj_context->mobj_db->Execute($query1);

				}

				$query = "insert ignore into marks_pr (FDEGREE, FEXAMNO, FCOLLCODE,FOCOLLCODE, FREGNO, FSUBCODE, fmarks11, fyear, fexamtype)
				select cd.fdegree,cd.fexamno,cd.fcollcode,cd.fcollcode,cd.FREGNO,s.fcsubcode,'-1', 
				cd.fyear,cd.fexamtype
				from subject s inner join canddet cd on s.fdegree = cd.fdegree 
				and s.fsubcode = cd.FSUBCODE 
				and cd.fregno = '{$regno}'
				and ifnull(cd.fpassmth,'') = '' 
				and ifnull(cd.fthpr,'') <> 'F'
				where s.fdegree = '{$degree}' 
				and cd.fcollcode = '{$collcode}'
				and s.ftheory = 'F'
				and cd.fpresent = 'P'
				and ifnull(s.fintass,'F') <> 'T'";
				$res2 = $this->aobj_context->mobj_db->Execute($query);

				$query = "insert ignore into marks_pr (FDEGREE, FEXAMNO, FCOLLCODE,FOCOLLCODE, FREGNO, FSUBCODE, fmarks11, fyear, fexamtype)
				select cd.fdegree,cd.fexamno,cd.fcollcode,cd.fcollcode,cd.FREGNO,s.fcsubcode,'-1', 
				cd.fyear,cd.fexamtype
				from subject s inner join canddet cd on s.fdegree = cd.fdegree 
				and s.fsubcode = cd.FSUBCODE 
				and cd.fregno = '{$regno}'
				and ifnull(cd.fpassmth,'') = '' 
				and ifnull(cd.fthpr,'') <> 'F'
				where s.fdegree = '{$degree}' 
				and cd.fcollcode = '{$collcode}'
				and s.ftheory = 'F'
				and cd.fpresent = 'P'
				and ifnull(s.fintass,'F') = 'T'
				and ifnull(s.fretain,'F') = 'F'";
				$res2 = $this->aobj_context->mobj_db->Execute($query);
				
				
				$query = "insert ignore into attend (fcollcode, fdegree, fexamno, fsubcode,fregno,fyear, fexamtype)
				select cd.fcollcode, cd.fdegree, cd.fexamno, s.fcsubcode,cd.fregno, cd.fyear, cd.fexamtype
				from canddet cd inner join subject s on cd.fdegree = s.fdegree and cd.fexamno = s.fexamno
				and cd.fsubcode = s.fsubcode
				where cd.fcollcode = '{$collcode}'
				and cd.fexamno = '{$FFRESHEXAM}'
				and ifnull(s.fattent,'F') = 'T'
				group by cd.fcollcode, cd.fdegree, cd.fexamno,cd.fregno,s.fcsubcode";
				$res2 = $this->aobj_context->mobj_db->Execute($query);

			}			
		}
		function DisplayAllAckExamApplications()
		{
				$ack_app_degree = ($this->aobj_context->mobj_data["ack_exam_app_degree"]);
			 	$app_no_from = ($this->aobj_context->mobj_data["app_no_from"]);
				$app_no_from=str_pad($app_no_from, 10, "0", STR_PAD_LEFT);

				if($ack_app_degree == 'All'){
					$join = "";
				}else{
					$join = "AND r.fdegree = '{$ack_app_degree}'";
				}
				
				$app_no_to = ($this->aobj_context->mobj_data["app_no_to"]);
				$rtype = ($this->aobj_context->mobj_data["type"]);


				if($rtype === "All"){
					$cond="";
				}else if($rtype === "acknowledge"){
					$cond="and ifnull(r.fackdate, '') <> ''";
				}else if($rtype === "not-ack"){
					$cond="and ifnull(r.fackdate, '') = ''";
				}

				
				$get_data=" SELECT DISTINCT r.APPNO,  r.FPAYMENTYPE,
							ifnull(fackdate,'') as fackdate, 
							DATE_FORMAT(r.FDATE,'%d/%m/%Y') AS FAPPDATE,r.FREGNO,s.FNAME,
							r.FDEGREE,r.FTOTALFEE
							FROM appcandsum r INNER JOIN student s ON s.FREGNO=r.FREGNO 
							WHERE r.FCOLLCODE='{$this->collcode}'
							AND LPAD(r.APPNO,10,'0')>='{$app_no_from}'   
							AND LPAD(r.APPNO,10,'0')<='{$app_no_to}' $join
							{$cond}
							 order by r.fdegree,r.fregno,r.APPNO";	
							//  var_dump($get_data);die();
							 
					$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; 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; 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; 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; 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; 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; 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; 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; 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; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-top:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Delete App.?</td>";
		$str_reval.="</tr>";
	 
			$k=0;
			$sl_no=1;
			foreach($lobj_get_data as $ak=>$av)
			{
				$strPos = strpos($this->collcode,'P');
				if($this->user_type != 'SuperUser' && ($striPos != 0) && $this->user_type != 'Admin')
				{
					if($av['FPAYMENTYPE'] == 'POSTOFFICE' || $av['FPAYMENTYPE'] == 'DEBIT/CREDIT/NET BANKING')
					{
						$disabled = 'disabled';
					}
					else
					{
						$disabled= '';
					}
				}
				$APPNO=$av['APPNO'];
				$FREGNO=$av['FREGNO'];
				$FAPPDATE=$av['FAPPDATE'];
				$FNAME=$av['FNAME'];
				$FDEGREE=$av['FDEGREE'];
				$FAMOUNT=$av['FTOTALFEE'];
				 
				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; 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;  ' >&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; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; text-align:center; ' >&nbsp;<a href=# style='color:blue;' onclick='PrintOnlineExamApplicationForm(\"{$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; ' >{$FAMOUNT}</td>";
				
				if($av['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>"; 
					$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;' >
					<button type='button' style = 'background-color: #f44336;border-radius:5px;color: white;' onclick = 'deleteExamApp(\"$APPNO\")' >Delete</button></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;'>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' {$disabled} id='ack_check_box_{$APPNO}' /></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;' >
					<button type='button' style = 'background-color: #f44336;border-radius:5px;color: white;' onclick = 'deleteExamApp(\"$APPNO\")' >Delete</button></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;
		echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 	
			 
		}
		 
 }
	
function DisplayAllAckExamApplications($aobj_context)
{
    $class_obj=new ack_exam_app_form($aobj_context);
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	$class_obj->DisplayAllAckExamApplications();
} function AcknowledgeSelectedExamApplications($aobj_context)
{
    $class_obj=new ack_exam_app_form($aobj_context);
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	$class_obj->AcknowledgeSelectedExamApplications();
} 
 
function getACKAppDegree($aobj_context){
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$collcode = $_SESSION['collcode'];
	
	$query = "select c.fdegree, d.fdescpn from candsum c inner join 
	degree d on c.fdegree = d.fdegree and  d.fexamno = 'A'
	where c.fcollcode = '{$collcode}' group by c.fdegree";

	$result = $aobj_context->mobj_db->GetAll($query);
	

		if($result){
			echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
		}else{
			$data = 'Fail to load degree';
			echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
		}  
}

function deleteExamApp($aobj_context)
{
	$collcode = $_SESSION['collcode'];
	$appno = $aobj_context->mobj_data["appno"];

	$update="delete from appcandsum where appno = '{$appno}'";
	$lobj_update = $aobj_context->mobj_db->Execute($update);
	
	$update="delete from appcanddet where appno = '{$appno}'";
	$res = $aobj_context->mobj_db->Execute($update);

	$update="delete from appstudfee where appno = '{$appno}'";
	$res = $aobj_context->mobj_db->Execute($update);

	if($lobj_update){
		$data['msg'] = 'Deleted Successfully.';
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 
	}else{
		$data['msg'] = 'Fail to delete contact admin';
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
	}  
}

?>