42 lines
1 KiB
PHP
Executable file
42 lines
1 KiB
PHP
Executable file
<?php
|
|
/**
|
|
* ZapMachine (re)based on the ZapV
|
|
* ZAPV - Zap Machine as modified by Vincent Bruijn
|
|
* that was based on ApFab - Zap Machine V0.3.2
|
|
* ApFab: thanks for the basic work,
|
|
* Vincent Bruijn thanks for enhencing
|
|
* version 0.9.0
|
|
*/
|
|
|
|
if (!extension_loaded('imagick')) {
|
|
echo 'Enable the php imagick extension to get this running.';
|
|
die;
|
|
}
|
|
|
|
$mode = isset($_GET['mode']) ? $_GET['mode'] : 'home';
|
|
|
|
require_once '..' . DIRECTORY_SEPARATOR . 'conf' . DIRECTORY_SEPARATOR . 'init.php';
|
|
|
|
if (defined('ZAP_DEBUG') && ZAP_DEBUG) {
|
|
error_reporting(E_ALL);
|
|
ini_set('display_startup_errors', '1');
|
|
// Only display errors inline for HTML pages; raw image responses must stay clean.
|
|
if ($mode === 'zap') {
|
|
ini_set('display_errors', '0');
|
|
} else {
|
|
ini_set('display_errors', '1');
|
|
}
|
|
} else {
|
|
error_reporting(0);
|
|
ini_set('display_errors', '0');
|
|
}
|
|
|
|
$config = Config::getInstance();
|
|
$config->register('engines', $search_engines);
|
|
|
|
$frontcontroller = new ZAPController($mode);
|
|
$output = $frontcontroller->fetch();
|
|
|
|
print($output);
|
|
exit;
|
|
?>
|