- Le immagini uploadate non vengono visualizzate subito... cache... aggiungere la versione dell'immagine: vers_img

- Aggiunto il Server TESTRISO e TEST_PCB.
This commit is contained in:
Surya Paolo
2024-09-17 17:38:47 +02:00
parent dcc2a0ec08
commit 9985793fcc
39 changed files with 1259 additions and 162 deletions

View File

@@ -41,3 +41,6 @@ FTPSERVER_PWD=ftpmypwd@1A_
AUTH_NEW_SITES=123123123 AUTH_NEW_SITES=123123123
SCRIPTS_DIR=admin_scripts SCRIPTS_DIR=admin_scripts
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}] CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
MIAB_HOST=box.lamiaposta.org
MIAB_ADMIN_EMAIL=admin@lamiaposta.org
MIAB_ADMIN_PASSWORD=passpao1pabox@1A

View File

@@ -39,3 +39,5 @@ FTPSERVER_PORT=21
FTPSERVER_USER=ftpusrsrv_ FTPSERVER_USER=ftpusrsrv_
FTPSERVER_PWD=ftpmypwd@1A_ FTPSERVER_PWD=ftpmypwd@1A_
AUTH_NEW_SITES=123123123 AUTH_NEW_SITES=123123123
SCRIPTS_DIR=admin_scripts
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]

View File

@@ -11,14 +11,12 @@ AUTH_MONGODB=1
MONGODB_USER=admin MONGODB_USER=admin
MONGODB_PWD=mypwadmin@1A MONGODB_PWD=mypwadmin@1A
ENABLE_PUSHNOTIFICATION=1 ENABLE_PUSHNOTIFICATION=1
URLBASE_APP1=https://localhost
PORT_APP1=8080
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
HTTPS_LOCALHOST=true HTTPS_LOCALHOST=true
DEBUG=0 DEBUG=0
DEBUG=0
TESTING_ON=1 TESTING_ON=1
LOCALE=1 LOCALE=1
PROD=0
DELAY_SENDEMAIL=2000 DELAY_SENDEMAIL=2000
VAPI_KEY_SUBJECT=mailto:paolo@freeplanet.app VAPI_KEY_SUBJECT=mailto:paolo@freeplanet.app
PUBLIC_VAPI_KEY=BDncvMiUZmjaCG2Kr1V9N0_33hOG-AuNSbHSvL24y2dzBiUjAxKm02emx5SeJvz2IGmtRf6YqCgopeQwCwUmZw8 PUBLIC_VAPI_KEY=BDncvMiUZmjaCG2Kr1V9N0_33hOG-AuNSbHSvL24y2dzBiUjAxKm02emx5SeJvz2IGmtRf6YqCgopeQwCwUmZw8
@@ -28,7 +26,6 @@ PATH_SERVER_CRT=localhost.crt
PATH_SSL_ROOT_PEM=root.pem PATH_SSL_ROOT_PEM=root.pem
PATH_SSL_CHAIN_PEM=chain.pem PATH_SSL_CHAIN_PEM=chain.pem
GCM_API_KEY="" GCM_API_KEY=""
PROD=0
PROJECT_DESCR_MAIN='__PROJECTS' PROJECT_DESCR_MAIN='__PROJECTS'
SECRK=Askb38v23jjDFaoskBOWj92axXCQ SECRK=Askb38v23jjDFaoskBOWj92axXCQ
SECRTK=prova123prova567ASDADASDAS SECRTK=prova123prova567ASDADASDAS
@@ -39,6 +36,8 @@ FTPSERVER_PORT=21
FTPSERVER_USER=ftpusrsrv_ FTPSERVER_USER=ftpusrsrv_
FTPSERVER_PWD=ftpmypwd@1A_ FTPSERVER_PWD=ftpmypwd@1A_
AUTH_NEW_SITES=123123123 AUTH_NEW_SITES=123123123
DOMAINS=[{"hostname":"riso.app","port":"3000"}]
SCRIPTS_DIR=admin_scripts
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}] CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
MIAB_HOST=box.lamiaposta.org MIAB_HOST=box.lamiaposta.org
MIAB_ADMIN_EMAIL=admin@lamiaposta.org MIAB_ADMIN_EMAIL=admin@lamiaposta.org

View File

@@ -36,3 +36,6 @@ AUTH_NEW_SITES=B234HDSAOJ734ndcsdKWNVZZ
DOMAINS=[{"hostname":"piuchebuono.app","port":"3000"},{"hostname":"gruppomacro.app","port":"3010"}] DOMAINS=[{"hostname":"piuchebuono.app","port":"3000"},{"hostname":"gruppomacro.app","port":"3010"}]
SCRIPTS_DIR=admin_scripts SCRIPTS_DIR=admin_scripts
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}] CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
MIAB_HOST=box.lamiaposta.org
MIAB_ADMIN_EMAIL=admin@lamiaposta.org
MIAB_ADMIN_PASSWORD=passpao1pabox@1A

View File

@@ -7,7 +7,7 @@ PORT=3001
appTelegram_TEST=["17","18"] appTelegram_TEST=["17","18"]
appTelegram=["17","18"] appTelegram=["17","18"]
ENABLE_PUSHNOTIFICATION=1 ENABLE_PUSHNOTIFICATION=1
DIRECTORY_SERVER=/var/www/test.freeplanet_serverside DIRECTORY_SERVER=/var/www/nodejs_test.piuchebuono_server
SERVERDIR_WEBSITE=test.piuchebuono.app SERVERDIR_WEBSITE=test.piuchebuono.app
PORT_APP1="0" PORT_APP1="0"
DOMAIN=mongodb://localhost:32002/ DOMAIN=mongodb://localhost:32002/
@@ -32,6 +32,9 @@ SECRK=iUUb38v23jjDFaosWj92axkBOXCQ
TOKEN_LIFE=2h TOKEN_LIFE=2h
REFRESH_TOKEN_LIFE=14d REFRESH_TOKEN_LIFE=14d
AUTH_NEW_SITES=B234HDSAOJ734ndcsdKWNV AUTH_NEW_SITES=B234HDSAOJ734ndcsdKWNV
DOMAINS=[{"hostname":"test.piuchebuono.app","port":"3002"},{"hostname":"test.gruppomacro.app","port":"3012"},{"hostname":"test.abitaregliiblei.it","port":"3022"}] DOMAINS=[{"hostname":"piuchebuono.app","port":"3001"},{"hostname":"gruppomacro.app","port":"3011"}]
SCRIPTS_DIR=admin_scripts SCRIPTS_DIR=admin_scripts
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}] CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
MIAB_HOST=box.lamiaposta.org
MIAB_ADMIN_EMAIL=admin@lamiaposta.org
MIAB_ADMIN_PASSWORD=passpao1pabox@1A

View File

@@ -4,10 +4,10 @@ PDB=suerteFreePlanet@1A
SEND_EMAIL=1 SEND_EMAIL=1
PORT=3001 PORT=3001
ENABLE_PUSHNOTIFICATION=1 ENABLE_PUSHNOTIFICATION=1
DIRECTORY_SERVER=/var/www/testriso.freeplanet_serverside DIRECTORY_SERVER=/var/www/nodejs_test.riso_server
SERVERDIR_WEBSITE=test.riso.app SERVERDIR_WEBSITE=test.riso.app
PORT_APP1="0" PORT_APP1="0"
DOMAIN=mongodb://localhost:32002/ DOMAIN=mongodb://localhost:32012/
AUTH_MONGODB=1 AUTH_MONGODB=1
MONGODB_USER=admin MONGODB_USER=admin
MONGODB_PWD=mypwadmin@1A MONGODB_PWD=mypwadmin@1A
@@ -29,7 +29,7 @@ SECRK=iUUb38v23jjDFaosWj92axkBOXCQ
TOKEN_LIFE=2h TOKEN_LIFE=2h
REFRESH_TOKEN_LIFE=14d REFRESH_TOKEN_LIFE=14d
AUTH_NEW_SITES=B234HDSAOJ734ndcsdKWNV AUTH_NEW_SITES=B234HDSAOJ734ndcsdKWNV
DOMAINS=[{"hostname":"test.abitaregliiblei.it","port":"3021"}] DOMAINS=[{"hostname":"abitaregliiblei.it","port":"3021"},{"hostname":"riso.app","port":"3005"}]
SCRIPTS_DIR=admin_scripts SCRIPTS_DIR=admin_scripts
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}] CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
MIAB_HOST=box.lamiaposta.org MIAB_HOST=box.lamiaposta.org

View File

@@ -0,0 +1,78 @@
#!/bin/bash
# Definizione delle variabili
FILEZIP="exp_db_test.tar.gz"
DATABASEIN="FreePlanet"
DATABASEOUT="test_FreePlanet"
FILEMONGODBIN="export_database_$DATABASEIN"
FILEMONGODBOUT="export_database_$DATABASEOUT"
MYDOCKER="mongodbtest"
DIR_OUT="/home/test/"
BACKUP_DIR="/home/pcbuser/backups/temp/"
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
# Carica le configurazioni
source ~/batch/.my_cfg.ini
echo "Attenzione: Questo script creerà un backup del database esistente $DATABASEOUT"
echo "e lo sovrascriverà con i dati dal file $FILEZIP."
echo "Vuoi procedere? (Si/No)"
read -r risposta
if [[ ! $risposta =~ ^[Ss][iI]$ ]]; then
echo "Operazione annullata dall'utente."
exit 0
fi
echo "Inizio del processo di importazione del database"
echo "------------------------------------------------"
# Verifica l'esistenza del file .tar.gz
if [ ! -f "/home/pcbuser/$FILEZIP" ]; then
echo "ERRORE: Il file $FILEZIP non esiste nella directory /home/pcbuser/"
exit 1
fi
# Backup del database esistente
echo "Creazione di un backup del database esistente...$DATABASEOUT"
if docker exec "$MYDOCKER" mongodump --username admin --password "$PWDDB_TEST" --authenticationDatabase admin --db "$DATABASEOUT" --out "$BACKUP_DIR$DATABASEOUT_$TIMESTAMP"; then
echo "Backup del database esistente completato con successo in $BACKUP_DIR$DATABASEOUT_$TIMESTAMP"
else
echo "ERRORE: Impossibile creare il backup del database esistente $DATABASEOUT."
exit 1
fi
echo "Copiando $FILEZIP nel container $MYDOCKER..."
if docker cp "/home/pcbuser/$FILEZIP" "$MYDOCKER:$DIR_OUT"; then
echo "File copiato con successo."
else
echo "ERRORE: Impossibile copiare il file nel container."
exit 1
fi
echo "Estraendo $FILEZIP in $DIR_OUT all'interno del container..."
if docker exec "$MYDOCKER" tar -xvzf "$DIR_OUT$FILEZIP" -C "$DIR_OUT"; then
echo "Estrazione completata con successo."
else
echo "ERRORE: Impossibile estrarre il file nel container."
exit 1
fi
echo "Rinominando la directory del database da $FILEMONGODBIN a $FILEMONGODBOUT..."
if docker exec "$MYDOCKER" mv "$DIR_OUT$FILEMONGODBIN" "$DIR_OUT$FILEMONGODBOUT"; then
echo "Directory rinominata con successo."
else
echo "ERRORE: Impossibile rinominare la directory."
exit 1
fi
echo "Ripristinando il database MongoDB dal dump..."
if docker exec "$MYDOCKER" mongorestore --username admin --password "$PWDDB_TEST" --authenticationDatabase admin --nsFrom="$DATABASEIN.*" --nsTo="$DATABASEOUT.*" "$DIR_OUT$FILEMONGODBOUT"; then
echo "Database ripristinato con successo."
else
echo "ERRORE: Impossibile ripristinare il database."
exit 1
fi
echo "------------------------------------------------"
echo "Processo di importazione del database completato"

