2022-12-19 18:26:14 +00:00
|
|
|
|
<?php
|
2023-04-15 19:52:33 +00:00
|
|
|
|
|
|
|
|
|
use User\UserIp;
|
|
|
|
|
|
2022-12-19 18:26:14 +00:00
|
|
|
|
const GAME = true;
|
|
|
|
|
require_once('_incl_data/__config.php');
|
|
|
|
|
require_once('_incl_data/class/__db_connect.php');
|
|
|
|
|
define('IP', UserIp::get());
|
|
|
|
|
$u = User::start();
|
|
|
|
|
|
|
|
|
|
if (isset($_GET['list']) && $_GET['list'] == 2015) {
|
|
|
|
|
|
|
|
|
|
$mail = [];
|
|
|
|
|
$yes = [];
|
|
|
|
|
$sp = mysql_query('SELECT * FROM `aaa_send_count`');
|
|
|
|
|
while ($pl = mysql_fetch_array($sp)) {
|
|
|
|
|
if (!isset($yes[$pl['mail']])) {
|
|
|
|
|
$yes[$pl['mail']] = true;
|
|
|
|
|
$mail[] = $pl['mail'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$mail[] = 'support@new-combats.com';
|
|
|
|
|
$sp = mysql_query('SELECT * FROM `users` WHERE `real` > 0');
|
|
|
|
|
while ($pl = mysql_fetch_array($sp)) {
|
|
|
|
|
if (!isset($yes[$pl['mail']])) {
|
|
|
|
|
$yes[$pl['mail']] = true;
|
|
|
|
|
$mail[] = $pl['mail'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$mail[] = 'support@new-combats.com';
|
|
|
|
|
$sp = mysql_query('SELECT * FROM `users_kill`');
|
|
|
|
|
while ($pl = mysql_fetch_array($sp)) {
|
|
|
|
|
if (!isset($yes[$pl['mail']])) {
|
|
|
|
|
$yes[$pl['mail']] = true;
|
|
|
|
|
$mail[] = $pl['mail'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$sp = mysql_query('SELECT * FROM `users_rbk`');
|
|
|
|
|
while ($pl = mysql_fetch_array($sp)) {
|
|
|
|
|
if (!isset($yes[$pl['email']])) {
|
|
|
|
|
$yes[$pl['email']] = true;
|
|
|
|
|
$mail[] = $pl['email'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$e = explode(',', 'mails');
|
|
|
|
|
$i = 0;
|
|
|
|
|
while ($i < count($e)) {
|
|
|
|
|
if (!isset($yes[$e[$i]])) {
|
|
|
|
|
$yes[$yes[$e[$i]]] = true;
|
|
|
|
|
$mail[] = $e[$i];
|
|
|
|
|
}
|
|
|
|
|
$i++;
|
|
|
|
|
}
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
2022-12-19 18:26:14 +00:00
|
|
|
|
$i = 0;
|
|
|
|
|
while ($i < count($mail)) {
|
|
|
|
|
echo $mail[$i] . '<br>';
|
|
|
|
|
$i++;
|
|
|
|
|
}
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$keymd5 = '$отпи$атьс$';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
2022-12-19 18:26:14 +00:00
|
|
|
|
if (isset($_GET['count'])) {
|
|
|
|
|
if (md5($keymd5 . '+' . $_GET['count']) == $_GET['sd4']) {
|
|
|
|
|
$mail = mysql_fetch_array(
|
|
|
|
|
mysql_query(
|
|
|
|
|
'SELECT * FROM `aaa_send_count` WHERE `mail` = "' . mysql_real_escape_string(
|
|
|
|
|
$_GET['count']
|
|
|
|
|
) . '" LIMIT 1'
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
if (isset($mail['id'])) {
|
|
|
|
|
mysql_query(
|
|
|
|
|
'UPDATE `aaa_send_count` SET `time` = "' . time() . '",`ip` = "' . mysql_real_escape_string(
|
|
|
|
|
IP
|
|
|
|
|
) . '" WHERE `id` = "' . $mail['id'] . '" LIMIT 1'
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
mysql_query(
|
|
|
|
|
'INSERT INTO `aaa_send_count` (`mail`,`time`,`ip`) VALUES (
|
|
|
|
|
"' . mysql_real_escape_string($_GET['count']) . '","' . time() . '","' . mysql_real_escape_string(IP) . '"
|
|
|
|
|
)'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
echo '[SD4]';
|
|
|
|
|
} else {
|
|
|
|
|
echo '[ERROR_SD4_KEY]';
|
|
|
|
|
}
|
|
|
|
|
die('[IMG]');
|
|
|
|
|
} elseif (isset($_GET['uncancel'])) {
|
|
|
|
|
$mail = mysql_fetch_array(
|
|
|
|
|
mysql_query(
|
|
|
|
|
'SELECT * FROM `aaa_send_count` WHERE `mail` = "' . mysql_real_escape_string(
|
|
|
|
|
$_GET['uncancel']
|
|
|
|
|
) . '" LIMIT 1'
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
if (isset($mail['id'])) {
|
|
|
|
|
mysql_query(
|
|
|
|
|
'UPDATE `aaa_send_count` SET `cancel` = "0",`time` = "' . time() . '",`ip` = "' . mysql_real_escape_string(
|
|
|
|
|
IP
|
|
|
|
|
) . '" WHERE `id` = "' . $mail['id'] . '" LIMIT 1'
|
|
|
|
|
);
|
2023-01-10 16:29:32 +00:00
|
|
|
|
echo 'Эл.почта <b>' . htmlspecialchars($_GET['uncancel']) . '</b> успешно подписан на наши рассыли!';
|
2022-12-19 18:26:14 +00:00
|
|
|
|
} else {
|
2023-01-10 16:29:32 +00:00
|
|
|
|
echo 'Эл.почта <b>' . htmlspecialchars($_GET['uncancel']) . '</b> не найден в базе.';
|
2022-12-19 18:26:14 +00:00
|
|
|
|
}
|
|
|
|
|
die();
|
|
|
|
|
} elseif (isset($_GET['cancel'])) {
|
|
|
|
|
if (md5($keymd5 . '+' . $_GET['cancel']) == $_GET['sd4']) {
|
|
|
|
|
$mail = mysql_fetch_array(
|
|
|
|
|
mysql_query(
|
|
|
|
|
'SELECT * FROM `aaa_send_count` WHERE `mail` = "' . mysql_real_escape_string(
|
|
|
|
|
$_GET['cancel']
|
|
|
|
|
) . '" LIMIT 1'
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
if (isset($mail['id'])) {
|
|
|
|
|
if ($mail['cancel'] > 0) {
|
2023-01-10 16:29:32 +00:00
|
|
|
|
echo 'Вы отписались от рассылок: <b>' . date(
|
2022-12-19 18:26:14 +00:00
|
|
|
|
'd.m.Y H:i:s', $mail['cancel']
|
2023-03-31 18:30:14 +00:00
|
|
|
|
) . '</b>, хотите подписаться снова? <a href="/mail.php?uncancel=' . $mail['mail'] . '">Подписаться на рассылку снова</a></b>';
|
2022-12-19 18:26:14 +00:00
|
|
|
|
} else {
|
|
|
|
|
mysql_query(
|
|
|
|
|
'UPDATE `aaa_send_count` SET `cancel` = "' . time() . '",`time` = "' . time(
|
|
|
|
|
) . '",`ip` = "' . mysql_real_escape_string(IP) . '" WHERE `id` = "' . $mail['id'] . '" LIMIT 1'
|
|
|
|
|
);
|
2023-01-10 16:29:32 +00:00
|
|
|
|
echo 'Эл.почта <b>' . htmlspecialchars($_GET['cancel']) . '</b> успешно отписана от наших рассылок!';
|
2022-12-19 18:26:14 +00:00
|
|
|
|
}
|
|
|
|
|
} else {
|
2023-01-10 16:29:32 +00:00
|
|
|
|
echo 'Эл.почта <b>' . htmlspecialchars($_GET['cancel']) . '</b> не подписана на наши рассылки.';
|
2022-12-19 18:26:14 +00:00
|
|
|
|
}
|
|
|
|
|
} else {
|
2023-01-10 16:29:32 +00:00
|
|
|
|
echo 'Вы не отписались т.к. SD4 ключ не подходит к эл.почте <b>' . htmlspecialchars(
|
2022-12-19 18:26:14 +00:00
|
|
|
|
$_GET['cancel']
|
2023-01-10 16:29:32 +00:00
|
|
|
|
) . '.</b>. Перейдите по ссылке указанной в письме, либо напишите нам в службу поддержки support@new-combats.com';
|
2022-12-19 18:26:14 +00:00
|
|
|
|
}
|
|
|
|
|
die();
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-12-19 18:26:14 +00:00
|
|
|
|
if (isset($_GET['send6102'])) {
|
|
|
|
|
// specify your email below and that's all ;)
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$message = 'Текст сообщения!';
|
2022-12-19 18:26:14 +00:00
|
|
|
|
// ***************************************
|
|
|
|
|
|
|
|
|
|
function sendmail($mail, $login)
|
|
|
|
|
{
|
|
|
|
|
global $message, $keymd5;
|
|
|
|
|
//
|
|
|
|
|
$md5mail = md5($keymd5 . '+' . $mail);
|
|
|
|
|
$message = str_replace('{mail}', $mail, $message);
|
|
|
|
|
$message = str_replace('{login}', $login, $message);
|
|
|
|
|
$message = str_replace('{md5mail}', $md5mail, $message);
|
|
|
|
|
//
|
|
|
|
|
$headers = "MIME-Version: 1.0\r\n";
|
2023-01-10 17:26:14 +00:00
|
|
|
|
$headers .= "Content-type: text/html; charset=utf8\r\n";
|
2022-12-19 18:26:14 +00:00
|
|
|
|
$headers .= "From: support@new-combats.com\r\n";
|
|
|
|
|
//
|
|
|
|
|
$to = $mail;
|
|
|
|
|
//
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$subject = 'Бойцовский Клуб';
|
|
|
|
|
$message = 'Подтвердите ваш e-mail для <b>' . $mail['name'] . '</b>.<br><br>С уважением,<br>Администрация';
|
2022-12-19 18:26:14 +00:00
|
|
|
|
//
|
|
|
|
|
if (mail($to, $subject, $message, $headers) == true) {
|
|
|
|
|
//return true;
|
|
|
|
|
echo '[Yes]';
|
|
|
|
|
} else {
|
|
|
|
|
//return false;
|
|
|
|
|
echo '[No]';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$mail = mysql_fetch_array(
|
|
|
|
|
mysql_query('SELECT * FROM `users_rbk` WHERE `email` != "" AND `send` != 3 AND `email` NOT LIKE "%@1%" LIMIT 1')
|
|
|
|
|
);
|
|
|
|
|
$x = mysql_fetch_array(
|
|
|
|
|
mysql_query(
|
|
|
|
|
'SELECT COUNT(*) FROM `users_rbk` WHERE `email` != "" AND `send` != 3 AND `email` NOT LIKE "%@1%" LIMIT 1'
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
$x = 0 + $x[0];
|
|
|
|
|
if (isset($mail['email'])) {
|
|
|
|
|
//$mail['email'] = 'difree@gmail.com';
|
|
|
|
|
|
|
|
|
|
sendmail($mail['email'], $mail['login']);
|
|
|
|
|
mysql_query('UPDATE `users_rbk` SET `send` = 3 WHERE `email` = "' . $mail['email'] . '"');
|
2023-01-10 16:29:32 +00:00
|
|
|
|
echo '[' . $mail['email'] . ']<hr>Подтвердите ваш e-mail для <b>' . $mail['name'] . '</b>.<br><br>С уважением,<br>Администрация<hr>';
|
2022-12-19 18:26:14 +00:00
|
|
|
|
echo '[+]<script>setTimeout("top.location = top.location",1000);</script>';
|
|
|
|
|
} else {
|
|
|
|
|
echo '[-]';
|
|
|
|
|
echo '[' . $mail['email'] . ']';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
2022-12-19 18:26:14 +00:00
|
|
|
|
}
|
2023-01-10 16:29:32 +00:00
|
|
|
|
die('<br>Отправлено: ' . $x);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|