本文整理汇总了PHP中Requests::get_requests方法的典型用法代码示例。如果您正苦于以下问题:PHP Requests::get_requests方法的具体用法?PHP Requests::get_requests怎么用?PHP Requests::get_requests使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requests
的用法示例。
在下文中一共展示了Requests::get_requests方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<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&id={$RequestID}\">{$Request['Title']} [{$Request['Year']}]</a>";
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
$FullName = "<a href=\"requests.php?action=view&id={$RequestID}\">{$Request['Title']} [{$Request['Year']}]</a>";
} else {
$FullName = "<a href=\"requests.php?action=view&id={$RequestID}\">{$Request['Title']}</a>";
}
示例2: get_group_requests
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: FOUND_ROWS
// 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) {