A super easy PHP Framework for web development!
https://github.com/exacti/phacil-framework
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
724 B
37 lines
724 B
6 years ago
|
<?php
|
||
|
|
||
|
function breadcrumb ($list, $links) {
|
||
|
global $bread;
|
||
|
|
||
|
$l = explode("|", $list);
|
||
|
$u = explode("|", $links);
|
||
|
|
||
|
$bread = '<ul class="breadcrumb">';
|
||
|
|
||
|
$i = 0;
|
||
|
|
||
|
foreach($l as $montado) {
|
||
|
|
||
|
$i = $i;
|
||
|
|
||
|
if($montado == end($l)) {
|
||
|
$bread .= '<li class="active">'.$montado.'</li>';
|
||
|
} else {
|
||
|
if($l[0] == 'Home' and $l[0] == $montado) {
|
||
|
$montado = '<i class="fas fa-home"></i>';
|
||
|
}
|
||
|
$bread .= '<li><a href="'.$u[$i].'">'.$montado.'</a><div class="divider">›</div></li>';
|
||
|
|
||
|
} $i = $i+1;
|
||
|
}
|
||
|
|
||
|
$bread .= '<li class="pull-right" id="breadback"><a href="javascript:history.go(-1)">Voltar</a></li>
|
||
|
</ul><script>
|
||
|
if(history.length <= 1) {
|
||
|
$("#breadback").hide();
|
||
|
}
|
||
|
</script>';
|
||
|
|
||
|
return $bread;
|
||
|
|
||
|
}
|