From 5d6d4d8fb7aea2963853bc9d2a7f94e70c436394 Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Sat, 11 Jan 2020 00:51:02 +0100 Subject: [PATCH] ... --- web/admin/crawler/crawler.php | 9 ++++- web/admin/include/sessionstart.php | 5 +-- web/admin/instances.php | 54 ++++++++++++++++++++++---- web/admin/instancesh.php | 6 ++- web/admin/login.php | 2 +- web/admin/zzz-materiali/mastostart.sql | 12 ++++-- 6 files changed, 69 insertions(+), 19 deletions(-) diff --git a/web/admin/crawler/crawler.php b/web/admin/crawler/crawler.php index 25c6000..3b3c8eb 100755 --- a/web/admin/crawler/crawler.php +++ b/web/admin/crawler/crawler.php @@ -463,7 +463,12 @@ function langs($instid) { $res=mysqli_query($link,'SELECT * FROM Languages WHERE Code=\''.myesc($link,$lang).'\'') or mexit(mysqli_error($link).N,3); if (mysqli_num_rows($res)<1) { - mysqli_query($link,'INSERT INTO Languages (ID, Code) VALUES (NULL, \''.myesc($link,truncs($lang,'Languages','Code','«'.$instrow['URI'].'»')).'\')') + $NameIt=myesc($link,truncs(ucfirst(locale_get_display_name($lang,'it')),'Languages','NameIT','«'.$instrow['URI'].'»')); + $NameEn=myesc($link,truncs(ucfirst(locale_get_display_name($lang,'en')),'Languages','NameEN','«'.$instrow['URI'].'»')); + $NameFr=myesc($link,truncs(ucfirst(locale_get_display_name($lang,'fr')),'Languages','NameFR','«'.$instrow['URI'].'»')); + $NameEs=myesc($link,truncs(ucfirst(locale_get_display_name($lang,'es')),'Languages','NameES','«'.$instrow['URI'].'»')); + $NameOrig=myesc($link,truncs(ucfirst(locale_get_display_name($lang,$lang)),'Languages','NameOrig','«'.$instrow['URI'].'»')); + mysqli_query($link,'INSERT INTO Languages (ID, Code, NameIT, NameEN, NameFR, NameES, NameOrig) VALUES (NULL, \''.myesc($link,truncs($lang,'Languages','Code','«'.$instrow['URI'].'»')).'\', \''.$NameIt.'\', \''.$NameEn.'\', \''.$NameFr.'\', \''.$NameEs.'\', \''.$NameOrig.'\')') or mexit(mysqli_error($link).N,3); $langid=mysqli_insert_id($link); flushtronc($langid); @@ -642,7 +647,7 @@ while ($i<$cinsts) { if (akeavinn('acct',$info['contact_account'])) $instrow['AdmAccount']=nempty(truncs($info['contact_account']['acct'],'Instances','AdmAccount','«'.$instrow['URI'].'»')); if (akeavinn('display_name',$info['contact_account'])) - $instrow['AdmDisplayName']=nempty(truncs($info['contact_account']['display_name'],'Instances','AdmAccount','«'.$instrow['URI'].'»')); + $instrow['AdmDisplayName']=nempty(truncs($info['contact_account']['display_name'],'Instances','AdmDisplayName','«'.$instrow['URI'].'»')); if (akeavinn('created_at',$info['contact_account'])) $instrow['AdmCreatedAt']=pgdatetomy($info['contact_account']['created_at']); if (akeavinn('note',$info['contact_account'])) diff --git a/web/admin/include/sessionstart.php b/web/admin/include/sessionstart.php index fa820ca..b085e3d 100644 --- a/web/admin/include/sessionstart.php +++ b/web/admin/include/sessionstart.php @@ -2,11 +2,10 @@ session_name('mastostartadmin'); session_start(); -if (!array_key_exists('id',$_SESSION)) { +if (!array_key_exists('AdmID',$_SESSION)) { $_SESSION=array(); session_destroy(); -// qui è ok usare muoribene perché per iframe viene caricato da muoribenepar.php - muoribene('Sessione scaduta.
Torna alla pagina di accesso.',false); + muoribene('Sessione scaduta.
Puoi andare alla pagina di accesso.',false); } ?> diff --git a/web/admin/instances.php b/web/admin/instances.php index 205a8d4..65fa3b6 100644 --- a/web/admin/instances.php +++ b/web/admin/instances.php @@ -309,7 +309,7 @@ if (mysqli_num_rows($res)<1) { $srow=mysqli_fetch_assoc($sres); $attr.='
Ultimo check '.strftime('%e %b %Y, %T',$srow['Time']).': '.(($srow['Status']) ? 'OK' : 'KO').'
'; } else { - $attr.='
Percentuale di risposta ai nostri check
'; + $attr.='
Percentuale di risposta ai nostri check
'.N; $attr.='
Non disponibile (?!?!?!)
'.N; } $attr.='
Attività delle ultime 12 settimane
'.N; @@ -321,7 +321,7 @@ if (mysqli_num_rows($res)<1) { if (mysqli_num_rows($sres)>0) { $attr.='
Stati: '.$tot['tstatuses'].'
Accessi: '.$tot['tlogins'].'
Registrazioni: '.$tot['tregs'].'
'.N; while ($srow=mysqli_fetch_assoc($sres)) { - $attr.='
'.strftime('%e %b %Y',$srow['Week']).' ('.$srow['Week'].')
'.N; + $attr.='
'.strftime('%e %b %Y',$srow['Week']).'
'.N; ($tot['tstatuses']==0) ? $width=0 : $width=str_replace(',','.',100/$tot['tstatuses']*$srow['Statuses']); $attr.='
'.$srow['Statuses'].' stati
'.N; ($tot['tlogins']==0) ? $width=0 : $width=str_replace(',','.',100/$tot['tlogins']*$srow['Logins']); @@ -457,6 +457,7 @@ mysqli_close($link); + - +