-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_config.php
87 lines (64 loc) · 1.67 KB
/
admin_config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
require_once("../../class2.php");
if ( ! getperms("P")) {
e107::redirect('admin');
exit;
}
e107::lan('livetime', 'admin', true);
class livetime_admin extends e_admin_dispatcher
{
protected $modes = [
'main' => [
'controller' => 'livetime_admin_ui',
'path' => null,
'ui' => 'livetime_admin_form_ui',
'uipath' => null,
],
];
protected $adminMenu = [
'main/prefs' => ['caption' => 'Settings', 'perm' => '0'],
];
protected $menuTitle = 'LiveTime';
}
class livetime_admin_ui extends e_admin_ui
{
protected $pluginTitle = "LiveTime";
protected $pluginName = 'livetime';
protected $prefs = [
'livetime_active' => [
'title' => 'Activate',
'type' => 'boolean',
'data' => 'int'
],
'global_libs' => [
'title' => 'Use global paths for libs.',
'type' => 'boolean',
'data' => 'int'
]
];
public function init()
{
}
public function renderHelp()
{
$caption = LAN_LIVETIME_INFO_MENU_TITLE;
$text = LAN_LIVETIME_INFO_MENU_LOGO;
$text .= LAN_LIVETIME_INFO_MENU_SUBTITLE;
$text .= LAN_LIVETIME_INFO_MENU_REPO_URL;
$text .= LAN_LIVETIME_INFO_MENU_REPO_BUTTON_WATCH;
$text .= LAN_LIVETIME_INFO_MENU_REPO_BUTTON_STAR;
$text .= LAN_LIVETIME_INFO_MENU_REPO_BUTTON_ISSUE;
$text .= LAN_LIVETIME_INFO_MENU_SUBTITLE_DEV;
$text .= LAN_LIVETIME_INFO_MENU_DEV;
$text .= LAN_LIVETIME_INFO_MENU_REPO_BUTTON_FOLLOW;
$text .= LAN_LIVETIME_INFO_MENU_GITHUB_BUTTONS_SCRIPT;
return ['caption' => $caption, 'text' => $text];
}
}
class livetime_admin_form_ui extends e_admin_form_ui
{
}
new livetime_admin();
require_once(e_ADMIN . "auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN . "footer.php");