Einzelnen Beitrag anzeigen
  #30 (permalink)  
Alt 17-06-2008, 17:18
cool_water_at
 Newbie
Links : Onlinestatus : cool_water_at ist offline
Registriert seit: Jun 2004
Beiträge: 20
cool_water_at ist zur Zeit noch ein unbeschriebenes Blatt
Standard bzg $_GET seiten aus dem array lesen

habe den Beitrag das Problem bei > Entwicklung > PHP Developer gepostet aber es passt wohl besser hier rein und darum gehts:
danke schon im Voraus!


ich möchte meine Navigation - mein Arrayabfrage ändern bzw. die get parameter:

sprich index.php?rendezvous=galerie
und dahinter &id=salzburg

sprich unter der adresse
index.php?rendezvous=galerie&id=salzburg

soll dann die Subpage von der Galerie mit der ID=salzburg sein.

unter index.php?rendezvous=galerie
wird jetzt quasi die Auswahlseite angezeigt mit der Auswahl zu den einzelnen galerien.



Mein skript besteht im moment aus zwei dateien - die index.php und sites.inc.php

sites.inc.php
PHP-Code:
<?
    $site
="index2.php";
    
$index="index.php";
    
    
$screen_css="css/individual_rdz.css";
    
    
$screen_css_basic="css/basic.css";
    
    
$screen_css_gallery="css/highslide.css";
    
    
$favicon="rdz.ico";
    
    
    
// Hintergrundbilder für die Subpage
    
$bg_sp="images/bg_sp/";
    
    
    
//Ueberschriften Pfad
    
$hl="images/header/";
    
    
    

    
    
// ARRAY mit LINKS
    
    
    
$links=array();
    
    
$links['start']=array(            
    
                                    
"meta_title"     => "News &amp; Termine"
                                    
"path"             => "news.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_jodie.jpg"
                                    
"header"         => $hl."header_termine_news.png"
                                                                                            );
                                                                                            
    
    
$links['kontakt']=array(            
    
                                    
"meta_title"     => "Kontakt"
                                    
"path"             => "kontakt.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_partner.jpg"
                                    
"header"         => $hl."header_kontakt.png"
                                                                                            );
                                                                                            
                                                                                            
    
$links['sponsoren']=array(            
    
                                    
"meta_title"     => "Sponsoren"
                                    
"path"             => "sponsoren.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_maria.jpg"
                                    
"header"         => $hl."header_sponsoren.png"
                                                                                            );
                                                                                            
    
    
$links['bonus']=array(            
    
                                    
"meta_title"     => "Bonus Features"
                                    
"path"             => "bonus.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_pathologe.jpg"
                                    
"header"         => $hl."header_bonus.png"
                                                                                            );
                                                                                            
                                                                                            
    
$links['galerie']=array(            
    
                                    
"meta_title"     => "Galerie"
                                    
"path"             => "galerie_auswahl.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_johanna.jpg"
                                    
"header"         => $hl."header_galerie.png"
                                                                                            );
    
    
    
    
$links['salzburg']=array(            
    
                                    
"meta_title"     => "Galerie"
                                    
"path"             => "galerie_salzburg_php.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_johanna.jpg"
                                    
"header"         => $hl."header_galerie.png"
                                                                                            );
    
                                                                                            
    
    
$links['trailer']=array(            
    
                                    
"meta_title"     => "Trailer"
                                    
"path"             => "trailer.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_daniel.jpg"
                                    
"header"         => $hl."header_trailer.png"
                                                                                            );
                                                                                            
                                                                                            
    
$links['cast']=array(            
    
                                    
"meta_title"     => "Cast &amp; Crew"
                                    
"path"             => "cast.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_jodie.jpg"
                                    
"header"         => $hl."header_cast_crew.png"
                                                                                            );
                                                                                            
    
    
$links['inhalt']=array(            
    
                                    
"meta_title"     => "Inhalt"
                                    
"path"             => "inhalt.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_matthias.jpg"
                                    
"header"         => $hl."header_inhalt.png"
                                                                                            );
                                                                                            
    
$links['impressum']=array(            
    
                                    
"meta_title"     => "Impressum"
                                    
"path"             => "impressum.php"
                                    
"bg_sp_img"     => $bg_sp."bg_sp_impressum.jpg"
                                    
"header"         => $hl."header_impressum.png"
                                                                                            );
                                    
    
    
?>

INDEX2.php
PHP-Code:
<?
    
    
require_once 'sites_index2.inc.php';
    
    if (!empty(
$_GET['rendezvous']) && !empty($links[$_GET['rendezvous']])) { // Erlaubte Seite
        
$LIVE_SITE $links[$_GET['rendezvous']];
    }
    
    else { 
// Erstbesuch oder Injection-Versuch
        
$LIVE_SITE $links['start'];
    }  
?>


<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Rendezvous - Jeder Will Eins :: <?php echo $LIVE_SITE['meta_title']; ?></title>


<script type="text/javascript" src="highslide/highslide.js"></script>


<script type="text/javascript">    
    hs.graphicsDir = 'highslide/graphics/';
    hs.outlineType = 'rounded-white';
</script>


<link rel="shortcut icon" href="<?php echo $favicon?>">
<link href="<?php echo $screen_css_basic?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $screen_css?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $screen_css_gallery?>" rel="stylesheet" type="text/css" />
</head>

<body>
<!-- DIV CONTAINER - Subpage - Start -->
<div id="container_subpage">
    <div id="container_subpage_bg">
        <img src="<?php echo $LIVE_SITE['bg_sp_img']; ?>" />
    

    <!-- DIV NAVIGATION - Subpage - Start -->
    <div id="navigation_sp">
    
        
        <!-- DIV NAVIGATION LOGO - Subpage - Start -->
        <div id="navigation_logo_sp">
          <a href="<?php echo $index?>"><img src="images/subpage_logo.jpg" border="0" /></a> </div>
        <!-- DIV NAVIGATION LOGO- Subpage - Ende -->
        
        
        <!-- DIV NAVIGATION MENU - Subpage - Start -->
        <div id="navigation_menu_sp">
                        <?
                            
include('navigation_links.inc.php');
                        
?>
      </div>
        <!-- DIV NAVIGATION MENU- Subpage - Ende -->
    </div>
    <!-- DIV NAVIGATION - Subpage - Ende -->

    
    
    <!-- DIV CONTENT BEREICH - Subpage - Start -->
    <div id="content_main_sp">
    
    
        <!-- DIV CONTENT BEREICH HEAD - Subpage - Start -->
        <div id="content_head_sp">
            <img src="<?php echo $LIVE_SITE['header']; ?>" />        
        </div>
        <!-- DIV CONTENT BEREICH -HEAD Subpage - Ende -->
    
            
            
        <!-- DIV CONTENT BEREICH TEXT- Subpage - Start -->    
        <div id="content_main_text">
                  <?php
                    
include $LIVE_SITE['path'];
                
?> 
                <br  style="clear: both;" />
         </div>
        <!-- DIV CONTENT BEREICH TEXT- Subpage - Ende -->
    
        
    </div>
    <!-- DIV CONTENT BEREICH - Subpage - Ende -->
    



</div>
<!-- div container - background -->
<div id="sp_footer">
             <?
                
include('footer_links.inc.php');
            
?>
</div>

</div>
<!-- DIV CONTAINER - Subpage - Ende -->


    
</body>
</html>
Mit Zitat antworten