index.php Template (komplett):
Code:
<?phpdefined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );// needed to seperate the ISO number from the language file constant _ISO$iso = split( '=', _ISO );// xml prologecho '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><?php mosShowHead(); ?><?phpif ( $my->id ) {initEditor();}?><meta **********="Content-Type" content="text/html; <?php echo _ISO; ?>" /><link href="<?php echo $mosConfig_live_site;?>/templates/rhuk_solarflare_iii/css/template_css.css" rel="stylesheet" type="text/css" /></head><body><?PHPif (file_exists($mosConfig_absolute_path."/components/com_joomlastats/joomlastats.inc.php"));require_once($mosConfig_absolute_path."/components/com_joomlastats/joomlastats.inc.php");?>
<div align="center"><div id="body_outline"> <!-- Der Hauptcontainer für die gesamte Ausgabe --><div id="con_u_34"> <!-- Container fuer user 3 und 4, damit sie beim Verschieben nicht ausbrechen --><div id="user_3_outline"><?php mosLoadModules ( 'user3', -1); ?></div><div id="user_4_outline"><?php mosLoadModules ( 'user4', -1); ?></div></div> <!-- Ende Container user 3 u 4 --><div class="clr"></div> <!-- Zeilenumbruch --><div id="header_area"> <!-- Grafik des Headers --><div id="header"></div></div><div class="clr"></div><?php$sandbox = 1; // der grosse Container mit allen Inhalten ausser Left$menu = 1; // 1=Left, 2= Right, 3=beide$haupt = 1; // 1= schmale, 2= breite Hauptausgabeif ( mosCountModules( 'right' ) >= 1) // Rechts Module vorhanden, dann Wert grösser oder gleich 1{$menu = 2; // Festlegen auf nur Right Menu$haupt = 2; // Festlegen auf breite Ausgabe$sandbox = 2; // Festlegen auf grossen Hauptcontainerif ( mosCountModules( 'left' ) >= 1) // Links auch Module vorhanden?{$menu = 3; // Dann sind beide Menus vorhanden$sandbox = 1; // schmaler Hauptcontainer festlegen$haupt = 1; // schmale Hauptausgabe}}if ( $menu == 2) // ist nur Menu 2 vorhanden, else ueberspringen und Left keine Ausgabe{}else // Menu Left auf jeden Fall vorhanden, beginn Ausgabe{ ?><div id="con_left"> <!-- begin Container Left --><?phpif ( $menu == 1) // Nur Menu Links??><div id="left_outline"> <!-- Rahmen Menu left --><?php mosLoadModules ( 'left', -2 ); ?></div></div> <!-- ende Container Left --><?php}?><div id="sandbox_<?php echo $sandbox; ?>"> <!-- grosser Hauptcontainer ausgeben --><?phpif ( mosCountModules( 'banner' ) >= 1) // pruefen auf Banner{ ?><div id="banner_outline"><div id="hauptbanner"><?php mosLoadModules( 'banner', -1 ); ?> </div><div id="klein_banner"> </div></div><?php}if ( $menu == 1) //Nur Menu left vorhanden? Dann else ueberspringen{ $haupt =2;}else // wenn nein, right ausgeben{?><div id="con_right"> <!-- Container rechts --><?phpif ( mosCountModules( 'top' ) == 1) // pruefen auf top{?><div id="top_out"><?php mosLoadModules ( 'top', -2 ); ?></div> <!-- Top noch laden --><?php}?><div id="right_outline"><?php mosLoadModules ( 'right', -2 ); ?></div> <!-- Menu noch laden --></div><?php} // else schliessen?><div id="con_main<?php echo $haupt; ?>"><?php$user=0;$breite=0;if ( mosCountModules( 'user1' ) == 1) // pruefen auf User 1{ $user = 1; // User 1 vorhandenif ( $haupt == 1) $breite = 2;if ( $haupt == 2) $breite = 4;if ( mosCountModules( 'user2' ) == 1) // pruefen auf user 2{ $user = 3; // beide User vorhandenif ( $haupt == 1) $breite = 1;if ( $haupt == 2) $breite = 3;}}else{if ( mosCountModules( 'user2' ) == 1) // pruefen auf user 2{$user=2; // User 2 vorhandenif ( $haupt == 1){ $breite = 2; }if ( $haupt == 2){ $breite = 4; }}}if ( $user == 3 ){?><div id="user1_out_<?php echo $breite; ?>"><?php mosLoadModules ( 'user1', -2); ?></div><div id="user2_out_<?php echo $breite; ?>"><?php mosLoadModules ( 'user2', -2); ?></div><div class="clr"></div><?php}if ( $user == 1 ){?><div id="user1_out_<?php echo $breite; ?>"><?php mosLoadModules ( 'user1', -2); ?></div><?php}if ( $user == 2 ){?><div id="user2_out_<?php echo $breite; ?>"><?php mosLoadModules ( 'user2', -2); ?></div><?php}?><div id="pathway_out_<?php echo $haupt; ?>"><?php mosPathWay(); ?></div><div id="clr"></div><div id="main_out_<?php echo $haupt; ?>"><?php mosMainBody(); ?></div></div> <!-- gelber Container schliessen --></div> <!-- Blauer Container schliessen --><div class="clr"></div><div id="footer"><div align="center">© <a href="http://www.mont-bit.com">Mont-Bit International</a> / Podgorica / Crnagora</div></div><div class="clr"></div></div></body></html>
index.php Seite (nicht komplett):
Code:
<?php
/**
* @version $Id: index.php 6024 2006-12-18 22:30:07Z friesengeist $
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// Set flag that this is a parent file
define( '_VALID_MOS', 1 );
// checks for configuration file, if none found loads installation page
if (!file_exists( 'configuration.php' ) || filesize( 'configuration.php' ) < 10) {
$self = rtrim( dirname( $_SERVER['PHP_SELF'] ), '/\\' ) . '/';
header("Location: http://" . $_SERVER['HTTP_HOST'] . $self . "installation/index.php" );
exit();
}
require( 'globals.php' );
require_once( 'configuration.php' );
// SSL check - $http_host returns <live site url>:<port number if it is 443>
$http_host = explode(':', $_SERVER['HTTP_HOST'] );
if( (!empty( $_SERVER['HTTPS'] ) && strtolower( $_SERVER['HTTPS'] ) != 'off' || isset( $http_host[1] ) && $http_host[1] == 443) && substr( $mosConfig_live_site, 0, 8 ) != 'https://' ) {
$mosConfig_live_site = 'https://'.substr( $mosConfig_live_site, 7 );
}
require_once( 'includes/joomla.php' );
//Installation sub folder check, removed for work with SVN
if (file_exists( 'installation/index.php' ) && $_VERSION->SVN == 0) {
define( '_INSTALL_CHECK', 1 );
include ( $mosConfig_absolute_path .'/offline.php');
exit();
}
// displays offline/maintanance page or bar
if ($mosConfig_offline == 1) {
require( $mosConfig_absolute_path .'/offline.php' );
}
// load system bot group
$_MAMBOTS->loadBotGroup( 'system' );
// trigger the onStart events
$_MAMBOTS->trigger( 'onStart' );
if (file_exists( $mosConfig_absolute_path .'/components/com_sef/sef.php' )) {
require_once( $mosConfig_absolute_path .'/components/com_sef/sef.php' );
} else {
require_once( $mosConfig_absolute_path .'/includes/sef.php' );
}
require_once( $mosConfig_absolute_path .'/includes/frontend.php' );
// retrieve some expected url (or form) arguments
$option = strval( strtolower( mosGetParam( $_REQUEST, 'option' ) ) );
$Itemid = intval( mosGetParam( $_REQUEST, 'Itemid', null ) );
if ($option == '') {
if ($Itemid) {
$query = "SELECT id, link"
. "\n FROM #__menu"
. "\n WHERE menutype = 'mainmenu'"
. "\n AND id = " . (int) $Itemid
. "\n AND published = 1"
;
$database->setQuery( $query );
} else {
$query = "SELECT id, link"
. "\n FROM #__menu"
. "\n WHERE menutype = 'mainmenu'"
. "\n AND published = 1"
. "\n ORDER BY parent, ordering"
;
$database->setQuery( $query, 0, 1 );
}
$menu = new mosMenu( $database );
if ($database->loadObject( $menu )) {
$Itemid = $menu->id;
}
$link = $menu->link;
if (($pos = strpos( $link, '?' )) !== false) {
$link = substr( $link, $pos+1 ). '&Itemid='.$Itemid;
}
parse_str( $link, $temp );
/** this is a patch, need to rework when globals are handled better */
foreach ($temp as $k=>$v) {
$GLOBALS[$k] = $v;
$_REQUEST[$k] = $v;
if ($k == 'option') {
$option = $v;
Lesezeichen