OSDN Git Service

Merge branch 'skinnable-master' of git.sourceforge.jp:/gitroot/nucleus-jp/nucleus...
[nucleus-jp/nucleus-next.git] / nucleus / libs / AdminActions.php
index c13cef3..0faf855 100644 (file)
@@ -7,9 +7,6 @@ if ( !class_exists('BaseActions') )
 
 class AdminActions extends BaseActions
 {
-       // reference to the skin object for which a part is being parsed
-       private $skin;
-       
        private $skintype;
        
        /* NOTE: list of whole available action names for tags
@@ -133,11 +130,23 @@ class AdminActions extends BaseActions
        static private $default_actions = array(
                'addtickettourl',
                'adminurl',
+               'codename',
                'customhelplink',
+               'date',
+               'extrahead',
                'headmessage',
                'helplink',
+               'member',
+               'newestcompare',
+               'pagehead',
+               'pagefoot',
+               'qmenuaddselect',
+               'quickmenu',
+               'sitevar',
                'sprinttext',
-               'ticket'
+               'ticket',
+               'version',
+               'versioncheckurl'
        );
        
        /**
@@ -531,7 +540,7 @@ class AdminActions extends BaseActions
                                        'categories',
                                        'currenttime',
                                        'init',
-                                       'itemoptions',
+                                       'pluginoptions',
                                        'pluginextras'
                                );
                                break;
@@ -581,8 +590,8 @@ class AdminActions extends BaseActions
                                        'categories',
                                        'currenttime',
                                        'itemtime',
-                                       'pluginextras',
-                                       'itemoptions'
+                                       'pluginoptions',
+                                       'pluginextras'
                                );
                                break;
                        case 'itemlist':
@@ -621,27 +630,6 @@ class AdminActions extends BaseActions
                                        'yrbloglist',
                                );
                                break;
-                       case 'pagefoot':
-                               $extra_actions = array(
-                                       'date',
-                                       'qmenuaddselect',
-                                       'member',
-                                       'quickmenu',
-                               );
-                               break;
-                       case 'pagehead':
-                               $extra_actions = array(
-                                       'charset',
-                                       'sitevar',
-                                       'adminurl',
-                                       'extrahead',
-                                       'member',
-                                       'versioncheckurl',
-                                       'version',
-                                       'codename',
-                                       'newestcompare',
-                               );
-                               break;
                        case 'plugindelete':
                                $extra_actions = array(
                                        'editpluginfo',
@@ -787,18 +775,6 @@ class AdminActions extends BaseActions
        }
        
        /**
-        * AdminActions::setSkin()
-        * Set the skin
-        * @param       object  $skin   an instance of Skin class
-        * @return      void
-        */
-       public function setSkin(&$skin)
-       {
-               $this->skin =& $skin;
-               return;
-       }
-       
-       /**
         * AdminActions::parse_actionloglist()
         * Parse skinvar actionloglist
         * 
@@ -1055,10 +1031,8 @@ class AdminActions extends BaseActions
                // walk over all selectedids and perform action
                foreach ( $selected as $selectedid )
                {
-                       echo $selectedid;
                        $error = '';
                        $selectedid = intval($selectedid);
-                       
                        switch ( $action )
                        {
                                case 'delete':
@@ -1072,7 +1046,7 @@ class AdminActions extends BaseActions
                                        }
                                        break;
                                case 'move':
-                                       $error = call_user_func_array(array('Admin', $moveaction), array($selectedid));
+                                       $error = call_user_func_array(array('Admin', $moveaction), array($selectedid, $destid));
                                        break;
                                case 'setadmin':
                                        // always succeeds
@@ -1109,9 +1083,8 @@ class AdminActions extends BaseActions
                        $parser->parse($template);
                        $template = ob_get_contents();
                        ob_end_clean();
-                       
+                       echo Template::fill($template, $data);
                }
-               echo Template::fill($template, $data);
                return;
        }
        
@@ -1296,7 +1269,7 @@ class AdminActions extends BaseActions
                
                $template['content'] = 'adminskinlist';
                $template['tabindex'] = 10;
-               $template['friendly_names'] = $this->skin->getAvailableTypes();
+               $template['friendly_names'] = $this->parser->skin->getAvailableTypes();
                Showlist($query, 'table', $template, $templateName);
                return;
        }
@@ -1335,7 +1308,7 @@ class AdminActions extends BaseActions
                        $templates = Template::read($templateName);
                }
                
-               $nType  = $this->skin->getAvailableTypes();
+               $nType  = $this->parser->skin->getAvailableTypes();
                $skinid = intRequestVar('skinid');
                
                $query = "SELECT stype FROM  %s WHERE stype NOT IN (%s) AND sdesc=%d;";
@@ -1427,7 +1400,7 @@ class AdminActions extends BaseActions
        {
                global $DIR_ADMINSKINS;
                $skinType = strtolower(trim(requestVar('type')));
-               $actions  = $this->skin->getAllowedActionsForType($skinType);
+               $actions  = $this->parser->skin->getAllowedActionsForType($skinType);
                sort($actions);
                
                while ( $current = array_shift($actions) )
@@ -1597,9 +1570,11 @@ class AdminActions extends BaseActions
        public function parse_batchmovelist()
        {
                $selected = requestIntArray('batch');
+               $count    = 0;
                foreach ( $selected as $select )
                {
-                       echo '<input type="hidden" name="batch[' . ($select++) . ']" value="' . intval($select) . "\" />\n";
+                       echo '<input type="hidden" name="batch[' . ($count) . ']" value="' . intval($select) . "\" />\n";
+                       $count++;
                }
                return;
        }
@@ -1646,7 +1621,7 @@ class AdminActions extends BaseActions
         * @param       void
         * @return      void
         */
-       public function parse_blogcatlist()
+       public function parse_blogcatlist($templateName = '')
        {
                global $manager;
                $blogid = intRequestVar('blogid');
@@ -1657,7 +1632,7 @@ class AdminActions extends BaseActions
                $template['tabindex'] = 200;
                
                $batch = new Batch('category');
-               $batch->showlist($query, 'table', $template);
+               $batch->showlist($query, 'table', $template, $templateName);
                return;
        }
        
@@ -1884,7 +1859,7 @@ class AdminActions extends BaseActions
                $template['tabindex'] = 10;
 
                $batch = new Batch('team');
-               $batch->showlist($query, 'table', $template, _LISTS_NOMORE, $templateName);
+               $batch->showList($query, 'table', $template, $templateName, _LISTS_NOMORE);
                return;
        }
        
