<?PHP
#
#   FILE:  Hide.php
#
#   FUNCTIONS PROVIDED:
#       (none)
#
#   FUNCTIONS EXPECTED:
#       (none)
#
#   Copyright 2010 Internet Scout Project
#   http://scout.wisc.edu/
#

# ----- LOCAL FUNCTIONS ------------------------------------------------------

# ----- EXPORTED FUNCTIONS ---------------------------------------------------

# ----- MAIN -----------------------------------------------------------------

PageTitle("Hiding an URL in the URL Checker...");
CheckAuthorization(PRIV_SYSADMIN, PRIV_COLLECTIONADMIN);

$ResourceId = isset($_GET["ResourceId"]) ? intval($_GET["ResourceId"]) : NULL;
$FieldId = isset($_GET["FieldId"]) ? intval($_GET["FieldId"]) : NULL;
$Resource = new Resource($ResourceId);
$Schema = new MetadataSchema();
$Field = $Schema->GetField($FieldId);

if ($Resource->Status() == 1 && $Field->Status() == MetadataSchema::MDFSTAT_OK)
{
    $AF->SignalEvent("URLCHECKER_HIDE_URL", array($Resource, $Field));
}

$AF->SuppressHTMLOutput();
$AF->SetJumpToPage("index.php?P=P_UrlChecker_Results");

?>
