Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
74 righe
2.7 KiB
74 righe
2.7 KiB
<? |
|
|
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
|
|
$error = true; |
|
$id_modulo = "contratti.documentale"; |
|
|
|
if (!empty($_POST['codice_contratto']) && !empty($_POST['codice_oe']) && !empty($_POST['richieste']) && !empty($_SESSION["utente"]) && $_SESSION['utente']->permission($radice, $_POST['codice_contratto'], 'classe-documentale') && $_SESSION["utente"]->permission($id_modulo)) { |
|
|
|
$codice_contratto = $_POST['codice_contratto']; |
|
|
|
// qui richieste normali |
|
$returns = RichiestaDocumentale::salvaRichieste($_POST); |
|
|
|
if (is_array($returns) && $returns != "error") { |
|
|
|
if (array_search(false, array_column($returns['save'], 'save')) !== FALSE || (!empty($returns['comunicazione']) && $returns['comunicazione'] != true) ) { |
|
|
|
?> |
|
swal({ |
|
title:"<?= __('Errore durante l\'invio della richiesta/e')?>", |
|
html: `<table width="100%" id="table" border=0 class="text-center" style="color:#595959; border-collapse:separate; border-spacing: 0 1em"> |
|
<thead > |
|
<tr class="small"> |
|
<th><?= __('Classe Documentale') ?></th> |
|
<th><?= __('Invio Richiesta') ?></th> |
|
<th><?= __('Invio Comunicazione') ?></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<?foreach($returns['save'] as $value) {?> |
|
<tr> |
|
<td><?= $value['classe_documentale'] ?></td> |
|
<td><i class="fas <?= ($value['save']) ? 'fa-check text-success' : 'fa-times text-danger'?>"></i></td> |
|
<td><i class="fas <?= ($returns['comunicazione'] == true) ? 'fa-check text-success' : 'fa-times fa-times text-danger'?>"></i></td> |
|
</tr> |
|
<?}?> |
|
</tbody> |
|
</table>`, |
|
type:"error" |
|
}).then(function(){ |
|
window.location.href="/backend/contratti/documentale/panel.php?codice=<?= $codice_contratto ?>" |
|
}); |
|
<? |
|
|
|
} else { |
|
|
|
?> |
|
swal({ |
|
title:js_dict["success-msg"], |
|
type:"success" |
|
}).then(function(){ |
|
window.location.href="/backend/contratti/documentale/panel.php?codice=<?= $codice_contratto ?>" |
|
}); |
|
<? |
|
|
|
} |
|
die(); |
|
}else{ |
|
?> |
|
swal({title:js_dict["error-msg"],html:"<?= __('Errore Durante la richiesta') ?>",type:"error"}); |
|
<? |
|
die(); |
|
} |
|
|
|
} |
|
|
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?> |
|
|
|
|