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

Source for file upload.php

Documentation is available at upload.php

  1. <?php
  2. /**
  3.  * @package fisheye
  4.  * @subpackage functions
  5.  */
  6.  
  7. /**
  8.  * required setup
  9.  */
  10. require_once'../kernel/setup_inc.php' );
  11.  
  12. require_onceFISHEYE_PKG_PATH.'FisheyeGallery.php');
  13. require_onceFISHEYE_PKG_PATH.'FisheyeImage.php');
  14.  
  15. global $gBitSystem;
  16. global $fisheyeErrors$fisheyeWarnings$fisheyeSuccess$gFisheyeUploads;
  17.  
  18. include_onceFISHEYE_PKG_PATH.'gallery_lookup_inc.php' );
  19. require_onceFISHEYE_PKG_PATH.'upload_inc.php');
  20.  
  21. $gBitSystem->verifyPermission'p_fisheye_upload' );
  22.  
  23. if!empty$_FILES ) ) {
  24.     $upErrors fisheye_handle_upload$_FILES );
  25.     ifempty$upErrors ) ) {
  26.         bit_redirect$gContent->getDisplayUrl() );
  27.     else {
  28.         $gBitSmarty->assign'errors'$upErrors );
  29.     }
  30. }
  31.  
  32. if !empty($_REQUEST['on_complete'])){
  33.     if($_REQUEST['on_complete'== 'refreshparent'){
  34.         $gBitSmarty->assign('onComplete','window.opener.location.reload(true);self.close();');
  35.     }
  36.  
  37. }
  38.  
  39. require_onceLIBERTY_PKG_PATH.'calculate_max_upload_inc.php' );
  40.  
  41. $gContent->invokeServices'content_edit_function' );
  42.  
  43. // Get a list of all existing galleries
  44. $gFisheyeGallery new FisheyeGallery();
  45. $getHash array(
  46.     'user_id'       => $gBitUser->mUserId,
  47. );
  48. // modify listHash according to global preferences
  49. if$gBitSystem->isFeatureActive'fisheye_show_all_to_admins' && $gBitUser->hasPermission'p_fisheye_admin' ) ) {
  50.     unset$getHash['user_id');
  51. elseif$gBitSystem->isFeatureActive'fisheye_show_public_on_upload' ) ) {
  52. //    $getHash['show_public'] = TRUE; THis should be handled with a content_status, disabled for now
  53. }
  54.  
  55. $galleryTree $gContent->generateList$getHash,  array'name' => "gallery_id"'id' => "gallerylist"'item_attributes' => array'class'=>'listingtitle')'radio_checkbox' => TRUE)true );
  56.  
  57. $gBitSmarty->assign_by_ref'galleryTree'$galleryTree );
  58.  
  59. if$gLibertySystem->hasService'upload' ) ) {
  60.     $gContent->invokeServices"content_pre_upload_function"$_REQUEST );
  61. else {
  62.     $gBitThemes->loadJavascriptUTIL_PKG_PATH.'javascript/multifile.js'TRUE );
  63. }
  64.  
  65. if$gBitThemes->isAjaxRequest() ) {
  66.     if!empty$upErrors ) ) {
  67.         print json_encode$upErrors );
  68.     }
  69. else {
  70.     $displayMode !empty($_REQUEST['display_mode']$_REQUEST['display_mode''edit';
  71.     $gBitSystem->display'bitpackage:fisheye/upload_fisheye.tpl''Upload Images' array'display_mode' => $displayMode ));
  72. }
  73.  
  74. ?>

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