torrents.Time'; $Conditions[] = "comments.AuthorID != $UserID"; $Title = 'Comments left on torrents ' . ($Self ? 'you\'ve' : $Username . ' has') . ' uploaded'; $Header = 'Comments left on torrents ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false) . ' has') . ' uploaded'; } else { $Type = 'default'; $Conditions[] = "comments.AuthorID = $UserID"; $Title = 'Torrent comments left by ' . ($Self ? 'you' : $Username); $Header = 'Torrent comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false)); } break; } $Join[] = "JOIN comments ON comments.Page = '$Action' AND comments.PageID = $Field1"; $Join = implode("\n\t\t", $Join); $Conditions = implode(" AND ", $Conditions); $Conditions = ($Conditions ? 'WHERE ' . $Conditions : ''); $SQL = " SELECT SQL_CALC_FOUND_ROWS comments.AuthorID, comments.Page, comments.PageID, $Field2, comments.ID, comments.Body, comments.AddedTime, comments.EditedTime, comments.EditedUserID FROM $Table $Join $Conditions GROUP BY comments.ID ORDER BY comments.ID DESC LIMIT $Limit"; $Comments = $DB->query($SQL); $Count = $DB->record_count(); $DB->query("SELECT FOUND_ROWS()"); list($Results) = $DB->next_record(); $Pages = Format::get_pages($Page, $Results, $PerPage, 11); $DB->set_query_id($Comments); if ($Action == 'requests') { $RequestIDs = array_flip(array_flip($DB->collect('PageID'))); $Artists = array(); foreach ($RequestIDs as $RequestID) { $Artists[$RequestID] = Requests::get_artists($RequestID); } $DB->set_query_id($Comments); } elseif ($Action == 'torrents') { $GroupIDs = array_flip(array_flip($DB->collect('PageID'))); $Artists = Artists::get_artists($GroupIDs); $DB->set_query_id($Comments); } $LinkID = (!$Self ? '&id=' . $UserID : ''); $ActionLinks = $TypeLinks = array(); if ($Action != 'artist') { $ActionLinks[] = 'Artist comments'; } if ($Action != 'collages') { $ActionLinks[] = 'Collage comments'; } if ($Action != 'requests') { $ActionLinks[] = 'Request comments'; } if ($Action != 'torrents') { $ActionLinks[] = 'Torrent comments'; } switch ($Action) { case 'collages': $BaseLink = 'comments.php?action=collages' . $LinkID; if ($Type != 'default') { $TypeLinks[] = 'Display collage comments ' . ($Self ? 'you\'ve' : $Username . ' has') . ' made'; } if ($Type != 'created') { $TypeLinks[] = 'Display comments left on ' . ($Self ? 'your collages' : 'collages created by ' .$Username) . ''; } if ($Type != 'contributed') { $TypeLinks[] = 'Display comments left on collages ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to'; } break; case 'requests': $BaseLink = 'comments.php?action=requests' . $LinkID; if ($Type != 'default') { $TypeLinks[] = 'Display request comments you\'ve made'; } if ($Type != 'created') { $TypeLinks[] = 'Display comments left on your requests'; } if ($Type != 'voted') { $TypeLinks[] = 'Display comments left on requests you\'ve voted on'; } break; case 'torrents': if ($Type != 'default') { $TypeLinks[] = 'Display comments you have made'; } if ($Type != 'uploaded') { $TypeLinks[] = 'Display comments left on your uploads'; } break; } $Links = implode(' ', $ActionLinks) . (count($TypeLinks) ? '
' . implode(' ', $TypeLinks) : ''); View::show_header($Title, 'bbcode,comments'); ?>

0) { $DB->set_query_id($Comments); while (list($AuthorID, $Page, $PageID, $Name, $PostID, $Body, $AddedTime, $EditedTime, $EditedUserID) = $DB->next_record()) { $Link = Comments::get_url($Page, $PageID, $PostID); switch ($Page) { case 'artist': $Header = " on $Name"; break; case 'collages': $Header = " on $Name"; break; case 'requests': $Header = ' on ' . Artists::display_artists($Artists[$PageID]) . " $Name"; break; case 'torrents': $Header = ' on ' . Artists::display_artists($Artists[$PageID]) . " $Name"; break; } CommentsView::render_comment($AuthorID, $PostID, $Body, $AddedTime, $EditedUserID, $EditedTime, $Link, false, $Header, false); } } else { ?>
No results.