本文整理汇总了PHP中Requests::get_tags方法的典型用法代码示例。如果您正苦于以下问题:PHP Requests::get_tags方法的具体用法?PHP Requests::get_tags怎么用?PHP Requests::get_tags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requests
的用法示例。
在下文中一共展示了Requests::get_tags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list
SELECT
ID AS RequestID,
CategoryID,
Title AS Title,
Year,
RecordLabel,
CatalogueNumber,
ReleaseType,
Image
FROM requests
WHERE ID = ' . $_GET['requestid']);
list($Properties) = $DB->to_array(false, MYSQLI_BOTH);
$UploadForm = $Categories[$Properties['CategoryID'] - 1];
$Properties['CategoryName'] = $Categories[$Properties['CategoryID'] - 1];
$Properties['Artists'] = Requests::get_artists($_GET['requestid']);
$Properties['TagList'] = implode(', ', Requests::get_tags($_GET['requestid'])[$_GET['requestid']]);
}
if (!empty($ArtistForm)) {
$Properties['Artists'] = $ArtistForm;
}
require SERVER_ROOT . '/classes/torrent_form.class.php';
$TorrentForm = new TORRENT_FORM($Properties, $Err);
$GenreTags = $Cache->get_value('genre_tags');
if (!$GenreTags) {
$DB->query("\n\t\tSELECT Name\n\t\tFROM tags\n\t\tWHERE TagType = 'genre'\n\t\tORDER BY Name");
$GenreTags = $DB->collect('Name');
$Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
}
$DB->query('
SELECT
Name,
示例2: foreach
<td style="width: 48%;">
<a href="#">↑</a>
<strong>Request Name</strong>
</td>
<td class="nobr">
<strong>Vote</strong>
</td>
<td class="nobr">
<strong>Bounty</strong>
</td>
<td>
<strong>Added</strong>
</td>
</tr>
<?php
$Tags = Requests::get_tags(array_keys($Requests));
$Row = 'b';
foreach ($Requests as $RequestID => $Request) {
$CategoryName = $Categories[$Request['CategoryID'] - 1];
$Title = display_str($Request['Title']);
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}\"><span dir=\"ltr\">{$Title}</span> [{$Request['Year']}]</a>";
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
$FullName = "<a href=\"requests.php?action=view&id={$RequestID}\"><span dir=\"ltr\">{$Title}</span> [{$Request['Year']}]</a>";
} else {
$FullName = "<a href=\"requests.php?action=view&id={$RequestID}\" dir=\"ltr\">{$Title}</a>";
}
if (!empty($Tags[$RequestID])) {
$ReqTagList = array();