if ($cinfo === false) {
    exit("Collection not found.");
}
# Check access
if (!$cinfo["request_feedback"]) {
    exit("Access denied.");
}
# Check that comments have been added.
$comments = get_collection_comments($collection);
if (count($comments) == 0 && $feedback_resource_select == false) {
    $errors = $lang["feedbacknocomments"];
}
if (getval("save", "") != "") {
    # Save comment
    $comment = trim(getvalescaped("comment", ""));
    send_collection_feedback($collection, $comment);
    # Stay on this page for external access users (no access to search)
    refresh_collection_frame();
    $done = true;
}
$headerinsert .= "<script src=\"../lib/lightbox/js/jquery.lightbox-0.5.min.js\" type=\"text/javascript\"></script>";
$headerinsert .= "<link type=\"text/css\" href=\"../lib/lightbox/css/jquery.lightbox-0.5.css?css_reload_key=" . $css_reload_key . "\" rel=\"stylesheet\">";
include "../include/header.php";
?>
<script type="text/javascript">
	jQuery(document).ready(function(){
		jQuery('.lightbox').lightBox(); 
	
	});

</script>
    exit("Collection not found.");
}
# Check access
if (!$cinfo["request_feedback"]) {
    exit("Access denied.");
}
# Check that comments have been added.
$comments = get_collection_comments($collection);
if (count($comments) == 0 && $feedback_resource_select == false) {
    $errors = $lang["feedbacknocomments"];
}
$comment = "";
if (getval("save", "") != "") {
    # Save comment
    $comment = trim(getvalescaped("comment", ""));
    $saveerrors = send_collection_feedback($collection, $comment);
    if (is_array($saveerrors)) {
        foreach ($saveerrors as $saveerror) {
            if ($errors == "") {
                $errors = $saveerror;
            } else {
                $errors .= "<br><br> " . $saveerror;
            }
        }
    } else {
        # Stay on this page for external access users (no access to search)
        refresh_collection_frame();
        $done = true;
    }
}
$headerinsert .= "<script src=\"../lib/lightbox/js/jquery.lightbox-0.5.min.js\" type=\"text/javascript\"></script>";