]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin.php
Final fixes for SQL_ALTER_TABLE() wrapper, INSERT INTO queries are still not wrapped...
[mailer.git] / inc / modules / admin.php
index 18156e298ca26ac7c1766767bef3878527bf0e38..38764db5050e6a70ba7aca15ef03f912a281e2ea 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Administrationsmodul                             *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision::                                                        $ *
+ * $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                  *
@@ -61,14 +66,14 @@ if (!isAdminRegistered()) {
                destroyAdminSession(false);
 
                // Do registration
-               $ret = REGISTER_ADMIN(REQUEST_POST('login'), $hashedPass);
+               $ret = REGISTER_ADMIN(REQUEST_POST('login'), $hashedPass, constant('WEBMASTER'));
                switch ($ret)
                {
                case "done":
                        $done = changeDataInFile(constant('PATH')."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
                        if ($done === true) {
                                // Registering is done
-                               LOAD_URL("modules.php?module=admin&action=login&register=done");
+                               LOAD_URL("modules.php?module=admin&register=done");
                        } else {
                                $ret = getMessage('ADMIN_CANNOT_COMPLETE');
                        }
@@ -85,7 +90,7 @@ if (!isAdminRegistered()) {
                                $ret = getMessage('ADMIN_LOGIN_ALREADY_REG');
                        } else {
                                // Any other kind will be logged and interpreted as 'done'
-                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN()", $ret));
+                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN() and interpreted as 'done'!", $ret));
                                // @TODO Why is this set to 'done'?
                                $ret = "done";
                        }
@@ -96,7 +101,7 @@ if (!isAdminRegistered()) {
                                changeDataInFile(constant('PATH')."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
 
                                // Load URL for login
-                               LOAD_URL("modules.php?module=admin&action=login");
+                               LOAD_URL("modules.php?module=admin");
                        } // END - if
                        break;
                }
@@ -189,7 +194,7 @@ if (!isAdminRegistered()) {
        // At leat one administrator account was created
        if ((isSessionVariableSet('admin_login')) && (isSessionVariableSet('admin_md5')) && (isSessionVariableSet('admin_last')) && (isSessionVariableSet('admin_to'))) {
                // Timeout for last login, we have to logout first!
-               LOAD_URL("modules.php?module=admin&action=login&logout=1");
+               LOAD_URL("modules.php?module=admin&logout=1");
        } // END - if
 
        if (REQUEST_ISSET_GET(('register'))) {
@@ -221,7 +226,7 @@ if (!isAdminRegistered()) {
                        // Add data to URL
                        if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what'];
                         elseif (!empty($GLOBALS['action'])) $URL .= "action=".$GLOBALS['action'];
-                        elseif (REQUEST_ISSET_GET(('area'))) $URL .= "area=".REQUEST_GET('area');
+                        elseif (REQUEST_ISSET_GET('area')) $URL .= "area=".REQUEST_GET('area');
 
                        // Load URL
                        LOAD_URL($URL);
@@ -296,7 +301,7 @@ if (!isAdminRegistered()) {
                                // Set default values
                                $content = array('target' => "action", 'value' => "login");
                        }
-               } elseif (REQUEST_ISSET_GET(('area'))) {
+               } elseif (REQUEST_ISSET_GET('area')) {
                        // Restore old area value
                        $content = array('target' => "area", 'value' => REQUEST_GET('area'));
                } else {
@@ -341,7 +346,7 @@ if (!isAdminRegistered()) {
        {
        case "done":
                // Check for access control line of current menu entry
-               define('__ACL_ALLOW', RUN_FILTER('check_admin_acl'));
+               $GLOBALS['acl_allow'] = runFilterChain('check_admin_acl');
 
                // When type of admin menu is not set fallback to old menu system
                if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', "OLD");
@@ -352,7 +357,7 @@ if (!isAdminRegistered()) {
                        $area = "entrance";
 
                        // Check for similar URL variable
-                       if (REQUEST_ISSET_GET(('area'))) $area = REQUEST_GET(('area'));
+                       if (REQUEST_ISSET_GET('area')) $area = REQUEST_GET('area');
 
                        // Load "logical-area menu-system" file
                        LOAD_INC_ONCE("inc/modules/admin/lasys-inc.php");
@@ -361,7 +366,7 @@ if (!isAdminRegistered()) {
                        ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']);
                } else {
                        // This little call constructs the whole default old and lacky menu system
-                       // on left side
+                       // on left side. It also renders the content on right side
                        ADMIN_DO_ACTION($GLOBALS['what']);
                }
                break;