View File

@@ -0,0 +1,361 @@
db.myelems.insertMany([
{
"_id": ObjectId("669fbf9dc9d625d0628eb12f"),
"order": 20,
"active": true,
"type": 20,
"path": "home",
"container": "",
"idapp": "19",
"elemsText": [],
"listcards": [],
"list": [],
"__v": 0,
"containerHtml": "<div style=\"text-align: center;\"><b><font size=\"4\">Abitare Gli Iblei</font></b></div>",
"anim": {
"_id": ObjectId("66e456981e0719a1012121c0"),
"name": "",
"clduration": "",
"cldelay": "",
"timingtype": "ease-in-out"
}
}, {
"_id": ObjectId("669fbfc3c9d625d0628eb131"),
"order": 100,
"active": true,
"type": 145,
"path": "home",
"container": "",
"idapp": "19",
"elemsText": [],
"listcards": [],
"list": [],
"__v": 0
}, {
"_id": ObjectId("66db2a45054b3b09f85e6983"),
"order": 26,
"active": true,
"type": 35,
"path": "home",
"container": "",
"idapp": "19",
"elemsText": [],
"listcards": [],
"list": [],
"__v": 0,
"image": "logo.jpg",
"anim": {
"_id": ObjectId("66db34215740efc77547a93a"),
"name": "",
"clduration": "",
"cldelay": "",
"timingtype": "ease-in-out"
},
"widthimg": "250px",
"align": 2
}
, {
"_id": ObjectId("66db38a77e24f4509eef655b"),
"order": 26,
"active": true,
"type": 20,
"path": "home",
"container": "",
"idapp": "19",
"elemsText": [],
"listcards": [],
"list": [],
"__v": 0,
"containerHtml": "<style>\nbody {\n    font-family: Arial, sans-serif;\n    margin: 0;\n    padding: 20px;\n    background-color: #f0f0f0;\n    color: #333;\n}\n\nh1 {\n    color: #0056b3;\n    text-align: center;\n}\n\n\np, li {\n    line-height: 1.6;\n}\n\n\nul {\n    list-style-type: none;\n    padding: 0;\n}\n\n\nli {\n    background-color: #fff !important;\n    margin-bottom: 10px !important;\n    padding: 10px !important;\n    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important; \n}\n\n\na {\n    color: #007bff;\n    text-decoration: none;\n}\n\n\na:hover {\n    text-decoration: underline;\n}\n\n\n.container {\n    max-width: 800px;\n    margin: 0 auto;\n    background-color: #fff;\n    padding: 20px;\n    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n}\n\n\n.strong {\n    font-weight: bold;\n}\n</style>\n\n\n<p><strong>“Abitare gli Iblei”</strong> è una rete aperta che ha lo scopo di riunire tutte quelle persone che vogliono valorizzare e qualificare la vita nel territorio degli Iblei.&nbsp;</p>\n&nbsp; &nbsp;&nbsp;\n&nbsp; &nbsp; <p>Chi aderisce alla rete si riconosce in una <strong>Carta dei valori comuni</strong> e usa la rete per scambiare conoscenze, esperienze, risorse e prodotti sviluppati nellambito delle proprie iniziative (profit e non profit) individuali o collettive.</p>\n\n\n&nbsp; &nbsp; <p>Larea territoriale di questa rete è quella dei <strong>Monti Iblei orientali e occidentali</strong> (Noto, Avola, Canicattini, Siracusa, Palazzolo, Buccheri, Ferla, Modica, …).</p>\n\n\n&nbsp; &nbsp; <p>La rete <strong>“Abitare gli Iblei”</strong> offre i seguenti servizi utili per il territorio ed i suoi abitanti, frutto di una costruzione collettiva:</p>\n&nbsp; &nbsp;&nbsp;\n&nbsp; &nbsp; <ul>\n&nbsp; &nbsp; &nbsp; &nbsp; <li><strong>1. Mappa delle attività virtuose:</strong> permette di identificare attività pubbliche e private nel territorio che possono essere utili nella vita quotidiana. Queste attività possono riguardare artigiani, produttori o fornitori di servizi di cui almeno un membro della rete conosca la qualità e laffidabilità (agricoltori, falegnami, fabbri, idraulici, imprese edili, strutture ricettive, …). Altre informazioni utili possono riguardare associazioni/istituzioni operanti in vari settori. <strong>Accesso pubblico</strong></li>\n&nbsp; &nbsp; &nbsp; &nbsp; <li><strong>2. Calendario:</strong> permette di accedere ad annunci di eventi utili alla crescita culturale del territorio. La pubblicazione di eventi è riservata ai soli membri della rete che possono presentare iniziative anche di altri organizzatori. <strong>Accesso pubblico</strong></li>\n&nbsp; &nbsp; &nbsp; &nbsp; <li><strong>3. Scambi di servizi, prodotti e ospitalità:</strong> questa funzione è riservata ai soli membri della rete e si realizza attraverso la Rete italiana di scambi orizzontali (RISO). <strong>Accesso riservato</strong></li>\n&nbsp; &nbsp; &nbsp; &nbsp; <li><strong>4. Segnalazione di pericoli per il territorio:</strong> attraverso questa mappa è possibile segnalare incendi, immondizia abbandonata, discariche abusive, fonti di inquinamento per corsi dacqua e spiagge, presenza di inquinamento nellaria, … <strong>Accesso riservato</strong></li>\n&nbsp; &nbsp; </ul>\n&nbsp; &nbsp;&nbsp;\n&nbsp; &nbsp; <p>Se vuoi aderire alla rete puoi richiederne la registrazione utilizzando questo Link <a href=\"#\"><strong>(Pagina in Costruzione)</strong></a>.</p>\n\n",
"anim": {
"_id": ObjectId("66db393e3b885ccdfaed28d6"),
"name": "",
"clduration": "",
"cldelay": "",
"timingtype": "ease-in-out"
}
}
, {
"_id": ObjectId("66e41cff78c8d880eebfbf1c"),
"order": 32.5,
"active": true,
"type": 20,
"path": "home",
"container": "",
"idapp": "19",
"elemsText": [],
"listcards": [],
"list": [],
"__v": 0,
"containerHtml": "ORAAAA",
"anim": {
"_id": ObjectId("66e459421e0719a1012123ad"),
"name": "",
"clduration": "",
"cldelay": "",
"timingtype": "ease-in-out"
}
}
,
{
"_id": ObjectId("66e4270d78c8d880eebfbf24"),
"order": 40,
"active": true,
"type": 20,
"path": "home",
"container": "",
"idapp": "19",
"elemsText": [],
"listcards": [],
"list": [],
"__v": 0,
"containerHtml": "BBB",
"anim": {
"_id": ObjectId("66e4568d1e0719a1012121a6"),
"name": "",
"clduration": "",
"cldelay": "",
"timingtype": "ease-in-out"
}
}, {
"_id": ObjectId("66e45b0c78c8d880eebfbf45"),
"order": 70,
"active": true,
"type": 20,
"path": "home",
"container": "",
"idapp": "19",
"elemsText": [],
"listcards": [],
"list": [],
"__v": 0,
"containerHtml": "AAAA"
}]);
db.sites.insert(
/* 1 */
{
"_id": ObjectId("669fbef7fc704b8912263af9"),
"confpages": {
"font": "",
"col_toolbar": "",
"col_bgfooter": "",
"show_darkopt": false,
"showButtHome": true,
"showProfile": false,
"showUserMenu": true,
"showiscrittiMenu": true,
"showRegButton": true,
"enableReg": false,
"showNL": false,
"sendNewsletter": true,
"showMsgs": false,
"showNotif": true,
"showCoins": false,
"showRIS": false,
"showMenuCoins": false,
"showNameSurname": true,
"showCompetenze": true,
"showConnected": false,
"bookingEvents": false,
"enableEcommerce": false,
"enableAI": false,
"enableGroups": true,
"enableCircuits": false,
"enableProj": false,
"enableTodos": false,
"enableRegByBot": false,
"enableRegMultiChoice": false,
"enableTokenExpired": true,
"enableDebugOn": false,
"enabledRegNeedTelegram": false,
"showViewEventi": false,
"showViewGroups": false,
"showViewCircuits": false,
"showViewUsers": false,
"showViewBooking": false,
"showViewProfile": true,
"showViewCart": false,
"showViewOrders": false,
"enablePwa": true,
"lang": 0,
"videoPromo": "",
"PDFPromo": ""
},
"confsite": {
"options": 64
},
"policy": {
"show": false
},
"contacts": {
"facebook": "",
"instagram": "",
"whatsapp": "",
"whatsapp_home": false,
"telegram": "",
"youtube": "",
"email": "",
"address": "",
"map": "",
"info2": "",
"cell": ""
},
"ecomm": {
"enablePreOrders": false,
"NoteExtraOnCart": ""
},
"name": "Abitare Gli Iblei",
"host": "https://abitaregliiblei.it",
"active": true,
"idapp": "19",
"adminemail": "surya@riso.app",
"__v": 0,
"dir": "/Users/suryapaolo/myproject/newfreeplanet/",
"dir_test": "/Users/suryapaolo/myproject/newfreeplanet/",
"host_test": "https://test.abitaregliiblei.it",
"host_ip": "65.108.222.97",
"host_api_ip": "65.108.222.97",
"host_api": "https://api.abitaregliiblei.it",
"host_testapi": "https://testapi.abitaregliiblei.it",
"host_testapi_ip": "65.108.222.97",
"host_test_ip": "65.108.222.97",
"cf_token": "M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0",
"cf_zoneId": "cd7447660fcc6534ca7ce4c135df1e54",
"enable_servermail_this_domain": "true",
"servermail": "box.lamiaposta.org",
"servermailip": "65.21.63.147",
"enable_servermail": true,
"dkim": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv++u/ysGgAGfOaSCLmNkfnczedXXDRdJUi+M+gZTVk7XfGZLlLWh00xXgOIj1lU4jRgFnQx39SSbsS9foPLMrCXnPcSnPPCUpDbmkKtGlWPZDncOUGIZVpNpFMOBul+p+SckUW7gomayV1dluFw72oNLlc/Y0CVWT5Le0OL66FG7D0",
"manageremail": "reg@abitaregliiblei.it",
"idMyGroup": "AbitareGliIblei"
}
)
db.users.insert(
{
"_id": ObjectId("669fbef7c9d625d0628eb12d"),
"profile": {
"paymenttypes": [],
"notif_idCities": [],
"notif_provinces": [],
"notif_regions": [],
"notif_sectors": [],
"notif_sector_goods": [],
"img": "",
"nationality": "",
"intcode_cell": "",
"cell": "",
"dateofbirth": null,
"sex": 0,
"country_pay": "",
"email_paypal": "",
"payeer_id": "",
"advcash_id": "",
"revolut": "",
"link_payment": "",
"note_payment": "",
"username_telegram": "",
"teleg_id": 0,
"teleg_checkcode": 0,
"my_dream": "",
"manage_telegram": false,
"admin_telegram": false,
"saw_zoom_presentation": false,
"ask_zoom_partecipato": false,
"saw_and_accepted": 0,
"socio": false,
"socioresidente": false,
"qualified": false,
"qualified_2invitati": false,
"myshares": [],
"friends": [],
"req_friends": [],
"handshake": [],
"mygroups": [],
"mycircuits": [],
"last_circuitpath": "",
"notifs": [
{
"dir": 1,
"value": 88
},
{
"dir": 2,
"value": 4
},
{
"dir": 3,
"value": 1
},
{
"dir": 4,
"value": 1
},
{
"dir": 5,
"value": 1
},
{
"dir": 11,
"value": 1
},
{
"dir": 12,
"value": 1
}
],
"stepTutorial": 0,
"noNameSurname": false,
"noCircuit": false,
"noCircIta": false,
"noFoto": false,
"resid_province": "",
"resid_card": "",
"seen": [],
"bookmark": [],
"favorite": [],
"attend": [],
"version": 10060
},
"ipaddr": "::1",
"linkreg": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZGFwcCI6IjE5IiwiZW1haWwiOiJ2aW5jZW56b2Zhenppbm81OEBnbWFpbC5jb20iLCJ1c2VybmFtZSI6IkVuem8iLCJpYXQiOjE3MjY0MTM2NTh9.YlgziPXK2ZeWe_buExvHnelMMc",
"lasttimeonline": ISODate("2024-09-15T20:09:41.378Z"),
"date_reg": ISODate("2024-09-15T15:20:58.743Z"),
"aportador_iniziale": "------",
"idMyGroup": "abitaregliiblei",
"useragent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
"email": "surya@riso.app",
"username": "admin",
"password": "$2a$12$Dr58jMRtbt6Y3y6MYFopCO07hBo20TlmdzJW.lVvRIhNy7yFFizT2",
"name": "admin",
"index": 1,
"surname": "",
"lang": "it",
"verified_email": true,
"verified_by_aportador": true,
"perm": 3,
"retry_pwd": 0,
"deleted": false,
"lang": "it",
"aportador_solidario": "------",
"tokens": [
{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNmZiNWFhYzk1YTg0ZmQwZTExODgxIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoiRW56byIsImlhdCI6MTcyNjQxNDA2NSwiZXhwIjoxNzI3NjIzNjY1fQ.6QaBaiE1pv7mDy7S8YUReqH8m0CCK7jTmd57eGHgnzE",
"_id": ObjectId("66e6fcf1ac95a84fd0e11b2c"),
"access": "auth",
"browser": "Mozilla/5.0 (Linux; Android 11; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.127 Mobile Safari/537.36",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNmZiNWFhYzk1YTg0ZmQwZTExODgxIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoiRW56byIsImlhdCI6MTcyNjQxNDA2NSwiZXhwIjoxNzI2NDIxMjY1fQ.wCZcQ5uSQXnVgS_ZGyzjl6TOQk8rflfe2HSxSku0Aj4",
"date_login": ISODate("2024-09-15T15:27:45.368Z")
},
{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNmZiNWFhYzk1YTg0ZmQwZTExODgxIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoiRW56byIsImlhdCI6MTcyNjQzMDk4MCwiZXhwIjoxNzI3NjQwNTgwfQ.YdB5unWwaZ21kk87RRPolLGiWxf7bKX0piKd-bGQifU",
"_id": ObjectId("66e73f04ac95a84fd0e122ae"),
"access": "auth",
"browser": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNmZiNWFhYzk1YTg0ZmQwZTExODgxIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoiRW56byIsImlhdCI6MTcyNjQzMDk4MCwiZXhwIjoxNzI2NDM4MTgwfQ.TMF1UNbgw-EpGVWWDNnY3wRdLYOyp5HzAQiakpyaL_4",
"date_login": ISODate("2024-09-15T20:09:40.212Z")
}
],
});

