game/obraz.php

118 lines
4.0 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?php
2022-12-30 19:03:37 +00:00
use Core\Db;
2022-12-19 18:26:14 +00:00
if (!defined('GAME_VERSION')) {
require_once '_incl_data/autoload.php';
}
2022-12-19 18:26:14 +00:00
$urla = explode('?', $_SERVER["REQUEST_URI"]);
$url = explode('/', $urla[0]);
$rv = explode('i', $url[2]);
$rv = (int)$rv[1];
$sp = [];
2023-01-10 16:29:32 +00:00
$str = 'Выберите один из разделов слева, чтобы отобразить образы<br>';
2022-12-19 18:26:14 +00:00
if (in_array($rv, [1, 2])) {
if ($rv == 1) {
$sex = 0;
2023-01-10 16:29:32 +00:00
//Мужские стандартные
2022-12-19 18:26:14 +00:00
} else {
$sex = 1;
2023-01-10 16:29:32 +00:00
//Женские стандартные
2022-12-19 18:26:14 +00:00
}
$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]
);
2022-06-06 21:30:34 +00:00
}
2022-12-19 18:26:14 +00:00
if ($rv === 3) {
$sp = Db::getRows('select * from obraz where login != \'\' or uid != 0');
2022-06-06 21:30:34 +00:00
}
2022-12-19 18:26:14 +00:00
if (!empty($sp)) {
$str = '';
foreach ($sp as $itm) {
if (empty($itm['name'])) {
2023-01-10 16:29:32 +00:00
$itm['name'] = 'Образ №' . $itm['id'];
2022-12-19 18:26:14 +00:00
}
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']}";
2022-12-19 18:26:14 +00:00
$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;
}
2022-06-06 21:30:34 +00:00
}
?>
<!DOCTYPE HTML>
2022-12-19 18:26:14 +00:00
<html lang="ru">
2022-06-06 21:30:34 +00:00
<head>
2023-01-10 16:29:32 +00:00
<title>Новый Бойцовский клуб | Библиотека образов</title>
2022-12-19 18:26:14 +00:00
<link rel="stylesheet" href="/main1.css">
<link rel="stylesheet" href="/css/obraz.css">
2022-06-06 21:30:34 +00:00
</head>
2022-12-19 18:26:14 +00:00
<body>
<div class="header">
<img class="logo" src="/inx/newlogo3.jpg" alt="logo" title="logo">
2022-12-19 18:26:14 +00:00
</div>
<table class="main">
<tr style="vertical-align: top;">
<td style="width: 29px; background-image: url(/forum_script/img/leftground.jpg);"
2022-12-19 18:26:14 +00:00
rowspan=2>
<img src="//img.new-combats.tech/i/encicl/obrzz_08.jpg" width="29" height="256" alt="">
2022-12-19 18:26:14 +00:00
</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="">
2022-12-19 18:26:14 +00:00
<BR>
</td>
<td rowspan=2>
2023-01-10 16:29:32 +00:00
<h2>Библиотека образов Бойцовского Клуба</h2>
<img src="//img.new-combats.tech/i/encicl/ln3.jpg" width="400" height="1" alt="hr"><br>
2022-12-19 18:26:14 +00:00
<?= $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="">
2022-12-19 18:26:14 +00:00
</td>
<td style="vertical-align: top; background-image: url(/forum_script/img/rightground.jpg)">
2022-12-19 18:26:14 +00:00
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
2022-06-06 21:30:34 +00:00
<tr>
2022-12-19 18:26:14 +00:00
<td style="vertical-align: top;">
2023-01-10 16:29:32 +00:00
<span style="color: #8f0000; font-weight: bold;">Образы персонажей</span>
2022-12-19 18:26:14 +00:00
<hr>
2023-01-10 16:29:32 +00:00
<strong>Мужские</strong><br>
2022-12-19 18:26:14 +00:00
<ul>
2023-01-10 16:29:32 +00:00
<li><a href="/shadow/i1">Стандартные</a></li>
2022-12-19 18:26:14 +00:00
</ul>
<br>
2023-01-10 16:29:32 +00:00
<strong>Женские</strong><br>
2022-12-19 18:26:14 +00:00
<ul>
2023-01-10 16:29:32 +00:00
<li><a href="/shadow/i2">Стандартные</a></li>
2022-12-19 18:26:14 +00:00
</ul>
<br>
2023-01-10 16:29:32 +00:00
· <a href="/shadow/i3">Именные</a>
2022-12-19 18:26:14 +00:00
</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="">
2022-12-19 18:26:14 +00:00
</td>
<td style="width: 23px; vertical-align: top; background-image: url(/forum_script/img/rightground.jpg);">
2022-12-19 18:26:14 +00:00
&nbsp;
</td>
</tr>
2022-06-06 21:30:34 +00:00
</table>
2023-01-10 16:29:32 +00:00
<div class="footer">Copyright © <?= date('Y') ?> «www.new-combats.com»</div>
2022-06-06 21:30:34 +00:00
</body>
</html>