echo "SIP_TIMEOUT: " . SIP_TIMEOUT . "\n"; echo "RETRY: " . RETRY . "\n"; echo "GS_DIR: " . GS_DIR . "\n"; echo "DATAFILE: " . DATAFILE . "\n"; echo "LOGFILE: " . LOGFILE . "\n"; echo "IPFILE: " . IPFILE . "\n"; show_nodes($node); die(0); } if (array_key_exists('clear-data', $opts)) { WriteDataFile(DATAFILE); die(0); } ReadDataFile(DATAFILE); if (array_key_exists('show-data', $opts)) { show_nodes($node); die(0); } if (!isset($opts['host'])) { gs_script_invalid_usage($usage); } else { if (count($node) <= $opts['host']) { gs_script_error("Host ID out of range."); } } switch ((int) $node[$opts['host']]['status']) { case 0: echo "Host " . $opts['host'] . " (" . $node[$opts['host']]['dynamic_ip'] . ") is in status NORMAL\n"; die(0); case 1: echo "Host " . $opts['host'] . " (" . $node[$opts['host']]['dynamic_ip'] . ") is in status FAILED\n";
} return $result; }; return $print_nodes($ast); } function show_php($file) { $jade = new \Jade\Jade(true); //return htmlspecialchars($jade->render($file)); return $jade->render($file); } setup_autoload(); if (isset($_REQUEST['render'])) { $jade = new \Jade\Jade(true); $source = $jade->render(file_get_contents('index.jade')); file_put_contents('index.jade.php', $source); } $test = false; if (isset($_REQUEST['test'])) { $test = $_REQUEST['test']; $base = dirname($test) . DIRECTORY_SEPARATOR; $html = basename($test, '.jade'); $jade = file_get_contents($test); $html = file_get_contents($base . $html . '.html'); $tokens = show_tokens($jade); $nodes = show_nodes($jade, $test); $php = show_php($test); $test = true; } $nav_list = build_list(find_tests()); require 'index.jade.php';