@@ -2377,7 +2352,7 @@ class AdminActions extends BaseActions
                        $templates = Template::read($templateName);
                }
                
-               $types = $this->skin->getAvailableTypes();
+               $types = $this->parser->skin->getAvailableTypes();
                ksort($types);
                
                /* NOTE: set templates for HEAD/BODY/FOOT */
@@ -2658,7 +2633,7 @@ class AdminActions extends BaseActions
        {
                global $CONF, $manager, $member;
                
-               $fNames = $this->skin->getAvailableTypes();
+               $fNames = $this->parser->skin->getAvailableTypes();
                $sType  = strtolower(trim(requestVar('type')));
                
                switch ( $type )
@@ -2667,16 +2642,16 @@ class AdminActions extends BaseActions
                                echo intRequestVar('skinid');
                                break;
                        case 'name':
-                               echo Entity::hsc($this->skin->getName());
+                               echo Entity::hsc($this->parser->skin->getName());
                                break;
                        case 'desc':
-                               echo Entity::hsc($this->skin->getDescription());
+                               echo Entity::hsc($this->parser->skin->getDescription());
                                break;
                        case 'type':
-                               echo Entity::hsc($this->skin->getContentType());
+                               echo Entity::hsc($this->parser->skin->getContentType());
                                break;
                        case 'content':
-                               echo Entity::hsc($this->skin->getContentFromDB($sType));
+                               echo Entity::hsc($this->parser->skin->getContentFromDB($sType));
                                break;
                        case 'skintype':
                                $skinType = !array_key_exists($sType, $fNames) ? ucfirst($sType) : $fNames[$sType];
@@ -2686,7 +2661,7 @@ class AdminActions extends BaseActions
                                echo Entity::hsc($sType);
                                break;
                        case 'prefix':
-                               echo Entity::hsc($this->skin->getIncludePrefix());
+                               echo Entity::hsc($this->parser->skin->getIncludePrefix());
                                break;
                        case 'mode':
                                $incMode = $skin->getIncludeMode() ? _PARSER_INCMODE_SKINDIR : _PARSER_INCMODE_NORMAL;
@@ -2779,7 +2754,7 @@ class AdminActions extends BaseActions
                $template['tabindex'] = 10;
                
                $batch = new Batch('member');
-               $batch->showlist($query, 'table', $template, _LISTS_NOMORE, $templateName);
+               $batch->showList($query, 'table', $template, $templateName, _LISTS_NOMORE);
                return;
        }
        
