- aggiornato l'Editor HTML
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
@@ -14,6 +14,8 @@ span Cellulare:
|
|||||||
strong #{user.profile.intcode_cell} #{user.profile.cell}<br>
|
strong #{user.profile.intcode_cell} #{user.profile.cell}<br>
|
||||||
span Nazionalità:
|
span Nazionalità:
|
||||||
strong #{user.profile.nationality}<br>
|
strong #{user.profile.nationality}<br>
|
||||||
|
span Gruppo:
|
||||||
|
strong #{idMyGroup}<br>
|
||||||
p <br>Saluti
|
p <br>Saluti
|
||||||
|
|
||||||
style(type="text/css").
|
style(type="text/css").
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ span hai dimenticato la Password? :
|
|||||||
strong <a href=#{forgetpwd} target="_blank">Trovala qui</a><br>
|
strong <a href=#{forgetpwd} target="_blank">Trovala qui</a><br>
|
||||||
span Email:
|
span Email:
|
||||||
strong #{emailto}<br>
|
strong #{emailto}<br>
|
||||||
p Per confermare la registrazione clicca sul bottone, oppure <a href=#{strlinkreg} target="_blank">CLICCA QUI</a>
|
p Per confermare la registrazione clicca sul bottone, oppure su questo link: #{strlinkreg}
|
||||||
div.divbtn <a href=#{strlinkreg} target="_blank">
|
div.divbtn <a href=#{strlinkreg} target="_blank">
|
||||||
button.btn.btn-lg Verifica Registrazione</a>
|
button.btn.btn-lg Verifica Registrazione</a>
|
||||||
|
|
||||||
|
|||||||
@@ -658,11 +658,15 @@ router.post('/setsubrec', authenticate, (req, res) => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
router.post('/gettable', authenticate, (req, res) => {
|
router.post('/gettable', authenticate_noerror, (req, res) => {
|
||||||
let params = req.body;
|
let params = req.body;
|
||||||
|
|
||||||
params.table = sanitizeHtml(params.table);
|
params.table = sanitizeHtml(params.table);
|
||||||
|
|
||||||
|
if (!shared_consts.TABLES_ENABLE_GETTABLE_FOR_NOT_LOGGED.includes(params.table) && !req.user) {
|
||||||
|
return res.status(403).send({});
|
||||||
|
}
|
||||||
|
|
||||||
let idapp = req.user ? req.user.idapp : sanitizeHtml(params.idapp);
|
let idapp = req.user ? req.user.idapp : sanitizeHtml(params.idapp);
|
||||||
const mytable = globalTables.getTableByTableName(params.table);
|
const mytable = globalTables.getTableByTableName(params.table);
|
||||||
//console.log('mytable', mytable);
|
//console.log('mytable', mytable);
|
||||||
@@ -1909,15 +1913,19 @@ function uploadFile(req, res, version) {
|
|||||||
|
|
||||||
|
|
||||||
if (!tools.sulServer()) {
|
if (!tools.sulServer()) {
|
||||||
|
// Se faccio eseguire questo in Locale, lui mi fa l'aggiornamento della pagina, quindi poi non posso salvare!
|
||||||
|
// allora mi conviene che lo faccio dopo, manualmente.
|
||||||
|
|
||||||
console.log('Dovresti copiare fromfile', fromfile, 'tofile', tofile);
|
console.log('Dovresti copiare fromfile', fromfile, 'tofile', tofile);
|
||||||
await tools.execScriptNoOutput('sudo cp -R ' + fromfile + ' ' + tofile)
|
'sudo cp -R ' + fromfile + ' ' + tofile
|
||||||
|
// await tools.execScriptNoOutput('sudo cp -R ' + fromfile + ' ' + tofile)
|
||||||
res.end();
|
res.end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Move in the folder application !
|
// Move in the folder application !
|
||||||
tools.move(fromfile, tofile, (err) => {
|
await tools.move(fromfile, tofile, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log('err uploadDir:', err);
|
console.log('err uploadDir:', err);
|
||||||
res.status(400).send();
|
res.status(400).send();
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ router.post('/', async (req, res) => {
|
|||||||
|
|
||||||
if (!tools.isAlphaNumericAndSpecialCharacter(body.username) ||
|
if (!tools.isAlphaNumericAndSpecialCharacter(body.username) ||
|
||||||
body.email.length < 6 ||
|
body.email.length < 6 ||
|
||||||
body.username.length < 5 || body.password.length < 5) {
|
body.username.length < 4 || body.password.length < 5) {
|
||||||
await tools.snooze(5000);
|
await tools.snooze(5000);
|
||||||
console.log('Username non valido in Registrazione: ' + body.username);
|
console.log('Username non valido in Registrazione: ' + body.username);
|
||||||
res.status(400).
|
res.status(400).
|
||||||
|
|||||||
@@ -741,6 +741,7 @@ module.exports = {
|
|||||||
mylocalsconf.name = user.name;
|
mylocalsconf.name = user.name;
|
||||||
mylocalsconf.surname = user.surname;
|
mylocalsconf.surname = user.surname;
|
||||||
mylocalsconf.aportador_solidario = user.aportador_solidario ? user.aportador_solidario : '';
|
mylocalsconf.aportador_solidario = user.aportador_solidario ? user.aportador_solidario : '';
|
||||||
|
mylocalsconf.idMyGroup = user.idMyGroup;
|
||||||
mylocalsconf.emailto = user.email;
|
mylocalsconf.emailto = user.email;
|
||||||
mylocalsconf.hashemail = tools.getHash(user.email);
|
mylocalsconf.hashemail = tools.getHash(user.email);
|
||||||
mylocalsconf.user = user;
|
mylocalsconf.user = user;
|
||||||
|
|||||||
@@ -3877,36 +3877,45 @@ module.exports = {
|
|||||||
this.writelogfile(mystr, FILENAVE);
|
this.writelogfile(mystr, FILENAVE);
|
||||||
},
|
},
|
||||||
|
|
||||||
move(oldPath, newPath, callback) {
|
async move(oldPath, newPath, callback) {
|
||||||
|
try {
|
||||||
fs.rename(oldPath, newPath, function (err) {
|
const ris = await fs.promises.rename(oldPath, newPath);
|
||||||
if (err) {
|
console.log('... File Rinominato:', oldPath, 'in:', newPath, 'ris', ris);
|
||||||
if (err.code === 'EXDEV') {
|
callback(); // Chiamare il callback senza errori
|
||||||
copy();
|
} catch (err) {
|
||||||
} else {
|
if (err.code === 'EXDEV') {
|
||||||
callback(err);
|
await copy(); // Se EXDEV, utilizza la funzione copy
|
||||||
}
|
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
console.log(' ... File Rinominato', oldPath, 'in:', newPath);
|
console.error('Errore durante lo spostamento:', err);
|
||||||
|
callback(err); // Passa l'errore al callback
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
callback();
|
async function copy() {
|
||||||
});
|
|
||||||
|
|
||||||
function copy() {
|
|
||||||
const readStream = fs.createReadStream(oldPath);
|
const readStream = fs.createReadStream(oldPath);
|
||||||
const writeStream = fs.createWriteStream(newPath);
|
const writeStream = fs.createWriteStream(newPath);
|
||||||
|
|
||||||
readStream.on('error', callback);
|
readStream.on('error', (err) => {
|
||||||
writeStream.on('error', callback);
|
console.error('Errore nella lettura del file:', err);
|
||||||
|
callback(err); // Passa l'errore al callback
|
||||||
readStream.on('close', function () {
|
});
|
||||||
console.log('cancella file già copiato', oldPath);
|
writeStream.on('error', (err) => {
|
||||||
fs.unlink(oldPath, callback);
|
console.error('Errore nella scrittura del file:', err);
|
||||||
|
callback(err); // Passa l'errore al callback
|
||||||
});
|
});
|
||||||
|
|
||||||
readStream.pipe(writeStream);
|
readStream.pipe(writeStream);
|
||||||
|
|
||||||
|
writeStream.on('finish', async () => {
|
||||||
|
console.log('File copiato, ora rimuovo il file di origine:', oldPath);
|
||||||
|
try {
|
||||||
|
await fs.promises.unlink(oldPath); // Rimuovi il file originale
|
||||||
|
callback(); // Chiama il callback al termine
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Errore nella rimozione del file originale:', err);
|
||||||
|
callback(err); // Passa l'errore al callback
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ module.exports = {
|
|||||||
TABLES_GROUPS_NOTIFICATION: ['mygroups'],
|
TABLES_GROUPS_NOTIFICATION: ['mygroups'],
|
||||||
TABLES_CIRCUITS_NOTIFICATION: ['circuits'],
|
TABLES_CIRCUITS_NOTIFICATION: ['circuits'],
|
||||||
|
|
||||||
|
TABLES_ENABLE_GETTABLE_FOR_NOT_LOGGED: ['attivitas'],
|
||||||
|
|
||||||
TABLES_NUM_AS_ID_NUMBER: [],
|
TABLES_NUM_AS_ID_NUMBER: [],
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.0.58
|
1.0.60
|
||||||
Reference in New Issue
Block a user