Page Disabled";
include "tail.inc";
exit();
}
if (file_exists($config_dir . '/cache.inc.php')) {
include $config_dir . '/cache.inc.php';
}
if (isset($_REQUEST['groupsearch'])) {
$terms = trim($_REQUEST['groupsearch']);
} else {
$terms = '';
}
echo '
';
// Use cache if new enough
if (filemtime($grouplist_cache_filename) > (time() - 15000)) {
// Allow refresh from cron.php
if (isset($argv[1]) && $argv[1] == '.RELOAD') {
// Do not use cache, instead rebuild grouplist
$groups_array = build_group_list();
} else {
if ($enable_cache) {
$cache_time = filemtime($grouplist_cache_filename);
$memcache_key = $cache_key_prefix . '_grouplist-cache';
$groups_array = unserialize(cache_get($memcache_key, $memcacheD));
if ($enable_cache_logging) {
if (is_array($groups_array)) {
file_put_contents($cache_log, "\n" . logging_prefix() . ' (cache hit) ' . $memcache_key, FILE_APPEND);
} else {
file_put_contents($cache_log, "\n" . logging_prefix() . ' (cache miss) ' . $memcache_key, FILE_APPEND);
}
}
} else {
$groups_array = unserialize(file_get_contents($grouplist_cache_filename));
}
if (!is_array($groups_array)) {
$groups_array = build_group_list();
}
}
} else {
$groups_array = build_group_list();
}
// Search
display_search_tools();
echo '';
echo '';
echo 'Section | ';
echo 'Newsgroup | ';
echo 'Description | ';
echo 'Messages | ';
echo '
';
foreach ($groups_array as $key) {
$section = $key['section'];
$group = $key['group'];
$url = $key['url'];
$title = $key['title'];
$messages = $key['messages'];
// Check if this is a search
if ($terms != '') {
if (!preg_match("/$terms/i", $group) && !preg_match("/$terms/i", $title))
continue;
}
echo '';
echo ' ' . $section;
echo ' | ';
echo '' . htmlspecialchars($group) . " \r\n";
echo ' | ';
echo '' . $title . ' | ';
echo '';
echo "\n" . $messages;
echo ' | ';
echo '
';
}
echo '
';
echo '
';
include "../spoolnews/tail.inc";
echo '