2017-08-04 16:28:16 +02:00
< ? php
2020-09-07 15:04:06 +02:00
/*
* OpenSTAManager : il software gestionale open source per l ' assistenza tecnica e la fatturazione
* Copyright ( C ) DevCode s . n . c .
*
* This program is free software : you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program . If not , see < https :// www . gnu . org / licenses />.
*/
2017-08-04 16:28:16 +02:00
include_once __DIR__ . '/../core.php' ;
2018-02-14 11:10:03 +01:00
$paths = App :: getPaths ();
2018-02-20 14:23:00 +01:00
$user = Auth :: user ();
2018-02-14 11:10:03 +01:00
2019-01-11 12:02:11 +01:00
$pageTitle = ! empty ( $pageTitle ) ? $pageTitle : $structure -> title ;
2018-09-19 10:44:32 +02:00
2018-07-19 17:29:21 +02:00
$messages = flash () -> getMessages ();
2018-07-07 13:56:22 +02:00
2018-02-04 17:31:33 +01:00
echo ' <! DOCTYPE html >
2017-08-04 16:28:16 +02:00
< html >
< head >
< meta charset = " UTF-8 " >
2017-09-04 12:02:29 +02:00
< title > '.$pageTitle.' - '.tr(' OpenSTAManager ').' </ title >
2017-08-04 16:28:16 +02:00
< meta http - equiv = " X-UA-Compatible " content = " IE=edge " >
< meta content = " width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no " name = " viewport " >
2018-06-28 15:52:56 +02:00
< meta name = " robots " content = " noindex,nofollow " >
2020-06-30 17:38:19 +02:00
2018-04-13 17:46:13 +02:00
< link href = " '. $paths['img'] .'/favicon.png " rel = " icon " type = " image/x-icon " /> ' ;
2017-08-04 16:28:16 +02:00
2020-09-23 13:36:37 +02:00
if ( file_exists ( base_dir () . '/manifest.json' )) {
2019-08-02 10:38:55 +02:00
echo '
2020-09-23 17:53:19 +02:00
< link rel = " manifest " href = " '.base_path().'/manifest.json " > ' ;
2019-08-02 10:38:55 +02:00
}
2018-06-23 15:41:32 +02:00
// CSS
foreach ( App :: getAssets ()[ 'css' ] as $style ) {
echo '
< link rel = " stylesheet " type = " text/css " media = " all " href = " '. $style .' " /> ' ;
}
2017-08-04 16:28:16 +02:00
2018-06-23 15:41:32 +02:00
// Print CSS
foreach ( App :: getAssets ()[ 'print' ] as $style ) {
2017-08-04 16:28:16 +02:00
echo '
2018-06-23 15:41:32 +02:00
< link rel = " stylesheet " type = " text/css " media = " print " href = " '. $style .' " /> ' ;
2017-08-04 16:28:16 +02:00
}
if ( Auth :: check ()) {
echo '
< script >
search = [] ' ;
2018-09-27 10:15:04 +02:00
$array = $_SESSION [ 'module_' . $id_module ];
if ( ! empty ( $array )) {
foreach ( $array as $field => $value ) {
2020-10-29 16:48:37 +01:00
if ( ! empty ( $value ) && string_starts_with ( $field , 'search_' )) {
2018-09-27 10:15:04 +02:00
$field_name = str_replace ( 'search_' , '' , $field );
echo '
2017-08-04 16:28:16 +02:00
search . push ( " search_'. $field_name .' " );
2020-06-30 17:38:19 +02:00
search [ " search_'. $field_name .' " ] = " '.addslashes( $value ).' " ; ' ;
2017-08-04 16:28:16 +02:00
}
}
}
echo '
translations = { ' ;
$translations = [
2017-09-04 12:02:29 +02:00
'day' => tr ( 'Giorno' ),
'week' => tr ( 'Settimana' ),
'month' => tr ( 'Mese' ),
'today' => tr ( 'Oggi' ),
2017-09-14 16:20:11 +02:00
'firstThreemester' => tr ( 'I trimestre' ),
'secondThreemester' => tr ( 'II trimestre' ),
'thirdThreemester' => tr ( 'III trimestre' ),
'fourthThreemester' => tr ( 'IV trimestre' ),
'firstSemester' => tr ( 'I semestre' ),
'secondSemester' => tr ( 'II semestre' ),
2017-09-04 12:02:29 +02:00
'thisMonth' => tr ( 'Questo mese' ),
'lastMonth' => tr ( 'Mese scorso' ),
'thisYear' => tr ( " Quest'anno " ),
'lastYear' => tr ( 'Anno scorso' ),
'apply' => tr ( 'Applica' ),
'cancel' => tr ( 'Annulla' ),
'from' => tr ( 'Da' ),
'to' => tr ( 'A' ),
'custom' => tr ( 'Personalizzato' ),
'delete' => tr ( 'Elimina' ),
'deleteTitle' => tr ( 'Sei sicuro?' ),
'deleteMessage' => tr ( 'Eliminare questo elemento?' ),
2018-08-31 18:06:44 +02:00
'errorTitle' => tr ( 'Errore' ),
'errorMessage' => tr ( " Si è verificato un errore nell'esecuzione dell'operazione richiesta " ),
2017-09-04 12:02:29 +02:00
'close' => tr ( 'Chiudi' ),
'filter' => tr ( 'Filtra' ),
'long' => tr ( 'La ricerca potrebbe richiedere del tempo' ),
'details' => tr ( 'Dettagli' ),
2020-09-14 10:22:04 +02:00
'loading' => tr ( 'Caricamento' ),
2017-09-04 12:02:29 +02:00
'waiting' => tr ( 'Impossibile procedere' ),
'waiting_msg' => tr ( 'Prima di proseguire devi selezionare alcuni elementi!' ),
2019-05-24 21:36:35 +02:00
'hooksExecuting' => tr ( 'Hooks in esecuzione' ),
2019-05-17 05:56:10 +02:00
'hookExecuting' => tr ( 'Hook "_NAME_" in esecuzione' ),
'hookMultiple' => tr ( 'Hai _NUM_ notifiche' ),
'hookSingle' => tr ( 'Hai 1 notifica' ),
'hookNone' => tr ( 'Nessuna notifica' ),
2019-07-23 12:13:58 +02:00
'singleCalendar' => tr ( " E' presente un solo periodo! " ),
2017-08-04 16:28:16 +02:00
];
foreach ( $translations as $key => $value ) {
echo '
2019-07-11 12:04:22 +02:00
'.$key.' : " '.addslashes( $value ).' " , ' ;
2017-08-04 16:28:16 +02:00
}
echo '
2020-08-03 12:08:52 +02:00
ajax : {
" missing " : {
" title " : " '.tr('Errore').' " ,
" text " : " '.tr('Alcuni campi obbligatori non sono stati compilati correttamente').' " ,
},
" error " : {
" title " : " '.tr('Errore').' " ,
" text " : " '.tr('Errore durante il salvataggio del record').' " ,
}
},
2019-08-02 15:58:31 +02:00
password : {
2019-07-30 16:51:33 +02:00
" wordMinLength " : " '.tr('La password è troppo corta').' " ,
" wordMaxLength " : " '.tr('La password è troppo lunga').' " ,
" wordInvalidChar " : " '.tr('La password contiene un carattere non valido').' " ,
2019-07-19 09:32:50 +02:00
" wordNotEmail " : " '.tr('Non usare la tua e-mail come password').' " ,
2019-07-30 16:51:33 +02:00
" wordSimilarToUsername " : " '.tr('La password non può contenere il tuo nome').' " ,
2019-07-19 09:32:50 +02:00
" wordTwoCharacterClasses " : " '.tr('Usa classi di caratteri diversi').' " ,
2019-07-30 16:51:33 +02:00
" wordRepetitions " : " '.tr('La password contiene ripetizioni').' " ,
" wordSequences " : " '.tr('La password contiene sequenze').' " ,
" errorList " : " '.tr('Attenzione').': " ,
2019-07-19 09:32:50 +02:00
" veryWeak " : " '.tr('Molto debole').' " ,
" weak " : " '.tr('Debole').' " ,
" normal " : " '.tr('Normale').' " ,
" medium " : " '.tr('Media').' " ,
" strong " : " '.tr('Forte').' " ,
" veryStrong " : " '.tr('Molto forte').' " ,
},
2019-08-02 15:58:31 +02:00
datatables : {
" emptyTable " : " '.tr('Nessun dato presente nella tabella').' " ,
" info " : " '.tr('Vista da _START_ a _END_ di _TOTAL_ elementi').' " ,
" infoEmpty " : " '.tr('Vista da 0 a 0 di 0 elementi').' " ,
" infoFiltered " : " ('.tr('filtrati da _MAX_ elementi totali').') " ,
" infoPostFix " : " " ,
" lengthMenu " : " '.tr('Visualizza _MENU_ elementi').' " ,
" loadingRecords " : " " ,
" processing " : " '.tr('Elaborazione').'... " ,
" search " : " '.tr('Cerca').': " ,
" zeroRecords " : " '.tr('La ricerca non ha portato alcun risultato').'. " ,
" paginate " : {
" first " : " '.tr('Inizio').' " ,
" previous " : " '.tr('Precedente').' " ,
" next " : " '.tr('Successivo').' " ,
" last " : " '.tr('Fine').' "
},
},
2017-08-04 16:28:16 +02:00
};
globals = {
2020-09-23 17:53:19 +02:00
rootdir : " '.base_path().' " ,
2019-07-11 12:04:22 +02:00
js : " '. $paths['js'] .' " ,
css : " '. $paths['css'] .' " ,
img : " '. $paths['img'] .' " ,
2018-02-23 09:49:31 +01:00
2019-07-11 12:04:22 +02:00
id_module : " '. $id_module .' " ,
id_record : " '. $id_record .' " ,
2020-06-30 17:38:19 +02:00
2019-07-26 17:40:52 +02:00
is_mobile : '.isMobile().' ,
2018-02-23 09:49:31 +01:00
2018-07-08 18:11:17 +02:00
cifre_decimali : '.setting(' Cifre decimali per importi ').' ,
2018-02-23 09:49:31 +01:00
2019-08-02 15:58:31 +02:00
timestamp_format : " '.formatter()->getTimestampPattern().' " ,
date_format : " '.formatter()->getDatePattern().' " ,
time_format : " '.formatter()->getTimePattern().' " ,
2018-09-20 12:05:22 +02:00
decimals : " '.formatter()->getNumberSeparators()['decimals'].' " ,
thousands : " '.formatter()->getNumberSeparators()['thousands'].' " ,
2019-04-13 00:09:48 +02:00
currency : " '.currency().' " ,
2018-02-23 09:49:31 +01:00
2017-08-04 16:28:16 +02:00
search : search ,
translations : translations ,
2019-08-02 15:58:31 +02:00
locale : " '.(explode('_', $lang )[0]).' " ,
full_locale : " '. $lang .' " ,
2018-02-23 09:49:31 +01:00
2019-07-11 12:04:22 +02:00
start_date : " '. $_SESSION['period_start'] .' " ,
start_date_formatted : " '.Translator::dateToLocale( $_SESSION['period_start'] ).' " ,
end_date : " '. $_SESSION['period_end'] .' " ,
end_date_formatted : " '.Translator::dateToLocale( $_SESSION['period_end'] ).' " ,
2018-02-23 09:49:31 +01:00
ckeditorToolbar : [
2018-11-20 21:30:58 +01:00
[ " Undo " , " Redo " , " - " , " Cut " , " Copy " , " Paste " , " PasteText " , " PasteFromWord " , " - " , " Scayt " , " - " , " Link " , " Unlink " , " - " , " Bold " , " Italic " , " Underline " , " Superscript " , " SpecialChar " , " HorizontalRule " , " - " , " JustifyLeft " , " JustifyCenter " , " JustifyRight " , " JustifyBlock " , " - " , " NumberedList " , " BulletedList " , " Outdent " , " Indent " , " Blockquote " , " - " , " Styles " , " Format " , " Image " , " Table " , " TextColor " , " BGColor " ],
2018-02-23 09:49:31 +01:00
],
2020-06-30 17:38:19 +02:00
2019-07-11 12:04:22 +02:00
order_manager_id : " '.( $dbo->isInstalled () ? Modules::get('Stato dei servizi')['id'] : '').' " ,
2019-07-09 12:29:39 +02:00
dataload_page_buffer : '.setting(' Lunghezza in pagine del buffer Datatables ').' ,
2018-07-08 18:11:17 +02:00
tempo_attesa_ricerche : '.setting(' Tempo di attesa ricerche in secondi ').' ,
2020-07-16 17:31:30 +02:00
restrict_summables_to_selected : '.setting(' Totali delle tabelle ristretti alla selezione ').' ,
2017-08-04 16:28:16 +02:00
};
</ script > ' ;
2018-07-03 11:12:32 +02:00
} else {
echo '
2018-07-09 10:44:54 +02:00
< script >
globals = {
2020-09-23 17:53:19 +02:00
rootdir : " '.base_path().' " ,
2020-06-30 17:38:19 +02:00
2019-07-08 12:41:37 +02:00
search : {},
2019-07-19 09:32:50 +02:00
translations : {
password : {
" wordMinLength " : " '.tr('La tua password è troppo corta').' " ,
" wordMaxLength " : " '.tr('La tua password è troppo lunga').' " ,
" wordInvalidChar " : " '.tr('La tua password contiene un carattere non valido').' " ,
" wordNotEmail " : " '.tr('Non usare la tua e-mail come password').' " ,
" wordSimilarToUsername " : " '.tr('La tua password non può contenere il tuo nome').' " ,
" wordTwoCharacterClasses " : " '.tr('Usa classi di caratteri diversi').' " ,
" wordRepetitions " : " '.tr('Troppe ripetizioni').' " ,
" wordSequences " : " '.tr('La tua password contiene sequenze').' " ,
" errorList " : " '.tr('Errori').': " ,
" veryWeak " : " '.tr('Molto debole').' " ,
" weak " : " '.tr('Debole').' " ,
" normal " : " '.tr('Normale').' " ,
" medium " : " '.tr('Media').' " ,
" strong " : " '.tr('Forte').' " ,
" veryStrong " : " '.tr('Molto forte').' " ,
},
},
2020-06-30 17:38:19 +02:00
2019-08-02 15:58:31 +02:00
timestamp_format : " '.formatter()->getTimestampPattern().' " ,
date_format : " '.formatter()->getDatePattern().' " ,
time_format : " '.formatter()->getTimePattern().' " ,
locale : " '.(explode('_', $lang )[0]).' " ,
full_locale : " '. $lang .' " ,
2018-07-09 10:44:54 +02:00
};
</ script > ' ;
2017-08-04 16:28:16 +02:00
}
2018-06-23 15:41:32 +02:00
// JS
foreach ( App :: getAssets ()[ 'js' ] as $js ) {
2017-08-04 16:28:16 +02:00
echo '
< script type = " text/javascript " charset = " utf-8 " src = " '. $js .' " ></ script > ' ;
}
// Impostazioni di default per gli alert
echo '
< script >
swal . setDefaults ({
buttonsStyling : false ,
confirmButtonClass : " btn btn-lg btn-primary " ,
cancelButtonClass : " btn btn-lg " ,
2017-09-04 12:02:29 +02:00
cancelButtonText : " '.tr('Annulla').' " ,
2017-08-04 16:28:16 +02:00
});
</ script > ' ;
2018-07-02 16:56:00 +02:00
if ( Auth :: check ()) {
2018-07-09 10:44:54 +02:00
if ( setting ( 'Abilita esportazione Excel e PDF' )) {
2018-07-02 16:56:00 +02:00
echo '
< script type = " text/javascript " charset = " utf-8 " src = " https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js " ></ script >
< script type = " text/javascript " charset = " utf-8 " src = " https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js " ></ script >
< script type = " text/javascript " charset = " utf-8 " src = " https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js " ></ script > ' ;
}
2020-02-20 02:02:01 +01:00
if ( setting ( 'Attiva scorciatoie da tastiera' )) {
echo '<script type="text/javascript" charset="utf-8" src="' . App :: getPaths ()[ 'js' ] . '/hotkeys-js/hotkeys.min.js"></script>' ;
echo '
< script >
2020-02-28 00:22:12 +01:00
hotkeys ( \ ' f1\ ' , \ ' save\ ' , function ( event , handler ){
2020-02-20 02:02:01 +01:00
event . preventDefault ();
$ ( " button[data-toggle] " ) . first () . trigger ( " click " );
});
hotkeys . setScope ( \ ' save\ ' );
</ script > ' ;
}
2017-08-04 16:28:16 +02:00
}
2020-09-23 17:53:19 +02:00
$settings_collapse = session_get ( 'settings.sidebar-collapse' ) ? 1 : 0 ;
2020-09-22 20:28:37 +02:00
$hide_sidebar = Auth :: check () && ( setting ( 'Nascondere la barra sinistra di default' ) || $settings_collapse );
2017-08-04 16:28:16 +02:00
echo '
</ head >
2017-09-10 18:29:51 +02:00
< body class = " skin-'. $theme .(!empty( $hide_sidebar ) ? ' sidebar-collapse' : '').(!Auth::check() ? ' hold-transition login-page' : '').' " >
2018-06-27 12:28:28 +02:00
< div class = " '.(!Auth::check() ? '' : 'wrapper').' " > ' ;
2017-08-04 16:28:16 +02:00
if ( Auth :: check ()) {
2020-09-24 00:07:54 +02:00
$calendar_color_label = ( $_SESSION [ 'period_start' ] != date ( 'Y' ) . '-01-01' || $_SESSION [ 'period_end' ] != date ( 'Y' ) . '-12-31' ) ? 'danger' : 'default' ;
2017-08-04 16:28:16 +02:00
echo '
<!-- Loader principale -->
< div id = " main_loading " >
< div >
< i class = " fa fa-cog fa-spin text-danger " ></ i >
</ div >
</ div >
<!-- Loader secondario -->
< div id = " mini-loader " style = " display:none; " >
< div ></ div >
</ div >
2017-09-10 18:29:51 +02:00
2017-08-31 19:06:23 +02:00
<!-- Loader senza overlay -->
< div id = " tiny-loader " style = " display:none; " ></ div >
2017-08-04 16:28:16 +02:00
< header class = " main-header " >
2020-02-13 02:30:29 +01:00
< a href = " '.tr('https://www.openstamanager.com').' " class = " logo " title = " '.tr( " Il gestionale open source per l 'assistenza tecnica e la fatturazione").' " target= " _blank " >
2017-08-04 16:28:16 +02:00
<!-- mini logo for sidebar mini 50 x50 pixels -->
2017-09-04 12:02:29 +02:00
< span class = " logo-mini " > '.tr(' OSM ').' </ span >
2017-08-04 16:28:16 +02:00
<!-- logo for regular state and mobile devices -->
2017-09-04 12:02:29 +02:00
< span class = " logo-lg " > '.tr(' OpenSTAManager ').' </ span >
2017-08-04 16:28:16 +02:00
</ a >
<!-- Header Navbar : style can be found in header . less -->
2019-05-23 16:15:46 +02:00
< nav class = " navbar navbar-static-top " role = " navigation " >
2020-06-30 17:38:19 +02:00
2017-08-04 16:28:16 +02:00
<!-- Sidebar toggle button -->
2018-05-05 14:54:47 +02:00
< a href = " # " class = " sidebar-toggle " data - toggle = " push-menu " role = " button " >
2017-09-04 12:02:29 +02:00
< span class = " sr-only " > '.tr(' Mostra / nascondi menu ').' </ span >
2017-08-04 16:28:16 +02:00
< span class = " icon-bar " ></ span >
< span class = " icon-bar " ></ span >
< span class = " icon-bar " ></ span >
</ a >
2019-05-11 05:35:00 +02:00
<!-- Navbar Left Menu -->
2020-04-28 15:50:30 +02:00
< div class = " navbar-left hidden-xs " >
< ul class = " nav navbar-nav hidden-xs " >
2020-09-24 00:07:54 +02:00
< li >< a href = " # " id = " daterange " role = " button " >
2019-05-11 05:35:00 +02:00
< i class = " fa fa-calendar " style = " color:inherit " ></ i > < i class = " fa fa-caret-down " style = " color:inherit " ></ i >
</ a ></ li >
2019-08-02 15:58:31 +02:00
2020-09-24 00:07:54 +02:00
< li >< a style = " cursor:default;padding:0px;padding-right:5px;padding-left:5px;margin-top:15px; " class = " label label-'. $calendar_color_label .' " >
2019-05-11 05:35:00 +02:00
'.Translator::dateToLocale($_SESSION[' period_start ']).' - '.Translator::dateToLocale($_SESSION[' period_end ']).'
</ a ></ li >
</ ul >
</ div >
2019-08-02 15:58:31 +02:00
2019-05-11 05:35:00 +02:00
<!-- Navbar Right Menu -->
< div class = " navbar-custom-menu " >
2019-05-10 06:32:06 +02:00
< ul class = " nav navbar-nav " >
2020-08-27 09:24:28 +02:00
< li class = " dropdown notifications-menu nav-button " >
2019-05-23 16:15:46 +02:00
< a href = " # " class = " dropdown-toggle " data - toggle = " dropdown " >
2019-05-10 06:32:06 +02:00
< i class = " fa fa-bell-o " ></ i >
2020-02-01 11:02:23 +01:00
< span id = " hooks-label " class = " label label-warning " >
2019-05-10 17:14:34 +02:00
< span id = " hooks-loading " >< i class = " fa fa-spinner fa-spin " ></ i ></ span >
2019-08-26 18:02:05 +02:00
< span id = " hooks-notified " ></ span >
2019-05-24 20:15:05 +02:00
< span id = " hooks-counter " class = " hide " > 0 </ span >
2019-08-26 18:02:05 +02:00
< span id = " hooks-number " class = " hide " > 0 </ span >
2019-05-10 17:14:34 +02:00
</ span >
2019-05-10 06:32:06 +02:00
</ a >
< ul class = " dropdown-menu " >
2019-05-24 21:36:35 +02:00
< li class = " header " >< span class = " small " id = " hooks-header " ></ span ></ li >
2019-05-10 06:32:06 +02:00
< li >< ul class = " menu " id = " hooks " >
2019-08-02 15:58:31 +02:00
2019-05-10 06:32:06 +02:00
</ ul ></ li >
</ ul >
</ li >
2019-08-02 15:58:31 +02:00
2020-08-27 09:24:28 +02:00
< li >< a href = " # " onclick = " window.print() " class = " tip nav-button " title = " '.tr('Stampa').' " >
2019-05-10 06:32:06 +02:00
< i class = " fa fa-print " ></ i >
</ a ></ li >
2019-08-02 15:58:31 +02:00
2020-09-23 17:53:19 +02:00
< li >< a href = " '.base_path().'/bug.php " class = " tip nav-button " title = " '.tr('Segnalazione bug').' " >
2019-05-10 06:32:06 +02:00
< i class = " fa fa-bug " ></ i >
</ a ></ li >
2019-08-02 15:58:31 +02:00
2020-09-23 17:53:19 +02:00
< li >< a href = " '.base_path().'/log.php " class = " tip nav-button " title = " '.tr('Log accessi').' " >
2019-05-10 06:32:06 +02:00
< i class = " fa fa-book " ></ i >
</ a ></ li >
2019-08-02 15:58:31 +02:00
2020-09-23 17:53:19 +02:00
< li >< a href = " '.base_path().'/info.php " class = " tip nav-button " title = " '.tr('Informazioni').' " >
2019-05-10 06:32:06 +02:00
< i class = " fa fa-info " ></ i >
</ a ></ li >
2019-08-02 15:58:31 +02:00
2020-09-23 17:53:19 +02:00
< li >< a href = " '.base_path().'/index.php?op=logout " onclick = " sessionStorage.clear() " class = " bg-red tip " title = " '.tr('Esci').' " >
2019-05-10 06:32:06 +02:00
< i class = " fa fa-power-off " ></ i >
</ a ></ li >
</ ul >
</ div >
2019-08-02 15:58:31 +02:00
2017-08-04 16:28:16 +02:00
</ nav >
</ header >
< aside class = " main-sidebar " >
< section class = " sidebar " >
<!-- Sidebar user panel -->
2019-07-18 18:33:56 +02:00
< div class = " user-panel text-center info " style = " height: 60px " >
2017-08-04 16:28:16 +02:00
< div class = " info " >
2020-09-23 17:53:19 +02:00
< p >< a href = " '.base_path().'/modules/utenti/info.php " >
2018-02-20 14:23:00 +01:00
'.$user[' username '].'
</ a ></ p >
2017-08-04 16:28:16 +02:00
< p id = " datetime " ></ p >
</ div >
2020-09-23 17:53:19 +02:00
< a class = " image " href = " '.base_path().'/modules/utenti/info.php " > ' ;
2019-07-18 18:33:56 +02:00
$user_photo = $user -> photo ;
if ( $user_photo ) {
echo '
2019-07-30 16:51:33 +02:00
< img src = " '. $user_photo .' " class = " img-circle pull-left " alt = " '. $user['username'] .' " /> ' ;
2019-07-18 18:33:56 +02:00
} else {
echo '
2019-07-24 19:20:55 +02:00
< i class = " fa fa-user-circle-o fa-3x pull-left " alt = " '.tr('OpenSTAManager').' " ></ i > ' ;
2019-07-18 18:33:56 +02:00
}
echo '
</ a >
2017-08-04 16:28:16 +02:00
</ div >
<!-- search form -->
< div class = " sidebar-form " >
< div class = " input-group " >
2017-09-04 12:02:29 +02:00
< input type = " text " name = " q " class = " form-control " id = " supersearch " placeholder = " '.tr('Cerca').'... " />
2017-08-04 16:28:16 +02:00
< span class = " input-group-btn " >
< button class = " btn btn-flat " id = " search-btn " name = " search " type = " submit " >< i class = " fa fa-search " ></ i >
</ button >
</ span >
</ div >
</ div >
<!-- /. search form -->
< ul class = " sidebar-menu " > ' ;
echo Modules :: getMainMenu ();
echo '
</ ul >
</ section >
<!-- /. sidebar -->
2020-08-26 16:17:04 +02:00
</ aside > ' ;
2017-08-04 16:28:16 +02:00
2020-10-29 16:48:37 +01:00
if ( string_contains ( $_SERVER [ 'SCRIPT_FILENAME' ], 'editor.php' )) {
2020-08-26 16:17:04 +02:00
// Menu laterale per la visualizzazione dei plugin
echo '
< aside class = " control-sidebar control-sidebar-light control-sidebar-shown " >
< h4 class = " text-center " > '.tr(' Plugin disponibili ').' </ h4 >
< ul class = " nav nav-tabs nav-pills nav-stacked " >
< li data - toggle = " control-sidebar " class = " active " >
< a data - toggle = " tab " href = " #tab_0 " >
< i class = " '. $structure['icon'] .' " ></ i > '.$structure[' title '].'
</ a >
</ li > ' ;
// Tab dei plugin
$plugins = $dbo -> fetchArray ( 'SELECT id, title FROM zz_plugins WHERE idmodule_to=' . prepare ( $id_module ) . " AND position='tab' AND enabled = 1 ORDER BY zz_plugins.order DESC " );
foreach ( $plugins as $plugin ) {
echo '
< li data - toggle = " control-sidebar " >
< a data - toggle = " tab " href = " #tab_'. $plugin['id'] .' " id = " link-tab_'. $plugin['id'] .' " >
'.$plugin[' title '].'
</ a >
</ li > ' ;
}
// Tab per le note interne
if ( $structure -> permission != '-' && $structure -> use_notes ) {
$notes = $structure -> recordNotes ( $id_record );
echo '
< li data - toggle = " control-sidebar " class = " bg-info " >
< a data - toggle = " tab " href = " #tab_note " id = " link-tab_note " >
'.tr(' Note interne ').'
< span class = " badge " > '.($notes->count() ?: ' ').' </ span >
</ a >
</ li > ' ;
}
// Tab per le checklist
if ( $structure -> permission != '-' && $structure -> use_checklists ) {
echo '
< li data - toggle = " control-sidebar " class = " bg-success " >
< a data - toggle = " tab " href = " #tab_checks " id = " link-tab_checks " > '.tr(' Checklist ').' </ a >
</ li > ' ;
}
// Tab per le informazioni sulle operazioni
if ( Auth :: admin ()) {
echo '
< li data - toggle = " control-sidebar " class = " bg-warning " >
< a data - toggle = " tab " href = " #tab_info " id = " link-tab_info " >
'.tr(' Info ').'
</ a >
</ li > ' ;
}
echo '
</ ul >
</ aside >
< div class = " control-sidebar-bg " ></ div > ' ;
}
echo '
2017-08-04 16:28:16 +02:00
<!-- Right side column . Contains the navbar and content of the page -->
2020-10-29 16:48:37 +01:00
< aside class = " content-wrapper '.(string_contains( $_SERVER['SCRIPT_FILENAME'] , 'editor.php') ? 'with-control-sidebar' : '').' " >
2017-08-04 16:28:16 +02:00
<!-- Main content -->
< section class = " content " >
< div class = " row " > ' ;
2020-10-29 16:48:37 +01:00
if ( string_contains ( $_SERVER [ 'SCRIPT_FILENAME' ], 'editor.php' )) {
2017-08-04 16:28:16 +02:00
$location = 'editor_right' ;
2020-10-29 16:48:37 +01:00
} elseif ( string_contains ( $_SERVER [ 'SCRIPT_FILENAME' ], 'controller.php' )) {
2017-08-04 16:28:16 +02:00
$location = 'controller_right' ;
}
echo '
2018-09-04 12:30:22 +02:00
< div class = " col-md-12 " > ' ;
// Eventuale messaggio personalizzato per l'installazione corrente
2020-09-22 20:28:37 +02:00
$extra_file = App :: filepath ( 'include/custom/extra' , 'extra.php' );
if ( $extra_file ) {
include_once $extra_file ;
}
2018-09-04 12:30:22 +02:00
} else {
// Eventuale messaggio personalizzato per l'installazione corrente
2020-09-22 20:28:37 +02:00
$extra_file = App :: filepath ( 'include/custom/extra' , 'login.php' );
if ( $extra_file ) {
include_once $extra_file ;
}
2018-09-04 12:30:22 +02:00
if ( ! empty ( $messages [ 'info' ]) || ! empty ( $messages [ 'warning' ]) || ! empty ( $messages [ 'error' ])) {
echo '
2017-08-04 16:28:16 +02:00
< div class = " box box-warning box-center " >
< div class = " box-header with-border text-center " >
2017-09-04 12:02:29 +02:00
< h3 class = " box-title " > '.tr(' Informazioni ').' </ h3 >
2017-08-04 16:28:16 +02:00
</ div >
< div class = " box-body " > ' ;
2018-09-04 12:30:22 +02:00
}
2017-08-04 16:28:16 +02:00
}
2018-07-19 12:47:28 +02:00
2017-08-04 16:28:16 +02:00
// Infomazioni
2018-07-19 12:47:28 +02:00
if ( ! empty ( $messages [ 'info' ])) {
foreach ( $messages [ 'info' ] as $value ) {
echo '
2017-08-04 16:28:16 +02:00
< div class = " alert alert-success push " >
< i class = " fa fa-check " ></ i > '.$value.'
</ div > ' ;
2018-07-19 12:47:28 +02:00
}
2017-08-04 16:28:16 +02:00
}
// Errori
2018-07-19 12:47:28 +02:00
if ( ! empty ( $messages [ 'error' ])) {
foreach ( $messages [ 'error' ] as $value ) {
echo '
2017-08-04 16:28:16 +02:00
< div class = " alert alert-danger push " >
< i class = " fa fa-times " ></ i > '.$value.'
</ div > ' ;
2018-07-19 12:47:28 +02:00
}
2017-08-04 16:28:16 +02:00
}
// Avvisi
2018-07-19 12:47:28 +02:00
if ( ! empty ( $messages [ 'warning' ])) {
foreach ( $messages [ 'warning' ] as $value ) {
echo '
2017-08-04 16:28:16 +02:00
< div class = " alert alert-warning push " >
< i class = " fa fa-warning " ></ i >
'.$value.'
</ div > ' ;
2018-07-19 12:47:28 +02:00
}
2017-08-04 16:28:16 +02:00
}
2018-07-07 13:56:22 +02:00
if ( ! Auth :: check () && ( ! empty ( $messages [ 'info' ]) || ! empty ( $messages [ 'warning' ]) || ! empty ( $messages [ 'error' ]))) {
2017-08-04 16:28:16 +02:00
echo '
</ div >
</ div > ' ;
}