[ Index ]
 

Code source de eZ Publish 3.9.0

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

title

Body

[fermer]

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

   1  <?php
   2  //
   3  // eZSetup - init part initialization
   4  //
   5  // Created on: <17-Sep-2003 11:00: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/ezrssexport.php' );
  33  include_once ( 'kernel/classes/ezrssimport.php' );
  34  include_once ( 'lib/ezutils/classes/ezhttppersistence.php' );
  35  
  36  $http =& eZHTTPTool::instance();
  37  
  38  if ( $http->hasPostVariable( 'NewExportButton' ) )
  39  {
  40      return $Module->run( 'edit_export', array() );
  41  }
  42  else if ( $http->hasPostVariable( 'RemoveExportButton' ) )
  43  {
  44      $deleteArray = $http->postVariable( 'DeleteIDArray' );
  45      foreach ( $deleteArray as $deleteID )
  46      {
  47          $rssExport = eZRSSExport::fetch( $deleteID, true, EZ_RSSEXPORT_STATUS_DRAFT );
  48          if ( $rssExport )
  49          {
  50              $rssExport->remove();
  51          }
  52          $rssExport = eZRSSExport::fetch( $deleteID, true, EZ_RSSEXPORT_STATUS_VALID );
  53          if ( $rssExport )
  54          {
  55              $rssExport->remove();
  56          }
  57      }
  58  }
  59  else if ( $http->hasPostVariable( 'NewImportButton' ) )
  60  {
  61      return $Module->run( 'edit_import', array() );
  62  }
  63  else if ( $http->hasPostVariable( 'RemoveImportButton' ) )
  64  {
  65      $deleteArray = $http->postVariable( 'DeleteIDArrayImport' );
  66      foreach ( $deleteArray as $deleteID )
  67      {
  68          $rssImport = eZRSSImport::fetch( $deleteID, true, EZ_RSSIMPORT_STATUS_DRAFT );
  69          if ( $rssImport )
  70          {
  71              $rssImport->remove();
  72          }
  73          $rssImport = eZRSSImport::fetch( $deleteID, true, EZ_RSSIMPORT_STATUS_VALID );
  74          if ( $rssImport )
  75          {
  76              $rssImport->remove();
  77          }
  78      }
  79  }
  80  
  81  
  82  // Get all RSS Exports
  83  $exportArray = eZRSSExport::fetchList();
  84  $exportList = array();
  85  foreach( array_keys( $exportArray ) as $exportID )
  86  {
  87      $export =& $exportArray[$exportID];
  88      $exportList[$export->attribute( 'id' )] =& $export;
  89  }
  90  
  91  // Get all RSS imports
  92  $importArray = eZRSSImport::fetchList();
  93  $importList = array();
  94  foreach( array_keys( $importArray ) as $importID )
  95  {
  96      $import =& $importArray[$importID];
  97      $importList[$import->attribute( 'id' )] =& $import;
  98  }
  99  
 100  $tpl =& templateInit();
 101  
 102  $tpl->setVariable( 'rssexport_list', $exportList );
 103  $tpl->setVariable( 'rssimport_list', $importList );
 104  
 105  $Result = array();
 106  $Result['content'] =& $tpl->fetch( "design:rss/list.tpl" );
 107  $Result['path'] = array( array( 'url' => 'rss/list',
 108                                  'text' => ezi18n( 'kernel/rss', 'Really Simple Syndication' ) ) );
 109  
 110  
 111  ?>


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