Files
crm.e5.pl/modules/EcmProducts/generateCard.php
2024-04-27 09:23:34 +02:00

34 lines
925 B
PHP

<?php
include_once("modules/EcmProducts/productCardUltraNew.php");
include_once("include/MPDF57/mpdf.php");
$p=new mPDF('utf-8','A4-L', null, 'helvetica');
if ($_REQUEST['price']=='srp_price')
$price = "";
else
$price = $_REQUEST['price'];
$p=productCardNew($p,$_REQUEST['record'],$_GET['language'],true,true,$price,"",$_REQUEST['show_price'], $_REQUEST['ean'], $_REQUEST['simage']);
$p->Output();
return;
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);
if($_REQUEST['create_img']==1){
exec("convert -density 120 -quality 100 /var/www/html/crm/".$file." /var/www/html/crm/".str_replace(".pdf",".jpg",$file));
chmod(str_replace(".pdf",".jpg",$file),0777);
header("Location: index.php?module=EcmProducts&action=showProductsCardImages&to_pdf=1&guid=".$guid);
}
?>