<?
/*
=====================================================
 Volkov NET!! - by SaNcHeS Group 
-----------------------------------------------------
 http://AllForCS.RU/
-----------------------------------------------------
 Copyright (c) 2009 SaNcHeS Group
=====================================================
 Данный код защищен авторскими правами
=====================================================
 Файл: chk.php
-----------------------------------------------------
 Назначение: Проверка дублирования песен
=====================================================
*/
include("./../inc/config.php");
include("./auth.php");
include("./html.php");
include("./../inc/info.php");
?>
<link rel="stylesheet" href="../inc/comments.css" type="text/css">
<body bgcolor=#FFFFF4>
<table cellpadding="10" cellspacing="10" width="100%" height="100%">
    <tr>
        <td valign="top">
            <p align="left">
<?
$GUR1=safe_str($_GET['artist']);
$GUR2=safe_str($_GET['title']);

if ($_GET['artist']){
$sql=mysql_query("SELECT * FROM `m3_mp3` WHERE `artist` LIKE '%".$GUR1."%' ORDER BY `artist`;") or die(mysql_error());
if ($sql && @mysql_num_rows($sql)>0){
while ($row = @mysql_fetch_array($sql, MYSQL_ASSOC))
{

$w_id=$row['id'];
$w_artist=unsafe_str($row['artist']);
$w_track=unsafe_str($row['track']);
$w_size=$row['size'];
$w_uploader=$row['uploader'];
$w_date=$row['date'];
$v_link=$WWW."pages/".get_dir($w_id)."/".$w_id.".shtml";
echo "&nbsp;&raquo; <a href=\"".$v_link."\" target=\"_blank\">".$w_artist." - ".$w_track."</a><br>";

}}
if ($w_id == ""){echo "<br><br><br><br><br><br><center><b>Совпадений нет!</b></center>";}
@mysql_free_result($sql);echo "</p></td></tr></table>";exit;}

if ($_GET['title']){
$sql=mysql_query("SELECT * FROM `m3_mp3` WHERE `track` LIKE '%".$GUR2."%';") or die(mysql_error());
if ($sql && @mysql_num_rows($sql)>0){
while ($row = @mysql_fetch_array($sql, MYSQL_ASSOC))
{

$w_id=$row['id'];
$w_artist=$row['artist'];
$w_track=$row['track'];
$w_size=$row['size'];
$w_uploader=$row['uploader'];
$w_date=$row['date'];
$v_link=$WWW."pages/".get_dir($w_id)."/".$w_id.".shtml";
echo "&nbsp;&raquo; <a href=\"".$v_link."\" target=\"_blank\">".$w_artist." - ".$w_track."</a><br>";

}}
if ($w_id == ""){echo "<br><br><br><br><br><br><center><b>Совпадений нет!</b></center>";}
@mysql_free_result($sql);echo "</p></td></tr></table>";exit;}

echo "<br><br><br><br><br><br><center><b>Ничего не введено!</b></center></p></td></tr></table>";

?>