@@ -185,7 +185,7 @@ function intropage_action_settings() {
185
185
}
186
186
187
187
function intropage_actions () {
188
- global $ login_opts , $ config ;
188
+ global $ callbackPage , $ redirectPage , $ config ;
189
189
190
190
$ actionvar = get_filter_request_var ('intropage_action ' , FILTER_VALIDATE_REGEXP , array ('options ' => array ('regexp ' => '/^([a-z0-9_-]+)$/ ' )));
191
191
@@ -243,11 +243,7 @@ function intropage_actions() {
243
243
244
244
raise_message ('dashboard_removed ' , __ ('Dashboard has been removed ' , 'intropage ' ), MESSAGE_LEVEL_INFO );
245
245
246
- if ($ login_opts == 4 ) {
247
- header ('Location: ' . html_escape ($ config ['url_path ' ]) . 'plugins/intropage/intropage.php?header=false&dashboard_id= ' . $ dashboard_id );
248
- } else {
249
- header ('Location: ' . html_escape ($ config ['url_path ' ]) . 'index.php?header=false&dashboard_id= ' . $ dashboard_id );
250
- }
246
+ header ('Location: ' . html_escape ("$ redirectPage?header=false&dashboard_id= $ dashboard_id " ));
251
247
252
248
exit ;
253
249
}
@@ -267,11 +263,7 @@ function intropage_actions() {
267
263
268
264
raise_message ('dashboard_added ' , __ ('Dashboard has been added ' , 'intropage ' ), MESSAGE_LEVEL_INFO );
269
265
270
- if ($ login_opts == 4 ) {
271
- header ('Location: ' . html_escape ($ config ['url_path ' ]) . 'plugins/intropage/intropage.php?header=false&dashboard_id= ' . $ dashboard_id );
272
- } else {
273
- header ('Location: ' . html_escape ($ config ['url_path ' ]) . 'index.php?header=false&dashboard_id= ' . $ dashboard_id );
274
- }
266
+ header ('Location: ' . html_escape ("$ recirectPage?header=false&dashboard_id= $ dashboard_id " ));
275
267
276
268
exit ;
277
269
}
@@ -492,11 +484,7 @@ function intropage_actions() {
492
484
493
485
raise_message ('dashboard_added ' , __ ('Dashboard has been added, please wait few poller cycle for data ' , 'intropage ' ), MESSAGE_LEVEL_INFO );
494
486
495
- if ($ login_opts == 4 ) {
496
- header ('Location: ' . html_escape ($ config ['url_path ' ]) . 'plugins/intropage/intropage.php?header=false&dashboard_id= ' . $ new_dashboard_id );
497
- } else {
498
- header ('Location: ' . html_escape ($ config ['url_path ' ]) . 'index.php?header=false&dashboard_id= ' . $ new_dashboard_id );
499
- }
487
+ header ('Location: ' . html_escape ("$ redirectPage?header=false&dashboard_id= $ new_dashboard_id " ));
500
488
501
489
exit ;
502
490
@@ -509,7 +497,7 @@ function intropage_actions() {
509
497
}
510
498
511
499
function intropage_actions_timespan () {
512
- global $ login_opts , $ config ;
500
+ global $ config ;
513
501
514
502
$ actionvar = get_filter_request_var ('intropage_action_timespan ' , FILTER_VALIDATE_REGEXP , array ('options ' => array ('regexp ' => '/^([a-z0-9_-]+)$/ ' )));
515
503
@@ -1706,7 +1694,7 @@ function ntp_time($host) {
1706
1694
return ($ timestamp );
1707
1695
}
1708
1696
function intropage_graph_button ($ data ) {
1709
- global $ config , $ login_opts ;
1697
+ global $ config , $ callbackPage , $ redirectPage ;
1710
1698
1711
1699
if (is_panel_allowed ('favourite_graph ' )) {
1712
1700
$ local_graph_id = $ data [1 ]['local_graph_id ' ];
@@ -1732,11 +1720,7 @@ function intropage_graph_button($data) {
1732
1720
}
1733
1721
}
1734
1722
1735
- if ($ login_opts == 4 ) {
1736
- print '<a class="iconLink" href=" ' . html_escape ($ config ['url_path ' ]) . 'plugins/intropage/intropage.php?intropage_action=favgraph&graph_id= ' . $ local_graph_id . '"> ' . $ fav . '</a><br/> ' ;
1737
- } else {
1738
- print '<a class="iconLink" href=" ' . html_escape ($ config ['url_path ' ]) . 'index.php?intropage_action=favgraph&graph_id= ' . $ local_graph_id . '"> ' . $ fav . '</a><br/> ' ;
1739
- }
1723
+ print '<a class="iconLink" href=" ' . html_escape ("$ redirectPage?intropage_action=favgraph&graph_id= $ local_graph_id " ) . '"> ' . $ fav . '</a><br/> ' ;
1740
1724
}
1741
1725
}
1742
1726
@@ -1763,7 +1747,7 @@ function get_login_opts($refresh = false) {
1763
1747
}
1764
1748
1765
1749
function intropage_configure_panel () {
1766
- global $ config , $ login_opts , $ trend_timespans , $ intropage_intervals ;
1750
+ global $ config , $ callbackPage , $ redirectPage , $ trend_timespans , $ intropage_intervals ;
1767
1751
1768
1752
$ dashboards = array_rekey (
1769
1753
db_fetch_assoc_prepared ('SELECT dashboard_id, name
@@ -1776,13 +1760,7 @@ function intropage_configure_panel() {
1776
1760
1777
1761
print '<div> ' ;
1778
1762
1779
- if ($ login_opts == 4 ) {
1780
- $ pageName = $ config ['url_path ' ] . 'plugins/intropage/intropage.php ' ;
1781
- } else {
1782
- $ pageName = 'index.php ' ;
1783
- }
1784
-
1785
- form_start ($ pageName );
1763
+ form_start ($ callbackPage );
1786
1764
1787
1765
html_start_box (__ ('Dashboard Names ' , 'intropage ' ), '100% ' , '' , '3 ' , 'center ' , '' );
1788
1766
@@ -1949,7 +1927,7 @@ function intropage_configure_panel() {
1949
1927
1950
1928
form_hidden_box ('save_settings ' , 0 , 1 );
1951
1929
1952
- form_save_button ($ pageName , 'save ' );
1930
+ form_save_button ($ callbackPage , 'save ' );
1953
1931
1954
1932
form_end ();
1955
1933
0 commit comments