85a7a908af3b0b77b9dded99756abc16165127f3
2 if(isset($_POST['print'])) {
3 $prefix = time().'SPOJE';
6 $count = $_POST['cols']*$_POST['rows']*$_POST['pages'];
8 $table = '-p A4 -t '.escapeshellarg(
9 $_POST['cols'].'x'.$_POST['rows'].
10 '+'.$_POST['left'].'+'.$_POST['bottom'].'-'.$_POST['right'].'-'.$_POST['top']
14 for($i=0;$i<$count;$i++
) $barcodes.=' -b '.escapeshellarg($prefix.$i);
16 switch($_POST['print']) {
18 $convert='| convert - pdf:-';
19 header('Content-Type: application/pdf');
23 header('Content-Type: application/postscript');
24 header("Content-Disposition: attachment; filename=labels.ps");
28 system("barcode -e $enctype $geometry $table $barcodes $convert");
32 <form action
="?" method
="POST">
33 <input type
="number" name
="cols" value
="3" /> Sloupců
<br
/>
34 <input type
="number" name
="rows" value
="8" /> Řádků
<br
/>
35 <input type
="number" name
="pages" value
="1" /> Stran
<br
/>
37 <tr
><td
></td
><td
><input type
="number" name
="top" value
="42" /></td
><td
></td
></tr
>
38 <tr
><td
><input type
="number" name
="left" value
="23" /></td
><td
>Okraje
</td
><td
><input type
="number" name
="right" value
="0" /></td
></tr
>
39 <tr
><td
></td
><td
><input type
="number" name
="bottom" value
="0" /></td
><td
></td
></tr
>
41 <input type
="submit" name
="print" value
="ps" />
42 <input type
="submit" name
="print" value
="pdf" />
This page took 0.452335 seconds and 4 git commands to generate.