<?PHP
#
#   FILE:  PreviewComment.php
#
#   Part of the Collection Workflow Integration System (CWIS)
#   Copyright 2012-2013 Edward Almasy and Internet Scout Research Group
#   http://scout.wisc.edu/cwis/
#

PageTitle("Preview Comment");

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

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

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

# non-standard global variables

if (!isset($_GET["RI"]))
{
    $H_ErrorMessages []= "No ResourceId specified";
    return;
}

$H_Resource = new Resource(intval($_GET["RI"]));

if ($H_Resource->Status() != 1)
{
    $H_ErrorMessages []= "Nonexistent resource requested";
    return;
}

if (!isset($_SESSION["Body"]))
{
    $H_ErrorMessages []= "No message body provided for preview";
    return;
}
else
{
    $H_Body = $_SESSION["Body"];
    unset ($_SESSION["Body"]);
}

if (isset($_GET["MI"]))
    $H_MessageId = intval($_GET["MI"]);
