<?php
define('PROTECTOR', 1);
include('files/path.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
$textl='Древние реликвии';
include($path.'files/core.php');
include($path.'files/head.php');
include($path.'files/zag.php');
if ($user_id == 1){
$relict = mysql_fetch_array(mysql_query("SELECT * FROM `relict` WHERE `usr` = '$log' LIMIT 1"));

echo'<div class="main"><div class="block_zero center"><span style="color: #9bc;">Собери реликвии и получи награду<br>Реликвии выпадают на  <img src="image/icon/arena.png" alt="*"><a href="arena.php"> Разботках</a>, за победу над противником</span></div><div class="mini-line"></div><div class="block_zero center">';

if(isSet($_GET['log'])){
if($_GET['log'] == '10'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '10' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `a1` = '0', `a2` = '0', `a3` = '0', `a4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
if($_GET['log'] == '20'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '20' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `b1` = '0', `b2` = '0', `b3` = '0', `b4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
if($_GET['log'] == '30'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '30' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `c1` = '0', `c2` = '0', `c3` = '0', `c4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
if($_GET['log'] == '40'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '40' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `d1` = '0', `d2` = '0', `d3` = '0', `d4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
if($_GET['log'] == '50'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '50' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `e1` = '0', `e2` = '0', `e3` = '0', `e4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
if($_GET['log'] == '60'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '60' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `f1` = '0', `f2` = '0', `f3` = '0', `f4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
if($_GET['log'] == '70'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '70' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `g1` = '0', `g2` = '0', `g3` = '0', `g4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
if($_GET['log'] == '80'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '80' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `h1` = '0', `h2` = '0', `h3` = '0', `h4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
if($_GET['log'] == '90'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '90' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `i1` = '0', `i2` = '0', `i3` = '0', `i4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
if($_GET['log'] == '100'){
mysql_query("UPDATE `users` SET `almaz` = `almaz` + '100' WHERE `usr` = '$log'");
mysql_query("UPDATE `relict` SET `j1` = '0', `j2` = '0', `j3` = '0', `j4` = '0' WHERE `usr` = '$log'");
header('Location: relic.php?');
$_SESSION['message'] = 'Награда получена!';
exit();
}
}

if($relict['a1']==1){$a1='1';}else{$a1='1-1';}
echo"<img src='image/relict/$a1.png'/> ";

if($relict['a2']==1){$a2='2';}else{$a2='2-1';}
echo"<img src='image/relict/$a2.png'/> ";

if($relict['a3']==1){$a3='3';}else{$a3='3-1';}
echo"<img src='image/relict/$a3.png'/> ";

if($relict['a4']==1){$a4='4';}else{$a4='4-1';}
echo"<img src='image/relict/$a4.png'/> ";

if($relict['a1']==1 AND $relict['a2']==1 AND $relict['a3']==1 AND $relict['a4']==1){
echo'<a class="btn" href="relic.php?log=10"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 10</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 10";
}

echo'</div><div class="mini-line"></div><div class="block_zero center">';

if($relict['b1']==1){$a5='5';}else{$a5='5-1';}
echo"<img src='image/relict/$a5.png'/> ";

if($relict['b2']==1){$a6='6';}else{$a6='6-1';}
echo"<img src='image/relict/$a6.png'/> ";

if($relict['b3']==1){$a7='7';}else{$a7='7-1';}
echo"<img src='image/relict/$a7.png'/> ";

if($relict['b4']==1){$a8='8';}else{$a8='8-1';}
echo"<img src='image/relict/$a8.png'/> ";

if($relict['b1']==1 AND $relict['b2']==1 AND $relict['b3']==1 AND $relict['b4']==1){
echo'<a class="btn" href="relic.php?log=20"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 20</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 20 ";
}

echo'</div><div class="mini-line"></div><div class="block_zero center">';

if($relict['c1']==1){$a9='9';}else{$a9='9-1';}
echo"<img src='image/relict/$a9.png'/> ";

if($relict['c2']==1){$a10='10';}else{$a10='10-1';}
echo"<img src='image/relict/$a10.png'/> ";

if($relict['c3']==1){$a11='11';}else{$a11='11-1';}
echo"<img src='image/relict/$a11.png'/> ";

if($relict['c4']==1){$a12='12';}else{$a12='12-1';}
echo"<img src='image/relict/$a12.png'/> ";

if($relict['c1']==1 AND $relict['c2']==1 AND $relict['c3']==1 AND $relict['c4']==1){
echo'<a class="btn" href="relic.php?log=30"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 30</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 30 ";
}

echo'</div><div class="mini-line"></div><div class="block_zero center">';

if($relict['d1']==1){$a13='13';}else{$a13='13-1';}
echo"<img src='image/relict/$a13.png'/> ";

if($relict['d2']==1){$a14='14';}else{$a14='14-1';}
echo"<img src='image/relict/$a14.png'/> ";

if($relict['d3']==1){$a15='15';}else{$a15='15-1';}
echo"<img src='image/relict/$a15.png'/> ";

if($relict['d4']==1){$a16='16';}else{$a16='16-1';}
echo"<img src='image/relict/$a16.png'/> ";

if($relict['d1']==1 AND $relict['d2']==1 AND $relict['d3']==1 AND $relict['d4']==1){
echo'<a class="btn" href="relic.php?log=40"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 40</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 40 ";
}

echo'</div><div class="mini-line"></div><div class="block_zero center">';

if($relict['e1']==1){$a17='17';}else{$a17='17-1';}
echo"<img src='image/relict/$a17.png'/> ";

if($relict['e2']==1){$a18='18';}else{$a18='18-1';}
echo"<img src='image/relict/$a18.png'/> ";

if($relict['e3']==1){$a19='19';}else{$a19='19-1';}
echo"<img src='image/relict/$a19.png'/> ";

if($relict['e4']==1){$a20='20';}else{$a20='20-1';}
echo"<img src='image/relict/$a20.png'/> ";

if($relict['e1']==1 AND $relict['e2']==1 AND $relict['e3']==1 AND $relict['e4']==1){
echo'<a class="btn" href="relic.php?log=50"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 50</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 50";
}

echo'</div><div class="mini-line"></div><div class="block_zero center">';

if($relict['f1']==1){$a21='21';}else{$a21='21-1';}
echo"<img src='image/relict/$a21.png'/> ";

if($relict['f2']==1){$a22='22';}else{$a22='22-1';}
echo"<img src='image/relict/$a22.png'/> ";

if($relict['f3']==1){$a23='23';}else{$a23='23-1';}
echo"<img src='image/relict/$a23.png'/> ";

if($relict['f4']==1){$a24='24';}else{$a24='24-1';}
echo"<img src='image/relict/$a24.png'/> ";

if($relict['f1']==1 AND $relict['f2']==1 AND $relict['f3']==1 AND $relict['f4']==1){
echo'<a class="btn" href="relic.php?log=60"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 60</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 60 ";
}

echo'</div><div class="mini-line"></div><div class="block_zero center">';

if($relict['g1']==1){$a25='25';}else{$a25='25-1';}
echo"<img src='image/relict/$a25.png'/> ";

if($relict['g2']==1){$a26='26';}else{$a26='26-1';}
echo"<img src='image/relict/$a26.png'/> ";

if($relict['g3']==1){$a27='27';}else{$a27='27-1';}
echo"<img src='image/relict/$a27.png'/> ";

if($relict['g4']==1){$a28='28';}else{$a28='28-1';}
echo"<img src='image/relict/$a28.png'/> ";

if($relict['g1']==1 AND $relict['g2']==1 AND $relict['g3']==1 AND $relict['g4']==1){
echo'<a class="btn" href="relic.php?log=70"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 70</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 70 ";
}

echo'</div><div class="mini-line"></div><div class="block_zero center">';

if($relict['h1']==1){$a29='29';}else{$a29='29-1';}
echo"<img src='image/relict/$a29.png'/> ";

if($relict['h2']==1){$a30='30';}else{$a30='30-1';}
echo"<img src='image/relict/$a30.png'/> ";

if($relict['h3']==1){$a31='31';}else{$a31='31-1';}
echo"<img src='image/relict/$a31.png'/> ";

if($relict['h4']==1){$a32='32';}else{$a32='32-1';}
echo"<img src='image/relict/$a32.png'/> ";

if($relict['h1']==1 AND $relict['h2']==1 AND $relict['h3']==1 AND $relict['h4']==1){
echo'<a class="btn" href="relic.php?log=80"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 80</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 80 ";
}

echo'</div><div class="mini-line"></div><div class="block_zero center">';

if($relict['i1']==1){$a33='33';}else{$a33='33-1';}
echo"<img src='image/relict/$a33.png'/> ";

if($relict['i2']==1){$a34='34';}else{$a34='34-1';}
echo"<img src='image/relict/$a34.png'/> ";

if($relict['i3']==1){$a35='35';}else{$a35='35-1';}
echo"<img src='image/relict/$a35.png'/> ";

if($relict['i4']==1){$a36='36';}else{$a36='36-1';}
echo"<img src='image/relict/$a36.png'/> ";

if($relict['i1']==1 AND $relict['i2']==1 AND $relict['i3']==1 AND $relict['i4']==1){
echo'<a class="btn" href="relic.php?log=90"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 90</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 90 ";
}

echo'</div><div class="mini-line"></div><div class="block_zero center">';

if($relict['j1']==1){$a37='37';}else{$a37='37-1';}
echo"<img src='image/relict/$a37.png'/> ";

if($relict['j2']==1){$a38='38';}else{$a38='38-1';}
echo"<img src='image/relict/$a38.png'/> ";

if($relict['j3']==1){$a39='39';}else{$a39='39-1';}
echo"<img src='image/relict/$a39.png'/> ";

if($relict['j4']==1){$a40='40';}else{$a40='40-1';}
echo"<img src='image/relict/$a40.png'/> ";

if($relict['j1']==1 AND $relict['j2']==1 AND $relict['j3']==1 AND $relict['j4']==1){
echo'<a class="btn" href="relic.php?log=100"><span class="end"><span class="label">Награда <img src="image/icon/almaz.png" alt="*"> 100</span></span></a>';
}else{
echo"<br><span style='color: #9bc;'>Награда:</span> <img src='image/icon/almaz.png'/> 100 ";
}

echo'</div><div class="mini-line"></div><div class="main"><ul class="hint"><li>Реликвии можно найти сражаясь на  <img src="image/icon/arena.png" alt="*"><a href="arena.php"> Разборках</a></li><li>Древние реликвии - это набор вещей, которые вам надо собрать, что бы получить награду</li></ul></div></div></div>';

echo"</div></div>";
}
include($path.'files/down.php');
?>