Multimag  0.2.992
sites.php
См. документацию.
1 <?php
2 
3 // MultiMag v0.2 - Complex sales system
4 //
5 // Copyright (C) 2005-2018, BlackLight, TND Team, http://tndproject.org
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
16 //
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 
20 namespace modules\admin;
21 
23 class sites extends \IModule {
24 
25  public function __construct() {
26  parent::__construct();
27  $this->acl_object_name = 'admin.sites';
28  }
29 
30  public function getName() {
31  return 'Администрирование сайтов';
32  }
33 
34  public function getDescription() {
35  return 'Модуль для управления параметрами сайтов.';
36  }
37 
38  public function run() {
39  global $tmpl, $db;
40  $tmpl->addBreadcrumb($this->getName(), $this->link_prefix);
41  $sect = request('sect');
42  switch ($sect) {
43  case '':
44  $editor = new \ListEditors\SitesEditor($db);
45  $editor->line_var_name = 'id';
46  $editor->link_prefix = $this->link_prefix . '&sect=' . $sect;
47  $editor->acl_object_name = $this->acl_object_name;
48  $editor->run();
49  break;
50  default:
51  throw new \NotFoundException("Секция не найдена");
52  }
53  }
54 
55 }
$module link_prefix
Definition: news.php:24
request($varname, $def='')
Definition: core.php:190
$acl_object_name
Definition: imodule.php:23
Базовый класс для модулей
Definition: imodule.php:21
Администрирование сайтов
Definition: sites.php:23
$db
$tmpl