root/downloadDatabase/files/lib/acp/page/DownloadDBKatListPage.class.php @ 402

Revision 402, 1.7 kB (checked in by Tatzelwurm, 5 years ago)
Line 
1<?php
2require_once(WCF_DIR.'lib/page/AbstractPage.class.php');
3
4/**
5 * Download Database Admin Control Panel.
6 * Listet alle Kategorien und Subkategorien auf.
7 * (Sub-)Kategorien können hinzugefügt, bearbeitet und gelöscht werden.
8 *
9 * @author              Robert "Tatzelwurm" Hempel
10 * @copyright   2007/2008 INSIDE das Hörspiel
11 * @license     GNU LGPL http://www.gnu.org/licenses/lgpl.txt
12 * @package             de.inside.wcf.downloaddb
13 */
14
15class DownloadDBKatListPage extends AbstractPage {
16
17        public $templateName = 'downloadDBKatList';
18        public $activeMenuItem = 'wcf.acp.menu.link.content.dldb';
19        public $neededPermissions = 'admin.dldb.canChangeOptions';
20       
21        public $kategorien = array();
22        private $deletedkatID = 0;
23       
24        public function readParameters() {
25                parent::readParameters();
26                if (isset($_REQUEST['action'])) $this->action = escapeString($_REQUEST['action']);
27                // detect Kat deletion
28                if (isset($_REQUEST['deletedkatID'])) {
29                        $this->deletedkatID = intval($_REQUEST['deletedkatID']);
30                }
31                WCF::getCache()->addResource('dldbKat',
32                        WCF_DIR.'cache/cache.dldbKat.php',
33                        WCF_DIR.'lib/system/cache/CacheBuilderDLDBKat.class.php');
34        }
35       
36        public function readData() {
37                parent::readData();
38                // Cache lesen
39                $this->kategorien = WCF::getCache()->get('dldbKat');
40        }
41       
42        public function assignVariables() {
43                parent::assignVariables();
44
45                WCF::getTPL()->assign(array(
46                        'kategorien' => $this->kategorien,
47                        'deletedkatID' => $this->deletedkatID,
48                ));
49        }
50       
51        public function show() {
52                // enable menu item
53                WCFACP::getMenu()->setActiveMenuItem($this->activeMenuItem);
54
55                // check permission
56                WCF::getUser()->checkPermission($this->neededPermissions);
57               
58                parent::show();
59        }
60       
61}
62?>
Note: See TracBrowser for help on using the browser.