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

70 lines
3.7 KiB
PHP

<?php
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 */
/** @var $nomBD */ /** @var $idBD */ /** @var $mdp */
/** @var array $liste*/
if (!isset($titre)){
$titre = "Agefoddx";
}
?>
<script src="../js/envoiePost.js"></script>
<table class="centpercent">
<tr class=" left col-left">
<th>
<a href="#" onclick="envoyerPost({action:'afficherListe', controleur:'bd'},'setup.php', '<?=$csrfToken?>')"><?=$langs->trans("AgefoddxListeBD")?>\</a>
<a><?=$nomBD?></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:'table', idBD:'<?=$idBD?>', nomBD:'<?=$nomBD?>', mdp:'<?=$mdp?>'}, '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("AgefoddxIdTable") ?></th>
<th scope="col" class="liste_titre center"><?=$langs->trans("AgefoddxNomTableExterne") ?></th>
<th scope="col" class="liste_titre center"><?=$langs->trans("AgefoddxNomTableAgefodd") ?></th>
<th scope="col" class="liste_titre center" ><?= $langs->trans("AgefoddxListeLigne") ?></th>
<th scope="col" class="liste_titre center"><?=$langs->trans("AgefoddxNBLigneTable") ?></th>
<th scope="col" class="liste_titre center" colspan="2"><?= $langs->trans("AgefoddxParametresTable") ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($liste as $item){ ?>
<tr class="oddeven">
<td class="center nowrap" scope="row"><?=$item["idTable"]?></td>
<td class="center nowrap"><?= htmlspecialchars($item["nomTableExterne"])?></td>
<td class="center nowrap"><?= htmlspecialchars($item["nomTableAgfodd"])?></td>
<td class="center nowrap"><a href="#" onclick="envoyerPost({action:'afficherListe', controleur:'ligne', idTable:'<?=$item["idTable"]?>', idBD:'<?=$idBD?>', nomBD:'<?=$nomBD?>', mdp:'<?=$mdp?>'}, 'setup.php', '<?=$csrfToken?>')">
<?= $langs->trans("AgefoddxAfficherListeLigne") ?>
</a></td>
<td class="center nowrap"><?= htmlspecialchars($item["nombreLigne"])?></td>
<td class="center nowrap"><a href="#" onclick="envoyerPost({action:'importer', controleur:'table', idTable:'<?=$item["idTable"]?>', idBD:'<?=$idBD?>', nomBD:'<?=$nomBD?>', mdp:'<?=$mdp?>', nomTableA:'<?=$item["nomTableAgfodd"]?>', nomTableE:'<?=$item["nomTableExterne"]?>'}, 'setup.php', '<?=$csrfToken?>')">
<?= $langs->trans("AgefoddxImporterTable") ?>
</a></td>
<td class="center nowrap"><a href="#" onclick="envoyerPost({action:'supprimer', controleur:'table', idTable:'<?=$item["idTable"]?>', idBD:'<?=$idBD?>', nomBD:'<?=$nomBD?>', mdp:'<?=$mdp?>', nomTableA:'<?=$item["nomTableAgfodd"]?>', nomTableE:'<?=$item["nomTableExterne"]?>'}, 'setup.php', '<?=$csrfToken?>')">
<?= $langs->trans("AgefoddxSupprimerTable") ?>
</a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>