fetchByAssoc($GLOBALS['db']->query("select c.iso4217 as s from currencies as c inner join ecmquotes as q on q.currency_id=c.id where q.id='".$_REQUEST['record']."'")); $symbol=$rr['s']; $db = $GLOBALS['db']; $focus = new EcmQuote(); $focus->retrieve($_REQUEST['record']); if ($focus->ecmlanguage=='pl_pl') $lang = "pl"; if ($focus->ecmlanguage=='en_us') $lang = "en"; $products = $db->query("SELECT id,ecmproduct_id FROM ecmquoteitems WHERE ecmquote_id='".$_REQUEST['record']."' AND deleted='0' ORDER BY position"); while ($prod = $db->fetchByAssoc($products)) { $p=productCardNew($p,$prod['ecmproduct_id'],$lang,true,true,"",$symbol,true, $_REQUEST['show_ean'], $prod['id'], "EcmQuotes"); } if($_REQUEST['create_img']==1){ $guid=create_guid(); $type="F"; $file="cache/upload/Catalogue".$guid.".pdf"; } else{ $type="D"; $file="Catalogue".date("YmdHi").".pdf"; } $p->Output($file,$type);