Fatal error: Cannot redeclare header_greenleaf() (previously declared in C:\AppServ\www\yqc\drugfront\TestFunc_GreenLeaf.php:47) in C:\AppServ\www\yqc\drugfront\TestFunc_GreenLeaf.php on line 373
Code (PHP)
<?
function Header_GreenLeaf($Batch_No)
{ // start Header_GreenLeaf()
global $Batch_No,$Drug_No,$Batch_ID,$Drug_Name,$Product_Status;
global $Curr_Date,$Rec_Date,$Control,$Mfg_Date,$Exp_Date,$Manufac,$Amount;
global $Batch_Size,$Reg_No,$Receive_No,$Remark;
global $Released_Date;
global $NameStatus;
global $Retest_Date;
global $Label_Exp;
$Curr_Date=date("Y-m-d");
check_BatchNo($Batch_No);
$sql = "SELECT * FROM batch as b ";
$sql .= "WHERE (Batch_No='$Batch_No') ";
$res = mysql_query($sql) or die(mysql_error());
$nrow = mysql_num_rows($res);
}
require('fpdf.php');
$pdf=new FPDF();
$pdf->AddPage();
$pdf->AddFont('TH Niramit AS','','TH Niramit AS.php');
$pdf->SetFont('TH Niramit AS','',15);
FindHeadReport ($Batch_No,&$ResultLast);
if($ResultLast=="Passed")
{ $pdf->Cell(0,10,'APPROVED',0,1,"C"); }
else
{ $pdf->Cell(0,10,'REJECTED',0,1,"C"); }
$pdf->Cell(0,10,'Hello',0,1,"C");
$pdf->Cell(0,10,'Finished Product',0,1,"C");
$pdf->Cell(0,10,iconv( 'UTF-8','TIS-620','สวัสดี'),0,1,"C");
$pdf->Cell(0,10,iconv( 'UTF-8','TIS-620','Product Name : สวัสดี '),0,1,"C");
$pdf->Cell(0,10,iconv( 'UTF-8','TIS-620',''),0,1,"C");
$pdf->Output("MyPDF/MyPDF.pdf","F");
//$pdf->Cell(-50,10,$Drug_Name,0,1,"C");
$pdf->Output("MyPDF/MyPDF.pdf","F");
?>
<tr>
<td></td>
<TD <?=$class?> > PDF Created Click <a href="MyPDF/MyPDF.pdf">here</a> to Download </TD>
</tr>