示例#1
0
         $ticket->removeModerator();
     } elseif (isset($_POST['addcomment'])) {
         $ticket->addModeratorComment($USER->user_id, $comment, !empty($_POST['claim']));
     } elseif (isset($_POST['accept'])) {
         $ticket->setModerator($USER->user_id);
         $ticket->closeTicket($USER->user_id, $comment, isset($_POST['accepted']) ? $_POST['accepted'] : null);
         //reload the image
         $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']}");