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.137.221.114
<?php
$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);
require_once("report_hall_ticket.php");
class applicationFormReport
{
function DefaultConstructor($aobj_context)
{
$this->aobj_context=$aobj_context;
//$this->pdf= new FPDF();
$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 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->pdf= new TCPDF('L');
$this->pdf->SetMargins(2,2);
//$this->pdf->addPage('L');
}
function formcolldata()
{
$get_coll_name="select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,
FUNIVADD1 as 'state', pdf_logo_path,
ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ From control";
$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
$query = "select FLATERAL_ENTRY from studadm where fappno = '{$this->app_no}'";
$results = $this->aobj_context->mobj_db->GetRow($query);
$this->latral = $results['FLATERAL_ENTRY'];
$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'];
$this->FEXAMAPPREQ=$lobj_get_coll_name['FEXAMAPPREQ'];
$this->FUNIVCODE=$lobj_get_coll_name['FUNIVCODE'];
}
function WriteHallTicket()
{
$aobj_context=$this->aobj_context;
$class_obj=new AdmissionTicket($aobj_context);
ini_set("memory_limit",-1);
ini_set('max_execution_time',3300);
$query = "select fname, dg.fdescpn, ffatname, fmotname,sa.fdegree,
date_format(fpaymentdate, '%d/%m/%Y') as fpaymentdate,fprovregno,
date_format(fprovregdate, '%d/%m/%Y') as fprovregdate,
fcaste, ftotfee, ifnull(fpaymentid,'') as fpaymentid, fphotopath
from studadm sa inner join degree dg
on sa.fdegree = dg.fdegree
and sa.fexamno = dg.fexamno
where fappno = '{$this->app_no}'";
$results =$this->aobj_context->mobj_db->GetRow($query);
///get Subjects details
$query = "select o.fsubcode,s.fsubname
from options o inner join subject s on
o.fsubcode = s.fsubcode
and o.fdegree = s.fdegree
and o.fexamno = s.fexamno
where s.fintass = 'F' and o.fappno = '{$this->app_no}'
and o.fdegree = '{$results['fdegree']}'";
//var_dump($query);
$result1 =$this->aobj_context->mobj_db->GetAll($query);
$pdf=$this->pdf;
//var_dump($results);
$pdf->SetMargins(20,5,20,5);
//$pdf->SetMargins(28,3);
$pdf->aobj_context =$aobj_context ;
$pdf->SetFillColor(248, 248 ,255);
$pdf->SetFont('Times','',10);
$pdf->AddPage("P");
//$pdf->Rect(5,05,200,289);
$pdf->SetFont('Times','B',16);
$pdf->Ln(2);
$pdf->SetY(12);
$pdf->Cell(70,6,"KUVEMPU ",0,0,'R');
$img_path = $aobj_context->main_src."/img/logo.jpg";
if(file_exists($img_path))
$pdf->Image($img_path,90,8,20,15);
$pdf->Cell(58,6,"UNIVERSITY",0,1,'R');
$pdf->SetFont('Times','B',12);
$pdf->Ln(2);
$photopath = $aobj_context->main_src.$results['fphotopath'];
if(file_exists($photopath))
$pdf->Image($photopath,170,12,20,25);
$pdf->SetXY(6,23);
$pdf->Cell(0,5,"Application Form",0,1,'C');/// Ph.D., Course Work Examinations-2018
$pdf->Cell(0,5,"Ph.D., Course Work Examinations-2018",0,1,'C');
$pdf->Cell(158,5,"June-2018",0,1,'C');
$pdf->Ln(2);
$pdf->SetX(20);
$pdf->SetFont('Times','B',11);
$pdf->Cell(40,4,"Subject Applied For : ",0,0,'L');
$pdf->SetFont('Times','',11);
$pdf->Cell(50,4,$results['fdescpn'],0,1,'L');
$table = '<table cellpadding="3" cellspacing="0" border="1">
<tr>
<td width="20" align="center"><b>1</b></td>
<td width="200" colspan ="2"><b>Name of the Candidate </b> </td>
<td width="280" colspan ="2">'.$results['fname'].'</td>
</tr>
<tr>
<td align="center"><b>2</b></td>
<td colspan ="2"><b>Mother`s Name</b></td>
<td colspan ="2">'.$results['fmotname'].'</td>
</tr>
<tr>
<td align="center"><b>3</b></td>
<td colspan ="2" colspan ="2"><b>Father`s Name</b></td>
<td colspan ="2">'.$results['ffatname'].'</td>
</tr>
<tr>
<td align="center"><b>4</b></td>
<td colspan ="2"><b>Category</b></td>
<td colspan ="2">'.$results['fcaste'].'</td>
</tr>
<tr>
<td rowspan="3" align="center"><b>5</b></td>
<td rowspan="3" colspan ="2"><b>Details of Papers</b><br/></td>
<td colspan ="2">'.$result1[0]['fsubname'].'</td>
</tr>
<tr>
<td colspan ="2">'.$result1[1]['fsubname'].'</td>
</tr>
<tr>
<td colspan ="2">'.$result1[2]['fsubname'].'</td>
</tr>
<tr>
<td rowspan="2" align="center"><b>6</b></td>
<td rowspan="2" width="120"><b>Details of fee paid</b><br/></td>
<td width="80"><b>Date</b></td><td><b>Reciept No</b></td>
<td><b>Amount</b></td>
</tr>
<tr>
<td width="80">'.$results['fpaymentdate'].'</td>
<td>'.$results['fpaymentid'].'</td>
<td>'.$results['ftotfee'].'</td>
</tr>
<tr>
<td align="center"><b>7</b></td>
<td width="120"><b>Provisional Reg. Date</b></td>
<td width="80">'.$results['fprovregdate'].'</td>
<td><b>Provisional Reg. No.</b></td>
<td>'.$results['fprovregno'].'</td>
</tr>
</table>';
$pdf->Ln(2);
$pdf->writeHTML($table, true, false, false, false, '');
$pdf->Ln(4);
$pdf->SetFont('Times','B',11);
$pdf->Cell(180,4,'Date : ',0,1,'L');
$pdf->Cell(30,4,'Place : ',0,0,'L');
$pdf->Cell(100,4,'Signature of the Chairman',0,0,'C');
$pdf->Cell(50,4,'Signature of the Applicant ',0,1,'R');
$pdf->Ln(2);
$x = $pdf->getX();
$y = $pdf->getY();
$pdf->Line(20,$y,$x+180,$y);
////Hall ticket\\\\\\\\
$pdf->Ln(5);
$y = $pdf->getY();
$pdf->SetFont('Times','B',16);
$pdf->SetY($y+4);
$pdf->Cell(70,6,"KUVEMPU ",0,0,'R');
$img_path = $aobj_context->main_src."/img/logo.jpg";
if(file_exists($img_path))
$pdf->Image($img_path,90,$y,20,15);
$pdf->Cell(58,6,"UNIVERSITY",0,1,'R');
$pdf->SetFont('Times','B',12);
$pdf->Ln(2);
$photopath = $aobj_context->main_src.$results['fphotopath'];
if(file_exists($photopath))
$pdf->Image($photopath,170,$y,20,25);
$y = $pdf->getY();
$pdf->SetXY(6,$y+3);
$pdf->Cell(0,5,"Admission Ticket",0,1,'C');/// Ph.D., Course Work Examinations-2018
$pdf->Cell(0,5,"Ph.D., Course Work Examinations-2018",0,1,'C');
$pdf->Cell(158,5,"June-2018",0,1,'C');
$pdf->Ln(2);
$pdf->Cell(20,4,"Subject : ",0,0,'L');
$pdf->SetFont('Times','',11);
$pdf->Cell(50,4,$results['fdescpn'],0,1,'L');
$pdf->Ln(2);
$table2 = '<table cellpadding="3" cellspacing="0" border="1">
<tr>
<td width="200"><b>Register No.</b></td>
<td width="300"></td>
</tr>
<tr>
<td ><b>Name of the Candidate</b></td>
<td>'.$results['fname'].'</td>
</tr>
</table>';
$pdf->writeHTML($table2, true, false, false, false, '');
//Details of Papers
$pdf->SetFont('Times','B',12);
$pdf->Cell(160,4,'Details of Papers',0,1,'C');
$pdf->Ln(1);
$pdf->SetFont('Times','',11);
$table3 = '<table cellpadding="3" cellspacing="0" border="1">
<tr><td width="30" align="center"><b>Sl. No.</b></td>
<td width="170" align="center"><b>Subject Name</b></td>
<td width="220" align="center"><b>Paper Title</b></td>
<td width="80" align="center"><b>Signature of the Invigilator</b></td>
</tr>';
$i = 1;
foreach ($result1 as $key => $value) {
$table3 .= '<tr>
<td align="center">'.$i.'</td>
<td>'.$value['fsubname'].'</td>
<td> </td>
<td> </td>
</tr>';
$i++;
}
$table3 .= '</table>';
//echo $table3;
$pdf->writeHTML($table3, true, false, false, false, '');
$pdf->Ln(5);
$pdf->SetFont('Times','B',11);
$pdf->Cell(100,4,'Signature of the Candidate',0,1,'L');
$pdf->Cell(180,4,'Date : ',0,1,'L');
$pdf->Ln(3);
$pdf->Cell(100,4,'Registrar(Evaluation)',0,0,'R');
$pdf->Cell(80,4,'Signature of the Chairman',0,1,'R');
$pdf->Ln(1);
$x = $pdf->getX();
$y = $pdf->getY();
$pdf->Line(20,$y,$x+180,$y);
}
function SendOutput()
{
$this->pdf->Output("application_letter_{$this->app_no}.pdf","D");
}
}
function PrintApplicationFormSBM($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj=new applicationFormReport();
$class_obj->DefaultConstructor($aobj_context);
$class_obj->formcolldata();
$class_obj->WriteHallTicket();
$class_obj->SendOutput();
}
?>
|