[ Index ] |
|
Code source de Joomla 1.0.13 |
1 <?php 2 /** 3 * @version $Id: index2.php 6024 2006-12-18 22:30:07Z friesengeist $ 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 ( '../globals.php' ); 23 require_once( '../configuration.php' ); 24 25 // SSL check - $http_host returns <live site url>:<port number if it is 443> 26 $http_host = explode(':', $_SERVER['HTTP_HOST'] ); 27 if( (!empty( $_SERVER['HTTPS'] ) && strtolower( $_SERVER['HTTPS'] ) != 'off' || isset( $http_host[1] ) && $http_host[1] == 443) && substr( $mosConfig_live_site, 0, 8 ) != 'https://' ) { 28 $mosConfig_live_site = 'https://'.substr( $mosConfig_live_site, 7 ); 29 } 30 31 require_once ( $mosConfig_absolute_path . '/includes/joomla.php' ); 32 include_once( $mosConfig_absolute_path . '/language/'. $mosConfig_lang .'.php' ); 33 require_once ( $mosConfig_absolute_path . '/administrator/includes/admin.php' ); 34 35 // must start the session before we create the mainframe object 36 session_name( md5( $mosConfig_live_site ) ); 37 session_start(); 38 39 $option = strval( strtolower( mosGetParam( $_REQUEST, 'option', '' ) ) ); 40 $task = strval( mosGetParam( $_REQUEST, 'task', '' ) ); 41 42 // mainframe is an API workhorse, lots of 'core' interaction routines 43 $mainframe = new mosMainFrame( $database, $option, '..', true ); 44 45 // admin session handling 46 $my = $mainframe->initSessionAdmin( $option, $task ); 47 48 // initialise some common request directives 49 $act = strtolower( mosGetParam( $_REQUEST, 'act', '' ) ); 50 $section = mosGetParam( $_REQUEST, 'section', '' ); 51 $no_html = intval( mosGetParam( $_REQUEST, 'no_html', 0 ) ); 52 $id = intval( mosGetParam( $_REQUEST, 'id', 0 ) ); 53 54 $cur_template = $mainframe->getTemplate(); 55 56 // default admin homepage 57 if ($option == '') { 58 $option = 'com_admin'; 59 } 60 61 // set for overlib check 62 $mainframe->set( 'loadOverlib', false ); 63 64 // precapture the output of the component 65 require_once ( $mosConfig_absolute_path . '/editor/editor.php' ); 66 67 ob_start(); 68 if ($path = $mainframe->getPath( 'admin' )) { 69 require_once ( $path ); 70 } else { 71 ?> 72 <img src="images/joomla_logo_black.jpg" border="0" alt="<?php echo 'Joomla! Logo'; ?>" /> 73 <br /> 74 <?php 75 } 76 77 $_MOS_OPTION['buffer'] = ob_get_contents(); 78 ob_end_clean(); 79 80 initGzip(); 81 82 // start the html output 83 if ($no_html == 0) { 84 // loads template file 85 if ( !file_exists( $mosConfig_absolute_path .'/administrator/templates/'. $cur_template .'/index.php' ) ) { 86 echo 'TEMPLATE '. $cur_template .' NOT FOUND' ; 87 } else { 88 require_once( $mosConfig_absolute_path .'/administrator/templates/'. $cur_template .'/index.php' ); 89 } 90 } else { 91 mosMainBody_Admin(); 92 } 93 94 // displays queries performed for page 95 if ($mosConfig_debug) { 96 echo $database->_ticker . ' queries executed'; 97 echo '<pre>'; 98 foreach ($database->_log as $k=>$sql) { 99 echo $k+1 . "\n" . $sql . '<hr />'; 100 } 101 } 102 103 doGzip(); 104 105 // if task action is 'save' or 'apply' redo session check 106 if ( $task == 'save' || $task == 'apply' ) { 107 $mainframe->initSessionAdmin( $option, '' ); 108 } 109 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 14:43:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |