Guten Tag,
ich bräuchte Hilfe und zwar möchte ich auf meiner Clanpage die SubNavigation so haben, das user nicht alle Bereiche sehen können welche für Member aber offen sind.
Das ist der Quelltext, ich bitte um Rat :
PHP
- <?php
- /*
- ##########################################################################
- # #
- # Version 4 / / / #
- # -----------__---/__---__------__----__---/---/- #
- # | /| / /___) / ) (_ ` / ) /___) / / #
- # _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___ #
- # Free Content / Management System #
- # / #
- # #
- # #
- # Copyright 2005-2010 by webspell.org #
- # #
- # visit webSPELL.org, webspell.info to get webSPELL for free #
- # - Script runs under the GNU GENERAL PUBLIC LICENSE #
- # - It's NOT allowed to remove this copyright-tag #
- # -- http://www.fsf.org/licensing/licenses/gpl.html #
- # #
- # Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at), #
- # Far Development by Development Team - webspell.org #
- # #
- # visit webspell.org #
- # #
- ##########################################################################
- */
- $subnavi = array('foo' => 'bar');
- /*
- $_language->read_module('navigation');
- eval ("\$navigation = \"".gettemplate("navigation")."\";");
- echo $navigation;*/
- $navigation = array(
- 'home' => array(
- 'image' => 'Bilder/home.png',
- 'image_hover' => 'Bilder/home_hover.png',
- 'link' => 'index.php?site=home',
- 'subnavi' => array(
- 'News' => 'index.php',
- 'Events' => 'index.php?site=events',
- 'Archiv' => 'index.php?site=news',
- )
- ),
- 'news' => array(
- 'image' => 'Bilder/news.png',
- 'image_hover' => 'Bilder/news_hover.png',
- 'subnavi' => array(
- 'Management' => 'index.php?site=squads&action=show&squadID=6',
- 'Web-Team' => 'index.php?site=squads&action=show&squadID=8',
- 'Redaktion' => 'index.php?site=squads&action=show&squadID=9',
- )
- ),
- 'board' => array(
- 'image' => 'Bilder/board.png',
- 'image_hover' => 'Bilder/board_hover.png',
- 'subnavi' => array(
- 'Forum' => 'index.php?site=forum',
- 'Bewerbung' => 'index.php?site=forum&cat=3',
- )
- ),
- 'matches' => array(
- 'image' => 'Bilder/matches.png',
- 'image_hover' => 'Bilder/matches_hover.png',
- 'subnavi' => array(
- 'Clanwars' => 'index.php?site=clanwars',
- 'Statistiken' => 'index.php?site=clanwars&action=stats',
- )
- ),
- 'teams' => array(
- 'image' => 'Bilder/teams.png',
- 'image_hover' => 'Bilder/teams_hover.png',
- 'subnavi' => array(
- 'css ESL 5on5' => 'index.php?site=squads&action=show&squadID=3',
- 'css ESL 3on3' => 'index.php?site=squads&action=show&squadID=2',
- 'LOL ESL 5on5' => 'index.php?site=squads&action=show&squadID=4',
- 'Fifa ESL 2on2' => 'index.php?site=squads&action=show&squadID=5',
- 'CS ESL 2on2' => 'index.php?site=squads&action=show&squadID=1',
- )
- ),
- 'community' => array(
- 'image' => 'Bilder/community.png',
- 'image_hover' => 'Bilder/community_hover.png',
- 'subnavi' => array(
- 'Register' => 'index.php?site=register',
- 'Partner' => 'index.php?site=partners',
- 'Sponsor' => 'index.php?site=sponsors',
- )
- ),
- 'media' => array(
- 'image' => 'Bilder/media.png',
- 'image_hover' => 'Bilder/media_hover.png',
- 'subnavi' => array(
- 'Demos' => 'index.php?site=demos',
- 'Gallery' => 'index.php?site=gallery',
- )
- )
- );
- ?>
- <ul>
- <?php
- $subnavi_index = 0;
- foreach($navigation as $item) {
- if(isset($item['subnavi'])) { //subnavi item
- ?>
- <li>
- <img
- onmouseover="this.src='<?php echo $item['image_hover']; ?>'; showit(<?php echo $subnavi_index ?>);"
- onmouseout="this.src='<?php echo $item['image']; ?>'"
- src="<?php echo $item['image']; ?>"
- alt="<?php echo $item['image']; ?>"
- style="cursor: pointer;"
- />
- </li>
- <?php
- $subnavi_index++;
- } else { // normal item
- ?>
- <li>
- <a href="<?php echo $item['link']; ?>" >
- <?php
- if('index.php?site='.$site != $item['link']) {
- ?>
- <img
- onmouseover="this.src='<?php echo $item['image_hover']; ?>'"
- onmouseout="this.src='<?php echo $item['image']; ?>'"
- src="<?php echo $item['image']; ?>"
- alt="<?php echo $item['image']; ?>"
- />
- <?php
- } else {
- ?>
- <img src="<?php echo $item['image_hover']; ?>" alt="<?php echo $item['image_hover']; ?>" />
- <?php
- }
- ?>
- </a>
- </li>
- <?php
- }
- }
- ?>
- <li class="navi-lang" >
- <a href="index.php?site=sc_language" ><?php echo $_language->language ?></a>
- </li>
- </ul>
Mit freundlichen grüßen,
Dennis Beckmann