Вход Регистрация
Файл: mp3/index.php
Строк: 106
<?php
include_once '../sys/inc/start.php';
include_once 
'../sys/inc/compress.php';
include_once 
'../sys/inc/sess.php';
include_once 
'../sys/inc/home.php';
include_once 
'../sys/inc/settings.php';
include_once 
'../sys/inc/db_connect.php';
include_once 
'../sys/inc/ipua.php';
include_once 
'../sys/inc/fnc.php';
include_once 
'../sys/inc/user.php';

$set['title'] = 'Поиск музыки';
include_once 
'../sys/inc/thead.php';
title();
aut();

echo 
'<table style="text-align:center;" class="mess" cellspacing="0" cellpadding="0">
<td class="panel" style="border-right:none;">Музыка</td>
<td><a class="panel" href="radio.php">Радио</a></td>
</table>'
;

// Класс плеера
require 'class.PlayerJsTpl.php'; 
include 
'conf.php';
include 
'CurlClass.php';

$c = new CurlClassConfig;
$c->timeout = 10;
$c->followLocations = FALSE;
$curl = new CurlClass;

$search = isset($_GET['search']) ? htmlspecialchars(trim($_GET['search'])) : false;
$page = isset($_GET['page']) ? htmlspecialchars(trim($_GET['page'])) : false;
$q = isset($_GET['q']) ? htmlspecialchars(trim($_GET['q'])) : false;
$file = $curl->getPage ($c, 'http://poiskm.org/show/' . $search . '?page=' . $page);

switch (
$q) 
{
    default:
    echo 
'<div class="mess">
          <form action="' 
. $papka . '" method="get">
          <input placeholder="Введите текст для поиска..." type="search" name="search" value="">
          <input name="page" type="hidden" value="1"/>
          <input name="q" type="hidden" value="files"/>
          <input type="submit" value="Искать">
          </form></div>'
;
    break;

    case 
'files':
    echo 
'<div class="mess">Ваш запрос: ' . $search . '<br/>
          <form action="' 
. $papka . '" method="get">
          <input placeholder="Введите текст для поиска..." type="search" id="playerQuery" name="search" value="' 
. $search . '">
          <input name="page" type="hidden" value="1"/>
          <input name="q" type="hidden" value="files" />
          <input type="submit" value="Искать">
          </form></div>'
;
    
    
preg_match_all('#id="audio_src_(.*)"(.*)href="(.*)">(.*)</a>(.*)<span class="title-name">(.*)<(.*)<span class="duration">(.*)<#sU', $file, $zona);
    
preg_match_all('#page=(.*)">(.*)</a>#sU', $file, $pages_all);
    
    
$pages = 1;
    if (
count($pages_all[1]) >= 2) {
        
$pages = count($pages_all[1]) - 1;
    }
    
    
$chunk = array_chunk($zona[1], 7, true);
    
    
PlayerJsTpl::InitJsCss(); 
    
PlayerJsTpl::getPlayer($zona[1][0], $zona[1][count($chunk[0]) - 1], $page, $pages); 
    
    
?><div id="ajaxContent"><?
    
    
if ($chunk[0]) {
        if (isset(
$_GET['ajaxData'])) {
            
ob_end_clean();
        }
        
        for(
$i = 0; $i < count($chunk[0]); $i++)
        {
            
$num++;
            
PlayerJsTpl::getPlayerMini($i, $zona); 
        }
        
        if (isset(
$pages_all[1]) && count($pages_all[1]) >= 2) {
            
ob_start(); 
            
str($papka . '?q=files&search=' . $search . '&', $pages, $page);
            
$str = ob_get_contents(); 
            
ob_end_clean();
            
            echo 
str_replace('end',  $pages, $str); 
        }
        
        if (isset(
$_GET['ajaxData'])) {
            die(); 
        }
    } else {
        echo 
'<div class="gmenu">Нет результатов</div>';
    }
    
?></div><?
}

PlayerJsTpl::Init(); 

include_once 
'../sys/inc/tfoot.php';
?>
Онлайн: 3
Реклама