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


PHP Requests::get_artists方法代码示例

本文整理汇总了PHP中Requests::get_artists方法的典型用法代码示例。如果您正苦于以下问题:PHP Requests::get_artists方法的具体用法?PHP Requests::get_artists怎么用?PHP Requests::get_artists使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Requests的用法示例。


在下文中一共展示了Requests::get_artists方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: error

    }
    if ($FormatList && $FormatList != 'Any' && !Misc::search_joined_string($FormatList, $Format)) {
        $Err = "{$Format} is not an allowed format for this request.";
    }
    if ($MediaList && $MediaList != 'Any' && !Misc::search_joined_string($MediaList, $Media)) {
        $Err = "{$Media} is not allowed media for this request.";
    }
}
// Fill request
if (!empty($Err)) {
    error($Err);
}
//We're all good! Fill!
$DB->query("\n\tUPDATE requests\n\tSET FillerID = {$FillerID},\n\t\tTorrentID = {$TorrentID},\n\t\tTimeFilled = '" . sqltime() . "'\n\tWHERE ID = {$RequestID}");
if ($CategoryName === 'Music') {
    $ArtistForm = Requests::get_artists($RequestID);
    $ArtistName = Artists::display_artists($ArtistForm, false, true);
    $FullName = $ArtistName . $Title;
} else {
    $FullName = $Title;
}
$DB->query("\n\tSELECT UserID\n\tFROM requests_votes\n\tWHERE RequestID = {$RequestID}");
$UserIDs = $DB->to_array();
foreach ($UserIDs as $User) {
    list($VoterID) = $User;
    Misc::send_pm($VoterID, 0, "The request \"{$FullName}\" has been filled", 'One of your requests — [url=' . site_url() . "requests.php?action=view&id={$RequestID}]{$FullName}" . '[/url] — has been filled. You can view it here: [url]' . site_url() . "torrents.php?torrentid={$TorrentID}" . '[/url]');
}
$RequestVotes = Requests::get_votes_array($RequestID);
Misc::write_log("Request {$RequestID} ({$FullName}) was filled by user {$FillerID} ({$FillerUsername}) with the torrent {$TorrentID} for a " . Format::get_size($RequestVotes['TotalBounty']) . ' bounty.');
// Give bounty
$DB->query("\n\tUPDATE users_main\n\tSET Uploaded = (Uploaded + " . $RequestVotes['TotalBounty'] . ")\n\tWHERE ID = {$FillerID}");
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:take_fill.php

示例2: list

    $DB->query('
		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
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:upload.php

示例3: display_str

     $JumpLink = 'artist.php?id=' . $Result['PageID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
     break;
 case 'collages':
     $Links = 'Collage: <a href="collages.php?id=' . $Result['PageID'] . '">' . display_str($Result['CollageName']) . '</a>';
     $JumpLink = 'collages.php?action=comments&amp;collageid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
     break;
 case 'requests':
     if (!isset($Requests[$Result['PageID']])) {
         // Deleted request
         continue 2;
     }
     $Request = $Requests[$Result['PageID']];
     $CategoryName = $Categories[$Request['CategoryID'] - 1];
     $Links = 'Request: ';
     if ($CategoryName == 'Music') {
         $Links .= Artists::display_artists(Requests::get_artists($Result['PageID'])) . '<a href="requests.php?action=view&amp;id=' . $Result['PageID'] . '" dir="ltr">' . $Request['Title'] . " [" . $Request['Year'] . "]</a>";
     } elseif ($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
         $Links .= '<a href="requests.php?action=view&amp;id=' . $Result['PageID'] . '" dir="ltr">' . $Request['Title'] . " [" . $Request['Year'] . "]</a>";
     } else {
         $Links .= '<a href="requests.php?action=view&amp;id=' . $Result['PageID'] . '">' . $Request['Title'] . "</a>";
     }
     $JumpLink = 'requests.php?action=view&amp;id=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
     break;
 case 'torrents':
     if (!isset($TorrentGroups[$Result['PageID']])) {
         // Deleted or moved torrent group
         continue 2;
     }
     $GroupInfo = $TorrentGroups[$Result['PageID']];
     $Links = 'Torrent: ' . Artists::display_artists($GroupInfo['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupInfo['ID'] . '" dir="ltr">' . $GroupInfo['Name'] . '</a>';
     if ($GroupInfo['Year'] > 0) {
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:quote_notifications.php

示例4: implode

$Join[] = "JOIN comments ON comments.Page = '{$Action}' AND comments.PageID = {$Field1}";
$Join = implode("\n\t\t", $Join);
$Conditions = implode(" AND ", $Conditions);
$Conditions = $Conditions ? 'WHERE ' . $Conditions : '';
$SQL = "\n\tSELECT\n\t\tSQL_CALC_FOUND_ROWS\n\t\tcomments.AuthorID,\n\t\tcomments.Page,\n\t\tcomments.PageID,\n\t\t{$Field2},\n\t\tcomments.ID,\n\t\tcomments.Body,\n\t\tcomments.AddedTime,\n\t\tcomments.EditedTime,\n\t\tcomments.EditedUserID\n\tFROM {$Table}\n\t\t{$Join}\n\t{$Conditions}\n\tGROUP BY comments.ID\n\tORDER BY comments.ID DESC\n\tLIMIT {$Limit}";
$Comments = $DB->query($SQL);
$Count = $DB->record_count();
$DB->query("SELECT FOUND_ROWS()");
list($Results) = $DB->next_record();
$Pages = Format::get_pages($Page, $Results, $PerPage, 11);
$DB->set_query_id($Comments);
if ($Action == 'requests') {
    $RequestIDs = array_flip(array_flip($DB->collect('PageID')));
    $Artists = array();
    foreach ($RequestIDs as $RequestID) {
        $Artists[$RequestID] = Requests::get_artists($RequestID);
    }
    $DB->set_query_id($Comments);
} elseif ($Action == 'torrents') {
    $GroupIDs = array_flip(array_flip($DB->collect('PageID')));
    $Artists = Artists::get_artists($GroupIDs);
    $DB->set_query_id($Comments);
}
$LinkID = !$Self ? '&amp;id=' . $UserID : '';
$ActionLinks = $TypeLinks = array();
if ($Action != 'artist') {
    $ActionLinks[] = '<a href="comments.php?action=artist' . $LinkID . '" class="brackets">Artist comments</a>';
}
if ($Action != 'collages') {
    $ActionLinks[] = '<a href="comments.php?action=collages' . $LinkID . '" class="brackets">Collage comments</a>';
}
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:comments.php


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