Correzioni sul funzionamento dei moduli

This commit is contained in:
Thomas Zilio 2021-10-23 16:37:21 +02:00
parent 3b3b8b25d3
commit e6bd126649
147 changed files with 210 additions and 1855 deletions

View File

@ -88,7 +88,7 @@ if (filter('op') == 'aggiungi-allegato' || filter('op') == 'rimuovi-allegato') {
}
}
redirect_legacy(base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.((!empty($options['id_plugin'])) ? '#tab_'.$options['id_plugin'] : ''));
redirect_legacy(base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.((!empty($options['id_plugin'])) ? '#tab_'.$options['id_plugin'] : ''));
}
}
@ -350,7 +350,7 @@ if ($structure->permission == 'rw') {
$bulk = empty($bulk) ? [] : $bulk;
if (in_array(post('op'), array_keys($bulk))) {
redirect_legacy(base_url().'/controller.php?id_module='.$id_module, 'js');
redirect_legacy(base_path().'/controller.php?id_module='.$id_module, 'js');
} else {
// Esecuzione delle operazioni del modulo
($include_file = $structure->filepath('actions.php')) ? include $include_file : null;

View File

@ -180,11 +180,11 @@ if (!empty($query)) {
// Link per i moduli
if (empty($id_plugin)) {
$column['data-link'] = base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.$hash;
$column['data-link'] = base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.$hash;
}
// Link per i plugin
else {
$column['data-link'] = base_url().'/add.php?id_module='.$id_module.'&id_record='.$id_record.'&id_plugin='.$id_plugin.'&id_parent='.$id_parent.'&edit=1'.$hash;
$column['data-link'] = base_path().'/add.php?id_module='.$id_module.'&id_record='.$id_record.'&id_plugin='.$id_plugin.'&id_parent='.$id_parent.'&edit=1'.$hash;
$column['data-type'] = 'dialog';
}
@ -197,7 +197,7 @@ if (!empty($query)) {
}
// Replace base_link() per le query
$value = str_replace('base_link()', base_url(), $value);
$value = str_replace('base_link()', base_path(), $value);
$result[] = str_replace('|attr|', implode(' ', $attributes), '<div |attr|>'.$value.'</div>');
}

View File

@ -87,7 +87,7 @@ if (filter('op') == 'send') {
delete($backup_file);
}
redirect_legacy(base_url().'/bug.php');
redirect_legacy(base_path().'/bug.php');
throw new \LegacyExitException();
}

View File

@ -26,10 +26,10 @@ return [
'GET' => 0,
'POST' => 0,
],
'jsUrl' => base_url().'/assets/dist/js/csrf/csrfprotector.js',
'jsUrl' => base_path().'/assets/dist/js/csrf/csrfprotector.js',
'tokenLength' => 10,
'cookieConfig' => [
'path' => base_url(),
'path' => base_path(),
'secure' => isHTTPS(true),
],
'verifyGetFor' => [],

View File

@ -20,9 +20,9 @@
include_once __DIR__.'/core.php';
if (!empty($id_record) && !empty($id_module)) {
redirect_legacy(base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record);
redirect_legacy(base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record);
} elseif (empty($id_module)) {
redirect_legacy(base_url().'/');
redirect_legacy(base_path().'/');
}
include_once AppLegacy::filepath('include|custom|', 'top.php');

View File

@ -25,9 +25,9 @@ use Carbon\Carbon;
$read_only = $structure->permission == 'r';
if (empty($id_record) && !empty($id_module) && empty($id_plugin)) {
redirect_legacy(base_url().'/controller.php?id_module='.$id_module);
redirect_legacy(base_path().'/controller.php?id_module='.$id_module);
} elseif (empty($id_record) && empty($id_module) && empty($id_plugin)) {
redirect_legacy(base_url().'/');
redirect_legacy(base_path().'/');
}
include_once AppLegacy::filepath('include|custom|', 'top.php');
@ -73,7 +73,7 @@ if (empty($record) || !$has_access) {
</h3>
<br>
<a class="btn btn-default" href="'.base_url().'/controller.php?id_module='.$id_module.'">
<a class="btn btn-default" href="'.base_path().'/controller.php?id_module='.$id_module.'">
<i class="fa fa-chevron-left"></i> '.tr('Indietro').'
</a>
</div>';
@ -159,7 +159,7 @@ if (empty($record) || !$has_access) {
// Pulsanti di default
echo '
<div id="pulsanti">
<a class="btn btn-warning" id="back" href="'.base_url().'/controller.php?id_module='.$id_module.'">
<a class="btn btn-warning" id="back" href="'.base_path().'/controller.php?id_module='.$id_module.'">
<i class="fa fa-chevron-left"></i> '.tr("Torna all'elenco").'
</a>
@ -441,7 +441,7 @@ echo '{( "name": "widgets", "id_module": "'.$id_module.'", "id_record": "'.$id_r
if (!empty($record)) {
echo '
<hr>
<a class="btn btn-default" href="'.base_url().'/controller.php?id_module='.$id_module.'">
<a class="btn btn-default" href="'.base_path().'/controller.php?id_module='.$id_module.'">
<i class="fa fa-chevron-left"></i> '.tr('Indietro').'
</a>';
}
@ -519,7 +519,7 @@ if (!empty($advanced_sessions)) {
?>
function getActiveUsers(){
$.getJSON('<?php echo base_url(); ?>/ajax.php?op=active_users', {
$.getJSON('<?php echo base_path(); ?>/ajax.php?op=active_users', {
id_module: <?php echo $id_module; ?>,
id_record: <?php echo $id_record; ?>
},

View File

@ -86,7 +86,7 @@ $disabled = empty($result['idarticolo']);
echo '
<div class="row '.(!empty($options['nascondi_prezzi']) ? 'hidden' : '').'" id="prezzi_articolo">
<div class="col-md-4 text-center">
<button type="button" class="btn btn-sm btn-info btn-block '.($disabled ? 'disabled' : '').'" '.($disabled ? 'disabled' : '').' onclick="$(\'#prezziacquisto\').toggleClass(\'hide\'); $(\'#prezziacquisto\').load(\''.base_url()."/ajax_complete.php?module=Articoli&op=getprezziacquisto&idarticolo=' + ( $('#idarticolo option:selected').val() || $('#idarticolo').val()) + '&limit=5".'\');">
<button type="button" class="btn btn-sm btn-info btn-block '.($disabled ? 'disabled' : '').'" '.($disabled ? 'disabled' : '').' onclick="$(\'#prezziacquisto\').toggleClass(\'hide\'); $(\'#prezziacquisto\').load(\''.base_path()."/ajax_complete.php?module=Articoli&op=getprezziacquisto&idarticolo=' + ( $('#idarticolo option:selected').val() || $('#idarticolo').val()) + '&limit=5".'\');">
<i class="fa fa-shopping-cart"></i> '.tr('Ultimi prezzi di acquisto').'
</button>
<br>
@ -94,14 +94,14 @@ echo '
</div>
<div class="col-md-4 text-center">
<button type="button" class="btn btn-sm btn-info btn-block '.($disabled ? 'disabled' : '').'" '.($disabled ? 'disabled' : '').' onclick="$(\'#prezzi\').toggleClass(\'hide\'); $(\'#prezzi\').load(\''.base_url()."/ajax_complete.php?module=Articoli&op=getprezzi&idarticolo=' + ( $('#idarticolo option:selected').val() || $('#idarticolo').val()) + '&idanagrafica=".$options['idanagrafica'].'\');">
<button type="button" class="btn btn-sm btn-info btn-block '.($disabled ? 'disabled' : '').'" '.($disabled ? 'disabled' : '').' onclick="$(\'#prezzi\').toggleClass(\'hide\'); $(\'#prezzi\').load(\''.base_path()."/ajax_complete.php?module=Articoli&op=getprezzi&idarticolo=' + ( $('#idarticolo option:selected').val() || $('#idarticolo').val()) + '&idanagrafica=".$options['idanagrafica'].'\');">
<i class="fa fa-handshake-o"></i> '.($options['dir'] == 'entrata' ? tr('Ultimi prezzi al cliente') : tr('Ultimi prezzi dal fornitore')).'
</button>
<div id="prezzi" class="hide"></div>
</div>
<div class="col-md-4 text-center">
<button type="button" class="btn btn-sm btn-info btn-block '.($disabled ? 'disabled' : '').'" '.($disabled ? 'disabled' : '').' onclick="$(\'#prezzivendita\').toggleClass(\'hide\'); $(\'#prezzivendita\').load(\''.base_url()."/ajax_complete.php?module=Articoli&op=getprezzivendita&idarticolo=' + ( $('#idarticolo option:selected').val() || $('#idarticolo').val()) + '&limit=5".'\');">
<button type="button" class="btn btn-sm btn-info btn-block '.($disabled ? 'disabled' : '').'" '.($disabled ? 'disabled' : '').' onclick="$(\'#prezzivendita\').toggleClass(\'hide\'); $(\'#prezzivendita\').load(\''.base_path()."/ajax_complete.php?module=Articoli&op=getprezzivendita&idarticolo=' + ( $('#idarticolo option:selected').val() || $('#idarticolo').val()) + '&limit=5".'\');">
<i class="fa fa-money"></i> '.tr('Ultimi prezzi di vendita').'
</button>
<br>

View File

@ -21,7 +21,7 @@ $result['id'] = isset($result['id']) ? $result['id'] : null;
// Form di inserimento riga documento
echo '
<form action="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post">
<form action="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post">
<input type="hidden" name="id_plugin" value="'.$id_plugin.'">
<input type="hidden" name="hash" value="tab_'.$id_plugin.'">
<input type="hidden" name="backto" value="record-edit">

View File

@ -55,7 +55,7 @@ if ($righe->isEmpty()) {
return;
}
$link = !empty($documento_finale) ? base_url().'/editor.php?id_module='.$final_module['id'].'&id_record='.$documento_finale->id : base_url().'/controller.php?id_module='.$final_module['id'];
$link = !empty($documento_finale) ? base_path().'/editor.php?id_module='.$final_module['id'].'&id_record='.$documento_finale->id : base_path().'/controller.php?id_module='.$final_module['id'];
echo '
<form action="'.$link.'" method="post">

View File

@ -149,14 +149,14 @@ if (post('db_host') !== null) {
<p>'.tr('Sembra che non ci siano i permessi di scrittura sul file _FILE_', [
'_FILE_' => '<b>config.inc.php</b>',
]).'</p>
<form action="'.base_url().'/index.php?action=updateconfig&firstuse=true" method="post">
<form action="'.base_path().'/index.php?action=updateconfig&firstuse=true" method="post">
<div class="hide">
<input type="hidden" name="db_name" value="'.$db_name.'">
<input type="hidden" name="db_password" value="'.$db_password.'">
<input type="hidden" name="db_username" value="'.$db_username.'">;
<input type="hidden" name="db_host" value="'.$db_host.'">
</div>
<a class="btn btn-warning" href="'.base_url().'/index.php"><i class="fa fa-arrow-left"></i> '.tr('Torna indietro').'</a>
<a class="btn btn-warning" href="'.base_path().'/index.php"><i class="fa fa-arrow-left"></i> '.tr('Torna indietro').'</a>
<button class="btn btn-info"><i class="fa fa-repeat"></i> '.tr('Riprova').'</button>
</form>
<hr>
@ -184,9 +184,9 @@ if (post('db_host') !== null) {
"dir" : "ltr",
"lang" : "it-IT",
"name" : "OpenSTAManager",
"scope" : "'.base_url().'",
"scope" : "'.base_path().'",
"display" : "fullscreen",
"start_url" : "'.base_url().'",
"start_url" : "'.base_path().'",
"short_name" : "OSM",
"theme_color" : "transparent",
"description" : "OpenSTAManager",
@ -203,7 +203,7 @@ if (post('db_host') !== null) {
}';
file_put_contents('manifest.json', $manifest);
redirect_legacy(base_url().'/index.php');
redirect_legacy(base_path().'/index.php');
throw new \LegacyExitException();
}
}
@ -219,7 +219,7 @@ if ((file_exists('config.inc.php') || $valid_config) && !$dbo->isConnected()) {
<div class="box-body">
<p>'.tr("Si è verificato un'errore durante la connessione al database").'.</p>
<p>'.tr('Controllare di aver inserito correttamente i dati di accesso, e che il database atto ad ospitare i dati del gestionale sia esistente').'.</p>
<a class="btn btn-info" href="'.base_url().'/index.php"><i class="fa fa-repeat"></i> '.tr('Riprova').'</a>
<a class="btn btn-info" href="'.base_path().'/index.php"><i class="fa fa-repeat"></i> '.tr('Riprova').'</a>
</div>
</div>';
}
@ -240,7 +240,7 @@ if (empty($creation) && (!file_exists('config.inc.php') || !$valid_config)) {
'_FILE_' => '<b>config.inc.php</b>',
]).'.</p>
<p>'.tr("Nel caso il problema persista, rivolgersi all'assistenza ufficiale").'.</p>
<a class="btn btn-info" href="'.base_url().'/index.php"><i class="fa fa-repeat"></i> '.tr('Riprova').'</a>
<a class="btn btn-info" href="'.base_path().'/index.php"><i class="fa fa-repeat"></i> '.tr('Riprova').'</a>
</div>
</div>';
}
@ -295,7 +295,7 @@ if (empty($creation) && (!file_exists('config.inc.php') || !$valid_config)) {
$("#test").prop("disabled", true);
$("#install").prop("disabled", true);
$(this).closest("form").ajaxSubmit({
url: "'.base_url().'/index.php",
url: "'.base_path().'/index.php",
data: {
test: 1,
},

View File

@ -114,7 +114,7 @@ if (post('action') == 'init') {
}
}
redirect_legacy(base_url(), 'js');
redirect_legacy(base_path(), 'js');
throw new \LegacyExitException();
}

View File

@ -104,7 +104,7 @@ if (filter('action') == 'do_update') {
}
echo '
<a class="btn btn-success btn-block" href="'.base_url().'">
<a class="btn btn-success btn-block" href="'.base_path().'">
<i class="fa fa-check"></i> '.tr('Continua').'
</a>';
}
@ -125,7 +125,7 @@ if (filter('action') == 'do_update') {
<div class="box-body">
<p>'.tr("E' attualmente in corso la procedura di aggiornamento del software, e pertanto siete pregati di attendere fino alla sua conclusione").'.</p>
<p>'.tr("Nel caso il problema persista, rivolgersi all'amministratore o all'assistenza ufficiale").'.</p>
<a class="btn btn-info" href="'.base_url().'/index.php"><i class="fa fa-repeat"></i> '.tr('Riprova').'</a>
<a class="btn btn-info" href="'.base_path().'/index.php"><i class="fa fa-repeat"></i> '.tr('Riprova').'</a>
</div>
</div>';

View File

@ -42,7 +42,7 @@ echo '<!DOCTYPE html>
if (file_exists(base_dir().'/manifest.json')) {
echo '
<link rel="manifest" href="'.base_url().'/manifest.json">';
<link rel="manifest" href="'.base_path().'/manifest.json">';
}
// CSS
@ -181,7 +181,7 @@ if (auth()->check()) {
globals = {
content_was_modified: false,
rootdir: "'.base_url().'",
rootdir: "'.base_path().'",
js: "'.$paths['js'].'",
css: "'.$paths['css'].'",
img: "'.$paths['img'].'",
@ -259,7 +259,7 @@ if (auth()->check()) {
<script>
globals = {
content_was_modified: false,
rootdir: "'.base_url().'",
rootdir: "'.base_path().'",
search: {},
translations: {
@ -411,7 +411,7 @@ if (auth()->check()) {
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<li class="nav-button hide"><a href="'.base_url().'/bug.php" class="tip nav-button" title="'.tr('Segnalazione bug').'">
<li class="nav-button hide"><a href="'.base_path().'/bug.php" class="tip nav-button" title="'.tr('Segnalazione bug').'">
<i class="fa fa-bug"></i>
</a></li>

180
index.php
View File

@ -1,180 +0,0 @@
<?php
/*
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
* Copyright (C) DevCode s.r.l.
*
* 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/>.
*/
use App\Models\User;
use Illuminate\Support\Facades\Hash;
$skip_permissions = true;
include_once __DIR__.'/core.php';
$op = filter('op');
// LOGIN
switch ($op) {
case 'login':
$username = post('username');
$password = post('password');
$user = User::where('username', $username)->first();
if (!empty($user) && Hash::check($password, $user->getAuthPassword())) {
auth()->loginUsingId($user->id, true);
// Rimozione log vecchi
//$dbo->query('DELETE FROM `zz_operations` WHERE DATE_ADD(`created_at`, INTERVAL 30*24*60*60 SECOND) <= NOW()');
} else {
$status = auth()->user();
//flash()->error(auth()->getStatus()[$status]['message']);
redirect('/');
}
break;
case 'logout':
auth()->logout();
redirect(route('login'));
break;
}
if (auth()->check() && isset($dbo) && $dbo->isConnected() && $dbo->isInstalled()) {
$module = 1;
if (!empty($module)) {
redirect_legacy(base_url().'/controller.php?id_module='.$module);
} else {
redirect_legacy(base_url().'/index.php?op=logout');
}
throw new \LegacyExitException();
}
// Procedura di installazione
include_once base_dir().'/include/init/configuration.php';
// Procedura di aggiornamento
include_once base_dir().'/include/init/update.php';
// Procedura di inizializzazione
include_once base_dir().'/include/init/init.php';
$pageTitle = tr('Login');
include_once AppLegacy::filepath('include|custom|', 'top.php');
// Controllo se è una beta e in caso mostro un warning
if (Update::isBeta()) {
echo '
<div class="clearfix">&nbsp;</div>
<div class="alert alert-warning alert-dismissable col-md-6 col-md-push-3 text-center fade in">
<i class="fa fa-warning"></i> <b>'.tr('Attenzione!').'</b> '.tr('Stai utilizzando una versione <b>non stabile</b> di OSM.').'
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
</div>';
}
// Controllo se è una beta e in caso mostro un warning
if (false) {
echo '
<div class="box box-danger box-center" id="brute">
<div class="box-header with-border text-center">
<h3 class="box-title">'.tr('Attenzione').'</h3>
</div>
<div class="box-body text-center">
<p>'.tr('Sono stati effettuati troppi tentativi di accesso consecutivi!').'</p>
<p>'.tr('Tempo rimanente (in secondi)').': <span id="brute-timeout">'.(auth()->getBruteTimeout() + 1).'</span></p>
</div>
</div>
<script>
$(document).ready(function(){
$(".login-box").fadeOut();
brute();
});
function brute() {
var value = parseFloat($("#brute-timeout").html()) - 1;
$("#brute-timeout").html(value);
if(value > 0){
setTimeout("brute()", 1000);
} else{
$("#brute").fadeOut();
$(".login-box").fadeIn();
}
}
</script>';
}
if (!empty(flash()->getMessage('error'))) {
echo '
<script>
$(document).ready(function(){
$(".login-box").effect("shake");
});
</script>';
}
echo '
<form action="?op=login" method="post" class="login-box box" autocomplete="off" >
<div class="box-header with-border text-center">
<img src="'.AppLegacy::getPaths()['img'].'/logo_completo.png" class="img-responsive" alt="'.tr('OSM Logo').'">
</div>
<div class="login-box-body box-body">
<div class="form-group input-group">
<span class="input-group-addon before"><i class="fa fa-user"></i> </span>
<input type="text" name="username" autocomplete="username" class="form-control" placeholder="'.tr('Nome utente').'"';
if (isset($username)) {
echo ' value="'.$username.'"';
}
echo ' required>
</div>
{[ "type": "password", "name": "password", "autocomplete": "current-password", "placeholder": "'.tr('Password').'", "icon-before": "<i class=\"fa fa-lock\"></i>" ]}
<div class="text-right">
<small><a href="'.base_url().'/reset.php">'.tr('Password dimenticata?').'</a></small>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
<button type="submit" id="login" class="btn btn-danger btn-block">'.tr('Accedi').'</button>
</div>
<!-- box-footer -->
</form>
<!-- /.box -->
<script>
$(document).ready( function(){
$("#login").click(function(){
$("#login").text("'.tr('Autenticazione').'...");
});
if( $("input[name=username]").val() == ""){
$("input[name=username]").focus();
}
else{
$("input[name=password]").focus();
}
});
</script>';
include_once AppLegacy::filepath('include|custom|', 'bottom.php');

View File

@ -300,9 +300,9 @@ function redirectOperation($id_module, $id_record)
$hash = $hash == '#tab_0' ? '' : $hash;
if ($backto == 'record-edit') {
redirect_legacy(base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.$hash);
redirect_legacy(base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.$hash);
} elseif ($backto == 'record-list') {
redirect_legacy(base_url().'/controller.php?id_module='.$id_module.$hash);
redirect_legacy(base_path().'/controller.php?id_module='.$id_module.$hash);
}
throw new \LegacyExitException();
@ -350,7 +350,7 @@ function getURLPath()
if (substr($path, 0, strlen($prefix)) == $prefix) {
$path = substr($path, strlen($prefix));
} else {
$path = str_replace(base_dir(), base_url(), $path);
$path = str_replace(base_dir(), base_path(), $path);
}
return slashes($path);
@ -404,7 +404,7 @@ function check_query($query)
*
* @return string
*/
function base_url()
function base_path()
{
return url('/legacy/');
}

View File

@ -76,9 +76,9 @@ if (function_exists('customComponents')) {
}
}
//Fix per funzione base_url non trovata in fase di aggiornamento da versione < 2.4.19
if (!function_exists('base_url')) {
function base_url()
//Fix per funzione base_path non trovata in fase di aggiornamento da versione < 2.4.19
if (!function_exists('base_path')) {
function base_path()
{
return ROOTDIR;
}
@ -193,7 +193,7 @@ function search(button) {
</h3>
</div>
<div class="box-body">
<form action="'.base_url().'/controller.php?id_module='.$id_module.'" method="post" enctype="multipart/form-data" id="update">
<form action="'.base_path().'/controller.php?id_module='.$id_module.'" method="post" enctype="multipart/form-data" id="update">
<input type="hidden" name="op" value="upload">
{[ "type": "file", "name": "blob", "required": 1, "accept": ".zip" ]}

View File

@ -48,7 +48,7 @@ class UpdateHook extends CachedManager
}
$module = module('Aggiornamenti');
$link = base_url().'/controller.php?id_module='.$module->id;
$link = base_path().'/controller.php?id_module='.$module->id;
$message = tr("E' disponibile la versione _VERSION_ del gestionale", [
'_VERSION_' => $update,

View File

@ -110,4 +110,4 @@ if (file_exists($extraction_dir.'/VERSION')) {
delete($extraction_dir);
// Redirect
redirect_legacy(base_url().'/editor.php?id_module='.$id_module);
redirect_legacy(base_path().'/editor.php?id_module='.$id_module);

View File

@ -67,7 +67,7 @@ $rs = $dbo->fetchArray($query);
foreach ($rs as $r) {
$result = [];
$result['link'] = base_url().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['link'] = base_path().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['title'] = $r['ragione_sociale'];
$result['title'] .= !empty($r['deleted_at']) ? ' <small class="text-danger"><em>('.tr('eliminata').')</em></small>' : '';
$result['category'] = 'Anagrafiche';
@ -114,7 +114,7 @@ $plugin = $dbo->fetchArray("SELECT id FROM zz_plugins WHERE name='Referenti'");
foreach ($rs as $r) {
$result = [];
$result['link'] = base_url().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'].'#tab_'.$plugin[0]['id'];
$result['link'] = base_path().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'].'#tab_'.$plugin[0]['id'];
$result['title'] = $r['nome'];
$result['category'] = 'Referenti';

View File

@ -458,13 +458,13 @@ if ($is_cliente or $is_fornitore or $is_tecnico) {
echo '
<div class="row">
<div class="col-md-6">
<a href="'.base_url().'/editor.php?id_module='.$modulo_banche['id'].'&id_record='.$banca_predefinita->id.'">
<a href="'.base_path().'/editor.php?id_module='.$modulo_banche['id'].'&id_record='.$banca_predefinita->id.'">
'.tr("Visualizza la banca predefinita per l'Anagrafica").' <i class="fa fa-external-link"></i>
</a>
</div>
<div class="col-md-6">
<a href="'.base_url().'/controller.php?id_module='.$modulo_banche['id'].'&search_Anagrafica='.rawurlencode($anagrafica['ragione_sociale']).'">
<a href="'.base_path().'/controller.php?id_module='.$modulo_banche['id'].'&search_Anagrafica='.rawurlencode($anagrafica['ragione_sociale']).'">
'.tr("Visualizza le banche disponibili per l'Anagrafica").' <i class="fa fa-external-link"></i>
</a>
</div>

View File

@ -113,14 +113,14 @@ echo '
echo '
<tr>
<td class="text-center">
<a class="btn btn-xs btn-primary" href="'.base_url().'/actions.php?id_module='.$file->id_module.'&op=download-allegato&id='.$file->id.'&filename='.$file->filename.'" target="_blank">
<a class="btn btn-xs btn-primary" href="'.base_path().'/actions.php?id_module='.$file->id_module.'&op=download-allegato&id='.$file->id.'&filename='.$file->filename.'" target="_blank">
<i class="fa fa-download"></i>
</a>';
// Anteprime supportate dal browser
if ($file->hasPreview()) {
echo '
<button class="btn btn-xs btn-info" type="button" data-title="'.prepareToField($file->name).' <small style=\'color:white\'><i>('.$file->filename.')</i></small>" data-href="'.base_url().'/view.php?file_id='.$file->id.'">
<button class="btn btn-xs btn-info" type="button" data-title="'.prepareToField($file->name).' <small style=\'color:white\'><i>('.$file->filename.')</i></small>" data-href="'.base_path().'/view.php?file_id='.$file->id.'">
<i class="fa fa-eye"></i>
</button>';
} else {
@ -133,7 +133,7 @@ echo '
echo '
</td>
<td>
<a href="'.base_url().'/view.php?file_id='.$file->id.'" target="_blank">
<a href="'.base_path().'/view.php?file_id='.$file->id.'" target="_blank">
<i class="fa fa-external-link"></i> '.$file->name.'
</a>
</td>

View File

@ -44,7 +44,7 @@ switch ($resource) {
($documenti[$i]['n2_documento'] != '') ? $n_documento = $documenti[$i]['n2_documento'] : $n_documento = $documenti[$i]['n_documento'];
$link_id = module($documenti[$i]['modulo'])['id'];
echo "<tr><td class='first_cell text-left'><a href='".base_url().'/editor.php?id_module='.$link_id.'&id_record='.$documenti[$i]['id']."' target=\"_blank\" title=\"Apri il documento su una nuova finestra\">".$documenti[$i]['tipo'].'. n. '.$n_documento.' del '.dateFormat($documenti[$i]['data_documento'])." </a></td>\n";
echo "<tr><td class='first_cell text-left'><a href='".base_path().'/editor.php?id_module='.$link_id.'&id_record='.$documenti[$i]['id']."' target=\"_blank\" title=\"Apri il documento su una nuova finestra\">".$documenti[$i]['tipo'].'. n. '.$n_documento.' del '.dateFormat($documenti[$i]['data_documento'])." </a></td>\n";
echo "<td class='table_cell text-right'>".moneyFormat($documenti[$i]['costo_unitario'])."</td></tr>\n";
array_push($ids, '"'.$documenti[$i]['id'].'"');
}
@ -73,7 +73,7 @@ switch ($resource) {
($documenti[$i]['n2_documento'] != '') ? $n_documento = $documenti[$i]['n2_documento'] : $n_documento = $documenti[$i]['n_documento'];
$link_id = module($documenti[$i]['modulo'])['id'];
echo "<tr><td class='first_cell text-left'><a href='".base_url().'/editor.php?id_module='.$link_id.'&id_record='.$documenti[$i]['id']."' target=\"_blank\" title=\"Apri il documento su una nuova finestra\">".$documenti[$i]['tipo'].'. n. '.$n_documento.' del '.dateFormat($documenti[$i]['data_documento'])." </a></td>\n";
echo "<tr><td class='first_cell text-left'><a href='".base_path().'/editor.php?id_module='.$link_id.'&id_record='.$documenti[$i]['id']."' target=\"_blank\" title=\"Apri il documento su una nuova finestra\">".$documenti[$i]['tipo'].'. n. '.$n_documento.' del '.dateFormat($documenti[$i]['data_documento'])." </a></td>\n";
echo "<td class='table_cell text-right'>".moneyFormat($documenti[$i]['costo_unitario'])."</td></tr>\n";
array_push($ids, '"'.$documenti[$i]['id'].'"');
}
@ -101,7 +101,7 @@ switch ($resource) {
($documenti[$i]['n2_documento'] != '') ? $n_documento = $documenti[$i]['n2_documento'] : $n_documento = $documenti[$i]['n_documento'];
$link_id = module($documenti[$i]['modulo'])['id'];
echo "<tr><td class='first_cell text-left'><a href='".base_url().'/editor.php?id_module='.$link_id.'&id_record='.$documenti[$i]['id']."' target=\"_blank\" title=\"Apri il documento su una nuova finestra\">".$documenti[$i]['tipo'].'. n. '.$n_documento.' del '.dateFormat($documenti[$i]['data_documento'])." </a></td>\n";
echo "<tr><td class='first_cell text-left'><a href='".base_path().'/editor.php?id_module='.$link_id.'&id_record='.$documenti[$i]['id']."' target=\"_blank\" title=\"Apri il documento su una nuova finestra\">".$documenti[$i]['tipo'].'. n. '.$n_documento.' del '.dateFormat($documenti[$i]['data_documento'])." </a></td>\n";
echo "<td class='table_cell text-right'>".moneyFormat($documenti[$i]['costo_unitario'])."</td></tr>\n";
array_push($ids, '"'.$documenti[$i]['id'].'"');
}

View File

@ -49,7 +49,7 @@ $rs = $dbo->fetchArray($query);
foreach ($rs as $r) {
$result = [];
$result['link'] = base_url().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['link'] = base_path().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['title'] = $r['codice'].' - '.$r['descrizione'];
$result['category'] = 'Articoli';

View File

@ -111,8 +111,8 @@ switch (post('op')) {
session('superselect.id_articolo_barcode') = $id_records;
$id_print = Prints::getPrints()['Barcode'];
redirect(base_url().'/pdfgen.php?id_print='.$id_print.'&id_record='.Articolo::where('barcode', '!=', '')->first()->id);
exit();
redirect(base_path().'/pdfgen.php?id_print='.$id_print.'&id_record='.Articolo::where('barcode', '!=', '')->first()->id);
throw new \LegacyExitException();;
break;
@ -178,7 +178,7 @@ switch (post('op')) {
$database->commitTransaction();
redirect(base_path().'/editor.php?id_module='.module('Preventivi')['id'].'&id_record='.$id_preventivo);
exit();
throw new \LegacyExitException();;
break;

View File

@ -429,8 +429,8 @@ $(document).ready(function(){
input('prezzo_acquisto').disable();
}
$("#prezziacquisto").load("<?php echo base_url(); ?>/ajax_complete.php?module=Articoli&op=getprezziacquisto&idarticolo="+ <?php echo $id_record; ?> + "&limit=20");
$("#prezziacquisto").load("<?php echo base_path(); ?>/ajax_complete.php?module=Articoli&op=getprezziacquisto&idarticolo="+ <?php echo $id_record; ?> + "&limit=20");
$("#prezzivendita").load("<?php echo base_url(); ?>/ajax_complete.php?module=Articoli&op=getprezzivendita&idarticolo="+ <?php echo $id_record; ?> + "&limit=20");
$("#prezzivendita").load("<?php echo base_path(); ?>/ajax_complete.php?module=Articoli&op=getprezzivendita&idarticolo="+ <?php echo $id_record; ?> + "&limit=20");
});
</script>

View File

@ -27,20 +27,20 @@ echo '
<div class="pull-right">';
if (empty($_GET['movimentazione_completa'])) {
echo '
<a class="btn btn-info btn-xs" href="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&movimentazione_completa=1#tab_'.$id_plugin.'">
<a class="btn btn-info btn-xs" href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&movimentazione_completa=1#tab_'.$id_plugin.'">
<i class="fa fa-eye"></i>
'.tr('Mostra tutti i movimenti').'
</a>';
} else {
echo '
<a class="btn btn-info btn-xs" href="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&movimentazione_completa=0#tab_'.$id_plugin.'">
<a class="btn btn-info btn-xs" href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&movimentazione_completa=0#tab_'.$id_plugin.'">
<i class="fa fa-eye-slash"></i>
'.tr('Mostra gli ultimi 20 movimenti').'
</a>';
}
echo '
<a class="btn btn-warning btn-xs" href="'.base_url().'/controller.php?id_module='.module('Movimenti')->id.'&search_Articolo='.($articolo->codice.' - '.$articolo->descrizione).'">
<a class="btn btn-warning btn-xs" href="'.base_path().'/controller.php?id_module='.module('Movimenti')->id.'&search_Articolo='.($articolo->codice.' - '.$articolo->descrizione).'">
<i class="fa fa-external-link"></i>
'.tr('Visualizza dettagli').'
</a>';

View File

@ -176,7 +176,7 @@ class Articolo extends Model
$image = $directory.$this->immagine;
$image_thumbnail = $directory.$fileinfo['filename'].'_thumb600.'.$fileinfo['extension'];
$url = file_exists(base_dir().$image_thumbnail) ? base_url().$image_thumbnail : base_url().$image;
$url = file_exists(base_dir().$image_thumbnail) ? base_path().$image_thumbnail : base_path().$image;
return $url;
}

View File

@ -23,7 +23,7 @@ include_once __DIR__.'/../../../core.php';
$id_print = $dbo->fetchOne('SELECT zz_prints.id FROM zz_prints INNER JOIN zz_modules ON zz_prints.id_module=zz_modules.id WHERE zz_modules.name="Articoli" AND zz_prints.name="Inventario magazzino"')['id'];
echo '
<form action="'.base_url().'/pdfgen.php?id_print='.$id_print.'" method="post" target="_blank">
<form action="'.base_path().'/pdfgen.php?id_print='.$id_print.'" method="post" target="_blank">
<div class="row">

View File

@ -234,7 +234,7 @@ if (file_exists($backup_dir)) {
loadSize("'.$id.'", "c-'.$id.'");
</script>
<a class="btn btn-primary" href="'.base_url().'/modules/backups/actions.php?op=getfile&number='.$id.'" target="_blank"><i class="fa fa-download"></i> '.tr('Scarica').'</a>
<a class="btn btn-primary" href="'.base_path().'/modules/backups/actions.php?op=getfile&number='.$id.'" target="_blank"><i class="fa fa-download"></i> '.tr('Scarica').'</a>
<div class="pull-right">
<a class="btn btn-warning ask" data-backto="record-edit" data-method="post" data-op="restore" data-number="'.$id.'" data-msg="'.tr('Clicca su Ripristina per ripristinare questo backup').'" data-button="Ripristina" data-class="btn btn-lg btn-warning">

View File

@ -42,8 +42,8 @@ switch (filter('op')) {
// Redirect alla categoria se si sta modificando una sottocategoria
$database->commitTransaction();
redirect(base_url().'/editor.php?id_module='.$id_module.'&id_record='.($id_original ?: $id_record));
exit();
redirect(base_path().'/editor.php?id_module='.$id_module.'&id_record='.($id_original ?: $id_record));
throw new \LegacyExitException();;
break;
@ -85,8 +85,8 @@ switch (filter('op')) {
} else {
// Redirect alla categoria se si sta aggiungendo una sottocategoria
$database->commitTransaction();
redirect(base_url().'/editor.php?id_module='.$id_module.'&id_record='.($id_original ?: $id_record));
exit();
redirect(base_path().'/editor.php?id_module='.$id_module.'&id_record='.($id_original ?: $id_record));
throw new \LegacyExitException();;
}
break;

View File

@ -27,7 +27,7 @@ if (isset($id_record)) {
?><form action="<?php
if (isset($id_original)) {
echo base_url().'/controller.php?id_module='.$id_module;
echo base_path().'/controller.php?id_module='.$id_module;
if (isset($id_record)) {
echo '&id_record='.$id_record;

View File

@ -57,7 +57,7 @@ include_once __DIR__.'/../../core.php';
<div class="panel-body">
<div class="pull-left">
<a class="btn btn-primary" data-href="<?php echo base_url(); ?>/add.php?id_module=<?php echo $id_module; ?>&id_original=<?php echo $id_record; ?>" data-toggle="modal" data-title="<?php echo tr('Aggiungi riga'); ?>"><i class="fa fa-plus"></i> <?php echo tr('Sottocategoria'); ?></a><br>
<a class="btn btn-primary" data-href="<?php echo base_path(); ?>/add.php?id_module=<?php echo $id_module; ?>&id_original=<?php echo $id_record; ?>" data-toggle="modal" data-title="<?php echo tr('Aggiungi riga'); ?>"><i class="fa fa-plus"></i> <?php echo tr('Sottocategoria'); ?></a><br>
</div>
<div class="clearfix"></div>
<hr>

View File

@ -29,7 +29,7 @@ foreach ($subcategorie as $sub) {
<td>'.$sub['colore'].'</td>
<td>'.$sub['nota'].'</td>
<td>
<a class="btn btn-warning btn-sm" title="Modifica riga" onclick="launch_modal(\''.tr('Modifica sottocategoria').'\', \''.base_url().'/add.php?id_module='.$id_module.'&id_record='.$sub['id'].'&id_original='.$id_record.'\');"><i class="fa fa-edit"></i></a>
<a class="btn btn-warning btn-sm" title="Modifica riga" onclick="launch_modal(\''.tr('Modifica sottocategoria').'\', \''.base_path().'/add.php?id_module='.$id_module.'&id_record='.$sub['id'].'&id_original='.$id_record.'\');"><i class="fa fa-edit"></i></a>
<a class="btn btn-sm btn-danger ask '.(($n_articoli > 0) ? 'disabled tip' : '').'" data-backto="record-edit" data-id="'.$sub['id'].'" title="'.(($n_articoli > 0) ? 'Sottocategoria collegata a '.$n_articoli.' articoli' : '').'">
<i class="fa fa-trash"></i>
</a>

View File

@ -114,7 +114,7 @@ function modificaVariante(id) {
function rimuoviVariante(id) {
if( confirm(\'Rimuovere la variante dalla combinazione?\') ){
$.post( \''.base_url().'/modules/combinazioni_articoli/actions.php\', { op: \'remove-variante\', id_articolo: + id }, function(data){ location.href=\''.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'\'; } );
$.post( \''.base_path().'/modules/combinazioni_articoli/actions.php\', { op: \'remove-variante\', id_articolo: + id }, function(data){ location.href=\''.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'\'; } );
}
}

View File

@ -248,7 +248,7 @@ if (!empty($rs)) {
</td>
<td>
<button type="button" class="btn btn-warning" data-toggle="tooltip" title="Importa valori da tariffe standard" onclick="if( confirm(\'Importare i valori dalle tariffe standard?\') ){ $.post( \''.base_url().'/modules/contratti/actions.php\', { op: \'import\', idcontratto: \''.$id_record.'\', idtipointervento: \''.$rs[$i]['idtipointervento'].'\' }, function(data){ location.href=\''.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'\'; } ); }">
<button type="button" class="btn btn-warning" data-toggle="tooltip" title="Importa valori da tariffe standard" onclick="if( confirm(\'Importare i valori dalle tariffe standard?\') ){ $.post( \''.base_path().'/modules/contratti/actions.php\', { op: \'import\', idcontratto: \''.$id_record.'\', idtipointervento: \''.$rs[$i]['idtipointervento'].'\' }, function(data){ location.href=\''.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'\'; } ); }">
<i class="fa fa-download"></i>
</button>
</td>
@ -300,7 +300,7 @@ if (!empty($rs)) {
</td>
<td>
<button type="button" class="btn btn-warning" data-toggle="tooltip" title="Importa valori da tariffe standard" onclick="if( confirm(\'Importare i valori dalle tariffe standard?\') ){ $.post( \''.base_url().'/modules/contratti/actions.php\', { op: \'import\', idcontratto: \''.$id_record.'\', idtipointervento: \''.$rs[$i]['idtipointervento'].'\' }, function(data){ location.href=\''.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'\'; } ); }">
<button type="button" class="btn btn-warning" data-toggle="tooltip" title="Importa valori da tariffe standard" onclick="if( confirm(\'Importare i valori dalle tariffe standard?\') ){ $.post( \''.base_path().'/modules/contratti/actions.php\', { op: \'import\', idcontratto: \''.$id_record.'\', idtipointervento: \''.$rs[$i]['idtipointervento'].'\' }, function(data){ location.href=\''.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'\'; } ); }">
<i class="fa fa-download"></i>
</button>
</td>

View File

@ -109,7 +109,7 @@ switch (filter('op')) {
'title' => '<div style=\'position:absolute; top:7%; right:3%;\' > '.(($sessione['is_completato']) ? '<i class="fa fa-lock" aria-hidden="true"></i>' : '').' '.(($sessione['have_attachments']) ? '<i class="fa fa-paperclip" aria-hidden="true"></i>' : '').'</div>'.'<b>Int. '.$sessione['codice'].'</b> '.$sessione['cliente'].'<br><b>'.tr('Tecnici').':</b> '.$sessione['nome_tecnico'],
'start' => $sessione['orario_inizio'],
'end' => $sessione['orario_fine'],
'link' => base_url().'/editor.php?id_module='.$modulo_interventi->id.'&id_record='.$sessione['idintervento'],
'link' => base_path().'/editor.php?id_module='.$modulo_interventi->id.'&id_record='.$sessione['idintervento'],
'backgroundColor' => $backgroundcolor,
'textColor' => color_inverse($backgroundcolor),
'borderColor' => ($bordercolor == '#FFFFFF') ? color_darken($bordercolor, 100) : $bordercolor,
@ -149,7 +149,7 @@ switch (filter('op')) {
'title' => '<div style=\'position:absolute; top:7%; right:3%;\' > '.(($preventivo['is_completato']) ? '<i class="fa fa-lock" aria-hidden="true"></i>' : '').' '.(($preventivo['have_attachments']) ? '<i class="fa fa-paperclip" aria-hidden="true"></i>' : '').'</div>'.'<b>Accettazione prev. '.$preventivo['numero'].'</b> '.$preventivo['nome'].'<br><b>'.tr('Cliente').':</b> '.$preventivo['cliente'],
'start' => $preventivo['data_accettazione'],
'end' => $preventivo['data_accettazione'],
'url' => base_url().'/editor.php?id_module='.$modulo_preventivi->id.'&id_record='.$preventivo['id'],
'url' => base_path().'/editor.php?id_module='.$modulo_preventivi->id.'&id_record='.$preventivo['id'],
'backgroundColor' => '#ff7f50',
'textColor' => color_inverse('#ff7f50'),
'borderColor' => '#ff7f50',
@ -166,7 +166,7 @@ switch (filter('op')) {
'title' => '<div style=\'position:absolute; top:7%; right:3%;\' > '.(($preventivo['is_completato']) ? '<i class="fa fa-lock" aria-hidden="true"></i>' : '').' '.(($preventivo['have_attachments']) ? '<i class="fa fa-paperclip" aria-hidden="true"></i>' : '').'</div>'.'<b>Conclusione prev. '.$preventivo['numero'].'</b> '.$preventivo['nome'].'<br><b>'.tr('Cliente').':</b> '.$preventivo['cliente'],
'start' => $preventivo['data_conclusione'],
'end' => $preventivo['data_conclusione'],
'url' => base_url().'/editor.php?id_module='.$modulo_preventivi->id.'&id_record='.$preventivo['id'],
'url' => base_path().'/editor.php?id_module='.$modulo_preventivi->id.'&id_record='.$preventivo['id'],
'backgroundColor' => '#ff7f50',
'textColor' => color_inverse('#ff7f50'),
'borderColor' => '#ff7f50',

View File

@ -51,7 +51,7 @@ foreach ($rs as $r) {
$numero = empty($r['numero_esterno']) ? $r['numero'] : $r['numero_esterno'];
$result['link'] = base_url().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['link'] = base_path().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['title'] = $r['tipologia'].' num. '.$numero.' del '.dateFormat($r['data']);
$result['category'] = $r['tipologia'];

View File

@ -27,7 +27,7 @@ if (!empty($ddt->id_ddt_trasporto_interno)) {
echo '
<div class="tip" data-toggle="tooltip" title="'.tr("Questo ddt è impostato sull'anagrafica Azienda, e pertanto rappresenta un trasporto interno di merce: il movimento tra sedi distinte è necessario completato tramite un DDT in direzione opposta").'.">
<a class="btn btn-info" href="'.base_url().'/editor.php?id_module='.$id_module_collegamento.'&id_record='.$ddt->id_ddt_trasporto_interno.'">
<a class="btn btn-info" href="'.base_path().'/editor.php?id_module='.$id_module_collegamento.'&id_record='.$ddt->id_ddt_trasporto_interno.'">
<i class="fa fa-truck"></i> '.tr('DDT di completamento trasporto').'
</a>
</div>';

View File

@ -358,12 +358,12 @@ if (!$block_edit) {
$ddt_query = 'SELECT COUNT(*) AS tot FROM dt_ddt WHERE idstatoddt IN (SELECT id FROM dt_statiddt WHERE descrizione IN(\'Evaso\', \'Parzialmente evaso\', \'Parzialmente fatturato\')) AND idtipoddt=(SELECT id FROM or_tipiordine WHERE dir="'.($dir == 'entrata' ? 'uscita' : 'entrata').'") AND dt_ddt.id IN (SELECT idddt FROM dt_righe_ddt WHERE dt_righe_ddt.idddt = dt_ddt.id AND (qta - qta_evasa) > 0)';
$ddt = $dbo->fetchArray($ddt_query)[0]['tot'];
echo '
<a class="btn btn-sm btn-primary'.(!empty($ddt) ? '' : ' disabled').'" data-href="'.base_url().'/modules/ddt/add_ddt.php?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi DDT').'">
<a class="btn btn-sm btn-primary'.(!empty($ddt) ? '' : ' disabled').'" data-href="'.base_path().'/modules/ddt/add_ddt.php?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi DDT').'">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>';
echo '
<a class="btn btn-sm btn-primary'.(!empty($ordini) ? '' : ' disabled').'" data-href="'.base_url().'/modules/ddt/add_ordine.php?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ordine').'">
<a class="btn btn-sm btn-primary'.(!empty($ordini) ? '' : ' disabled').'" data-href="'.base_path().'/modules/ddt/add_ordine.php?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ordine').'">
<i class="fa fa-plus"></i> '.tr('Ordine').'
</a>';

View File

@ -46,7 +46,7 @@ echo '
'_NUM_' => $numero,
]).'</p>
<form action="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post">
<form action="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post">
<input type="hidden" name="op" value="add_intervento">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="dir" value="'.$dir.'">';

View File

@ -75,7 +75,7 @@ $rs = $dbo->fetchArray('SELECT mg_articoli.id AS idarticolo, mg_articoli.codice,
echo '
<p>'.tr('Articolo').': '.$rs[0]['codice'].' - '.$rs[0]['descrizione'].'</p>
<form action="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post">
<form action="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post">
<input type="hidden" name="op" value="add_serial">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="idriga" value="'.$idriga.'">

View File

@ -53,7 +53,7 @@ foreach ($rs as $r) {
$numero = empty($r['numero_esterno']) ? $r['numero'] : $r['numero_esterno'];
$result['link'] = base_url().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['link'] = base_path().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['title'] = $r['tipologia'].' num. '.$numero.' del '.dateFormat($r['data']);
$result['category'] = $r['tipologia'];

View File

@ -494,7 +494,7 @@ $operations['registrazione-contabile'] = [
'title' => tr('Registrazione contabile'),
'type' => 'modal',
'origine' => 'fatture',
'url' => base_url().'/add.php?id_module='.module('Prima nota')['id'],
'url' => base_path().'/add.php?id_module='.module('Prima nota')['id'],
],
];

View File

@ -42,11 +42,11 @@ if ($dir == 'entrata') {
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=nota_addebito&backto=record-edit">
<li><a href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=nota_addebito&backto=record-edit">
'.tr('Nota di debito').'
</a></li>
<li><a data-href="'.base_url().'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&iddocumento='.$id_record.'" data-title="Aggiungi nota di credito">
<li><a data-href="'.base_path().'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&iddocumento='.$id_record.'" data-title="Aggiungi nota di credito">
'.tr('Nota di credito').'
</a></li>
</ul>
@ -80,7 +80,7 @@ if (!empty($record['is_fiscale'])) {
}
echo '
<a class="btn btn-primary '.(!empty($modulo_prima_nota) && !empty($registrazione_insoluto) ? '' : 'disabled').'" data-href="'.base_url().'/add.php?id_module='.$modulo_prima_nota['id'].'&id_documenti='.$id_record.'&single=1&is_insoluto=1" data-title="'.tr('Registra insoluto').'">
<a class="btn btn-primary '.(!empty($modulo_prima_nota) && !empty($registrazione_insoluto) ? '' : 'disabled').'" data-href="'.base_path().'/add.php?id_module='.$modulo_prima_nota['id'].'&id_documenti='.$id_record.'&single=1&is_insoluto=1" data-title="'.tr('Registra insoluto').'">
<i class="fa fa-ban fa-inverse"></i> '.tr('Registra insoluto').'
</a>';
@ -98,7 +98,7 @@ if (!empty($record['is_fiscale'])) {
}
echo '
<a class="btn btn-primary '.(!empty($modulo_prima_nota) && !empty($registrazione_contabile) ? '' : 'disabled').'" data-href="'.base_url().'/add.php?id_module='.$modulo_prima_nota['id'].'&id_documenti='.$id_record.'&single=1" data-title="'.tr('Registra contabile').'">
<a class="btn btn-primary '.(!empty($modulo_prima_nota) && !empty($registrazione_contabile) ? '' : 'disabled').'" data-href="'.base_path().'/add.php?id_module='.$modulo_prima_nota['id'].'&id_documenti='.$id_record.'&single=1" data-title="'.tr('Registra contabile').'">
<i class="fa fa-euro"></i> '.tr('Registra contabile').'
</a>';

View File

@ -32,9 +32,9 @@ FROM co_documenti
WHERE co_documenti.id='.prepare($id_record));
if (!empty(setting('Logo stampe'))) {
$logo_azienda = base_url().'/'.Models\Upload::where('filename', setting('Logo stampe'))->first()->fileurl;
$logo_azienda = base_path().'/'.Models\Upload::where('filename', setting('Logo stampe'))->first()->fileurl;
} else {
$logo_azienda = str_replace(base_dir(), base_url(), AppLegacy::filepath('templates/base|custom|/logo_azienda.jpg'));
$logo_azienda = str_replace(base_dir(), base_path(), AppLegacy::filepath('templates/base|custom|/logo_azienda.jpg'));
$logo_azienda = str_replace('\\', '/', $logo_azienda);
}

View File

@ -21,5 +21,5 @@ include_once __DIR__.'/../../core.php';
if (isset($id_record)) {
$id_module = module('Articoli')['id'];
redirect_legacy(base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record);
redirect_legacy(base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record);
}

View File

@ -49,7 +49,7 @@ $rs = $dbo->fetchArray($query);
foreach ($rs as $r) {
$result = [];
$result['link'] = base_url().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['link'] = base_path().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['title'] = $r['matricola'].' - '.$r['nome'];
$result['category'] = 'Impianti';

View File

@ -25,7 +25,7 @@ if (!empty($record['immagine'])) {
$default_img = '/'.Uploads::getDirectory($id_module).'/'.$fileinfo['filename'].'_thumb600.'.$fileinfo['extension'];
$img = file_exists(base_dir().$default_img) ? base_url().$default_img : base_url().'/'.Uploads::getDirectory($id_module).'/'.$record['immagine'];
$img = file_exists(base_dir().$default_img) ? base_path().$default_img : base_path().'/'.Uploads::getDirectory($id_module).'/'.$record['immagine'];
}
?><form action="" method="post" id="edit-form" enctype="multipart/form-data">

View File

@ -123,7 +123,7 @@ foreach ($impianti_collegati as $impianto) {
<tr>
<td valign="top" class="text-right">'.tr("Componenti soggetti all'intervento").'</td>
<td valign="top">
<form action="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=link_componenti&matricola='.$impianto['id'].'" method="post">
<form action="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=link_componenti&matricola='.$impianto['id'].'" method="post">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="id_impianto" value="'.$impianto['id'].'">';
@ -159,7 +159,7 @@ $sedi = $dbo->fetchArray('SELECT id, nomesede, citta FROM an_sedi WHERE idanagra
echo '
<p><strong>'.tr('Impianti disponibili').'</strong></p>
<form action="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=link_impianti" method="post">
<form action="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=link_impianti" method="post">
<input type="hidden" name="backto" value="record-edit">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -169,7 +169,7 @@ echo '
<br><br>
<button type="submit" class="btn btn-success pull-right" '.$disabled.'><i class="fa fa-check"></i> '.tr('Salva impianti').'</button>
<button type="button" class="btn btn-primary hide" data-toggle="modal" data-title="'.tr('Aggiungi impianto').'" data-href="'.base_url().'/add.php?id_module='.module('Impianti')['id'].'&source=Attività&select=idimpianti&id_anagrafica='.$record['idanagrafica'].'&ajax=yes"><i class="fa fa-plus"></i> '.tr('Aggiungi impianto').'</button>
<button type="button" class="btn btn-primary hide" data-toggle="modal" data-title="'.tr('Aggiungi impianto').'" data-href="'.base_path().'/add.php?id_module='.module('Impianti')['id'].'&source=Attività&select=idimpianti&id_anagrafica='.$record['idanagrafica'].'&ajax=yes"><i class="fa fa-plus"></i> '.tr('Aggiungi impianto').'</button>
</form>';

View File

@ -49,7 +49,7 @@ switch (filter('op')) {
// Generazione del file
$import_manager::createExample($filepath);
echo base_url().'/'.$file;
echo base_path().'/'.$file;
}
break;

View File

@ -27,6 +27,14 @@ $id_sede = filter('idsede');
$richiesta = filter('richiesta');
$id_tipo = filter('id_tipo');
$id_cliente = null;
$id_cliente_finale = null;
$id_preventivo = null;
$data_richiesta = null;
$data_scadenza = null;
$impianti_collegati = null;
$id_zona = null;
$origine_dashboard = get('ref') !== null;
$module_anagrafiche = module('Anagrafiche');
$id_plugin_sedi = Plugins::get('Sedi')['id'];
@ -48,7 +56,7 @@ if ($user['gruppo'] == 'Tecnici' && !empty($user['idanagrafica'])) {
}
// Stato di default associato all'attivitò
$stato = $dbo->fetchArray("SELECT * FROM in_statiintervento WHERE codice = 'WIP'");
$stato = $dbo->fetchOne("SELECT * FROM in_statiintervento WHERE codice = 'WIP'");
$id_stato = $stato['idstatointervento'];
// Se è indicata un'anagrafica relativa, si carica il tipo di intervento di default impostato
@ -518,7 +526,7 @@ echo '
if (data !== undefined) {
// Carico nel panel i dettagli del cliente
$.get("'.base_url().'/ajax_complete.php?module=Interventi&op=dettagli&id_anagrafica=" + value, function(data){
$.get("'.base_path().'/ajax_complete.php?module=Interventi&op=dettagli&id_anagrafica=" + value, function(data){
$("#dettagli_cliente").html(data);
});
} else {

View File

@ -53,7 +53,7 @@ $rs = $dbo->fetchArray($query);
foreach ($rs as $r) {
$result = [];
$result['link'] = base_url().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['link'] = base_path().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['title'] = 'Intervento '.$r['codice'].' del '.dateFormat($r['data']);
$result['category'] = 'Interventi';

View File

@ -245,7 +245,7 @@ if (!$is_completato) {
}
echo '
<script src="'.base_url().'/assets/src/js/functions/functions.js"></script>
<script src="'.base_path().'/assets/src/js/functions/functions.js"></script>
<script>$(document).ready(init)</script>
<script type="text/javascript">

View File

@ -532,7 +532,7 @@ $articoli = $intervento->articoli;
<div class="alert alert-warning"><i class="fa fa-warning"></i> '.tr('Questo intervento non è ancora stato firmato dal cliente').'.</div>';
} else {
echo '
<img src="'.base_url().'/files/interventi/'.$record['firma_file'].'" class="img-thumbnail"><div>&nbsp;</div>
<img src="'.base_path().'/files/interventi/'.$record['firma_file'].'" class="img-thumbnail"><div>&nbsp;</div>
<div class="col-md-6 col-md-offset-3 alert alert-success"><i class="fa fa-check"></i> '.tr('Firmato il _DATE_ alle _TIME_ da _PERSON_', [
'_DATE_' => dateFormat($record['firma_data']),
'_TIME_' => timeFormat($record['firma_data']),

View File

@ -48,7 +48,7 @@ if (get('anteprima') !== null) {
}
?>
<form action="<?php echo base_url(); ?>/editor.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>" method="post" id="form-firma" class="hide">
<form action="<?php echo base_path(); ?>/editor.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>" method="post" id="form-firma" class="hide">
<input type="hidden" name="op" value="firma">
<input type="hidden" name="backto" value="record-edit">

View File

@ -26,7 +26,7 @@ $op = 'add_sessione';
$button = '<i class="fa fa-edit"></i> '.tr('Aggiungi');
echo '
<form id="add_form" action="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.get('id_record').'" method="post">
<form id="add_form" action="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.get('id_record').'" method="post">
<input type="hidden" name="op" value="'.$op.'">
<input type="hidden" name="backto" value="record-edit">';

View File

@ -41,7 +41,7 @@ if (!empty($intervento->id_contratto)) {
$query = 'SELECT in_tipiintervento.idtipointervento AS id, descrizione, in_tariffe.costo_ore AS prezzo_ore_unitario, in_tariffe.costo_km AS prezzo_km_unitario, in_tariffe.costo_dirittochiamata AS prezzo_dirittochiamata FROM in_tipiintervento JOIN in_tariffe ON in_tipiintervento.idtipointervento = in_tariffe.idtipointervento WHERE in_tariffe.idtecnico = '.prepare($sessione['idtecnico']).' ORDER BY descrizione';
}
echo '
<form id="add_form" action="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.get('id_record').'" method="post">
<form id="add_form" action="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.get('id_record').'" method="post">
<input type="hidden" name="op" value="'.$op.'">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="id_sessione" value="'.$sessione['id'].'">

View File

@ -23,7 +23,7 @@ include_once __DIR__.'/../../../core.php';
$id_print = $dbo->fetchOne('SELECT zz_prints.id FROM zz_prints INNER JOIN zz_modules ON zz_prints.id_module=zz_modules.id WHERE zz_modules.name="Interventi" AND zz_prints.name="Riepilogo interventi"')['id'];
echo '
<form action="'.base_url().'/pdfgen.php?id_print='.$id_print.'" method="post" target="_blank">
<form action="'.base_path().'/pdfgen.php?id_print='.$id_print.'" method="post" target="_blank">
<div class="row">

View File

@ -211,7 +211,7 @@ if (!$block_edit) {
if ($dir == 'entrata') {
echo '
<div class="tip">
<a class="btn btn-sm btn-primary '.(!empty($preventivi) ? '' : ' disabled').'" data-href="'.base_url().'/modules/ordini/add_preventivo.php?id_module='.$id_module.'&id_record='.$id_record.'" data-title="'.tr('Aggiungi preventivo').'" data-toggle="tooltip">
<a class="btn btn-sm btn-primary '.(!empty($preventivi) ? '' : ' disabled').'" data-href="'.base_path().'/modules/ordini/add_preventivo.php?id_module='.$id_module.'&id_record='.$id_record.'" data-title="'.tr('Aggiungi preventivo').'" data-toggle="tooltip">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>
</div>';

View File

@ -103,10 +103,10 @@ switch (filter('op')) {
if ($id_record == $id) {
$res = $dbo->fetchArray('SELECT * FROM `co_pagamenti` WHERE `id`!='.prepare($id).' AND `descrizione`='.prepare($record['descrizione']));
if (count($res) != 0) {
redirect_legacy(base_url().'/editor.php?id_module='.$id_module.'&id_record='.$res[0]['id']);
redirect_legacy(base_path().'/editor.php?id_module='.$id_module.'&id_record='.$res[0]['id']);
} else {
// $_POST['backto'] = 'record-list';
redirect_legacy(base_url().'/controller.php?id_module='.$id_module);
redirect_legacy(base_path().'/controller.php?id_module='.$id_module);
}
}
}

View File

@ -257,7 +257,7 @@ function controllaRate() {
function rimuoviRata(id) {
if(confirm("<?php echo tr('Eliminare questo elemento?'); ?>")){
location.href = "<?php echo base_url(); ?>/editor.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>&op=delete_rata&id=" + id;
location.href = "<?php echo base_path(); ?>/editor.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>&op=delete_rata&id=" + id;
}
}
</script>

View File

@ -22,7 +22,7 @@ include_once __DIR__.'/../../core.php';
$id_conto = get('id');
$lvl = get('lvl');
?><form action="<?php echo base_url(); ?>/editor.php?id_module=<?php echo module('Piano dei conti')['id']; ?>" method="post">
?><form action="<?php echo base_path(); ?>/editor.php?id_module=<?php echo module('Piano dei conti')['id']; ?>" method="post">
<input type="hidden" name="op" value="add">
<input type="hidden" name="backto" value="record-list">

View File

@ -31,7 +31,7 @@ if ($lvl == 2) {
$info = $dbo->fetchOne($query);
?><form action="<?php echo base_url(); ?>/editor.php?id_module=<?php echo module('Piano dei conti')['id']; ?>" method="post">
?><form action="<?php echo base_path(); ?>/editor.php?id_module=<?php echo module('Piano dei conti')['id']; ?>" method="post">
<input type="hidden" name="op" value="edit">
<input type="hidden" name="backto" value="record-list">
<input type="hidden" name="lvl" value="<?php echo $lvl; ?>">

View File

@ -46,7 +46,7 @@ $rs = $dbo->fetchArray($query);
foreach ($rs as $r) {
$result = [];
$result['link'] = base_url().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['link'] = base_path().'/editor.php?id_module='.$link_id.'&id_record='.$r['id'];
$result['title'] = 'Preventivo '.$r['numero'];
if ($r['data_accettazione'] == '0000-00-00') {

View File

@ -42,7 +42,7 @@ if (!empty($rs)) {
$attr = '';
}
echo '<tr '.$attr.'><td><a href="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$preventivo['id'].'">'.$preventivo['nome']."</a><br><small class='help-block'>".$preventivo['ragione_sociale'].'</small></td>';
echo '<tr '.$attr.'><td><a href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$preventivo['id'].'">'.$preventivo['nome']."</a><br><small class='help-block'>".$preventivo['ragione_sociale'].'</small></td>';
echo '<td '.$attr.'>'.$data_accettazione.'</td>';
echo '<td '.$attr.'>'.$data_conclusione.'</td></tr>';
}

View File

@ -260,7 +260,7 @@ if (!empty(get('id_anagrafica'))) {
$id_anagrafica = $dbo->fetchOne('SELECT idanagrafica FROM co_documenti WHERE id IN('.(get('id_documenti') ?: '0').')')['idanagrafica'];
}
echo '
<form action="'.base_url().'/controller.php?id_module='.$module->id.'" method="post" id="add-form">
<form action="'.base_path().'/controller.php?id_module='.$module->id.'" method="post" id="add-form">
<input type="hidden" name="op" value="add">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="crea_modello" id="crea_modello" value="0">

View File

@ -37,7 +37,7 @@ include_once __DIR__.'/../../core.php';
$modulo = ($rs[0]['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto'; ?>
<div class=" col-md-2">
<br>
<a href="<?php echo base_url(); ?>/editor.php?id_module=<?php echo module($modulo)['id']; ?>&id_record=<?php echo $rs_doc[0]['iddocumento']; ?>" class="btn btn-info"><i class="fa fa-chevron-left"></i> <?php echo tr('Vai alla fattura'); ?></a>
<a href="<?php echo base_path(); ?>/editor.php?id_module=<?php echo module($modulo)['id']; ?>&id_record=<?php echo $rs_doc[0]['iddocumento']; ?>" class="btn btn-info"><i class="fa fa-chevron-left"></i> <?php echo tr('Vai alla fattura'); ?></a>
</div>
<?php
} else {
@ -52,7 +52,7 @@ include_once __DIR__.'/../../core.php';
for ($i = 0; $i < sizeof($rs_doc); ++$i) {
$rs = $dbo->fetchArray('SELECT dir FROM co_tipidocumento INNER JOIN co_documenti ON co_tipidocumento.id=co_documenti.idtipodocumento WHERE co_documenti.id='.prepare($rs_doc[$i]['iddocumento']));
$modulo = ($rs[0]['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto'; ?>
<li><a href="<?php echo base_url(); ?>/editor.php?id_module=<?php echo module($modulo)['id']; ?>&id_record=<?php echo $rs_doc[$i]['iddocumento']; ?>" class="dropdown-item"><?php echo tr('Vai alla fattura n. '.$rs_doc[$i]['numero']); ?></a></li>
<li><a href="<?php echo base_path(); ?>/editor.php?id_module=<?php echo module($modulo)['id']; ?>&id_record=<?php echo $rs_doc[$i]['iddocumento']; ?>" class="dropdown-item"><?php echo tr('Vai alla fattura n. '.$rs_doc[$i]['numero']); ?></a></li>
<?php
} ?>
</ul>

View File

@ -75,7 +75,7 @@ $operations['registrazione-contabile'] = [
'title' => tr('Registrazione contabile'),
'type' => 'modal',
'origine' => 'scadenzario',
'url' => base_url().'/add.php?id_module='.module('Prima nota')['id'],
'url' => base_path().'/add.php?id_module='.module('Prima nota')['id'],
],
];

View File

@ -189,7 +189,7 @@ echo '
if ($totale_da_pagare != 0) {
echo '
<div class="pull-right">
<a onclick="launch_modal(\''.tr('Registra contabile pagamento').'\', \''.base_url().'/add.php?id_module='.module('Prima nota')['id'].'&'.(!empty($record['iddocumento']) ? 'id_documenti='.$record['iddocumento'].'&single=1' : 'id_scadenze='.$id_record).'\');" class="btn btn-sm btn-primary">
<a onclick="launch_modal(\''.tr('Registra contabile pagamento').'\', \''.base_path().'/add.php?id_module='.module('Prima nota')['id'].'&'.(!empty($record['iddocumento']) ? 'id_documenti='.$record['iddocumento'].'&single=1' : 'id_scadenze='.$id_record).'\');" class="btn btn-sm btn-primary">
<i class="fa fa-euro"></i> '.tr('Registra contabile pagamento...').'
</a>
</div>

View File

@ -29,7 +29,7 @@ FROM co_scadenziario
INNER JOIN an_anagrafiche ON co_documenti.idanagrafica=an_anagrafiche.idanagrafica
WHERE co_scadenziario.pagato != co_scadenziario.da_pagare AND co_scadenziario.iddocumento = (SELECT iddocumento FROM co_scadenziario s WHERE id='.prepare($id_record).')');
$logo_azienda = str_replace(base_dir(), base_url(), AppLegacy::filepath('templates/base|custom|/logo_azienda.jpg'));
$logo_azienda = str_replace(base_dir(), base_path(), AppLegacy::filepath('templates/base|custom|/logo_azienda.jpg'));
// Variabili da sostituire
return [

View File

@ -86,7 +86,7 @@ switch (filter('op')) {
// Link di redirect dopo la configurazione
$modulo_account_email = Module::pool('Account email');
$oauth2->after_configuration = base_url().'/editor.php?id_module='.$modulo_account_email->id.'&id_record='.$id_record;
$oauth2->after_configuration = base_path().'/editor.php?id_module='.$modulo_account_email->id.'&id_record='.$id_record;
$oauth2->save();
@ -139,7 +139,7 @@ switch (filter('op')) {
case 'oauth2':
$oauth2 = $account->oauth2;
$redirect = base_url().'/oauth2.php?id='.$oauth2->id;
$redirect = base_path().'/oauth2.php?id='.$oauth2->id;
redirect($redirect);
break;

View File

@ -132,7 +132,7 @@ echo '
</div>
<div class="col-md-3 oauth2-config">
<a type="button" class="btn btn-success btn-block '.(empty($oauth2->class) || empty($oauth2->client_id) || empty($oauth2->client_secret) ? 'disabled' : '').'" style="margin-top: 25px" href="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=oauth2">
<a type="button" class="btn btn-success btn-block '.(empty($oauth2->class) || empty($oauth2->client_id) || empty($oauth2->client_secret) ? 'disabled' : '').'" style="margin-top: 25px" href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=oauth2">
<i class="fa fa-refresh"></i> '.(empty($oauth2->access_token) ? tr('Completa configurazione') : tr('Ripeti configurazione')).'
</a>
</div>

View File

@ -34,11 +34,11 @@ echo '
</div>
<div class="panel-body">
<button type="button" class="btn btn-primary col-md-3" data-toggle="modal" data-title="'.tr('Stampa registro IVA vendite').'" data-href="'.base_url().'/modules/stampe_contabili/stampe_contabili.php?dir=entrata&nome_stampa=Registro IVA&id_record='.$id_record.'" ><i class="fa fa-print fa-2x"></i><br>'.tr('Registro').'<br>'.tr('IVA vendite').'</button>
<button type="button" class="btn btn-primary col-md-3" data-toggle="modal" data-title="'.tr('Stampa registro IVA vendite').'" data-href="'.base_path().'/modules/stampe_contabili/stampe_contabili.php?dir=entrata&nome_stampa=Registro IVA&id_record='.$id_record.'" ><i class="fa fa-print fa-2x"></i><br>'.tr('Registro').'<br>'.tr('IVA vendite').'</button>
<button type="button" class="btn btn-primary col-md-3 col-md-push-1" data-toggle="modal" data-title="'.tr('Stampa registro IVA acquisti').'" data-href="'.base_url().'/modules/stampe_contabili/stampe_contabili.php?dir=uscita&nome_stampa=Registro IVA&id_record='.$id_record.'" ><i class="fa fa-print fa-2x"></i><br>'.tr('Registro').'<br>'.tr('IVA acquisti').'</button>
<button type="button" class="btn btn-primary col-md-3 col-md-push-1" data-toggle="modal" data-title="'.tr('Stampa registro IVA acquisti').'" data-href="'.base_path().'/modules/stampe_contabili/stampe_contabili.php?dir=uscita&nome_stampa=Registro IVA&id_record='.$id_record.'" ><i class="fa fa-print fa-2x"></i><br>'.tr('Registro').'<br>'.tr('IVA acquisti').'</button>
<button type="button" class="btn btn-primary col-md-4 col-md-push-2" data-toggle="modal" data-title="'.tr('Stampa liquidazione IVA').'" data-href="'.base_url().'/modules/stampe_contabili/stampe_contabili.php?nome_stampa=Liquidazione IVA&id_record='.$id_record.'" ><i class="fa fa-print fa-2x"></i><br>'.tr('Liquidazione').'<br>'.tr('IVA').'</button>
<button type="button" class="btn btn-primary col-md-4 col-md-push-2" data-toggle="modal" data-title="'.tr('Stampa liquidazione IVA').'" data-href="'.base_path().'/modules/stampe_contabili/stampe_contabili.php?nome_stampa=Liquidazione IVA&id_record='.$id_record.'" ><i class="fa fa-print fa-2x"></i><br>'.tr('Liquidazione').'<br>'.tr('IVA').'</button>
</div>
</div>
</div>
@ -84,7 +84,7 @@ echo '
</div>
<div class="panel-body">
<button type="button" class="btn btn-primary col-md-3" data-toggle="modal" data-title="'.tr('Stampa Bilancio').'" data-href="'.base_url().'/modules/stampe_contabili/stampa_bilancio.php" ><i class="fa fa-print fa-2x"></i> <br>'.tr('Stampa').'<br>'.tr('Bilancio').'<br></button>
<button type="button" class="btn btn-primary col-md-3" data-toggle="modal" data-title="'.tr('Stampa Bilancio').'" data-href="'.base_path().'/modules/stampe_contabili/stampa_bilancio.php" ><i class="fa fa-print fa-2x"></i> <br>'.tr('Stampa').'<br>'.tr('Bilancio').'<br></button>
'.Prints::getLink('Mastrino', 1, 'btn-primary col-md-3 col-md-push-1', '<br>'.tr('Situazione').'<br>'.tr('patrimoniale'), '|default| fa-2x', 'lev=1').'

View File

@ -22,7 +22,7 @@ include_once __DIR__.'/../../core.php';
use Modules\Statistiche\Stats;
echo '
<script src="'.base_url().'/assets/dist/js/chartjs/Chart.min.js"></script>';
<script src="'.base_path().'/assets/dist/js/chartjs/Chart.min.js"></script>';
$start = session('period_start');
$end = session('period_end');

View File

@ -145,7 +145,7 @@ foreach ($uploads as $upload) {
echo '
<tr>
<td>
<a href="'.base_url().'/view.php?file_id='.$upload->id.'" target="_blank">'.$upload->name.'</a>
<a href="'.base_path().'/view.php?file_id='.$upload->id.'" target="_blank">'.$upload->name.'</a>
</td>
<td>'.$upload->pivot->name.'</td>
</tr>';

View File

@ -75,7 +75,7 @@ class ServicesHook extends Manager
return [
'icon' => null,
'message' => $message,
'link' => base_url().'/controller.php?id_module='.$module->id,
'link' => base_path().'/controller.php?id_module='.$module->id,
'show' => Services::isEnabled() && !empty($message),
];
}

View File

@ -22,7 +22,7 @@ include_once __DIR__.'/../../../core.php';
$module = module('Stato dei servizi');
echo '
<script src="'.base_url().'/assets/dist/js/chartjs/Chart.min.js"></script>';
<script src="'.base_path().'/assets/dist/js/chartjs/Chart.min.js"></script>';
// Operazioni JavaScript
echo '

View File

@ -116,7 +116,7 @@ switch (filter('op')) {
$utente->save();
redirect_legacy(base_url().'/modules/utenti/info.php');
redirect_legacy(base_path().'/modules/utenti/info.php');
break;

View File

@ -39,7 +39,7 @@ if (!empty($rs)) {
$anagrafica = $rs[0];
}
$api = base_url().'/api/?token='.$token;
$api = base_path().'/api/?token='.$token;
$module = module('Utenti e permessi');
echo '

View File

@ -46,7 +46,7 @@ if (!empty($user)) {
}
echo '
<form action="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post" enctype="multipart/form-data" id="user_update">
<form action="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post" enctype="multipart/form-data" id="user_update">
<input type="hidden" name="op" value="update_user">
<input type="hidden" name="backto" value="record-edit">

View File

@ -24,5 +24,5 @@ $reset_token = $record->reset_token;
return [
'username' => $record->username,
'reset_token' => $reset_token,
'reset_link' => base_url().'/reset.php?reset_token='.$reset_token,
'reset_link' => base_path().'/reset.php?reset_token='.$reset_token,
];

View File

@ -132,7 +132,7 @@ function testQuery(){
$("#main_loading").fadeIn();
$.ajax({
url: "'.base_url().'/actions.php?id_module=" + globals.id_module + "&id_record=" + globals.id_record + "&op=test",
url: "'.base_path().'/actions.php?id_module=" + globals.id_module + "&id_record=" + globals.id_record + "&op=test",
cache: false,
type: "post",
processData: false,

View File

@ -55,8 +55,8 @@ if (empty($redirect)) {
}
if (empty($_GET['error'])) {
redirect($redirect);
exit();
redirect_legacy($redirect);
throw new \LegacyExitException();;
} else {
echo $_GET['error'].'<br>'.$_GET['error_description'].'
<br><br>

View File

@ -43,7 +43,7 @@ if (empty($result)) {
</h3>
<br>
<a class="btn btn-default" href="'.base_url().'/index.php">
<a class="btn btn-default" href="'.base_path().'/index.php">
<i class="fa fa-chevron-left"></i> '.tr('Indietro').'
</a>
</div>';

View File

@ -138,7 +138,7 @@ foreach ($elenchi as $elenco) {
</div>
<div class="panel-body">
<form action="'.base_url().'/editor.php" method="post" role="form">
<form action="'.base_path().'/editor.php" method="post" role="form">
<input type="hidden" name="id_module" value="'.$module->id.'">
<input type="hidden" name="id_record" value="'.$componente->id_impianto.'">
<input type="hidden" name="id_plugin" value="'.$plugin->id.'">
@ -251,7 +251,7 @@ echo '
const id_componente = tr.data("id");
if(confirm("'.tr('Vuoi sostituire questo componente?').'")) {
redirect("'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=sostituisci&backto=record-edit&id_plugin='.$id_plugin.'&id_componente=" + id_componente + "&hash=tab_'.$structure->id.'");
redirect("'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=sostituisci&backto=record-edit&id_plugin='.$id_plugin.'&id_componente=" + id_componente + "&hash=tab_'.$structure->id.'");
}
}
@ -260,7 +260,7 @@ echo '
const id_componente = tr.data("id");
if(confirm("'.tr('Vuoi eliminare questo componente?').'")){
redirect("'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=rimuovi&backto=record-edit&id_plugin='.$id_plugin.'&id_componente=" + id_componente + "&hash=tab_'.$structure->id.'");
redirect("'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=rimuovi&backto=record-edit&id_plugin='.$id_plugin.'&id_componente=" + id_componente + "&hash=tab_'.$structure->id.'");
}
}

View File

@ -88,7 +88,7 @@ if ($fattura !== null) {
<i class="fa fa-arrow-right fa-fw text-muted"></i>
<a href="'.base_url().'/view.php?file_id='.($file ? $file->id : null).'" class="btn btn-info btn-lg '.($generata ? '' : 'disabled').'" target="_blank" '.($generata ? '' : 'disabled').'>
<a href="'.base_path().'/view.php?file_id='.($file ? $file->id : null).'" class="btn btn-info btn-lg '.($generata ? '' : 'disabled').'" target="_blank" '.($generata ? '' : 'disabled').'>
<i class="fa fa-eye"></i> '.tr('Visualizza').'
</a>';

View File

@ -155,7 +155,7 @@ switch (filter('op')) {
$process_result = Interaction::processInvoice($filename);
if ($process_result != '') {
flash()->error($process_result);
redirect_legacy(base_url().'/controller.php?id_module='.$id_module);
redirect_legacy(base_path().'/controller.php?id_module='.$id_module);
return;
}
@ -165,9 +165,9 @@ switch (filter('op')) {
$file = $files[$id_record - 1];
if (get('sequence') == null) {
redirect_legacy(base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_fattura);
redirect_legacy(base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_fattura);
} elseif (!empty($file)) {
redirect(base_url().'/editor.php?id_module='.$id_module.'&id_plugin='.$id_plugin.'&id_record='.$id_record.'&sequence=1');
redirect(base_path().'/editor.php?id_module='.$id_module.'&id_plugin='.$id_plugin.'&id_record='.$id_record.'&sequence=1');
flash()->warning(tr('È stata appena creata la fattura numero _NUM_ del _DATA_ (_ANAGRAFICA_)', [
'_NUM_' => $fattura->numero,
'_DATA_' => dateFormat($fattura->data),
@ -175,7 +175,7 @@ switch (filter('op')) {
]));
} else {
flash()->info(tr('Tutte le fatture salvate sono state importate!'));
redirect_legacy(base_url().'/controller.php?id_module='.$id_module);
redirect_legacy(base_path().'/controller.php?id_module='.$id_module);
}
break;

View File

@ -29,7 +29,7 @@ $(document).ready(function() {
});
</script>';
$skip_link = $has_next ? base_url().'/editor.php?id_module='.$id_module.'&id_plugin='.$id_plugin.'&id_record='.($id_record + 1).'&sequence='.get('sequence') : base_url().'/editor.php?id_module='.$id_module;
$skip_link = $has_next ? base_path().'/editor.php?id_module='.$id_module.'&id_plugin='.$id_plugin.'&id_record='.($id_record + 1).'&sequence='.get('sequence') : base_path().'/editor.php?id_module='.$id_module;
if (empty($fattura_pa)) {
if (!empty($error)) {

View File

@ -43,6 +43,6 @@ if (isset($id_record)) {
if (empty($record)) {
flash()->warning(tr('Nessuna fattura da importare!'));
redirect_legacy(base_url().'/controller.php?id_module='.$id_module);
redirect_legacy(base_path().'/controller.php?id_module='.$id_module);
}
}

View File

@ -53,7 +53,7 @@ class InvoiceHook extends CachedManager
return $value->name == 'Fatturazione Elettronica';
});
$link = base_url().'/controller.php?id_module='.$module->id.'#tab_'.$plugin->id;
$link = base_path().'/controller.php?id_module='.$module->id.'#tab_'.$plugin->id;
}
$message = tr('Ci sono _NUM_ fatture passive da importare', [

View File

@ -153,7 +153,7 @@ if (!$elenco_promemoria->isEmpty()) {
<i class="fa fa-clock-o"></i>
</button>
<button type="button" '.$disabled.' class="btn btn-primary btn-sm '.$disabled.' " title="Pianifica intervento ora..." data-toggle="tooltip" onclick="launch_modal(\'Pianifica intervento\', \''.base_url().'/add.php?id_module='.module('Interventi')['id'].'&ref=interventi_contratti&idcontratto='.$id_record.'&idcontratto_riga='.$promemoria['id'].'\');"'.(!empty($is_pianificabile) ? '' : ' disabled').'>
<button type="button" '.$disabled.' class="btn btn-primary btn-sm '.$disabled.' " title="Pianifica intervento ora..." data-toggle="tooltip" onclick="launch_modal(\'Pianifica intervento\', \''.base_path().'/add.php?id_module='.module('Interventi')['id'].'&ref=interventi_contratti&idcontratto='.$id_record.'&idcontratto_riga='.$promemoria['id'].'\');"'.(!empty($is_pianificabile) ? '' : ' disabled').'>
<i class="fa fa-calendar"></i>
</button>

View File

@ -133,7 +133,7 @@ if (!$righe->isEmpty()) {
if ($riga->abilita_serial) {
echo '
<button type="button" class="btn btn-info btn-xs" data-toggle="tooltip" onclick="launch_modal(\''.tr('Modifica articoli').'\', \''.base_url().'/modules/fatture/add_serial.php?id_module='.$id_module.'&id_record='.$id_record.'&idarticolo='.$riga->id.'&idriga='.$riga->id.'\');">
<button type="button" class="btn btn-info btn-xs" data-toggle="tooltip" onclick="launch_modal(\''.tr('Modifica articoli').'\', \''.base_path().'/modules/fatture/add_serial.php?id_module='.$id_module.'&id_record='.$id_record.'&idarticolo='.$riga->id.'&idriga='.$riga->id.'\');">
<i class="fa fa-barcode"></i>
</button>';
}

View File

@ -118,7 +118,7 @@ foreach ($raggruppamenti as $mese => $raggruppamento) {
// Pulsanti
echo '
<td>
<button type="button" class="btn btn-primary btn-sm" title="Pianifica intervento ora..." data-toggle="tooltip" onclick="launch_modal(\'Pianifica intervento\', \''.base_url().'/add.php?id_module='.module('Interventi')['id'].'&ref=interventi_contratti&idcontratto='.$contratto->id.'&idcontratto_riga='.$promemoria->id.'\');">
<button type="button" class="btn btn-primary btn-sm" title="Pianifica intervento ora..." data-toggle="tooltip" onclick="launch_modal(\'Pianifica intervento\', \''.base_path().'/add.php?id_module='.module('Interventi')['id'].'&ref=interventi_contratti&idcontratto='.$contratto->id.'&idcontratto_riga='.$promemoria->id.'\');">
<i class="fa fa-calendar"></i>
</button>
</td>

View File

@ -73,6 +73,6 @@ function esporta(button) {
let pagati = input("pagati").get();
let processati = input("processati").get();
redirect("'.base_url().'/editor.php?id_module='.$id_module.'&id_plugin='.$id_plugin.'&records=" + records + "&pagati=" + pagati + "&processati=" + processati);
redirect("'.base_path().'/editor.php?id_module='.$id_module.'&id_plugin='.$id_plugin.'&records=" + records + "&pagati=" + pagati + "&processati=" + processati);
}
</script>';

View File

@ -358,7 +358,7 @@ class Gestore
// Generazione filename
$filename = $this->id_riba.'.txt';
$file = $path.'/'.$filename;
$files[] = base_url().'/'.$file;
$files[] = base_path().'/'.$file;
// Salvataggio del file
file_put_contents(base_dir().'/'.$file, $content);
@ -372,7 +372,7 @@ class Gestore
// Generazione filename
$filename = $this->id_credito_diretto.'.xml';
$file = $path.'/'.$filename;
$files[] = base_url().'/'.$file;
$files[] = base_path().'/'.$file;
// Salvataggio del file
file_put_contents(base_dir().'/'.$file, $xml);
@ -395,7 +395,7 @@ class Gestore
// Generazione filename
$filename = $this->id_debito_diretto.'.xml';
$file = $path.'/'.$filename;
$files[] = base_url().'/'.$file;
$files[] = base_path().'/'.$file;
// Salvataggio del file
file_put_contents(base_dir().'/'.$file, $xml);

View File

@ -74,7 +74,7 @@ class NotificheRicevuteHook extends Manager
'icon' => 'fa fa-ticket text-yellow',
'message' => $message,
'show' => $con_errore != 0 || $in_attesa != 0,
'link' => base_url().'/controller.php?id_module='.$module->id.'#tab_'.$plugin->id,
'link' => base_path().'/controller.php?id_module='.$module->id.'#tab_'.$plugin->id,
];
}

View File

@ -113,7 +113,7 @@ class ReceiptHook extends Manager
'icon' => 'fa fa-ticket text-'.$color,
'message' => $message,
'show' => $notify,
'link' => base_url().'/controller.php?id_module='.$module->id,
'link' => base_path().'/controller.php?id_module='.$module->id,
];
}
}

View File

@ -24,7 +24,7 @@ $revisione_principale = $dbo->fetchOne('SELECT master_revision FROM co_preventiv
$revisioni = $dbo->fetchArray('SELECT * FROM co_preventivi WHERE master_revision = '.prepare($revisione_principale['master_revision']).' OR id = '.prepare($revisione_principale['master_revision']).' ORDER BY created_at');
echo "
<form action='".base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record."' method='post'>
<form action='".base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record."' method='post'>
<input type='hidden' name='backto' value='record-edit'>
<input type='hidden' name='op' value='edit_revision'>
<input type='hidden' name='id_plugin' value='".$id_plugin."'>
@ -90,7 +90,7 @@ echo "
</form>';
echo "
<form action='".base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record."' method='post' id='form_deleterevision'>
<form action='".base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record."' method='post' id='form_deleterevision'>
<input type='hidden' name='backto' value='record-edit'>
<input type='hidden' name='op' value='delete_revision'>
<input type='hidden' name='id_plugin' value='".$id_plugin."'>

View File

@ -115,7 +115,7 @@ echo '
<span class="info-box-icon bg-'.($preventivi->count() == 0 ? 'gray' : 'aqua').'"><i class="fa fa-question"></i></span>
<div class="info-box-content">
<span class="info-box-text pull-left">'.tr('Preventivi').'</span>
'.($preventivi->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_url().'/controller.php?id_module='.module('Preventivi')['id'].'&search_Cliente='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
'.($preventivi->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_path().'/controller.php?id_module='.module('Preventivi')['id'].'&search_Cliente='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
<br class="clearfix">
<span class="info-box-number">
<big>'.$preventivi->count().'</big><br>
@ -130,7 +130,7 @@ echo '
<span class="info-box-icon bg-'.($contratti->count() == 0 ? 'gray' : 'purple').'"><i class="fa fa-refresh"></i></span>
<div class="info-box-content">
<span class="info-box-text pull-left">'.tr('Contratti').'</span>
'.($contratti->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_url().'/controller.php?id_module='.module('Contratti')['id'].'&search_Cliente='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
'.($contratti->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_path().'/controller.php?id_module='.module('Contratti')['id'].'&search_Cliente='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
<br class="clearfix">
<span class="info-box-number">
<big>'.$contratti->count().'</big><br>
@ -145,7 +145,7 @@ echo '
<span class="info-box-icon bg-'.($ordini_cliente->count() == 0 ? 'gray' : 'blue').'"><i class="fa fa-file-text"></i></span>
<div class="info-box-content">
<span class="info-box-text pull-left">'.tr('Ordini cliente').'</span>
'.($ordini_cliente->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_url().'/controller.php?id_module='.module('Ordini cliente')['id'].'&search_Ragione-sociale='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
'.($ordini_cliente->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_path().'/controller.php?id_module='.module('Ordini cliente')['id'].'&search_Ragione-sociale='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
<br class="clearfix">
<span class="info-box-number">
<big>'.$ordini_cliente->count().'</big><br>
@ -162,7 +162,7 @@ echo '
<span class="info-box-icon bg-'.($interventi->count() == 0 ? 'gray' : 'red').'"><i class="fa fa-cog"></i></span>
<div class="info-box-content">
<span class="info-box-text pull-left">'.tr('Attività').'</span>
'.($interventi->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_url().'/controller.php?id_module='.module('Interventi')['id'].'&search_Ragione-sociale='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
'.($interventi->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_path().'/controller.php?id_module='.module('Interventi')['id'].'&search_Ragione-sociale='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
<br class="clearfix">
<span class="info-box-number">
<big>'.$interventi->count().'</big><br>
@ -177,7 +177,7 @@ echo '
<span class="info-box-icon bg-'.($ddt_uscita->count() == 0 ? 'gray' : 'maroon').'"><i class="fa fa-truck"></i></span>
<div class="info-box-content">
<span class="info-box-text pull-left">'.tr('Ddt in uscita').'</span>
'.($ddt_uscita->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_url().'/controller.php?id_module='.module('Ddt di vendita')['id'].'&search_Ragione-sociale='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
'.($ddt_uscita->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_path().'/controller.php?id_module='.module('Ddt di vendita')['id'].'&search_Ragione-sociale='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
<br class="clearfix">
<span class="info-box-number">
<big>'.$ddt_uscita->count().'</big><br>
@ -192,7 +192,7 @@ echo '
<span class="info-box-icon bg-'.($fatture_vendita->count() + $note_credito->count() == 0 ? 'gray' : 'green').'"><i class="fa fa-money"></i></span>
<div class="info-box-content">
<span class="info-box-text pull-left">'.tr('Fatture').'</span>
'.($fatture_vendita->count() + $note_credito->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_url().'/controller.php?id_module='.module('Fatture di vendita')['id'].'&search_Ragione-sociale='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
'.($fatture_vendita->count() + $note_credito->count() > 0 ? '<span class="info-box-text pull-right"><a href="'.base_path().'/controller.php?id_module='.module('Fatture di vendita')['id'].'&search_Ragione-sociale='.rawurlencode($anagrafica['ragione_sociale']).'">'.tr('Visualizza').' <i class="fa fa-chevron-circle-right"></i></a></span>' : '').'
<br class="clearfix">
<span class="info-box-number">
<big>'.($fatture_vendita->count() + $note_credito->count()).'</big><br>

View File

@ -59,7 +59,7 @@ switch (post('op')) {
flash()->error(tr("Errore durante la gestione della richiesta: si prega di contattare l'amministratore").'.');
}
redirect_legacy(base_url().'/index.php');
redirect_legacy(base_path().'/index.php');
throw new \LegacyExitException();
break;
@ -76,7 +76,7 @@ switch (post('op')) {
flash()->info(tr('Password cambiata!'));
redirect_legacy(base_url().'/index.php');
redirect_legacy(base_path().'/index.php');
throw new \LegacyExitException();
break;
}
@ -121,7 +121,7 @@ if (auth()->isBrute()) {
echo '
<form action="" method="post" class="box box-center-large box-warning" id="reset">
<div class="box-header with-border text-center">
<a href="'.base_url().'/index.php"><i class="fa fa-arrow-left btn btn-xs btn-warning pull-left tip" title="'.tr('Torna indietro').'" ></i></a>
<a href="'.base_path().'/index.php"><i class="fa fa-arrow-left btn btn-xs btn-warning pull-left tip" title="'.tr('Torna indietro').'" ></i></a>
<h3 class="box-title">'.$pageTitle.'</h3>
</div>

Some files were not shown because too many files have changed in this diff Show More