" . $lang["error-permissiondenied"] . ""); } include "../include/request_functions.php"; if ($k != "" && (!isset($internal_share_access) || !$internal_share_access) && $prevent_external_requests) { echo ""; exit(); } if ($k == "" && isset($anonymous_login) && $username == $anonymous_login) { $user_is_anon = true; } else { $user_is_anon = false; } $use_antispam = ($k !== '' || $user_is_anon); if ($ref == "" && isset($usercollection)) { $ref = $usercollection; } $cinfo = get_collection($ref); $error = false; # Determine the minimum access across all of the resources in the collection being requested $collection_request_min_access = collection_min_access($ref); # Check if any X?_ permissions are blocking sizes $resource_types = get_resource_types(); foreach ($resource_types as $type) { if (checkperm("X" . $type["ref"] . "_")) { $collection_request_min_access = max($collection_request_min_access, 1); break; } foreach (get_all_image_sizes() as $size) { if (checkperm("X" . $type["ref"] . "_" . $size["id"])) { $collection_request_min_access = max($collection_request_min_access, 1); break; } } } # Prevent "request all" resources in a collection if the user has access to all of its resources if ($collection_request_min_access == 0) { exit("

" . $lang["error-cant-request-all-are-open"] . ""); } if (getval("save", "") != "" && enforcePostRequest(false)) { $antispamcode = getval('antispamcode', ''); $antispam = getval('antispam', ''); $antispamtime = getval('antispamtime', 0); // Check the anti-spam time is recent if ($use_antispam && ($antispamtime < (time() - 180) || $antispamtime > time())) { $result = false; $error = $lang["expiredantispam"]; } // Check the anti-spam code is correct elseif ($use_antispam && !verify_antispam($antispamcode, $antispam, $antispamtime)) { $result = false; $error = $lang["requiredantispam"]; } elseif ($k != "" || $userrequestmode == 0 || $user_is_anon) { if (($k != "" || $user_is_anon) && (getval("fullname", "") == "" || getval("email", "") == "")) { $result = false; # Required fields not completed. } else { # Request mode 0 : Simply e-mail the request. $result = email_collection_request($ref, getval("request", ""), getval("email", "")); } } else { # Request mode 1 : "Managed" mode via Manage Requests / Orders $result = managed_collection_request($ref, getval("request", "")); } if ($result === false) { $error = $lang["requiredfields-general"]; } else { ?>

"> ">
"> ">
"> ">
">
!! !!
" onclick="document.location='pages/search.php?search=!collection';"/>  " />