checkStaffPerm($thisstaff)||!dune_can_decide_appeal($identity,$ticket,$thisstaff)){http_response_code(403);exit('Appeal decision access denied.');} $appeal=dune_ticket_appeal($ticket->getId());$action=$_POST['action']??$_GET['action']??''; if(!$appeal||!in_array($action,['approve','deny','reopen'],true)){http_response_code(404);exit('Linked appeal or action not found.');} $error='';$reason=trim($_POST['reason']??''); if($_SERVER['REQUEST_METHOD']==='POST'){ if(strlen($reason)<5||strlen($reason)>500||preg_match('/[\x00-\x1f]/',$reason))$error='Enter a single-line reason of 5–500 characters.'; else{ $result=dune_bridge('ban',['sessionRef'=>$identity['sessionRef'],'banId'=>$appeal['ban_id'],'ticketId'=>$ticket->getId(),'operation'=>'decision','action'=>$action,'reason'=>$reason]); if(!$result||empty($result['ok']))$error='The decision could not be confirmed. Refresh the appeal register before retrying. Approval is never recorded without confirmed ban removal.'; else{ $status=dune_appeal_ticket_status($action==='reopen'?'open':'closed');$errors=[]; if(!$status||!$ticket->setStatus($status,'Appeal '.$result['status'].': '.$reason,$errors))$error='The appeal decision was saved, but ticket status could not be updated. Review the ticket and register before retrying.'; else{ $noteErrors=[];$ticket->postNote(['title'=>'Ban appeal '.$result['status'],'note'=>Format::htmlchars($reason).(!empty($result['demo'])?' · Demonstration only; no real ban was changed.':(!empty($result['banRemoved'])?' · Game host confirmed the ban was removed.':''))],$noteErrors,'DuneRealms appeal workflow',false); header('Location: /scp/tickets.php?id='.$ticket->getId(),true,303);exit; } } } } $ost->setPageTitle('Ban appeal decision');require STAFFINC_DIR.'header.inc.php';$esc=fn($v)=>htmlspecialchars((string)$v,ENT_QUOTES,'UTF-8'); ?>

'Approve appeal & remove ban','deny'=>'Deny appeal','reopen'=>'Reopen appeal'][$action]) ?>

Ticket #getNumber()) ?> ·

Demonstration record: no real Minecraft ban will be changed.

Cancel