[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/kernel/pdf/ -> list.php (source)

   1  <?php
   2  //
   3  // eZSetup - init part initialization
   4  //
   5  // Created on: <29-Oct-2003 14:49:54 kk>
   6  //
   7  // SOFTWARE NAME: eZ publish
   8  // SOFTWARE RELEASE: 3.9.0
   9  // BUILD VERSION: 17785
  10  // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
  11  // SOFTWARE LICENSE: GNU General Public License v2.0
  12  // NOTICE: >
  13  //   This program is free software; you can redistribute it and/or
  14  //   modify it under the terms of version 2.0  of the GNU General
  15  //   Public License as published by the Free Software Foundation.
  16  //
  17  //   This program is distributed in the hope that it will be useful,
  18  //   but WITHOUT ANY WARRANTY; without even the implied warranty of
  19  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20  //   GNU General Public License for more details.
  21  //
  22  //   You should have received a copy of version 2.0 of the GNU General
  23  //   Public License along with this program; if not, write to the Free
  24  //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  25  //   MA 02110-1301, USA.
  26  //
  27  //
  28  
  29  $Module =& $Params["Module"];
  30  
  31  include_once ( 'kernel/common/template.php' );
  32  include_once ( 'kernel/classes/ezpdfexport.php' );
  33  
  34  // Create new PDF Export
  35  if ( $Module->isCurrentAction( 'NewExport' ) )
  36  {
  37      return $Module->redirect( 'pdf', 'edit' );
  38  }
  39  //Remove existing PDF Export(s)
  40  else if ( $Module->isCurrentAction( 'RemoveExport' ) )
  41  {
  42      $deleteArray = $Module->actionParameter( 'DeleteIDArray' );
  43      foreach ( $deleteArray as $deleteID )
  44      {
  45          // remove draft if it exists:
  46          $pdfExport = eZPDFExport::fetch( $deleteID, true, EZ_PDFEXPORT_VERSION_DRAFT );
  47          if ( $pdfExport )
  48          {
  49              $pdfExport->remove();
  50          }
  51          // remove default version:
  52          $pdfExport = eZPDFExport::fetch( $deleteID );
  53          if ( $pdfExport )
  54          {
  55              $pdfExport->remove();
  56          }
  57      }
  58  }
  59  
  60  $exportArray = eZPDFExport::fetchList();
  61  $exportList = array();
  62  foreach( array_keys( $exportArray ) as $exportID )
  63  {
  64      $export =& $exportArray[$exportID];
  65      $exportList[$export->attribute( 'id' )] =& $export;
  66  }
  67  
  68  $tpl =& templateInit();
  69  
  70  $tpl->setVariable( 'pdfexport_list', $exportList );
  71  
  72  $Result = array();
  73  $Result['content'] =& $tpl->fetch( "design:pdf/list.tpl" );
  74  $Result['path'] = array( array( 'url' => 'kernel/pdf',
  75                                  'text' => ezi18n( 'kernel/pdf', 'PDF Export' ) ) );
  76  
  77  ?>


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7