当前位置: 首页>>代码示例>>PHP>>正文


PHP Requests::get_requests方法代码示例

本文整理汇总了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&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>";
            }
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:user.php

示例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);
}
开发者ID:karamanolev,项目名称:Gazelle,代码行数:14,代码来源:functions.php

示例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) {
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:quote_notifications.php


注:本文中的Requests::get_requests方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。