コード例 #1
0
ファイル: user.php プロジェクト: Kufirc/Gazelle
						<td style="width: 48%;">
							<strong>Request Name</strong>
						</td>
						<td>
							<strong>Vote</strong>
						</td>
						<td>
							<strong>Bounty</strong>
						</td>
						<td>
							<strong>Added</strong>
						</td>
					</tr>
<?php 
        $Row = 'a';
        $Requests = Requests::get_requests(array_keys($SphRequests));
        foreach ($SphRequests as $RequestID => $SphRequest) {
            $Request = $Requests[$RequestID];
            $VotesCount = $SphRequest['votes'];
            $Bounty = $SphRequest['bounty'] * 1024;
            // Sphinx stores bounty in kB
            $CategoryName = $Categories[$Request['CategoryID'] - 1];
            if ($CategoryName == 'Music') {
                $ArtistForm = Requests::get_artists($RequestID);
                $ArtistLink = Artists::display_artists($ArtistForm, true, true);
                $FullName = "{$ArtistLink}<a href=\"requests.php?action=view&amp;id={$RequestID}\">{$Request['Title']} [{$Request['Year']}]</a>";
            } elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
                $FullName = "<a href=\"requests.php?action=view&amp;id={$RequestID}\">{$Request['Title']} [{$Request['Year']}]</a>";
            } else {
                $FullName = "<a href=\"requests.php?action=view&amp;id={$RequestID}\">{$Request['Title']}</a>";
            }
コード例 #2
0
ファイル: functions.php プロジェクト: karamanolev/Gazelle
function get_group_requests($GroupID)
{
    if (empty($GroupID) || !is_number($GroupID)) {
        return array();
    }
    global $DB, $Cache;
    $Requests = $Cache->get_value("requests_group_{$GroupID}");
    if ($Requests === false) {
        $DB->query("\n\t\t\tSELECT ID\n\t\t\tFROM requests\n\t\t\tWHERE GroupID = {$GroupID}\n\t\t\t\tAND TimeFilled = '0000-00-00 00:00:00'");
        $Requests = $DB->collect('ID');
        $Cache->cache_value("requests_group_{$GroupID}", $Requests, 0);
    }
    return Requests::get_requests($Requests);
}
コード例 #3
0
// We deal with the information about torrents and requests later on...
$sql = "\n\tSELECT\n\t\tSQL_CALC_FOUND_ROWS\n\t\tq.Page,\n\t\tq.PageID,\n\t\tq.PostID,\n\t\tq.QuoterID,\n\t\tq.Date,\n\t\tq.UnRead,\n\t\tf.ID as ForumID,\n\t\tf.Name as ForumName,\n\t\tt.Title as ForumTitle,\n\t\ta.Name as ArtistName,\n\t\tc.Name as CollageName\n\tFROM users_notify_quoted AS q\n\t\tLEFT JOIN forums_topics AS t ON t.ID = q.PageID\n\t\tLEFT JOIN forums AS f ON f.ID = t.ForumID\n\t\tLEFT JOIN artists_group AS a ON a.ArtistID = q.PageID\n\t\tLEFT JOIN collages AS c ON c.ID = q.PageID\n\tWHERE q.UserID = {$LoggedUser['ID']}\n\t\tAND (q.Page != 'forums' OR " . Forums::user_forums_sql() . ")\n\t\tAND (q.Page != 'collages' OR c.Deleted = '0')\n\t\t{$UnreadSQL}\n\tORDER BY q.Date DESC\n\tLIMIT {$Limit}";
$DB->query($sql);
$Results = $DB->to_array(false, MYSQLI_ASSOC, false);
$DB->query('SELECT FOUND_ROWS()');
list($NumResults) = $DB->next_record();
$TorrentGroups = $Requests = array();
foreach ($Results as $Result) {
    if ($Result['Page'] == 'torrents') {
        $TorrentGroups[] = $Result['PageID'];
    } elseif ($Result['Page'] == 'requests') {
        $Requests[] = $Result['PageID'];
    }
}
$TorrentGroups = Torrents::get_groups($TorrentGroups, true, true, false);
$Requests = Requests::get_requests($Requests);
//Start printing page
View::show_header('Quote Notifications');
?>
<div class="thin">
	<div class="header">
		<h2>
			Quote notifications
			<?php 
echo $NumResults && !empty($UnreadSQL) ? " ({$NumResults} new)" : '';
?>
		</h2>
		<div class="linkbox pager">
			<br />
<?php 
if ($UnreadSQL) {