gestione gare pubbliche
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.
 
 
 
 
 

47 righe
1.7 KiB

<?
if (!isset($keyInfo)) {
$configPath = substr(__DIR__, 0, strpos(__DIR__, "public_html")) . "/config.php";
include_once($configPath);
if (!empty($_SESSION["utente"])) {
$keyInfo = progetto::getKeyInfo($_GET["keyName"]);
if (!empty($keyInfo)) {
$boxId = "{$keyInfo["key"]}_{$_POST["id"]}";
$inputName = "{$keyInfo["key"]}[{$_POST["id"]}]";
$first = false;
}
}
}
if (!empty($keyInfo) && !empty($boxId) && !empty($inputName)) {
if (in_array($keyInfo["type"],progetto::availableInfoTypes()) !== false) {
$path = __DIR__ . "/types/".$keyInfo["type"].".php";
if (!empty($keyInfo["source"])) {
$source = explode(".",$keyInfo["source"]);
if (count($source) == 2) {
$keyInfo["options"] = progetto::getOpzioni($source[0],$source[1]);
}
}
if (file_exists($path)) {
?>
<? if ($keyInfo["multiple"] && empty($first)) { ?>
<div class="border-bottom p-2 my-2 form-group" id="<?= $boxId ?>">
<div class="text-right mb-1">
<button class="btn btn-sm btn-danger" onclick="$(this).parent().parent().slideUp('fast',function() { $(this).remove(); }); return false;">
<span class="fa fa-times"></span> <?= __("Elimina") ?>
</button>
</div>
<? } else { ?>
<div class="form-group">
<? } ?>
<?
include($path);
?>
</div>
<?
} else {
alertManager::printAlertBox(__("File non esistente per la Tipologia di input"));
}
} else {
alertManager::printAlertBox(__("Tipologia di input non gestita"));
}
}
?>