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
|
<?php
/**
* This is the handler/dispatcher for asynchronous calls (both AJax calls and HTTP GET fallbacks)
*
* This file is part of Quam Plures - {@link http://quamplures.net/}
* See also {@link https://launchpad.net/quam-plures}.
*
* @copyright (c) 2009 - 2011 by the Quam Plures developers - {@link http://quamplures.net/}
* @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}
*
* {@internal License choice
* - If you have received this file as part of a package, please find the license.txt file in
* the same folder or the closest folder above for complete license terms.
* - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
* then you must choose one of the following licenses before using the file:
* - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
* - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
* }}
*
* {@internal Open Source relicensing agreement:
* }}
*
* @package pond
*/
if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
param( 'collapse', 'string', '' );
if( !empty( $collapse ) )
{ // We want to record a 'collapse' value:
$set_status = 'collapsed';
$set_target = $collapse;
}
param( 'expand', 'string', '' );
if( !empty( $expand ) )
{ // We want to record an 'expand' value:
$set_status = 'expanded';
$set_target = $expand;
}
if( !empty($set_target) )
{
if( preg_match( '/_(filters|colselect)$/', $set_target) )
{ // accept all _filters and _colselect open/close requests!
// We have a valid value:
$Session->set( $set_target, $set_status );
}
else
{ // Warning: you may not see this on AJAX calls
echo( 'Cannot ['.$set_status.'] unknown param ['.$set_target.']' );
}
}
?>
|