if ($config_check_referer == TRUE) { $self = $_SERVER["SCRIPT_NAME"]; if ($self == "") { $self = $_SERVER["REDIRECT_URL"]; } if ($self == "") { $self = "index.php"; } if (!eregi("{$self}", $HTTP_REFERER) and $HTTP_REFERER != "") { die("<h1>Access denied</h1><p>Try to <a href=\"?action=logout\">logout</a> and then login again. To turn off this security check, change \$config_check_referer in index.php to FALSE</p>"); } } // ******************************************************************************** // Include System Module // ******************************************************************************** //name of mod //access $system_modules = array('addnews' => 'user', 'editnews' => 'user', 'main' => 'user', 'options' => 'user', 'editusers' => 'admin', 'editcomments' => 'admin', 'tools' => 'admin', 'ipban' => 'admin', 'about' => 'user', 'preview' => 'user', 'categories' => 'admin', 'massactions' => 'user', 'help' => 'user', 'snr' => 'admin', 'xfields' => 'any', 'credits' => 'any', 'rss' => 'admin'); run_actions('admin-page'); $mod = htmlspecialchars(urldecode($mod)); if ($mod == "") { require "./inc/main.mdu"; } elseif ($system_modules[$mod]) { if ($system_modules[$mod] == "user") { require "./inc/" . $mod . ".mdu"; } elseif ($system_modules[$mod] == "admin" and $member_db[1] == 1) { require "./inc/" . $mod . ".mdu"; } elseif ($system_modules[$mod] == "admin" and $member_db[1] != 1) { msg("error", "Access denied", "Only admin can access this module"); exit; } elseif ($system_modules[$mod] == "any") { require "./inc/{$mod}.mdu";
} else { continue; } } } else { $count_all = count($all_news); } $i = 0; $o = 0; $showed = 0; $repeat = TRUE; $url_archive = $archive; while ($repeat != FALSE) { foreach ($all_news as $null => $news_line) { $news_arr = explode("|", $news_line); $modifier = run_actions('news-loop', ''); if ($modifier == "skip") { $count_all--; continue; } if ($category and $requested_cats[$news_arr[6]] != TRUE) { continue; } if (isset($start_from) and $start_from != "") { if ($i < $start_from) { $i++; continue; } elseif ($showed == $number) { break; } }