Debut revoke

This commit is contained in:
EoleDev 2016-03-09 14:53:48 +01:00
parent dde482df64
commit a706b0d565
3 changed files with 92 additions and 38 deletions

70
server/index.php Normal file → Executable file
View file

@ -6,7 +6,7 @@
if(isset($_POST["task"]) && isset($_POST["action"])){
$task = $_POST["task"];
$action = $_POST["action"];
}else if(isset($_POST["task"]) && $_POST["task"] == "Authenticate"){
}else if(isset($_POST["task"]) && $_POST["task"] == "Authenticate" || $_POST["task"] == "Deauthenticate"){
$task = $_POST["task"];
}else{
//Gestion Erreur
@ -17,36 +17,44 @@
$App->authenticate();
$App->show();
}else if($task == "Deauthenticate"){
$App->deauthenticate();
$App->show();
}else{
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;
}
}
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;
}