From 810f9978a06069aa409971499d3322a90b2ed765 Mon Sep 17 00:00:00 2001 From: qo-op Date: Mon, 25 Jan 2021 10:00:31 +0100 Subject: [PATCH] random g1billet series number --- G1BILLETS.sh | 4 ++-- index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/G1BILLETS.sh b/G1BILLETS.sh index cd41587..468ce1a 100755 --- a/G1BILLETS.sh +++ b/G1BILLETS.sh @@ -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/ # # CLEANING TEMP FILES -rm -Rf /tmp/g1billet/${UNIQID} +# rm -Rf /tmp/g1billet/${UNIQID} # ALLOWS ANY USER TO DELETE chmod 777 /tmp/g1billet/${UNIQID}.pdf diff --git a/index.php b/index.php index f162a24..b0e59bf 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,6 @@ format('U'); +$timestamp = $mytime->format('U').$rand(); // CREATE 6 G1BILLETS in /tmp/g1billet/$timestamp $page = shell_exec(dirname(__FILE__)."/G1BILLETS.sh '".$_REQUEST['montant']."' '".$timestamp."'");