-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
49 lines (42 loc) · 1.01 KB
/
index.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
<?php
/**
* The primary php file. All page requests come via this file
* @package SSC
* @subpackage Core
*/
/**
* Define if an included file is accessed through the core
*/
define("_VALID_SSC", 1);
/**
* Enable debug info
*/
define("_SSC_DEBUG", 0);
$ssc_execute_time = microtime(true);
error_reporting(E_ALL);
// App startup
include('./includes/core.inc.php');
// We don't need the front-end initialized for ajax requests
if (isset($_GET['ajax']) && ($_GET['ajax'] == 'y')) {
ssc_init(SSC_INIT_EXTENSION);
header("Content-type: application/x-javascript; charset=utf-8", true);
// Hook in form validation as a core function
if (isset($_GET['core']) && ($_GET['core'] == 'val-form')) {
// Check the form target exists
if (!isset($_GET['form']))
exit;
$target = str_replace("-", "_", $_GET['form']);
if (function_exists($target))
echo json_encode($target());
}
else {
echo ssc_execute();
}
}
else {
ssc_init(SSC_INIT_FULL);
$page = ssc_execute();
theme_render($page);
}
// Clean up
ssc_close();