131 lines
1.7 KiB
PHP
131 lines
1.7 KiB
PHP
<?php
|
|
|
|
|
|
/*** CRÉATION D'UTILISATEUR ***/
|
|
|
|
// require('manager/user.php');
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'create';
|
|
// $request->username = 'mrd1609a';
|
|
// $request->prenom = 'adrien';
|
|
// $request->nom = 'ligou marques';
|
|
// $request->email = 'adrien.marques-ligou@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('manager/groups.php');
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'add';
|
|
// $request->utilisateur = 'mrd1609a'; // utilisateur.username
|
|
// $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 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 !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|