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.
 
 
 
 
 

80 righe
4.2 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (!empty($_SESSION["utente"]) && isset($_GET["codice"]) && ($_SESSION["utente"]->permission("operatori_economici"))) {
$bind = array();
$bind[":codice"] = $_GET["codice"];
$oe = oeManager::getOE($_GET["codice"]);
if (!empty($oe)) {
$utente = oeManager::getUser($oe["codice"]);
if (!empty($utente)) {
$sql = "SELECT b_enti.codice, b_enti.denominazione, b_enti.attivo AS ente_attivo, b_enti.dominio, r_enti_operatori.timestamp FROM r_enti_operatori JOIN b_enti ON r_enti_operatori.cod_ente = b_enti.codice
WHERE r_enti_operatori.codice_operatore = :codice ";
if (!empty($_SESSION["ente"])) {
$bind[":codice_ente"] = $_SESSION["ente"]->codice;
$sql .= " AND r_enti_operatori.cod_ente = :codice_ente";
}
$relazioni = $pdo->go($sql,$bind);
if ($relazioni->rowCount() > 0) {
$activeUser = $pdo->go("SELECT b_utenti.codice FROM r_oe_utenti JOIN b_utenti ON r_oe_utenti.codice_utente = b_utenti.codice WHERE r_oe_utenti.codice_operatore = :operatore AND b_utenti.attivo = 'S'",[":operatore"=>$oe["codice"]])->rowCount();
?>
<div class="h1 mb-2 p-0"><span class="fa fa-user"></span> <?= $oe["ragione_sociale"] ?></div>
<button onClick="disabilita(<?= $oe["codice"] ?>,'operatori_economici/switch');" class="btn btn-danger btn-block mb-2">
<span class="fa fa-sync"></span> <?= __("Modifica tipologia in") ?> <?= ($oe["tipo"] == "IMP") ? __("Professionista") : __("Impresa") ?>
</button>
<? if (!empty($utente["twoFactor_token"])) { ?>
<button title="<?= __("Rimuovi 2FA") ?>" class='btn btn-block mb-2 btn-danger' onclick='showModalWithURL("/profilo/2fa/confirmDelete.php?codice=<?= $utente["codice"] ?>");'><?= __("Rimuovi 2FA") ?></button>
<? } ?>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th><?= __("Piattaforma") ?></th>
<th><?= __("Data iscrizione") ?></th>
<th></th>
</tr>
</thead>
<tbody>
<?
while ($relazione = $relazioni->fetch(PDO::FETCH_ASSOC)) {
?>
<tr>
<td>
<a href="<?= $config["protocollo"] . $relazione["dominio"] ?>" target="_blank"><?= $relazione["denominazione"] ?></a>
</td>
<td class="text-center" width="160">
<?= $relazione["timestamp"] ?>
</td>
<? if ($oe["attivo"] == "N" || !$activeUser) { ?>
<td width="200">
<form action="/oe/reinvia_conferma.php" rel="validate" method="post" id="resend_form">
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>">
<input type="hidden" name="id" value="<?= $oe["codice"] ?>">
<input type="hidden" name="id_ente" value="<?= $relazione["codice"] ?>">
<button type="submit" class="btn btn-sm btn-block btn-primary">
<span class="fa fa-paper-plane"></span> <?= __("PEC Conferma") ?>
</button>
</form>
</td>
<? } else { ?>
<td width="200">
<button class="btn btn-sm btn-block btn-warning" onClick='reset_password(<?= $utente["codice"] ?>,<?= (!empty($relazione["dominio"]) && $relazione["ente_attivo"] == "S") ? $relazione["codice"] : $relazione["sua"] ?>)' title='<?= __("Reset password") ?>'><i class='fa fa-paper-plane'></i> <?= __("Reset password") ?></a>
</td>
<? } ?>
</tr>
<?
}
?>
</tbody>
</table>
</div>
<?
die();
}
}
}
}
header('HTTP/1.0 403 Forbidden');
die();
?>