if(empty($ReleaseType)) { $ReleaseName = "Unknown"; } else { $ReleaseName = $ReleaseTypes[$ReleaseType]; } } else if($CategoryName == "Audiobooks" || $CategoryName == "Comedy") { $FullName = $Title." [".$Year."]"; $DisplayLink = $Title." [".$Year."]"; } else { $FullName = $Title; $DisplayLink = $Title; } //Votes time $RequestVotes = get_votes_array($RequestID); $VoteCount = count($RequestVotes['Voters']); $ProjectCanEdit = (check_perms('project_team') && !$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0))); $CanEdit = ((!$IsFilled && $LoggedUser['ID'] == $RequestorID && $VoteCount < 2) || $ProjectCanEdit || check_perms('site_moderate_requests')); show_header('View request: '.$FullName, 'comments,requests'); show_message(); ?> <div class="thin"> <h2><a href="requests.php">Requests</a> > <?php echo $CategoryName; ?> > <?php echo $DisplayLink; ?>
} } else { $RequestID = $_POST['requestid']; if(!is_number($RequestID)) { error(0); } $Request = get_requests(array($RequestID)); $Request = $Request['matches'][$RequestID]; if(empty($Request)) { error(404); } list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $ReleaseType, $BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request; $VoteArray = get_votes_array($RequestID); $VoteCount = count($VoteArray['Voters']); $IsFilled = !empty($TorrentID); $CategoryName = $Categories[$CategoryID - 1]; $ProjectCanEdit = (check_perms('project_team') && !$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0))); $CanEdit = ((!$IsFilled && $LoggedUser['ID'] == $RequestorID && $VoteCount < 2) || $ProjectCanEdit || check_perms('site_moderate_requests')); if(!$CanEdit) { error(403); } } // Validate