View File

@@ -0,0 +1,92 @@
db.attivitas.insertMany([
{
"_id": "66db5bd1c76639f8b2c67e55",
"coordinate_gps": {
"address": "Via Roma, Gaggio Montano, Unione dell'Appennino Bolognese, Bologna, Emilia-Romagna, 40041, Italia",
"type": "Point",
"coordinates": [
10.953268,
44.190335
]
},
"idSkill": 0,
"idCity": [
744
],
"userId": "66db21115281b23462d496d2",
"idapp": "19",
"descr": "Esempio di Attività",
"idSector": 2,
"note": "Descrizione dell'attività",
"tipodiAttivita": 2,
"createdBy": "paoloar77",
"date_updated": ISODate("2024-09-06T19:45:21.527Z"),
"photos": [],
"date_created": ISODate("2024-09-06T19:45:21.530Z"),
"__v": 0,
"numattend": 0,
"numbook": 0,
"numfav": 0,
"numseen": 2
},
{
"_id": "66e2ec7c475c299010b76fe7",
"coordinate_gps": {
"address": "14, Corso Vittorio Emanuele, Noto, Siracusa, Sicilia, 96017, Italia",
"type": "Point",
"coordinates": [
15.070645,
36.890886
]
},
"idSkill": 0,
"idCity": [
6908
],
"userId": "66e2ead3ee075227efd521ad",
"idapp": "19",
"tipodiAttivita": 1,
"descr": "Esempio 2",
"idSector": 2,
"note": "Descrizione dell'Attività....",
"createdBy": "Paolo7",
"date_updated": ISODate("2024-09-12T13:28:28.593Z"),
"photos": [],
"date_created": ISODate("2024-09-12T13:28:28.597Z"),
"__v": 0,
"numattend": 0,
"numbook": 0,
"numfav": 0,
"numseen": 2
},
{
"_id": "66e31772d0acc6ce435a868b",
"coordinate_gps": {
"address": "Via Roma, Anzio, Anzio Colonia, Anzio, Roma, Lazio, 00042, Italia",
"type": "Point",
"coordinates": [
12.626422,
41.448654
]
},
"idSkill": 1,
"idCity": [
5903
],
"userId": "66db21115281b23462d496d2",
"idapp": "19",
"descr": "prova3",
"tipodiAttivita": 1,
"idSector": 1,
"note": "asdasd",
"createdBy": "paoloar77",
"date_updated": ISODate("2024-09-12T16:31:46.361Z"),
"photos": [],
"date_created": ISODate("2024-09-12T16:31:46.364Z"),
"__v": 0,
"numattend": 0,
"numbook": 0,
"numfav": 0,
"numseen": 1
}
]);

View File

@@ -0,0 +1,36 @@
db.mygroups.insert(
{
"_id": "66e2e6273eff2ca4e7b2ef92",
"idCity": [
6908,
5634
],
"note": "Descrizione...",
"visibility": [
0
],
"deleted": false,
"groupname": "abitaregliiblei",
"photos": [],
"admins": [
{
"_id": ObjectId("66e2e6276b502b07f1e89571"),
"username": "paoloar77"
}
],
"req_users": [],
"blocked": false,
"website": "",
"link_telegram": "",
"userId": "66db21115281b23462d496d2",
"idapp": "19",
"title": "Abitare Gli Iblei",
"descr": "Abitare Gli Iblei",
"idCatGrp": 14,
"createdBy": "paoloar77",
"date_updated": ISODate("2024-09-12T13:01:27.954Z"),
"refused_users": [],
"mycircuits": [],
"date_created": ISODate("2024-09-12T13:01:27.960Z"),
"__v": 0
});

View File

@@ -0,0 +1,27 @@
db.mypages.insertMany([
{
"_id": ObjectId("66db21118009ea4503bb6a01"),
"order": 10,
"idapp": "19",
"path": "home",
"active": true,
"title": "Home",
},
{
"_id": ObjectId("66db21118009ea4503bb6a03"),
"order": 10,
"idapp": "19",
"path": "home_logout",
"active": true,
"title": "Home NoLoggato",
},
{
"_id": ObjectId("66e322dd5a6360e3b3c71c5a"),
"order": 40,
"idapp": "19",
"path": "presentazione",
"active": true,
"title": "Presentazione",
"inmenu": true,
"icon": "fas fa-info"
}]);

View File

