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


Current Path : /proc/thread-self/root/var/www/html/dud/Report_details/
Upload File :
Current File : //proc/thread-self/root/var/www/html/dud/Report_details/subjectwise_invigilator_dairy.php

<?php
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
$pdf_writer_class =$main_src."/tarka_pdf/fpdf.php";
require_once($pdf_writer_class);
	
class ra_invigilators_dairy  extends FPDF
{
	function DefaultConstructor($aobj_context)
	{
		session_start();
		$this->aobj_context=$aobj_context;
		$this->pdf=  new FPDF();
		$this->pdf=$this;
		
		$this->degree_code  = trim($this->aobj_context->mobj_data["degree_code"]);
		$this->examno       = trim($this->aobj_context->mobj_data["examno"]);
		$this->from_subcode = trim($this->aobj_context->mobj_data["from_subcode"]);
		$this->to_subcode   = trim($this->aobj_context->mobj_data["to_subcode"]);
		$this->spr   = trim($this->aobj_context->mobj_data["spr"]);
		
		$this->ip=$_SERVER["REMOTE_ADDR"];
		$get_date="select date_add(date_add(now(),INTERVAL 13 hour),interval 30 minute) as now_date";
		$obj=$this->aobj_context->mobj_db->GetRow($get_date);
		$this->current_date=$obj[now_date];	
		$this->collcode=$_SESSION['collcode'];	
		$this->headeractive = true;
	}
 
	function Header()
	{
			
	}	
	
	function Footer()
	{
		$this->SetY(-15);
		$this->pdf->SetFont('Times','B',8);
		
		
		//$this->Cell(140,6,'Entered  : IP Address : '.$this->ip_address." Date ".$this->created_date,'0',0,'L');
		$this->Cell(140,6,'Printed   : IP Address : '.$this->ip." Date ".$this->current_date,'0',0,'L');
		$this->Cell(50,6,'Page '.$this->PageNo().' of {nb}',0,1,'R');
	}
	
	function formcolldata()
	{
		
		$get_coll_name="select FUNIVNAME as 'FUNIVNAME',
						FUNIVADD1 as 'state', pdf_logo_path From control";
		$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
		$this->FUNIVNAME=$lobj_get_coll_name['FUNIVNAME'];
		$this->s_state=$lobj_get_coll_name['state'];
		$this->f_year=$lobj_get_coll_name['f_year'];
		$this->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
	 	
		$get_data="SELECT c.FCOLLCODE,
				CONCAT(c.FCOLLCODE, ' - ', c.FCOLLNAME,', ',c.FTOWN) AS FCOLLNAME FROM college c
				where c.FCOLLCODE='{$this->collcode}'";					
		$obj_student=$this->aobj_context->mobj_db->GetRow($get_data); 
		 
		$this->college_details = $obj_student[FCOLLNAME];
		$this->degree_details  = " College : {$this->FCOLLNAME}";		

	 }
	 
		 
		
	function GetFullQry()
	{
		
		$get_data="SELECT FHALLNO,cd.FREGNO,st.FNAME,st.fphotopath,fqpcode,concat(s.fsubcode,' - ',s.FSUBNAME) as fsubcode,date_format(fdoe,'%d/%m/%Y') as fdoe
		FROM canddet cd INNER JOIN subject s ON s.fdegree = cd.fdegree and s.fexamno = cd.fexamno 
		and s.FSUBCODE=cd.FSUBCODE
		inner join candsum cs on cs.FREGNO=cd.FREGNO AND cd.FDEGREE=cs.FDEGREE
		AND cd.FCOLLCODE=cs.FCOLLCODE 
		inner join student st on st.FREGNO=cd.FREGNO AND cd.FCOLLCODE=st.FCOLLCODE 
		LEFT JOIN reason r ON s.FSESSION = r.FREASONCD
		WHERE cs.FCNTRCODE='{$this->collcode}' and s.ftheory = 'T' and ifnull(s.fintass,'') <> 'T'
		and ifnull(s.fretain,'') <> 'T'
		and s.fsubcode between '{$this->from_subcode}' and '{$this->to_subcode}'  and cs.fdegree = '{$this->degree_code}' and 
		FPRESENT='P' and ifnull(cd.fpassmth,'') = '' and ifnull(FRECPTDATE,'0000-00-00')<>'0000-00-00' 
		order by s.fsubcode,cd.FREGNO";
		$this->lobj_get_data = $this->aobj_context->mobj_db->GetAll($get_data);
		
	}
		
	function WriteSlNoRow()
	{
		
	}
	
