Current File : /home/inlingua/www/noida/icentex/admin_fd/welcome_note_all.php |
<?php
session_start();
//print_r($_SESSION);
ini_set("max_execution_time",0);
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 courseId='$_REQUEST[courseId]'";
//$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>';
$content.='<tr><td colspan="2" style="text-align:justify;">To help you learn the language better, you can take advantage of the <b><i>inlingua Friday Activities</i></b>. 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.<br>
An exciting new tool, <b><i>inlingua</i> Online Learning/<i>inlingua</i> Online Learning Mobile</b>, is also available for students who want to learn on the go. You may avail the user ID and password from the front desk executive by paying a nominal subscription fee. Just go to www.inlingua.com, click on E-Learning and use the user ID and password given below to log on. Also you can log on to www.facebook.com/mylingua and join our official page on the social networking site Facebook. Here, we connect, create and communicate (and have fun doing it!).</td></tr>';
$content.='<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>';
$content.='<table width="100%">
<tr><td width="60%">Kind regards,</td>
<td>Our official website is at -<br>http://www.inlinguanewdelhi.com/</td></tr></table>';
$content.='<br><table width="100%"><tr><td width="35%">
<table width="100%">
<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%"> </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;">