示例#1
0
require_once dirname(__FILE__) . '/../require/class.SBS.php';
require_once dirname(__FILE__) . '/../require/class.Connection.php';
require_once dirname(__FILE__) . '/../require/class.Common.php';
if (!isset($globalDebug)) {
    $globalDebug = FALSE;
}
// Check if schema is at latest version
$schema = new Connection();
if ($schema->latest() === false) {
    echo "You MUST update to latest schema. Run install/index.php";
    exit;
}
if (isset($globalServer) && $globalServer) {
    $SI = new SpotterServer();
} else {
    $SI = new SpotterImport();
}
$APRS = new APRS();
$SBS = new SBS();
$ATC = new ATC();
$Common = new Common();
date_default_timezone_set('UTC');
// signal handler - playing nice with sockets and dump1090
if (function_exists('pcntl_fork')) {
    pcntl_signal(SIGINT, function ($signo) {
        global $sockets;
        echo "\n\nctrl-c or kill signal received. Tidying up ... ";
        die("Bye!\n");
    });
    pcntl_signal_dispatch();
}
require_once dirname(__FILE__) . '/../require/class.SBS.php';
require_once dirname(__FILE__) . '/../require/class.Connection.php';
require_once dirname(__FILE__) . '/../require/class.Common.php';
if (!isset($globalDebug)) {
    $globalDebug = FALSE;
}
// Check if schema is at latest version
$schema = new Connection();
if ($schema->latest() === false) {
    echo "You MUST update to latest schema. Run install/index.php";
    exit;
}
if (isset($globalServer) && $globalServer) {
    $SI = new SpotterServer();
} else {
    $SI = new SpotterImport();
}
$APRS = new APRS();
$SBS = new SBS();
$ATC = new ATC();
$Common = new Common();
date_default_timezone_set('UTC');
// signal handler - playing nice with sockets and dump1090
if (function_exists('pcntl_fork')) {
    pcntl_signal(SIGINT, function ($signo) {
        global $sockets;
        echo "\n\nctrl-c or kill signal received. Tidying up ... ";
        die("Bye!\n");
    });
    pcntl_signal_dispatch();
}