2022-08-25 11:23:36 +00:00
|
|
|
|
<?php
|
2023-01-06 14:57:25 +00:00
|
|
|
|
|
|
|
|
|
use Core\Config;
|
|
|
|
|
use Core\Database;
|
|
|
|
|
use Core\Db;
|
|
|
|
|
|
|
|
|
|
if (!defined('GAME_VERSION')) {
|
|
|
|
|
require_once '_incl_data/autoload.php';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Config::init();
|
|
|
|
|
Database::init();
|
|
|
|
|
|
2022-08-25 11:23:36 +00:00
|
|
|
|
$u = User::start();
|
|
|
|
|
$filter = new Filter();
|
2023-01-06 14:57:25 +00:00
|
|
|
|
|
|
|
|
|
$allowedTextColors = ['Black', 'Blue', 'Fuchsia', 'Gray', 'Green', 'Maroon', 'Navy', 'Olive', 'Purple', 'Teal', 'Orange', 'Chocolate', 'DarkKhaki', 'SandyBrown'];
|
|
|
|
|
if ($u->info['admin']) {
|
|
|
|
|
$allowedTextColors[] = 'Red';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$simbolcount = strlen($u->info['hobby']);
|
|
|
|
|
$maxsimbols = 2000;
|
|
|
|
|
|
|
|
|
|
if (isset($_POST['name'], $_POST['hobby'], $_POST['ChatColor'], $_POST['saveanketa'])) {
|
|
|
|
|
if (!in_array($_POST['ChatColor'], $allowedTextColors)) {
|
|
|
|
|
$_POST['ChatColor'] = "Black";
|
|
|
|
|
}
|
|
|
|
|
if (!empty($filter->spamFiltr($_POST['name'])) || !empty($filter->spamFiltr($_POST['hobby']))) { // WTF ?!
|
|
|
|
|
Db::sql('update users set info_delete = unix_timestamp() + 86400 where id = ?', [$u->info['id']]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($simbolcount > $maxsimbols && $u->info['admin'] == 0) {
|
|
|
|
|
$error = '<div style="color:#FF0000; position: absolute; left: 900px; top: 100px; ">
|
2023-01-10 16:29:32 +00:00
|
|
|
|
Максимальный размер поля "Увлечения / хобби" - ' . $maxsimbols . ' символов.</div>';
|
2023-01-06 14:57:25 +00:00
|
|
|
|
} else {
|
|
|
|
|
Db::sql(
|
|
|
|
|
'update users set name = ?, chatColor = ?, hobby = ? where id = ?',
|
|
|
|
|
[
|
|
|
|
|
$_POST['name'], $_POST['chatColor'], $_POST['hobby'],
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
$u->info['name'] = $_POST['name'];
|
|
|
|
|
$u->info['hobby'] = $_POST['hobby'];
|
|
|
|
|
$u->info['chatColor'] = $_POST['ChatColor'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
?>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="ru">
|
2022-06-06 21:30:34 +00:00
|
|
|
|
<head>
|
2023-01-10 17:26:14 +00:00
|
|
|
|
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<title>Бойцовский Клуб - Настройки</title>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<link rel="stylesheet" href="i/move/design3.css">
|
|
|
|
|
<link rel="stylesheet" href="i/main.css">
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<style>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
@import url(https://fonts.googleapis.com/css?family=Philosopher&subset=latin,cyrillic);
|
2023-01-06 14:57:25 +00:00
|
|
|
|
|
2022-08-25 11:23:36 +00:00
|
|
|
|
body, td {
|
|
|
|
|
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
|
|
|
|
|
font-size: 12pt;
|
|
|
|
|
color: #000000
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
A {
|
|
|
|
|
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
|
|
|
|
|
font-size: 12pt;
|
|
|
|
|
color: #decdb9;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a:link {
|
|
|
|
|
color: #decdb9;
|
|
|
|
|
text-decoration: none
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
A:visited {
|
|
|
|
|
color: #decdb9;
|
|
|
|
|
text-decoration: none
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
A:hover, A:active {
|
|
|
|
|
color: #f3e9dd;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
background-color: #000000;
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
|
|
|
|
font-size: 12pt;
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
td.topbgl {
|
|
|
|
|
background-image: url(new/register/topbgl.jpg);
|
|
|
|
|
background-position: right top
|
2022-08-25 11:23:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
input {
|
|
|
|
|
font-size: 12px;
|
2022-08-25 11:23:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
div.footer {
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #EBD88B;
|
|
|
|
|
font-family: 'Philosopher', sans-serif;
|
|
|
|
|
font-size: 18px;
|
2022-08-25 11:23:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
input, select {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
border-width: 0 0 1px;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
border-color: black;
|
2022-08-25 11:23:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
option {
|
|
|
|
|
background-color: antiquewhite;
|
2022-08-25 11:23:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
textarea {
|
|
|
|
|
background-color: antiquewhite;
|
|
|
|
|
border: 0;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
width: 95%;
|
|
|
|
|
height: 170px;
|
2022-08-25 11:23:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
input:focus-visible, select:focus-visible, textarea:focus-visible {
|
|
|
|
|
outline: 0;
|
2022-08-25 11:23:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
fieldset {
|
|
|
|
|
border: 1px solid black;
|
|
|
|
|
-webkit-border-radius: 10px;
|
|
|
|
|
-moz-border-radius: 10px;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
clear: both;
|
2022-08-25 11:23:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 14:57:25 +00:00
|
|
|
|
fieldset > legend {
|
2022-08-25 11:23:36 +00:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
2022-06-06 21:30:34 +00:00
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
2022-08-25 11:23:36 +00:00
|
|
|
|
<tr>
|
|
|
|
|
<td width="39%" valign="top">
|
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
2022-06-06 21:30:34 +00:00
|
|
|
|
<tr>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
<td height="513" class="topbgl"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
2023-03-31 18:30:14 +00:00
|
|
|
|
<td width="1%" valign="top" background="/new/register/bgl.jpg">
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<div style="width: 67px; height: 108px;"><!-- тут был флеш --></div>
|
2023-03-31 18:30:14 +00:00
|
|
|
|
<img src="/new/register/topl.jpg"/></td>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
<td width="20%" valign="top">
|
|
|
|
|
<table width="850" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr>
|
2023-03-31 18:30:14 +00:00
|
|
|
|
<td><img src="/new/register/top.jpg" width="850" height="35"/></td>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<td height="1">
|
2023-03-31 18:30:14 +00:00
|
|
|
|
<img src="/new/register/top1_nul.jpg" width="850" height="65"/>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
</td>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td height="593" align="left" valign="top">
|
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="1" valign="top"
|
2023-03-31 18:30:14 +00:00
|
|
|
|
background="/new/register/vesch_leftbg.jpg"><img
|
|
|
|
|
src="/new/register/vesch_left.jpg" width="49"
|
2022-08-25 11:23:36 +00:00
|
|
|
|
height="416"/></td>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<td height="577" valign="top" bgcolor="#edd7ae">
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<?= $error ?? '' ?>
|
|
|
|
|
<!-- content -->
|
|
|
|
|
<div style="text-align: center; margin-bottom: 8px;">
|
|
|
|
|
<?= $u->microLogin($u->info['id'], 1) ?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
|
<fieldset>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<legend>Анкета</legend>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<div>
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<td><label for="name">Ваше реальное имя:</label></td>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<td><input id="name" name="name"
|
|
|
|
|
value="<?= htmlspecialchars($u->info['name']) ?>"
|
|
|
|
|
size="45" maxlength="90"/>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<td><label for="bday">День рождения:</label></td>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<td><input id="bday" type="date" disabled
|
|
|
|
|
value="<?= date(
|
|
|
|
|
'Y-m-d', strtotime($u->info['bithday'])
|
|
|
|
|
) ?>">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<td><label for="chatcolor">Цвет сообщений в чате:</label>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select id="chatcolor" name="ChatColor"
|
|
|
|
|
style="width:250px;">
|
|
|
|
|
<?php foreach ($allowedTextColors as $color): ?>
|
|
|
|
|
<option style="background-color: <?= $color ?>"
|
|
|
|
|
value="<?= $color ?>">
|
|
|
|
|
</option>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<script>FORM1.ChatColor.value = "<?=$u->info['chatColor']?>";</script>
|
|
|
|
|
</div>
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
<textarea id="hobby" name="hobby" cols="60" rows="7"
|
2023-01-10 16:29:32 +00:00
|
|
|
|
placeholder="Напишите о себе...">
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<?= htmlspecialchars($u->info['hobby']) ?>
|
|
|
|
|
</textarea>
|
|
|
|
|
<br>
|
|
|
|
|
<label for="hobby">
|
2023-01-10 16:29:32 +00:00
|
|
|
|
Увлечения / хобби <i>(ограничение <?= $maxsimbols ?>
|
|
|
|
|
символов и 300 строк)</i>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
</label>
|
|
|
|
|
<br>
|
2023-01-10 16:29:32 +00:00
|
|
|
|
<input name="saveanketa" type="submit" class="btn" value="Сохранить"/>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
</fieldset>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<td width="1" valign="top" bgcolor="#edd7ae">
|
2023-03-31 18:30:14 +00:00
|
|
|
|
<img src="/new/register/vesch_right.jpg" width="26"
|
2023-01-06 14:57:25 +00:00
|
|
|
|
height="423"/>
|
|
|
|
|
</td>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<td colspan="3" valign="top">
|
2023-03-31 18:30:14 +00:00
|
|
|
|
<img src="/new/register/vesch_bot2.jpg" width="850"
|
2023-01-06 14:57:25 +00:00
|
|
|
|
height="34"/>
|
|
|
|
|
</td>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2022-06-06 21:30:34 +00:00
|
|
|
|
</td>
|
2023-03-31 18:30:14 +00:00
|
|
|
|
<td width="1%" valign="top" background="/new/register/bgr2.jpg">
|
|
|
|
|
<img src="/new/register/topr.jpg" width="83" height="593"/><br/>
|
|
|
|
|
<img src="/new/register/right2.jpg" width="83" height="114"/>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
</td>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
<td width="39%" valign="top">
|
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr>
|
2023-03-31 18:30:14 +00:00
|
|
|
|
<td height="507" background="/new/register/topbgr.jpg"> </td>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top"> </td>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<td colspan="3" valign="top">
|
2023-03-31 18:30:14 +00:00
|
|
|
|
<img src="/new/register/bottom.jpg" width="1000" height="163"/>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
</td>
|
|
|
|
|
<td valign="top"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
<div class="footer"><?= Config::get('name') ?> © 2013-<?= date('Y') ?></div>
|
2022-08-25 11:23:36 +00:00
|
|
|
|
<div style="display:none;"></div>
|
|
|
|
|
</body>
|
2023-01-06 14:57:25 +00:00
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
function MM_preloadImages() { //v3.0
|
|
|
|
|
let d = document;
|
|
|
|
|
if (d.images) {
|
|
|
|
|
if (!d.MM_p) d.MM_p = [];
|
|
|
|
|
let i, j = d.MM_p.length, a = MM_preloadImages.arguments;
|
|
|
|
|
for (i = 0; i < a.length; i++)
|
|
|
|
|
if (a[i].indexOf("#") !== 0) {
|
|
|
|
|
d.MM_p[j] = new Image;
|
|
|
|
|
d.MM_p[j++].src = a[i];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function MM_swapImgRestore() { //v3.0
|
|
|
|
|
let i, x, a = document.MM_sr;
|
|
|
|
|
for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function MM_findObj(n, d) { //v4.01
|
|
|
|
|
let p, i, x;
|
|
|
|
|
if (!d) d = document;
|
|
|
|
|
if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
|
|
|
|
|
d = parent.frames[n.substring(p + 1)].document;
|
|
|
|
|
n = n.substring(0, p);
|
|
|
|
|
}
|
|
|
|
|
if (!(x = d[n]) && d.all) x = d.all[n];
|
|
|
|
|
for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
|
|
|
|
|
for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
|
|
|
|
|
if (!x && d.getElementById) x = d.getElementById(n);
|
|
|
|
|
return x;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function MM_swapImage() { //v3.0
|
|
|
|
|
let i, j = 0, x, a = MM_swapImage.arguments;
|
|
|
|
|
document.MM_sr = [];
|
|
|
|
|
for (i = 0; i < (a < /dngth-2);i+=3)
|
|
|
|
|
if ((x = MM_findObj(a[i])) != null) {
|
|
|
|
|
document.MM_sr[j++] = x;
|
|
|
|
|
if (!x.oSrc) x.oSrc = x.src;
|
|
|
|
|
x.src = a[i + 2];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</html>
|
|
|
|
|
|