random g1billet series number

This commit is contained in:
qo-op 2021-01-25 10:00:31 +01:00
parent 6ca7930933
commit 810f9978a0
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ MONTANT="$1"
UNIQID="$2"
[[ $MONTANT == "" ]] && MONTANT="___"
[[ $UNIQID == "" ]] && UNIQID=$(date -u +%s%N | cut -b1-13)
[[ $UNIQID == "" ]] && UNIQID=$(date -u +%s%N | cut -b1-13)$RANDOM
# CREATION DE 6 BILLETS DE $MONTANT DU
NBbillets=6
@ -44,7 +44,7 @@ montage /tmp/g1billet/${UNIQID}/*.jpg -tile 2x3 -geometry 964x459 /tmp/g1billet/
# <!-- <policy domain="coder" rights="none" pattern="PDF" /> -->
# CLEANING TEMP FILES
rm -Rf /tmp/g1billet/${UNIQID}
# rm -Rf /tmp/g1billet/${UNIQID}
# ALLOWS ANY USER TO DELETE
chmod 777 /tmp/g1billet/${UNIQID}.pdf

View File

@ -1,6 +1,6 @@
<?php
$mytime = new Datetime("now");
$timestamp = $mytime->format('U');
$timestamp = $mytime->format('U').$rand();
// CREATE 6 G1BILLETS in /tmp/g1billet/$timestamp
$page = shell_exec(dirname(__FILE__)."/G1BILLETS.sh '".$_REQUEST['montant']."' '".$timestamp."'");