<?PHP
#
#   FILE:  EditTopic.php
#
#   Copyright 2011 Internet Scout Project
#   http://scout.wisc.edu/
#

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

function PrintTopic()
{
    global $TopicName;
    print $TopicName;
}

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

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

# non-standard global variables
global $TopicName;

PageTitle("Edit Topic");

# check if current user is authorized
CheckAuthorization(PRIV_SYSADMIN);

if (isset($_GET["ForumId"]) && isset($_GET["TopicId"]) )
{
    $ForumId = $_GET["ForumId"];
    $TopicId = $_GET["TopicId"];

    $Topic = new Topic($TopicId);
    $TopicName = $Topic->TopicName();

    $_SESSION["ForumId"] = $ForumId;
    $_SESSION["TopicId"] = $TopicId;
}