Barcode Debug
authorThomas Mudrunka <tomas@mudrunka.cz>
Sat, 15 Jun 2013 00:16:26 +0000 (02:16 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Sat, 15 Jun 2013 00:16:26 +0000 (02:16 +0200)
assistants/print-labels.inc.php

index 2200e01157fda432b4dbd09718597ddad4da9e2a..42d32ff43ea8bf1a9b84b917b6ef6e59155670ed 100644 (file)
@@ -14,6 +14,8 @@
                for($i=0;$i<$count;$i++) $barcodes.=' -b '.escapeshellarg($prefix.$i);
 
                switch(strtolower($_POST['print'])) {
+                       case 'debug': case 'dbg':
+                               break;
                        case 'pdf':
                                $convert='| ps2pdf -dCompatibility=1.2 - -';
                                header('Content-Type: application/pdf');
@@ -25,7 +27,9 @@
                                break;
                }
                error_reporting(0);
-               system("barcode -e $enctype $geometry $table $barcodes $convert");
+               $cmd="barcode -e $enctype $geometry $table $barcodes $convert";
+               if($_POST['print']=='Debug') die($cmd);
+               system($cmd);
                die();
        }
 ?>
@@ -38,6 +42,7 @@
                <tr><td><input type="number" name="left" value="2" /></td><td>Okraje</td><td><input type="number" name="right" value="1" /></td></tr>
                <tr><td></td><td><input type="number" name="bottom" value="20" /></td><td></td></tr>
        </table>
+       <input type="submit" name="print" value="Debug" />
        <input type="submit" name="print" value="PS" />
        <input type="submit" name="print" value="PDF" />
 </form>
This page took 0.335426 seconds and 4 git commands to generate.