game/obraz.php

120 lines
4.1 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
define('GAME', time());
require_once '_incl_data/__config.php';
require_once '_incl_data/class/__db_connect.php';
$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.com/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;
}
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="https://new-combats.com/inx/newlogo3.jpg" alt="logo" title="logo">
</div>
<table class="main">
<tr style="vertical-align: top;">
<td style="width: 29px; background-image: url(https://new-combats.com/forum_script/img/leftground.jpg);"
rowspan=2>
<img src="https://img.new-combats.com/i/encicl/obrzz_08.jpg" width="29" height="256" alt="">
</td>
<td style="width: 218px; height: 257px;">
<img id="imleft2" src="https://img.new-combats.com/i/encicl/obrzz_04.jpg" width="118" height="257" alt="">
<BR>
</td>
<td rowspan=2>
2023-01-10 16:29:32 +00:00
<h2>Библиотека образов Бойцовского Клуба</h2>
2022-12-19 18:26:14 +00:00
<img src="https://img.new-combats.com/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="https://img.new-combats.com/i/encicl/obrzz1.jpg" width=139 alt="">
</td>
<td style="vertical-align: top; background-image: url(https://new-combats.com/forum_script/img/rightground.jpg)">
&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="https://img.new-combats.com/i/encicl/pictr_subject.jpg" width=128 alt="">
</td>
<td style="width: 23px; vertical-align: top; background-image: url(https://new-combats.com/forum_script/img/rightground.jpg);">
&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>