@@ -0,0 +1,334 @@
db.users.insertMany([
{
"_id": ObjectId("66db21115281b23462d496d2"),
"profile": {
"paymenttypes": [],
"notif_idCities": [],
"notif_provinces": [],
"notif_regions": [],
"notif_sectors": [],
"notif_sector_goods": [],
"myshares": [],
"friends": [],
"req_friends": [],
"handshake": [],
"mygroups": [
{
"groupname": "abitaregliiblei",
"date": ISODate("2024-09-12T13:01:27.975Z")
}
],
"mycircuits": [],
"notifs": [
{
"dir": 1,
"value": 88
},
{
"dir": 2,
"value": 4
},
{
"dir": 3,
"value": 1
},
{
"dir": 4,
"value": 1
},
{
"dir": 5,
"value": 1
},
{
"dir": 11,
"value": 1
},
{
"dir": 12,
"value": 1
}
],
"seen": [],
"bookmark": [],
"favorite": [],
"attend": [],
"special_req": true,
"nationality": "IT",
"manage_telegram": true,
"admin_telegram": true,
"teleg_id": 12429864,
"username_telegram": "surya1977",
"version": 10060
},
"retry_pwd": 0,
"deleted": false,
"tokens": [
{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZkYjIxMTE1MjgxYjIzNDYyZDQ5NmQyIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoicGFvbG9hcjc3IiwiaWF0IjoxNzI2NTEyODY1LCJleHAiOjE3Mjc3MjI0NjV9.EOvF89kswT1eqVJCSwVMMI-jB4kokP-aQVhi7xSUods",
"_id": ObjectId("66e87ee1bbe2ce0f77adf6b8"),
"access": "auth",
"browser": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZkYjIxMTE1MjgxYjIzNDYyZDQ5NmQyIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoicGFvbG9hcjc3IiwiaWF0IjoxNzI2NTEyODY1LCJleHAiOjE3MjY1MjAwNjV9.ESvyTWmXhfAQ0i-wwjxZR1A1Y5Bwixb60uG_UcOPQ5Y",
"date_login": ISODate("2024-09-16T18:54:25.147Z")
}
],
"idapp": "19",
"email": "paolo@riso.app",
"username": "paoloar77",
"password": "$2a$12$rhq.rkdMWP4cE1MOweztiOPeAmwHYVCW9q5vyH4LVGelEssUFRl8C",
"name": "paoloar77",
"index": 1,
"surname": "",
"lang": "it",
"verified_email": true,
"verified_by_aportador": true,
"perm": 3,
"lasttimeonline": ISODate("2024-09-16T18:55:22.278Z"),
"date_reg": ISODate("2024-09-06T15:34:41.673Z"),
"__v": 13,
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
},
{
"_id": ObjectId("66e49515d18d313a144ead56"),
"profile": {
"paymenttypes": [],
"notif_idCities": [],
"notif_provinces": [],
"notif_regions": [],
"notif_sectors": [],
"notif_sector_goods": [],
"img": "",
"nationality": "",
"intcode_cell": "",
"cell": "",
"dateofbirth": null,
"sex": 0,
"country_pay": "",
"email_paypal": "",
"payeer_id": "",
"advcash_id": "",
"revolut": "",
"link_payment": "",
"note_payment": "",
"username_telegram": "",
"teleg_id": 0,
"teleg_checkcode": 0,
"my_dream": "",
"manage_telegram": false,
"admin_telegram": false,
"saw_zoom_presentation": false,
"ask_zoom_partecipato": false,
"saw_and_accepted": 0,
"socio": false,
"socioresidente": false,
"qualified": false,
"qualified_2invitati": false,
"myshares": [],
"friends": [],
"req_friends": [],
"handshake": [],
"mygroups": [],
"mycircuits": [],
"last_circuitpath": "",
"notifs": [
{
"dir": 1,
"value": 88
},
{
"dir": 2,
"value": 4
},
{
"dir": 3,
"value": 1
},
{
"dir": 4,
"value": 1
},
{
"dir": 5,
"value": 1
},
{
"dir": 11,
"value": 1
},
{
"dir": 12,
"value": 1
}
],
"stepTutorial": 0,
"noNameSurname": false,
"noCircuit": false,
"noCircIta": false,
"noFoto": false,
"resid_province": "",
"resid_card": "",
"seen": [],
"bookmark": [],
"favorite": [],
"attend": [],
"version": 10060
},
"retry_pwd": 0,
"deleted": false,
"email": "paolo@freeplanet.app",
"password": "$2a$12$qX5DRHDm9BW/ZTgPvTmP/u7VdaEd5ybfFAmEfqEK2VUAhQGt6DFcO",
"username": "paolotest",
"name": "Paolo",
"surname": "Test",
"idapp": "19",
"lang": "it",
"aportador_solidario": "------",
"tokens": [
{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNDk1MTVkMThkMzEzYTE0NGVhZDU2IiwiYWNjZXNzIjoiYXV0aCIsInVuIjoicGFvbG90ZXN0IiwiaWF0IjoxNzI2MzQ3MzE1LCJleHAiOjE3Mjc1NTY5MTV9.NHnFUXOL0MbjRs9F6HrQsEBRGXG89AsBYP7jU9m8icY",
"_id": ObjectId("66e5f83392c9540e18f89730"),
"access": "auth",
"browser": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNDk1MTVkMThkMzEzYTE0NGVhZDU2IiwiYWNjZXNzIjoiYXV0aCIsInVuIjoicGFvbG90ZXN0IiwiaWF0IjoxNzI2MzQ3MzE1LCJleHAiOjE3MjYzNTQ1MTV9.HTr1kNMhBU_38R2Tfy6m22XCbiRh5IsBKC3fl0ipIgM",
"date_login": ISODate("2024-09-14T20:55:15.500Z")
}
],
"ipaddr": "::1",
"linkreg": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZGFwcCI6IjE5IiwiZW1haWwiOiJwYW9sb0BmcmVlcGxhbmV0LmFwcCIsInVzZXJuYW1lIjoicGFvbG90ZXN0IiwiaWF0IjoxNzI2MjU2NDA1fQ.SoIGdtkoBwJvUtfWdDLpY__cdtkq",
"verified_email": true,
"lasttimeonline": ISODate("2024-09-14T20:55:15.502Z"),
"date_reg": ISODate("2024-09-13T19:40:05.188Z"),
"aportador_iniziale": "------",
"verified_by_aportador": true,
"idMyGroup": "abitaregliiblei",
"index": 2,
"__v": 3,
"perm": 16
},
{
"_id": ObjectId("66e6fb5aac95a84fd0e11881"),
"profile": {
"paymenttypes": [],
"notif_idCities": [],
"notif_provinces": [],
"notif_regions": [],
"notif_sectors": [],
"notif_sector_goods": [],
"img": "",
"nationality": "",
"intcode_cell": "",
"cell": "",
"dateofbirth": null,
"sex": 0,
"country_pay": "",
"email_paypal": "",
"payeer_id": "",
"advcash_id": "",
"revolut": "",
"link_payment": "",
"note_payment": "",
"username_telegram": "",
"teleg_id": 0,
"teleg_checkcode": 0,
"my_dream": "",
"manage_telegram": false,
"admin_telegram": false,
"saw_zoom_presentation": false,
"ask_zoom_partecipato": false,
"saw_and_accepted": 0,
"socio": false,
"socioresidente": false,
"qualified": false,
"qualified_2invitati": false,
"myshares": [],
"friends": [],
"req_friends": [],
"handshake": [],
"mygroups": [],
"mycircuits": [],
"last_circuitpath": "",
"notifs": [
{
"dir": 1,
"value": 88
},
{
"dir": 2,
"value": 4
},
{
"dir": 3,
"value": 1
},
{
"dir": 4,
"value": 1
},
{
"dir": 5,
"value": 1
},
{
"dir": 11,
"value": 1
},
{
"dir": 12,
"value": 1
}
],
"stepTutorial": 0,
"noNameSurname": false,
"noCircuit": false,
"noCircIta": false,
"noFoto": false,
"resid_province": "",
"resid_card": "",
"seen": [],
"bookmark": [],
"favorite": [],
"attend": [],
"version": 10060
},
"retry_pwd": 0,
"deleted": false,
"email": "vincenzofazzino58@gmail.com",
"password": "$2a$12$z7Xg8QUmTsp8Jcj4SpoCsOVUsj5H7aLiKWS.IP2c/OkApnCUhARzK",
"username": "Enzo",
"name": "Enzo",
"surname": "Fazzino",
"idapp": "19",
"lang": "it",
"aportador_solidario": "------",
"tokens": [
{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNmZiNWFhYzk1YTg0ZmQwZTExODgxIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoiRW56byIsImlhdCI6MTcyNjQxNDA2NSwiZXhwIjoxNzI3NjIzNjY1fQ.6QaBaiE1pv7mDy7S8YUReqH8m0CCK7jTmd57eGHgnzE",
"_id": ObjectId("66e6fcf1ac95a84fd0e11b2c"),
"access": "auth",
"browser": "Mozilla/5.0 (Linux; Android 11; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.127 Mobile Safari/537.36",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNmZiNWFhYzk1YTg0ZmQwZTExODgxIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoiRW56byIsImlhdCI6MTcyNjQxNDA2NSwiZXhwIjoxNzI2NDIxMjY1fQ.wCZcQ5uSQXnVgS_ZGyzjl6TOQk8rflfe2HSxSku0Aj4",
"date_login": ISODate("2024-09-15T15:27:45.368Z")
},
{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNmZiNWFhYzk1YTg0ZmQwZTExODgxIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoiRW56byIsImlhdCI6MTcyNjQzMDk4MCwiZXhwIjoxNzI3NjQwNTgwfQ.YdB5unWwaZ21kk87RRPolLGiWxf7bKX0piKd-bGQifU",
"_id": ObjectId("66e73f04ac95a84fd0e122ae"),
"access": "auth",
"browser": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJQUk9WQU1TR0AxQSIsInNtYXJ0IjoiNjZlNmZiNWFhYzk1YTg0ZmQwZTExODgxIiwiYWNjZXNzIjoiYXV0aCIsInVuIjoiRW56byIsImlhdCI6MTcyNjQzMDk4MCwiZXhwIjoxNzI2NDM4MTgwfQ.TMF1UNbgw-EpGVWWDNnY3wRdLYOyp5HzAQiakpyaL_4",
"date_login": ISODate("2024-09-15T20:09:40.212Z")
}
],
"ipaddr": "::1",
"linkreg": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZGFwcCI6IjE5IiwiZW1haWwiOiJ2aW5jZW56b2Zhenppbm81OEBnbWFpbC5jb20iLCJ1c2VybmFtZSI6IkVuem8iLCJpYXQiOjE3MjY0MTM2NTh9.YlgziPXK2ZeWe_buExvHnelMMc",
"verified_email": true,
"lasttimeonline": ISODate("2024-09-15T20:09:41.378Z"),
"date_reg": ISODate("2024-09-15T15:20:58.743Z"),
"aportador_iniziale": "------",
"verified_by_aportador": true,
"idMyGroup": "abitaregliiblei",
"index": 3,
"__v": 5,
"useragent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36"
}
]);

View File

@@ -20,6 +20,7 @@ SYNC_ITEMS=(
"docs" "docs"
"emails" "emails"
"plugins" "plugins"
"admin_scripts"
"sass" "sass"
"src" "src"
) )

View File