	function formData()
	{
		session_start();
		$FUNIVCODE = $_SESSION['FUNIVCODE'];
		
		$this->pdf->SetMargins(10,12,10);		
		
		$empty_cell_width=12;
		$this->pdf->SetFont('Times','B',10);
		$this->pdf->cell($empty_cell_width,7, ""," ",0,"C");
		$cnt=0;
	
		// echo "<pre>";
		 //print_r($this->final_data_arr);die();
		
		 $first = true;
		 $i =1;
		 $oldsub = '';
		 $newsub = '';
		foreach($this->lobj_get_data as $ak=>$av)
		{
			$this->pdf->SetFont('Times','',10);
			$newsub = $av['fsubcode'];
			if($i == $this->spr || $newsub != $oldsub)
			{
				
				 $this->pdf->AddPage();
				 $first = true;
				 $i = 1;
				 $oldsub = $newsub;
			}	
			$FUNIVCODE = $_SESSION['FUNIVCODE'];
			$FUNIVCODE = '031';
			if($first)
			{	
				if($FUNIVCODE == '031')
				{
					if(!empty($this->pdf_logo_path))
					{
						$img_logo_path=$this->aobj_context->main_src."/img/report_uni_logo.jpg";
						$this->pdf->Image($img_logo_path,60,4,80);
						$this->pdf->Ln(17);
					}	
				}
				else
				{
					$img_path=$this->aobj_context->main_src.$this->photo_path;
					if(!empty($this->photo_path) && file_exists($img_path)) 
					{			
						$this->pdf->Image($img_path,166,50,50);
					}	
					if(!empty($this->pdf_logo_path))
					{
						$img_logo_path=$this->aobj_context->main_src.$this->pdf_logo_path;
						$this->pdf->Image($img_logo_path,10,10,20);
					}
					$this->pdf->SetFont('Times','B',15);
					$this->pdf->cell(180,3,$this->FUNIVNAME."","0",1,"C");
					$this->pdf->SetFont('Times','B',8);
					$this->pdf->cell(180,6, $this->s_state,"0",1,"C");
				}

				$this->pdf->SetFont('Times','B',10);
				if($FUNIVCODE == '005')
					$this->pdf->Cell(180,6,"ATTENDANCE SHEET","0",1,"C");
				else
					$this->pdf->Cell(180,6,"INVIGILATOR'S DIARY - {$this->FEXAMDATE} EXAMINATION","0",1,"C");

				$this->pdf->SetFont('Times','B',10);
				$this->pdf->Cell(180,6,'Subject : '.$av['fsubcode'],"0",1,"C");
				$this->pdf->Cell(180,6,"Exam Date : ".$av['fdoe'],"0",1,"C");
				$this->pdf->Ln(1);
				$this->pdf->SetFont('Times','B',9);
				$empty_cell_width=12;
				
				$this->pdf->cell(8,4, "Sl.","LRT",0,"C");
				$this->pdf->cell(18,4, "Reg. No.","LRT",0,"C");						
				$this->pdf->cell(80,4, "Name","LRT",0,"C");
				$this->pdf->cell(20,4, "Ans. Book","LRT",0,"C");
				$this->pdf->cell(20,4, "Signature","LRT",0,"C");
				$this->pdf->cell(22,4, "Additional","LRT",0,"C");
				$this->pdf->cell(25,4, "Remarks","LRT",1,"C");
			
				$this->pdf->cell(8,4, "No.","LRB",0,"C");
				$this->pdf->cell(18,4, "","LRB",0,"C");						
				$this->pdf->cell(80,4, "","LRB",0,"C");
				$this->pdf->cell(20,4, "No.","LRB",0,"C");
				$this->pdf->cell(20,4, "","LRB",0,"C");
				$this->pdf->cell(22,4, "Ans. Book No.","LRB",0,"C");
				$this->pdf->cell(25,4, "","LRB",1,"C");
				
				$first = false;	

								
			}		
			$this->pdf->SetFont('Times','',8);	
			$this->pdf->cell(8,6,$i,"1",0,"C");
			$this->pdf->cell(18,6,$av['FREGNO'],"1",0,"C");		//				
			$this->pdf->cell(80,6,$av['FNAME'],"1",0,"L");
			$this->pdf->cell(20,6,"","1",0,"C");
			$this->pdf->cell(20,6,"","1",0,"C");
			$this->pdf->cell(22,6,"","1",0,"C");
			$this->pdf->cell(25,6,"","1",1,"C");			
			
				
			
			$i++;	
			if($i == $this->spr)
			{
				$this->pdf->Ln(5);
				$this->pdf->Cell(80,7,"Date  : _________ ","0",0,"L");
				$this->pdf->Cell(90,7,"Signature of the Invigilator ","0",1,"R");
			}
			}
			
			if($FUNIVCODE == "035" || $FUNIVCODE == "017" || $FUNIVCODE == "003" || $FUNIVCODE == "033" || $FUNIVCODE == "012")
			{	
				$this->pdf->Ln(5);				
				if($this->pdf->GetY() > 120)
				{
					$this->headeractive = false;
					$this->pdf->AddPage();
				}	
				$this->pdf->SetFont('Times','B',11);
				$this->pdf->cell(12,10, "","0",0,"L");				
				$this->pdf->cell(50,10, "Name of the Invigilator","1",0,"L");	
				$this->pdf->cell(121,10, "","1",1,"L");	
				$this->pdf->cell(12,10, "","0",0,"L");
				$this->pdf->cell(50,10, "Designation","1",0,"L");	
				$this->pdf->cell(121,10, "","1",1,"L");
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->cell(50,5, "Serial No. of Answer","LRT",0,"L");	
				$this->pdf->cell(40,5, "From","1",0,"C");
				$this->pdf->cell(40,5, "To","1",0,"C");
				$this->pdf->cell(41,5, "Total","1",1,"C");
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->cell(50,5, "Books Issued to Invigilator","LRB",0,"L");	
				$this->pdf->SetFont('Times','',12);
				$this->pdf->cell(40,5, "","1",0,"C");
				$this->pdf->cell(40,5, "","1",0,"C");
				$this->pdf->cell(41,5, "","1",1,"C");
				$this->pdf->cell(12,10, "","0",0,"L");
				$this->pdf->cell(90,10, "Register No. of Candidate(s) who arrived late","1",0,"L");	
				$this->pdf->cell(81,10, "","1",1,"C");
				$this->pdf->cell(12,10, "","0",0,"L");			
				$this->pdf->cell(90,5, "Register No. of Candidate(s) who left the ","LR",0,"L");				
				$this->pdf->cell(81,5, "","LR",1,"C");
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->cell(90,5, "hall temporarily ","LRB",0,"L");
				$this->pdf->cell(81,5, "","LRB",1,"C");				
				$this->pdf->cell(12,10, "","0",0,"L");
				$this->pdf->cell(90,10, "Register No. of Absentee(s)","1",0,"L");	
				$this->pdf->cell(81,10, "","1",1,"C");
				$this->pdf->cell(12,10, "","0",0,"L");
				$this->pdf->cell(90,10, "Total No. of Absentee(s)","1",0,"L");	
				$this->pdf->cell(81,10, "","1",1,"C");
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->cell(90,5, "Total No. of Candidate(s) Answer Books handed","LR",0,"L");	
				$this->pdf->cell(81,5, "","LR",1,"C");
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->cell(90,5, "over to Chief - Superintendent","LRB",0,"L");	
				$this->pdf->cell(81,5, "","LRB",1,"C");
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->cell(90,5, "Serial No. of Blank Answer Books returned ","LRT",0,"L");	
				$this->pdf->cell(81,5, "","LR",1,"C");
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->cell(90,5, "to Chief-Superintendent ","LRB",0,"L");	
				$this->pdf->cell(81,5, "","LRB",1,"C");
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->cell(90,5, "Register No. of Candidate(s) Involved in ","LR",0,"L");	
				$this->pdf->cell(81,5, "","LR",1,"C");
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->cell(90,5, "Malpractice","LRB",0,"L");	
				$this->pdf->cell(81,5, "","LRB",1,"C");
				$this->pdf->cell(12,10, "","0",0,"L");
				$this->pdf->cell(90,10, "Sl.No. of Ans Book of M.P. Case(s)","1",0,"L");		
				$this->pdf->cell(81,10, "","1",1,"C");
				$this->pdf->cell(12,10, "","0",0,"L");
				$this->pdf->cell(90,10, "Remarks regarding M.P.Case(s)","1",0,"L");	
				$this->pdf->cell(81,10, "","1",1,"C");
				$this->pdf->Ln(8);
				$this->pdf->cell(12,5, "","0",0,"L");
				$this->pdf->Cell(80,7,"Date  : _________ ","0",0,"L");
				$this->pdf->Cell(90,7,"Signature of the Invigilator ","0",1,"R");
			}
		

	}
	 
	function SendOutput()
	{
		$this->pdf->Output("Invigilators Dairy.pdf","D");
	}

}

function GeneratesubjectwiseInvigilatorsDairy($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

	$class_obj=new ra_invigilators_dairy();
	$class_obj->AliasNbPages();
	$class_obj->DefaultConstructor($aobj_context);

	$class_obj->GetFullQry();
	 $class_obj->formcolldata();
	$class_obj->formData();
	 
	$class_obj->SendOutput();
}

?>