-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin_config.php
More file actions
102 lines (73 loc) · 2.35 KB
/
Copy pathadmin_config.php
File metadata and controls
102 lines (73 loc) · 2.35 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
/**
* Falling Snow plugin for CMS e107 v2
*
* @author OxigenO2 (oxigen.rg@gmail.com)
* @copyright Copyright (C) 2017 OxigenO2
* @license GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* @link https://github.com/oxigeno2/falling_snow/
*/
require_once('../../class2.php');
if (!getperms('P'))
{
e107::redirect('admin');
exit;
}
e107::lan('falling_snow',true,true);
class falling_snow_adminArea extends e_admin_dispatcher
{
protected $modes = array(
'main' => array(
'controller' => 'falling_snow_ui',
'path' => null,
'ui' => 'falling_snow_form_ui',
'uipath' => null
),
);
protected $adminMenu = array(
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => 'P'),
// 'main/custom' => array('caption'=> 'Custom Page', 'perm' => 'P')
);
protected $adminMenuAliases = array(
'main/edit' => 'main/list'
);
protected $menuTitle = LAN_SNOW_NAME;
}
class falling_snow_ui extends e_admin_ui
{
protected $pluginTitle = LAN_SNOW_NAME;
protected $pluginName = 'falling_snow';
protected $fields = NULL;
protected $fieldpref = array();
protected $prefs = array(
'snow_on' => array('title'=> LAN_SNOW_ON, 'tab'=>0, 'type'=>'boolean', 'data' => 'str'),
'snow_minsize' => array('title'=> LAN_SNOW_MINSIZE, 'tab'=>0, 'type'=>'number', 'data' => 'str', 'help'=>LAN_SNOW_HELP_MINSIZE),
'snow_maxsize' => array('title'=> LAN_SNOW_MAXSIZE, 'tab'=>0, 'type'=>'number', 'data' => 'str', 'help'=>LAN_SNOW_HELP_MAXSIZE),
'snow_newon' => array('title'=> LAN_SNOW_NEWON, 'tab'=>0, 'type'=>'number', 'data' => 'str', 'help'=>LAN_SNOW_HELP_NEWON),
'snow_color' => array('title'=> LAN_SNOW_COLOR, 'tab'=>0, 'type'=>'text', 'data' => 'str', 'writeParms' => array('class' => 'cpicker'), 'help'=>LAN_SNOW_HELP_COLOR),
);
/*
public function renderHelp()
{
$caption = LAN_HELP;
$text = 'Some help text';
return array('caption'=>$caption,'text'=> $text);
}
// optional - a custom page.
public function customPage()
{
$text = 'Hello World!';
$otherField = $this->getController()->getFieldVar('other_field_name');
return $text;
}
*/
}
class falling_snow_form_ui extends e_admin_form_ui
{
}
new falling_snow_adminArea();
require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;
?>