[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/components/com_wrapper/ -> wrapper.php (source)

   1  <?php
   2  /**
   3  * @version $Id: wrapper.php 3596 2006-05-22 17:29:07Z stingrey $
   4  * @package Joomla
   5  * @subpackage Wrapper
   6  * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
   7  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
   8  * Joomla! is free software. This version may have been modified pursuant
   9  * to the GNU General Public License, and as distributed it includes or
  10  * is derivative of works licensed under the GNU General Public License or
  11  * other free or open source software licenses.
  12  * See COPYRIGHT.php for copyright notices and details.
  13  */
  14  
  15  // no direct access
  16  defined( '_VALID_MOS' ) or die( 'Restricted access' );
  17  
  18  /** load the html drawing class */
  19  require_once( $mainframe->getPath( 'front_html' ) );
  20  
  21  showWrap( $option );
  22  
  23  function showWrap( $option ) {
  24      global $database, $Itemid, $mainframe;
  25  
  26      $menu = $mainframe->get( 'menu' );
  27      $params = new mosParameters( $menu->params );
  28      $params->def( 'back_button', $mainframe->getCfg( 'back_button' ) );
  29      $params->def( 'scrolling', 'auto' );
  30      $params->def( 'page_title', '1' );
  31      $params->def( 'pageclass_sfx', '' );
  32      $params->def( 'header', $menu->name );
  33      $params->def( 'height', '500' );
  34      $params->def( 'height_auto', '0' );
  35      $params->def( 'width', '100%' );
  36      $params->def( 'add', '1' );
  37      $url = $params->def( 'url', '' );
  38  
  39      $row = new stdClass();
  40      if ( $params->get( 'add' ) ) {
  41          // adds 'http://' if none is set
  42          if ( substr( $url, 0, 1 ) == '/' ) {
  43              // relative url in component. use server http_host.
  44              $row->url = 'http://'. $_SERVER['HTTP_HOST'] . $url;
  45          } elseif ( !strstr( $url, 'http' ) && !strstr( $url, 'https' ) ) {
  46              $row->url = 'http://'. $url;
  47          } else {
  48              $row->url = $url;
  49          }
  50      } else {
  51          $row->url = $url;
  52      }
  53  
  54      // auto height control
  55      if ( $params->def( 'height_auto' ) ) {
  56          $row->load = 'onload="iFrameHeight()"';
  57      } else {
  58          $row->load = '';
  59      }
  60  
  61      $mainframe->SetPageTitle($menu->name);
  62  
  63      HTML_wrapper::displayWrap( $row, $params, $menu );
  64  }
  65  ?>


Généré le : Wed Nov 21 14:43:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics