--- inc/util.php 2001/09/28 23:34:37 1.5 +++ inc/util.php 2001/10/04 14:59:35 1.6 @@ -40,11 +40,12 @@ function GetLinks($read, $more, $more_title, $id, $cat, $name, $edit, $updown = false, $up = false, $down = false) { $t = new Smarty(); - global $section, $section_menu, $section_menu2, $spec, $isMed; + global $section, $section_menu, $section_menu2, $spec, $isMed, $offset; $t->assign("section", $section); $t->assign("section_menu", $section_menu); $t->assign("section_menu2", $section_menu2); $t->assign("spec", $spec); + $t->assign("offset", $offset); $t->assign("id", $id); $t->assign("cat", $cat); $t->assign("med", $isMed); @@ -54,7 +55,7 @@ if ($cat == "p") $m = "pmore"; $t->assign("m", $m); $t->assign("name", $name); - $t->assign("read", $read || ($more && !strstr($more, "?"))); + $t->assign("read", $read || ($more && !strstr($more, "?")) ? $read : ""); $t->assign("more", /* $more */ strstr($more, "?") ? $more : ""); $t->assign("more_new", strstr($more, "://") ? true : false); $t->assign("more_title", $more_title); @@ -65,6 +66,23 @@ return $t->fetch("links.tpl"); } + function GetRead($id, $ct = "") { + global $section, $section_menu, $section_menu2, $spec, $offset, $cat, $acat, $acat2; + $tmp = array(); + if ($section) array_push($tmp, "section=$section"); + if ($section_menu) array_push($tmp, "section_menu=$section_menu"); + if ($section_menu2) array_push($tmp, "section_menu=$section_menu2"); + if ($spec) array_push($tmp, "spec=$spec"); + if ($offset) array_push($tmp, "offset=$offset"); + if ($acat) array_push($tmp, "acat=$acat"); + if ($acat2) array_push($tmp, "acat2=$acat2"); + if (!$ct) $ct = $cat; + if ($ct) array_push($tmp, "cat=$ct"); + array_push($tmp, "id=$id"); + array_push($tmp, "show=1"); + return "?".HTMLSpecialChars(implode("&", $tmp)); + } + function GetHighlight($hl) { $tp = new Smarty(); $tp->assign("hl", $hl);