Current File : /home/inlingua/www/noida/icentex_noida/certificate_1_o1.php |
<?php
session_start();
require('dbConnection.php');
// Include common functions
require('commonFunc.php');
// Include common functions
require('globalVars.php');
require('dbHandler.class.php');
$dbObject = new dbHandler();
$dbObject->connect();
//ob_start();
//include("header.php");
?>
<?php
require("html2fpdf.php");
$query="select * from level_1 where courseId='$_SESSION[courseId]'";
$result=mysql_query($query);
class PDF extends HTML2FPDF
{
//Page header
function Header()
{
$this->SetFont('Arial','B',8);
//$this->SetTextColor(0,0,128);
$this->setXY(190,0);
//$this->MultiCell(70,5,'Manual: umrao/adarsh ',0,1);
}
//Page footer
function Footer()
{
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial','I',8);
//Page number
//$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
}
function PrintChapter()
{
$this->AddPage();
//$this->Cell(0,10,'Printing line number '.$i,0,1);
}
function SetCol($col)
{
//Set position at a given column
$this->col=$col;
$x=10+$col*65;
$this->SetLeftMargin($x);
$this->SetX($x);
}
}
//Instanciation of inherited class
$pdf=new PDF();
$pdf->AliasNbPages();
while($num=mysql_fetch_array($result))
{
$fromDate=$num[startDate];
$toDate=$num[endDate];
$fromdate1=explode("-",$fromDate);
$todate1=explode("-",$toDate);
$fdate1= date("d F Y", mktime(0, 0, 0, $fromdate1[1], $fromdate1[2], $fromdate1[0]));
$tdate1= date("d F Y", mktime(0, 0, 0, $todate1[1], $todate1[2], $todate1[0]));
$pdf->PrintChapter();
$content="";
$content.='
<p align="center"><em><u>GPP'.$num[level].' General English Language Course</u></em></p> ';
/* <p align="center"><em><u>8<sup>th</sup> February – 22<sup>nd</sup> November 2010</u></em></p>*/
$content.='<p align="center"><em><u> '.$fdate1.' – '.$tdate1.' </u></em></p>';
$content.='<table align="center" width="400" border="0"><tr><td width="15%"></td><td>
<p>'.nl2br ($num[cerification_comment]).'</p></td><td width="15%"></td></tr></table> <br>
<table border="0" width="100%">
<tr > <td width="20%"></td>
<td width="60%" border="1" align="center" bgcolor="#FFFF66">
<p align="center">Listening and Speaking Skills</p></td><td width="20%"></td></tr>
<tr> <td width="20%"></td>
<td border="1" valign="top" > <b><i>
'.nl2br ($num[listening_skill]).'</i></b></td><td width="20%"></td> </tr>
<tr> <td width="20%"></td>
<td bgcolor="#FFFF66" border="1" align="center">
<p align="center">General Comment and Advice for Future Study</p></td><td width="20%"></td> </tr>
<tr> <td width="20%"></td>
<td border="1" valign="top">
<i><b>.<br>'.nl2br ($num[general_comment]).'</b></i><br></td> <td width="20%"></td></tr> </table> ';
if($num[eligibility]=='Other')
{
$num[eligibility]=$num[othereligibility];
}
$content.="<table ><tr><td width='30%'></td><td width='15%' border='1' bgcolor='#FFFF66' align='center'>Overall Grade</td><td width='10%'></td><td width='15%' border='1' bgcolor='#FFFF66' align='center'><b>".nl2br ($num[overall_grade])."</b></td></tr></table><br>";
$content.="<table border='0' ><tr><td width='15%'></td><td>Eligibility for the next level:</td><td width='33%'>".$num[eligibility]."</td><td>Course ID:</td><td>".$num[courseId]."</td></tr></table>";
$pdf->setXY(0,60);
$pdf->WriteHTML($content);
}
//$content.='<div style="clear:both;font-size:2%;border :1px;">This document was generated with trial version of <a href="http://word-to-html.com/">Word to HTML</a> conversion software from <a href="http://maluke.com/software/">Maluke Software</a>.</div>';
$outfile="certificate_".$_SESSION[courseId].".pdf";
$pdf->Output("certificate/".$outfile."");
require("header.php");
echo"<br><br>";
echo' <a href="certificate/'.$outfile.'" target="_blank"><b>Click Here to download</b></a>';
require("footer-certificate.php");
?>