@@ -2,18 +2,63 @@
source ./.env.test.pcb source ./.env.test.pcb
echo "Sincronizzazione in corso PCB TEST ... /var/www/$DIRECTORY_SERVER/" echo "Sincronizzazione in corso PCB TEST ... $DIRECTORY_SERVER/"
echo "" echo ""
rsync -avz -e 'ssh -p 8822' css pcbuser@pcb:/var/www/$DIRECTORY_SERVER/ #!/bin/bash
rsync -avz -e 'ssh -p 8822' docs pcbuser@pcb:/var/www/$DIRECTORY_SERVER/
rsync -avz -e 'ssh -p 8822' emails pcbuser@pcb:/var/www/$DIRECTORY_SERVER/ # Configurazione
rsync -avz -e 'ssh -p 8822' images pcbuser@pcb:/var/www/$DIRECTORY_SERVER/ REMOTE_USER="pcbuser"
rsync -avz -e 'ssh -p 8822' plugins pcbuser@pcb:/var/www/$DIRECTORY_SERVER/ REMOTE_HOST="pcb"
rsync -avz -e 'ssh -p 8822' sass pcbuser@pcb:/var/www/$DIRECTORY_SERVER/ REMOTE_PORT="8822"
rsync -avz -e 'ssh -p 8822' src pcbuser@pcb:/var/www/$DIRECTORY_SERVER/ REMOTE_DIR="$DIRECTORY_SERVER"
rsync -avz -e 'ssh -p 8822' .env.test.pcb pcbuser@pcb:/var/www/$DIRECTORY_SERVER/.env.test SSH_OPTIONS="-p $REMOTE_PORT"
rsync -avz -e 'ssh -p 8822' .env.test.pcb pcbuser@pcb:/var/www/$DIRECTORY_SERVER/
rsync -avz -e 'ssh -p 8822' package.json pcbuser@pcb:/var/www/$DIRECTORY_SERVER/package.json # Array di cartelle e file da sincronizzare
SYNC_ITEMS=(
"css"
"docs"
"emails"
"plugins"
"admin_scripts"
"sass"
"src"
)
echo $REMOTE_DIR
echo ""
echo "*** Copia Cartelle ... "
# Esegui rsync per le cartelle
rsync -avz --delete \
--exclude='src/server/router/upload/' \
-e "ssh $SSH_OPTIONS" \
"${SYNC_ITEMS[@]}" \
"$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/"
echo ""
echo "*** Copia del file .env.test ... "
# Sincronizza i file specifici
rsync -avz -e "ssh $SSH_OPTIONS" \
.env.test.pcb "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/.env.test"
echo ""
echo "*** Copia del file package.json ... "
rsync -avz -e "ssh $SSH_OPTIONS" \
package.json "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/package.json"
echo ""
echo "*** Copia del file ecosystem.config.testpcb.js in ecosystem.config.js ... "
rsync -avz -e "ssh $SSH_OPTIONS" \
ecosystem.config.testpcb.js "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/ecosystem.config.js"
# Verifica il risultato
if [ $? -eq 0 ]; then
echo "Sincronizzazione completata con successo. SERVER PCB TEST! "
else
echo "Errore durante la sincronizzazione. Controlla l'output per i dettagli."
fi
echo "Sincronizzazione TERMINATA! - SERVER PCB!"

View File

@@ -0,0 +1,4 @@
Define MIODOMINIO piuchebuono.app
Define MIODOMINIO_COMPLETO piuchebuono.app
Define MIOURL_API api.piuchebuono.app
Define PORTA 3000

View File

@@ -1,4 +1,4 @@
Define MIODOMINIO abitaregliiblei.it Define MIODOMINIO abitaregliiblei.it
Define MIODOMINIO_COMPLETO test.abitaregliiblei.it Define MIODOMINIO_COMPLETO test.abitaregliiblei.it
Define MIOURL_TESTAPI testapi.abitaregliiblei.it Define MIOURL_API testapi.abitaregliiblei.it
Define PORTA 3022 Define PORTA 3021

View File

@@ -0,0 +1,4 @@
Define MIODOMINIO riso.app
Define MIODOMINIO_COMPLETO test.riso.app
Define MIOURL_API testapi.riso.app
Define PORTA 3005

View File

@@ -0,0 +1,3 @@
Include /etc/apache2/sites-available/dominioinclude_piuchebuono.app.conf
Include /etc/apache2/sites-available/nodejs_virtualhost_ssl_http_https.conf

View File

@@ -1,14 +1,11 @@
Include /etc/apache2/sites-available/dominioinclude_test.abitaregliiblei.it.conf
# Configurazione per HTTP # Configurazione per HTTP
<VirtualHost 65.108.222.97:80> <VirtualHost 65.108.222.97:80>
ServerName ${MIODOMINIO_COMPLETO} ServerName ${MIOURL_API}
DocumentRoot /var/www/${MIODOMINIO_COMPLETO}
RewriteEngine on RewriteEngine on
# Redirigi tutto il traffico HTTP verso HTTPS # Redirigi tutto il traffico HTTP verso HTTPS
RewriteCond %{SERVER_NAME} =${MIODOMINIO_COMPLETO} [OR] RewriteCond %{SERVER_NAME} =${MIOURL_API} [OR]
RewriteCond %{SERVER_NAME} =www.${MIODOMINIO_COMPLETO} RewriteCond %{SERVER_NAME} =www.${MIOURL_API}
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
ErrorLog /var/www/${MIODOMINIO_COMPLETO}/logs/error.log ErrorLog /var/www/${MIODOMINIO_COMPLETO}/logs/error.log
@@ -16,8 +13,7 @@ Include /etc/apache2/sites-available/dominioinclude_test.abitaregliiblei.it.conf
</VirtualHost> </VirtualHost>
<VirtualHost 65.108.222.97:443> <VirtualHost 65.108.222.97:443>
ServerName ${MIOURL_API}
ServerName ${MIOURL_TESTAPI}
ServerAdmin surya@riso.app ServerAdmin surya@riso.app
SSLEngine On SSLEngine On
@@ -39,7 +35,7 @@ Include /etc/apache2/sites-available/dominioinclude_test.abitaregliiblei.it.conf
ProxyTimeout 5 ProxyTimeout 5
LogLevel debug proxy:trace5 LogLevel warn
ErrorLog /var/www/${MIODOMINIO_COMPLETO}/logs/error.log ErrorLog /var/www/${MIODOMINIO_COMPLETO}/logs/error.log
CustomLog /var/www/${MIODOMINIO_COMPLETO}/logs/access.log combined CustomLog /var/www/${MIODOMINIO_COMPLETO}/logs/access.log combined

View File

@@ -0,0 +1,3 @@
Include /etc/apache2/sites-available/dominioinclude_piuchebuono.app.conf
Include /etc/apache2/sites-available/websites_ssl_virtualhost.conf

View File

@@ -0,0 +1,3 @@
Include /etc/apache2/sites-available/dominioinclude_test.abitaregliiblei.it.conf
Include /etc/apache2/sites-available/websites_ssl_virtualhost.conf

View File

@@ -0,0 +1,30 @@
<VirtualHost 65.108.222.97:80>
ServerName ${MIODOMINIO_COMPLETO}
RewriteEngine On
# Forza la connessione HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^ https://${MIODOMINIO_COMPLETO}%{REQUEST_URI} [L,R=301]
</VirtualHost>
<VirtualHost 65.108.222.97:443>
ServerName ${MIODOMINIO_COMPLETO}
DocumentRoot /var/www/${MIODOMINIO_COMPLETO}
ServerAdmin surya@riso.app
SSLEngine On
SSLProtocol -ALL +TLSv1.2
SSLCompression Off
SSLHonorCipherOrder off
SSLCipherSuite ECDH+AESGCM:ECDH+AES256:!aNULL:!MD5:!DSS:!DH:!AES128
SSLVerifyDepth 10
SSLCertificateFile /etc/letsencrypt/live/${MIODOMINIO}/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/${MIODOMINIO}/privkey.pem
<Directory /var/www/${MIODOMINIO_COMPLETO}/>
CGIPassAuth On
Require all granted
AllowOverride All
</Directory>
LogLevel warn
ErrorLog "/var/www/${MIODOMINIO_COMPLETO}/logs/error.log"
CustomLog "/var/www/${MIODOMINIO_COMPLETO}/logs/access.log" combined
</VirtualHost>

View File

@@ -1,23 +0,0 @@
<VirtualHost 65.108.222.97:443>
ServerName api.gruppomacro.app
ServerAdmin surya@riso.app
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/gruppomacro.app/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/gruppomacro.app/privkey.pem
ProxyPass / https://localhost:3010/ retry=0 timeout=5 connectiontimeout=2
ProxyPassReverse / https://localhost:3010/
ProxyTimeout 5
LogLevel debug proxy:trace5
ErrorLog "/var/customers/logs/paolouser-error.log"
CustomLog "/var/customers/logs/paolouser-access.log" combined
<Location />
ProxyPassReverse /
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</Location>
</VirtualHost>

View File

@@ -1,34 +0,0 @@
<VirtualHost 89.36.222.238:443>
ServerName api.riso.app
ServerAlias www.api.riso.app
ServerAdmin surya@riso.app
SSLEngine On
SSLProtocol -ALL +TLSv1.2 +TLSv1.3
SSLCompression Off
SSLHonorCipherOrder off
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:E>
SSLVerifyDepth 10
SSLCertificateFile /etc/letsencrypt/live/riso.app/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/riso.app/privkey.pem
ProxyPreserveHost On
SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
ProxyPass / https://localhost:3005/ retry=0 timeout=5 connectiontimeout=2
ProxyPassReverse / https://localhost:3005/
ProxyTimeout 5
LogLevel debug proxy:trace5
ErrorLog "/var/www/riso.app/logs/error.log"
CustomLog "/var/www/riso.app/logs/access.log" combined
<Location />
ProxyPassReverse /
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</Location>
</VirtualHost>

View File

@@ -1,22 +0,0 @@
<VirtualHost 65.108.222.97:443>
ServerName piuchebuono.app
ServerAlias *.piuchebuono.app
ServerAdmin surya@riso.app
SSLEngine On
SSLProtocol -ALL +TLSv1.2
SSLCompression Off
SSLHonorCipherOrder off
SSLCipherSuite ECDH+AESGCM:ECDH+AES256:!aNULL:!MD5:!DSS:!DH:!AES128
SSLVerifyDepth 10
SSLCertificateFile /etc/letsencrypt/live/piuchebuono.app/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/piuchebuono.app/privkey.pem
DocumentRoot "/var/customers/webs/paolouser/piuchebuono.app"
<Directory "/var/customers/webs/paolouser/piuchebuono.app/">
CGIPassAuth On
Require all granted
AllowOverride All
</Directory>
LogLevel warn
ErrorLog "/var/customers/logs/paolouser-error.log"
CustomLog "/var/customers/logs/paolouser-access.log" combined
</VirtualHost>

