Correzioni minori percorsi

This commit is contained in:
Dasc3er 2021-07-07 08:03:25 +02:00
parent 3ee73011f3
commit 4d24356153
3 changed files with 65 additions and 64 deletions

View File

@ -450,7 +450,7 @@ echo '
if (data !== undefined) {
//Carico nel panel i dettagli del cliente
$.get("'.$rootdir.'/modules/interventi/ajax_details.php?op=dettagli&id_anagrafica="+$(this).val(), function(data){
$.get("'.base_path().'/modules/interventi/ajax_details.php?op=dettagli&id_anagrafica="+$(this).val(), function(data){
$("#dettagli_ciente").html(data);
});
}else{

View File

@ -49,7 +49,7 @@ switch ($operazione) {
flash()->info(tr('Salvataggio completato!'));
$dbo->commitTransaction();
header('Location: '.$rootdir.'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'#tab_'.$id_plugin);
header('Location: '.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'#tab_'.$id_plugin);
exit;
break;
@ -106,7 +106,7 @@ switch ($operazione) {
}
$dbo->commitTransaction();
header('Location: '.$rootdir.'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'#tab_'.$id_plugin);
header('Location: '.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'#tab_'.$id_plugin);
exit;
break;
@ -117,7 +117,7 @@ switch ($operazione) {
flash()->info(tr('Componente eliminato!'));
$dbo->commitTransaction();
header('Location: '.$rootdir.'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'#tab_'.$id_plugin);
header('Location: '.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'#tab_'.$id_plugin);
exit;
break;

View File

@ -30,14 +30,16 @@ if (empty($file)) {
$link = base_path().'/'.$file->filepath;
// Force download of the file
if (get('force') == '1') {
if (get('download') == '1') {
header('Content-Type: application/octet-stream');
header('Content-Transfer-Encoding: Binary');
header('Content-disposition: attachment; filename="'.basename($file->original_name).'"');
readfile($docroot.'/'.$file->filepath);
readfile(base_dir().'/'.$file->filepath);
//download(base_dir().'/'.$file->filepath, basename($file->original_name));
exit();
} else {
if ($file->isFatturaElettronica()) {
}
if ($file->isFatturaElettronica()) {
$content = file_get_contents(base_dir().'/'.$file->filepath);
// Individuazione stylesheet
@ -64,16 +66,16 @@ if (get('force') == '1') {
$xslt->importStylesheet($xsl);
echo '
<style>
<style>
#notifica {
min-width: 860px !important;
}
</style>';
</style>';
echo $xslt->transformToXML($xml);
} else {
} else {
echo '
<style>
<style>
body, iframe, img{
border: 0;
margin: 0;
@ -84,7 +86,7 @@ if (get('force') == '1') {
height:100%;
min-height: 500px;
}
</style>';
</style>';
if ($file->isImage()) {
echo '
@ -95,9 +97,8 @@ if (get('force') == '1') {
}
echo '
<iframe src="'.base_path().'/view.php?file_id='.$file_id.'&force=1">
<a src="'.base_path().'/view.php?file_id='.$file_id.'&force=1">'.tr('Il browser non supporta i contenuti iframe: clicca qui per raggiungere il file originale').'</a>
<iframe src="'.base_path().'/view.php?file_id='.$file_id.'&download=1">
<a src="'.base_path().'/view.php?file_id='.$file_id.'&download=1">'.tr('Il browser non supporta i contenuti iframe: clicca qui per raggiungere il file originale').'</a>
</iframe>';
}
}
}