Current File : /home/inlingua/public_html/icentex/admin_cert/welcome_note.php |
<?php
session_start();
ini_set("max_execution_time",0);
//print_r($_SESSION);
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_once('../../tcpdf/config/lang/eng.php');
require_once('../../tcpdf/tcpdf.php');
$query="select * from ingl_student where recNo='$_REQUEST[student]'";
//$query="select * from ingl_student where recNo='2'";
$result=mysqli_query($conn,$query);
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Inlingua');
$pdf->SetTitle('Inlingua');
$pdf->SetSubject('Inlingua');
$pdf->SetKeywords('Inlingua Welcome Note');
// remove default header/footer
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins('30', '70', '30');
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
while($num=mysqli_fetch_array($result))
{
$queryC="select * from ingl_course where recNo='".$num[courseId]."'";
$resultC=mysqli_query($conn,$queryC);
$numC=mysqli_fetch_array($resultC);
$queryI="select name from timesheet_user where recNo='".$numC[instructor]."'";
$resultI=mysqli_query($conn,$queryI);
$numI=mysqli_fetch_array($resultI);
$pdf->SetFont('times', '', 11);
$fromDate=$num[createDate];
$fromdate1=explode("-",$fromDate);
$fdate1= date("d F Y", mktime(0, 0, 0, $fromdate1[1], $fromdate1[2], $fromdate1[0]));
$content="";
$content.='<table border="0" width="100%"><tr><td width="70%"></td><td width="30%">Date:'.$fdate1.'</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">Dear <b>'.$num[studentName].'</b></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2" style="text-align:justify;">Welcome to <b><i>inlingua</i></b>. We would like to do everything we can to help you in your aim of learning a language well.</td></tr>
<tr><td colspan="2" style="text-align:justify;"><b>'.$numC[name_pie].'</b>, who is your Personal <b><i> inlingua </i></b> Executive, will be happy to
offer you any help on administrative matters. <b>'.$numI[name].'</b> will be your instructor for this course. Please also feel free to contact me whenever required.
</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">To get the most out of your course we recommend that you attend your classes regularly and punctually.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2" style="text-align:justify;">To help you learn the language better, you can take advantage of the <b><i>inlingua</i></b> Club membership. As a part of the <b><i>inlingua</i></b> community, you also have the unique opportunity to network with other like-minded people all over the world. Just log on to www.inlinguapenpals.com, register yourself and find thousands of pen pals with whom you can practice your language skills, share experiences, or simply chat and have fun. An exciting new tool, <b><i>inlingua</i></b> Online Learning, is now available. Just go to www.inlingua.com, click on <b>Online Learning</b> and use the user ID and password given below to log on. Use of this tool is free for all students currently studying at <b><i>inlingua</i></b>. You may also continue to use this website after you finish your course by paying a nominal subscription of Rs.300/- a month.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2" style="text-align:justify;">We always look forward to suggestions that will make your time spent at <b><i>inlingua</i></b> more fruitful and memorable. Please share your thoughts with an <b><i>inlingua</i></b> executive or place them in the suggestions box kept next to the notice board.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2" style="text-align:justify;">On behalf of everyone at <b><i>inlingua</i></b>, I wish you the very best for your course.</td></tr>
</table><br><br>';
$content.='<table width="100%"><tr><td width="35%">
<table width="100%"><tr><td>Kind regards,</td></tr>
<tr><td>Vikram Bajaj </td></tr>
<tr><td>Center Director </td></tr>
<tr><td><b><i>inlingua</i></b> New Delhi </td></tr>
</table>
</td><td width="65%"><table width="100%" border="1"><tr><td width="60%" align="center" colspan="2">inlingua Online Learning (iOL)<br>www.inlingua.com</td><td width="40%" align="center">Icentex</td></tr>
<tr><td width="17%">Login:</td><td align="center" width="43%">'.$numC[id_iol].'</td><td align="center" width="40%">'.$num[login].'</td></tr>
<tr><td width="17%">Password:</td><td align="center" width="43%">'.$numC[password_iol].'</td><td align="center" width="40%">'.$num[password].'</td></tr>
</table></td></tr></table>';
/* <p align="center"><em><u>8<sup>th</sup> February – 22<sup>nd</sup> November 2010</u></em></p>*/
// add a page
$pdf->AddPage();
// set some text to print
$html = <<<EOD
$content
EOD;
$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
}
// print a block of text using Write()
//$pdf->Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0);
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_002.pdf', 'I');
//============================================================+
// END OF FILE
//============================================================+
?><td style="text-align:justify; font-size:12px;">