Хороним $_COOKIE['pass'], отказываемся от md5('pass'). Это не регистрация, а чёрная дыра!
This commit is contained in:
@@ -818,7 +818,7 @@ class Battle
|
||||
`u`.`zag`,`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`online`,`u`.`admin`,`u`.`city`,`u`.`cityreg`,`u`.`align`,`u`.`align_lvl`,`u`.`align_exp`,`u`.`clan`,
|
||||
`u`.`level`,`u`.`money`,`u`.`money3`,`u`.`money2`,`u`.`money4`,`u`.`battle`,`u`.`sex`,`u`.`obraz`,`u`.`win`,`u`.`win_t`,
|
||||
`u`.`lose`,`u`.`lose_t`,`u`.`nich`,`u`.`timeMain`,`u`.`invis`,`u`.`bot_id`,`u`.`animal`,`u`.`type_pers`,
|
||||
`u`.`notrhod`,`u`.`bot_room`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`activ`,`u`.`stopexp`,`u`.`real`,
|
||||
`u`.`notrhod`,`u`.`bot_room`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`stopexp`,`u`.`real`,
|
||||
|
||||
`st`.*
|
||||
|
||||
@@ -9813,7 +9813,7 @@ class Battle
|
||||
`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`online`,`u`.`admin`,`u`.`city`,`u`.`cityreg`,`u`.`align`,`u`.`align_lvl`,`u`.`align_exp`,`u`.`clan`,
|
||||
`u`.`level`,`u`.`money`,`u`.`money3`,`u`.`money2`,`u`.`money4`,`u`.`battle`,`u`.`sex`,`u`.`obraz`,`u`.`win`,`u`.`win_t`,
|
||||
`u`.`lose`,`u`.`lose_t`,`u`.`nich`,`u`.`timeMain`,`u`.`invis`,`u`.`bot_id`,`u`.`animal`,`u`.`type_pers`,
|
||||
`u`.`notrhod`,`u`.`bot_room`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`activ`,`u`.`stopexp`,`u`.`real`,
|
||||
`u`.`notrhod`,`u`.`bot_room`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`stopexp`,`u`.`real`,
|
||||
|
||||
`st`.*
|
||||
|
||||
|
||||
@@ -865,9 +865,9 @@ class BotLogic
|
||||
$se = 1;
|
||||
}
|
||||
|
||||
$r = ['name' => '_', 'city_real' => '', 'deviz' => '', 'chatColor' => 'Black'];
|
||||
$r = ['name' => '_', 'chatColor' => 'Black'];
|
||||
|
||||
$ins = mysql_query("INSERT INTO `users` (`fnq`,`host_reg`,`room`,`login`,`pass`,`ipreg`,`ip`,`city`,`cityreg`,`name`,`sex`,`city_real`,`deviz`,`chatColor`,`timereg`) VALUES (
|
||||
$ins = mysql_query("INSERT INTO `users` (`fnq`,`host_reg`,`room`,`login`,`pass`,`ipreg`,`ip`,`city`,`cityreg`,`name`,`sex`,`chatColor`,`timereg`) VALUES (
|
||||
'0',
|
||||
'real_bot_user',
|
||||
'0',
|
||||
@@ -879,8 +879,6 @@ class BotLogic
|
||||
'capitalcity',
|
||||
'" . $r['name'] . "',
|
||||
'" . mysql_real_escape_string($sex) . "',
|
||||
'" . $r['city_real'] . "',
|
||||
'" . $r['deviz'] . "',
|
||||
'" . $r['chatColor'] . "',
|
||||
'" . time() . "')");
|
||||
if ($ins) {
|
||||
|
||||
@@ -29,6 +29,7 @@ class Config
|
||||
$c['title3'] = $c['name'];
|
||||
$c['keys'] = $c['name'] . ', combats.com, ' . $c['name'] . ' игра, ' . $c['name'] . ' играть, игра ' . $c['name'] . ', старый ' . $c['name'] . ', ' . $c['name'] . ' онлайн игра, ' . $c['name'] . ' браузерная игра, играть в ' . $c['name'] . ', игра бк, бк игра, старый бк, играть в бк, бк онлайн игра, новый бк, Легендарный ' . $c['name'] . ', легендарный бк, combats, комбатс, combats ru, combats com, OldBK, oldbk ru, oldbk com, олдбк, old bk, олд бк, mycombats, rebk, recombats, oldcombats, obk2'; //Ключевые слова META
|
||||
$c['desc'] = '«' . $c['name'] . '» – это бесплатная увлекательная браузерная онлайн игра 2004-2009г, в которой сконцентрировано все самое лучшее от современных онлайн игр. В этой браузерной игре заложены самые интересные традиции всем известной онлайн игры под названием «' . $c['name'] . ' 2004-2009», которая, кстати, стала первооткрывателем всех браузерных игр.'; //Описание META
|
||||
$c['footer'] = $c['name'] . ' © 2013-' . date('Y');
|
||||
|
||||
//Сервера
|
||||
$c['host'] = 'new-combats.com';
|
||||
@@ -39,6 +40,8 @@ class Config
|
||||
$c['abandonedplain'] = $c['host'];
|
||||
$c['https'] = 'https://' . $c['host'] . DIRECTORY_SEPARATOR;
|
||||
$c['exit'] = '<script>top.location="' . $c['https'] . '";</script>';
|
||||
$c['support'] = 'support@' . $c['host'];
|
||||
|
||||
|
||||
//Валюта
|
||||
$c['curency_name'] = 'RUB';
|
||||
|
||||
@@ -106,7 +106,7 @@ class FightRequest
|
||||
);
|
||||
while ($ur = mysql_fetch_array($usp)) {
|
||||
mysql_query(
|
||||
'INSERT INTO `users` (`login`,`room`,`name`,`sex`,`level`,`inTurnirnew`,`bithday`,`activ`) VALUES ("' . $ur['login'] . '","318","' . $ur['name'] . '","' . $ur['sex'] . '","' . $t['level'] . '","' . $pl['id'] . '","01.01.2001","0")'
|
||||
'INSERT INTO `users` (`login`,`room`,`name`,`sex`,`level`,`inTurnirnew`,`bithday`) VALUES ("' . $ur['login'] . '","318","' . $ur['name'] . '","' . $ur['sex'] . '","' . $t['level'] . '","' . $pl['id'] . '","01.01.2001")'
|
||||
);
|
||||
$uri = mysql_insert_id();
|
||||
mysql_query(
|
||||
@@ -241,7 +241,7 @@ class FightRequest
|
||||
);
|
||||
while ($ur = mysql_fetch_array($usp)) {
|
||||
mysql_query(
|
||||
'INSERT INTO `users` (`login`,`room`,`name`,`sex`,`level`,`inTurnirnew`,`bithday`,`activ`) VALUES ("' . $ur['login'] . '","318","' . $ur['name'] . '","' . $ur['sex'] . '","' . $t['level'] . '","' . $pl['id'] . '","01.01.2001","0")'
|
||||
'INSERT INTO `users` (`login`,`room`,`name`,`sex`,`level`,`inTurnirnew`,`bithday`) VALUES ("' . $ur['login'] . '","318","' . $ur['name'] . '","' . $ur['sex'] . '","' . $t['level'] . '","' . $pl['id'] . '","01.01.2001")'
|
||||
);
|
||||
$uri = mysql_insert_id();
|
||||
mysql_query(
|
||||
@@ -356,7 +356,6 @@ class FightRequest
|
||||
'cityreg' => $botInfo['city'],
|
||||
'name' => $botInfo['login'],
|
||||
'sex' => $botInfo['sex'],
|
||||
'deviz' => '',
|
||||
'hobby' => '',
|
||||
'time_reg' => time(),
|
||||
'obraz' => $botInfo['obraz'],
|
||||
@@ -2910,8 +2909,8 @@ function MM_jumpMenu(targ,selObj,restore){ //v3.0
|
||||
|
||||
//============================================================================================= Ïðèçîâûå
|
||||
Db::sql(
|
||||
'insert into users (name, align, `real`, login, host_reg, pass, ip, ipreg, city, cityreg, room, timereg, mail, bithday, sex, fnq, battle, design, molch2, level)
|
||||
values (?,?,1,?,0,?,?,?,?,?,422,unix_timestamp(),?,?,?,0,0,1,unix_timestamp() + 86400,8)',
|
||||
'insert into users (name, align, `real`, login, host_reg, pass, ip, ipreg, city, cityreg, room, timereg, mail, bithday, sex, fnq, battle, molch2, level)
|
||||
values (?,?,1,?,0,?,?,?,?,?,422,unix_timestamp(),?,?,?,0,0,unix_timestamp() + 86400,8)',
|
||||
[
|
||||
$this->u->info['name'],
|
||||
$this->u->info['align'],
|
||||
|
||||
@@ -1338,7 +1338,6 @@ class Magic
|
||||
'cityreg' => $u->info['cityreg'],
|
||||
'name' => $u->info['name'],
|
||||
'sex' => $u->info['sex'],
|
||||
'deviz' => $u->info['deviz'],
|
||||
'hobby' => $u->info['hobby'],
|
||||
'time_reg' => $u->info['time_reg'],
|
||||
'obraz' => $u->info['obraz'],
|
||||
|
||||
@@ -14,4 +14,9 @@ class PassGen
|
||||
$length
|
||||
);
|
||||
}
|
||||
|
||||
public static function intCode($length = 8): int
|
||||
{
|
||||
return mt_rand(10 ** ($length - 1), 10 ** $length - 1);
|
||||
}
|
||||
}
|
||||
@@ -1426,7 +1426,7 @@ class Priems
|
||||
`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`online`,`u`.`admin`,`u`.`city`,`u`.`cityreg`,`u`.`align`,`u`.`clan`,
|
||||
`u`.`level`,`u`.`money`,`u`.`money3`,`u`.`money4`,`u`.`battle`,`u`.`sex`,`u`.`obraz`,`u`.`win`,`u`.`win_t`,
|
||||
`u`.`lose`,`u`.`lose_t`,`u`.`nich`,`u`.`timeMain`,`u`.`invis`,`u`.`bot_id`,`u`.`animal`,`u`.`type_pers`,
|
||||
`u`.`notrhod`,`u`.`bot_room`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`activ`,`u`.`stopexp`,`u`.`real`,
|
||||
`u`.`notrhod`,`u`.`bot_room`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`stopexp`,`u`.`real`,
|
||||
|
||||
`st`.*
|
||||
|
||||
@@ -1455,7 +1455,7 @@ class Priems
|
||||
`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`online`,`u`.`admin`,`u`.`city`,`u`.`cityreg`,`u`.`align`,`u`.`clan`,
|
||||
`u`.`level`,`u`.`money`,`u`.`money3`,`u`.`money4`,`u`.`battle`,`u`.`sex`,`u`.`obraz`,`u`.`win`,`u`.`win_t`,
|
||||
`u`.`lose`,`u`.`lose_t`,`u`.`nich`,`u`.`timeMain`,`u`.`invis`,`u`.`bot_id`,`u`.`animal`,`u`.`type_pers`,
|
||||
`u`.`notrhod`,`u`.`bot_room`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`activ`,`u`.`stopexp`,`u`.`real`,
|
||||
`u`.`notrhod`,`u`.`bot_room`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`stopexp`,`u`.`real`,
|
||||
|
||||
`st`.*
|
||||
|
||||
|
||||
@@ -1214,7 +1214,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
`u`.`level`,
|
||||
`u`.`city`,
|
||||
`u`.`online`,
|
||||
`u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,
|
||||
`u`.`sex`,`u`.`autospell`,`u`.`noplaw`,
|
||||
`u`.`cityreg`,
|
||||
`u`.`palpro`,
|
||||
`u`.`invis`,
|
||||
@@ -1355,7 +1355,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
$this->info['admin'],
|
||||
$this->info['nadmin'],
|
||||
$this->info['banned'],
|
||||
$this->info['activ'],
|
||||
$this->info['align'],
|
||||
$this->info['id'],
|
||||
$this->info['level']
|
||||
@@ -1384,7 +1383,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
if ($this->info['banned'] < $md[5]) {
|
||||
$this->info['banned'] = $md[5];
|
||||
}
|
||||
$this->info['activ'] = $md[6];
|
||||
|
||||
$this->info['noreal'] = 1;
|
||||
$this->info['align_real'] = $md[7];
|
||||
$this->info['__id'] = $md[8];
|
||||
@@ -1581,7 +1580,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
} else {
|
||||
$t = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`login2`,`pass`,`pass2`,`emailconfirmation`,`securetime`,`sys`,`online`,`ip`,`ipreg`,`joinIP`,`admin`,`city`,`room`,`banned`,`auth`,`align`,`mod_zvanie`,`clan`,`nextMsg`,`molch1`,`molch2`,`molch3`,`level`,`money`,`battle`,`cityreg`,`invBlock`,`invBlockCode`,`zag`,`a1`,`q1`,`mail`,`name`,`bithday`,`sex`,`city_real`,`icq`,`icq_hide`,`homepage`,`deviz`,`hobby`,`chatColor`,`timereg`,`add_smiles`,`obraz`,`win`,`lose`,`nich`,`cityreg2`,`host`,`info_delete`,`dateEnter`,`afk`,`dnd`,`timeMain`,`clan_prava`,`addpr`,`marry`,`city2`,`invis`,`bot_id`,`haos`,`host_reg`,`inUser`,`jail`,`animal`,`vip`,`catch`,`frg`,`no_ip`,`type_pers`,`bot_room` FROM `users` WHERE `login` = "' . mysql_real_escape_string(
|
||||
'SELECT `id`,`login`,`login2`,`pass`,`pass2`,`emailconfirmation`,`securetime`,`sys`,`online`,`ip`,`ipreg`,`joinIP`,`admin`,`city`,`room`,`banned`,`auth`,`align`,`mod_zvanie`,`clan`,`nextMsg`,`molch1`,`molch2`,`molch3`,`level`,`money`,`battle`,`cityreg`,`invBlock`,`invBlockCode`,`zag`,`a1`,`q1`,`mail`,`name`,`bithday`,`sex`,`hobby`,`chatColor`,`timereg`,`add_smiles`,`obraz`,`win`,`lose`,`nich`,`cityreg2`,`host`,`info_delete`,`dateEnter`,`afk`,`dnd`,`timeMain`,`clan_prava`,`addpr`,`marry`,`city2`,`invis`,`bot_id`,`haos`,`host_reg`,`inUser`,`jail`,`animal`,`vip`,`catch`,`frg`,`no_ip`,`type_pers`,`bot_room` FROM `users` WHERE `login` = "' . mysql_real_escape_string(
|
||||
$_POST['trnLogin']
|
||||
) . '" AND `city` = "' . $this->info['city'] . '" LIMIT 1'
|
||||
)
|
||||
@@ -2078,7 +2077,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
return mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT
|
||||
`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`pass`,`u`.`pass2`,`u`.`repass`,`u`.`notrhod`,`u`.`emailconfirmation`,`u`.`securetime`,`u`.`sys`,`u`.`palpro`,`u`.`online`,`u`.`ip`,`u`.`ipreg`,`u`.`joinIP`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`banned`,`u`.`auth`,`u`.`align`,`u`.`align2`,`u`.`align_lvl`,`u`.`align_exp`,`u`.`mod_zvanie`,`u`.`clan`,`u`.`nextMsg`,`u`.`molch1`,`u`.`molch2`,`u`.`molch3`,`u`.`level`,`u`.`money`,`u`.`money2`,`u`.`money4`,`u`.`money3`,`u`.`battle`,`u`.`cityreg`,`u`.`invBlock`,`u`.`allLock`,`u`.`invBlockCode`,`u`.`zag`,`u`.`a1`,`u`.`q1`,`u`.`mail`,`u`.`name`,`u`.`bithday`,`u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,`u`.`city_real`,`u`.`icq`,`u`.`icq_hide`,`u`.`homepage`,`u`.`deviz`,`u`.`hobby`,`u`.`chatColor`,`u`.`timereg`,`u`.`add_smiles`,`u`.`obraz`,`u`.`win`,`u`.`win_bs`,`u`.`lose`,`u`.`nich`,`u`.`cityreg2`,`u`.`host`,`u`.`info_delete`,`u`.`dateEnter`,`u`.`afk`,`u`.`dnd`,`u`.`timeMain`,`u`.`clan_prava`,`u`.`addpr`,`u`.`marry`,`u`.`city2`,`u`.`invis`,`u`.`bot_id`,`u`.`haos`,`u`.`host_reg`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`jail`,`u`.`animal`,`u`.`vip`,`u`.`catch`,`u`.`frg`,`u`.`no_ip`,`u`.`type_pers`,`u`.`bot_room`,`u`.`clan_delay`,`u`.`bukmeker`,
|
||||
`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`pass`,`u`.`pass2`,`u`.`repass`,`u`.`notrhod`,`u`.`emailconfirmation`,`u`.`securetime`,`u`.`sys`,`u`.`palpro`,`u`.`online`,`u`.`ip`,`u`.`ipreg`,`u`.`joinIP`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`banned`,`u`.`auth`,`u`.`align`,`u`.`align2`,`u`.`align_lvl`,`u`.`align_exp`,`u`.`mod_zvanie`,`u`.`clan`,`u`.`nextMsg`,`u`.`molch1`,`u`.`molch2`,`u`.`molch3`,`u`.`level`,`u`.`money`,`u`.`money2`,`u`.`money4`,`u`.`money3`,`u`.`battle`,`u`.`cityreg`,`u`.`invBlock`,`u`.`allLock`,`u`.`invBlockCode`,`u`.`zag`,`u`.`a1`,`u`.`q1`,`u`.`mail`,`u`.`name`,`u`.`bithday`,`u`.`sex`,`u`.`autospell`,`u`.`noplaw`,`u`.`hobby`,`u`.`chatColor`,`u`.`timereg`,`u`.`add_smiles`,`u`.`obraz`,`u`.`win`,`u`.`win_bs`,`u`.`lose`,`u`.`nich`,`u`.`cityreg2`,`u`.`host`,`u`.`info_delete`,`u`.`dateEnter`,`u`.`afk`,`u`.`dnd`,`u`.`timeMain`,`u`.`clan_prava`,`u`.`addpr`,`u`.`marry`,`u`.`city2`,`u`.`invis`,`u`.`bot_id`,`u`.`haos`,`u`.`host_reg`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`jail`,`u`.`animal`,`u`.`vip`,`u`.`catch`,`u`.`frg`,`u`.`no_ip`,`u`.`type_pers`,`u`.`bot_room`,`u`.`clan_delay`,`u`.`bukmeker`,
|
||||
`st`.`id`,`st`.`lider`,`st`.`btl_cof`,`st`.`last_hp`,`st`.`last_pr`,`st`.`smena`,`st`.`stats`,`st`.`hpAll`,`st`.`mpAll`,`st`.`hpNow`,`st`.`mpNow`,`st`.`enNow`,`st`.`transfers`,`st`.`regHP`,`st`.`regMP`,`st`.`showmenu`,`st`.`prmenu`,`st`.`ability`,`st`.`skills`,`st`.`sskills`,`st`.`nskills`,`st`.`exp`,`st`.`minHP`,`st`.`minMP`,`st`.`zv`,`st`.`dn`,`st`.`dnow`,`st`.`team`,`st`.`battle_yron`,`st`.`battle_exp`,`st`.`enemy`,`st`.`last_a`,`st`.`last_b`,`st`.`battle_text`,`st`.`upLevel`,`st`.`wipe`,`st`.`bagStats`,`st`.`timeGo`,`st`.`timeGoL`,`st`.`nextAct`,`st`.`active`,`st`.`bot`,`st`.`lastAlign`,`st`.`tactic1`,`st`.`tactic2`,`st`.`tactic3`,`st`.`tactic4`,`st`.`tactic5`,`st`.`tactic6`,`st`.`tactic7`,`st`.`x`,`st`.`y`,`st`.`s`,`st`.`battleEnd`,`st`.`priemslot`,`st`.`priems`,`st`.`priems_z`,`st`.`bet`,`st`.`clone`,`st`.`atack`,`st`.`bbexp`,`st`.`ref_data`,`st`.`res_x`,`st`.`res_y`,`st`.`res_s`,`st`.`bn_capitalcity`,`st`.`bn_demonscity`
|
||||
FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE ' . $whr . ' LIMIT 1'
|
||||
)
|
||||
@@ -2107,7 +2106,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
`cityreg`,
|
||||
`name`,
|
||||
`sex`,
|
||||
`deviz`,
|
||||
`hobby`,
|
||||
`timereg`,
|
||||
`obraz`,
|
||||
@@ -2123,7 +2121,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
"' . $clon['login'] . '",
|
||||
"' . $clon['sex'] . '",
|
||||
"",
|
||||
"",
|
||||
"' . $clon['time_reg'] . '",
|
||||
"' . $clon['obraz'] . '",
|
||||
"' . mysql_real_escape_string($id) . '",
|
||||
@@ -2201,7 +2198,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
if ($botDate == null) {
|
||||
$bot = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`stats`,`obraz`,`level`,`sex`,`name`,`deviz`,`hobby`,`type`,`itemsUse`,`priemUse`,`align`,`clan`,`align_zvanie`,`bonus`,`clan_zvanie`,`time_reg`,`city_reg`,`upLevel`,`active`,`expB`,`p_items`,`agressor`,`priems`,`priems_z`,`award` FROM `test_bot` WHERE `id` = "' . $id . '" LIMIT 1'
|
||||
'SELECT `id`,`login`,`stats`,`obraz`,`level`,`sex`,`name`,`hobby`,`type`,`itemsUse`,`priemUse`,`align`,`clan`,`align_zvanie`,`bonus`,`clan_zvanie`,`time_reg`,`city_reg`,`upLevel`,`active`,`expB`,`p_items`,`agressor`,`priems`,`priems_z`,`award` FROM `test_bot` WHERE `id` = "' . $id . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
@@ -2232,7 +2229,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
`cityreg`,
|
||||
`name`,
|
||||
`sex`,
|
||||
`deviz`,
|
||||
`hobby`,
|
||||
`timereg`,
|
||||
`obraz`,
|
||||
@@ -2246,7 +2242,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
"' . $bot['city_reg'] . '",
|
||||
"' . $bot['name'] . '",
|
||||
"' . $bot['sex'] . '",
|
||||
"' . $bot['deviz'] . '",
|
||||
"' . $bot['hobby'] . '",
|
||||
"' . $bot['time_reg'] . '",
|
||||
"' . $bot['obraz'] . '",
|
||||
@@ -7913,7 +7908,7 @@ LIMIT 1'
|
||||
if ($uid != $this->info['id']) {
|
||||
$u = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `u`.`align`,`u`.`align2`,`u`.`battle`,`u`.`clan`,`u`.`animal`,`u`.`id`,`u`.`level`,`u`.`login`,`u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,`u`.`obraz`,
|
||||
'SELECT `u`.`align`,`u`.`align2`,`u`.`battle`,`u`.`clan`,`u`.`animal`,`u`.`id`,`u`.`level`,`u`.`login`,`u`.`sex`,`u`.`autospell`,`u`.`noplaw`,`u`.`obraz`,
|
||||
`st`.`id`,`st`.`lider`,`st`.`btl_cof`,`st`.`last_hp`,`st`.`last_pr`,`st`.`smena`,`st`.`stats`,`st`.`hpAll`,`st`.`mpAll`,`st`.`hpNow`,`st`.`mpNow`,`st`.`enNow`,`st`.`transfers`,`st`.`regHP`,`st`.`regMP`,`st`.`showmenu`,`st`.`prmenu`,`st`.`ability`,`st`.`skills`,`st`.`sskills`,`st`.`nskills`,`st`.`exp`,`st`.`minHP`,`st`.`minMP`,`st`.`zv`,`st`.`dn`,`st`.`dnow`,`st`.`team`,`st`.`battle_yron`,`st`.`battle_exp`,`st`.`enemy`,`st`.`last_a`,`st`.`last_b`,`st`.`battle_text`,`st`.`upLevel`,`st`.`wipe`,`st`.`bagStats`,`st`.`timeGo`,`st`.`timeGoL`,`st`.`nextAct`,`st`.`active`,`st`.`bot`,`st`.`lastAlign`,`st`.`tactic1`,`st`.`tactic2`,`st`.`tactic3`,`st`.`tactic4`,`st`.`tactic5`,`st`.`tactic6`,`st`.`tactic7`,`st`.`x`,`st`.`y`,`st`.`s`,`st`.`battleEnd`,`st`.`priemslot`,`st`.`priems`,`st`.`priems_z`,`st`.`bet`,`st`.`clone`,`st`.`atack`,`st`.`bbexp`,`st`.`ref_data`,`st`.`res_x`,`st`.`res_y`,`st`.`res_s`,`st`.`bn_capitalcity`,`st`.`bn_demonscity`
|
||||
FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE `u`.`id`="' . mysql_real_escape_string(
|
||||
$uid
|
||||
@@ -8346,7 +8341,7 @@ LIMIT 1'
|
||||
if ($uid != $this->info['id']) {
|
||||
$u = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `u`.`inTurnir`,`u`.`allLock`,`u`.`battle`,`u`.`zag`,`u`.`banned`,`u`.`align`,`u`.`align2`,`u`.`clan`,`u`.`animal`,`u`.`id`,`u`.`level`,`u`.`login`,`u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,`u`.`obraz`,`u`.`vip`,
|
||||
'SELECT `u`.`inTurnir`,`u`.`allLock`,`u`.`battle`,`u`.`zag`,`u`.`banned`,`u`.`align`,`u`.`align2`,`u`.`clan`,`u`.`animal`,`u`.`id`,`u`.`level`,`u`.`login`,`u`.`sex`,`u`.`autospell`,`u`.`noplaw`,`u`.`obraz`,`u`.`vip`,
|
||||
`st`.`id`,`st`.`lider`,`st`.`btl_cof`,`st`.`last_hp`,`st`.`last_pr`,`st`.`smena`,`st`.`stats`,`st`.`hpAll`,`st`.`mpAll`,`st`.`hpNow`,`st`.`mpNow`,`st`.`enNow`,`st`.`transfers`,`st`.`regHP`,`st`.`regMP`,`st`.`showmenu`,`st`.`prmenu`,`st`.`ability`,`st`.`skills`,`st`.`sskills`,`st`.`nskills`,`st`.`exp`,`st`.`minHP`,`st`.`minMP`,`st`.`zv`,`st`.`dn`,`st`.`dnow`,`st`.`team`,`st`.`battle_yron`,`st`.`battle_exp`,`st`.`enemy`,`st`.`last_a`,`st`.`last_b`,`st`.`battle_text`,`st`.`upLevel`,`st`.`wipe`,`st`.`bagStats`,`st`.`timeGo`,`st`.`timeGoL`,`st`.`nextAct`,`st`.`active`,`st`.`bot`,`st`.`lastAlign`,`st`.`tactic1`,`st`.`tactic2`,`st`.`tactic3`,`st`.`tactic4`,`st`.`tactic5`,`st`.`tactic6`,`st`.`tactic7`,`st`.`x`,`st`.`y`,`st`.`s`,`st`.`battleEnd`,`st`.`priemslot`,`st`.`priems`,`st`.`priems_z`,`st`.`bet`,`st`.`clone`,`st`.`atack`,`st`.`bbexp`,`st`.`ref_data`,`st`.`res_x`,`st`.`res_y`,`st`.`res_s`,`st`.`bn_capitalcity`,`st`.`bn_demonscity`
|
||||
FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE `u`.`id`="' . mysql_real_escape_string(
|
||||
$uid
|
||||
@@ -11451,7 +11446,7 @@ LIMIT 1'
|
||||
}
|
||||
}
|
||||
|
||||
if (($rtg || !isset($mtest['id'])) && isset($rlog['id']) && $this->info['activ'] == 0) {
|
||||
if (($rtg || !isset($mtest['id'])) && isset($rlog['id'])) {
|
||||
$rfs['data'] = explode('|', $rlogs['ref_data']);
|
||||
$ekr = '0.00';
|
||||
$bn = mysql_fetch_array(
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
namespace User;
|
||||
|
||||
use Core\Config;
|
||||
use Core\Db;
|
||||
use Core\Mail;
|
||||
use UserIp;
|
||||
|
||||
class Confirmation
|
||||
{
|
||||
/**
|
||||
* Äëÿ îäíîòèïíûõ ïèñåì ñ ïîäòâåðæäåíèåì.
|
||||
* @param array $userinfo Äàííûå èç (User)->info.
|
||||
* @param mixed $value Íîâîå çíà÷åíèå
|
||||
* @param ?int $code Ïðîâåðî÷íûé êîä
|
||||
* @param string $type Òèï ìåíÿåìîãî çíà÷åíèÿ. Ñ ìàëåíüêîé áóêâû, èìåíèòåëüíûé ïàäåæ.
|
||||
* @return void
|
||||
*/
|
||||
public static function byEmail(array $userinfo, string $type, $value, ?int $code = null)
|
||||
{
|
||||
if ($type === 'pass2' && is_null($code)) {
|
||||
self::pass2ByEmailCustom($userinfo, $value);
|
||||
return;
|
||||
}
|
||||
$ip = UserIp::get();
|
||||
$date = date('d.m.y H:i');
|
||||
$https = Config::get('https');
|
||||
$support = Config::get('support');
|
||||
$activationLink = 'https://' . $userinfo['city'] . Config::get('host') .
|
||||
"/confirm.php?id={$userinfo['id']}&code=$code";
|
||||
$fulllogin = $userinfo['login'] . "[{$userinfo['level']}]";
|
||||
Mail::send(
|
||||
$userinfo['mail'],
|
||||
<<<HTML
|
||||
<html lang="ru">
|
||||
<head><title>Ñìåíèòü $type</title></head>
|
||||
<body>
|
||||
$date<br>
|
||||
Êòî-òî ñ IP: $ip ïûòàåòñÿ ñìåíèòü $type ê ïåðñîíàæó $fulllogin.<br>
|
||||
Ò.ê. â àíêåòå ó ýòîãî ïåðñîíàæà óêàçàí email: {$userinfo['mail']}, òî âû è ïîëó÷èëè ýòî ïèñüìî.<br>
|
||||
login: {$userinfo['login']}<br>
|
||||
Íîâûé $type: <span style="background-color: wheat; font-family: Consolas, monospace;">$value</span><br><br>
|
||||
Äëÿ òîãî ÷òîáû ñìåíèòü $type, ïåðåéäèòå ïî ññûëêå:<br>
|
||||
$activationLink<br>
|
||||
<br>--<br>
|
||||
Áîéöîâñêèé Êëóá $https<br>
|
||||
Àäìèíèñòðàöèÿ Áîéöîâñêîãî Êëóáà: $support<br>
|
||||
P.S. Äàííîå ïèñüìî ñãåíåðèðîâàíî àâòîìàòè÷åñêè, îòâå÷àòü íà íåãî íå íóæíî.
|
||||
</body>
|
||||
</html>
|
||||
HTML,
|
||||
"Ñìåíà $type ó ïåðñîíàæà $fulllogin"
|
||||
);
|
||||
}
|
||||
|
||||
private static function pass2ByEmailCustom(array $userinfo, string $pass2)
|
||||
{
|
||||
|
||||
$ip = UserIp::get();
|
||||
$fulllogin = $userinfo['login'] . "[{$userinfo['level']}]";
|
||||
Mail::send(
|
||||
$userinfo['mail'],
|
||||
<<<HTML
|
||||
<html lang="ru">
|
||||
<head><title>Âòîðîé ïàðîëü îò ïåðñîíàæà $fulllogin.</title></head>
|
||||
<body>
|
||||
Âàìè, ñ IP àäðåñà - $ip, áûë óñòàíîâëåí âòîðîé ïàðîëü â èãðå Áîéöîâñêèé Êëóá.<br>
|
||||
Åñëè ýòî áûëè íå Âû, ñâÿæèòåñü ñ àäìèíèñòðàöèåé ñàéòà.<br><br>
|
||||
------------------------------------------------------------------<br>
|
||||
Âàø ëîãèí | {$userinfo['login']}<br>
|
||||
Âòîðîé ïàðîëü | ' . $pass2 . '<br>
|
||||
------------------------------------------------------------------<br>
|
||||
<br><br>Æåëàåì Âàì ïðèÿòíîé èãðû.<br><br><i>Àäìèíèñòðàöèÿ</i>
|
||||
</body>
|
||||
HTML,
|
||||
"Âòîðîé ïàðîëü îò ïåðñîíàæà $fulllogin"
|
||||
);
|
||||
}
|
||||
|
||||
public static function byCode(int $uid, int $code): string
|
||||
{
|
||||
$status = '';
|
||||
|
||||
if ($uid <= 0 || $code <= 0) {
|
||||
return $status;
|
||||
}
|
||||
|
||||
$codes = Db::getRow(
|
||||
'select * from emailconfirmation where id = ? and code = ? and (active = 1 or pass = 1 or email = 1)',
|
||||
[$uid, $code]
|
||||
);
|
||||
if (!$codes['id']) {
|
||||
$status = 'Ññûëêà óñòàðåëà!';
|
||||
} elseif ($codes['active'] === 1) {
|
||||
Db::sql(
|
||||
'update users set emailconfirmation = 1, securetime = unix_timestamp() + 259200 where id = ?',
|
||||
[$codes['id']]
|
||||
);
|
||||
$status = "Ïîäòâåðæäåíèå ñìåíû ïàðîëÿ/email ÷åðåç ïî÷òó âêëþ÷åíî";
|
||||
} elseif ($codes['pass'] === 1) {
|
||||
Db::sql(
|
||||
'update users as u inner join emailconfirmation as e on u.id = e.id set u.pass = e.pa_em, u.securetime = unix_timestamp() + 259200 where u.id = ?',
|
||||
[$codes['id']]
|
||||
);
|
||||
$status = "Óäà÷íî ñìåíèëè ïàðîëü<";
|
||||
} elseif ($codes['email'] === 1) {
|
||||
Db::sql(
|
||||
'update users as u inner join emailconfirmation as e on u.id = e.id set u.mail = e.pa_em, u.securetime = unix_timestamp() + 259200 where u.id = ?',
|
||||
[$codes['id']]
|
||||
);
|
||||
$status = "Óäà÷íî ñìåíèëè email";
|
||||
}
|
||||
Db::sql('delete from emailconfirmation where id = ? and code = ?', [$_GET['id'], $_GET['code']]);
|
||||
if ($status) {
|
||||
$status = "<h3>$status</h3>";
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace User;
|
||||
|
||||
use Core\Db;
|
||||
use PassGen;
|
||||
use User;
|
||||
|
||||
class Email
|
||||
{
|
||||
private array $info = [];
|
||||
|
||||
public function __construct(array $userinfo)
|
||||
{
|
||||
$this->info = $userinfo ?? User::start()->info;
|
||||
}
|
||||
|
||||
public function change(string $old, string $new): string
|
||||
{
|
||||
if ($old === $new) {
|
||||
return $this->info['mail'];
|
||||
}
|
||||
|
||||
if ($this->info['emailconfirmation'] === 1) {
|
||||
$query = 'insert into emailconfirmation (id, code, pa_em, pass) values (?,?,?,1)';
|
||||
$args = [
|
||||
$this->info['id'],
|
||||
PassGen::intCode(10),
|
||||
$new
|
||||
];
|
||||
Confirmation::byEmail($this->info, 'email', $new, $args[1]);
|
||||
} else {
|
||||
$query = 'update users set mail = ?, securetime = unix_timestamp() + 259200 where id = ?';
|
||||
$args = [
|
||||
$new,
|
||||
$this->info['id']
|
||||
];
|
||||
}
|
||||
Db::sql($query, $args);
|
||||
return $new;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace User;
|
||||
|
||||
use Core\Db;
|
||||
use PassGen;
|
||||
use User;
|
||||
|
||||
class Password
|
||||
{
|
||||
private array $info = [];
|
||||
|
||||
public function __construct(array $userinfo)
|
||||
{
|
||||
$this->info = $userinfo ?? User::start()->info;
|
||||
}
|
||||
|
||||
public function changeFirst(string $old, string $new): string
|
||||
{
|
||||
if ($old === $new && password_verify($old, $this->info['pass'])) {
|
||||
if ($this->info['emailconfirmation'] === 1) {
|
||||
$query = 'insert into emailconfirmation (id, code, pa_em, pass) values (?,?,?,1)';
|
||||
$args = [
|
||||
$this->info['id'],
|
||||
PassGen::intCode(10),
|
||||
password_hash($new, PASSWORD_DEFAULT)
|
||||
];
|
||||
Confirmation::byEmail($this->info, 'ïàðîëü', $new, $args[1]);
|
||||
$hashedPass = $args[2];
|
||||
} else {
|
||||
$query = 'update users set pass = ?, repass = 0, securetime = unix_timestamp() + 259200 where id = ?';
|
||||
$args = [
|
||||
password_hash($new, PASSWORD_DEFAULT),
|
||||
$this->info['id']
|
||||
];
|
||||
$hashedPass = $args[0];
|
||||
}
|
||||
Db::sql($query, $args);
|
||||
return $hashedPass;
|
||||
}
|
||||
return $this->info['pass'];
|
||||
}
|
||||
|
||||
public function changeSecond(?int $passLength): array
|
||||
{
|
||||
if (in_array($passLength, [4,6,8])) {
|
||||
$query = 'update users set pass2 = ? where id = ?';
|
||||
$pass2 = PassGen::intCode($passLength);
|
||||
$args = [
|
||||
password_hash($pass2, PASSWORD_DEFAULT),
|
||||
$this->info['id']
|
||||
];
|
||||
Confirmation::byEmail($this->info, 'pass2', $pass2);
|
||||
$hash = $args[0];
|
||||
} else {
|
||||
$query = 'update users set pass2 = default where id = ?';
|
||||
$args = [$this->info['id']];
|
||||
}
|
||||
|
||||
Db::sql($query, $args);
|
||||
return [
|
||||
'pass2' => $pass2 ?? '',
|
||||
'hash' => $hash ?? null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,17 +97,21 @@ class UserRegister
|
||||
|
||||
public static function new(string $login, string $password, string $email, $ref, $birthday, $sex): string
|
||||
{
|
||||
$password = password_hash($password, PASSWORD_DEFAULT);
|
||||
$ref = (int)$ref;
|
||||
$ip = UserIp::get();
|
||||
$sex = (int)$sex - 10; //Íà âõîäå 10\11, à ïåðåäàòü íàäî 0\1.
|
||||
Db::sql(
|
||||
'insert into users (users.real,login,host_reg,pass,ip,ipreg,room,timereg,activ,mail,bithday,sex,fnq,design,molch2,level,hobby,clan_zv) values (1,?,?,?,?,?,9,unix_timestamp(),0,?,?,?,0,1,unix_timestamp() + 86400,8,\'\',0)',
|
||||
'insert into users (users.real,login,host_reg,pass,ip,ipreg,room,timereg,mail,bithday,sex,fnq,molch2,level,hobby,clan_zv) values (1,?,?,?,?,?,9,unix_timestamp(),?,?,?,0,unix_timestamp() + 86400,8,\'\',0)',
|
||||
[
|
||||
$login,
|
||||
(int)$ref,
|
||||
md5($password),
|
||||
UserIp::get(),
|
||||
UserIp::get(),
|
||||
$ref,
|
||||
$password,
|
||||
$ip,
|
||||
$ip,
|
||||
$email,
|
||||
date('d.m.Y', strtotime($birthday)),
|
||||
$sex - 10,
|
||||
$sex,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -7,11 +7,7 @@ if( $u->info['twink'] != 0 )
|
||||
{
|
||||
$u->error = 'Невозможно использовать "'.$itm['name'].'". Зайдите на основного персонажа!';
|
||||
}
|
||||
elseif( $u->info['activ'] != 0 )
|
||||
{
|
||||
$u->error = 'Невозможно использовать "'.$itm['name'].'". Активируйте персонажа через E-mail!';
|
||||
}
|
||||
elseif( $itm['id'] > 0 && $itm['item_id']==10006 )
|
||||
elseif( $itm['id'] > 0 && $itm['item_id']==10006 )
|
||||
{
|
||||
$repc='repcapitalcity';
|
||||
if ($u->rep[$repc]<25000)
|
||||
|
||||
@@ -6,8 +6,6 @@ if(!defined('GAME'))
|
||||
|
||||
if( $u->info['twink'] != 0 ) {
|
||||
$u->error = 'Невозможно использовать "'.$itm['name'].'". Зайдите на основного персонажа!';
|
||||
}elseif( $u->info['activ'] != 0 ) {
|
||||
$u->error = 'Невозможно использовать "'.$itm['name'].'". Активируйте персонажа через E-mail!';
|
||||
}elseif( $itm['id'] > 0 ) {
|
||||
if ($u->info['exp']<469999999)
|
||||
{
|
||||
|
||||
@@ -540,7 +540,6 @@ if ($this->users[$this->uids[$uid1]]['hpNow'] > 0){
|
||||
'cityreg' => $this->users[$this->uids[$uid2]]['cityreg'],
|
||||
'name' => $this->users[$this->uids[$uid2]]['name'],
|
||||
'sex' => $this->users[$this->uids[$uid2]]['sex'],
|
||||
'deviz' => $this->users[$this->uids[$uid2]]['deviz'],
|
||||
'hobby' => $this->users[$this->uids[$uid2]]['hobby'],
|
||||
'time_reg' => $this->users[$this->uids[$uid2]]['time_reg'],
|
||||
'obraz' => $this->users[$this->uids[$uid2]]['obraz'],
|
||||
|
||||
Reference in New Issue
Block a user