New function isDirectory() introduced, fixed GET_DIR_AS_ARRAY() (replaces scandir())
[mailer.git] / inc / modules / admin / what-logs.php
index c1f1f4a1be70d8808dac7cddfa4fde69970bb583..33c537b6a2d3eeb6b99e372d71bf670a6c9f5831 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Management fuer Zugriffslogbuecher               *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision:: 856                                                    $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
  * For more information visit: http://www.mxchange.org                  *
@@ -40,9 +45,9 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // Add description as navigation point
 ADD_DESCR("admin", __FILE__);
 
-if (!empty($_GET['access'])) {
+if (REQUEST_ISSET_GET(('access'))) {
        // Secure input and construct FQFN
-       $access = SQL_ESCAPE(strip_tags($_GET['access']));
+       $access = SQL_ESCAPE(strip_tags(REQUEST_GET('access')));
        $target = sprintf("%slogs/%s", constant('PATH'), $access);
 
        // Is the file valid and readable?
@@ -77,15 +82,15 @@ if (!empty($_GET['access'])) {
 
                // Output the logfile's content and exit
                print($content);
-               exit;
+               shutdown();
        } else {
                // Not readable!
                LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('LOGFILE_NOT_READABLE'), $access));
        }
 } else {
        // List access logfiles
-       $dir = PATH.getConfig('logs_base')."/";
-       if (is_dir($dir)) {
+       $dir = constant('PATH') . getConfig('logs_base') . "/";
+       if (isDirectory($dir)) {
                // logs directory does exist
                OUTPUT_HTML("<ol>");
                $handle = opendir($dir) or mxchange_die("Cannot open directory ".getConfig('logs_base')."!");