-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
ajax.php
45 lines (33 loc) · 1.22 KB
/
ajax.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
<?php
/*
* Copyright 2014-2024 GPLv3, Open Crypto Tracker by Mike Kilday: [email protected] (leave this copyright / attribution intact in ALL forks / copies!)
*/
// Runtime mode
$runtime_mode = 'ajax';
// Running BEFORE calling config.php
// Log retrevial
if ( $_GET['type'] == 'log' ) {
$is_logs = true;
}
// Chart retrieval
elseif ( $_GET['type'] == 'chart' ) {
$is_charts = true;
}
// FOR SPEED, $is_logs / $is_charts above triggers only getting app config vars, VERY LITTLE init.php, then EXITING after running the logs / charts library routines
require('app-lib/php/init.php');
// Running AFTER calling init.php
// RSS feed retrieval
if ( $_GET['type'] == 'rss' ) {
require_once($ct['base_dir'] . '/app-lib/php/inline/ajax/rss.php');
}
elseif ( $_GET['type'] == 'access_stats' ) {
require_once($ct['base_dir'] . '/app-lib/php/inline/ajax/access-stats.php');
}
elseif ( $_GET['type'] == 'jstree' ) {
require_once($ct['base_dir'] . '/app-lib/php/inline/ajax/jstree/jstree-init.php');
}
elseif ( $_GET['type'] == 'add_markets' || $_GET['type'] == 'remove_markets' ) {
require_once($ct['base_dir'] . '/app-lib/php/inline/ajax/setup-wizards/setup-wizards-init.php');
}
// DON'T LEAVE ANY WHITESPACE AFTER THE CLOSING PHP TAG!
?>