-
-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,218 additions
and
927 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,47 @@ | ||
<?php | ||
|
||
require_once __DIR__ . '/src/Autoload.php'; | ||
require_once __DIR__ . '/src/Autoload.php'; | ||
|
||
define('debug', false); | ||
define('version', '3.3'); | ||
define('debug', false); | ||
|
||
if(debug) { | ||
if (debug) { | ||
error_reporting(E_ALL); | ||
ini_set('display_errors', 1); | ||
} | ||
} | ||
|
||
if (version_compare(phpversion(), '7.1', '<')) { | ||
if (PHP_VERSION_ID < 70100) { | ||
echo 'PHP 7.1 or up is required to use ezXSS'; | ||
exit(); | ||
} | ||
} | ||
|
||
$requestUrl = explode('?', $_SERVER['REQUEST_URI'])[0]; | ||
$requestUrl = explode('?', $_SERVER['REQUEST_URI'])[0]; | ||
|
||
if(strpos($requestUrl, '/manage/') === 0 || strpos($requestUrl, '/manage') === 0) { | ||
if (strpos($requestUrl, '/manage/') === 0 || strpos($requestUrl, '/manage') === 0) { | ||
$path = str_replace('/manage/', '', explode('?', $_SERVER['REQUEST_URI'])[0]); | ||
|
||
if(explode('/', $path)[0] == 'report') { | ||
$path = explode('/', $path)[0]; | ||
if (explode('/', $path)[0] == 'report') { | ||
$path = explode('/', $path)[0]; | ||
} | ||
|
||
if($path == 'request') { | ||
$request = new Request(); | ||
echo $request->json(); | ||
if ($path == 'request') { | ||
$request = new Request(); | ||
echo $request->json(); | ||
} else { | ||
$route = new Route(); | ||
echo $route->template($path); | ||
$route = new Route(); | ||
echo $route->template($path); | ||
} | ||
|
||
} else { | ||
} else { | ||
$route = new Route(); | ||
|
||
if($requestUrl == '/callback') { | ||
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | ||
echo $route->callback(file_get_contents('php://input')); | ||
} | ||
if ($requestUrl == '/callback') { | ||
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | ||
echo $route->callback(file_get_contents('php://input')); | ||
} | ||
} | ||
|
||
if($requestUrl == '/') { | ||
header('Content-Type: application/x-javascript'); | ||
echo $route->jsPayload(); | ||
if ($requestUrl == '/') { | ||
header('Content-Type: application/x-javascript'); | ||
echo $route->jsPayload(); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?php | ||
|
||
require_once __DIR__ . '/Route.php'; | ||
require_once __DIR__ . '/User.php'; | ||
require_once __DIR__ . '/Request.php'; | ||
require_once __DIR__ . '/Database.php'; | ||
require_once __DIR__ . '/Component.php'; | ||
require_once __DIR__ . '/Basic.php'; | ||
require_once __DIR__ . '/Route.php'; | ||
require_once __DIR__ . '/User.php'; | ||
require_once __DIR__ . '/Request.php'; | ||
require_once __DIR__ . '/Database.php'; | ||
require_once __DIR__ . '/Component.php'; | ||
require_once __DIR__ . '/Basic.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.