forked from science-ation/science-ation
Fix the conference logo not working on reports (FINALLY! god for such a stupid bug it took me forever to realize it), also tweaked the barcode code a bit
This commit is contained in:
parent
c493120128
commit
12bb399d48
@ -807,32 +807,30 @@ foreach($report_stock as $n=>$v) {
|
||||
case 'static_box':
|
||||
$rep->label_rect($d['x'], $d['y'], $d['w'], $d['h']);
|
||||
break;
|
||||
case 'fair_logo':
|
||||
case 'conference_logo':
|
||||
$rep->label_fair_logo($d['x'], $d['y'], $d['w'], $d['h'], $show_box);
|
||||
break;
|
||||
case "projectbarcode":
|
||||
$style = array(
|
||||
'border' => 2,
|
||||
'vpadding' => 'auto',
|
||||
'hpadding' => 'auto',
|
||||
'fgcolor' => array(0,0,0),
|
||||
'bgcolor' => false, //array(255,255,255)
|
||||
'module_width' => 3, // width of a single module in points
|
||||
'module_height' => 3 // height of a single module in points
|
||||
);
|
||||
$rep->barcode($v, 'QRCODE,H', $d['x'], $d['y'], $d['w'], $d['h'], $style, 'N');
|
||||
break;
|
||||
|
||||
default:
|
||||
if($f == 'static_text')
|
||||
$v = $d['value'];
|
||||
|
||||
if($f=="projectbarcode") {
|
||||
$style = array(
|
||||
'border' => 2,
|
||||
'vpadding' => 'auto',
|
||||
'hpadding' => 'auto',
|
||||
'fgcolor' => array(0,0,0),
|
||||
'bgcolor' => false, //array(255,255,255)
|
||||
'module_width' => 3, // width of a single module in points
|
||||
'module_height' => 3 // height of a single module in points
|
||||
);
|
||||
$rep->barcode($v, 'QRCODE,H', $d['x'], $d['y'], $d['w'], $d['h'], $style, 'N');
|
||||
}
|
||||
else {
|
||||
$rep->label_text($d['x'], $d['y'], $d['w'], $d['h'],
|
||||
$v, $show_box, $d['align'], $d['valign'],
|
||||
$d['fontname'],$d['fontstyle'],$d['fontsize'],
|
||||
$d['on_overflow']);
|
||||
}
|
||||
$rep->label_text($d['x'], $d['y'], $d['w'], $d['h'],
|
||||
$v, $show_box, $d['align'], $d['valign'],
|
||||
$d['fontname'],$d['fontstyle'],$d['fontsize'],
|
||||
$d['on_overflow']);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -398,6 +398,7 @@ class pdf extends TCPDF {
|
||||
function label_fair_logo($x, $y, $w, $h, $show_box)
|
||||
{
|
||||
global $config;
|
||||
global $conference;
|
||||
$img_dir = $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY'].'/data';
|
||||
/* Scale image to proportinally fit in w x h */
|
||||
$this->Image($img_dir."/".$conference['id']."-logo-500.png", $this->lMargin + $x, $this->tMargin + $y,
|
||||
|
Loading…
Reference in New Issue
Block a user