<?php
require'../config.php';
$align='left';
$title='Найди свою музыку!';
aut();
head();
who_add(0, 'enter'); ///кто онлайн
////$pageTitle = 'Поиск музыки';

///require('sys/head.php');


?>
    <form action="spisok.php" method="POST">
    <b>Какую музыку ищем?</b><br />
    <input type="text" name="search" maxlength="30" /><br />
    <input type="submit" value="Найти"/>
    </form><br /> 

<?php
/*if($user['level']== 9) echo 'В Базе ' . $db->sql_fetchfield($db->sql_query("SELECT count(*) as num FROM poisk"), 0) . ' записей<br />';
echo '<b>История поиска в mp3</b><br />';
$mess = @$db->sql_query(@"SELECT * from `poisk` order by `time` DESC limit 10");
while ($res = @$db->sql_fetchrow($mess))
{
	if($user['level']== 9)
	{
		echo nik($res['user_id']).'<b>:</b> '.$res['mess'].'<br />';
	}else
	{
		echo $res['mess'].'<br />';
	}
}*/
if($user['level']== 9){

echo '<br />Загруженные файлы в разделе get!<br />';


$dirct = 'get/';
$hdl = opendir($dirct);
$files = array();

while ($row = readdir($hdl)) 
{
   if ($row != '.' && $row != '..')
   {
      $files[] = $row;        
   }
}
closedir($hdl); 

foreach ($files as $print) 
{
	$time=$time_sec-$time_file; 
	$filess = "$dirct$print";
	$sss = filesize($filess);
	// текущее время 
	$time_sec=time(); 
	// время изменения файла 
	$time_file=filemtime($filess); 
	// тепрь узнаем сколько прошло времени (в секундах) 
	$size = ' Размер: '. round($sss/1024/1024,2).'Mb';
	
   echo "<a href = $dirct$print>$print</a>".$size."<br/>";
	///echo '<object type="application/x-shockwave-flash" id="player1" allowscriptaccess="always" allowfullscreen="true" data="OriginalThinMusicPlayer.swf" width="220" height="21"><param name="movie" value="OriginalThinMusicPlayer.swf" /><param name="FlashVars" value="mediaPath='.$dirct.''.$print.'" /></object><br/ >';
echo '<object type="application/x-shockwave-flash" data="audio_player.swf" id="audioplayer1" height="24" width="288">  
    <param name="movie" value="audio_player.swf"></param>  
    <param name="FlashVars" value="playerID=1&autostart=no&bg=0xffffff&loader=0xefcda5&border=0xff8b00&text=0x945100&leftbg=0xff8b00&lefticon=0xffffff&righticon=0xffffff&slider=0xff8b00&rightbg=0xff8b00&soundFile='.$dirct.''.$print.'"></param>  
    <param name="quality" value="high"></param>  
    <param name="menu" value="false"></param>  
    <param name="wmode" value="transparent"></param>  
</object><br />';
	}

echo 'Скаченные файлы в разделе temp!<br />';


$dirct = 'temp/';
$hdl = opendir($dirct);
$files = array();

while ($row = readdir($hdl)) 
{
   if ($row != '.' && $row != '..')
   {
      $files[] = $row;        
   }
}
closedir($hdl); 

foreach ($files as $print) 
{
$time=$time_sec-$time_file; 
	$filess = "$dirct$print";
	$sss = filesize($filess);
	// текущее время 
	$time_sec=time(); 
	// время изменения файла 
	$time_file=filemtime($filess); 
	// тепрь узнаем сколько прошло времени (в секундах) 
	$size = ' Размер: '. round($sss/1024/1024,2).'Mb';
	
   echo "<a href = $dirct$print>$print</a>".$size."<br/>";
   ///echo '<object type="application/x-shockwave-flash" id="player1" allowscriptaccess="always" allowfullscreen="true" data="OriginalThinMusicPlayer.swf" width="220" height="21"><param name="movie" value="OriginalThinMusicPlayer.swf" /><param name="FlashVars" value="mediaPath='.$dirct.''.$print.'" /></object><br/ >';
echo '<object type="application/x-shockwave-flash" data="audio_player.swf" id="audioplayer1" height="24" width="288">  
    <param name="movie" value="audio_player.swf"></param>  
    <param name="FlashVars" value="playerID=1&autostart=no&bg=0xffffff&loader=0xefcda5&border=0xff8b00&text=0x945100&leftbg=0xff8b00&lefticon=0xffffff&righticon=0xffffff&slider=0xff8b00&rightbg=0xff8b00&soundFile='.$dirct.''.$print.'"></param>  
    <param name="quality" value="high"></param>  
    <param name="menu" value="false"></param>  
    <param name="wmode" value="transparent"></param>  
</object><br />';
   }


}


if ($_SERVER['PHP_SELF'] == '/index.php' && empty ($_GET)): ?>

<?php endif; ?>

<?php
    require('sys/foot.php');
	
	
echo gb.'<a href="'.H.'enter">Прихожая</a>'.div;
foot();
?>