game/obraz.php

118 lines
4.0 KiB
PHP

<?php
use Core\Db;
if (!defined('GAME_VERSION')) {
require_once '_incl_data/autoload.php';
}
$urla = explode('?', $_SERVER["REQUEST_URI"]);
$url = explode('/', $urla[0]);
$rv = explode('i', $url[2]);
$rv = (int)$rv[1];
$sp = [];
$str = 'Выберите один из разделов слева, чтобы отобразить образы<br>';
if (in_array($rv, [1, 2])) {
if ($rv == 1) {
$sex = 0;
//Мужские стандартные
} else {
$sex = 1;
//Женские стандартные
}
$sp = Db::getRows(
'select * from obraz where sex = ? and usr_add = 0 and align = 0 and clan = 0 and login = \'\' and tr = \'\' and itm = 0 and uid = 0',
[$sex]
);
}
if ($rv === 3) {
$sp = Db::getRows('select * from obraz where login != \'\' or uid != 0');
}
if (!empty($sp)) {
$str = '';
foreach ($sp as $itm) {
if (empty($itm['name'])) {
$itm['name'] = 'Образ №' . $itm['id'];
}
if (!empty($itm['uid'])) {
$itm['login'] = Db::getValue('select login from users where id = ?', [$itm['uid']]);
}
if (!empty($itm['login'])) {
$itm['name'] = $itm['login'];
}
$imgsrc = "//img.new-combats.tech/i/obraz/{$itm['sex']}/{$itm['img']}";
$str .= <<<HTML
<figure style="border:1px dashed grey; float: left; margin: 5px;">
<img src="$imgsrc" alt={$itm['name']} title={$itm['name']} width="120" height="220">
<figcaption style="text-align: center;">{$itm['name']}</figcaption>
</figure>
HTML;
}
}
?>
<!DOCTYPE HTML>
<html lang="ru">
<head>
<title>Новый Бойцовский клуб | Библиотека образов</title>
<link rel="stylesheet" href="/main1.css">
<link rel="stylesheet" href="/css/obraz.css">
</head>
<body>
<div class="header">
<img class="logo" src="/inx/newlogo3.jpg" alt="logo" title="logo">
</div>
<table class="main">
<tr style="vertical-align: top;">
<td style="width: 29px; background-image: url(/forum_script/img/leftground.jpg);"
rowspan=2>
<img src="//img.new-combats.tech/i/encicl/obrzz_08.jpg" width="29" height="256" alt="">
</td>
<td style="width: 218px; height: 257px;">
<img id="imleft2" src="//img.new-combats.tech/i/encicl/obrzz_04.jpg" width="118" height="257" alt="">
<BR>
</td>
<td rowspan=2>
<h2>Библиотека образов Бойцовского Клуба</h2>
<img src="//img.new-combats.tech/i/encicl/ln3.jpg" width="400" height="1" alt="hr"><br>
<?= $str ?>
</td>
<td style='padding-left: 3px; text-align: right;'>
<img id="imright2" height=144 src="//img.new-combats.tech/i/encicl/obrzz1.jpg" width=139 alt="">
</td>
<td style="vertical-align: top; background-image: url(/forum_script/img/rightground.jpg)">
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr>
<td style="vertical-align: top;">
<span style="color: #8f0000; font-weight: bold;">Образы персонажей</span>
<hr>
<strong>Мужские</strong><br>
<ul>
<li><a href="/shadow/i1">Стандартные</a></li>
</ul>
<br>
<strong>Женские</strong><br>
<ul>
<li><a href="/shadow/i2">Стандартные</a></li>
</ul>
<br>
· <a href="/shadow/i3">Именные</a>
</td>
<td style="padding-bottom:50px; text-align: right; vertical-align: bottom;">
<IMG height=236 src="//img.new-combats.tech/i/encicl/pictr_subject.jpg" width=128 alt="">
</td>
<td style="width: 23px; vertical-align: top; background-image: url(/forum_script/img/rightground.jpg);">
&nbsp;
</td>
</tr>
</table>
<div class="footer">Copyright © <?= date('Y') ?> «www.new-combats.com»</div>
</body>
</html>