128 lines
2.3 KiB
PHP
Executable File
128 lines
2.3 KiB
PHP
Executable File
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
|
require_once __ROOT__.'/vendor/autoload.php';
|
|
use \generic\core\View;
|
|
?>
|
|
|
|
<!-- [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] Affichage des machines
|
|
=========================================================*/
|
|
debug();
|
|
echo "<section data-sublink='view' class='list'>";
|
|
|
|
$view = View::load('machine.view');
|
|
echo $view->render();
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [2] Creation de machine
|
|
=========================================================*/
|
|
echo "<section data-sublink='create'>";
|
|
|
|
$view = View::load('machine.form.create');
|
|
echo $view->render();
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [3] Suppression de machine
|
|
=========================================================*/
|
|
echo "<section data-sublink='remove'>";
|
|
|
|
$view = View::load('machine.form.remove');
|
|
echo $view->render();
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [4] Modification de machine
|
|
=========================================================*/
|
|
echo "<section data-sublink='edit'>";
|
|
|
|
$view = View::load('machine.form.edit');
|
|
echo $view->render();
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
/* [4] Gestion des groupes
|
|
=========================================================*/
|
|
echo "<section data-sublink='groups' class='list'>";
|
|
|
|
$view = View::load('machine.group');
|
|
echo $view->render();
|
|
|
|
echo '</section>';
|