Location: PHPKode > scripts > Particle Gallery > includes/breadcrumbs.php
<?php
function breadcrumbs($type = "", $id = ""){
	global $db, $dbprefix, $config;
	
	$brd = '<a href="index.php">Top</a>';
	
	if ($type == "admin"){
		$brd .= ' ' . $config["breadcrumb"] . ' <a href="admin.php">Admin Panel</a>';
		
	} elseif ($type == "auth"){
		$brd .= ' ' . $config["breadcrumb"] . ' <a href="auth.php">Users</a>';
		
	} elseif ($type == "moderate"){
		$brd .= ' ' . $config["breadcrumb"] . ' <a href="moderate.php">Moderator CP</a>';
		
	} elseif ($type == "search"){
		$brd .= ' ' . $config["breadcrumb"] . ' <a href="search.php">Search</a>';
		
	} elseif ($type == "popular"){
		$brd .= ' ' . $config["breadcrumb"] . ' <a href="rank.php?mode=popular">Popular</a>';
		
	} elseif ($type == "recent"){
		$brd .= ' ' . $config["breadcrumb"] . ' <a href="rank.php?mode=recent">Recent</a>';
		
	} elseif ($type == "album"){
	
		$loop = 1;
		$cur  = intval($id);
		$row  = 0;
		$etc1 = "";
		
		while($loop == 1){
		
			$sql = "SELECT * FROM " . $dbprefix . "albums WHERE albumid = " . dbSecure($cur);
			$top = $db->execute($sql);
			if ($top->rows < 1){ $brd .= $etc1; return $brd; }
			
			if ($top->fields["parent"] == 0){ $loop = 0; }
			
			// set new variables
			$cur  = $top->fields["parent"];
			
			// add extra code
			$etc1 = ' ' . $config["breadcrumb"] . ' <a href="viewalbum.php?albumid=' . $top->fields["albumid"] . '">' . $top->fields["title"] . '</a> ' . $etc1;
			
			$row++;
		
		}
		
		$brd .= $etc1;
		
	} else {
		// no type, return nothing other than top
	}
	
	return $brd;
}
?>
Return current item: Particle Gallery