From 93692a43ed6be4797451d4e697b332de8ac71e51 Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Wed, 8 Jan 2020 14:52:20 +0100 Subject: [PATCH] ... --- web/admin/dafa.txt | 2 + web/admin/imgs/minus.svg | 83 +++++++ web/admin/imgs/plus.svg | 91 +++++++ web/admin/include/menu.php | 7 +- web/admin/include/muoribene.php | 4 +- web/admin/instances.php | 329 +++++++++++++++++++------ web/admin/instancesh.php | 44 ++++ web/admin/js/confirma.js | 4 + web/admin/theme.css | 96 ++++++-- web/admin/zzz-materiali/mastostart.sql | 10 +- 10 files changed, 565 insertions(+), 105 deletions(-) create mode 100644 web/admin/dafa.txt create mode 100644 web/admin/imgs/minus.svg create mode 100644 web/admin/imgs/plus.svg create mode 100644 web/admin/instancesh.php create mode 100644 web/admin/js/confirma.js diff --git a/web/admin/dafa.txt b/web/admin/dafa.txt new file mode 100644 index 0000000..94d3af4 --- /dev/null +++ b/web/admin/dafa.txt @@ -0,0 +1,2 @@ +- ripristinare le colonne descrittive in Languages: una per la locale impostata (it), una per en, una per fr, una per sp... +* instancesh.php: ritornare di tutte solo quelle che effettivamente sono usate, magari con un count tra () diff --git a/web/admin/imgs/minus.svg b/web/admin/imgs/minus.svg new file mode 100644 index 0000000..0336f55 --- /dev/null +++ b/web/admin/imgs/minus.svg @@ -0,0 +1,83 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/web/admin/imgs/plus.svg b/web/admin/imgs/plus.svg new file mode 100644 index 0000000..0e73bd5 --- /dev/null +++ b/web/admin/imgs/plus.svg @@ -0,0 +1,91 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/web/admin/include/menu.php b/web/admin/include/menu.php index c6927a5..9871388 100644 --- a/web/admin/include/menu.php +++ b/web/admin/include/menu.php @@ -3,12 +3,11 @@ $menu=array( 'istanze'=>array('liadd'=>null, 'href'=>'istanze.php', 'title'=>'Istanze', 'selected'=>false, 'submenu'=> array( - 'aggiungi'=>array('liadd'=>'onclick="golang(\'en\')" onmouseover="this.style.cursor=\'pointer\'"', 'href'=>null, 'title'=>'English', 'selected'=>false, 'submenu'=>null), - 'italiano'=>array('liadd'=>'onclick="golang(\'it\')" onmouseover="this.style.cursor=\'pointer\'"', 'href'=>null, 'title'=>'Italiano', 'selected'=>false, 'submenu'=>null) + 'aggiungi'=>array('liadd'=>null, 'href'=>'editinst?m=new', 'title'=>'Aggiungi', 'selected'=>false, 'submenu'=>null), ) ), - 'boh'=>array('liadd'=>null, 'href'=>'#', 'title'=>'Non saprei', 'selected'=>false, 'submenu'=>null), - 'vedremo'=>array('liadd'=>null, 'href'=>'#', 'title'=>'Vedremo', 'selected'=>false, 'submenu'=>null), + 'blacklist'=>array('liadd'=>null, 'href'=>'#', 'title'=>'Blacklist', 'selected'=>false, 'submenu'=>null), + 'magari'=>array('liadd'=>null, 'href'=>'#', 'title'=>'Chissà', 'selected'=>false, 'submenu'=>null), 'forse'=>array('liadd'=>null, 'href'=>'#', 'title'=>'Forse', 'selected'=>false, 'submenu'=>null) ); diff --git a/web/admin/include/muoribene.php b/web/admin/include/muoribene.php index 20927a8..9c547e7 100644 --- a/web/admin/include/muoribene.php +++ b/web/admin/include/muoribene.php @@ -1,8 +1,8 @@ diff --git a/web/admin/instances.php b/web/admin/instances.php index 15241ad..5d8ce54 100644 --- a/web/admin/instances.php +++ b/web/admin/instances.php @@ -3,11 +3,18 @@ require('include/glob.php'); require('include/muoribene.php'); require('include/sessionstart.php'); + require('include/menu.php'); +$menu['istanze']['href']=null; +$menu['istanze']['selected']=true; buildmenu($menu); require('include/myconn.php'); +$dbg=''; + +use function mysqli_real_escape_string as myesc; + // praticamente una macro function hspech($str) { return(htmlspecialchars($str,ENT_QUOTES|ENT_HTML5,'UTF-8')); @@ -79,6 +86,8 @@ function booly($pre,$val,$nottoobad=false,$invcol=false) { } } +$dbg.='
'.print_r($_POST,1).'
'; + $cols=array( 'New'=>array('name'=>'Nuova','type'=>'bool'), 'Good'=>array('name'=>'Papabile','type'=>'bool'), @@ -90,7 +99,10 @@ $cols=array( 'ShortDesc'=>array('name'=>'Descrizione breve','type'=>'text'), 'LongDesc'=>array('name'=>'Descrizione lunga','type'=>'text'), 'OurDesc'=>array('name'=>'Descrizione nostra','type'=>'text'), - 'PlaceID'=>array('name'=>'Località','type'=>'select'), + + 'PlaceID'=>array('name'=>'[Località]','type'=>'join','join'=>array()), + 'Places.Locality'=>array('name'=>'Località','type'=>'joini','join'=>array('Places ON Places.ID=Instances.PlaceID'),'subtype'=>'text'), + 'Email'=>array('name'=>'Email di contatto','type'=>'text'), 'Software'=>array('name'=>'Software','type'=>'text'), 'Version'=>array('name'=>'Versione','type'=>'text'), @@ -109,20 +121,124 @@ $cols=array( 'AdmURL'=>array('name'=>'Pagina dell’admin','type'=>'text'), 'AdmAvatar'=>array('name'=>'Avatar admin','type'=>'text'), 'AdmNote'=>array('name'=>'Note dell’admin','type'=>'text'), - 'InstLangs'=>array('name'=>'Lingue dichiarate','type'=>'select'), - 'InstOurLangs'=>array('name'=>'Lingue impostate da noi','type'=>'select'), - 'InstFinancing'=>array('name'=>'Modalità di finanziamento','type'=>'select'), - 'InstPolicies'=>array('name'=>'Restrizioni sui contenuti','type'=>'select'), - 'InstTags'=>array('name'=>'Tags','type'=>'select'), + + 'LangID'=>array('name'=>'[Lingue dichiarate]','type'=>'join','join'=>array('InstLangs ON InstLangs.InstID=Instances.ID')), + 'Languages.Code'=>array('name'=>'Lingue dichiarate','type'=>'joini','join'=>array('InstLangs ON InstLangs.InstID=Instances.ID','Languages ON Languages.ID=InstLangs.LangID'),'subtype'=>'text'), + + 'OurLangID'=>array('name'=>'[Lingue impostate da noi]','type'=>'join','join'=>array('InstOurLangs ON InstOurLangs.InstID=Instances.ID')), + 'OurLanguages.Code'=>array('name'=>'Lingue impostate da noi','type'=>'joini','join'=>array('InstOurLangs ON InstOurLangs.InstID=Instances.ID','Languages AS OurLanguages ON OurLanguages.ID=InstOurLangs.OurLangID'),'subtype'=>'text'), + + 'FinID'=>array('name'=>'[Modalità di finanziamento]','type'=>'join','join'=>array('InstFinancing ON InstFinancing.InstID=Instnces.ID')), + 'Financing.Type'=>array('name'=>'Modalità di finanziamento','type'=>'joini','join'=>array('InstFinancing ON InstFinancing.InstID=Instnces.ID','Financing ON Financing.ID=InstFinancing.FinID'),'subtype'=>'text'), + + 'PolID'=>array('name'=>'[Restrizioni sui contenuti]','type'=>'join','join'=>array('InstPolicies ON InstPolicies.InstID=Instances.ID')), + 'Policies.Name'=>array('name'=>'Restrizioni sui contenuti','type'=>'joini','join'=>array('InstPolicies ON InstPolicies.InstID=Instances.ID','Policies ON Policies.ID=InstPolicies.PolID'),'subtype'=>'text'), + + 'TagID'=>array('name'=>'[Tags]','type'=>'join','join'=>array('InstTags ON InstTags.InstID=Instances.ID')), + 'Tags.Name'=>array('name'=>'Tags','type'=>'join','joini'=>array('InstTags ON InstTags.InstID=Instances.ID','Tags ON Tags.ID=InstTags.TagID'),'subtype'=>'text'), + + 'Statuses'=>array('name'=>'Stati ultima settimana','type'=>'int','join'=>'LEFT JOIN InstActivity ON InstActivity.InstID=Instances.ID','select'=>'MAX(Week) AS maxweek'), + 'Logins'=>array('name'=>'Logins ultima settimana','type'=>'int','join'=>'LEFT JOIN InstActivity ON InstActivity.InstID=Instances.ID','select'=>'MAX(Week) AS maxweek'), + 'Registrations'=>array('name'=>'Registrazioni ultima settimana','type'=>'int','join'=>'LEFT JOIN InstActivity ON InstActivity.InstID=Instances.ID','select'=>'MAX(Week) AS maxweek'), ); +$types=array('bool','int','time','text','join','joini'); + $fieldselopts=''; foreach ($cols as $key=>$val) { - $fieldselopts.=''; + if ($val['type']=='joini') { + $fieldselopts.=''; + } else { + $fieldselopts.=''; + } } -$res=mysqli_query($link,'SELECT *, Instances.ID AS IID FROM Instances LEFT JOIN Places ON Places.ID=PlaceID ORDER BY URI ASC LIMIT 50') - or muoribene(mysqli_error($link),false); +/* +[openpar-1] => null +[fieldsel-1] => New§bool +[condsel-1] => IS +[valuesel-1] => TRUE +[closepar-1] => null +[andor-1] => AND +[openpar-2] => ( +[fieldsel-2] => URI§text +[condsel-2] => LIKE +[valueinp-2] => bida +[closepar-2] => null +[andor-2] => OR +[openpar-3] => null +[fieldsel-3] => URI§text +[condsel-3] => IS NULL +[closepar-3] => ) +[andor-3] => AND +[openpar-4] => null +[fieldsel-4] => PlaceID§join +[condsel-4] => = +[valuesel-4] => 1 +[closepar-4] => null +[andor-4] => AND +[openpar-5] => null +[fieldsel-5] => UserCount§int +[condsel-5] => >= +[valueinp-5] => 123 +[closepar-5] => null +[andor-5] => AND +[openpar-6] => null +[fieldsel-6] => LangID§join +[condsel-6] => = +[valuesel-6] => 20 +[closepar-6] => null +*/ + +$joins=array(); +$where=''; +foreach ($_POST as $key=>$val) { + if (preg_match('/^openpar-\d+/',$key)===1 && preg_match('/^\(+$/',$val)===1) + $where.=$val; + if (preg_match('/^fieldsel-\d+/',$key)===1 && preg_match('/^(.+)§(.+)§(.+)$/',$val,$buf)===1) { + if (array_key_exists($buf[1],$cols) && in_array($buf[2],$types)) { + $where.=$buf[1]; + if ($buf[2]=='join' || $buf[2]=='joini') { + foreach ($cols[$buf[1]]['join'] as $join) { + if (!in_array($join,$joins)) + $joins[]=$join; + } + } + } else { + muoribene($dbg.'
Dati POST corrotti.
Puoi riprovare o tornare al login.',true); + } + } + if (preg_match('/^condsel-\d+/',$key)===1) { + $where.=' '.$val.' '; + $cond=$val; + } + if (preg_match('/^valuesel-\d+/',$key)===1) + $where.=$val; + if (preg_match('/^valueinp-\d+/',$key)===1) { + if (preg_match('/^(LIKE|NOT LIKE)$/',$cond)===1) + $where.='\'%'.myesc($link,$val).'%\''; + else + $where.='\''.myesc($link,$val).'\''; + } + if (preg_match('/^closepar-\d+/',$key)===1 && preg_match('/^\)+$/',$val)===1) + $where.=$val; + if (preg_match('/^andor-\d+/',$key)===1 && preg_match('/^(AND|OR)$/',$val)===1) + $where.=' '.$val.' '; +} +if ($where!='') + $where='WHERE '.$where; +if (count($joins)>0) + $joins='LEFT JOIN '.implode(' LEFT JOIN ',$joins); +else + $joins=''; + +$query='SELECT *, Instances.ID AS IID FROM Instances '.$joins.' '.$where.' GROUP BY IID ORDER BY Instances.URI ASC LIMIT 50'; +$dbg.='QUERONA: '.$query.'
'.N; +$res=mysqli_query($link,$query) + or muoribene($dbg.'
'.$query.': '.mysqli_error($link),true); + + + if (mysqli_num_rows($res)<1) { $out='

Nessuna istanza da mostrare.

'.N; } else { @@ -131,7 +247,7 @@ if (mysqli_num_rows($res)<1) { $out.=''.N; // $out.=''.N; $out.=''.N; - $out.=''.N; + $out.=''.N; $attr=booly($cols['Blacklisted']['name'].': ',$row['Blacklisted'],false,true).N; $attr.=booly($cols['New']['name'].': ',$row['New'],true).N; $attr.=booly($cols['Good']['name'].': ',$row['Good']).N; @@ -140,7 +256,7 @@ if (mysqli_num_rows($res)<1) { /* $attr.=booly($cols['RegOpen']['name'].': ',$row['RegOpen']).N; $attr.=booly($cols['RegReqApproval']['name'].': ',$row['RegReqApproval'],true,true).N;*/ $sres=mysqli_query($link,'SELECT * FROM InstChecks WHERE InstID='.$row['IID'].' ORDER BY Time DESC') - or muoribene(mysqli_error($link),false); + or muoribene(mysqli_error($link),true); $csres=mysqli_num_rows($sres); if ($csres>0) { $bene=0; @@ -160,10 +276,10 @@ if (mysqli_num_rows($res)<1) { } $attr.='
Attività delle ultime 12 settimane
'.N; $sres=mysqli_query($link,'SELECT SUM(Statuses) AS tstatuses, SUM(Logins) AS tlogins, SUM(Registrations) AS tregs FROM InstActivity WHERE InstID='.$row['IID']) - or muoribene(mysqli_error($link),false); + or muoribene(mysqli_error($link),true); $tot=mysqli_fetch_assoc($sres); $sres=mysqli_query($link,'SELECT * FROM InstActivity WHERE InstID='.$row['IID'].' ORDER BY Week DESC') - or muoribene(mysqli_error($link),false); + or muoribene(mysqli_error($link),true); if (mysqli_num_rows($sres)>0) { $attr.='
Stati: '.$tot['tstatuses'].'
Accessi: '.$tot['tlogins'].'
Registrazioni: '.$tot['tregs'].'
'.N; while ($srow=mysqli_fetch_assoc($sres)) { @@ -180,7 +296,7 @@ if (mysqli_num_rows($res)<1) { } $attr.='
Hashtags più usati durante l’ultima settimana
'.N; $sres=mysqli_query($link,'SELECT * FROM InstTrends WHERE InstID='.$row['IID'].' ORDER BY Pos ASC') - or muoribene(mysqli_error($link),false); + or muoribene(mysqli_error($link),true); if (mysqli_num_rows($sres)>0) { $attr.='
    '.N; while ($srow=mysqli_fetch_assoc($sres)) { @@ -200,7 +316,7 @@ if (mysqli_num_rows($res)<1) { $out.='
    '.$cols['OurDesc']['name'].': '.nully($row['OurDesc'],true,'strip').'
    '.N; $out.='
    '.$cols['PlaceID']['name'].': '.nully($row['PlaceID'],true,'strip').'
    '.N; $sres=mysqli_query($link,'SELECT * FROM InstLangs LEFT JOIN Languages ON Languages.ID=LangID WHERE InstID='.$row['IID'].' ORDER BY Pos ASC') - or muoribene(mysqli_error($link),false); + or muoribene(mysqli_error($link),true); if (mysqli_num_rows($sres)>0) { $i=0; $buf=array(); @@ -208,12 +324,12 @@ if (mysqli_num_rows($res)<1) { $i++; $buf[]=$i.': '.hspech($srow['Code'].' ['.ucfirst(locale_get_display_name($srow['Code'])).']'); } - $out.='
    '.$cols['InstLangs']['name'].': '.implode('; ',$buf).'
    '.N; + $out.='
    '.$cols['LangID']['name'].': '.implode('; ',$buf).'
    '.N; } else { - $out.='
    '.$cols['InstLangs']['name'].': Non definite
    '.N; + $out.='
    '.$cols['LangID']['name'].': Non definite
    '.N; } - $sres=mysqli_query($link,'SELECT * FROM InstOurLangs LEFT JOIN Languages ON Languages.ID=LangID WHERE InstID='.$row['IID'].' ORDER BY Pos ASC') - or muoribene(mysqli_error($link),false); + $sres=mysqli_query($link,'SELECT * FROM InstOurLangs LEFT JOIN Languages ON Languages.ID=OurLangID WHERE InstID='.$row['IID'].' ORDER BY Pos ASC') + or muoribene(mysqli_error($link),true); if (mysqli_num_rows($sres)>0) { $i=0; $buf=array(); @@ -221,12 +337,12 @@ if (mysqli_num_rows($res)<1) { $i++; $buf[]=$i.': '.hspech($srow['Code'].' ['.ucfirst(locale_get_display_name($srow['Code'],'it')).']'); } - $out.='
    '.$cols['InstOurLangs']['name'].': '.implode('; ',$buf).'
    '.N; + $out.='
    '.$cols['OurLangID']['name'].': '.implode('; ',$buf).'
    '.N; } else { - $out.='
    '.$cols['InstOurLangs']['name'].': Non definite
    '.N; + $out.='
    '.$cols['OurLangID']['name'].': Non definite
    '.N; } $sres=mysqli_query($link,'SELECT * FROM InstFinancing LEFT JOIN Financing ON Financing.ID=FinID WHERE InstID='.$row['IID'].' ORDER BY Pos ASC') - or muoribene(mysqli_error($link),false); + or muoribene(mysqli_error($link),true); if (mysqli_num_rows($sres)>0) { $i=0; $buf=array(); @@ -234,12 +350,12 @@ if (mysqli_num_rows($res)<1) { $i++; $buf[]=$i.': '.hspech($srow['Type']).' ('.hspech($row['Details']).')'; } - $out.='
    '.$cols['InstFinancing']['name'].': '.implode('; ',$buf).'
    '.N; + $out.='
    '.$cols['FinID']['name'].': '.implode('; ',$buf).'
    '.N; } else { - $out.='
    '.$cols['InstFinancing']['name'].': Non definite
    '.N; + $out.='
    '.$cols['FinID']['name'].': Non definite
    '.N; } $sres=mysqli_query($link,'SELECT * FROM InstPolicies LEFT JOIN Policies ON Policies.ID=PolID WHERE InstID='.$row['IID'].' ORDER BY Pos ASC') - or muoribene(mysqli_error($link),false); + or muoribene(mysqli_error($link),true); if (mysqli_num_rows($sres)>0) { $i=0; $buf=array(); @@ -247,12 +363,12 @@ if (mysqli_num_rows($res)<1) { $i++; $buf[]=$i.': '.hspech($srow['Name']); } - $out.='
    '.$cols['InstPolicies']['name'].': '.implode('; ',$buf).'
    '.N; + $out.='
    '.$cols['PolID']['name'].': '.implode('; ',$buf).'
    '.N; } else { - $out.='
    '.$cols['InstPolicies']['name'].': Non definite
    '.N; + $out.='
    '.$cols['PolID']['name'].': Non definite
    '.N; } $sres=mysqli_query($link,'SELECT * FROM InstTags LEFT JOIN Tags ON Tags.ID=TagID WHERE InstID='.$row['IID'].' ORDER BY Pos ASC') - or muoribene(mysqli_error($link),false); + or muoribene(mysqli_error($link),true); if (mysqli_num_rows($sres)>0) { $i=0; $buf=array(); @@ -260,9 +376,9 @@ if (mysqli_num_rows($res)<1) { $i++; $buf[]=$i.': '.hspech($srow['Name']); } - $out.='
    '.$cols['InstTags']['name'].': '.implode('; ',$buf).'
    '.N; + $out.='
    '.$cols['TagID']['name'].': '.implode('; ',$buf).'
    '.N; } else { - $out.='
    '.$cols['InstTags']['name'].': Non definite
    '.N; + $out.='
    '.$cols['TagID']['name'].': Non definite
    '.N; } $out.='
    '.$cols['Email']['name'].': '.nully($row['Email'],true,'email').'
    '.N; $out.='
    '.$cols['Software']['name'].': '.nully($row['Software'],false,'strip').'
    '.N; @@ -285,7 +401,7 @@ if (mysqli_num_rows($res)<1) { $out.='
