-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathplugins.php
More file actions
166 lines (94 loc) · 4.33 KB
/
plugins.php
File metadata and controls
166 lines (94 loc) · 4.33 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php
/*
* Copyright 2014-2026 GPLv3, Open Crypto Tracker by Mike Kilday: Mike@DragonFrugal.com (leave this copyright / attribution intact in ALL forks / copies!)
*/
// Runtime mode
$runtime_mode = 'ui';
$is_plugin = true;
require("app-lib/php/init.php");
// If an activated password reset is in progress or no admin login has been set yet, prompt user to create an admin user / pass
if ( $password_reset_approved || !is_array($stored_admin_login) ) {
require("templates/interface/php/admin/admin-login/register.php");
exit;
}
else {
require("templates/interface/php/wrap/header.php");
}
// Page mode
if (
isset($_GET['plugin'])
&& trim($_GET['plugin']) != ''
&& isset($plug['activated']['ui'][ $_GET['plugin'] ])
&& $plug['conf'][ $_GET['plugin'] ]['ui_location'] == 'nav_menu_page'
) {
$this_plug = $_GET['plugin'];
?>
<div class=''>
<h2 class='bitcoin page_title'><?=$plug['conf'][$this_plug]['ui_name']?></h2>
<div class='full_width_wrapper'>
<div class='align_left' style='margin-top: 0.5em; margin-bottom: 2em;'>
<div style='display: inline;'>
<br /> <span class='blue' style='font-weight: bold;'>App Reload:</span> <select title='Auto-Refresh MAY NOT WORK properly on mobile devices (phone / laptop / tablet / etc), or inactive tabs.' class='browser-default custom-select select_auto_refresh' name='select_auto_refresh' onchange='
auto_reload(this);
'>
<option value='0'> Manually </option>
<option value='300'> 5 Minutes </option>
<option value='600'> 10 Minutes </option>
<option value='900'> 15 Minutes </option>
<option value='1800'> 30 Minutes </option>
</select>
</div>
<span class='reload_notice red'></span>
</div>
<?php
// This plugin's plug-init.php file (runs the plugin)
include($plug['activated']['ui'][$this_plug]);
?>
</div>
</div>
<script>
// Highlight corresponding sidebar menu entry AFTER 3 SECONDS (for any core DOM manipulation to complete first)
setTimeout(function(){
$('a[nav-menu-page-id="<?=$this_plug?>"]').addClass("active");
}, 3000);
</script>
<?php
unset($this_plug);
}
// Tab mode
else {
foreach ( $plug['activated']['ui'] as $plugin_key => $plugin_init ) {
$this_plug = $plugin_key;
if ( $plug['conf'][$this_plug]['ui_location'] == 'nav_menu_tab' ) {
?>
<div id='plugin_<?=$this_plug?>' class='tabdiv'>
<h2 class='bitcoin page_title'><?=$plug['conf'][$this_plug]['ui_name']?></h2>
<div class='full_width_wrapper'>
<div class='align_left' style='margin-top: 0.5em; margin-bottom: 2em;'>
<div style='display: inline;'><?=$ct['gen']->start_page_html('plugin_' . $this_plug)?></div>
<span class='blue' style='font-weight: bold;'>App Reload:</span> <select title='Auto-Refresh MAY NOT WORK properly on mobile devices (phone / laptop / tablet / etc), or inactive tabs.' class='browser-default custom-select select_auto_refresh' name='select_auto_refresh' onchange='
auto_reload(this);
'>
<option value='0'> Manually </option>
<option value='300'> 5 Minutes </option>
<option value='600'> 10 Minutes </option>
<option value='900'> 15 Minutes </option>
<option value='1800'> 30 Minutes </option>
</select>
<span class='reload_notice red'></span>
</div>
<?php
// This plugin's plug-init.php file (runs the plugin)
include($plugin_init);
?>
</div>
</div>
<?php
}
// Reset $this_plug at end of loop
unset($this_plug);
}
}
require("templates/interface/php/wrap/footer.php");
// DON'T LEAVE ANY WHITESPACE AFTER THE CLOSING PHP TAG!
?>