aboutsummaryrefslogtreecommitdiff
path: root/Html/includes/ariane.php
diff options
context:
space:
mode:
Diffstat (limited to 'Html/includes/ariane.php')
-rw-r--r--Html/includes/ariane.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/Html/includes/ariane.php b/Html/includes/ariane.php
new file mode 100644
index 0000000..d63374a
--- /dev/null
+++ b/Html/includes/ariane.php
@@ -0,0 +1,32 @@
+<?php
+$def = "index";
+$dPath = $_SERVER['REQUEST_URI'];
+$dChunks = explode("/", $dPath);
+
+echo '<p class="ariane">';
+
+ echo '<a href="/">Accueil</a><span> &rsaquo; </span>';
+
+ for($i=1; $i<count($dChunks); $i++ ) {
+ echo '<a href="/';
+ for($j=1; $j<=$i; $j++ ) {
+ echo $dChunks[$j];
+ if ($j!=count($dChunks)-1) {
+ echo("/");
+ }
+ }
+
+ if ($i==count($dChunks)-1) {
+ $prChunks = explode(".", $dChunks[$i]);
+ if ($prChunks[0] == $def) $prChunks[0] = "";
+ $prChunks[0] = $prChunks[0] . "</a>";
+ }
+ else {
+ $prChunks[0]=$dChunks[$i] . '</a><span> &rsaquo;&rsaquo; </span>';
+ }
+ echo '">';
+ echo str_replace("_" , " " , $prChunks[0]);
+ }
+
+echo '</p>';
+?>