本文整理匯總了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();