View file sdark.mobi/labyrinth/index.php

File size: 1.3Kb
<?
require_once'../core/system.php';
echo only_reg();
echo ban();
echo blok();
$header='Лабиринт';
require_once'../core/head.php';
mysql_query("UPDATE `user` set `mesto` = 'Лабиринт', `battle` = '0' where `id` = '".$user['id']."'");

if($user['level'] < 40){
header('location: /'); 
$_SESSION['err'] = 'Доступно только с 40 уровня';
}
if($user['prava'] < 4){
header('location: /'); 
$_SESSION['err'] = 'Раздел временно в разработке!';
}
?>
<div class="menu center">
<table class="menu" width="100%">
<tbody>
<tr>
<?php

$data = $dbh->prepare("SELECT * FROM `decor` WHERE `usr` = ".$ank['id']." and `wear`='1' ORDER by `place` ASC LIMIT 25");
$data->execute([$user['id']]);
$data = $data->fetchAll(PDO::FETCH_ASSOC);
$elem = 0;
for ($i = 1; $i <= 36; $i++ ) {

	$thing = $data[$elem];
	if (is_array($thing)) {
		$thing_exists = true;
	} else {
		$thing_exists = false;
	}
	
	echo'<td width="16%"  class="List center" style="background-color: rgba(54, 66, 63, 0.49); height:35px; border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
	'.($thing_exists == true ? 'тут +' : '<img src="/images/icon/dead.png">').'
	</br>
	</a>
	</td>';

if( $i % 6 == 0 ){
		echo '</tr>';
	} 
	$elem++; 
}
?>
</tbody>
</table>
</div>
<?php
require_once'../core/foot.php';
?>