Posted By

Darksider3 on 07/26/11


Tagged

php functions title snippet LDG


Versions (?)

A Dynamic site Title


 / Published in: PHP
 

URL: http://darksider3.pf-control.de/all/scripts.php?id=Seiten%20Titel%20Dynamisch

A function to make your site title dynamic

  1. <?php
  2. function title(){
  3. if(isset($_GET['classid'])){
  4. echo " | Kategorie -> $_GET[classid]";
  5. }
  6. if(isset($_GET['id']))
  7. echo " | Scripts -> $_GET[id]";
  8. if(isset($_GET['login'])){
  9. echo " | Login";
  10. }
  11. if(strpos($_SERVER['PHP_SELF'], "index.php") !== false)
  12. echo " | Startseite";
  13. if(strpos($_SERVER['PHP_SELF'], "login.php") !== false)
  14. echo " | Login";
  15. if(strpos($_SERVER['PHP_SELF'], "reg.php") !== false)
  16. echo " | Registration";
  17. if(strpos($_SERVER['PHP_SELF'], "scripts.php") !== false && !isset($_GET['classid']) && !isset($_GET['id']))
  18. echo " | Scripts -> Kategorien";
  19. if(strpos($_SERVER['PHP_SELF'], "impressum.php") !== false)
  20. echo " | Impressum";
  21. if(strpos($_SERVER['PHP_SELF'], "kontakt.php") !== false)
  22. echo " | Kontakt";
  23. if(strpos($_SERVER['PHP_SELF'], "services.php") !== false)
  24. echo " | Services";
  25. if(strpos($_SERVER['PHP_SELF'], "nutzungsbestimmungen.php") !== false)
  26. echo " | Nutzungsbestimmungen";
  27.  
  28.  
  29.  
  30.  
  31. }
  32. ?>

Report this snippet  

You need to login to post a comment.