]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/admin-inc.php
Constants rewritten (internal TODO)
[mailer.git] / inc / modules / admin / admin-inc.php
index bb1bb5e5b9d85a63375d85f873c20745758946ad..a9d93afa433b7fa6d07da999d942f9d0abe444e4 100644 (file)
@@ -253,20 +253,20 @@ function ADMIN_DO_ACTION ($wht) {
        $act = getModeAction(getModule(), $wht);
 
        // Define admin login name and ID number
-       define('__ADMIN_LOGIN', getSession('admin_login'));
-       define('__ADMIN_ID'   , getCurrentAdminId());
+       $content['login'] = getSession('admin_login');
+       $content['id']    = getCurrentAdminId();
 
        // Preload templates
        if (EXT_IS_ACTIVE('admins')) {
-               define('__ADMIN_WELCOME', LOAD_TEMPLATE('admin_welcome_admins', true));
+               $content['welcome'] = LOAD_TEMPLATE('admin_welcome_admins', true, $content);
        } else {
-               define('__ADMIN_WELCOME', LOAD_TEMPLATE('admin_welcome', true));
+               $content['welcome'] = LOAD_TEMPLATE('admin_welcome', true, $content);
        }
-       define('__ADMIN_FOOTER' , LOAD_TEMPLATE('admin_footer' , true));
-       define('__ADMIN_MENU'   , ADD_ADMIN_MENU($act, $wht, true));
+       $content['footer'] = LOAD_TEMPLATE('admin_footer' , true, $content);
+       $content['menu']   = ADD_ADMIN_MENU($act, $wht, true, $content);
 
        // Tableset header
-       LOAD_TEMPLATE('admin_main_header');
+       LOAD_TEMPLATE('admin_main_header', false, $content);
 
        // Check if action/what pair is valid
        $result_action = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu`
@@ -297,7 +297,7 @@ LIMIT 1", array($act, $wht, $wht), __FUNCTION__, __LINE__);
        SQL_FREERESULT($result_action);
 
        // Tableset footer
-       LOAD_TEMPLATE('admin_main_footer');
+       LOAD_TEMPLATE('admin_main_footer', false, $content);
 }
 
 //