$default_sort = "DESC"; if (substr($order_by, 0, 5) == "field") { $default_sort = "ASC"; } $sort = getval("sort", $default_sort); setcookie("saved_sort", $sort); $revsort = $sort == "ASC" ? "DESC" : "ASC"; if ($order_by == "relevance" && $k == "" && ($userref == $cinfo["user"] || $cinfo["allow_changes"] == 1 || checkperm("h"))) { $allow_reorder = true; } if ($allow_reorder || $infobox) { # Also check for the parameter and reorder as necessary. $reorder = getvalescaped("reorder", ""); if ($reorder != "") { $r = explode("-", $reorder); swap_collection_order($r[0], $r[1], $usercollection); } } $border = true; $search = '!collection' . $colref; $offset = getvalescaped("offset", "", true); $order_by = getvalescaped("order_by", "relevance"); $archive = getvalescaped("archive", "", true); $restypes = getvalescaped("restypes", ""); $page = getvalescaped("page", 1); $alternative = getvalescaped("alternative", -1); if (strpos($search, "!") !== false) { $restypes = ""; } $default_sort = "DESC"; if (substr($order_by, 0, 5) == "field") {
} if ($collection_reorder_caption) { # Check to see if this user can edit (and therefore reorder) this resource if ($userref == $collectiondata["user"] || $collectiondata["allow_changes"] == 1 || checkperm("h")) { $allow_reorder = true; } } } # Include function for reordering if ($allow_reorder && $display != "list") { $url = $baseurl_short . "pages/search.php?search=" . urlencode($search); # Also check for the parameter and reorder as necessary. $reorder = getvalescaped("reorder", ""); if ($reorder != "") { $r = explode("-", $reorder); $wait = swap_collection_order(substr($r[0], 13), $r[1], substr($search, 11)); refresh_collection_frame(); ?> <script>document.location='<?php echo $url; ?> ';top.collections.location.href='collections.php?ref=<?php echo substr($search, 11); ?> ';</script><?php } } include "../include/search_title_processing.php"; # Do the public collection search if configured. if (($search_includes_themes || $search_includes_public_collections || $search_includes_user_collections) && $search != "" && substr($search, 0, 1) != "!" && $offset == 0) { $collections = search_public_collections($search, "theme", "ASC", !$search_includes_themes, !$search_includes_public_collections, true);