[ PHPXref.com ] [ Generated: Sun Jul 20 18:22:43 2008 ] [ Joomla! 1.0.8 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/administrator/ -> index2.php (source)

   1  <?php
   2  /**
   3  * @version $Id: index2.php 2509 2006-02-21 04:37:29Z stingrey $
   4  * @package Joomla
   5  * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
   6  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
   7  * Joomla! is free software. This version may have been modified pursuant
   8  * to the GNU General Public License, and as distributed it includes or
   9  * is derivative of works licensed under the GNU General Public License or
  10  * other free or open source software licenses.
  11  * See COPYRIGHT.php for copyright notices and details.
  12  */
  13  
  14  // Set flag that this is a parent file
  15  define( '_VALID_MOS', 1 );
  16  
  17  if (!file_exists( '../configuration.php' )) {
  18      header( 'Location: ../installation/index.php' );
  19      exit();
  20  }
  21  
  22  require_once ( '../globals.php' );
  23  require_once( '../configuration.php' );
  24  require_once ( $mosConfig_absolute_path . '/includes/joomla.php' );
  25  include_once( $mosConfig_absolute_path . '/language/'. $mosConfig_lang .'.php' );
  26  require_once ( $mosConfig_absolute_path . '/administrator/includes/admin.php' );
  27  
  28  // must start the session before we create the mainframe object
  29  session_name( md5( $mosConfig_live_site ) );
  30  session_start();
  31  
  32  $option         = strtolower( mosGetParam( $_REQUEST, 'option', '' ) );
  33  
  34  // mainframe is an API workhorse, lots of 'core' interaction routines
  35  $mainframe         = new mosMainFrame( $database, $option, '..', true );
  36  
  37  // admin session handling
  38  $my             = $mainframe->initSessionAdmin( $option );
  39  
  40  // initialise some common request directives
  41  $task             = mosGetParam( $_REQUEST, 'task', '' );
  42  $act             = strtolower( mosGetParam( $_REQUEST, 'act', '' ) );
  43  $section         = mosGetParam( $_REQUEST, 'section', '' );
  44  $no_html         = strtolower( mosGetParam( $_REQUEST, 'no_html', '' ) );
  45  $id             = intval( mosGetParam( $_REQUEST, 'id' ) );
  46  
  47  $cur_template     = $mainframe->getTemplate();
  48  
  49  // default admin homepage
  50  if ($option == '') {
  51      $option = 'com_admin';
  52  }
  53  
  54  // set for overlib check
  55  $mainframe->set( 'loadOverlib', false );
  56  
  57  // precapture the output of the component
  58  require_once ( $mosConfig_absolute_path . '/editor/editor.php' );
  59  
  60  ob_start();
  61  if ($path = $mainframe->getPath( 'admin' )) {
  62          require_once ( $path );
  63  } else {
  64      ?>
  65      <img src="images/joomla_logo_black.jpg" border="0" alt="<?php echo 'Joomla! Logo'; ?>" />
  66      <br />
  67      <?php
  68  }
  69  
  70  $_MOS_OPTION['buffer'] = ob_get_contents();
  71  ob_end_clean();
  72  
  73  initGzip();
  74  
  75  // start the html output
  76  if ($no_html == 0) {
  77      // loads template file
  78      if ( !file_exists( $mosConfig_absolute_path .'/administrator/templates/'. $cur_template .'/index.php' ) ) {
  79          echo 'TEMPLATE '. $cur_template .' NOT FOUND' ;
  80      } else {
  81          require_once( $mosConfig_absolute_path .'/administrator/templates/'. $cur_template .'/index.php' );
  82      }
  83  } else {
  84      mosMainBody_Admin();
  85  }
  86  
  87  // displays queries performed for page
  88  if ($mosConfig_debug) {
  89      echo $database->_ticker . ' queries executed';
  90      echo '<pre>';
  91      foreach ($database->_log as $k=>$sql) {
  92          echo $k+1 . "\n" . $sql . '<hr />';
  93      }
  94  }
  95  
  96  doGzip();
  97  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]