if(!isset($_GET['id']) || !is_number($_GET['id'])) { error(404); } $Action = $_GET['action']; if($Action != "unfill" && $Action != "delete") { error(404); } $DB->query("SELECT UserID, FillerID FROM requests WHERE ID = ".$_GET['id']); list($RequestorID, $FillerID) = $DB->next_record(); if($Action == 'unfill') { if($LoggedUser['ID'] != $RequestorID && $LoggedUser['ID'] != $FillerID && !check_perms('site_moderate_requests')) { error(403); } } elseif($Action == "delete") { if($LoggedUser['ID'] != $RequestorID && !check_perms('site_moderate_requests')) { error(403); } } show_header(ucwords($Action)." Request"); ?>