forked from fedehuguet/Botzilla
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDashboard.php
More file actions
87 lines (78 loc) · 4.08 KB
/
Dashboard.php
File metadata and controls
87 lines (78 loc) · 4.08 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
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
include "Tools.php";
//========================================================================================================================
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: PUT, POST, DELETE, OPTIONS');
//header('Access-Control-Allow-Headers: Content-Type, Content-Range, Content-Disposition, Content-Description');
header("Content-Type: application/json", true);
//========================================================================================================================
isset($_POST['function']) ? $function = $_POST['function'] : $function = '404';
//========================================================================================================================
// //Selecciona el metodo a ejecutar, se coloca solo por
// `// estandar
switch ($function)
{
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case "echoTop5" : SystemController::echoTop5();
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case "echoProblemStatus" : SystemController::echoProblemStatus();
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case "echoDeskSharing" : SystemController::echoDeskSharing();
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case "echoProblemMonth" : SystemController::echoProblemMonth();
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case "echoConversationMonth" : SystemController::echoConversationMonth();
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case '404': header("HTTP/1.1 404 Not Found");
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
default: header("HTTP/1.1 400 Bad Request");
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
}
//========================================================================================================================
class SystemController
{
//------------------------------------------------------------------------------------------------------------------
public static function echoTop5()
{
$paramtypes = null;
$params = null;
echo json_encode(Tools::CallStoredProcedure("SP_GetTop5",$paramtypes, $params));
}
//------------------------------------------------------------------------------------------------------------------
public static function echoProblemStatus()
{
$paramtypes = null;
$params = null;
echo json_encode(Tools::CallStoredProcedure("SP_GetProblemStatus",$paramtypes, $params));
}
//------------------------------------------------------------------------------------------------------------------
public static function echoDeskSharing()
{
$paramtypes = null;
$params = null;
echo json_encode(Tools::CallStoredProcedure("SP_ProblemasDesk",$paramtypes, $params));
}
//------------------------------------------------------------------------------------------------------------------
public static function echoProblemMonth()
{
$paramtypes = null;
$params = null;
echo json_encode(Tools::CallStoredProcedure("SP_ProblemasPorMes",$paramtypes, $params));
}
//------------------------------------------------------------------------------------------------------------------
public static function echoConversationMonth()
{
$paramtypes = null;
$params = null;
echo json_encode(Tools::CallStoredProcedure("SP_ConversacionesPorMes",$paramtypes, $params));
}
}
//========================================================================================================================
?>