Agefoddx/view/gestionBD/afficherListe.php
2025-03-26 10:22:20 +01:00

63 lines
2.8 KiB
PHP

<?php
/** @var array $listeBD */
global $langs , $db;
$langs->loadLangs(array("admin", "Agefoddx@Agefoddx"));
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
$form = new Form($db);
$csrfToken = function_exists('newToken') ? newToken() : $_SESSION['newtoken'];
/** @var $titre */ if (!isset($titre)){ $titre = "Agefoddx"; }
?>
<script src="../js/envoiePost.js"></script>
<table class="centpercent">
<tr class=" left col-left">
<th>
<a><?=$langs->trans("AgefoddxListeBD")?></a>
</th>
</tr>
<tr>
<th scope="col" class=" left col-left">
<h2><?= $titre ?></h2>
</th>
<th scope="col" class=" right col-right">
<a class="btnTitle btnTitlePlus" href="#" onclick="envoyerPost({action:'ajouter', controleur:'bd'}, 'setup.php', '<?=$csrfToken?>')">
<span class="fa fa-plus-circle valignmiddle btnTitle-icon"></span>
</a>
</th>
</tr>
</table>
<div class="div-table-responsive">
<table class="tagtable liste">
<thead>
<tr class="liste_titre">
<th scope="col" class="liste_titre center"><?= $langs->trans("AgefoddxIdBD") ?></th>
<th scope="col" class="liste_titre center"><?=$langs->trans("AgefoddxNomBD") ?></th>
<th scope="col" class="liste_titre center" ><?= $langs->trans("AgefoddxListeTable") ?></th>
<th scope="col" class="liste_titre center" colspan="2"><?= $langs->trans("AgefoddxParametresBD") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($listeBD as $liste){ ?>
<tr class="oddeven">
<td class="center nowrap" scope="row"><?=$liste["bdid"]?></td>
<td class="center nowrap"><?= htmlspecialchars($liste["nom"])?></td>
<td class="center nowrap"><a href="#" onclick="envoyerPost({action:'afficherListe', controleur:'table', idBD:'<?=$liste["bdid"]?>', nomBD:'<?=$liste["nom"]?>'}, 'setup.php', '<?=$csrfToken?>')">
<?= $langs->trans("AgefoddxAfficherListeTable") ?>
</a></td>
<td class="center nowrap"><a href="#" onclick="envoyerPost({action:'modifier', controleur:'bd', idBD:'<?=$liste["bdid"]?>', nomBD:'<?=$liste["nom"]?>'}, 'setup.php', '<?=$csrfToken?>')">
<?= $langs->trans("AgefoddxModifierBD") ?>
</a></td>
<td class="center nowrap"><a href="#" onclick="envoyerPost({action:'supprimer', controleur:'bd', idBD:'<?=$liste["bdid"]?>', nomBD:'<?=$liste["nom"]?>'}, 'setup.php', '<?=$csrfToken?>')">
<?= $langs->trans("AgefoddxSupprimerBD") ?>
</a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>