phpBMS

Ticket #34: invoices_pdfinvoice.php.diff

File invoices_pdfinvoice.php.diff, 0.7 KB (added by ZGAnderson, 6 years ago)
Line 
1110c110,124
2<               $pdf->MemImage($thepicture["file"],$leftmargin,$topmargin,$tempwidth); 
3---
4>                       $querystatement="SELECT upper(type) type FROM files WHERE id=1";
5>                       $typeresult=mysql_query($querystatement,$dblink);
6>                       if(!$typeresult) reportError(300,"Error Retrieving Logo Type");
7>                       $picturetype=mysql_fetch_array($typeresult);
8>                       
9>                       // Insert the image using appropriate function based on type, if not a recognized type, skip it
10>                       if ($picturetype[0]=="IMAGE/JPEG"){
11>                               $logo = $thepicture[0];
12>                               $pdf->Image('var://logo', $leftmargin,$topmargin,$tempwidth, 0, 'JPEG');
13>                       }
14>                       else {
15>                               if ($picturetype[0]=="IMAGE/PNG"){
16>                                       $pdf->MemImage($thepicture["file"],$leftmargin,$topmargin,$tempwidth); 
17>                               }
18>                       }
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.