<?php
include ("inc/inc_connect.php");
include ("inc/inc_admincheck.php");
if ($cAdminLevel < 2)
{
    header("Location: topics.php?groupid=$groupid");
    exit;
}

if ($stick == 1)
{
    $query = "UPDATE $forumtable SET ynPriority = '1' WHERE intTopicId = '$topicid'";
}
else
{
    $query = "UPDATE $forumtable SET ynPriority = '0' WHERE intTopicId = '$topicid'";
}

mysql_query( $query, $link ) or die ( "Error! : ".mysql_error() );


header("Location: topics.php?groupid=$groupid");
exit;