-
Notifications
You must be signed in to change notification settings - Fork 0
/
cntrl.php
92 lines (72 loc) · 2.56 KB
/
cntrl.php
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
88
89
90
91
92
<?php
require_once __DIR__ . '/db_config.php';
require_once __DIR__ . '/model.php';
$model = new Model();
if (@$_GET['m'] && @$_GET['srv'] && @$_GET['rt']) {
$route = $_GET['rt'];
if (@$_GET['srv'] === 'SRVIAM'){ // To IAM JBoss Service
if (@$_GET['m'] === 'p') { // For POST mtehod
$data = json_decode(file_get_contents('php://input'), true);
$result = $model->post_data($data, SRVIAM.$route);
echo $result;
} else if (@$_GET['m'] === 'g') { // For GET method
$result = $model->get_data(SRVIAM.$route);
echo json_encode($result);
} else {
echo "No action found!";
}
} else if (@$_GET['srv'] === 'SRVMDM') { // To MDM JBoss Service
# code...
if (@$_GET['m'] === 'p') { // For POST method
$data = json_decode(file_get_contents('php://input'), true);
$result = $model->post_data($data, SRVMDM.$route);
echo $result;
} else if (@$_GET['m'] === 'g') { // For GET method
$result = $model->get_data(SRVMDM.$route);
echo json_encode($result);
} else {
echo "No action found!";
}
} else if (@$_GET['srv'] === 'SRVSTC') { // To STC JBoss Service
# code...
if (@$_GET['m'] === 'p') { // For POST method
$data = json_decode(file_get_contents('php://input'), true);
$result = $model->post_data($data, SRVSTC.$route);
echo $result;
} else if (@$_GET['m'] === 'g') { // For GET method
$result = $model->get_data(SRVSTC.$route);
echo json_encode($result);
} else {
echo "No action match found!";
}
} else if (@$_GET['srv'] === 'SRVAAM') { // To AAM JBoss Service
# code...
if (@$_GET['m'] === 'p') { // For POST method
$data = json_decode(file_get_contents('php://input'), true);
$result = $model->post_data($data, SRVAAM.$route);
echo $result;
} else if (@$_GET['m'] === 'g') { // For GET method
$result = $model->get_data(SRVAAM.$route);
echo json_encode($result);
} else {
echo "No action match found!";
}
} else if (@$_GET['srv'] === 'SRVMCS') { // To MCS JBoss Service
# code...
if (@$_GET['m'] === 'p') { // For POST method
$data = json_decode(file_get_contents('php://input'), true);//array("nik" => "15997004", "application" => "AAMA");
$result = $model->post_data($data, SRVMCS.$route);
echo $result;
} else if (@$_GET['m'] === 'g') { // For GET method
$result = $model->get_data(SRVMCS.$route);
echo json_encode($result);
} else {
echo "No action match found!";
}
} else {
echo "No action match found!";
}
} else {
echo "No param match found!";
}
?>