isExpired()) { dbConnect(); $cookie = handleVoteCookie(); if ($itemTitle = getTagParam('item', true)) { $tags = getTags(); // select keywords $res = mysql_query( "select distinct t.tag_name from tag t, item_tag it, item i where i.item_id = it.item_id and it.tag_id = t.tag_id and i.item_title = '" . mysql_real_escape_string($itemTitle) . "' group by t.tag_name order by t.tag_name") or die(mysql_error()); $keywords = ''; $sidebarAddon = ''; if (mysql_num_rows($res) > 0) { $sidebarAddon .= '

Сопутствующие разделы

'; } while ($row = mysql_fetch_row($res)) { $tagName = $row[0]; if (array_key_exists($tagName, $tags['sz'])) { $sz = $tags['sz'][$tagName]; } else { $sz = '12pt'; } $keywords .= str_replace('&', '&', $tagName) . ', '; $sidebarAddon .= '' . $tagName . ' '; } mysql_free_result($res); } else { header('HTTP/404 Not Found'); exit; } // $e = getmicrotime(); echo ''; $page = 1; if (array_key_exists('p', $_GET)) $page = trim($_GET['p']); $num = 15; handleSort(); printHeader($itemTitle, $keywords, $itemTitle); ?>

0) mysql_data_seek($res, ($page - 1) * $num); while ($row = mysql_fetch_row($res)) if ($cnt++ < $num) { $itemIds .= ', ' . $row[0]; } mysql_free_result($res); printItems($itemIds); printPages($itemCount, $page, $num, BASE . 'u/item/' . getTagPath($itemTitle) . '/'); ?>
end(); } printFooter(); $e = getmicrotime(); echo ''; // $f = fopen($CORE_BASE.'time.txt', 'a'); // fwrite($f, $_SERVER['REQUEST_URI'].': '.($e - $b).' '.date('r')."\n"); // fclose($f); ob_end_flush(); ?>