function GENERATE_SPONSOR_CONTENT($what)
{
global $HTTP_POST_VARS, $_GET, $CONFIG;
- $FILE = PATH."inc/modules/sponsor/".$what.".php";
$OUT = "";
- if (@file_exists($FILE))
- {
+ $FILE = sprintf("%sinc/modules/sponsor/%s.php", PATH, $what);
+ if ((file_exists($FILE)) && (is_readable($FILE))) {
// Every sponsor action will output nothing directly. It will be written into $OUT!
require_once($FILE);
- }
- else
- {
+ } else {
// File not found!
$OUT .= LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_CONTENT_404_1.$what.SPONSOR_CONTENT_404_2);
}