View File

@@ -0,0 +1,24 @@
docker exec -it gitlab /bin/bash
apt-get update
apt-get install nano
nano /etc/gitlab/gitlab.rb
gitlab_rails['smtp_address'] = "smtp.example.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "tuo_username"
gitlab_rails['smtp_password'] = "tuo_password"
gitlab_rails['smtp_domain'] = "example.com"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
gitlab_rails['smtp_address'] = "box.lamiaposta.org"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "gitlab@riso.app"
gitlab_rails['smtp_password'] = "MYPRISO_1290_1977@!"
gitlab_rails['smtp_domain'] = "lamiaposta.org"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true

22
ecosystem.config.testpcb.js Executable file
View File

@@ -0,0 +1,22 @@
module.exports = {
apps: [
{
name: "TEST PiuCheBuono_ServerSide",
script: "/var/www/nodejs_test.piuchebuono_server/src/server/server.js",
ignore_watch: ["node_modules", "logs"],
interpreter: "/root/.nvm/versions/node/v16.19.0/bin/node",
//autorestart: true,
instances: 1,
watch: false,
env: {
"PORT": 0,
"NODE_ENV": "test"
},
log_file: "logs/combined.test.outerr.log",
error_file: "logs/errtest.log",
out_file: "logs/outtest.log",
merge_logs: true,
log_date_format: "YYYY-MM-DD HH:mm:ss.SSSS Z"
}
]
};

View File

