fisheye
[ class tree: fisheye ] [ index: fisheye ] [ all elements ]

Source for file main.php

Documentation is available at main.php

  1. <?php
  2. /**
  3. * Gallery2 Remote support for fisheye
  4. *
  5. @package  fisheye
  6. @version  $Header$
  7. @author   spider <spider@steelsun.com>
  8. @author   tylerbello <tylerbello@gmail.com>
  9. */
  10.  
  11. // +----------------------------------------------------------------------+
  12. // | Copyright (c) 2004, bitweaver.org
  13. // +----------------------------------------------------------------------+
  14. // | All Rights Reserved. See below for details and a complete list of authors.
  15. // | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
  16. // |
  17. // | For comments, please use phpdocu.sourceforge.net documentation standards!!!
  18. // | -> see http://phpdocu.sourceforge.net/
  19. // +----------------------------------------------------------------------+
  20. // | Authors: spider <spider@steelsun.com>
  21. // +----------------------------------------------------------------------+
  22.  
  23. chdirdirname__FILE__ ) );
  24. /**
  25.  * Setup
  26.  */
  27. require_once'../kernel/setup_inc.php' );
  28.  
  29. //Point of access for FisheyeRemote requests
  30. require_once'FisheyeRemote.php' );
  31. require_onceFISHEYE_PKG_PATH.'FisheyeGallery.php' );
  32.  
  33. $gFisheyeRemote new FisheyeRemote();
  34.  
  35. // Fisheye allows directories to below to multiple parents - not in gallery. This confuses some clients
  36. // We pad with a random number for uniqueness
  37. foreacharray'g2_itemId''set_albumName' as $key {
  38.     if!empty$_POST['g2_form'][$key&& $_POST['g2_form'][$key{
  39.         $_POST['g2_form'][$keysubstr$_POST['g2_form'][$key]0(strlen$_POST['g2_form'][$key2) );
  40.     }
  41.     if!empty$_GET['g2_form'][$key&& $_GET['g2_form'][$key{
  42.         $_GET['g2_form'][$keysubstr$_GET['g2_form'][$key]0(strlen$_GET['g2_form'][$key2) );
  43.     }
  44.     if!empty$_REQUEST[$key&& $_REQUEST[$key{
  45.         $_REQUEST[$keysubstr$_REQUEST[$key]0(strlen$_REQUEST[$key2) );
  46.     }
  47. }
  48.  
  49. if!empty$_REQUEST['g2_form') ){
  50.     $gFisheyeRemote->processRequest( (!empty$_GET['g2_form'$_GET['g2_form'array())(!empty$_POST['g2_form'$_POST['g2_form'array()) );
  51. elseif!empty$_REQUEST['g2_itemId') ) {
  52.     //If we don't have g2_form, they must be asking the gallery to be opened upon export completion
  53.     $gallery new FisheyeGallery();
  54.     $gallery $gallery->lookup(array('content_id' => $_REQUEST['g2_itemId'));
  55.     bit_redirect$gallery->getDisplayUrl() );
  56. }
  57.  
  58.  
  59. ?>

Documentation generated on Wed, 29 Jul 2015 13:57:04 +0000 by phpDocumentor 1.5.0-lsces