]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-usage.php
More time() in SQL queries replace with UNIX_TIMESTAMP()
[mailer.git] / inc / modules / admin / what-usage.php
index 3a17999e65bc0739a9662c7de7c5932bfa72b955..4046acd7536c21c8906698aacfb45142eacb307f 100644 (file)
@@ -53,7 +53,7 @@ if (!empty($_GET['image'])) {
                $file = sprintf("%s%s%s_usage_%s.png", PATH, $usage, SQL_ESCAPE($_GET['type']), SQL_ESCAPE($_GET['image']));
        }
 
-       if ((file_exists($file)) && (is_readable($file))) {
+       if (FILE_READABLE($file)) {
                $image = imagecreatefrompng($file);
                header("Content-type: image/png");
                imagepng($image);
@@ -61,7 +61,7 @@ if (!empty($_GET['image'])) {
        }
        exit();
 } elseif (empty($_GET['usage'])) {
-       $file = PATH.$usage."index.html";
+       $file = sprintf("%s%sindex.html", PATH, $usage);
 } else {
        $file = sprintf("%s%susage_%s.html",
                PATH,
@@ -71,7 +71,7 @@ if (!empty($_GET['image'])) {
 }
 
 if (!empty($file)) {
-       if (file_exists($file) && is_readable($file)) {
+       if (FILE_READABLE($file)) {
                        $tmpl_file = implode("", file($file));
                        $tmpl_file = addslashes($tmpl_file);
                        $tmpl_file = "\$content=\"".$tmpl_file."\";";