game/settings.php

661 lines
34 KiB
PHP

<?php
include('_incl_data/__config.php');
const GAME = true;
include('_incl_data/class/__db_connect.php');
$u = User::start();
$filter = new Filter();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"/>
<title>Áîéöîâñêèé Êëóá - Íàñòðîéêè</title>
<link href="https://new-combats.com/i/move/design3.css" rel="stylesheet" type="text/css">
<link rel=stylesheet type="text/css" href="https://new-combats.com/i/main.css">
<META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store">
<meta http-equiv=PRAGMA content=NO-CACHE>
<META Http-Equiv=Expires Content=0>
<style type="text/css">
.left {
float: left;
padding-right: 30px;
}
<!--
@import url(https://fonts.googleapis.com/css?family=Philosopher&subset=latin,cyrillic);
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;
}
.nicname {
color: #bfa178;
font-size: 9pt;
font-weight: bold;
}
td.text {
background-position: right top;
background-repeat: no-repeat;
}
.place {
color: #cc8e43;
font-size: 8pt;
font-weight: bold;
}
.nomber {
color: #7c3e00;
font-size: 8pt;
font-weight: bold;
}
.green {
color: #526700;
font-size: 8pt;
font-weight: bold;
}
.about {
font-size: 9pt;
}
.levels {
color: #bfa178;
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 7pt;
}
TD.topbgl {
background-image: url(https://new-combats.com/new/register/topbgl.jpg);
background-position: right top
}
.style1 {
color: #4b2500;
font-weight: bold;
font-size: 9pt;
}
a.lnkstyle1, a.lnkstyle1:link, a.lnkstyle1:visited, a.lnkstyle1:hover, a.lnkstyle1:active {
color: #4b2500;
font-weight: bold;
font-size: 9pt;
}
a.lnkstyle2 {
font-size: 9pt;
font-weight: bold;
color: #4b2500;
}
a.lnkstyle2:link {
font-weight: bold;
color: #4b2500;
text-decoration: none
}
a.lnkstyle2:visited {
font-weight: bold;
color: #4b2500;
text-decoration: none
}
a.lnkstyle2:hover, a.lnkstyle2:active {
font-weight: bold;
color: #84643e;
text-decoration: none;
}
input {
font-size: 12px;
}
-->
</style>
<script src="https://new-combats.com/new/register/flash.js" type="text/javascript"></script>
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d = document;
if (d.images) {
if (!d.MM_p) d.MM_p = new Array();
var 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
var 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
var 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
var i, j = 0, x, a = MM_swapImage.arguments;
document.MM_sr = new Array;
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>
</head>
<?php
$dateofbirth = '';
if (isset($_POST['name'])) {
$_POST['name'] = htmlspecialchars($_POST['name'], null, 'cp1251');
if (
(
$filter->spamFiltr($_POST['name']) != '0' ||
$filter->spamFiltr($_POST['city']) != '0' ||
$filter->spamFiltr($_POST['city2']) != '0' ||
$filter->spamFiltr($_POST['homepage']) != '0' ||
$filter->spamFiltr($_POST['about']) != '0' ||
$filter->spamFiltr($_POST['hobby']) != '0'
) &&
$u->info['level'] < 9
) {
mysql_query(
'UPDATE `users` SET `info_delete` = "' . (time(
) + 86400) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
);
}
$_POST['city'] = htmlspecialchars($_POST['city'], null, 'cp1251');
$_POST['city2'] = htmlspecialchars($_POST['city2'], null, 'cp1251');
$_POST['icq'] = htmlspecialchars($_POST['icq'], null, 'cp1251');
if (!isset($_POST['mat'])) {
$_POST['mat'] = null;
}
if (!isset($_POST['hide_icq'])) {
$_POST['hide_icq'] = null;
}
$_POST['skype'] = htmlspecialchars($_POST['skype'], null, 'cp1251');
if (!isset($_POST['hide_skype'])) {
$_POST['hide_skype'] = null;
} else {
$_POST['hide_skype'] = 1;
}
$_POST['hide_icq'] = htmlspecialchars($_POST['hide_icq'], null, 'cp1251');
$_POST['homepage'] = htmlspecialchars($_POST['homepage'], null, 'cp1251');
$_POST['about'] = htmlspecialchars($_POST['about'], null, 'cp1251');
if ($u->info['admin'] == 0) {
$_POST['hobby'] = htmlspecialchars($_POST['hobby'], null, 'cp1251');
}
$_POST['ChatColor'] = htmlspecialchars($_POST['ChatColor'], null, 'cp1251');
$_POST['hobby'] = str_replace("\\n", "<BR>", $_POST['hobby']);
$_POST['hobby'] = str_replace("\\r", "", $_POST['hobby']);
$_POST['hobby'] = str_replace("&lt;BR&gt;", "<BR>", $_POST['hobby']);
$simbolcount = strlen($_POST['hobby']);
if (isset($_POST['ChatColor']) && $u->info['admin'] == '0' && !($_POST['ChatColor'] == "Black" || $_POST['ChatColor'] == "Blue" || $_POST['ChatColor'] == "Lilac" || $_POST['ChatColor'] == "Fuchsia" || $_POST['ChatColor'] == "Gray" || $_POST['ChatColor'] == "Green" || $_POST['ChatColor'] == "Maroon" || $_POST['ChatColor'] == "Navy" || $_POST['ChatColor'] == "Olive" || $_POST['ChatColor'] == "Purple" || $_POST['ChatColor'] == "Teal" || $_POST['ChatColor'] == "Orange" || $_POST['ChatColor'] == "Chocolate" || $_POST['ChatColor'] == "DarkKhaki" || $_POST['ChatColor'] == "SandyBrown")) {
echo "<div align=\"left\" style=\"color:#FF0000 \">Âîçìîæíî èñïîëüçîâàòü öâåòà óêàçàííûå òîëüêî â ìåíþ àíêåòû ! </div>";
$_POST['ChatColor'] = "Black";
}
if (!$_POST['city']) {
$city = $_POST['city2'];
} elseif ($_POST['city'] && $_POST['city2']) {
$city = $_POST['city2'];
} else {
$city = $_POST['city'];
}
}
if (isset($_POST['saveanketa'])) {
if ($u->info['level'] <= 1) {
$dt = explode('.', $_POST['0day']);
if (isset($dt[0], $dt[1], $dt[2])) {
$erd = 0;
$dt[0] = round($dt[0]);
$dt[1] = round($dt[1]);
$dt[2] = round($dt[2]);
if ($dt[0] < 1 || $dt[0] > 31) {
$erd = 1;
}
if ($dt[1] < 1 || $dt[1] > 12) {
$erd = 2;
}
if ($dt[2] < 1920 || $dt[2] > 2006) {
$erd = 3;
}
if ($erd == 0) {
$_POST['0day'] = $dt[0] . '.' . $dt[1] . '.' . $dt[2];
$dateofbirth = "`bithday` = '" . mysql_real_escape_string($_POST['0day']) . "',";
}
}
$u->info['bithday'] = $_POST['0day'];
}
$st = $u->lookStats($u->info['stats']);
$maxsimbols = 2000 + ($st['os6'] * 200);
if ($_POST['mat'] == 1) {
$_POST['mat'] = 1;
} else {
$_POST['mat'] = 0;
}
if ($simbolcount <= $maxsimbols || $u->info['admin'] != 0) {
$lastdes = $u->info['design'];
if ($_POST['design'] == 1) {
$u->info['design'] = 1;
} else {
$u->info['design'] = 0;
}
}
if ($simbolcount > $maxsimbols && $u->info['admin'] == 0) {
echo '<div align="left" style="color:#FF0000; position: absolute; left: 900px; top: 100px; ">Ìàêñèìàëüíûé ðàçìåð ïîëÿ "Óâëå÷åíèÿ / õîááè" - ' . $maxsimbols . ' ñèìâîëîâ.</div>';
} elseif (mysql_query(
"UPDATE
`users`
SET
`design` = '" . $u->info['design'] . "',
`name` = '" . mysql_real_escape_string($_POST['name']) . "',
`city_real` = '" . mysql_real_escape_string($_POST['city2']) . "',
`icq` = '" . mysql_real_escape_string((int)$_POST['icq']) . "',
`icq_hide` = '" . mysql_real_escape_string($_POST['hide_icq']) . "',
`skype` = '" . mysql_real_escape_string($_POST['skype']) . "',
`skype_hide` = '" . mysql_real_escape_string($_POST['hide_skype']) . "',
`homepage` = '" . mysql_real_escape_string($_POST['homepage']) . "',
" . $dateofbirth . "
`deviz` = '" . mysql_real_escape_string($_POST['about']) . "',
`hobby` = '" . mysql_real_escape_string($_POST['hobby']) . "',
`chatColor` = '" . mysql_real_escape_string($_POST['ChatColor']) . "',
`mat` = '" . mysql_real_escape_string((int)$_POST['mat']) . "'
WHERE
`id` = '" . mysql_real_escape_string($u->info['id']) . "' LIMIT 1;"
)) {
echo '<div style="position: absolute; left: 900px; top: 100px;"><big><font color=green><b>Ñîõðàíåíî</b></big></font></div>';
if ($u->info['design'] != $lastdes) {
echo '<script>window.opener.close();top.location.href="https://new-combats.com/bk";</script>';
}
$u->info['name'] = $_POST['name'];
$u->info['city_real'] = $city;
$u->info['icq'] = $_POST['icq'];
$u->info['icq_hide'] = $_POST['hide_icq'];
$u->info['skype'] = $_POST['skype'];
$u->info['skype_hide'] = $_POST['hide_skype'];
$u->info['homepage'] = $_POST['homepage'];
$u->info['deviz'] = $_POST['about'];
$u->info['hobby'] = $_POST['hobby'];
$u->info['chatColor'] = $_POST['ChatColor'];
$u->info['mat'] = $_POST['mat'];
} else {
echo '÷òî-òî íå òàê...';
}
}
?>
<style type="text/css">
div.settingsStatus {
position: absolute;
left: 900px;
top: 100px;
font-weight: bold;
font-size: larger;
}
div.redStatus {
color: red;
}
div.greenStatus {
color: green;
}
</style>
<?php
if (isset($_POST['pass_old'])) {
if (md5($_POST['pass_old']) == $u->info['pass']) {
if ($_POST['pass_new'] == $_POST['pass_new2']) {
$u->info['pass'] = md5($_POST['pass_new']);
mysql_query(
'UPDATE `users` SET `pass` = "' . $u->info['pass'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
);
//
setcookie('login', $u->info['login'], time() + 86400 * 365, '', $c['host']);
setcookie('pass', $u->info['pass'], time() + 86400 * 365, '', $c['host']);
//
echo '<div class="settingsStatus greenStatus">Íîâûé ïàðîëü óñïåøíî çàïèñàí!</div>';
} else {
echo '<div class="settingsStatus redStatus">Íîâûé ïàðîëü íå ñïîâïàäàåò ñî âòîðûì ïîëåì!</div>';
}
} else {
echo '<div class="settingsStatus redStatus">Íåâåðíûé òåêóùèé ïàðîëü, ïîïðîáóéòå ñíîâà!</div>';
}
}
?>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="39%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="513" class="topbgl">&nbsp;</td>
</tr>
</table>
</td>
<td width="1%" valign="top" background="https://new-combats.com/new/register/bgl.jpg">
<script type="text/javascript">
AC_FL_RunContent('codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0', 'width', '67', 'height', '108', 'src', 'https://new-combats.com/new/register/lamp1', 'quality', 'high', 'pluginspage', 'https://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash', 'movie', 'https://new-combats.com/new/register/lamp1'); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
width="67" height="108">
<param name="movie" value="https://new-combats.com/new/register/lamp1.swf"/>
<param name="quality" value="high"/>
<embed src="https://new-combats.com/new/register/lamp1.swf" quality="high"
pluginspage="https://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash" width="67" height="108"></embed>
</object>
</noscript>
<img src="https://new-combats.com/new/register/topl.jpg"/></td>
<td width="20%" valign="top">
<table width="850" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="https://new-combats.com/new/register/top.jpg" width="850" height="35"/></td>
</tr>
<tr>
<td height="1"><img src="https://new-combats.com/new/register/top1_nul.jpg" width="850"
height="65"/></td>
</tr>
<tr>
<td height="593" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" valign="top"
background="https://new-combats.com/new/register/vesch_leftbg.jpg"><img
src="https://new-combats.com/new/register/vesch_left.jpg" width="49"
height="416"/></td>
<td height="577" align="center" valign="top" bgcolor="#edd7ae">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="540" align="left" valign="top">
</HEAD>
<BODY aLink=#000000 bgColor=#666666 leftMargin=0 link=#000000
topMargin=0
vLink=#333333 marginheight="0" marginwidth="0" 0>
<TABLE border=0 cellPadding=0 cellSpacing=0 height="100%" width="100%">
<TBODY>
<TR>
<TD vAlign=top width="15%">
<BR><!-- Begin of text -->
<center><?= $u->microLogin($u->info['id'], 1) ?></center>
<form method="post" style=" ">
<fieldset
style="border: 1px solid black;-webkit-border-radius: 10px;-moz-border-radius: 10px;border-radius: 10px;">
<legend style="font-weight: bold;">Ñìåíà ïàðîëÿ
</legend>
Ñòàðûé ïàðîëü:<br/><input type="password"
name="pass_old"
style="width:250px;"/><br/>
Íîâûé ïàðîëü:<br/><input type="password"
name="pass_new"
style="width:250px;"/><br/>
Íîâûé ïàðîëü (åùå ðàç):<br/><input type="password"
name="pass_new2"
style="width:250px;"/><br/>
<input class="btn" type="submit" name="pass_change"
value="Ñìåíèòü ïàðîëü"/>
</fieldset>
</form>
<div style="clear: both; height: 20px;"></div>
<form method="post">
<fieldset
style="border: 1px solid black;-webkit-border-radius: 10px;-moz-border-radius: 10px;border-radius: 10px; clear: both;">
<legend style="font-weight: bold;">Àíêåòà</legend>
<div class="left">
Âàøå ðåàëüíîå èìÿ:<br/><input name="name"
value="<?= $u->info['name'] ?>"
class="inup"
size="45"
maxlength="90"/><br/>
Ãîðîä:<br>
<input type="text"
value="<?= $u->info['city_real'] ?>"
name="city2" size="20" maxlength="40"
class="inup"/><br/>
Öâåò ñîîáùåíèé â ÷àòå:<br/>
<select name="ChatColor" class="inup"
style="width:250px;">
<option selected
style="background: #f2f0f0; color: black"
value=Black>×åðíûé
</option>
<option style="background: #f2f0f0; color: blue"
value=Blue>Ñèíèé
</option>
<option style="background: #f2f0f0; color: fuchsia"
value=Fuchsia>Ðîçîâûé
</option>
<option style="background: #f2f0f0; color: gray"
value=Gray>Ñåðûé
</option>
<option style="background: #f2f0f0; color: green"
value=Green>Çåëåíûé
</option>
<option style="background: #f2f0f0; color: maroon"
value=Maroon>Òåìíîêðàñíûé
</option>
<option style="background: #f2f0f0; color: navy"
value=Navy>Òåìíîñèíèé
</option>
<option style="background: #f2f0f0; color: olive"
value=Olive>Îëèâêîâûé
</option>
<option style="background: #f2f0f0; color: purple"
value=Purple>Ôèîëåòîâûé
</option>
<option style="background: #f2f0f0; color: teal"
value=Teal>Ìîðñêîé âîëíû
</option>
<option style="background: #f2f0f0; color: orange"
value=Orange>Îðàíæåâûé
</option>
<option style="background: #f2f0f0; color: chocolate"
value=Chocolate>Øîêîëàäíûé
</option>
<option style="background: #f2f0f0; color: darkkhaki"
value=DarkKhaki>Òåìíûé õàêè
</option>
<option style="background: #f2f0f0; color: sandybrown"
value=SandyBrown>Òåìíîïåñî÷íûé
</option>
<option style="background: #f2f0f0; color: #8700e4"
value="#8700e4">Ñèðåíåâûé
</option>
<?
if ($u->info['admin'] > 0) {
echo '<option
style="BACKGROUND: #f2f0f0; COLOR: red"
value="Red">Red</option>';
}
?>
</select>
<script language="javascript"
type="text/javascript">FORM1.ChatColor.value = "<?=$u->info['chatColor']?>";</script>
</div>
<div class="right">
<?
if ($u->info['icq'] == 0) {
$u->info['icq'] = '';
}
?>
ICQ:<br/><input type="text" name="icq"
style="width:250px;"
value="<?= $u->info['icq'] ?>"/><br/>
Skype:<br/><input type="text" name="skype"
style="width:250px;"
value="<?= $u->info['skype'] ?>"/><br/>
Âàðèàíò äèçàéíà:<br>
<label for="design"></label>
<select name="design" id="design">
<!--<option <?
if ($u->info['design'] == 0) {
echo 'selected="selected"';
} ?> value="0">Ñòàíäàðòíûé</option>-->
<option <?
if ($u->info['design'] == 1) {
echo 'selected="selected"';
} ?> value="1">Ðàñøèðåííûé (Ëîã áîÿ âî
âêëàäêå ÷àòà)
</option>
</select>
</div>
<br><textarea name="hobby" cols="60" rows="7"
style="width: 95%; height: 170px;"
class="inup"
placeholder="Íàïèøèòå î ñåáå..."><?= $u->info['hobby'] ?></textarea>
<br/>
Óâëå÷åíèÿ / õîááè <i>(îãðàíè÷åíèå <?= $maxsimbols ?>
ñèìâîëîâ è 300 ñòðîê)</i>
<br/>
<input name="saveanketa" type="submit" class="btn"
value="Ñîõðàíèòü"/>
</fieldset>
</form>
<!-- End of text --></TD>
<!--td width=15% valign=top><img src="encicl/images/new_ico.gif" width=86 height=89 border=0></td-->
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY></TABLE>
<td width="1" valign="top" bgcolor="#edd7ae"><img
src="https://new-combats.com/new/register/vesch_right.jpg" width="26"
height="423"/></td>
</tr>
<tr>
<td colspan="3" valign="top"><img
src="https://new-combats.com/new/register/vesch_bot2.jpg" width="850"
height="34"/></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="1%" valign="top" background="https://new-combats.com/new/register/bgr2.jpg"><img
src="https://new-combats.com/new/register/topr.jpg" width="83" height="593"/><br/>
<img src="https://new-combats.com/new/register/right2.jpg" width="83" height="114"/></td>
<td width="39%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="507" background="https://new-combats.com/new/register/topbgr.jpg">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td colspan="3" valign="top"><img src="https://new-combats.com/new/register/bottom.jpg" width="1000"
height="163"/></td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td colspan="3" align="left" valign="top">
<table width="970" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="225" align="left" valign="top">&nbsp;</td>
<td width="546" align="center" valign="top">
<style>
A.copi {
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 7pt;
color: #005348;
font-weight: bold;
text-decoration: none;
}
a.copi:link {
color: #005348;
font-weight: bold;
text-decoration: none;
}
A.copi:visited {
color: #005348;
font-weight: bold;
text-decoration: none;
}
A.copi:hover, A.copi:active {
color: #329700;
font-weight: bold;
text-decoration: none;
}
</style>
<br><span style="color:#EBD88B; font-family:'Philosopher', sans-serif;font-size: 18px;">Áîéöîâñêèé Êëóá &copy; 2013-2016</span>
</td>
<td width="199" align="right" valign="top"><img src="https://new-combats.com/new/register/pix.gif"
width="10" height="30"/><br/>
&nbsp;
</td>
</tr>
</table>
</td>
<td valign="top">&nbsp;</td>
</tr>
</table>
<div style="display:none;"></div>
</body>
</html>