[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/inc/files/views/ -> _file_properties.form.php (source)

   1  <?php
   2  /**

   3   * This file implements the UI controller for file upload.

   4   *

   5   * This file is part of the evoCore framework - {@link http://evocore.net/}

   6   * See also {@link http://sourceforge.net/projects/evocms/}.

   7   *

   8   * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}

   9   *

  10   * {@internal License choice

  11   * - If you have received this file as part of a package, please find the license.txt file in

  12   *   the same folder or the closest folder above for complete license terms.

  13   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)

  14   *   then you must choose one of the following licenses before using the file:

  15   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php

  16   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php

  17   * }}

  18   *

  19   * {@internal Open Source relicensing agreement:

  20   * }}

  21   *

  22   * @package admin

  23   *

  24   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  25   * @author fplanque: Francois PLANQUE

  26   *

  27   * @version $Id: _file_properties.form.php,v 1.2 2007/09/26 21:53:23 fplanque Exp $

  28   */
  29  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  30  
  31  /**

  32   * @global File

  33   */
  34  global $edit_File;
  35  
  36  $Form = & new Form( NULL, 'fm_properties_checkchanges' );
  37  
  38  $Form->global_icon( T_('Close properties!'), 'close', regenerate_url() );
  39  
  40  $Form->begin_form( 'fform', T_('File properties') );
  41      $Form->hidden_ctrl();
  42      $Form->hidden( 'action', 'update_properties' );
  43      $Form->hiddens_by_key( get_memorized() );
  44  
  45      $Form->begin_fieldset( T_('Properties') );
  46          $Form->info( T_('Filename'), $edit_File->dget('name'), T_('This is the name of the file on the server hard drive.') );
  47          $Form->info( T_('Type'), $edit_File->get_icon().' '.$edit_File->get_type() );
  48      $Form->end_fieldset();
  49  
  50      $Form->begin_fieldset( T_('Meta data') );
  51          if( $current_User->check_perm( 'files', 'edit' ) )
  52          { // User can edit:
  53              $Form->text( 'title', $edit_File->title, 50, T_('Long title'), T_('This is a longer descriptive title'), 255 );
  54              $Form->text( 'alt', $edit_File->alt, 50, T_('Alternative text'), T_('This is useful for images'), 255 );
  55              $Form->textarea( 'desc', $edit_File->desc, 10, T_('Caption/Description') );
  56          }
  57          else
  58          { // User can view only:
  59              $Form->info( T_('Long title'), $edit_File->dget('title'), T_('This is a longer descriptive title') );
  60              $Form->info( T_('Alternative text'), $edit_File->dget('alt'), T_('This is useful for images') );
  61              $Form->info( T_('Caption/Description'), $edit_File->dget('desc') );
  62          }
  63      $Form->end_fieldset();
  64  
  65  if( $current_User->check_perm( 'files', 'edit' ) )
  66  { // User can edit:
  67      $Form->end_form( array( array( 'submit', '', T_('Update'), 'SaveButton' ),
  68                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  69  }
  70  else
  71  { // User can view only:
  72      $Form->end_form();
  73  }
  74  
  75  /*

  76   * $Log: _file_properties.form.php,v $

  77   * Revision 1.2  2007/09/26 21:53:23  fplanque

  78   * file manager / file linking enhancements

  79   *

  80   * Revision 1.1  2007/06/25 11:00:05  fplanque

  81   * MODULES (refactored MVC)

  82   *

  83   * Revision 1.9  2007/04/26 00:11:10  fplanque

  84   * (c) 2007

  85   *

  86   * Revision 1.8  2007/01/24 03:45:29  fplanque

  87   * decrap / removed a lot of bloat...

  88   *

  89   * Revision 1.7  2007/01/24 02:35:42  fplanque

  90   * refactoring

  91   *

  92   * Revision 1.6  2006/12/23 22:53:10  fplanque

  93   * extra security

  94   *

  95   * Revision 1.5  2006/11/24 18:27:25  blueyed

  96   * Fixed link to b2evo CVS browsing interface in file docblocks

  97   */
  98  ?>


Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics