]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/sponsor_functions.php
Tons of rewrites (SQL queries), surfbar nearly finished (working: surfing with static...
[mailer.git] / inc / libs / sponsor_functions.php
index d76263196e04fcc1e3de56e04a09e210729604c2..019eac79ff0ca47acd623e1fdd47d6905a4aebd1 100644 (file)
@@ -421,15 +421,12 @@ ORDER BY sort", array($action), __FILE__, __LINE__);
 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);
        }