-
Notifications
You must be signed in to change notification settings - Fork 39
/
toggle_fold_panel.php
40 lines (28 loc) · 1.05 KB
/
toggle_fold_panel.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
<?php
// Purpose set s_xyz_panels[][2]["open"|"close"] and redirect to $HTTP_REFERER
// Author Lutz Brueckner <irie@gmx.de>
// Copyright (c) 2000-2006 by Lutz Brueckner,
// published under the terms of the GNU General Public Licence v.2,
// see file LICENCE for details
// GET-Parameter: $p index of panel to open/close
// $d the string "open" or "close"
include './inc/configuration.inc.php';
include './inc/session.inc.php';
session_start();
localize_session_vars();
include './lang/'.(isset($s_cust) ? $s_cust['language'] : LANGUAGE).'.inc.php';
include './inc/functions.inc.php';
// some browsers may fail with the dynamically inserted html
if (!isset($_GET['p'])) {
redirect(url_session($s_referer));
}
$p = $_GET['p'];
$d = $_GET['d'];
//calculate the panel name
$pvar = 's_'.strtolower($_SESSION['s_page']).'_panels';
if ($d == 'open' || $d == 'close') {
${$pvar}[$p][2] = $d;
}
set_customize_cookie($s_cust);
globalize_session_vars();
redirect(url_session($s_referer));