[ Index ]
 

Code source de eZ Publish 3.9.0

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

title

Body

[fermer]

/kernel/class/ -> grouplist.php (source)

   1  <?php
   2  //
   3  // Created on: <16-Apr-2002 11:00:12 amos>
   4  //
   5  // SOFTWARE NAME: eZ publish
   6  // SOFTWARE RELEASE: 3.9.0
   7  // BUILD VERSION: 17785
   8  // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
   9  // SOFTWARE LICENSE: GNU General Public License v2.0
  10  // NOTICE: >
  11  //   This program is free software; you can redistribute it and/or
  12  //   modify it under the terms of version 2.0  of the GNU General
  13  //   Public License as published by the Free Software Foundation.
  14  //
  15  //   This program is distributed in the hope that it will be useful,
  16  //   but WITHOUT ANY WARRANTY; without even the implied warranty of
  17  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18  //   GNU General Public License for more details.
  19  //
  20  //   You should have received a copy of version 2.0 of the GNU General
  21  //   Public License along with this program; if not, write to the Free
  22  //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  23  //   MA 02110-1301, USA.
  24  //
  25  //
  26  
  27  
  28  include_once ( "kernel/classes/ezcontentclass.php" );
  29  include_once ( "kernel/classes/ezcontentclassgroup.php" );
  30  include_once ( "kernel/classes/ezcontentclassclassgroup.php" );
  31  include_once ( "lib/ezutils/classes/ezhttppersistence.php" );
  32  
  33  $Module =& $Params["Module"];
  34  
  35  $http =& eZHttpTool::instance();
  36  if ( $http->hasPostVariable( "RemoveGroupButton" ) )
  37  {
  38      if ( $http->hasPostVariable( 'DeleteIDArray' ) )
  39      {
  40          $deleteIDArray = $http->postVariable( 'DeleteIDArray' );
  41          if ( $deleteIDArray !== null )
  42          {
  43              $http->setSessionVariable( 'DeleteGroupIDArray', $deleteIDArray );
  44              $Module->redirectTo( $Module->functionURI( 'removegroup' ) . '/' );
  45          }
  46      }
  47  }
  48  
  49  if ( $http->hasPostVariable( "EditGroupButton" ) && $http->hasPostVariable( "EditGroupID" ) )
  50  {
  51      $Module->redirectTo( $Module->functionURI( "groupedit" ) . "/" . $http->postVariable( "EditGroupID" ) );
  52      return;
  53  }
  54  
  55  if ( $http->hasPostVariable( "NewGroupButton" ) )
  56  {
  57      $params = array();
  58      $Module->run( "groupedit", $params );
  59      return;
  60  }
  61  
  62  if ( $http->hasPostVariable( "NewClassButton" ) )
  63  {
  64      if ( $http->hasPostVariable( "SelectedGroupID" ) )
  65      {
  66          $groupID = $http->postVariable( "SelectedGroupID" );
  67          $group = eZContentClassGroup::fetch( $groupID );
  68          $groupName = $group->attribute( 'name' );
  69  
  70          $params = array( null, $groupID, $groupName );
  71          return $Module->run( "edit", $params );
  72      }
  73  }
  74  
  75  if ( !isset( $TemplateData ) or !is_array( $TemplateData ) )
  76  {
  77      $TemplateData = array( array( "name" => "groups",
  78                                    "http_base" => "ContentClass",
  79                                    "data" => array( "command" => "group_list",
  80                                                     "type" => "class" ) ) );
  81  }
  82  
  83  $Module->setTitle( ezi18n( 'kernel/class', 'Class group list' ) );
  84  include_once ( "kernel/common/template.php" );
  85  $tpl =& templateInit();
  86  
  87  include_once ( "kernel/classes/datatypes/ezuser/ezuser.php" );
  88  $user =& eZUser::currentUser();
  89  foreach( $TemplateData as $tpldata )
  90  {
  91      $tplname = $tpldata["name"];
  92      $data = $tpldata["data"];
  93      $asObject = isset( $data["as_object"] ) ? $data["as_object"] : true;
  94      $base = $tpldata["http_base"];
  95      unset( $list );
  96      $list = eZContentClassGroup::fetchList( false, $asObject );
  97      $tpl->setVariable( $tplname, $list );
  98  }
  99  
 100  $tpl->setVariable( "module", $Module );
 101  
 102  $Result = array();
 103  $Result['content'] =& $tpl->fetch( "design:class/grouplist.tpl" );
 104  $Result['path'] = array( array( 'url' => '/class/grouplist/',
 105                                  'text' => ezi18n( 'kernel/class', 'Classes' ) ) );
 106  
 107  ?>


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