$image->loadFromId($_REQUEST['id']); } elseif (isset($_POST['close'])) { $ticket->setModerator($USER->user_id); $ticket->closeTicket($USER->user_id, $comment); } } elseif ($isowner) { //add comment to ticket if (isset($_POST['addcomment'])) { $ticket->addOwnerComment($USER->user_id, $comment); #$smarty->assign("thankyou", "comment"); $thankyou = "comment"; } } elseif ($issuggester) { //add comment to ticket if (isset($_POST['addcomment'])) { $ticket->addSuggesterComment($USER->user_id, $comment); #$smarty->assign("thankyou", "comment"); $thankyou = "comment"; } } else { die("naughty naughty. only moderators and image owners can update tickets."); } if (isset($_SESSION['editpage_options']) && in_array('small_redirect', $_SESSION['editpage_options'])) { header("Location: http://{$_SERVER['HTTP_HOST']}/thankyou.php#thankyou=done&id={$_REQUEST['id']}"); exit; } //refresh this page so you're less likely to repost header("Location: http://{$_SERVER['HTTP_HOST']}/editimage.php?id={$image->gridimage_id}" . ($thankyou ? "&thankyou={$thankyou}" : '')); exit; } if ($moderator = $image->isImageLocked($USER->user_id)) {