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


PHP Artists::normalise_artist_name方法代码示例

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


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

示例1: array

    				$Err = "You seem to have put something other than an EAC or XLD log file into an upload field. (".$FileType.")";
    				break;
    			}
    		}
    	*/
}
//Multiple artists!
$LogName = '';
if (empty($Properties['GroupID']) && empty($ArtistForm) && $Type == 'Music') {
    $MainArtistCount = 0;
    $ArtistNames = array();
    $ArtistForm = array(1 => array(), 2 => array(), 3 => array(), 4 => array(), 5 => array(), 6 => array());
    for ($i = 0, $il = count($Artists); $i < $il; $i++) {
        if (trim($Artists[$i]) != '') {
            if (!in_array($Artists[$i], trim($ArtistNames))) {
                $ArtistForm[$Importance[$i]][] = array('name' => Artists::normalise_artist_name($Artists[$i]));
                if ($Importance[$i] == 1) {
                    $MainArtistCount++;
                }
                $ArtistNames[] = trim($Artists[$i]);
            }
        }
    }
    if ($MainArtistCount < 1) {
        $Err = 'Please enter at least one main artist';
        $ArtistForm = array();
    }
    $LogName .= Artists::display_artists($ArtistForm, false, true, false);
} elseif ($Type == 'Music' && empty($ArtistForm)) {
    $DB->query("\n\t\tSELECT ta.ArtistID, aa.Name, ta.Importance\n\t\tFROM torrents_artists AS ta\n\t\t\tJOIN artists_alias AS aa ON ta.AliasID = aa.AliasID\n\t\tWHERE ta.GroupID = " . $Properties['GroupID'] . "\n\t\tORDER BY ta.Importance ASC, aa.Name ASC;");
    while (list($ArtistID, $ArtistName, $ArtistImportance) = $DB->next_record(MYSQLI_BOTH, false)) {
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:upload_handle.php

示例2: authorize

authorize();
$UserID = $LoggedUser['ID'];
$GroupID = db_string($_POST['groupid']);
$Importances = $_POST['importance'];
$AliasNames = $_POST['aliasname'];
if (!is_number($GroupID) || !$GroupID) {
    error(0);
}
$DB->query("\n\tSELECT Name\n\tFROM torrents_group\n\tWHERE ID = {$GroupID}");
if (!$DB->has_results()) {
    error(404);
}
list($GroupName) = $DB->next_record(MYSQLI_NUM, false);
$Changed = false;
for ($i = 0; $i < count($AliasNames); $i++) {
    $AliasName = Artists::normalise_artist_name($AliasNames[$i]);
    $Importance = $Importances[$i];
    if ($Importance != '1' && $Importance != '2' && $Importance != '3' && $Importance != '4' && $Importance != '5' && $Importance != '6' && $Importance != '7') {
        break;
    }
    if (strlen($AliasName) > 0) {
        $DB->query("\n\t\t\tSELECT AliasID, ArtistID, Redirect, Name\n\t\t\tFROM artists_alias\n\t\t\tWHERE Name = '" . db_string($AliasName) . "'");
        while (list($AliasID, $ArtistID, $Redirect, $FoundAliasName) = $DB->next_record(MYSQLI_NUM, false)) {
            if (!strcasecmp($AliasName, $FoundAliasName)) {
                if ($Redirect) {
                    $AliasID = $Redirect;
                }
                break;
            }
        }
        if (!$AliasID) {
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:add_alias.php


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