phpDocumentor pond
[ class tree: pond ] [ index: pond ] [ all elements ]

Source for file _async.inc.php

Documentation is available at _async.inc.php

  1. <?php
  2. /**
  3.  * This is the handler/dispatcher for asynchronous calls (both AJax calls and HTTP GET fallbacks)
  4.  *
  5.  * This file is part of Quam Plures - {@link http://quamplures.net/}
  6.  * See also {@link https://launchpad.net/quam-plures}.
  7.  *
  8.  * @copyright (c) 2009 - 2011 by the Quam Plures developers - {@link http://quamplures.net/}
  9.  * @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}
  10.  *
  11.  *  {@internal License choice
  12.  *  - If you have received this file as part of a package, please find the license.txt file in
  13.  *    the same folder or the closest folder above for complete license terms.
  14.  *  - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  15.  *    then you must choose one of the following licenses before using the file:
  16.  *    - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  17.  *    - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  18.  *  }}}
  19.  *
  20.  *  {@internal Open Source relicensing agreement:
  21.  *  }}}
  22.  *
  23.  * @package pond
  24.  */
  25. if!defined('QP_MAIN_INIT') ) die'Please, do not access this page directly.' );
  26.  
  27. param'collapse''string''' );
  28. if!empty$collapse ) )
  29. {    // We want to record a 'collapse' value:
  30.     $set_status 'collapsed';
  31.     $set_target $collapse;
  32. }
  33. param'expand''string''' );
  34. if!empty$expand ) )
  35. {    // We want to record an 'expand' value:
  36.     $set_status 'expanded';
  37.     $set_target $expand;
  38. }
  39.  
  40. if!empty($set_target) )
  41. {
  42.     ifpreg_match'/_(filters|colselect)$/'$set_target) )
  43.     {    // accept all _filters and _colselect open/close requests!
  44.         // We have a valid value:
  45.         $Session->set$set_target$set_status );
  46.     }
  47.     else
  48.     {    // Warning: you may not see this on AJAX calls
  49.         echo'Cannot ['.$set_status.'] unknown param ['.$set_target.']' );
  50.     }
  51. }
  52.  
  53. ?>