include_once "sqstat.class.php"; $squidclass = new squidstat(); // loading configuration if (is_file("config.inc.php")) { include_once "config.inc.php"; // checking configuration. We need to have at least one // squidhost/squid pair if (!isset($_GET["config"])) { $config = 0; } else { $config = (int) $_GET["config"]; } if (!isset($squidhost[$config]) || !isset($squidport[$config])) { $squidclass->errno = 4; $squidclass->errstr = "Error in the configuration file." . 'Please, specify $squidhost[' . $config . ']/$squidport[' . $config . ']'; $squidclass->showError(); exit(4); } for ($i = 0; $i < count($squidhost); $i++) { $configs[$i] = $squidhost[$i] . ':' . $squidport[$i]; } @($squidhost = $squidhost[$config]); @($squidport = $squidport[$config]); @($cachemgr_passwd = $cachemgr_passwd[$config]); @($resolveip = $resolveip[$config]); @($hosts_file = $hosts_file[$config]); if (isset($group_by[$config])) { $group_by = $group_by[$config]; } else { $group_by = "ip"; }