<?php
	// version check
	if(version_compare(phpversion(), '7.0.0', '<')) exit('PHP VERSION insufficient ('.phpversion().')');

	// class autoload
	require('sys/autoload.php');

	use \sven\sys\sven as sven;
	use \sven\sys\mysql\mysql as mysql;
	use \sven\sys\core as CORE;

	// Request Handler
	sven\web::setSecurityHeaders();
	$web = new sven\web(dirname(__FILE__));

	/* TOOL: prebuilt source files for used libraries
	$folder = dirname(__FILE__).'/sys/sources/';
	foreach(sven\utilities::getAllFiles($folder, '.php') as $key) {
		$key = str_replace($folder.'\jwt\\src\\', '$dir.\'', $key);
		if(sven\utilities::startsWith($key, '$dir')) print_r($key."', ");
	}
	/**/

	//print_r(get_required_files());
	if(!sven\web::$API)
		print_r(CORE::getOutput());
	else
		echo(CORE::getApiOutput());

?>
