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.220.110.45
<?php
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
$pdf_writer_class =$main_src."/tcpdf/tcpdf.php";
require_once($pdf_writer_class);
class certificate_print extends TCPDF
{
function DefaultConstructor($aobj_context)
{
$this->aobj_context=$aobj_context;
$this->pdf= new TCPDF();
$this->pdf=$this;
$this->app_no=trim($this->aobj_context->mobj_data["app_no"]);
$this->ip=$_SERVER["REMOTE_ADDR"];
$get_date="select now() as now_date,FYEAR from control";
$obj=$this->aobj_context->mobj_db->GetRow($get_date);
$this->current_date=$obj[now_date];
$this->FYEAR=$obj[FYEAR];
}
function Header()
{
}
function Footer()
{
$this->SetY(-35);
$this->pdf->SetFont('Times','B',8);
//$this->Cell(140,6,'Entered : IP Address : '.$this->ip_address." Date ".$this->created_date,'0',0,'L');
$html='<span>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span><ol>
<li>This Certificate is not a confirmation of admission or guarantee of a seat in the university or in any of its affilated colleges</li>
<li>This is not a permission for late admission and also for admission over and above and approved intake</li>
<li>Admission may be sought on the basis of the certificate during the Academic year of issue and for the course specified on the
dates prescribed by the University from time to time and Rules prevailing at the time</li>
<li>Approval of admission to the first year of the course will be considered only after he/she fursnishes the Marks Card</li>
</ol>';
$this->pdf->writeHTML($html, true, false, true, false, '');
$this->Cell(140,6,'Printed : IP Address : '.$this->ip." Date ".$this->current_date,'0',0,'L');
$this->Cell(50,6,'Page 1 of 1',0,1,'R');
}
function formcolldata()
{
$get_coll_name="select concat(FUNIVNAME,', ',FTOWN) as 'college_name',FTOWN,
FUNIVADD1 as 'state', pdf_logo_path From control";
$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
$this->college_name=$lobj_get_coll_name['college_name'];
$this->s_state=$lobj_get_coll_name['state'];
$this->FTOWN=$lobj_get_coll_name['FTOWN'];
$this->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
}
function GetQry()
{
$get_data="SELECT s.FNAME,DATE_FORMAT(s.FDATE,'%d/%m/%Y') AS FDATE,d.FDESCPN,s.FPHOTO,
s.FAPPNO,s.FDEGREE,s.FQUALEXAM,s.FBOARDNAME,
s.FBOARDADDRESS,s.FQAULEXAMREGNO,s.FPASSYEAR
FROM student s inner join degree d on d.FDEGREE=s.FDEGREE WHERE s.FAPPNO='{$this->app_no}'";
$lobj_get_data= $this->aobj_context->mobj_db->GetRow($get_data);
// echo $get_data
$this->FNAME=$lobj_get_data['FNAME'];
$this->FDATE=$lobj_get_data['FDATE'];
$this->FDEGREE=$lobj_get_data['FDEGREE'];
$this->FQUALEXAM=$lobj_get_data['FQUALEXAM'];
$this->FBOARDNAME=$lobj_get_data['FBOARDNAME'];
$this->FBOARDADDRESS=$lobj_get_data['FBOARDADDRESS'];
$this->FQAULEXAMREGNO=$lobj_get_data['FQAULEXAMREGNO'];
$this->FPASSYEAR=$lobj_get_data['FPASSYEAR'];
$this->FCOURSE=$lobj_get_data['FDESCPN'];
$this->FPHOTO=$lobj_get_data['FPHOTO'];
$this->full_photo_path=trim($this->aobj_context->main_src."/". $this->FPHOTO);
}
function formData()
{
$this->pdf->SetMargins(10,12,10);
$this->pdf->AddPage("P");
$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,100,50);
}
if(!empty($this->pdf_logo_path))
{
$img_logo_path=$this->aobj_context->main_src.$this->pdf_logo_path;
//echo $img_logo_path; die();
$this->pdf->Image($img_logo_path,10,10,20);
}
if($this->call_type=="Other")
$this->pdf->setY(15);
$this->pdf->SetFont('Times','B',12);
$this->pdf->cell(185,6,$this->college_name,"0",1,"C");
//$this->pdf->cell(180,6,$this->FTOWN,"0",1,"C");
$this->pdf->SetFont('Times','B',8);
$this->pdf->cell(180,7, $this->s_state,"0",1,"C");
$this->pdf->SetFont('Times','B',12);
$this->pdf->Ln(8);
$this->pdf->SetFont('Times','BU',15);
$this->pdf->cell(180,6,"ELIGIBILITY CERTIFICATE","0",1,"C");
$this->pdf->Ln(8);
$this->pdf->SetFont('Times','B',15);
$this->pdf->Cell(156,7,"Certificate No : {$this->app_no}","0",0,"L");
$this->pdf->SetFont('Times','B',12);
$this->pdf->Cell(60,7," Date : {$this->FDATE}","0",1,"L");
$this->pdf->Ln(5);
$this->pdf->SetFont('Times','',14);
if(file_exists($this->full_photo_path) && !empty($this->FPHOTO))
{
//$pdf->Cell(25,6,' App. No.',0,0,'L'); $pdf->Cell(3,6,' : ',0,0,'L');
$this->pdf->Image($this->full_photo_path,176,$this->pdf->GetY()-34,22,22);
//$pdf->Cell(120,6,' '.$class_obj->sub_arr[$p]['ADMNUM'],0,1,'L');
}
$html = "<p style=\"line-height:35px;text-align:justify;font-size: large;\"> The University after examining the attested photocopies of Certificates, Marks
Cards and other documents of Sri/Ms/Dr. <b>{$this->FNAME}</b>, certifies that the
candidate is provisionally eligible for admission to <b>{$this->FCOURSE}</b> course of
Rajiv Gandhi University of Health Sciences for the academic year <b>{$this->FYEAR}</b> as
the candidate required academic qualification, having passed <b>10+2</b> examination held during
<b>{$this->FPASSYEAR}</b> vide Reg. No. <b>{$this->FQAULEXAMREGNO}</b> conducted by
<b>{$this->FBOARDNAME}.</b>
</p>";
$this->pdf->writeHTML($html, true, false, true, false, '');
$this->pdf->Ln(8);
$html = " <p style=\"line-height:25px;text-align:justify;font-size: large;\"> This is subject to verification of original documents and fullfillment of
other conditions as prescribed under the University Rules and also the instruction given below
</p>";
$this->pdf->writeHTML($html, true, false, true, false, '');
$this->pdf->Ln(13);
$this->pdf->SetFont('Times','B',14);
$this->pdf->cell(180,6,"REGISTRAR","0",1,"R");
$img_logo_path=$this->aobj_context->main_src."img/sign.jpg";
$this->pdf->Image($img_logo_path,164,$this->pdf->GetY()-20,30,10);
$this->pdf->SetFont('Times','B',14);
$this->pdf->cell(180,6,"To,","0",1,"L");
$this->pdf->cell(180,6,"{$this->FNAME}","0",1,"L");
}
function SendOutput()
{
$this->pdf->Output("certificate_{$this->app_no}.pdf","D");
}
}
function PrintCertificate($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj=new certificate_print();
// $class_obj->AliasNbPages();
$class_obj->DefaultConstructor($aobj_context);
$class_obj->formcolldata();
$class_obj->GetQry();
$class_obj->formData();
$class_obj->SendOutput();
}
?>
|