-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.php
More file actions
74 lines (57 loc) · 1.95 KB
/
Copy pathindex.php
File metadata and controls
74 lines (57 loc) · 1.95 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
include 'Library/autoload.php'; //Auto chargement des classes
include 'Config/App.inc.php'; //Paramètres de l'application
session_start(); //Démarrage de la session
Debug::debugModeOn(); //Activation du mode de déboggage
//Déconnexion
if(isset($_GET['reset']))
{
SessionManager::deleteConnection();
}
//Gestion de la session
SessionManager::createConnection();
//Application
if(SessionManager::isConnected())
{
echo '<a href="'.REDIRECT_URI.'">Refresh</a> <br />' . "\n";
echo '<a href="'.REDIRECT_URI.'?reset">Reset</a> <br />' . "\n";
//Récupération de l'authentification
$authTwinoid = $_SESSION['authTwinoid'];
Debug::showVariable($authTwinoid);
//Gestion de l'API Hordes
$hordesApi = new HordesAPI($authTwinoid->getToken());
//Gestion des erreurs
if($hordesApi->errors())
{
$description = $hordesApi->getErrorsDescriptions();
foreach($hordesApi->getErrors() as $key => $error)
{
echo $error . ' : ' . $description[$key] . '<br/>';
}
}
//Gestion de l'API Mush
$mushApi = new MushAPI($authTwinoid->getToken());
//Debug::showVariable($mushApi->getMe());
//Gestion des erreurs
if($mushApi->errors())
{
$description = $mushApi->getErrorsDescriptions();
foreach($mushApi->getErrors() as $key => $error)
{
echo $error . ' : ' . $description[$key] . '<br/>';
}
}
//Gestion de l'API Twinoid
$twinoidApi = new TwinoidAPI($authTwinoid->getToken());
//Debug::showVariable($twinoidApi->getMe());
//Gestion des erreurs
if($twinoidApi->errors())
{
$description = $twinoidApi->getErrorsDescriptions();
foreach($twinoidApi->getErrors() as $key => $error)
{
echo $error . ' : ' . $description[$key] . '<br/>';
}
}
}
?>