level_0) ){ // si level 0 défini /* ROUTAGE (niveau 0) */ switch( $request->level_0 ){ /***************/ /* UTILISATEUR */ /***************/ case 'user': if( isset($request->level_1) ){ userManager::switch_level_1($request, $answer); } else { $answer->request = 'missing_level_1'; } break; /***********/ /* GROUPES */ /***********/ case 'groups': if( isset($request->level_1) ){ groupsManager::switch_level_1($request, $answer); } else { $answer->request = 'missing_level_1'; } break; /********************************/ /* DOSSIER ETUDIANT (NOTES,...) */ /********************************/ case 'career': if( isset($request->level_1) ){ careerManager::switch_level_1($request, $answer); } else { $answer->request = 'missing_level_1'; } break; /***********/ /* MODULES */ /***********/ case 'modules': if( isset($request->level_1) ){ modulesManager::switch_level_1($request, $answer); } else { $answer->request = 'missing_level_1'; } break; /*********/ /* EXCEL */ /*********/ case 'excel': if( isset($request->level_1) ){ excelManager::switch_level_1($request, $answer); } else { $answer->request = 'missing_level_1'; } break; /************/ /* CONTRÔLE */ /************/ case 'tests': break; /**************/ /* PARAMETRES */ /**************/ case 'settings': break; /***********/ /* DEFAULT */ /***********/ default: $answer->request = 'unknown_level_0'; break; } }else $answer->request = 'missing_level_0'; }else // si json corrompu (undécodable) $answer->request = 'jsoncorrupted'; }else // $_POST vide [OU] $_POST['json'] pas défini $answer->request = 'nopost'; // on envoie (affiche) l'objet en JSON //echo json_encode($answer); echo "
"; print_r($answer); echo ""; } ?>