Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $links = array(
- "index.php" => "Welcome",
- "install.php" => "Installer",
- "admin.php" => "Create your Admin Account",
- "done.php" => "Finish"
- );
- $navigationbar = "";
- //this function is located somewhere else in my script!
- function get_page(){
- $curPage = $_SERVER["REQUEST_URI"];
- $curPage = str_replace("/forum/install/", "", $curPage);
- return strtolower($curPage);
- }
- foreach($links as $key => $value){
- $selectionState = "unselected";
- if($key == get_page()){
- $selectionState = "selected";
- }
- if($navigationbar != ""){
- $navigationbar = $navigationbar."\r\n<li class=\"$selectionState\"><a href=\"$key\">$key</a></li>";
- }else{
- $navigationbar = "<li class=\"$selectionState\"><a href=\"$key\">$key</a></li>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement