"index.php?node=$node") : array("en" => "index.php?node=$node&lang=en"), // Alternativní jazyky "", // Předchozí stránka "", // Následující stránka $lang ? "/en.index.php" : "/index.php" // Stránka s obsahem ); PageHead(); // Hlednání nadřazených kategorií function GetPath($parent, &$path, $pos = 0) { global $conn, $node, $SCRIPT_NAME, $lang; $result = ODBC_Exec($conn, "SELECT ID, Name$lang FROM Links WHERE ID = $parent"); ODBC_Fetch_Row($result); if ($parent==$node) $path[$pos] = ODBC_Result($result, "Name$lang"); else $path[$pos] = "". ODBC_Result($result, "Name$lang"). " ~ " . $path[$pos]; $result = ODBC_Exec($conn, "SELECT Parent FROM Tree WHERE ID = $parent"); $i = 0; $curPath = $path[$pos]; while (ODBC_Fetch_Row($result)) { if ($i==0) { $parent = ODBC_Result($result, "Parent"); GetPath(ODBC_Result($result, "Parent"), &$path, $pos); } else { $path[] = $curPath; GetPath(ODBC_Result($result, "Parent"), &$path, Count($path) - 1); } $i++; } } ?>
" . ($lang ? "Current category" : "Aktuální kategorie") ."
\n"; echo Join($path, "
\n"); endif; ?>
Search in resources
Query:
> search through the current category only
Vyhledávání ve zdrojích
Zadejte hledaný text:
> hledat pouze v aktuální kategorii
" . ($lang ? "Return to the list of resources" : "Ukončit hledání a vrátit se do seznamu zdrojů") . "\n"; $qq = EReg_Replace("\'", "''", $q); if ($qtarget=="local") $query = "SELECT Links.ID, Type, Name$lang, URL, Description$lang, Modified, Rank FROM Links INNER JOIN Tree ON Links.ID = Tree.ID WHERE ((Name$lang LIKE '%$qq%') OR (Description$lang LIKE '%$qq%')) AND Tree.Parent = $node AND Name$lang <> '' AND State = 'A' ORDER BY Type, Name$lang"; else $query = "SELECT ID, Type, Name$lang, URL, Description$lang, Modified, Rank FROM Links WHERE ((Name$lang LIKE '%$qq%') OR (Description$lang LIKE '%$qq%')) AND Name$lang <> '' AND State = 'A' ORDER BY Type, Name$lang"; $result = ODBC_Exec($conn, $query ); else: // všechny odkazy $result = ODBC_Exec($conn, "SELECT Links.ID, Type, Name$lang, URL, Description$lang, Modified, Rank FROM Links INNER JOIN Tree ON Links.ID = Tree.ID WHERE Tree.Parent = $node AND Name$lang <> '' ORDER BY Type, Name$lang"); endif; $currentType = ""; while(ODBC_Fetch_Row($result)): $Type = ODBC_Result($result, "Type"); if ($currentType != $Type): if ($Type=="F"): // začátek skupin echo "
\n"; echo "

" . ($lang ? "Categories" : "Kategorie") . "\n"; echo "
\n"; echo "
\n"; elseif ($Type=="L"): // začátek odkazů if ($currentType=="F") echo "
\n"; echo "


\n"; echo "

" . ($lang ? "Information resources" : "Informační zdroje") . "\n"; echo "
\n"; echo "
\n"; endif; $currentType = $Type; endif; $ID = ODBC_Result($result, "ID"); $Name = ODBC_Result($result, "Name$lang"); $URL = ODBC_Result($result, "URL"); $Description = ODBC_Result($result, "Description$lang"); $Modified = ODBC_Result($result, "Modified"); $Rank = ODBC_Result($result, "Rank"); switch ($Type): case "F": echo "
$Name\n"; echo "
$Description\n"; break; case "L": echo "
$Name\n"; echo "
$Description\n"; break; endswitch; endwhile; if ($currentType!="") echo "
\n"; echo "


\n"; if ($q==""): // nehledáme v odkazech echo "" . ($lang ? "Current category" : "Aktuální kategorie") ."
\n"; echo Join($path, "
\n"); echo "
\n"; endif; ?>