--- index.php 2001/09/28 23:34:37 1.14 +++ index.php 2001/10/04 14:59:34 1.18 @@ -2,12 +2,19 @@ if ($redir) { if ($redir == "harrison") include_once("inc/harrison.php"); else { + include_once("inc/global.php"); + include_once("inc/util.php"); include_once("inc/banneri.php"); // Sad tu neki brojac klikova ili nesto... - Header("Location: ".$banneri[$redir - 1]["url"]); + $loc = $banneri[$redir - 1]["url"]; + if (!$loc) $loc = "?section=home"; + Header("Location: $loc"); } exit; } + Header("Pragma: no-cache"); + Header("Cache-Control: no-cache"); + Header("Cache-Policy: no-cache"); include_once("inc/global.php"); include_once("inc/util.php"); $picdir = str_replace("//", "/", dirname($PHP_SELF)); @@ -78,6 +85,12 @@ } else if ($section == "zanimljivo") { $section_name = "Zanimljivosti"; $inc = "pgZanimljivosti"; + } else if ($section == "lozinka") { + $section_name = "Promjena lozinke"; + $inc = "pgLozinka"; + } else if ($section == "arhiva") { + $section_name = "Arhiva"; + $inc = "pgArhiva"; } } else { if ($section == "home") { @@ -130,8 +143,13 @@ } else if ($section == "duk") { $section_name = "Doktor u kuæi"; $mnu = $inc = ""; + } else if ($section == "arhiva") { + $section_name = "Arhiva"; + $mnu = ""; + $inc = "pgArhiva"; } } + $push_menu = true; if ($mnu && file_exists("inc/$mnu")) { $keep_template = false; include_once("inc/$mnu"); @@ -150,7 +168,7 @@ } $inc .= ".php"; if ($section_name) array_push($PATH, MyUpper($section_name)); - if ($section_menu_name) array_push($PATH, MyUpper($section_menu_name)); + if ($section_menu_name && $push_menu) array_push($PATH, MyUpper($section_menu_name)); if ($section_menu2_name) array_push($PATH, MyUpper($section_menu2_name)); if ($inc && file_exists("inc/$inc")) include_once("inc/$inc"); if ($isMed) { @@ -181,18 +199,22 @@ $tpl->assign("section_menu", $section_menu); $tpl->assign("section_menu2", $section_menu2); $tpl->assign("spec", $spec); + $tpl->assign("offset", $offset); if ($fname && $section_name) $main = $tpl->fetch($fname); $tpl->assign("MAIN", $main); $tpl->assign("FOOTER", $tpl->fetch("footer.tpl")); $tpl->assign("onload", $onload); $tpl->assign("refresh", $refresh); - $tpl->assign("query", $query); + $tpl->assign("trazi", $trazi); include_once("inc/banneri.php"); $idx = rand(0, count($banneri) - 1); $tpl->assign("banner", $banneri[$idx]["slika"]); $tpl->assign("banner_alt", $banneri[$idx]["alt"]); $tpl->assign("banner_url", "?redir=".($idx + 1)); $tpl->assign("show", $show ? true : false); + $tpl->assign("date", strftime("%d.%m.%Y.")); + $tpl->assign("acat", $acat); + $tpl->assign("acat2", $acat2); $tpl->display($main_template); include_once("inc/tracker.php"); ?>