@@ -1,9 +1,9 @@
module.exports = { module.exports = {
apps : [ apps: [
{ {
name: "TESTRISO2 FreePlanetServerSide", name: "TESTRISO2 FreePlanetServerSide",
script: "./src/server/server.js", script: "./src/server/server.js",
ignore_watch : ["node_modules"], ignore_watch: ["node_modules", "logs"],
interpreter: "/root/.nvm/versions/node/v16.19.0/bin/node", interpreter: "/root/.nvm/versions/node/v16.19.0/bin/node",
watch: false, watch: false,
//autorestart: true, //autorestart: true,

View File

@@ -0,0 +1,30 @@
#!/bin/bash
# Ensure two arguments are provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <source_directory> <destination_directory>"
exit 1
fi
DIR_ORIG=$1
DIR_DEST=$2
# Check if the source directory exists
if [ ! -d "$DIR_ORIG" ]; then
echo "Error: Source directory '$DIR_ORIG' does not exist."
exit 1
fi
# Create the destination directory if it doesn't exist
#mkdir -p "$DIR_DEST"
# Run the Docker command to copy files
docker run --rm -v "$DIR_ORIG":/from -v "$DIR_DEST":/to alpine ash -c "cp -av /from/. /to"
# Check if the Docker command was successful
if [ $? -eq 0 ]; then
echo "Files copied successfully from '$DIR_ORIG' to '$DIR_DEST'."
else
echo "Error: Failed to copy files."
exit 1
fi

View File

@@ -16,6 +16,7 @@ mongoose.plugin(schema => {
const myCard = new Schema( const myCard = new Schema(
{ {
imagefile: String, imagefile: String,
vers_img: Number,
alt: String, alt: String,
description: String, description: String,
style: String, style: String,
@@ -169,6 +170,9 @@ const MyElemSchema = new Schema({
image: { image: {
type: String, type: String,
}, },
vers_img: {
type: Number,
},
listcards: [myCard], listcards: [myCard],
catalogo: catalogo, catalogo: catalogo,
list: [ list: [
@@ -176,6 +180,9 @@ const MyElemSchema = new Schema({
imagefile: { imagefile: {
type: String type: String
}, },
vers_img: {
type: Number,
},
order: { order: {
type: Number type: Number
}, },

View File

@@ -1499,6 +1499,7 @@ UserSchema.statics.createNewRequestPwd = function (idapp, email, code) {
res.status(400).send(); res.status(400).send();
}); });
} else { } else {
console.log('findByEmail idapp: ', idapp, 'email', email);
return User.findByEmail(idapp, email).then(async (user) => { return User.findByEmail(idapp, email).then(async (user) => {
if (!user) { if (!user) {
return { ris: false }; return { ris: false };

View File

@@ -56,11 +56,15 @@ class Mailinabox {
// Trova e stampa il record DKIM // Trova e stampa il record DKIM
const dkimRecord = records.find(record => record.includes('mail._domainkey')); const dkimRecord = records.find(record => record.includes('mail._domainkey'));
if (dkimRecord) { if (dkimRecord) {
const pMatch = dkimRecord.match(/p=([A-Za-z0-9+/]+)/);
if (pMatch && pMatch[1]) { const pattern = /p=([A-Za-z0-9+/=]+)(?:"\s*"([A-Za-z0-9+/=]+))?/;
// console.log('Valore di p nel record DKIM:');
// console.log(pMatch[1]); // Esegui la ricerca
return pMatch[1]; const match = dkimRecord.match(pattern);
if (match) {
// Concatena le due parti trovate di 'p', la seconda parte è facoltativa
return match[1] + (match[2] || '');
} else { } else {
console.log('Record DKIM non trovato.'); console.log('Record DKIM non trovato.');
} }

View File

@@ -57,7 +57,14 @@ class CloudFlare {
async findAndUpdateOnSite(domain, zone, apiToken) { async findAndUpdateOnSite(domain, zone, apiToken) {
try { try {
const Site = require('../models/site'); const Site = require('../models/site');
const recsite = await Site.findOne({ host: domain });
domain = domain.replace(/^https?:\/\//, '');
let normalizedDomain = domain.startsWith("http://") || domain.startsWith("https://") ? domain : "https://" + domain;
// Trova il sito usando il dominio normalizzato
const recsite = await Site.findOne({ host: normalizedDomain });
if (recsite) { if (recsite) {
// Aggiorna i parametri token e zoneId // Aggiorna i parametri token e zoneId
@@ -87,7 +94,7 @@ class CloudFlare {
let miab = new MailinaboxClass(null); let miab = new MailinaboxClass(null);
miab.init(); miab.init();
const dkim = await miab.getDKIMRecord(recsite.host); const dkim = await miab.getDKIMRecord(recsite.host.replace(/^https?:\/\//, ''));
if (dkim) { if (dkim) {
await Site.findOneAndUpdate({ _id: recsite._id }, { await Site.findOneAndUpdate({ _id: recsite._id }, {
@@ -216,7 +223,12 @@ class CloudFlare {
// get the parameters (Token and zoneId on Database) // get the parameters (Token and zoneId on Database)
const Site = require('../models/site'); const Site = require('../models/site');
await Site.findOne({ host: domainrec.name }).lean() let domain = domainrec.name.replace(/^https?:\/\//, '');
let normalizedDomain = domain.startsWith("http://") || domain.startsWith("https://") ? domain : "https://" + domain;
// Trova il sito usando il dominio normalizzato
await Site.findOne({ host: normalizedDomain }).lean()
.then(async (site) => { .then(async (site) => {
if (site) { if (site) {
@@ -224,7 +236,7 @@ class CloudFlare {
const myarrrecdns = await this.fetchDNSRecords(site.cf_token, site.cf_zoneId); const myarrrecdns = await this.fetchDNSRecords(site.cf_token, site.cf_zoneId);
// MX: // MX:
let recTypeMX = await myarrrecdns.find((rec) => rec.type === 'MX' && (rec.name === (domainrec.name))); let recTypeMX = await myarrrecdns.find((rec) => rec.type === 'MX' && (rec.name === (domain)));
if (recTypeMX) { if (recTypeMX) {
if (recTypeMX.content !== site.servermail) { if (recTypeMX.content !== site.servermail) {
@@ -235,7 +247,7 @@ class CloudFlare {
// create a new record // create a new record
const newRecord = { const newRecord = {
type: 'MX', type: 'MX',
name: domainrec.name, name: domain,
content: site.servermail, content: site.servermail,
ttl: 1, ttl: 1,
proxied: false, proxied: false,
@@ -247,7 +259,7 @@ class CloudFlare {
// TXT record spf1 : TXT nomedominio v=spf1 a mx:box.lamiaposta.org ip4:65.21.63.147 ~all // TXT record spf1 : TXT nomedominio v=spf1 a mx:box.lamiaposta.org ip4:65.21.63.147 ~all
let recTypeTXTspf1 = await myarrrecdns.find((rec) => rec.type === 'TXT' && (rec.name === (domainrec.name) && (rec.content.indexOf('v=spf1') > -1))); let recTypeTXTspf1 = await myarrrecdns.find((rec) => rec.type === 'TXT' && (rec.name === (domain) && (rec.content.indexOf('v=spf1') > -1)));
if (site.servermailip) { if (site.servermailip) {
let contentTXTspf1 = `v=spf1 a mx:${site.servermail} ip4:${site.servermailip} ~all`; let contentTXTspf1 = `v=spf1 a mx:${site.servermail} ip4:${site.servermailip} ~all`;
@@ -261,7 +273,7 @@ class CloudFlare {
// create a new record // create a new record
const newRecord = { const newRecord = {
type: 'TXT', type: 'TXT',
name: domainrec.name, name: domain,
content: contentTXTspf1, content: contentTXTspf1,
ttl: 3600, ttl: 3600,
}; };
@@ -272,7 +284,7 @@ class CloudFlare {
// mail._domainkey.nomedominio v=DKIM1; h=sha256; k=rsa; s=email; p=<dkim> // mail._domainkey.nomedominio v=DKIM1; h=sha256; k=rsa; s=email; p=<dkim>
let nameDkimtoFind = `mail._domainkey.${domainrec.name}`; let nameDkimtoFind = `mail._domainkey.${domain}`;
let recTypeTXTDKIM = await myarrrecdns.find((rec) => rec.type === 'TXT' && (rec.name === nameDkimtoFind)); let recTypeTXTDKIM = await myarrrecdns.find((rec) => rec.type === 'TXT' && (rec.name === nameDkimtoFind));
@@ -299,12 +311,12 @@ class CloudFlare {
// DMARC: // DMARC:
let nameDmarctoFind = `_dmarc.${domainrec.name}`; let nameDmarctoFind = `_dmarc.${domain}`;
let recTypeTXTdmarc = await myarrrecdns.find((rec) => rec.type === 'TXT' && (rec.name === (nameDmarctoFind) && (rec.content.indexOf('v=DMARC1') > -1))); let recTypeTXTdmarc = await myarrrecdns.find((rec) => rec.type === 'TXT' && (rec.name === (nameDmarctoFind) && (rec.content.indexOf('v=DMARC1') > -1)));
if (site.servermailip) { if (site.servermailip) {
let contentTXTdmarc = `v=DMARC1; p=quarantine; ruf=mailto:dmarc@${domainrec.name};`; let contentTXTdmarc = `v=DMARC1; p=quarantine; ruf=mailto:dmarc@${domain};`;
if (recTypeTXTdmarc) { if (recTypeTXTdmarc) {
if (recTypeTXTdmarc.content !== contentTXTdmarc) { if (recTypeTXTdmarc.content !== contentTXTdmarc) {
@@ -326,7 +338,7 @@ class CloudFlare {
// AutoConfig: // AutoConfig:
let myType = 'CNAME'; let myType = 'CNAME';
let strfind = `autoconfig.${domainrec.name}`; let strfind = `autoconfig.${domain}`;
let contentExpected = site.servermail; let contentExpected = site.servermail;
let rectofind = await myarrrecdns.find((rec) => rec.type === 'CNAME' && (rec.name === strfind)); let rectofind = await myarrrecdns.find((rec) => rec.type === 'CNAME' && (rec.name === strfind));
@@ -349,7 +361,7 @@ class CloudFlare {
// AutoDiscover: // AutoDiscover:
myType = 'CNAME'; myType = 'CNAME';
strfind = `autodiscover.${domainrec.name}`; strfind = `autodiscover.${domain}`;
contentExpected = site.servermail; contentExpected = site.servermail;
rectofind = await myarrrecdns.find((rec) => rec.type === 'CNAME' && (rec.name === strfind)); rectofind = await myarrrecdns.find((rec) => rec.type === 'CNAME' && (rec.name === strfind));
@@ -384,7 +396,12 @@ class CloudFlare {
// get the parameters (Token and zoneId on Database) // get the parameters (Token and zoneId on Database)
const Site = require('../models/site'); const Site = require('../models/site');
await Site.findOne({ host: domain }).lean() domain = domain.replace(/^https?:\/\//, '');
let normalizedDomain = domain.startsWith("http://") || domain.startsWith("https://") ? domain : "https://" + domain;
// Trova il sito usando il dominio normalizzato
await Site.findOne({ host: normalizedDomain }).lean()
.then(async (site) => { .then(async (site) => {
if (site) { if (site) {
@@ -398,7 +415,7 @@ class CloudFlare {
let paramexpected = ''; let paramexpected = '';
try { try {
paramexpected = site[paramobj.paramsite]; paramexpected = site[paramobj.paramsite].replace(/^https?:\/\//, '');;
} catch (e) { } catch (e) {
} }

View File

@@ -1229,7 +1229,7 @@ router.post('/cloudflare', authenticate, async (req, res) => {
} else if (cmd === "setCorrectIpsOnDNS") { } else if (cmd === "setCorrectIpsOnDNS") {
result = await cf.setCorrectIpsOnDNS(record); result = await cf.setCorrectIpsOnDNS(record);
} else if (cmd === "gettok") { } else if (cmd === "gettok") {
result = JSON.parse(process.env.CLOUDFLARE_TOKENS); result = process.env.CLOUDFLARE_TOKENS ? JSON.parse(process.env.CLOUDFLARE_TOKENS) : '';
} }
return res.send(result); return res.send(result);

View File

@@ -1917,7 +1917,7 @@ function uploadFile(req, res, version) {
// allora mi conviene che lo faccio dopo, manualmente. // allora mi conviene che lo faccio dopo, manualmente.
console.log('Dovresti copiare fromfile', fromfile, 'tofile', tofile); console.log('Dovresti copiare fromfile', fromfile, 'tofile', tofile);
'sudo cp -R ' + fromfile + ' ' + tofile console.log('sudo cp -R ' + fromfile + ' ' + tofile);
// await tools.execScriptNoOutput('sudo cp -R ' + fromfile + ' ' + tofile) // await tools.execScriptNoOutput('sudo cp -R ' + fromfile + ' ' + tofile)
res.end(); res.end();
return; return;

View File

@@ -636,7 +636,7 @@ router.post('/newtok', async (req, res) => {
// Ottieni l'utente in base al refreshtoken // Ottieni l'utente in base al refreshtoken
const recFound = await User.findOne({ 'tokens.refreshToken': refreshToken }); const recFound = await User.findOne({ 'tokens.refreshToken': refreshToken });
console.log('recFound', recFound ? recFound.name : 'NOTFOUND', 'Token=', refreshToken); // console.log('recFound', recFound ? recFound.name : 'NOTFOUND', 'Token=', refreshToken);
if (recFound) { if (recFound) {
return recFound.generateAuthToken(req) return recFound.generateAuthToken(req)
@@ -1429,6 +1429,9 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
await Province.setCoordinatesOnDB(); await Province.setCoordinatesOnDB();
} else if (mydata.dbop === 'insertGeojsonToMongoDB') { } else if (mydata.dbop === 'insertGeojsonToMongoDB') {
await City.insertGeojsonToMongoDB('comuni_italia.geojson'); await City.insertGeojsonToMongoDB('comuni_italia.geojson');
} else if (mydata.dbop === 'listCollectionsBySize') {
mystr = await tools.listCollectionsBySize();
ris = { mystr };
} else if (mydata.dbop === 'AbilitaNewsletterALL') { } else if (mydata.dbop === 'AbilitaNewsletterALL') {
await User.updateMany({ await User.updateMany({
$or: [ $or: [
@@ -1856,15 +1859,11 @@ router.post('/dbop', authenticate, async (req, res) => {
} }
try { try {
let ris = await eseguiDbOp(idapp, mydata, locale, req, res); let risOp = await eseguiDbOp(idapp, mydata, locale, req, res);
if (!ris) { // ris = await User.updateMyData(ris, idapp, req.user.username);
ris = {};
}
ris = await User.updateMyData(ris, idapp, req.user.username); res.send({ code: server_constants.RIS_CODE_OK, data: risOp });
res.send({ code: server_constants.RIS_CODE_OK, data: ris.data });
} catch (e) { } catch (e) {
res.status(400).send({ code: server_constants.RIS_CODE_ERR, msg: e }); res.status(400).send({ code: server_constants.RIS_CODE_ERR, msg: e });

View File

@@ -19,7 +19,7 @@ const { spawn } = require('child_process');
const NUOVO_METODO_TEST = true; const NUOVO_METODO_TEST = true;
const METODO_MULTI_CORS = false; const METODO_MULTI_CORS = true;
const server_constants = require('./tools/server_constants'); const server_constants = require('./tools/server_constants');
@@ -266,11 +266,14 @@ myLoad().then(ris => {
// app.use(throttle(1024 * 128)); // throttling bandwidth // app.use(throttle(1024 * 128)); // throttling bandwidth
// app.use((req, res, next) => { /*
// res.header('Access-Control-Allow-Origin', '*') app.use((req, res, next) => {
// res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept') res.header('Access-Control-Allow-Origin', '*')
// next() res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
// }); next();
});
*/
async function myLoad() { async function myLoad() {
@@ -748,10 +751,14 @@ function getCredentials(hostname) {
};*/ };*/
return { try {
key: fs.readFileSync(fileprivkey, "utf8"), const key = fs.readFileSync(fileprivkey, "utf8");
cert: fs.readFileSync(filecert, "utf8") const cert = fs.readFileSync(filecert, "utf8");
}; return { key, cert };
} catch (error) {
console.error(`Errore nel caricamento delle credenziali per ${hostname}:`, error);
// Gestisci l'errore, per esempio ritorna null o lancia un'eccezione
}
} else { } else {
const keyStream = path.resolve(`./${process.env.PATH_CERT_KEY}`); const keyStream = path.resolve(`./${process.env.PATH_CERT_KEY}`);
@@ -804,7 +811,7 @@ function startServer(app, port) {
const credentials = getCredentials(domains[i].hostname); const credentials = getCredentials(domains[i].hostname);
// console.log('credentials: ', credentials); // console.log('credentials: ', credentials);
httpsServer = https.createServer(credentials, app); httpsServer = https.createServer(credentials, app);
console.log('⭐️⭐️⭐️⭐️⭐️ HTTPS server: ' + domains[i].hostname + ' Port:', domains[i].port); console.log('⭐️⭐️⭐️⭐️⭐️ HTTPS server: ' + domains[i].hostname + ' Port:', domains[i].port + (domains[i].website ? 'WebSite = ' + domains[i].website : ''));
httpsServer.listen(domains[i].port); httpsServer.listen(domains[i].port);
} }
} else { } else {

View File

@@ -487,7 +487,7 @@ const txt = {
MSG_ASK_USERNAME_BO: 'Scrivete nel messaggio l\'username (SENZA SPAZI) o la email con cui vi siete registrati sul sito di %s:', MSG_ASK_USERNAME_BO: 'Scrivete nel messaggio l\'username (SENZA SPAZI) o la email con cui vi siete registrati sul sito di %s:',
MSG_ASK_USERNAME_INVITANTE: 'Scrivi nel messaggio <b>l\'USERNAME TELEGRAM</b> di chi ti ha INVITATO', MSG_ASK_USERNAME_INVITANTE: 'Scrivi nel messaggio <b>l\'USERNAME TELEGRAM</b> di chi ti ha INVITATO',
MSG_NEW_REG: '<br><br>⁉️🙈 Per aiuto scrivi sulla <a href="https://t.me/riso_gruppo">Chat RISO</a><br>oppure direttamente a Paolo (@surya1977) ☀️.', MSG_NEW_REG: '<br><br>⁉️🙈 Per aiuto scrivi sulla <a href="https://t.me/riso_gruppo">Chat RISO</a><br>oppure direttamente a Paolo (@surya1977) ☀️.',
MSG_ERRORE_INVITANTE_NOT_FOUND: 'L\'username dell\'invitante appena digitato non sembra essere corretto! Ti ricordo che dev\'essere l\'username con cui si è registrato su RISO', MSG_ERRORE_INVITANTE_NOT_FOUND: 'L\'username dell\'invitante appena digitato non sembra essere corretto! Ti ricordo che dev\'essere l\'username con cui si è registrato su %s',
MSG_ERRORE_USERNAME: 'Attenzione! Devi inserire solo lo username (40 caratteri massimo)', MSG_ERRORE_USERNAME: 'Attenzione! Devi inserire solo lo username (40 caratteri massimo)',
MSG_ERRORE_USERNAME_NOT_FOUND: 'Per Completare la Verifica Telegram BOT, dovete ora scrivere qui sotto nel messaggio l\'Username (senza spazi) OPPURE la email con cui vi siete registrati sul sito', MSG_ERRORE_USERNAME_NOT_FOUND: 'Per Completare la Verifica Telegram BOT, dovete ora scrivere qui sotto nel messaggio l\'Username (senza spazi) OPPURE la email con cui vi siete registrati sul sito',
MSG_ERRORE_USERNAME_ANNULLA: 'Inserimento Annullato. Riprovare', MSG_ERRORE_USERNAME_ANNULLA: 'Inserimento Annullato. Riprovare',
@@ -502,12 +502,12 @@ const txt = {
MSG_EXIT_TELEGRAM: 'L\'account è stato ora scollegato da questo Telegram BOT.', MSG_EXIT_TELEGRAM: 'L\'account è stato ora scollegato da questo Telegram BOT.',
MSG_APORTADOR_USER_REGISTERED: emo.FIRE + MSG_APORTADOR_USER_REGISTERED: emo.FIRE +
' Si è appena Registrato "%s" (n. %s)\nInvitato da %s', ' Si è appena Registrato "%s" (n. %s)\nInvitato da %s',
MSG_APORTADOR_ASK_CONFIRM: '🆕💥 🧍‍♂️ %s si sta registrando alla App di RISO e ti chiede di poter entrare. Confermi di conoscerla ?', MSG_APORTADOR_ASK_CONFIRM: '🆕💥 🧍‍♂️ %s si sta registrando alla App %d e ti chiede di poter entrare. Confermi di conoscerla ?',
MSG_ACCEPT_NEWENTRY_INGROUP: '❇️👥 🧍‍♂️ Accetta Ingresso nel GRUPPO %s:', MSG_ACCEPT_NEWENTRY_INGROUP: '❇️👥 🧍‍♂️ Accetta Ingresso nel GRUPPO %s:',
MSG_FRIENDS_NOT_ACCEPTED_CONFIRMED: '🚫 Hai rifiutato la richiesta di Amicizia di %s !', MSG_FRIENDS_NOT_ACCEPTED_CONFIRMED: '🚫 Hai rifiutato la richiesta di Amicizia di %s !',
MSG_HANDSHAKE_NOT_ACCEPTED_CONFIRMED: '🚫 Hai rifiutato la richiesta di Stretta di mano di %s !', MSG_HANDSHAKE_NOT_ACCEPTED_CONFIRMED: '🚫 Hai rifiutato la richiesta di Stretta di mano di %s !',
MSG_APORTADOR_CONFIRMED: '✅ %s è stato Abilitato correttamente (da %s)!', MSG_APORTADOR_CONFIRMED: '✅ %s è stato Abilitato correttamente (da %s)!',
MSG_APORTADOR_DEST_CONFIRMED: '✅ La tua registrazione a RISO è stata accettata da %s!\n' + MSG_APORTADOR_DEST_CONFIRMED: '✅ La tua registrazione a %s è stata accettata da %s!\n' +
'Vai sulla App oppure clicca qui per entrare\n👉🏻 %s', 'Vai sulla App oppure clicca qui per entrare\n👉🏻 %s',
MSG_GROUP_CONFIRMED: '✅ Sei stato Aggiunto sul Gruppo %s!', MSG_GROUP_CONFIRMED: '✅ Sei stato Aggiunto sul Gruppo %s!',
MSG_APORTADOR_DEST_NOT_CONFIRMED: emo.EXCLAMATION_MARK + MSG_APORTADOR_DEST_NOT_CONFIRMED: emo.EXCLAMATION_MARK +
@@ -908,6 +908,8 @@ const MyTelegramBot = {
const struserinfomsg = tools.getUserInfoMsg(idapp, myuser); const struserinfomsg = tools.getUserInfoMsg(idapp, myuser);
const nomeapp = myuser.idapp ? tools.getNomeAppByIdApp(myuser.idapp) : tools.getNomeAppByIdApp(idapp);
if (myfunc === shared_consts.CallFunz.REGISTRATION) { if (myfunc === shared_consts.CallFunz.REGISTRATION) {
cl.setPhotoProfile(myuser, telegid, false); cl.setPhotoProfile(myuser, telegid, false);
@@ -936,7 +938,7 @@ const MyTelegramBot = {
} else { } else {
msg_notifpush = getstr(langdest, 'MSG_APORTADOR_ASK_CONFIRM', myuser.username); msg_notifpush = getstr(langdest, 'MSG_APORTADOR_ASK_CONFIRM', myuser.username);
domanda = getstr(langdest, 'MSG_APORTADOR_ASK_CONFIRM', myuser.username) + '<br>' + struserinfomsg; domanda = getstr(langdest, 'MSG_APORTADOR_ASK_CONFIRM', myuser.username, nomeapp) + '<br>' + struserinfomsg;
keyb = cl.getInlineKeyboard(myuser.lang, [ keyb = cl.getInlineKeyboard(myuser.lang, [
{ {
@@ -1785,7 +1787,7 @@ class Telegram {
risp = 'Chissà... Forse si!\nAnche se meglio averne un altro di scorta, nel caso il Principe non sia disponibile.'; risp = 'Chissà... Forse si!\nAnche se meglio averne un altro di scorta, nel caso il Principe non sia disponibile.';
} else if (MsgBot.START_INV.find( } else if (MsgBot.START_INV.find(
(rec) => testo.indexOf(rec) > -1)) { (rec) => testo.indexOf(rec) > -1)) {
risp = 'Sei già registrato a RISO. Per accedere alla App, aprila dall\'icona sul tuo schermo, oppure vai su https://riso.app ed installa la App.\n\nSe hai dimenticato la password: \n clicca sul menu in basso su "⚒ Strumenti" e poi "🔑 Cambio Password"' risp = 'Sei già registrato. Per accedere alla App, aprila dall\'icona sul tuo schermo, oppure vai sul sito ed installa la App.\n\nSe hai dimenticato la password: \n clicca sul menu in basso su "⚒ Strumenti" e poi "🔑 Cambio Password"'
} else if (MsgBot.COSE_COVID.find( } else if (MsgBot.COSE_COVID.find(
(rec) => testo.indexOf(rec) > -1)) { (rec) => testo.indexOf(rec) > -1)) {
risp = 'Un \'influenza più "grave", dovuta a paure e a fattori interiori di evoluzione, oltre ad una pulizia del corpo. '; risp = 'Un \'influenza più "grave", dovuta a paure e a fattori interiori di evoluzione, oltre ad una pulizia del corpo. ';
@@ -2791,6 +2793,8 @@ class Telegram {
try { try {
let mymsg = msg.text.toString().trim().toLowerCase(); let mymsg = msg.text.toString().trim().toLowerCase();
let nomeapp = tools.getNomeAppByIdApp(this.idapp);
if (!!mymsg) { if (!!mymsg) {
const rec = this.getRecInMem(msg); const rec = this.getRecInMem(msg);
let aportador_solidario = rec.aportador_solidario; let aportador_solidario = rec.aportador_solidario;
@@ -2814,12 +2818,12 @@ class Telegram {
// rec.status = Status.WAITFOR_USERNAME_INVITANTE; // rec.status = Status.WAITFOR_USERNAME_INVITANTE;
rec.status = Status.SET_USERNAME_INVITANTE; rec.status = Status.SET_USERNAME_INVITANTE;
const str2 = '\n' + getstr(this.getlang(msg), 'MSG_ASK_USERNAME_INVITANTE', tools.getNomeAppByIdApp(this.idapp)); const str2 = '\n' + getstr(this.getlang(msg), 'MSG_ASK_USERNAME_INVITANTE', nomeapp);
if (msg.from.username) if (msg.from.username)
console.log(msg.from.username + ' ha digitato: ' + msg.text); console.log(msg.from.username + ' ha digitato: ' + msg.text);
await this.sendMsg(msg.from.id, getstr(this.getlang(msg), 'MSG_ERRORE_INVITANTE_NOT_FOUND') + str2, null); await this.sendMsg(msg.from.id, getstr(this.getlang(msg), 'MSG_ERRORE_INVITANTE_NOT_FOUND', nomeapp) + str2, null);
} }
} }
} catch (e) { } catch (e) {
@@ -4417,11 +4421,13 @@ if (true) {
if (changed) { if (changed) {
const req = tools.getReqByPar(user.idapp, username_action); const req = tools.getReqByPar(user.idapp, username_action);
nomeapp = tools.getNomeAppByIdApp(user.idapp);
// await User.setFriendsCmd(req, user.idapp, data.username, userDest.username, shared_consts.FRIENDSCMD.SETFRIEND, null, true); // await User.setFriendsCmd(req, user.idapp, data.username, userDest.username, shared_consts.FRIENDSCMD.SETFRIEND, null, true);
await User.setaportador_solidario(user.idapp, data.username, userDest.username); await User.setaportador_solidario(user.idapp, data.username, userDest.username);
const msgOrig = printf(getstr(userDest.lang, 'MSG_APORTADOR_DEST_CONFIRMED'), `${userDest.username}`, const msgOrig = printf(getstr(userDest.lang, 'MSG_APORTADOR_DEST_CONFIRMED', nomeapp), `${userDest.username}`,
tools.getHostByIdApp(user.idapp)); tools.getHostByIdApp(user.idapp));
const msgDest = printf(getstr(user.lang, 'MSG_APORTADOR_CONFIRMED'), `${user.username}`, `${userDest.username}`); const msgDest = printf(getstr(user.lang, 'MSG_APORTADOR_CONFIRMED'), `${user.username}`, `${userDest.username}`);

View File

@@ -5487,6 +5487,38 @@ module.exports = {
} }
} }
}, },
async listCollectionsBySize() {
let output = ""; // Variabile per memorizzare l'output
try {
const conn = mongoose.connection;
// Ottieni le collezioni e calcola la dimensione
const collections = await conn.db.listCollections().toArray();
// Calcola la dimensione per ciascuna collezione
const collectionSizes = await Promise.all(collections.map(async (collection) => {
const stats = await conn.db.collection(collection.name).stats();
return { name: collection.name, size: stats.size };
}));
// Ordina le collezioni per dimensione
collectionSizes.sort((a, b) => b.size - a.size); // Ordine decrescente
output += "Collezioni ordinate per dimensione:\n"; // Inizio dell'output
collectionSizes.forEach(collection => {
const sizeInMB = (collection.size / (1024 * 1024)).toFixed(2); // Converti in MB
output += `Collezione: ${collection.name}, Dimensione: ${sizeInMB} MB\n`; // Aggiungi all'output
});
return output; // Restituisci l'output alla fine
} catch (error) {
console.error("Errore:", error);
return `Errore: ${error.message}`; // Restituisci l'errore come stringa
}
},
ImageDownloader, ImageDownloader,