SMMP/public_html/view/users.php

138 lines
2.4 KiB
PHP
Raw Permalink Normal View History

<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
require_once __ROOT__.'/vendor/autoload.php';
2017-01-30 17:39:21 +00:00
use \api\core\Request;
2016-10-18 14:03:03 +00:00
use \database\core\Repo;
use \generic\core\View;
?>
<!-- [1] Gestion du sous-menu de gauche -->
<nav class='sub-menu-side'>
<span data-sublink='view'>
2016-10-18 14:03:03 +00:00
<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' >
2016-10-18 14:03:03 +00:00
<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' >
2016-10-18 14:03:03 +00:00
<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' >
2016-10-18 14:03:03 +00:00
<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' >
2016-10-18 14:03:03 +00:00
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/filter.svg' ); ?></span>
<span>Groupes</span>
</span>
</nav>
<?php
2016-07-04 13:45:29 +00:00
$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'>";
$view = View::load('user.view');
echo $view->render();
echo '</section>';
/* [2] Creation d'utilisateur
=========================================================*/
echo "<section data-sublink='create'>";
$view = View::load('user.form.create');
echo $view->render();
echo '</section>';
/* [3] Suppression d'utilisateur
=========================================================*/
echo "<section data-sublink='remove'>";
$view = View::load('user.form.remove');
echo $view->render();
echo '</section>';
/* [4] Modification d'utilisateur
=========================================================*/
echo "<section data-sublink='edit'>";
$view = View::load('user.form.edit');
echo $view->render();
2016-02-18 14:49:06 +00:00
echo '</section>';
/* [4] Gestion des groupes
2016-02-18 14:49:06 +00:00
=========================================================*/
echo "<section data-sublink='groups' class='list'>";
2016-02-18 14:49:06 +00:00
$view = View::load('user.group');
echo $view->render();
2016-02-18 14:49:06 +00:00
2016-07-02 16:35:34 +00:00
echo '</section>';