<?php
- set_include_path(get_include_path() . PATH_SEPARATOR . "include");
+ set_include_path(get_include_path() . PATH_SEPARATOR .
+ dirname(__FILE__) . "/include");
/* remove ill effects of magic quotes */
if (!init_connection($link)) return;
- if (ENABLE_GZIP_OUTPUT) {
+ if (ENABLE_GZIP_OUTPUT && function_exists("ob_gzhandler")) {
ob_start("ob_gzhandler");
}
$handler = new Public_Handler($link, $_REQUEST);
- if ($handler) {
- if ($handler->before()) {
- if ($method && method_exists($handler, $method)) {
- $handler->$method();
- } else if (method_exists($handler, 'index')) {
- $handler->index();
- }
- $handler->after();
- return;
+ if ($handler->before($method)) {
+ if ($method && method_exists($handler, $method)) {
+ $handler->$method();
+ } else if (method_exists($handler, 'index')) {
+ $handler->index();
}
+ $handler->after();
+ return;
}
header("Content-Type: text/plain");