summaryrefslogtreecommitdiff
path: root/server/index.php
blob: 166e82ed6cfc433de66d2f6e4cf85fac0fe3aaa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
	require "vendor/autoload.php";
	include_once("config.inc.php");
	include_once("init.php");
	
	if(isset($_POST["task"]) && isset($_POST["action"])){
		$task = $_POST["task"];
		$action = $_POST["action"];
	}else if(isset($_POST["task"]) && $_POST["task"] == "Authenticate"){
		$task = $_POST["task"];
	}else{
		//Gestion Erreur
	}
	
	if($task == "Authenticate"){
		
		$App->authenticate();
		$App->show();
		
	}
	
	switch($task)
	{
		case "identity":
			include_once("core/Identity.php");
			$identityObject = new identity($App);
			$identityObject->action($action);
			$App->show();
			break;
			
		case "image":
			include_once("core/Image.php");
			$imageObject = new image($App);
			$imageObject->action($action);
			$App->show();
			break;
	}