game/repass.php

222 lines
11 KiB
PHP
Raw Normal View History

<?php
2022-12-19 20:16:24 +00:00
use Core\Config;
use Core\Database;
if (!defined('GAME_VERSION')) {
require_once '_incl_data/autoload.php';
}
2022-06-06 21:30:34 +00:00
$step = 1;
$error = '';
if (isset($_GET['login'])) {
$_POST['relogin'] = $_GET['login'];
2022-06-06 21:30:34 +00:00
}
if (isset($_POST['relogin'])) {
$_POST['relogin'] = htmlspecialchars($_POST['relogin'], null, 'cp1251');
2022-12-19 20:16:24 +00:00
Config::init();
Database::init();
2022-12-19 18:26:14 +00:00
define('IP', UserIp::get());
$u = User::start();
2022-12-19 20:16:24 +00:00
$usr = mysql_fetch_array(
mysql_query(
'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['relogin']) . '"'));
if (isset($usr['id'])) {
2022-06-06 21:30:34 +00:00
if ($usr['admin'] == 0 && $usr['banned'] == 0) {
$step = 2;
if (isset($_POST['redate'])) {
2022-12-19 18:26:14 +00:00
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
2022-12-19 20:16:24 +00:00
$lst_psw = mysql_fetch_array(
mysql_query(
'SELECT * FROM `repass` WHERE `uid` = "' . $usr['id'] . '" AND `time` > ' . (time(
) - 24 * 60 * 60) . ' AND `type` = "1" LIMIT 1'
)
);
if (isset($lst_psw['id'])) {
2022-12-19 18:26:14 +00:00
$error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>.';
} elseif (
str_replace('0', '', $_POST['redate']) == str_replace('0', '', $usr['bithday']) &&
($_POST['reanswer'] == $usr['q1'] || $usr['q1'] == '')
) {
2022-12-19 18:26:14 +00:00
$error = '<br><br><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> &quot;' . $usr['login'] . '&quot; <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> E-mail <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>! <br><br><br>';
2022-12-19 20:16:24 +00:00
$re = mysql_fetch_array(
mysql_query(
'SELECT * FROM `logs_auth` WHERE `uid` = "' . $usr['id'] . '" AND `type` = "0" AND `depass` != "" ORDER BY `id` DESC LIMIT 1'
)
);
if ($u['securetime'] < Config::get('securetime')) {
unset($re);
}
if (!isset($re['id'])) {
$sm = ['a', 'b', 'c', 'd', 'e', 'f', 'x', 'd', 'f', 'X', 'e', 'ER', 'XX', 'X'];
2022-12-19 20:16:24 +00:00
$re['depass'] = $sm[rand(0, 12)] . rand(0, 9) . $sm[rand(0, 12)] . rand(0, 9) . $sm[rand(
0, 12
)] . rand(0, 9) . $sm[rand(0, 12)] . rand(0, 9) . $sm[rand(0, 12)] . rand(0, 9);
}
2022-12-19 18:26:14 +00:00
$title = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> "' . $usr['login'] . '".';
$txt = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.<br>';
$txt .= '<27> IP-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <b>' . IP . '</b>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.<br><3E><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.<br><br>';
$txt .= '<27><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>: <b>' . $usr['login'] . '</b><br>';
$txt .= '<27><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ' . $re['depass'] . '<br><br>';
$txt .= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>.<br><br>';
$txt .= '<27> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<br>';
$txt .= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>';
2022-12-19 20:16:24 +00:00
//$mail = mails($usr['mail'], $txt, $title);
$mail = Core\Mail::send($usr['mail'], $txt, $title);
if ($mail === 1) {
2022-12-19 20:16:24 +00:00
mysql_query(
'UPDATE `users` SET `securetime` = "' . time() . '" , `allLock`="' . (time(
) + 60 * 60 * 24 * 0) . '",`pass` = "' . mysql_real_escape_string(
md5($re['depass'])
) . '" WHERE `id` = "' . $usr['id'] . '" LIMIT 1'
);
mysql_query(
'INSERT INTO `repass` (`uid`,`ip`,`type`,`time`) VALUES ("' . $usr['id'] . '","' . mysql_real_escape_string(
IP
) . '","1","' . time() . '")'
);
$step = 3;
} else {
$error = $mail;
}
unset($mail);
} else {
2022-12-19 18:26:14 +00:00
$error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
}
}
} else {
2022-12-19 18:26:14 +00:00
$error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "' . $_POST['relogin'] . '" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!';
}
} else {
2022-12-19 18:26:14 +00:00
$error = '<27><><EFBFBD><EFBFBD><EFBFBD> "' . htmlspecialchars($_POST['relogin'], null, 'cp1251') . '" <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>.';
}
}
2022-06-06 21:30:34 +00:00
?>
<!DOCTYPE html>
<html lang="ru-RU">
<head>
<meta charset="windows-1251"/>
2022-12-19 18:26:14 +00:00
<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD></title>
<meta name="keywords"
2022-12-19 18:26:14 +00:00
content="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><>, <20><> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>, combats, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, combats ru, combats com, OldBK, oldbk ru, oldbk com, <20><><EFBFBD><EFBFBD><EFBFBD>, old bk, <20><><EFBFBD> <20><>, mycombats, rebk, recombats, oldcombats, obk2">
<meta name="description"
2022-12-19 18:26:14 +00:00
content="<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<link href="homepage/index.css" type="text/css" rel="stylesheet">
2022-06-06 21:30:34 +00:00
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="100" align="center" valign="middle">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="200" align="center" valign="middle">&nbsp;</td>
<td align="center" valign="middle"><p>&nbsp;</p>
<p>&nbsp;</p></td>
<td width="200">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="135" align="left" valign="middle"
background="https://top.new-combats.com/images/sitebk_02.jpg"
style="background-repeat:repeat-x">&nbsp;
</td>
<td width="135" align="right" valign="middle"
background="https://top.new-combats.com/images/sitebk_02.jpg"
style="background-repeat:repeat-x">&nbsp;
</td>
</tr>
<tr>
</td>
<td height="150" align="center" valign="middle" class="menu">
2022-12-19 18:26:14 +00:00
<p><b><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?</b></p>
<p>&nbsp;<?
if ($error != '') {
echo '<font color="red"><b>' . $error . '</b></font>';
}
?></p>
<form method="post" action="https://new-combats.com/repass.php">
<?
if ($step == 1) { ?>
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr>
2022-12-19 18:26:14 +00:00
<td><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</td>
<td><input onfocus="if ( '<27><><EFBFBD><EFBFBD><EFBFBD>' == value ) { value = ''; } "
onblur="if ( '' == value ) { value = '<27><><EFBFBD><EFBFBD><EFBFBD>'; } " value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
maxlength="40" style="padding:3px" name="relogin" type="text"
class="inup" id="relogin"></td>
</tr>
</table><br>
2022-12-19 18:26:14 +00:00
<input type="submit" class="btn" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>">
<? } elseif ($step == 2) { ?>
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr>
2022-12-19 18:26:14 +00:00
<td><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</td>
<td>
<input value="<?= $_POST['relogin'] ?>" disabled maxlength="40"
style="padding:3px" type="text" class="inup">
<input type="hidden" name="relogin" value="<?= $_POST['relogin'] ?>">
</td>
</tr>
<?
if ($usr['a1'] != '') { ?>
<tr>
2022-12-19 18:26:14 +00:00
<td><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</td>
<td>&nbsp;<b><?= $usr['a1'] ?></b></td>
</tr>
<tr>
2022-12-19 18:26:14 +00:00
<td><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</td>
<td><input value="<?= $_POST['reanswer'] ?>" name="reanswer" maxlength="30"
style="padding:3px" type="text" class="inup"></td>
</tr>
<? } ?>
<tr>
2022-12-19 18:26:14 +00:00
<td><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:</td>
<td><input value="<?= $_POST['redate'] ?>" name="redate" maxlength="10"
style="padding:3px" type="text" class="inup"></td>
</tr>
</table>
2022-12-19 18:26:14 +00:00
<small class="testro">(<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
dd.mm.yyyy)</small>
<br>
<br>
<br>
<input type="button" onclick="top.location.href='https://new-combats.com/repass.php'"
2022-12-19 18:26:14 +00:00
class="btn" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">
<input type="submit" class="btn" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> E-mail">
<? } ?>
</form>
<br><br><br><br>
</td>
</tr>
</table>
<div align="center" class="menu">
2022-12-19 18:26:14 +00:00
<a href="https://new-combats.com/"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a>
</div>
</td>
</tr>
<tr>
<td height="50" align="center" valign="middle">&nbsp;</td>
</tr>
<tr>
<td height="50" align="center"><span
2022-12-19 18:26:14 +00:00
class="testro">&laquo;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>&raquo; &nbsp; &nbsp; 2018-<?= date('Y') ?> &copy; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></span>
</td>
</tr>
2022-06-06 21:30:34 +00:00
</table>
</body>
</html>