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 : 18.188.211.58


Current Path : /var/www/html/mum/src/
Upload File :
Current File : /var/www/html/mum/src/bundlestatus.php

<?php
class bundle_status
{
    
	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 getbundlestatus()
	{
		$qp_code_from = ($this->aobj_context->mobj_data["qp_code_from"]);
		$qp_code_to = ($this->aobj_context->mobj_data["qp_code_to"]);
		$cntr_from = ($this->aobj_context->mobj_data["cntr_from"]);
		$cntr_to = ($this->aobj_context->mobj_data["cntr_to"]);
		$status = ($this->aobj_context->mobj_data["status"]);
		
		if($status == 'all')
			$cond = "";
		else if($status == 'pending')	
			$cond = "and ifnull(FBUNDWT,'') = ''";
		else if($status == 'received')	
			$cond = "and ifnull(FBUNDWT,'') <> ''";
		
		$lquery ="select FCOLLCODE, FQPCODE, concat(FDOE,' ',FSESSION) as FDOE,
				FDEGREE,FBUNO,FTOTSCRIPT,FBUNDWT, if(ifnull(FBUNDWT,'') = '','Not Recived','Recived') as FSTATUS  from colldesp 
				where fqpcode between '{$qp_code_from}' and '{$qp_code_to}' 
				and fcollcode between '{$cntr_from}' and '{$cntr_to}' {$cond}";
		$lresult = $this->aobj_context->mobj_db->GetAll($lquery);
	
		$str_reval.="<br>";
		$str_reval.="<table style='padding:3px 4px 3px 3px;' class='tr_ventor_row' id='bundle_status_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;'>College Code</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;'>Qpcode</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;'>Exam 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;'>Bundle 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;'>Total Scripts</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;'>Bundle Weight</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.="</tr>";

		$sl_no=1;
		foreach($lresult as $value)
		{
			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; ' >{$value['FCOLLCODE']}</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;  ' >{$value['FQPCODE']}&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;  ' >{$value['FDOE']}</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; ' >{$value['FBUNO']}</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; ' >{$value['FTOTSCRIPT']}</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; ' >{$value['FBUNDWT']}</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;' >{$value['FSTATUS']}</td>"; 
			$str_reval.="</tr>";
			$sl_no++;
		}			
		$str_reval.="</table>";
		$str_reval.="<br>";
		$arr['html']=$str_reval;
		echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 	
	}
		 
 }
	
function getbundlestatus($aobj_context)
{
    $class_obj=new bundle_status($aobj_context);
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	$class_obj->getbundlestatus();
} 

?>