This repository was archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
65 lines (50 loc) · 1.26 KB
/
Copy pathindex.php
File metadata and controls
65 lines (50 loc) · 1.26 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
<?php
// api returning json data
require_once __DIR__."/custom/inc.php"; // this is required to be placed at start of execution - it loads the config, app vars, core app functions, and init
function generateResponse() {
$show = array();
$show = [ "Falken's Maze",
"Black Jack",
"Gin Rummy",
"Hearts",
"Bridge",
"Checkers",
"Chess",
"Poker",
"Fighter Combat",
"Guerrilla Engagement",
"Desert Warfare",
"Air-To-Ground Actions",
"Theaterwide Tactical Warfare",
"Theaterwide Biotoxic and Chemical Warfare",
"Global Thermonuclear War"
];
$hide = array();
$hide = [ "Tic-Tac-Toe" ];
$json = array();
$json['gamechoices'] = $show;
$json['hiddengames'] = $hide;
return $json;
}
/* **********************************************
* START
*/
// begin JSON output
if(isApprovedOrigin(TRUE)) {
$json = generateResponse();
if(!debugOn()) {
httpReturnHeader(getCacheExpire("api"), getRequestOrigin(), "application/json");
echo json_encode($json);
} else {
echo "<h3>JSON RAW</h3>";
echo "<p>";
echo json_encode($json);
echo "</p>";
echo "<h3>JSON FORMATTED</h3>";
echo "<pre>";
print_r($json);
echo "</pre>";
appExecutionEnd();
}
}
?>