@@ -3691,7 +3666,7 @@ class AdminActions extends BaseActions
         */
        public function parse_insertpluginfo($type)
        {
-               $option = Admin::$aOptions;
+               $option = Admin::getAdminaOption();
                switch ( $type )
                {
                        case 'id':
@@ -3721,6 +3696,7 @@ class AdminActions extends BaseActions
                {
                        $templates = Template::read($templateName);
                }
+               
                if ( !array_key_exists('INSERT_PLUGOPTION_TITLE', $templates) || empty($templates['INSERT_PLUGOPTION_TITLE']) )
                {
                        $template['title'] = "<tr>"
@@ -3731,6 +3707,7 @@ class AdminActions extends BaseActions
                {
                        $template['title'] = $templates['INSERT_PLUGOPTION_TITLE'];
                }
+               
                if ( !array_key_exists('INSERT_PLUGOPTION_BODY', $templates) || empty($templates['INSERT_PLUGOPTION_BODY']) )
                {
                        $template['body'] = "<tr>"
@@ -3777,7 +3754,7 @@ class AdminActions extends BaseActions
         */
        public function parse_insplugoptcontent()
        {
-               $option = Admin::$aOption;
+               $option = Admin::getAdminaOption();
                
                $meta = NucleusPlugin::getOptionMeta($option['typeinfo']);
                if ( array_key_exists('access', $meta) && $meta['access'] != 'hidden' )
@@ -3822,7 +3799,7 @@ class AdminActions extends BaseActions
         * @param       void
         * @return      void
         */
-       public function parse_itemnavlist()
+       public function parse_itemnavlist($templateName)
        {
                global $CONF, $manager, $member;
                
@@ -3900,34 +3877,20 @@ class AdminActions extends BaseActions
                        . " LIMIT {$start},{$amount}";
                
                $template['content'] = 'itemlist';
-               
+
                $navList = new Navlist($this->skintype, $start, $amount, 0, 1000, $blogid, $search, 0);
-               $navList->showBatchList('item', $query, 'table', $template);
+               $navList->showBatchList('item', $query, 'table', $template, '', $templateName);
                return;
        }
        
        /**
-        * AdminActions::parse_itemoptions()
-        * Parse skinvar itemoptions
-        * Adds the itemOptions of a plugin to a page
-        * @author TeRanEX
-        */
-       public function parse_itemoptions()
-       {
-               $this->parse_pluginoptions('item');
-               return;
-       }
-       
-       /**
-        * AdminActions::parse_itemoptions()
-        * 
+        * AdminActions::parse_itemtime()
         * date change on edit item
         * 
-        * Parse skinvar itemoptions
-        * Adds the itemOptions of a plugin to a page
-        * @author TeRanEX
+        * @param       string  $key    key of PHP's getDate()
+        * @return      void
         */
-       public function parse_itemtime($what)
+       public function parse_itemtime($key)
        {
                global $manager;
                
@@ -3957,7 +3920,7 @@ class AdminActions extends BaseActions
                        $manager->notify('PreAddItemForm', $data);
                }
                $itemtime = getdate($contents['timestamp']);
-               echo $itemtime[$what];
+               echo $itemtime[$key];
                return;
        }
        
@@ -4063,7 +4026,7 @@ class AdminActions extends BaseActions
         */
        public function parse_listplugplugoptionrow($templateName = '')
        {
-               echo listplug_plugOptionRow(Admin::$aOptions, $templateName);
+               echo listplug_plugOptionRow(Admin::getAdminaOption(), $templateName);
                return;
        }
        
@@ -4342,26 +4305,77 @@ class AdminActions extends BaseActions
         * @param       string  $type   type of plugin option
         * @return      void
         */
-       public function parse_pluginoptions($type = 'global')
+       public function parse_pluginoptions($context='global')
        {
-               global $itemid;
+               global $itemid, $manager;
                
-               switch ( $type )
+               switch ( $context )
                {
                        case 'member':
-                               $id = intRequestVar('memberid');
+                               $contextid = intRequestVar('memberid');
                                break;
                        case 'blog':
-                               $id = intRequestVar('blogid');
+                               $contextid = intRequestVar('blogid');
                                break;
                        case 'category':
-                               $id = intRequestVar('catid');
+                               $contextid = intRequestVar('catid');
                                break;
                        case 'item':
-                               $id = $itemid;
+                               $contextid = $itemid;
                                break;
                }
-               Admin::insertPluginOptions($type, $id);
+               
+               /* Actually registererd plugin options */
+               $aIdToValue = array();
+               $query = "SELECT oid, ovalue FROM %s WHERE ocontextid=%d;";
+               $query = sprintf($query, sql_table('plugin_option'), (integer) $contextid);
+               $res = DB::getResult($query);
+               foreach ( $res as $row )
+               {
+                       $aIdToValue[$row['oid']] = $row['ovalue'];
+               }
+               
+               /* Currently available plugin options */
+               $query  = "SELECT * FROM %s, %s WHERE opid=pid and ocontext= %s ORDER BY porder, oid ASC;";
+               $query  = sprintf($query, sql_table('plugin_option_desc'), sql_table('plugin'), DB::quoteValue($context));
+               $res    = DB::getResult($query);
+               
+               $options = array();
+               foreach ($res as $row )
+               {
+                       if ( !array_key_exists($row['oid'], $aIdToValue) )
+                       {
+                               $value = $row['odef'];
+                       }
+                       else
+                       {
+                               $value = $aIdToValue[$row['oid']];
+                       }
+                               
+                       $options[] = array(
+                               'pid'                   => $row['pid'],
+                               'pfile'                 => $row['pfile'],
+                               'oid'                   => $row['oid'],
+                               'value'                 => $value,
+                               'name'                  => $row['oname'],
+                               'description'   => $row['odesc'],
+                               'type'                  => $row['otype'],
+                               'typeinfo'              => $row['oextra'],
+                               'contextid'             => $contextid,
+                               'extra'                 => ''
+                       );
+               }
+               
+               $data = array(
+                       'context'       =>  $context,
+                       'contextid'     =>  $contextid,
+                       'options'       => &$opt4ions
+               );
+               $manager->notify('PrePluginOptionsEdit', $data);
+               
+               $content = $this->parser->skin->getContentFromDB('insertpluginoptions');
+               $this->parser->parse($content);
+               
                return;
        }
        
@@ -5611,7 +5625,7 @@ class AdminActions extends BaseActions
         * @param               $templateName
         * @param               $showlist
         */
-       private function input_yesno($name,
+       public function input_yesno($name,
                                                                $checkedval,
                                                                $tabindex        = 0,
                                                                $value1    = 1,
@@ -5727,4 +5741,275 @@ class AdminActions extends BaseActions
                $this->newPlugCandidates = $candidates;
                return (count($candidates) > 0);
        }
+       
+       /**
+        * AdminActions::pagehead()
+        * Output admin page head
+        * 
+        * @param       void
+        * @return      void
+        */
+       public function parse_pagehead()
+       {
+               global $member, $nucleus, $CONF, $manager;
+               
+               $content = $this->parser->skin->getContentFromDB('pagehead');
+               if ( !$content )
+               {
+                       $extrahead = Admin::$extrahead;
+                       $data = array(
+                               'extrahead'     => &$extrahead,
+                               'action'        =>  Admin::$action
+                       );
+                       $manager->notify('AdminPrePageHead', $data);
+                       
+                       $baseUrl = Entity::hsc($CONF['SkinsURL']);
+                       
+                       /*
+                        * TODO: obsoleted
+                       if ( !array_key_exists('AdminCSS', $CONF) )
+                       {
+                               DB::execute("INSERT INTO " . sql_table('config') . " VALUES ('AdminCSS', 'original')");
+                               $CONF['AdminCSS'] = 'original';
+                       }
+                       */
+                       
+                       /* HTTP 1.1 application for no caching */
+                       header("Cache-Control: no-cache, must-revalidate");
+                       header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
+                       
+                       $root_element = 'html';
+                       $charset = i18n::get_current_charset();
+                       $locale = preg_replace('#_#', '-', i18n::get_current_locale());
+                       $xml_version_info = self::$xml_version_info;
+                       $formal_public_identifier = self::$formal_public_identifier;
+                       $system_identifier = self::$system_identifier;
+                       $xhtml_namespace = self::$xhtml_namespace;
+                       
+                       echo "<?xml version=\"{$xml_version_info}\" encoding=\"{$charset}\" ?>\n";
+                       echo "<!DOCTYPE {$root_element} PUBLIC \"{$formal_public_identifier}\" \"{$system_identifier}\">\n";
+                       echo "<{$root_element} xmlns=\"{$xhtml_namespace}\" xml:lang=\"{$locale}\" lang=\"{$locale}\">\n";
+                       echo "<head>\n";
+                       echo '<title>' . Entity::hsc($CONF['SiteName']) . " - Admin</title>\n";
+                       /*
+                        * TODO: obsoleted
+                       echo "<link rel=\"stylesheet\" title=\"Nucleus Admin Default\" type=\"text/css\" href=\"{$baseUrl}admin/defaultadmin/styles/admin_{$CONF["AdminCSS"]}.css\" />\n";
+                       */
+                       echo "<link rel=\"stylesheet\" title=\"Nucleus Admin Default\" type=\"text/css\" href=\"{$baseUrl}admin/defaultadmin/styles/addedit.css\" />\n";
+                       echo "<script type=\"text/javascript\" src=\"{$baseUrl}javascripts/edit.js\"></script>\n";
+                       echo "<script type=\"text/javascript\" src=\"{$baseUrl}javascripts/admin.js\"></script>\n";
+                       echo "<script type=\"text/javascript\" src=\"{$baseUrl}javascripts/compatibility.js\"></script>\n";
+                       echo "{$extrahead}\n";
+                       echo "</head>\n\n";
+                       echo "<body>\n";
+                       echo "<div id=\"adminwrapper\">\n";
+                       echo "<div class=\"header\">\n";
+                       echo '<h1>' . Entity::hsc($CONF['SiteName']) . "</h1>\n";
+                       echo "</div>\n";
+                       echo "<div id=\"container\">\n";
+                       echo "<div id=\"content\">\n";
+                       echo "<div class=\"loginname\">\n";
+                       
+                       if ( !$member->isLoggedIn() )
+                       {
+                               echo '<a href="index.php?action=showlogin" title="Log in">' . _NOTLOGGEDIN . "</a><br />\n";
+                       }
+                       else
+                       {
+                               echo _LOGGEDINAS . ' ' . $member->getDisplayName() ." - <a href='index.php?action=logout'>" . _LOGOUT. "</a><br />\n";
+                               echo "<a href='index.php?action=overview'>" . _ADMINHOME . "</a> - ";
+                       }
+                       
+                       echo "<a href='".$CONF['IndexURL']."'>"._YOURSITE."</a><br />\n";
+                       echo '(';
+                       
+                       if ( !array_key_exists('codename', $nucleus) || empty($nucleus['codename']) )
+                       {
+                               $codenamestring = '';
+                       }
+                       else
+                       {
+                               $codenamestring = ' &quot;' . $nucleus['codename'].'&quot;';
+                       }
+                       
+                       if ( $member->isLoggedIn() && $member->isAdmin() )
+                       {
+                               $checkURL = sprintf(_ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_URL, getNucleusVersion(), getNucleusPatchLevel());
+                               echo '<a href="' . $checkURL . '" title="' . _ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_TITLE . '">Nucleus CMS ' . $nucleus['version'] . $codenamestring . '</a>';
+                               
+                               $newestVersion = getLatestVersion();
+                               $newestCompare = str_replace('/', '.', $newestVersion);
+                               $currentVersion = str_replace(array('/','v'), array('.',''), $nucleus['version']);
+                               
+                               if ( $newestVersion && version_compare($newestCompare, $currentVersion) > 0 )
+                               {
+                                       echo "<br />\n";
+                                       echo '<a style="color:red" href="http://nucleuscms.org/upgrade.php" title="' . _ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE . '">';
+                                       echo _ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT . $newestVersion;
+                                       echo "</a>";
+                               }
+                       }
+                       else
+                       {
+                               echo "Nucleus CMS {$nucleus['version']}{$codenamestring}";
+                       }
+                       echo ')';
+                       echo '</div>';
+               }
+               else
+               {
+                       $this->parser->parse($content);
+               }
+               
+               return;
+       }
+       
+       /**
+        * AdminActionss::pagefoot()
+        * Output admin page foot include quickmenu
+        * 
+        * @param       void
+        * @return      void
+        */
+       public function parse_pagefoot()
+       {
+               global $action, $member, $manager;
+               
+               $content = $this->parser->skin->getContentFromDB('pagefoot');
+               if ( !$content )
+               {
+                       $data = array(
+                               'action' => self::$action
+                       );
+                       $manager->notify('AdminPrePageFoot', $data);
+                       
+                       if ( $member->isLoggedIn() && ($action != 'showlogin') )
+                       {
+                               echo '<h2>' . _LOGOUT . "</h2>\n";
+                               echo "<ul>\n";
+                               echo '<li><a href="index.php?action=overview">' . _BACKHOME . "</a></li>\n";
+                               echo '<li><a href="index.php?action=logout">' .  _LOGOUT . "</a></li>\n";
+                               echo "</ul>\n";
+                       }
+                       
+                       echo "<div class=\"foot\">\n";
+                       echo '<a href="' . _ADMINPAGEFOOT_OFFICIALURL . '">Nucleus CMS</a> &copy; 2002-' . date('Y') . ' ' . _ADMINPAGEFOOT_COPYRIGHT;
+                       echo '-';
+                       echo '<a href="' . _ADMINPAGEFOOT_DONATEURL . '">' . _ADMINPAGEFOOT_DONATE . "</a>\n";
+                       echo "</div>\n";
+                       
+                       echo "<div id=\"quickmenu\">\n";
+                       
+                       if ( ($action != 'showlogin') && ($member->isLoggedIn()) )
+                       {
+                               echo "<ul>\n";
+                               echo '<li><a href="index.php?action=overview">' . _QMENU_HOME . "</a></li>\n";
+                               echo "</ul>\n";
+                               
+                               echo '<h2>' . _QMENU_ADD . "</h2>\n";
+                               echo "<form method=\"get\" action=\"index.php\">\n";
+                               echo "<p>\n";
+                               echo "<input type=\"hidden\" name=\"action\" value=\"createitem\" />\n";
+                               
+                               $showAll = requestVar('showall');
+                               
+                               if ( ($member->isAdmin()) && ($showAll == 'yes') )
+                               {
+                                       // Super-Admins have access to all blogs! (no add item support though)
+                                       $query = "SELECT bnumber as value, bname as text FROM %s ORDER BY bname;";
+                                       $query = sprintf($query, sql_table('blog'));
+                               }
+                               else
+                               {
+                                       $query = "SELECT bnumber as value, bname as text FROM %s, %s WHERE tblog=bnumber and tmember=%d ORDER BY bname;";
+                                       $query = sprintf($query, sql_table('blog'), sql_table('team'), (integer) $member->getID());
+                               }
+                               $template['name']               = 'blogid';
+                               $template['tabindex']   = 15000;
+                               $template['extra']              = _QMENU_ADD_SELECT;
+                               $template['selected']   = -1;
+                               $template['shorten']    = 10;
+                               $template['shortenel']  = '';
+                               $template['javascript'] = 'onchange="return form.submit()"';
+                               showlist($query, 'select', $template);
+                               
+                               echo "</p>\n";
+                               echo "</form>\n";
+                               
+                               echo "<h2>{$member->getDisplayName()}</h2>\n";
+                               echo "<ul>\n";
+                               echo '<li><a href="index.php?action=editmembersettings">' . _QMENU_USER_SETTINGS . "</a></li>\n";
+                               echo '<li><a href="index.php?action=browseownitems">' . _QMENU_USER_ITEMS . "</a></li>\n";
+                               echo '<li><a href="index.php?action=browseowncomments">' . _QMENU_USER_COMMENTS . "</a></li>\n";
+                               echo "</ul>\n";
+                               
+                               if ( $member->isAdmin() )
+                               {
+                                       echo '<h2>' . _QMENU_MANAGE . "</h2>\n";
+                                       echo "<ul>\n";
+                                       echo '<li><a href="index.php?action=actionlog">' . _QMENU_MANAGE_LOG . "</a></li>\n";
+                                       echo '<li><a href="index.php?action=settingsedit">' . _QMENU_MANAGE_SETTINGS . "</a></li>\n";
+                                       echo '<li><a href="index.php?action=systemoverview">' . _QMENU_MANAGE_SYSTEM . "</a></li>\n";
+                                       echo '<li><a href="index.php?action=usermanagement">' . _QMENU_MANAGE_MEMBERS . "</a></li>\n";
+                                       echo '<li><a href="index.php?action=createnewlog">' . _QMENU_MANAGE_NEWBLOG . "</a></li>\n";
+                                       echo '<li><a href="index.php?action=backupoverview">' . _QMENU_MANAGE_BACKUPS . "</a></li>\n";
+                                       echo '<li><a href="index.php?action=pluginlist">' . _QMENU_MANAGE_PLUGINS . "</a></li>\n";
+                                       echo "</ul>\n";
+                                       
+                                       echo "<h2>" . _QMENU_LAYOUT . "</h2>\n";
+                                       echo "<ul>\n";
+                                       echo '<li><a href="index.php?action=skinoverview">' . _QMENU_LAYOUT_SKINS . "</a></li>\n";
+                                       echo '<li><a href="index.php?action=templateoverview">' . _QMENU_LAYOUT_TEMPL . "</a></li>\n";
+                                       echo '<li><a href="index.php?action=skinieoverview">' . _QMENU_LAYOUT_IEXPORT . "</a></li>\n";
+                                       echo "</ul>\n";
+                               }
+                               
+                               $data = array('options' => array());
+                               
+                               $manager->notify('QuickMenu', $data);
+                               
+                               if ( count($data['options']) > 0 )
+                               {
+                                       echo "<h2>" . _QMENU_PLUGINS . "</h2>\n";
+                                       echo "<ul>\n";
+                                       foreach ( $data['options'] as $option )
+                                       {
+                                               echo '<li><a href="' . Entity::hsc($option['url']) . '" title="' . Entity::hsc($option['tooltip']) . '">' . Entity::hsc($option['title']) . "</a></li>\n";
+                                       }
+                                       echo "</ul>\n";
+                               }
+                       }
+                       else if ( ($action == 'activate') || ($action == 'activatesetpwd') )
+                       {
+                       
+                               echo '<h2>' . _QMENU_ACTIVATE . '</h2>' . _QMENU_ACTIVATE_TEXT;
+                       }
+                       else
+                       {
+                               echo '<h2>' . _QMENU_INTRO . '</h2>' . _QMENU_INTRO_TEXT;
+                       }
+                       
+                       echo "<!-- quickmenu -->\n";
+                       echo "</div>\n";
+                       
+                       echo "<!-- content -->\n";
+                       echo "</div>\n";
+                       
+                       echo "<!-- container -->\n";
+                       echo "</div>\n";
+                       
+                       echo "<!-- adminwrapper -->\n";
+                       echo "</div>\n";
+                       
+                       echo "</body>\n";
+                       echo "</html>\n";
+               }
+               else
+               {
+                       $this->parser->skin->parse('pagefoot');
+                       exit;
+               }
+               
+               return;
+       }
 }