166 lines
2.3 KiB
PHP
Executable File
166 lines
2.3 KiB
PHP
Executable File
<?php define('__ROOT__', dirname(__FILE__) );
|
|
|
|
|
|
/*** CRÉATION D'UTILISATEUR ***/
|
|
|
|
// require('manager/user.php');
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'create';
|
|
// $request->username = 'fvg1856a';
|
|
// $request->prenom = 'guillaume';
|
|
// $request->nom = 'fauvet';
|
|
// $request->email = 'guillaume.fauvet@etu.iut-tlse3.fr';
|
|
// $request->password = ' Test_Password _';
|
|
// $request->droits = 'student';
|
|
|
|
|
|
|
|
// user_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo '<br><br><br><br><br><br><br>It works !';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** CRÉATION GROUPE ***/
|
|
|
|
// require('manager/groups.php');
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'create';
|
|
// $request->nom = 'F';
|
|
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** AJOUT D'UN UTILISATEUR À UN GROUPE ***/
|
|
|
|
// require __ROOT__.'/manager/groups.php';
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'add';
|
|
// $request->etudiant = 'fvg1856a'; // utilisateur.username
|
|
// $request->groupe = 'A'; // groupe.nom
|
|
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** AFFICHER LES MEMBRES D'UN GROUPE ***/
|
|
|
|
// require('manager/groups.php');
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'userlist';
|
|
// $request->groupe = 'E'; // groupe.nom
|
|
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** AFFICHER LES MEMBRES DE TOUS LES GROUPES ***/
|
|
|
|
// require('manager/groups.php');
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'grouplist';
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// var_dump( $answer );
|
|
// echo '<br><br><br><br>';
|
|
|
|
// foreach($answer->grouplist as $group)
|
|
// foreach($group as $userlist)
|
|
// foreach($userlist as $user)
|
|
// foreach($user as $key=>$value)
|
|
// echo $key.' = '.$value.'<br>';
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|