Hezci samolepky
authorThomas Mudrunka <tomas@mudrunka.cz>
Tue, 24 Sep 2013 11:26:57 +0000 (13:26 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Tue, 24 Sep 2013 11:26:57 +0000 (13:26 +0200)
assistants/print-labels.inc.php

index aab8eea6dce3263cb2a9312ed6821b752952bdbe..80f37eb09880f5f01e49416c4a1efd89236f7729 100644 (file)
@@ -1,6 +1,7 @@
 <?php
        if(isset($_POST['print'])) {
-               $prefix = time().'SPOJE';
+               $time = round(microtime(true)*100);
+               $prefix = 'SPOJE';
                $enctype = 'code128b';
                $geometry = '';
                $count = $_POST['cols']*$_POST['rows']*$_POST['pages'];
@@ -11,7 +12,7 @@
                );
 
                $barcodes = '';
-               for($i=0;$i<$count;$i++) $barcodes.=' -b '.escapeshellarg($prefix.$i);
+               for($i=0;$i<$count;$i++) $barcodes.=' -b '.escapeshellarg(strtoupper($prefix.base_convert($time+$i,10,36)));
 
                switch(strtolower($_POST['print'])) {
                        case 'debug': case 'dbg':
This page took 0.103621 seconds and 4 git commands to generate.