From f4d12bf72a943d6a8965f21a11eefbb05d2a5483 Mon Sep 17 00:00:00 2001 From: Eole Date: Wed, 27 Apr 2016 22:52:25 +0200 Subject: Add Documentation --- server/doc/files/index.php.txt | 91 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 server/doc/files/index.php.txt (limited to 'server/doc/files/index.php.txt') diff --git a/server/doc/files/index.php.txt b/server/doc/files/index.php.txt new file mode 100644 index 0000000..6881cd0 --- /dev/null +++ b/server/doc/files/index.php.txt @@ -0,0 +1,91 @@ +setOutput("Error", "Invalid Request!"); + $App->show(); + exit(); +} + +//Authentification and deauthentification request +if($task == "Authenticate"){ + + $App->authenticate(); + $App->show(); + +}else if($task == "Deauthenticate"){ + + $App->deauthenticate(); + $App->show(); + +}else if($App->checkToken()){ + //Task switcher and task's file loader + switch($task) + { + case "identity": + include_once("core/Identity.php"); + $identityObject = new identity($App); + $identityObject->action($action); + $App->show(); + break; + + case "network": + include_once("core/Network.php"); + $networkObject = new network($App); + $networkObject->action($action); + $App->show(); + break; + + case "image": + include_once("core/Image.php"); + $imageObject = new image($App); + $imageObject->action($action); + $App->show(); + break; + + case "compute": + include_once("core/Compute.php"); + $computeObject = new compute($App); + $computeObject->action($action); + $App->show(); + break; + + case "networkLayer3": + include_once("core/NetworkLayer3.php"); + $computeObject = new networkLayer3($App); + $computeObject->action($action); + $App->show(); + break; + } + +}else{ + //Request without authentication + $App->setOutput("Error", "Token Invalide"); + $App->show(); +} + + + + -- cgit v1.2.3