[ Index ]
 

Code source de eZ Publish 3.9.0

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

title

Body

[fermer]

/kernel/ezinfo/ -> about.php (source)

   1  <?php
   2  //
   3  // Created on: <17-Apr-2002 11:05:08 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  define( 'EZ_ABOUT_CONTRIBUTORS_DIR', 'var/storage/contributors' );
  28  define( 'EZ_ABOUT_THIRDPARTY_SOFTWARE_FILE', 'var/storage/third_party_software.php' );
  29  
  30  include_once ( 'kernel/common/template.php' );
  31  include_once ( 'lib/version.php' );
  32  
  33  /*!
  34    Returns list of contributors;
  35    Searches all php files in \a $pathToDir and tries to fetch contributor's info
  36  */
  37  function getContributors( $pathToDir )
  38  {
  39      include_once ( 'lib/ezfile/classes/ezdir.php' );
  40      $contribFiles = eZDir::recursiveFind( $pathToDir, "php" );
  41      $contributors = array();
  42      if ( count( $contribFiles ) )
  43      {
  44          foreach ( $contribFiles as $contribFile )
  45          {
  46              include_once( $contribFile );
  47              if ( !isset( $contributorSettings ) )
  48                  continue;
  49  
  50              $tmpFiles = explode( ',', $contributorSettings['files'] );
  51              $updatedFiles = array();
  52              foreach ( $tmpFiles as $file )
  53              {
  54                  if ( trim( $file ) )
  55                      $updatedFiles[] = trim( $file,"\n\r" );
  56              }
  57              $files = implode( ', ', $updatedFiles );
  58              $contributorSettings['files'] = $files;
  59              $contributors[] = $contributorSettings;
  60          }
  61      }
  62      return $contributors;
  63  }
  64  
  65  /*!
  66    Returns third-party software from \a $pathToFile
  67  */
  68  function getThirdPartySoftware( $pathToFile )
  69  {
  70      if ( !file_exists( $pathToFile ) )
  71          return array();
  72  
  73      include_once( $pathToFile );
  74      if ( !isset( $thirdPartySoftware ) )
  75          return array();
  76  
  77      $thirdPartySoftware = array_unique( $thirdPartySoftware );
  78      return $thirdPartySoftware;
  79  }
  80  
  81  /*!
  82    Returns active extentions info in run-time
  83  */
  84  function getExtensionsInfo()
  85  {
  86      include_once ( 'lib/ezutils/classes/ezini.php' );
  87      include_once ( 'lib/ezutils/classes/ezextension.php' );
  88  
  89      $siteINI = eZINI::instance();
  90      $extensionDir = $siteINI->variable( 'ExtensionSettings', 'ExtensionDirectory' );
  91      $selectedExtensionArray       = $siteINI->variable( 'ExtensionSettings', "ActiveExtensions" );
  92      $selectedAccessExtensionArray = $siteINI->variable( 'ExtensionSettings', "ActiveAccessExtensions" );
  93      $selectedExtensions           = array_merge( $selectedExtensionArray, $selectedAccessExtensionArray );
  94      $selectedExtensions           = array_unique( $selectedExtensions );
  95      $result = array();
  96      foreach ( $selectedExtensions as $extension )
  97      {
  98          $extensionInfo = eZExtension::extensionInfo( $extension );
  99          if ( $extensionInfo )
 100              $result[$extension] = $extensionInfo;
 101      }
 102      return $result;
 103  }
 104  
 105  /*!
 106    Replaces all occurrences (in \a $subjects) of the search string (keys of \a $searches )
 107    with the replacement string (values of \a $searches)
 108  */
 109  function strReplaceByArray( $searches = array(), $subjects = array() )
 110  {
 111      foreach ( array_keys( $subjects ) as $subjectKey )
 112      {
 113          $subject =& $subjects[$subjectKey];
 114          foreach ( array_keys( $searches ) as $search )
 115          {
 116              $replace = $searches[$search];
 117              if ( is_array( $subject ) )
 118              {
 119                  foreach ( array_keys( $subject ) as $sububjectItemKey )
 120                  {
 121                      $sububjectItem =& $subject[$sububjectItemKey];
 122                      $sububjectItem = str_replace( $search, $replace, $sububjectItem );
 123                  }
 124              }
 125              else
 126                  $subject = str_replace( $search, $replace, $subject );
 127          }
 128      }
 129  }
 130  
 131  $ezinfo = eZPublishSDK::version( true );
 132  
 133  $whatIsEzPublish = 'eZ publish 3 is a professional PHP application framework with advanced
 134  CMS (content management system) functionality. As a CMS its most notable
 135  featureis its revolutionary, fully customizable and extendable content
 136  model. Thisis also what makes eZ publish suitable as a platform for
 137  general PHP  development,allowing you to rapidly create professional
 138  web-based applications.
 139  
 140  Standard CMS functionality (such as news publishing, e-commerce and
 141  forums) are already implemented and ready to use. Standalone libraries
 142  can be used for cross-platform database-independent browser-neutral
 143  PHP projects. Because eZ publish 3 is a web-based application, it can
 144  be accessed from anywhere you have an internet connection.';
 145  
 146  $license =
 147  ## BEGIN LICENSE INFO ##
 148  'This copy of eZ publish is distributed under the terms and conditions of
 149  the GNU General Public License (GPL). Briefly summarized, the GPL gives
 150  you the right to use, modify and share this copy of eZ publish. If you
 151  choose to share eZ publish, you may only share it under the terms and
 152  conditions of the GPL. If you share a modified version of eZ publish,
 153  these modifications must also be placed under the GPL. Read the
 154  complete legal terms and conditions of the GPL at
 155  http://www.gnu.org/licenses/gpl.txt or see the file named LICENSE in
 156  the root directory of this eZ publish distribution.';
 157  ## END LICENSE INFO ##
 158  
 159  $contributors = getContributors( EZ_ABOUT_CONTRIBUTORS_DIR );
 160  $thirdPartySoftware = getThirdPartySoftware( EZ_ABOUT_THIRDPARTY_SOFTWARE_FILE );
 161  $extensions = getExtensionsInfo();
 162  
 163  strReplaceByArray( array( 'eZ systems AS' => "<a href='http://ez.no/'>eZ systems AS</a>",
 164                            'eZ Systems AS' => "<a href='http://ez.no/'>eZ systems AS</a>",
 165                            'eZ publish' => "<a href='http://ez.no/ezpublish'>eZ publish</a>",
 166                            'eZ Publish' => "<a href='http://ez.no/ezpublish'>eZ publish</a>" ),
 167                     array( &$whatIsEzPublish, &$license, &$contributors, &$thirdPartySoftware, &$extensions ) );
 168  
 169  $tpl =& templateInit();
 170  $tpl->setVariable( 'ezinfo', $ezinfo );
 171  $tpl->setVariable( 'what_is_ez_publish', $whatIsEzPublish );
 172  $tpl->setVariable( 'license', $license );
 173  $tpl->setVariable( 'contributors', $contributors );
 174  $tpl->setVariable( 'third_party_software', $thirdPartySoftware );
 175  $tpl->setVariable( 'extensions', $extensions );
 176  
 177  $Result = array();
 178  $Result['content'] =& $tpl->fetch( "design:ezinfo/about.tpl" );
 179  $Result['path'] = array( array( 'url' => false,
 180                                  'text' => ezi18n( 'kernel/ezinfo', 'Info' ) ),
 181                           array( 'url' => false,
 182                                  'text' => ezi18n( 'kernel/ezinfo', 'About' ) ) );
 183  
 184  ?>


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