Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Menu w php....
Forum PHP.pl > Forum > Przedszkole
sparky87
Czy dałoby się napisać taki skrypt php, gdzie menu byłoby zależne od akurat przegladanej strony questionmark.gif ...
zakaru
Oczywiście, że dałoby się ... tylko napisz bardziej szczegółowo czego oczekujesz ?
sparky87
  1. <?php 
  2.  
  3. $theuri = $_SERVER['REQUEST_URL'];
  4.  
  5. if ( ($theuri =="/") or ($theuri =="/index.php") )
  6. {
  7. echo "
  8.   <span class="style6">.: <a href="index.php">Home</a></span><br>
  9.   <span class="style6">.: <a href="index2.php">Aktuell</a></span><br>
  10.   <span class="style6">.: <a href="index3.php">Stadtmarketing</a></span><br>
  11.   <span class="style6">.: <a href="index4.php">Kontakt</a></span><br>
  12.   <span class="style6">.: <a href="auth/sample.php" target="_blank">Login</a></span> ";
  13. }
  14.  
  15.  
  16. elseif ( ($theuri =="/index2.php") or ($theuri =="/index2.php?gwl") )
  17. {
  18. echo "
  19.   <span class="style6">.: <a href="index.php">Home</a></span><br>
  20.   <span class="style6">.: <a href="index2.php">Die GWL</a></span><br>
  21.         - <a href="index.php?gwl=wer">Über uns</a><br>
  22.         - <a href="index2.php?gwl=formulare">Formulare</a><br>
  23.         - <a href="index2.php?gwl=mitglieder">Mitglieder</a><br>
  24.         - <a href="index2.php?gwl=branche">Branchenregister</a><br>
  25.         - <a href="index2.php?gwl=termine">Wichtige Termine</a><br>
  26.         - <a href="index2.php?gwl=kalender">Jahreskalender</a><br>
  27.         - <a href="index2.php?gwl=leistungsschau">Leistungsschau</a><br>
  28.         - <a href="index2.php?gwl=kummerkasten">Kummerkasten</a><br>
  29.   <span class="style6">.: <a href="index3.php">Stadtmarketing</a></span><br>
  30.   <span class="style6">.: <a href="index4.php">Kontakt</a></span><br>
  31.   <span class="style6">.: <a href="auth/sample.php" target="_blank">Login</a></span> ";
  32. }
  33.  
  34.  
  35. ?>


Cuś takiego sklepałem....tylko, że nie pojawia sie na stronie tongue.gif ... Chodzi mi dokładnie o to, żeby skrypt pobierał adres url i w zależnosci od adresu zmienialo sie menu...

Dobra..dalem sobie rade sam tongue.gif...
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.