184 lines
5.2 KiB
PHP
Executable File
184 lines
5.2 KiB
PHP
Executable File
<?php
|
|
require_once '../../autoloader.php';
|
|
use \api\core\Request;
|
|
use \viewer\core\Viewer;
|
|
use \database\core\Repo;
|
|
?>
|
|
|
|
<!-- [1] Gestion du sous-menu de gauche -->
|
|
|
|
<nav class='sub-menu-side'>
|
|
<span data-sublink='view'>
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/view.svg' ); ?></span>
|
|
<span>Tout afficher</span>
|
|
</span>
|
|
|
|
<span data-sublink='create' >
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/create.svg' ); ?></span>
|
|
<span>Creation</span>
|
|
</span>
|
|
|
|
<span data-sublink='remove' >
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/remove.svg' ); ?></span>
|
|
<span>Suppression</span>
|
|
</span>
|
|
|
|
<span data-sublink='edit' >
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/edit.svg' ); ?></span>
|
|
<span>Modification</span>
|
|
</span>
|
|
|
|
<span data-sublink='groups' >
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/filter.svg' ); ?></span>
|
|
<span>Groupes</span>
|
|
</span>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
$post = [];
|
|
foreach($_POST as $k=>$v)
|
|
array_push($post, $k);
|
|
|
|
$sublink = $post[0];
|
|
|
|
|
|
|
|
/* [1] VIEW -> Liste des utilisateurs
|
|
=========================================================*/
|
|
echo "<section data-sublink='view' class='list'>";
|
|
|
|
$userlist = new Viewer('user.view', []);
|
|
$userlist->view();
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [2] Creation d'utilisateur
|
|
=========================================================*/
|
|
echo "<section data-sublink='create'>";
|
|
|
|
echo "<form class='valid'>";
|
|
echo "<input id='create_code' type='text' placeholder='CO-DE-RF-ID'><br>";
|
|
echo "<span class='error-msg create_code'></span><br>";
|
|
echo "<input id='create_username' type='text' placeholder='Username'><br>";
|
|
echo "<span class='error-msg create_username'></span><br>";
|
|
echo "<input id='create_firstname' type='text' placeholder='Firstname'><br>";
|
|
echo "<span class='error-msg create_firstname'></span><br>";
|
|
echo "<input id='create_lastname' type='text' placeholder='Lastname'><br>";
|
|
echo "<span class='error-msg create_lastname'></span><br>";
|
|
echo "<input id='create_mail' type='text' placeholder='Mail'><br>";
|
|
echo "<span class='error-msg create_mail'></span><br>";
|
|
echo "<button id='create_submit'>Créer</button>";
|
|
echo "</form>";
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [3] Suppression d'utilisateur
|
|
=========================================================*/
|
|
echo "<section data-sublink='remove'>";
|
|
|
|
echo "<form class='invalid'>";
|
|
// Recherche d'utilisateur
|
|
echo "<input id='remove_search_keyword' type='text' class='search' placeholder='Recherche...'><br>";
|
|
echo "<input id='remove_search_id' type='hidden' value=''>";
|
|
// Indice du resultat
|
|
echo "<span class='remove_search_view'>utilisateur <span class='remove_search_num'>0</span> sur <span class='remove_search_sum'>0</span></span><br><br>";
|
|
echo "<button id='remove_search_submit' class='search'>Trouver/Suivant</button><br>";
|
|
|
|
|
|
echo "<br><br><hr class='OR' data-label='PUIS' /><br><br>";
|
|
|
|
// Suppression d'utilisateur
|
|
echo "<input id='remove_code' type='text' placeholder='Code'><br>";
|
|
echo "<span class='error-msg remove_code'></span><br>";
|
|
echo "<input id='remove_username' type='text' placeholder='Username'><br>";
|
|
echo "<span class='error-msg remove_username'></span><br>";
|
|
echo "<button id='remove_submit' disabled>Supprimer</button>";
|
|
echo "</form>";
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [4] Modification d'utilisateur
|
|
=========================================================*/
|
|
echo "<section data-sublink='edit'>";
|
|
|
|
echo "<form class='neutral'>";
|
|
echo "<input id='edit_search_keyword' type='text' class='search' placeholder='Recherche...'><br>";
|
|
echo "<input id='edit_search_id' type='hidden' value=''>";
|
|
// Indice du resultat
|
|
echo "<span class='edit_search_view'>utilisateur <span class='edit_search_num'>0</span> sur <span class='edit_search_sum'>0</span></span><br><br>";
|
|
echo "<button id='edit_search_submit' class='search'>Trouver/Suivant</button><br>";
|
|
|
|
echo "<br><br><hr class='OR' data-label='PUIS' /><br><br>";
|
|
|
|
echo "<input id='edit_code' type='text' placeholder='CO-DE-RF-ID'><br>";
|
|
echo "<span class='error-msg edit_code'></span><br>";
|
|
echo "<input id='edit_username' type='text' placeholder='Username'><br>";
|
|
echo "<span class='error-msg edit_username'></span><br>";
|
|
echo "<input id='edit_firstname' type='text' placeholder='Firstname'><br>";
|
|
echo "<span class='error-msg edit_firstname'></span><br>";
|
|
echo "<input id='edit_lastname' type='text' placeholder='Lastname'><br>";
|
|
echo "<span class='error-msg edit_lastname'></span><br>";
|
|
echo "<input id='edit_mail' type='text' placeholder='Mail'><br>";
|
|
echo "<span class='error-msg edit_mail'></span><br>";
|
|
echo "<button id='edit_submit' disabled>Modifier</button>";
|
|
echo "</form>";
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [4] Gestion des groupes
|
|
=========================================================*/
|
|
echo "<section data-sublink='groups' class='list'>";
|
|
|
|
$grouplist = new Viewer('user.groups', []);
|
|
$grouplist->view();
|
|
|
|
echo '</section>';
|