2017-08-04 16:28:16 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
include_once __DIR__.'/../core.php';
|
|
|
|
|
|
|
|
if (!empty($debugbar)) {
|
|
|
|
$debugbarRenderer = $debugbar->getJavascriptRenderer();
|
|
|
|
$debugbarRenderer->setIncludeVendors(false);
|
|
|
|
$debugbarRenderer->setBaseUrl($assets.'/php-debugbar');
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<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">
|
|
|
|
|
|
|
|
<link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOW5ykAAAAAFYfm/xZ/5a4AAAAAGHDkWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGe55cTluf8AAAAABWH5v8Wf+W2AAAAABhw5P8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD67o/wAAAAAOda0KE5bn/xSP5v8Vh+b/Fn/l/xd35f8YcOT/Aw0dARRHqxIcWOPWAAAAAAAAAAAAAAAAAAAAAA+u6LwQpuj/Ep7n/xOW5/8Uj+b/FYfm/xZ/5f8Xd+X/GHDk/xpo5P8bX+P/FUKqKQAAAAAAAAAAAAAAAAVEVwILga4cEKbo/xKe5/8Tluf/FI/m/xWH5v4Wf+X+F3fl/xhw5P8aaOT/G1/j/wAAAAASMo41AAAAAA2+6aoOtuj/D6/o/xCm6P8Snuf/E5bn9w9r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
|
|
foreach ($css_modules as $style) {
|
|
|
|
$style = (is_array($style)) ? $style : ['href' => $style, 'media' => 'all'];
|
|
|
|
|
|
|
|
echo '
|
|
|
|
<link rel="stylesheet" type="text/css" media="'.$style['media'].'" href="'.$style['href'].'"/>';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Auth::check()) {
|
|
|
|
echo '
|
|
|
|
<script>
|
|
|
|
search = []';
|
|
|
|
|
|
|
|
$array = [];
|
|
|
|
foreach ($_SESSION as $idx1 => $arr2) {
|
|
|
|
if ($idx1 == 'module_'.$id_module) {
|
|
|
|
foreach ($arr2 as $field => $value) {
|
|
|
|
if ($value != '') {
|
|
|
|
$field_name = str_replace('search_', '', $field);
|
|
|
|
echo '
|
|
|
|
search.push("search_'.$field_name.'");
|
|
|
|
search["search_'.$field_name.'"] = "'.$value.'";';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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?'),
|
|
|
|
'close' => tr('Chiudi'),
|
|
|
|
'filter' => tr('Filtra'),
|
|
|
|
'long' => tr('La ricerca potrebbe richiedere del tempo'),
|
|
|
|
'details' => tr('Dettagli'),
|
|
|
|
'waiting' => tr('Impossibile procedere'),
|
|
|
|
'waiting_msg' => tr('Prima di proseguire devi selezionare alcuni elementi!'),
|
2017-08-04 16:28:16 +02:00
|
|
|
];
|
|
|
|
foreach ($translations as $key => $value) {
|
|
|
|
echo '
|
|
|
|
'.$key.': \''.addslashes($value).'\',';
|
|
|
|
}
|
|
|
|
echo '
|
|
|
|
};
|
|
|
|
globals = {
|
|
|
|
rootdir: \''.$rootdir.'\', js: \''.$js.'\', css: \''.$css.'\', img: \''.$img.'\',
|
|
|
|
id_module: \''.$id_module.'\',
|
|
|
|
id_record: \''.$id_record.'\',
|
|
|
|
aggiornamenti_id: \''.($dbo->isInstalled() ? Modules::getModule('Aggiornamenti')['id'] : '').'\',
|
|
|
|
cifre_decimali: '.get_var('Cifre decimali per importi').',
|
|
|
|
decimals: "'.Translator::getLocaleFormatter()->getNumberSeparators()['decimals'].'", thousands: "'.Translator::getLocaleFormatter()->getNumberSeparators()['thousands'].'",
|
|
|
|
search: search,
|
|
|
|
translations: translations,
|
|
|
|
start_date: \''.Translator::dateToLocale($_SESSION['period_start']).'\',
|
|
|
|
end_date: \''.Translator::dateToLocale($_SESSION['period_end']).'\',
|
|
|
|
locale: \''.$lang.'\',
|
|
|
|
};
|
|
|
|
</script>';
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($jscript_modules as $js) {
|
|
|
|
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>';
|
|
|
|
|
|
|
|
if (!empty($debugbarRenderer) && Auth::check()) {
|
|
|
|
echo $debugbarRenderer->renderHead();
|
|
|
|
}
|
|
|
|
|
2017-09-10 18:29:51 +02:00
|
|
|
$hide_sidebar = get_var('Nascondere la barra sinistra di default');
|
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' : '').'">
|
2017-08-04 16:28:16 +02:00
|
|
|
<div class="wrapper">';
|
|
|
|
|
|
|
|
if (Auth::check()) {
|
|
|
|
$calendar = ($_SESSION['period_start'] != date('Y').'-01-01' || $_SESSION['period_end'] != date('Y').'-12-31') ? 'red' : 'white';
|
|
|
|
|
|
|
|
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">
|
|
|
|
<a href="http://www.openstamanager.com" class="logo" target="_blank">
|
|
|
|
<!-- mini logo for sidebar mini 50x50 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 -->
|
|
|
|
<nav class="navbar navbar-static-top" role="navigation">
|
|
|
|
<!-- Sidebar toggle button-->
|
|
|
|
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" 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>
|
|
|
|
|
|
|
|
<div class="input-group btn-calendar pull-left">
|
2017-09-14 16:20:11 +02:00
|
|
|
<button id="daterange" class="btn"><i class="fa fa-calendar" style="color:'.$calendar.'"></i> <i class="fa fa-caret-down"></i></button>
|
|
|
|
<span class="hidden-xs" style="vertical-align:middle">
|
|
|
|
'.Translator::dateToLocale($_SESSION['period_start']).' - '.Translator::dateToLocale($_SESSION['period_end']).'
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
2017-08-04 16:28:16 +02:00
|
|
|
|
|
|
|
<div id="right-menu" class="pull-right">
|
2017-09-04 12:02:29 +02:00
|
|
|
<button onclick="window.print()" class="btn btn-sm btn-info tip" title="'.tr('Stampa').'">
|
2017-08-04 16:28:16 +02:00
|
|
|
<i class="fa fa-print"></i>
|
|
|
|
</button>
|
2017-09-04 12:02:29 +02:00
|
|
|
<a href="'.$rootdir.'/bug.php" class="btn btn-sm btn-github tip" title="'.tr('Segnalazione bug').'">
|
2017-08-04 16:28:16 +02:00
|
|
|
<i class="fa fa-bug"></i>
|
|
|
|
</a>
|
2017-09-04 12:02:29 +02:00
|
|
|
<a href="'.$rootdir.'/log.php" class="btn btn-sm btn-github tip" title="'.tr('Log accessi').'">
|
2017-08-04 16:28:16 +02:00
|
|
|
<i class="fa fa-book"></i>
|
|
|
|
</a>
|
2017-09-04 12:02:29 +02:00
|
|
|
<a href="'.$rootdir.'/info.php" class="btn btn-sm btn-github tip" title="'.tr('Informazioni').'">
|
2017-08-04 16:28:16 +02:00
|
|
|
<i class="fa fa-info"></i>
|
|
|
|
</a>
|
2017-09-04 12:02:29 +02:00
|
|
|
<a href="'.$rootdir.'/index.php?op=logout" class="btn btn-sm btn-danger tip" title="'.tr('Esci').'">
|
2017-08-04 16:28:16 +02:00
|
|
|
<i class="fa fa-power-off"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<aside class="main-sidebar">
|
|
|
|
<section class="sidebar">
|
|
|
|
|
|
|
|
<!-- Sidebar user panel -->
|
|
|
|
<div class="user-panel text-center info">
|
|
|
|
<div class="info">
|
|
|
|
<p>'.$_SESSION['username'].'</p>
|
|
|
|
<p id="datetime"></p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="image">
|
2017-09-04 12:02:29 +02:00
|
|
|
<img src="'.$img.'/logo.png" class="img-circle img-responsive" alt="'.tr('OpenSTAManager').'" />
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
</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 -->
|
|
|
|
</aside>
|
|
|
|
|
|
|
|
<!-- Right side column. Contains the navbar and content of the page -->
|
|
|
|
<aside class="content-wrapper">
|
|
|
|
|
|
|
|
<!-- Main content -->
|
|
|
|
<section class="content">
|
|
|
|
<div class="row">';
|
|
|
|
|
2017-08-28 15:29:03 +02:00
|
|
|
if (str_contains($_SERVER['SCRIPT_FILENAME'], 'editor.php')) {
|
2017-08-04 16:28:16 +02:00
|
|
|
$location = 'editor_right';
|
2017-08-28 15:29:03 +02:00
|
|
|
} elseif (str_contains($_SERVER['SCRIPT_FILENAME'], 'controller.php')) {
|
2017-08-04 16:28:16 +02:00
|
|
|
$location = 'controller_right';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '
|
|
|
|
<div class="col-md-12">';
|
|
|
|
} elseif (!empty($_SESSION['infos']) || !empty($_SESSION['warnings']) || !empty($_SESSION['errors'])) {
|
|
|
|
echo '
|
|
|
|
<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">';
|
|
|
|
}
|
|
|
|
// Infomazioni
|
|
|
|
foreach ($_SESSION['infos'] as $value) {
|
|
|
|
echo '
|
|
|
|
<div class="alert alert-success push">
|
|
|
|
<i class="fa fa-check"></i> '.$value.'
|
|
|
|
</div>';
|
|
|
|
}
|
|
|
|
|
|
|
|
// Errori
|
|
|
|
foreach ($_SESSION['errors'] as $value) {
|
|
|
|
echo '
|
|
|
|
<div class="alert alert-danger push">
|
|
|
|
<i class="fa fa-times"></i> '.$value.'
|
|
|
|
</div>';
|
|
|
|
}
|
|
|
|
|
|
|
|
// Avvisi
|
|
|
|
foreach ($_SESSION['warnings'] as $value) {
|
|
|
|
echo '
|
|
|
|
<div class="alert alert-warning push">
|
|
|
|
<i class="fa fa-warning"></i>
|
|
|
|
'.$value.'
|
|
|
|
</div>';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!Auth::check() && (!empty($_SESSION['infos']) || !empty($_SESSION['warnings']) || !empty($_SESSION['errors']))) {
|
|
|
|
echo '
|
|
|
|
</div>
|
|
|
|
</div>';
|
|
|
|
}
|