diff --git a/g1sms/sms_ASTROPORT.sh b/g1sms/sms_ASTROPORT.sh new file mode 100755 index 0000000..f0c3c19 --- /dev/null +++ b/g1sms/sms_ASTROPORT.sh @@ -0,0 +1,50 @@ +#!/bin/bash +################################################################################ +# Author: Fred (support@qo-op.com) +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +# This script is for inscription from a Web page (RUN by cron_MINUTE.sh) +# Web Ajax Form -> /tmp/loveland_entrance/$hashphone +################################################################################ +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +source $MY_PATH/init.sh +source $MY_PATH/functions.sh +TODAY=$(date '+%Y%m%d') + +log "__SUB:sms_ASTROPORT.sh" + +# VERIFY /tmp/loveland_entrance EXISTS and is 777 +[[ ! -d /tmp/loveland_entrance ]] && mkdir -p /tmp/loveland_entrance && chmod -R 777 /tmp/loveland_entrance + +for hashfile in $(ls /tmp/loveland_entrance/); do + PHONE=$(cat $hashfile) + PHONEHASH=$(basename -- "$hashfile") + # CHECK PHONE + if [[ ! -d /home/$YOU/.zen/g1sms_wallets/$PHONE ]]; then + # NOT THERE + sms_INIT_ACCOUNT "$PHONE" + else + # ALREADY THERE + # Get AMOUNTG1, AMOUNTLOVE, AMOUNTDU + AMOUNTG1=$(silkaj_balance $PUBKEY) + AMOUNTDU=$(bc -l <<< "scale=2; $AMOUNTG1 / $DUFACTOR") + AMOUNTLOVE=$(bc -l <<< "scale=0; $AMOUNTG1 * 100 / $DUFACTOR") + + mess="Bonjounr +Ce numéro est déjà enregistré... +Astroport Station" + + # Send response SMS + sms_SEND "$PHONE" "$mess" + + fi + +done + +[[ -d /home/$YOU/.zen/g1sms_wallets/$PHONE ]] && [[ $(whoami) == "root" ]] && chown -R $YOU /home/$YOU/.zen/g1sms_wallets/$PHONE + +log "__SUB:sms_AUTH.sh: END sms_AUTH.sh " +log "~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + +exit 0 diff --git a/www/LOVELand/img/bg-showcase-3 (copie).jpg b/www/LOVELand/img/bg-showcase-3 (copie).jpg new file mode 100644 index 0000000..914aa15 Binary files /dev/null and b/www/LOVELand/img/bg-showcase-3 (copie).jpg differ diff --git a/www/LOVELand/zen_loveland_entrance.php b/www/LOVELand/zen_loveland_entrance.php new file mode 100644 index 0000000..659d942 --- /dev/null +++ b/www/LOVELand/zen_loveland_entrance.php @@ -0,0 +1,16 @@ + + diff --git a/zen/sms_AUTH_command.sh b/zen/sms_AUTH_command.sh new file mode 100755 index 0000000..ec7d226 --- /dev/null +++ b/zen/sms_AUTH_command.sh @@ -0,0 +1,26 @@ +#!/bin/bash +######################################################################## +# Author: Fred (support@qo-op.com) +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +######################################################################## +# RECEIVE COMMAND FROM ./www/LOVELand/g1billet/zen_sms.php +# READ "Number" "Value" from FIFO /tmp/sms.commands +# CALL g1sms/sms_AUTH.sh $line +################################################################################# +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized + +# tail -fn 1 /tmp/sms.commands | while read -r line +for line in $(cat /tmp/sms.commands) +do + if [[ $line != "" ]]; then + mycmd="$MY_PATH/../g1sms/sms_AUTH.sh $line" + # RESULT writes IN /tmp/sms.commmand.result + echo "RUN: $mycmd" > /tmp/sms.commmand.result + eval "$mycmd" >> /tmp/sms.commmand.result + sleep 3 + fi +done +# ERASE FIFO +[[ -f /tmp/sms.commands ]] && echo "" > /tmp/sms.commands