[ Index ]
 

Code source de IMP H3 (4.1.5)

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/ -> saveimage.php (source)

   1  <?php
   2  /**
   3   * $Horde: imp/saveimage.php,v 1.1.2.6 2007/01/02 13:54:54 jan Exp $
   4   *
   5   * Copyright 2005-2007 Michael Slusarz <slusarz@bigworm.curecanti.org>
   6   *
   7   * See the enclosed file COPYING for license information (GPL).  If you
   8   * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
   9   */
  10  
  11  @define('IMP_BASE', dirname(__FILE__));
  12  require_once  IMP_BASE . '/lib/base.php';
  13  require_once  IMP_BASE . '/lib/MIME/Contents.php';
  14  
  15  $id = Util::getFormData('id');
  16  $index = Util::getFormData('index');
  17  
  18  /* Run through the action handlers. */
  19  $actionID = Util::getFormData('actionID');
  20  switch ($actionID) {
  21  case 'save_image':
  22      $contents = &IMP_Contents::singleton($index);
  23      $mime_part = $contents->getDecodedMIMEPart($id);
  24      $image_data = array(
  25          'filename' => $mime_part->getName(true, true),
  26          'description' => $mime_part->getDescription(true),
  27          'data' => $mime_part->getContents(),
  28          'type' => $mime_part->getType()
  29      );
  30      $res = $registry->call('images/saveImage', array(null, Util::getFormData('gallery'), $image_data));
  31      if (is_a($res, 'PEAR_Error')) {
  32          $notification->push($res, 'horde.error');
  33          break;
  34      }
  35      Util::closeWindowJS();
  36      exit;
  37  }
  38  
  39  /* Build the list of galleries. */
  40  $gallerylist = $registry->call('images/selectGalleries', array(null, PERMS_EDIT));
  41  
  42  $title = _("Save Image");
  43  require IMP_TEMPLATES . '/common-header.inc';
  44  IMP::status();
  45  require IMP_TEMPLATES . '/saveimage/saveimage.inc';
  46  require $registry->get('templates', 'horde') . '/common-footer.inc';


Généré le : Thu Nov 29 12:30:07 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics