| Current Path : /var/www/html/mmishra/icure/staff/ |
| Current File : /var/www/html/mmishra/icure/staff/phtest.inc |
<h3 align='left'>Pathology Report</h3>
<center>
<?php
$tbl = 'phresults';
$regno = $_REQUEST["regno"];
if ($regno && is_registration($regno)) {
include "../fpdf.php";
// generate pdf file of receipt
$pdf = new Receipt($institute, 'P', 'mm', 'A4');
$pdf->SetDisplayMode(real, 'default');
// create first page
$pdf->AddPage();
$pdf->SetTitle('ERP PDF Generator');
$pdf->SetAuthor('IIIT-A');
$pdf->SetAutoPageBreak(0);
$pdf->SetFont('Times', 'U', 13);
$pdf->Cell(0, 0, 'Enrollment Receipt - ' .date("Y"), 0, 1, 'C');
$pdf->SetFont('Times', 'I', 11);
$pdf->Cell(0, 12, '( Under ' .str_repeat('.', 20). ' Category )', 0, 1, 'C');
$pdf->Ln(5);
echo registration_detail($regno);
//if (is_prescription($regno)) {
echo "<div align='right'>Date Time: ".date("Y-m-d H:i:s")."</div>
<h3><u>REPORT</u></h3>
<table border='1' width='100%'>
<tr><th>Haematology</th><th>Biochemical</th></tr>
<tr valign='top'><td><table border='0' width='100%'>
<tr><th>Sr.</th><th>Test</th><th>Normal Range</th><th>Result</th></tr>";
$rs = mysql_query("select * from phtests where test_group='Haemetology' order by test_id");
while ($o = mysql_fetch_object($rs)) {
$i++;
echo "<tr><td align='center'>$i</td><td>$o->test_name</td><td>$o->test_range</td>
<td align='center'>";
$sr = mysql_query("select * from $tbl where reg_no=$regno and test_id=$o->test_id");
while ($q = mysql_fetch_object($sr)) {
echo $q->test_result;
}
echo "</td></tr>";
}
echo "</table></td><td><table border='0' width='100%'>
<tr><th>Sr.</th><th>Test</th><th>Normal Range</th><th>Result</th></tr>";
$i = 0;
$rs = mysql_query("select * from phtests where test_group='Biochemical' order by test_id");
while ($o = mysql_fetch_object($rs)) {
$i++;
echo "<tr><td align='center'>$i</td><td>";
if (strpos($o->test_name,'Exam') && !$z) {
echo "<b>URINE EXAMINATION</b><br>";
$z++;
}
echo str_replace("Urine Examination",' ',$o->test_name);
echo "</td><td>$o->test_range</td>
<td align='center'>";
$sr = mysql_query("select * from $tbl where reg_no=$regno and test_id=$o->test_id");
while ($q = mysql_fetch_object($sr)) {
echo $q->test_result;
}
echo "</td></tr>";
}
echo "</table></td></tr>
</table>
<br><br>
<div align='right'>
<b>Reported by: </b>(<?php echo $user; ?>) _______________________
</div>";
//} else
// echo "No prescription";
} else {
echo "No registration";
}
}
?>
</center>
$pdf->Image('https://erp.iiita.ac.in/images/dummy.jpg', 175, 48, 22, 28);
$pdf->SetFont('Times', 'B', 11);
$pdf->Write(5, "Official Details:\n");
$pdf->Ln(1);
$pdf->SetFont('Times', '', 10);
$y = 72;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Program Name', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Batch Year', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .date("Y"). ' - ' . str_repeat('.', 10), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Enrollment No.', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(25, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$pdf->Ln(4);
$pdf->SetFont('Times', 'B', 11);
$pdf->Write(5, "Personal Details:\n");
$pdf->Ln(1);
$pdf->SetFont('Times', '', 10);
$y += 15;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Student Name', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Date of Birth', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .'..../..../..........', 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Gender', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Blood Group', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Pwd Status', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Category', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Marital Status', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Religion', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Nationality', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Aadhar No.', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$pdf->Ln(4);
$pdf->SetFont('Times', 'B', 11);
$pdf->Write(5, "Contact Details:\n");
$pdf->Ln(1);
$pdf->SetFont('Times', '', 10);
$y += 15;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Phone No.', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Email', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Police Station', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetFont('Times', '', 9.5);
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Communic. Address', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Permanent Address', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ' ' .str_repeat('.', 60), 0, 1, 'L');
$pdf->Ln(4);
$pdf->SetFont('Times', 'B', 11);
$pdf->Write(5, "Parent's / Guardian's Details:\n");
$pdf->Ln(1);
$pdf->SetFont('Times', '', 9.5);
$y += 15;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, "Father's Name", 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60). ' (Profession: ' .str_repeat('.', 20). ') Email: ' .str_repeat('.', 25), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Contact', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60). ', Phone: ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, "Mother's Name", 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60). ' (Profession: ' .str_repeat('.', 20). '), Email: ' .str_repeat('.', 25), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Contact', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60). ', Phone: ' .str_repeat('.', 60), 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, "Guardian's Name", 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 40). ' (Profession: ' .str_repeat('.', 20). ') Relation: ' .str_repeat('.', 25). ', Email: ' .str_repeat('.', 25) , 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(50, 5, 'Contact', 0, 0, 'L');
$pdf->SetXY(50, $y);
$pdf->Cell(65, 5, ': ' .str_repeat('.', 60). ', Phone: ' .str_repeat('.', 60), 0, 1, 'L');
$pdf->Ln(4);
$pdf->SetFont('Times', 'B', 11);
$pdf->Write(5, "Academic Details:\n");
$pdf->Ln(1);
$pdf->SetFont('Times', '', 10);
$y += 15;
$pdf->SetXY(20, $y);
$pdf->Cell(180, 5, '[ X Grade/% - ' .str_repeat('.', 15). ', Year - ' .str_repeat('.', 15). ', Board - ' .str_repeat('.', 60). ' ]', 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(180, 5, '[ XII Grade/% - ' .str_repeat('.', 15). ', Year - ' .str_repeat('.', 15). ', Board - ' .str_repeat('.', 60). ' ]', 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(180, 5, '[ UG Grade/% - ' .str_repeat('.', 15). ', Year - ' .str_repeat('.', 15). ', Institute - ' .str_repeat('.', 60). ' ] ', 0, 1, 'L');
$y += 5;
$pdf->SetXY(20, $y);
$pdf->Cell(180, 5, '[ PG Grade/% - ' .str_repeat('.', 15). ', Year - ' .str_repeat('.', 15). ', Institute - ' .str_repeat('.', 60). ' ]', 0, 1, 'L');
$pdf->SetFont('Times', 'B', 11);
$pdf->SetXY(110, 75);
$pdf->Cell(20, 5, "Documents Submitted:\n", 0, 0, 'L');
for($i =0; $i < 20; $i++) {
$docs .= ($i < 10 ? "0$i" : "$i") .") " .str_repeat('.', 60). "\n";
}
$pdf->SetFont('Times', '', 8.5);
$pdf->SetXY(110, 80);
$pdf->MultiCell(87, 4, $docs, 1, 'L');
$pdf->SetFont('Times', 'B', 10);
$pdf->SetXY(10, 267);
$pdf->Cell(0, 10, '[ Seal & Signatures ]', 0, 1, 'C');
$pdf->Line(0, 275, 500, 275);
$pdf->SetFont('Helvetica', 'B', 9);
$pdf->SetXY(20, 280);
$pdf->Write(9, '(Student)');
$pdf->SetXY(90, 280);
$pdf->Write(9, '(Parent/Guardian)');
$pdf->SetXY(165, 280);
$pdf->Write(9, '(AAA Office)');
$pdf->Line(0, 288, 500, 288);
$pdf->SetFont('Helvetica', 'I', 6.5);
$pdf->SetXY(150, 288);
$pdf->Cell(0, 5, 'Processed by: ' .str_repeat('.', 60). ' (dated: ..../..../..........)', 0, 1, 'R');
$filename = __DIR__ ."/../uploads/enrollment-format-" .date("Y"). ".pdf";
$pdf->Output($filename, 'F');
$str .= "<div align='center'>
<object data='../uploads/phtest-report-" .$reg_no. ".pdf#page=1' type='application/pdf' title='Enrollment Receipt' width='100%' height='650px'>
<embed src='../uploads/phtest-report-" .$reg_no. ".pdf#page=1' width='100%' height='650' type='application/pdf'>
<p>This browser does not support PDFs. Please download the PDF to view it:<br><br><a href='../uploads/phtest-report-" .$reg_no. ".pdf'>Download PDF</a></p>
</embed>
</object>
</div>";
return $str;
}
?>
</center>