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

89 lines
2.9 KiB
PHP

<?php
include_once "../../classe/ControleurBd.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 */
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><?=$langs->trans("AgefoddxAjoutBD")?></a>
</th>
</tr>
<tr>
<th scope="col" class=" left col-left">
<h2><?= $titre ?></h2>
</th>
<th scope="col" class=" right col-right">
</th>
</tr>
</table>
<form method="post" autocomplete="off">
<input type='hidden' name='controleur' value='bd'>
<input type='hidden' name='action' value='insertion'>
<input type='hidden' name='token' value='<?=$csrfToken?>'>
<table>
<tr>
<th scope="row">
<label for="nomBD"><?=$langs->trans("AgefoddxNomBD")?> : </label>
</th>
<td>
<input type="text" id="nomBD" name="nomBD" autocomplete="off" placeholder="dolibarr" required>
</td>
</tr>
<tr>
<th scope="row">
<label for="lienBD"><?=$langs->trans("AgefoddxLienBD")?> : </label>
</th>
<td>
<input type="text" id="lienBD" name="lienBD" autocomplete="off" placeholder="localhost" required>
</td>
</tr>
<tr>
<th scope="row">
<label for="user"><?=$langs->trans("AgefoddxIdentifientBD")?> : </label>
</th>
<td>
<input type="text" id="user" name="user" placeholder="identifiant" required>
</td>
</tr>
<tr>
<th scope="row">
<label for="port"><?=$langs->trans("AgefoddxPortBD")?> : </label>
</th>
<td>
<input type="number" id="port" autocomplete="off" name="port" placeholder="3306" required>
</td>
</tr>
<tr>
<th scope="row">
<label for="mdp">*<?=$langs->trans("AgefoddxMDP")?> : </label>
</th>
<td>
<input type="password" id="mdp" name="mdp" placeholder="********" required>
</td>
</tr>
<tr>
<th scope="row" colspan="2">
<input type="submit" value="<?=$langs->trans("AgefoddxEnvoie")?>" />
</th>
</tr>
<tr>
<th scope="row" colspan="2">
<p>* <?=$langs->trans("AgefoddxMentionMDP")?> </th>
</tr>
</table>
</form>