<?php #bin/navi.php

$output["navi"] = tplExtrSection(tplLoadFile("res/nav.html"), "###NAVLINE###");

$nent = tplExtrSection($output["navi"], "###NAVENTRY###");
$nsep = tplExtrSection($output["navi"], "###NAVSEPERATOR###");

$nout = "";
$x = false;
foreach ($pages as $key => $val)
{
  if ($x) {
    $nout.= $nsep;
  }
  $fill = pgsCreatePage($val["name"], "?main=".$val["ID"], $val["ID"]==$page["main"] ? " current" : "");
  $nout.= tplReplMarkerArray($nent, $fill);
  $x = true;
}
$output["navi"] = $nout;

?>