'.N; $out.='
AttributiInfo
'.$row['URI'].'
'.$row['URI'].' {'.$row['IID'].'}
'.N; } - $out.='
'; + $out.='
'; } mysqli_close($link); @@ -302,6 +418,7 @@ mysqli_close($link); + @@ -497,23 +666,45 @@ function remrow(index) { +
Mostra plancia
+ + + + +
+ +
- - +
+
+
+ + +
+ + +
+
diff --git a/web/admin/instancesh.php b/web/admin/instancesh.php new file mode 100644 index 0000000..bc94a5a --- /dev/null +++ b/web/admin/instancesh.php @@ -0,0 +1,44 @@ +array('select'=>'SELECT Places.ID AS Pid, CONCAT(Locality,\' (\',COUNT(Places.ID),\')\') AS Txt FROM Instances LEFT JOIN Places ON Places.ID=PlaceID WHERE PlaceID IS NOT NULL ORDER BY Locality ASC','optcol'=>'Pid','txtcol'=>'Txt'), + 'LangID'=>array('select'=>'SELECT Languages.ID AS Lid, CONCAT(Code,\' (\',COUNT(Languages.ID),\')\') AS Txt FROM InstLangs LEFT JOIN Languages ON Languages.ID=LangID GROUP BY Languages.ID ORDER BY Code ASC','optcol'=>'Lid','txtcol'=>'Txt'), + 'OurLangID'=>array('select'=>'SELECT Languages.ID AS Lid, CONCAT(Code,\' (\',COUNT(Languages.ID),\')\') AS Txt FROM InstOurLangs LEFT JOIN Languages ON Languages.ID=OurLangID GROUP BY Languages.ID ORDER BY Code ASC','optcol'=>'Lid','txtcol'=>'Txt'), + 'FinID'=>array('select'=>'SELECT Financing.ID AS Fid, CONCAT(Type,\' (\',COUNT(Financing.ID),\')\') AS Txt FROM InstFinancing LEFT JOIN Financing ON Financing.ID=FinID GROUP BY Financing.ID ORDER BY Type ASC ','optcol'=>'Fid','txtcol'=>'Txt'), + 'PolID'=>array('select'=>'SELECT Policies.ID AS Pid, CONCAT(Name,\' (\',COUNT(Policies.ID),\')\') AS Txt FROM InstPolicies LEFT JOIN Policies ON Policies.ID=PolID GROUP BY Policies.ID ORDER BY Name ASC','optcol'=>'Pid','txtcol'=>'Txt'), + 'TagID'=>array('select'=>'SELECT Tags.ID AS Tid, CONCAT(Name,\' (\',COUNT(Tags.ID),\')\') AS Txt FROM InstTags LEFT JOIN Tags ON Tags.ID=TagID GROUP BY (Tags.ID) ORDER BY Name ASC','optcol'=>'Tid','txtcol'=>'Txt'), +); + +if (array_key_exists('key',$_GET) && array_key_exists('parsel',$_GET) && array_key_exists($_GET['key'],$cols)) { + require('include/myconn.php'); + $res=mysqli_query($link,$cols[$_GET['key']]['select']) + or muoribene(mysqli_error($link),true); + mysqli_close($link); + $jsout='e=window.parent.document.getElementById(\''.$_GET['parsel'].'\');'.N; + while ($row=mysqli_fetch_assoc($res)) { + $jsout.='o=new Option('.json_encode($row[$cols[$_GET['key']]['txtcol']]).','.$row[$cols[$_GET['key']]['optcol']].');e.add(o);'.N; + } +} + +$out='Ciao!'; + +?> + + + +Mastodon Startpage Admin - Istanze - Helper + + + + + + + diff --git a/web/admin/js/confirma.js b/web/admin/js/confirma.js new file mode 100644 index 0000000..6f116a9 --- /dev/null +++ b/web/admin/js/confirma.js @@ -0,0 +1,4 @@ +function confirma(msg,act) { + document.getElementById('popupcont').innerHTML='

Attenzione

'+msg+''; + document.getElementById('popup').style.display='table'; +} diff --git a/web/admin/theme.css b/web/admin/theme.css index b14e3db..519d8e9 100644 --- a/web/admin/theme.css +++ b/web/admin/theme.css @@ -34,18 +34,21 @@ ul { p { margin-bottom: 10px; } +.bigtabfoot { + height: 32px; +} .bigtab { background-color: white; font-size: 10pt; margin-left: auto; margin-right: auto; /*max-width: 100%;*/ - margin-top: 36px; + margin-top: 32px; } .bigtab thead { padding: 3px; /* position: sticky; - top: 36px;*/ + top: 32px;*/ color: white; height: 30px; } @@ -226,7 +229,7 @@ input { height: 36px; } #popup { - z-index: 1; + z-index: 2; display: none; top: 0px; position: fixed; @@ -235,7 +238,7 @@ input { background-color: rgba(0,0,0,0.75); color: white; padding: 0; - font-size: 12pt; + font-size: 9pt; } #inpopup { display: table-cell; @@ -253,15 +256,20 @@ input { padding: 5px; text-align: left; } +.pupbut { + margin-top: 5px; + width: 100%; + height: 24px; +} #footer { color: white; position: fixed; - height: 36px; + height: 32px; width: 100%; bottom: 0; left: 0; background-color: rgba(0,0,0,0.85); - line-height: 36px; + line-height: 32px; vertical-align: middle; } .nully { @@ -270,21 +278,36 @@ input { } #hmenu { - font-size: 12pt; + font-size: 10pt; background-color: rgba(0,0,0,0.85); color: white; position: fixed; top: 0; left: 0; width: 100%; - height: 36px; + height: 32px; margin: 0; padding: 0; /*box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4);*/ - /*padding-left: 36px;*/ - z-index: 2; + /*padding-left: 32px;*/ + z-index: 1; /*display: none;*/ } +#hmenu #rightdiv { + position: absolute; + top: 0; + right: 0; + color: #78b1e2; + height: 32px; + line-height: 32px; + vertical-align: middle; + padding-right: 10px; + padding-left: 10px; +} +#hmenu #rightdiv:hover { + cursor: pointer; + background-color: rgba(255,255,255,0.10); +} #hmenu ul { list-style-type: none; margin: 0; @@ -292,51 +315,51 @@ input { overflow: visible; } #hmenu ul li { - width: 80pt; - height: 36px; + width: 80px; + height: 32px; text-align: center; display: table-cell; vertical-align: middle; - color: #3088D4; + color: #78b1e2; } #hmenu ul li:hover { background-color: rgba(255,255,255,0.10); cursor: default; } #hmenu ul li a { - width: 80pt; - line-height: 36px; + width: 80px; + line-height: 32px; display: block; - color: #3088D4; + color: #78b1e2; } #hmenu .ula { position: absolute; - top: 36px; + top: 32px; background-color: rgba(0,0,0,0.85); display: none; } #hmenu .ulb { background-color: rgba(0,0,0,0.85); - left: 80pt; + left: 80px; position: relative; - top: -36px; + top: -32px; display: none; } #hmenu .ula li, .ulb li { - width: 80pt; - height: 36px; + width: 80px; + height: 32px; display: block; float: none; text-align: center; - line-height: 36px; + line-height: 32px; vertical-align: middle; } #hmenu .ula li:hover, .ulb li:hover { text-decoration: underline; } #hmenu .hil { - background-color: rgba(255,255,255,0.10); - color: #97C3E9; + background-color: rgba(34,104,170,0.40); + color: white; } #hmenu .hil:hover { cursor: default; @@ -350,13 +373,18 @@ input { position: fixed; left: 50%; transform: translateX(-50%); - margin-top: 36px; + top: 32px; max-width: 100%; background-color: rgba(0,0,0,0.85); padding: 1px; border-radius: 0 0 7px 7px; font-size: 9pt; color: #3088D4; + display: none; +} +#plancia .planciatab { + margin-right: auto; + margin-left: auto; } #plancia select, input, button { margin: 0; @@ -368,6 +396,9 @@ input { } /* questi li definisco e li applico solo per avere qualcosa su cui fare "querySelectorAll" */ #plancia .openpar, .fieldsel, .condsel, .valuesel, .valueinp, .andor, .plusminus, .closepar { } +#plancia .valuesel { + min-width: 120px; +} #plancia .minus, .plus { width: 22px; height: 22px; @@ -376,7 +407,22 @@ input { cursor: pointer; } #plancia .ctrlbut { + font-weight: bold; width: 100%; + min-width: 320px; +} + +#helper, #debug { + position: fixed; + right: 0; + top: 32px; + width: 320px; + height: 240px; +} + +#debug { + left: 0; + font-size: 8pt; } @media only screen and (max-width:720px) { diff --git a/web/admin/zzz-materiali/mastostart.sql b/web/admin/zzz-materiali/mastostart.sql index 6484106..9369e33 100644 --- a/web/admin/zzz-materiali/mastostart.sql +++ b/web/admin/zzz-materiali/mastostart.sql @@ -1,9 +1,9 @@ -- phpMyAdmin SQL Dump --- version 4.9.2 +-- version 5.0.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost --- Creato il: Gen 01, 2020 alle 20:19 +-- Creato il: Gen 08, 2020 alle 14:46 -- Versione del server: 10.4.11-MariaDB -- Versione PHP: 7.4.1 @@ -61,8 +61,7 @@ CREATE TABLE `Blacklist` ( CREATE TABLE `Financing` ( `ID` int(10) UNSIGNED NOT NULL, - `Type` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, - `Details` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL + `Type` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- @@ -164,7 +163,7 @@ CREATE TABLE `InstLangs` ( CREATE TABLE `InstOurLangs` ( `ID` bigint(20) UNSIGNED NOT NULL, `InstID` bigint(20) UNSIGNED NOT NULL, - `LangID` int(10) UNSIGNED NOT NULL, + `OurLangID` int(10) UNSIGNED NOT NULL, `Pos` tinyint(3) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -468,3 +467,4 @@ COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +