Вход Регистрация
Файл: audio/artist.php
Строк: 148
<?php

require_once '../incfiles/core.php';
require_once 
'../incfiles/func.php';
require_once 
'../incfiles/auth.php';
require_once 
'../incfiles/user.php';



$id intval($_GET['artist']);
$artist=mysql_fetch_array(mysql_query("SELECT * FROM `audio` WHERE `id` = '$id'  LIMIT 1"));
$artist=$artist['artist'];    

    
$title $artist;
    require_once 
'../incfiles/head.php';
    


    
    echo 
'<div class="title">
    <a href="'
.URL.'/?id='.$id.'" onclick="Page.Go(this.href); return false">'.$user['name'].' '.$user['surname'].'</a>
    <a class="title_a_hover" href="'
.URL.'/audio/?id='.$id.'" onclick="Title.Open(); return false">'.lang('Загрузить','Завантажити').'</a>
    <a class="title_a_hover" href="'
.URL.'/audio/cat.php" onclick="Page.Go(this.href); return false">'.lang('Каталог','Каталог').'</a>
    <a class="title_a_hover" href="'
.URL.'/audio/top_users.php" onclick="Page.Go(this.href); return false">'.lang('Топ меломанов','Топ меломанів').'</a>
    <a class="title_a_hover" href="'
.URL.'/audio/search.php" onclick="Page.Go(this.href); return false">'.lang('Поиск','Пошук').'</a>
    <a class="title_a_hover" href="'
.URL.'/ajax/radio.php" onclick="FormContent_head_radio.headradio(this.href); return false">'.lang('Радио','Радіо').'</a>
    </div>'
;
    if (!empty(
$user_id))
    {
    
        require_once 
'handler/del.php';
    
        echo 
'<div id="title_menu">
        <div class="block">
        <form'
.($site_version == 'default'?' id="form"':'').' action="'.URL.'/audio/?id='.$user_id.'" method="post" enctype="multipart/form-data">
        <input class="input2" name="file" type="file"/> 
        <input class="button2" type="submit" value="'
.lang('Загрузить','Завантажити').'"/>
        </form>
        </div></div>'
;
        echo 
'<p><div class="time">';
    }
    
$vowels = array(" ");
    
$artist_ str_replace($vowels"_"$artist);
/*if (mysql_result(mysql_query("SELECT COUNT(*) FROM `groups_wall` WHERE `text` LIKE '%$artist%' or `text` LIKE '%$artist_%'"),0)!=0)
{
    $arr_comm = mysql_query("SELECT * FROM `groups_wall` WHERE text LIKE '%$artist%' or `text` LIKE '%$artist_%' ORDER BY `clike` DESC LIMIT 3");
    echo '<center>';
           while ($arr = mysql_fetch_array($arr_comm))
        {
            
    if (!empty($arr['photos']))
        {
            
            $q = explode("||", substr($arr['photos'], 1, -1));
            $count = count($q);
            for ($i = 0; $i < $count; $i++)
            {
                if (file_exists(HOME .'/files/'.($arr['from_group']>0?'groups/wall/'.$arr['wall_id']:'wall/'.$arr['user_id']).'/photos/'.$q[$i])) echo '<img class="'.($count>1?'preview_mini':'preview_mini').'" src="'.URL.'/files/'.($arr['from_group']>0?'groups/wall/'.$arr['wall_id']:'wall/'.$arr['user_id']).'/photos/'.($count>1?'mini':'preview').'/'.$q[$i].'"/></a>';
                else echo '<img class="preview_mini" src="'.URL.'/design/img/image_not_found.png"/>';
            }
            
        }
          
        }
     echo '</center>'; 
        }*/
function wikidefinition($s) {
//ENGLISH WIKI
    
global $user;
    if(
$user['lang']=='ru')$lng='ru';else $lng='uk';
    
$url "http://$lng.wikipedia.org/w/api.php?action=opensearch&search=".urlencode($s)."&format=xml&limit=1";
    
$ch curl_init($url);
    
curl_setopt($chCURLOPT_HTTPGETTRUE);
    
curl_setopt($chCURLOPT_POSTFALSE);
    
curl_setopt($chCURLOPT_HEADERfalse);
    
curl_setopt($chCURLOPT_NOBODYFALSE);
    
curl_setopt($chCURLOPT_VERBOSEFALSE);
    
curl_setopt($chCURLOPT_REFERER"");
    
curl_setopt($chCURLOPT_FOLLOWLOCATIONTRUE);
    
curl_setopt($chCURLOPT_MAXREDIRS4);
    
curl_setopt($chCURLOPT_RETURNTRANSFERTRUE);
    
curl_setopt($chCURLOPT_USERAGENT"Mozilla/5.0 (Windows; U; Windows NT 6.1; he; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8");

    
$page curl_exec($ch);
    
$xml simplexml_load_string($page);
    if((string)
$xml->Section->Item->Description) {
        return array((string)
$xml->Section->Item->Text
                     (string)
$xml->Section->Item->Description,
                     (string)
$xml->Section->Item->Url);
    } else {
        return 
"";
    }
}
//END OF FUNCTION WIKIDEFINITIONS


//USE OF FUNCTION

//$data = wikidefinition($artist) ;
//var_dump( wikidefinition('bangladesh') ) ; //displays the array content
//echo "<center><h3>". $data[0] . "</h3></center>";
//echo "" . $data[1]  . "<br/>";



if (mysql_result(mysql_query("SELECT COUNT(*) FROM `audio` WHERE `artist` LIKE '%$artist%'"),0)!=0)    
{
    
$cp ceil($all/30);
    
$p = (isset($_GET['p']) and is_numeric($_GET['p']) and $_GET['p']>and $_GET['p']<=$cp) ? $_GET['p'] : 1;
    
$start $p*30-30;
    
$res mysql_query("SELECT * FROM `audio`  WHERE `artist` LIKE '%$artist%' ORDER by `time` DESC LIMIT $start,30");
    while (
$arr mysql_fetch_array($res)){
           
$track_num $track_num+1;
     if(
$arr['dir']!=$user['id'])$add=true;else$add=false;
     if(
$add==true)$add_me='<a href="'.URL.'/audio/refresh_playlist.php?id=track_'.$arr['id'].'" onclick="Window.Open(this.href); return false"><div class="right"><i class="fa fa-plus"></i></div></a>';
     else
$add_me=false;
     if(!empty(
$arr['lyrics']))$lyrics '<a href="'.URL.'/audio/lyrics.php?lyrics='.$arr['id'].'" onclick="Window.Open(this.href); return false"><b>'.$arr['name'].'</b></a>';
     else 
$lyrics $arr['name'];
  
       
     echo 
'<div class="block">
     '
.(!empty($user_id) && $user_id==$id?'<div class="right"><a href="'.URL.'/audio/?id='.$user_id.'&del='.$arr['id'].'&p='.$p.'" onclick="Page.Go(this.href); return false"><img src="'.URL.'/design/img/closed.png"/></a>
        </div>'
:'').'
        <div class="track" id="track_'
.$track_num.'" track-id="'.$arr['id'].'" data-mp3="'.URL.'/files/audio/'.$arr['dir'].'/'.$arr['file'].'"><img class="track" id="'.$track_num.'" name="<strong>'.$arr['artist'].'</strong> - '.$arr['name'].'" src="'.URL.'/design/img/play.png" onclick="Audio.Play(this.id);"/> '.(!empty($target)?'<a href="'.URL.'/audio/select.php?fid='.$arr['id'].'&target='.check($_GET['target']).'&from='.abs(intval($_GET['from'])).'" onclick="Page.Go(this.href); return false"><b>'.$arr['artist'].'</b> - '.$arr['name'].'</a>':'').'
        <span class="author"><b><a href="'
.URL.'/audio/artist.php?artist='.$arr['id'].'" onclick="Page.Go(this.href); return false"><b>'.$arr['artist'].'</b></a></b></span> - <span class="name">'.$lyrics.'</span> '.(!empty($arr['duration'])?'<font class="time"><small>('.$arr['duration'].')</small></font>':'').'<small>[<a href="'.URL.'/?id='.$arr['dir'].'" onclick="Page.Go(this.href); return false">'.user_name3($arr['dir'],1,1).']</a>'.$add_me.'</small></div></div>';
    
    
    }

    
navi($p,$cp,'/audio/artist.php?id='.$arr_user['id'].'&');
}
        
        

require_once 
'../incfiles/foot.php';


?>
Онлайн: 0
Реклама