Убрал вызов User->timeOut.
This commit is contained in:
parent
4c6a5d055b
commit
f761c22950
@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Helper\Conversion;
|
||||
use User\ItemsModel;
|
||||
|
||||
class Dialog
|
||||
{
|
||||
private array $info;
|
||||
@ -208,7 +211,7 @@ class Dialog
|
||||
//Выдаем предмет для квеста
|
||||
$itmb = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "' . $act1[8] . '" LIMIT 1'));
|
||||
if (isset($itmb['id'])) {
|
||||
\User\ItemsModel::addItem($act1[8], $u->info['id'], '|nodelete=1');
|
||||
ItemsModel::addItem($act1[8], $u->info['id'], '|nodelete=1');
|
||||
$txt .= '<br><b><font color=red>Вы получили предмет "' . $itmb['name'] . '"</font></b>';
|
||||
}
|
||||
}
|
||||
@ -229,16 +232,16 @@ class Dialog
|
||||
$txt .= ' за ' . $act1[2] . ' екр.';
|
||||
}
|
||||
if ($act1[3] > 0) {
|
||||
$txt .= ' на срок ' . $u->timeOut($act1[3]) . '';
|
||||
$act1dt .= '|srok=' . $act1[3] . '';
|
||||
$txt .= ' на срок ' . Conversion::secondsToTimeout($act1[3]);
|
||||
$act1dt .= '|srok=' . $act1[3];
|
||||
}
|
||||
$txt .= '</font></b>';
|
||||
|
||||
\User\ItemsModel::addItem($itmb['id'], $u->info['id'], $act1dt);
|
||||
ItemsModel::addItem($itmb['id'], $u->info['id'], $act1dt);
|
||||
$pg = $act1[4];
|
||||
}
|
||||
} else {
|
||||
$txt .= '<br><b><font color=red>Неудалось приобрести предмет...</font></b>';
|
||||
$txt .= '<br><b style="color: red">Неудалось приобрести предмет...</b>';
|
||||
$pg = 1;
|
||||
}
|
||||
} elseif ($act1[0] == 'quest') {
|
||||
@ -263,7 +266,7 @@ class Dialog
|
||||
}
|
||||
$ic2 = 1;
|
||||
while ($ic2 <= $act3[2]) {
|
||||
\User\ItemsModel::addItem($itmqs['id'], $u->info['id'], '|quest_item=1', ['del' => $act3[3]]);
|
||||
ItemsModel::addItem($itmqs['id'], $u->info['id'], '|quest_item=1', ['del' => $act3[3]]);
|
||||
$ic2++;
|
||||
}
|
||||
}
|
||||
@ -393,7 +396,7 @@ class Dialog
|
||||
if ($upd) {
|
||||
if ($itik > 0) {
|
||||
//Выдаем предметы
|
||||
\User\ItemsModel::addItem($itik, $u->info['id'], '|nosale=1|srok=' . (7 * 86400) . '', null, 1);
|
||||
ItemsModel::addItem($itik, $u->info['id'], '|nosale=1|srok=' . (7 * 86400) . '', null, 1);
|
||||
$itm_nm = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $itik . '" LIMIT 1'));
|
||||
$txt = 'Вы получили предмет "' . $itm_nm['name'] . '"';
|
||||
} else {
|
||||
@ -413,7 +416,7 @@ class Dialog
|
||||
}
|
||||
$arts_1 = $arts_1[rand(0, count($arts_1) - 1)];
|
||||
if ($arts_1 > 0) {
|
||||
\User\ItemsModel::addItem($arts_1, $u->info['id'], '|sroknext=1|nosale=1|sleep_moroz=1|srok=' . (86400 / 2) . '', null, 100);
|
||||
ItemsModel::addItem($arts_1, $u->info['id'], '|sroknext=1|nosale=1|sleep_moroz=1|srok=' . (86400 / 2) . '', null, 100);
|
||||
}
|
||||
$itm_nm = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $arts_1 . '" LIMIT 1'));
|
||||
|
||||
@ -433,7 +436,7 @@ class Dialog
|
||||
}
|
||||
$arts_1 = $arts_1[rand(0, count($arts_1) - 1)];
|
||||
if ($arts_1 > 0) {
|
||||
\User\ItemsModel::addItem($arts_1, $u->info['id'], '|sroknext=1|nosale=1|sleep_moroz=1|srok=' . (86400 / 2) . '', null, 100);
|
||||
ItemsModel::addItem($arts_1, $u->info['id'], '|sroknext=1|nosale=1|sleep_moroz=1|srok=' . (86400 / 2) . '', null, 100);
|
||||
}
|
||||
$itm_nm = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $arts_1 . '" LIMIT 1'));
|
||||
|
||||
@ -523,7 +526,7 @@ class Dialog
|
||||
$data = '|frompisher=' . $d->info['id2'];
|
||||
$e = 1;
|
||||
while ($e <= $t[0]) {
|
||||
\User\ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data);
|
||||
ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data);
|
||||
$e++;
|
||||
}
|
||||
$txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i]['add'][1] . ' x' . $t[0] . '<br>';
|
||||
@ -569,7 +572,7 @@ class Dialog
|
||||
$data = '|frompisher=' . $d->info['id2'];
|
||||
$e = 1;
|
||||
while ($e <= $t[0]) {
|
||||
\User\ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data);
|
||||
ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data);
|
||||
$e++;
|
||||
}
|
||||
$txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i]['add'][1] . ' x' . $t[0] . '<br>';
|
||||
@ -615,7 +618,7 @@ class Dialog
|
||||
$data = '|frompisher=' . $d->info['id2'];
|
||||
$e = 1;
|
||||
while ($e <= $t[0]) {
|
||||
\User\ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data);
|
||||
ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data);
|
||||
$e++;
|
||||
}
|
||||
$txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i]['add'][1] . ' x' . $t[0] . '<br>';
|
||||
@ -647,7 +650,7 @@ class Dialog
|
||||
if (isset($keypr1['id'], $keypr2['id'])) {
|
||||
mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr1['id'] . '" OR `id` = "' . $keypr2['id'] . '" LIMIT 2');
|
||||
$data = '|frompisher=' . $d->info['id2'];
|
||||
\User\ItemsModel::addItem(2555, $u->info['id'], $data);
|
||||
ItemsModel::addItem(2555, $u->info['id'], $data);
|
||||
$txt = 'Вы успешно получили "Пирамидальный ключ"';
|
||||
}
|
||||
|
||||
@ -690,7 +693,7 @@ class Dialog
|
||||
$data = '|frompisher=' . $d->info['id2'];
|
||||
$e = 1;
|
||||
while ($e <= $t[0]) {
|
||||
\User\ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data);
|
||||
ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data);
|
||||
$e++;
|
||||
}
|
||||
mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr['id'] . '" LIMIT 1');
|
||||
@ -746,7 +749,7 @@ class Dialog
|
||||
$data = '|frompisher=' . $d->info['id2'];
|
||||
$e = 1;
|
||||
while ($e <= $t[0]) {
|
||||
\User\ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data);
|
||||
ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data);
|
||||
$e++;
|
||||
}
|
||||
mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr['id'] . '" LIMIT 1');
|
||||
@ -802,7 +805,7 @@ class Dialog
|
||||
$data = '|frompisher=' . $d->info['id2'];
|
||||
$e = 1;
|
||||
while ($e <= $t[0]) {
|
||||
\User\ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data);
|
||||
ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data);
|
||||
$e++;
|
||||
}
|
||||
$txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i][$j]['add'][1] . ' x' . $t[0] . '<br>';
|
||||
@ -957,7 +960,7 @@ class Dialog
|
||||
$qsw = 0;
|
||||
while ($qsw < $item['colvo']) {
|
||||
$txt .= '<br/>Вы получили предмет';
|
||||
\User\ItemsModel::addItem($item['item_id'], $u->info['id']);
|
||||
ItemsModel::addItem($item['item_id'], $u->info['id']);
|
||||
$qsw++;
|
||||
}
|
||||
}
|
||||
@ -1214,7 +1217,7 @@ class Dialog
|
||||
$val = 4799;
|
||||
}
|
||||
}
|
||||
\User\ItemsModel::addItem($val, $u->info['id'], $data_itm);
|
||||
ItemsModel::addItem($val, $u->info['id'], $data_itm);
|
||||
$i1++;
|
||||
}
|
||||
} elseif ($var == 'up') {
|
||||
|
@ -1572,7 +1572,7 @@ class Magic
|
||||
}
|
||||
|
||||
} else {
|
||||
$u->error = 'Задержка использования ' . $u->timeOut(
|
||||
$u->error = 'Задержка использования ' . Conversion::secondsToTimeout(
|
||||
($sz['time'] + 4 * 60 * 60) - time()
|
||||
) . '.';
|
||||
}
|
||||
@ -1612,7 +1612,7 @@ class Magic
|
||||
);
|
||||
$u->addAction(time(), 'sanich1', $u->info['battle']);
|
||||
} else {
|
||||
$u->error = 'Задержка использования ' . $u->timeOut(($sz['time'] + 6 * 60) - time()) . '.';
|
||||
$u->error = 'Задержка использования ' . Conversion::secondsToTimeout(($sz['time'] + 6 * 60) - time()) . '.';
|
||||
}
|
||||
|
||||
} elseif ($itm['magic_inci'] == 'sanich3' && $u->info['battle'] > 0) {
|
||||
@ -1660,7 +1660,7 @@ class Magic
|
||||
}
|
||||
|
||||
} else {
|
||||
$u->error = 'Задержка использования ' . $u->timeOut(
|
||||
$u->error = 'Задержка использования ' . Conversion::secondsToTimeout(
|
||||
($sz['time'] + 3 * 60 * 60) - time()
|
||||
) . '.';
|
||||
}
|
||||
|
@ -1,41 +1,38 @@
|
||||
<?php
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
if( $itm['magic_inci'] == 'podvig' ) {
|
||||
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars` = "podvig" AND `time` > "'.(time()).'" LIMIT 1'));
|
||||
if( $u->info['align'] != 2 ) {
|
||||
if( isset($test['id']) ) {
|
||||
$u->error = 'Задержка не прошла, еще '.$u->timeOut($test['time']-time());
|
||||
}else{
|
||||
//
|
||||
$dngcity = array(
|
||||
5035 => array('angelscity','Бездна'),
|
||||
5036 => array('capitalcity','Пещера Тысячи Проклятий'),
|
||||
5037 => array('demonscity','Катакомбы'),
|
||||
5038 => array('abandonedplain','Гора Легиона'), //mooncity
|
||||
5039 => array('suncity','Грибница'),
|
||||
5040 => array('sandcity','Пещера Мглы')
|
||||
);
|
||||
//
|
||||
$dngcity = $dngcity[$itm['item_id']];
|
||||
//
|
||||
$hgo1 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time` > "'.(time()-86400).'" AND `vars` = "psh_qt_'.$dngcity[0].'" LIMIT 1',1);
|
||||
if(!isset($hgo1['id'])) {
|
||||
$u->error = 'Нет задержки для подземелья '.$dngcity[1].'.';
|
||||
}else{
|
||||
//
|
||||
$u->addAction(time(),'podvig','');
|
||||
//$u->error = 'Все прошло успешно, задержки на получение задания в пещеру '.$dngcity[1].' снята.';
|
||||
$u->error = 'Успешно использован свиток Право на Подвиг ('.$dngcity[1].')';
|
||||
mysql_query('UPDATE `actions` SET `time` = "'.(time()-86401).'" WHERE `id` = "'.($hgo1['id']).'" LIMIT 1');
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$u->error = 'Хаосники не могут пользоваться этим свитком!';
|
||||
}
|
||||
if ($itm['magic_inci'] == 'podvig') {
|
||||
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "podvig" AND `time` > "' . (time()) . '" LIMIT 1'));
|
||||
if ($u->info['align'] != 2) {
|
||||
if (isset($test['id'])) {
|
||||
$u->error = 'Задержка не прошла, еще ' . Conversion::secondsToTimeout($test['time'] - time());
|
||||
} else {
|
||||
//
|
||||
$dngcity = [
|
||||
5035 => ['angelscity', 'Бездна'],
|
||||
5036 => ['capitalcity', 'Пещера Тысячи Проклятий'],
|
||||
5037 => ['demonscity', 'Катакомбы'],
|
||||
5038 => ['abandonedplain', 'Гора Легиона'], //mooncity
|
||||
5039 => ['suncity', 'Грибница'],
|
||||
5040 => ['sandcity', 'Пещера Мглы'],
|
||||
];
|
||||
$dngcity = $dngcity[$itm['item_id']];
|
||||
$hgo1 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `time` > "' . (time() - 86400) . '" AND `vars` = "psh_qt_' . $dngcity[0] . '" LIMIT 1', 1);
|
||||
if (!isset($hgo1['id'])) {
|
||||
$u->error = 'Нет задержки для подземелья ' . $dngcity[1] . '.';
|
||||
} else {
|
||||
$u->addAction(time(), 'podvig', '');
|
||||
$u->error = 'Успешно использован свиток Право на Подвиг (' . $dngcity[1] . ')';
|
||||
mysql_query('UPDATE `actions` SET `time` = "' . (time() - 86401) . '" WHERE `id` = "' . ($hgo1['id']) . '" LIMIT 1');
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = "' . $itm['id'] . '" LIMIT 1');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$u->error = 'Хаосники не могут пользоваться этим свитком!';
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,35 +1,38 @@
|
||||
<?php
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
if( $itm['magic_inci'] == 'propuskpsh' ) {
|
||||
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars` = "propuskpsh" AND `time` > "'.(time()-300).'" LIMIT 1'));
|
||||
if( $u->info['align'] != 2 ) {
|
||||
if( isset($test['id']) ) {
|
||||
$u->error = 'Задержка не прошла, еще '.$u->timeOut($test['time']-time()+300);
|
||||
}else{
|
||||
$u->addAction(time(),'propuskpsh','');
|
||||
$u->error = 'Все прошло успешно, задержки в пещеры снята 6 часов.';
|
||||
if ($itm['magic_inci'] == 'propuskpsh') {
|
||||
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "propuskpsh" AND `time` > "' . (time() - 300) . '" LIMIT 1'));
|
||||
if ($u->info['align'] != 2) {
|
||||
if (isset($test['id'])) {
|
||||
$u->error = 'Задержка не прошла, еще ' . Conversion::secondsToTimeout($test['time'] - time() + 300);
|
||||
} else {
|
||||
$u->addAction(time(), 'propuskpsh', '');
|
||||
$u->error = 'Все прошло успешно, задержки в пещеры снята 6 часов.';
|
||||
|
||||
mysql_query('UPDATE `actions` SET `time` = `time` - 21600 WHERE `uid` = '.$u->info['id'].' AND `time` > "'.(time()-43200).'" AND `vars` LIKE "psh%" AND `vars` != "psh102" AND `vars` NOT LIKE "psh\_%"');
|
||||
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
|
||||
|
||||
if(isset($eff['id']))
|
||||
{
|
||||
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 21600 WHERE `id` = '.$eff['id'].' ');
|
||||
}
|
||||
|
||||
mysql_query(
|
||||
'UPDATE `actions` SET `time` = `time` - 21600 WHERE `uid` = ' . $u->info['id'] . ' AND `time` > "' . (time(
|
||||
) - 43200) . '" AND `vars` LIKE "psh%" AND `vars` != "psh102" AND `vars` NOT LIKE "psh\_%"'
|
||||
);
|
||||
|
||||
// Действует только на:
|
||||
// 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная).
|
||||
// 2) не сработает на Пещеру Драконов.
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
}
|
||||
}else{
|
||||
$u->error = 'Хаосники не могут пользоваться пропуском!';
|
||||
}
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "' . $u->info['id'] . '" LIMIT 1'));
|
||||
|
||||
if (isset($eff['id'])) {
|
||||
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 21600 WHERE `id` = ' . $eff['id'] . ' ');
|
||||
}
|
||||
|
||||
|
||||
// Действует только на:
|
||||
// 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная).
|
||||
// 2) не сработает на Пещеру Драконов.
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
|
||||
}
|
||||
} else {
|
||||
$u->error = 'Хаосники не могут пользоваться пропуском!';
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,37 +1,38 @@
|
||||
<?php
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
if( $itm['magic_inci'] == 'propuskpsh2' ) {
|
||||
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars` = "propuskpsh" AND `time` > "'.(time()-300).'" LIMIT 1'));
|
||||
if( $u->info['align'] != 2 ) {
|
||||
if( isset($test['id']) ) {
|
||||
$u->error = 'Задержка не прошла, еще '.$u->timeOut($test['time']-time()+300);
|
||||
}else{
|
||||
$u->addAction(time(),'propuskpsh2','');
|
||||
$u->error = 'Все прошло успешно, задержки в пещеры снята 24 часа.';
|
||||
if ($itm['magic_inci'] == 'propuskpsh2') {
|
||||
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "propuskpsh" AND `time` > "' . (time() - 300) . '" LIMIT 1'));
|
||||
if ($u->info['align'] != 2) {
|
||||
if (isset($test['id'])) {
|
||||
$u->error = 'Задержка не прошла, еще ' . Conversion::secondsToTimeout($test['time'] - time() + 300);
|
||||
} else {
|
||||
$u->addAction(time(), 'propuskpsh2', '');
|
||||
$u->error = 'Все прошло успешно, задержки в пещеры снята 24 часа.';
|
||||
|
||||
mysql_query('UPDATE `actions` SET `time` = `time` - 86400 WHERE `uid` = '.$u->info['id'].' AND `time` > "'.(time()-86400).'" AND `vars` LIKE "psh%" AND `vars` != "psh102" AND `vars` NOT LIKE "psh\_%"');
|
||||
|
||||
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
|
||||
|
||||
if(isset($eff['id']))
|
||||
{
|
||||
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 86400 WHERE `id` = '.$eff['id'].' ');
|
||||
}
|
||||
|
||||
|
||||
mysql_query(
|
||||
'UPDATE `actions` SET `time` = `time` - 86400 WHERE `uid` = ' . $u->info['id'] . ' AND `time` > "' . (time(
|
||||
) - 86400) . '" AND `vars` LIKE "psh%" AND `vars` != "psh102" AND `vars` NOT LIKE "psh\_%"'
|
||||
);
|
||||
|
||||
// Действует только на:
|
||||
// 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная).
|
||||
// 2) не сработает на Пещеру Драконов.
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
}
|
||||
}else{
|
||||
$u->error = 'Хаосники не могут пользоваться пропуском!';
|
||||
}
|
||||
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "' . $u->info['id'] . '" LIMIT 1'));
|
||||
|
||||
if (isset($eff['id'])) {
|
||||
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 86400 WHERE `id` = ' . $eff['id'] . ' ');
|
||||
}
|
||||
|
||||
// Действует только на:
|
||||
// 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная).
|
||||
// 2) не сработает на Пещеру Драконов.
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
|
||||
}
|
||||
} else {
|
||||
$u->error = 'Хаосники не могут пользоваться пропуском!';
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,106 +1,108 @@
|
||||
<?php
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
}
|
||||
$tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y"));
|
||||
|
||||
if( $tomorrow = 0 ){
|
||||
echo 'Вы еще не справились с текущим заданием.';
|
||||
} elseif( !isset( $tomorrow['id'] ) && $tomorrow == 0 ) {
|
||||
?>
|
||||
<br />
|
||||
<input type='button' value='Крутить' />
|
||||
<?php
|
||||
} else {
|
||||
echo 'Покрутить еще раз вы сможете <b>'.$tomorrow.'</b> <font color="">( Через '.$u->timeOut($tomorrow['time']+60*60*24-time()).' )</font>';
|
||||
}
|
||||
if($itm['magic_inci']=='ruletka') {
|
||||
$idv=array(
|
||||
0 => '4349',
|
||||
1 => '4306',
|
||||
2 => '4327',
|
||||
3 => '4342',
|
||||
4 => '4297',
|
||||
5 => '4316',
|
||||
6 => '4361',
|
||||
7 => '4359',
|
||||
8 => '4340',
|
||||
9 => '4324',
|
||||
10 => '4314',
|
||||
11 => '4351',
|
||||
12 => '4303',
|
||||
13 => '4294',
|
||||
14 => '4353',
|
||||
15 => '4335',
|
||||
16 => '4364',
|
||||
17 => '4319',
|
||||
18 => '4330',
|
||||
19 => '4289',
|
||||
20 => '4309',
|
||||
21 => '4355',
|
||||
22 => '4333',
|
||||
23 => '4317',
|
||||
24 => '4362',
|
||||
25 => '4328',
|
||||
26 => '4287',
|
||||
27 => '4307',
|
||||
28 => '4334',
|
||||
29 => '4288',
|
||||
30 => '4363',
|
||||
31 => '4354',
|
||||
32 => '4329',
|
||||
33 => '4318',
|
||||
34 => '4308',
|
||||
35 => '4366',
|
||||
36 => '4352',
|
||||
37 => '4336',
|
||||
38 => '4331',
|
||||
39 => '4320',
|
||||
40 => '4290',
|
||||
41 => '4310',
|
||||
42 => '4350',
|
||||
43 => '4305',
|
||||
44 => '4360',
|
||||
45 => '4341',
|
||||
46 => '4326',
|
||||
47 => '4296',
|
||||
48 => '4315',
|
||||
49 => '4356',
|
||||
50 => '4337',
|
||||
51 => '4351',
|
||||
52 => '4311',
|
||||
53 => '4299',
|
||||
54 => '4291',
|
||||
55 => '4292',
|
||||
56 => '4300',
|
||||
57 => '4312',
|
||||
58 => '4322',
|
||||
59 => '4338',
|
||||
60 => '4357',
|
||||
61 => '4293',
|
||||
62 => '4302',
|
||||
63 => '4313',
|
||||
64 => '4323',
|
||||
65 => '4339',
|
||||
66 => '4358',
|
||||
67 => '865',
|
||||
68 => '4781',
|
||||
69 => '2545',
|
||||
70 => '4684',
|
||||
71 => '1035',
|
||||
72 => '6168',
|
||||
73 => '4920',
|
||||
74 => '10015',
|
||||
75 => '10016',
|
||||
76 => '10017',
|
||||
77 => '10018',
|
||||
78 => '10035'
|
||||
);
|
||||
$idve=$idv[rand(0,count($idv)-1)];
|
||||
\User\ItemsModel::addItem($idve,$u->info['id'],'|frompisher=1|sudba='.$u->info['login']);
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$idve.'" LIMIT 1'));
|
||||
$u->error = 'Вы получили:'.$inf['name'].'';
|
||||
|
||||
use Helper\Conversion;
|
||||
use User\ItemsModel;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
$tomorrow = mktime(0, 0, 0, idate("m"), idate("d") + 1, idate("Y"));
|
||||
|
||||
if ($tomorrow = 0) {
|
||||
echo 'Вы еще не справились с текущим заданием.';
|
||||
} elseif (!isset($tomorrow['id'])) {
|
||||
?>
|
||||
<br/>
|
||||
<input type='button' value='Крутить'/>
|
||||
<?php
|
||||
} else {
|
||||
echo 'Покрутить еще раз вы сможете <b>' . $tomorrow . '</b> ( Через ' . Conversion::secondsToTimeout($tomorrow['time'] + 60 * 60 * 24 - time()) . ' )';
|
||||
}
|
||||
if ($itm['magic_inci'] == 'ruletka') {
|
||||
$idv = [
|
||||
0 => '4349',
|
||||
1 => '4306',
|
||||
2 => '4327',
|
||||
3 => '4342',
|
||||
4 => '4297',
|
||||
5 => '4316',
|
||||
6 => '4361',
|
||||
7 => '4359',
|
||||
8 => '4340',
|
||||
9 => '4324',
|
||||
10 => '4314',
|
||||
11 => '4351',
|
||||
12 => '4303',
|
||||
13 => '4294',
|
||||
14 => '4353',
|
||||
15 => '4335',
|
||||
16 => '4364',
|
||||
17 => '4319',
|
||||
18 => '4330',
|
||||
19 => '4289',
|
||||
20 => '4309',
|
||||
21 => '4355',
|
||||
22 => '4333',
|
||||
23 => '4317',
|
||||
24 => '4362',
|
||||
25 => '4328',
|
||||
26 => '4287',
|
||||
27 => '4307',
|
||||
28 => '4334',
|
||||
29 => '4288',
|
||||
30 => '4363',
|
||||
31 => '4354',
|
||||
32 => '4329',
|
||||
33 => '4318',
|
||||
34 => '4308',
|
||||
35 => '4366',
|
||||
36 => '4352',
|
||||
37 => '4336',
|
||||
38 => '4331',
|
||||
39 => '4320',
|
||||
40 => '4290',
|
||||
41 => '4310',
|
||||
42 => '4350',
|
||||
43 => '4305',
|
||||
44 => '4360',
|
||||
45 => '4341',
|
||||
46 => '4326',
|
||||
47 => '4296',
|
||||
48 => '4315',
|
||||
49 => '4356',
|
||||
50 => '4337',
|
||||
51 => '4351',
|
||||
52 => '4311',
|
||||
53 => '4299',
|
||||
54 => '4291',
|
||||
55 => '4292',
|
||||
56 => '4300',
|
||||
57 => '4312',
|
||||
58 => '4322',
|
||||
59 => '4338',
|
||||
60 => '4357',
|
||||
61 => '4293',
|
||||
62 => '4302',
|
||||
63 => '4313',
|
||||
64 => '4323',
|
||||
65 => '4339',
|
||||
66 => '4358',
|
||||
67 => '865',
|
||||
68 => '4781',
|
||||
69 => '2545',
|
||||
70 => '4684',
|
||||
71 => '1035',
|
||||
72 => '6168',
|
||||
73 => '4920',
|
||||
74 => '10015',
|
||||
75 => '10016',
|
||||
76 => '10017',
|
||||
77 => '10018',
|
||||
78 => '10035',
|
||||
];
|
||||
$idve = $idv[rand(0, count($idv) - 1)];
|
||||
ItemsModel::addItem($idve, $u->info['id'], '|frompisher=1|sudba=' . $u->info['login']);
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "' . $idve . '" LIMIT 1'));
|
||||
$u->error = 'Вы получили:' . $inf['name'];
|
||||
|
||||
}
|
||||
?>
|
@ -1,74 +1,52 @@
|
||||
<?php
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
if(isset($po['finish_file']) && $po['finish_file']=='tznanie')
|
||||
{
|
||||
//Добавляем слот
|
||||
mysql_query('UPDATE `actions` SET `val` = "cast" WHERE (`vals` = "1044" OR `vals` = "1045" OR `vals` = "1046" OR `vals` = "1047") AND `val` != "cast" AND `vars` = "read" AND `uid` = "'.$u->info['id'].'" LIMIT 1');
|
||||
}else{
|
||||
$st['timeRead'] = 0;
|
||||
//$tst = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time` > '.time().' AND `vars` = "read" LIMIT 1',1);
|
||||
if(isset($tst['id']))
|
||||
{
|
||||
//Уже что-то изучаем
|
||||
$u->error = 'Так не пойдет, вы уже что-то изучаете';
|
||||
}else{
|
||||
$tst = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "read" AND `vals` = "'.$itm['item_id'].'" LIMIT 1',1);
|
||||
if(isset($tst['id']))
|
||||
{
|
||||
$u->error = 'Вы уже изучили данное знание';
|
||||
}else{
|
||||
$fn = ''; $tom_iz = 0;
|
||||
if(($itm['item_id']>=1045 && $itm['item_id']<=1047) || ($itm['item_id']>=4812 && $itm['item_id']<=4813))
|
||||
{
|
||||
$tst2 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "read" AND `vals` = "'.($itm['item_id']-1).'" LIMIT 1',1);
|
||||
if(!isset($tst2['id']))
|
||||
{
|
||||
$tom_iz = 1;
|
||||
}
|
||||
unset($tst2);
|
||||
}
|
||||
/*
|
||||
if( $itm['item_id'] == 4811 ) {
|
||||
//5 том знаний, нужен 1047
|
||||
$tst2 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "read" AND `vals` = "1047" LIMIT 1',1);
|
||||
if(!isset($tst2['id']))
|
||||
{
|
||||
$tom_iz = 1;
|
||||
}
|
||||
unset($tst2);
|
||||
}
|
||||
*/
|
||||
if($tom_iz==0)
|
||||
{
|
||||
if(($itm['item_id']>=1044 && $itm['item_id']<=1047) || $itm['item_id']==4813 || $itm['item_id']==4812)
|
||||
{
|
||||
mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 1 WHERE `id` = "'.$itm['uid'].'" LIMIT 1');
|
||||
$fn .= 'finish_file=tznanie';
|
||||
}
|
||||
if($itm['item_id']==4811)
|
||||
{
|
||||
mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 2 WHERE `id` = "'.$itm['uid'].'" LIMIT 1');
|
||||
$fn .= 'finish_file=tznanie';
|
||||
}
|
||||
//$ins = mysql_query('INSERT INTO `eff_users` (`overType`,`id_eff`,`uid`,`name`,`timeUse`,`data`,`img2`,`no_Ace`) VALUES ("8","2","'.$u->info['id'].'","Изучение: '.$itm['name'].'","'.(time()+$st['timeRead']).'","'.$fn.'","'.$itm['img'].'","1")');
|
||||
//if($ins)
|
||||
//{
|
||||
//$u->error = 'Вы начали изучать "'.$itm['name'].'". Время изучения составит '.$u->timeOut($st['timeRead']).'';
|
||||
$u->error = 'Вы изучили "'.$itm['name'].'".';
|
||||
$u->addAction(time()+$st['timeRead'],'read',$itm['item_id']);
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
//}else{
|
||||
// $u->error = 'Что-то здесь не так';
|
||||
//}
|
||||
}else{
|
||||
$u->error = 'Требует изучения предыдущего тома';
|
||||
}
|
||||
unset($tom_iz);
|
||||
}
|
||||
}
|
||||
if (isset($po['finish_file']) && $po['finish_file'] == 'tznanie') {
|
||||
//Добавляем слот
|
||||
mysql_query(
|
||||
'UPDATE `actions` SET `val` = "cast" WHERE (`vals` = "1044" OR `vals` = "1045" OR `vals` = "1046" OR `vals` = "1047") AND `val` != "cast" AND `vars` = "read" AND `uid` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
} else {
|
||||
$st['timeRead'] = 0;
|
||||
|
||||
if (isset($tst['id'])) {
|
||||
//Уже что-то изучаем
|
||||
$u->error = 'Так не пойдет, вы уже что-то изучаете';
|
||||
} else {
|
||||
$tst = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "read" AND `vals` = "' . $itm['item_id'] . '" LIMIT 1', 1);
|
||||
if (isset($tst['id'])) {
|
||||
$u->error = 'Вы уже изучили данное знание';
|
||||
} else {
|
||||
$fn = '';
|
||||
$tom_iz = 0;
|
||||
if (($itm['item_id'] >= 1045 && $itm['item_id'] <= 1047) || ($itm['item_id'] >= 4812 && $itm['item_id'] <= 4813)) {
|
||||
$tst2 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "read" AND `vals` = "' . ($itm['item_id'] - 1) . '" LIMIT 1', 1);
|
||||
if (!isset($tst2['id'])) {
|
||||
$tom_iz = 1;
|
||||
}
|
||||
unset($tst2);
|
||||
}
|
||||
|
||||
if ($tom_iz == 0) {
|
||||
if (($itm['item_id'] >= 1044 && $itm['item_id'] <= 1047) || $itm['item_id'] == 4813 || $itm['item_id'] == 4812) {
|
||||
mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 1 WHERE `id` = "' . $itm['uid'] . '" LIMIT 1');
|
||||
$fn .= 'finish_file=tznanie';
|
||||
}
|
||||
if ($itm['item_id'] == 4811) {
|
||||
mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 2 WHERE `id` = "' . $itm['uid'] . '" LIMIT 1');
|
||||
$fn .= 'finish_file=tznanie';
|
||||
}
|
||||
|
||||
$u->error = 'Вы изучили "' . $itm['name'] . '".';
|
||||
$u->addAction(time() + $st['timeRead'], 'read', $itm['item_id']);
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
|
||||
|
||||
} else {
|
||||
$u->error = 'Требует изучения предыдущего тома';
|
||||
}
|
||||
unset($tom_iz);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Core\Db;
|
||||
use Helper\Conversion;
|
||||
use User\ItemsModel;
|
||||
|
||||
class Quests
|
||||
@ -368,9 +369,9 @@ class Quests
|
||||
//Задержка между выполнением квеста
|
||||
if (isset($d['tr_zdr'])) {
|
||||
$qlst = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` != "go" LIMIT 1'));
|
||||
$t .= 'Задержка между выполнением задания: ' . $u->timeOut($d['tr_zdr'] * 60 * 60);
|
||||
$t .= 'Задержка между выполнением задания: ' . Conversion::secondsToTimeout($d['tr_zdr'] * 60 * 60);
|
||||
if ($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time() > 0) {
|
||||
$t .= '<small>(Осталось: ' . $u->timeOut($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time()) . ' ч.)</small>';
|
||||
$t .= '<small>(Осталось: ' . Conversion::secondsToTimeout($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time()) . ' ч.)</small>';
|
||||
}
|
||||
$t .= '<br>';
|
||||
unset($qlst);
|
||||
@ -421,7 +422,7 @@ class Quests
|
||||
$x6 = mysql_fetch_array(mysql_query('SELECT `id2`,`mname`,`img` FROM `eff_main` WHERE `id2` = "' . $x7[0] . '" LIMIT 1'));
|
||||
if (isset($x6['id2'])) {
|
||||
$x5 .= '<img width="40" height="25" src="//img.new-combats.tech/i/eff/' . $x6['img'] . '" title="' . $x6['mname'] . '
|
||||
Время действия: ' . $u->timeOut($x7[1]) . '"> ';
|
||||
Время действия: ' . Conversion::secondsToTimeout($x7[1]) . '"> ';
|
||||
}
|
||||
$x4++;
|
||||
}
|
||||
|
@ -1473,7 +1473,7 @@ class User
|
||||
)
|
||||
);
|
||||
if (isset($v['id']) && $v['time'] + 60 * 60 > time()) {
|
||||
$r .= '<img style="cursor:pointer;filter:alpha(opacity=47);opacity:0.47;-moz-opacity:0.47;-khtml-opacity:0.47;" onClick="alert(\'Возможно воспользоваться через ' . $this->timeOut(
|
||||
$r .= '<img style="cursor:pointer;filter:alpha(opacity=47);opacity:0.47;-moz-opacity:0.47;-khtml-opacity:0.47;" onClick="alert(\'Возможно воспользоваться через ' . Conversion::secondsToTimeout(
|
||||
$v['time'] + 60 * 60 - time()
|
||||
) . '\');" src="' . Config::img() . '/i/items/healvortex_' . $vid . '.png" width="40" height="25" title="Клодец HP (Задержка)"> ';
|
||||
} else {
|
||||
@ -1485,7 +1485,7 @@ class User
|
||||
)
|
||||
);
|
||||
if (isset($v['id']) && $v['time'] + 60 * 60 > time()) {
|
||||
$r .= '<img style="cursor:pointer;filter:alpha(opacity=47);opacity:0.47;-moz-opacity:0.47;-khtml-opacity:0.47;" onClick="alert(\'Возможно воспользоваться через ' . $this->timeOut(
|
||||
$r .= '<img style="cursor:pointer;filter:alpha(opacity=47);opacity:0.47;-moz-opacity:0.47;-khtml-opacity:0.47;" onClick="alert(\'Возможно воспользоваться через ' . Conversion::secondsToTimeout(
|
||||
$v['time'] + 60 * 60 - time()
|
||||
) . '\');" src="' . Config::img() . '/i/items/manavortex_' . $vid . '.png" width="40" height="25" title="Клодец MP (Задержка)"> ';
|
||||
} else {
|
||||
@ -1495,16 +1495,6 @@ class User
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $ttm
|
||||
* @return string
|
||||
* @deprecated использовать ConversionHelper::secondsToTimeout()
|
||||
*/
|
||||
public function timeOut($ttm): string
|
||||
{
|
||||
return Conversion::secondsToTimeout($ttm);
|
||||
}
|
||||
|
||||
public function insertAlign($an, $uid): void
|
||||
{
|
||||
if ($an <= 0) {
|
||||
@ -3036,7 +3026,7 @@ class User
|
||||
if ($data['srok'] + $id['time_create'] - time() > 86400 + 30) {
|
||||
$this->error = 'Нельзя использовать на предметы с сроком годности 30 и более дней.';
|
||||
} elseif ($id['inslot'] > 0 && $id['inslot'] < 20) {
|
||||
$this->error = 'Срок годности предмета "' . $id['name'] . '" продлен на ' . $this->timeOut(
|
||||
$this->error = 'Срок годности предмета "' . $id['name'] . '" продлен на ' . Conversion::secondsToTimeout(
|
||||
$add['uptimeitem']
|
||||
) . '.';
|
||||
|
||||
@ -3647,13 +3637,13 @@ class User
|
||||
}
|
||||
}
|
||||
if ($po['battleUseZd'] > 0) {
|
||||
$is2 .= '<br>Задержка использования: ' . $this->timeOut($po['battleUseZd']) . '';
|
||||
$is2 .= '<br>Задержка использования: ' . Conversion::secondsToTimeout($po['battleUseZd']) . '';
|
||||
}
|
||||
if (isset($po['srok']) && $po['srok'] > 0) {
|
||||
$pl['srok'] = $po['srok'];
|
||||
}
|
||||
if ($pl['srok'] > 0) { //Срок годности предмета
|
||||
$is2 .= '<br>Срок годности: ' . $this->timeOut($pl['srok']) . ' (до ' . date(
|
||||
$is2 .= '<br>Срок годности: ' . Conversion::secondsToTimeout($pl['srok']) . ' (до ' . date(
|
||||
'd.m.Y H:i', $pl['time_create'] + $pl['srok']
|
||||
) . ')';
|
||||
}
|
||||
@ -3667,7 +3657,7 @@ class User
|
||||
)
|
||||
);
|
||||
if (isset($efi['id2']) && $efi['actionTime'] > 0) {
|
||||
$is2 .= '<br>Продолжительность действия: ' . $this->timeOut($efi['actionTime']);
|
||||
$is2 .= '<br>Продолжительность действия: ' . Conversion::secondsToTimeout($efi['actionTime']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4210,7 +4200,7 @@ class User
|
||||
'UPDATE `items_users` SET `time_create` = "' . $pl['time_create'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
$is2 .= '<div style="color:brown;">Предмет будет недоступен через ' . $this->timeOut(
|
||||
$is2 .= '<div style="color:brown;">Предмет будет недоступен через ' . Conversion::secondsToTimeout(
|
||||
$pl['time_create'] - time()
|
||||
) . '</div>';
|
||||
} else {
|
||||
@ -4218,7 +4208,7 @@ class User
|
||||
if (($pl['time_create'] - time() + 86400 * 30) < 1) {
|
||||
$is2 .= '<div style="color:brown;">Предмет рассыпался у Вас на глазах...</div>';
|
||||
} else {
|
||||
$is2 .= '<div style="color:brown;">Предмет исчезнет через ' . $this->timeOut(
|
||||
$is2 .= '<div style="color:brown;">Предмет исчезнет через ' . Conversion::secondsToTimeout(
|
||||
$pl['time_create'] - time() + 86400 * 30
|
||||
) . '</div>';
|
||||
}
|
||||
@ -4286,7 +4276,7 @@ class User
|
||||
} elseif ($type == 68) {
|
||||
$is1 .= '<small style="font-size:11px;"><a href="?r=3&itm_take=' . $pl['id'] . '">Забрать</a><br><a href="?r=3&itm_cancel=' . $pl['id'] . '">Отказаться</a>';
|
||||
if ($pl['lastUPD'] > 0) {
|
||||
$is1 .= '<br><br>(' . $this->timeOut(($pl['lastUPD'] + 7 * 24 * 60 * 60) - time()) . ')';
|
||||
$is1 .= '<br><br>(' . Conversion::secondsToTimeout(($pl['lastUPD'] + 7 * 24 * 60 * 60) - time()) . ')';
|
||||
}
|
||||
$is1 .= '</small>';
|
||||
} elseif ($type == 67) {
|
||||
|
10
hmonitor.php
10
hmonitor.php
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
//const GAME = true;
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME_VERSION')) {
|
||||
require_once '_incl_data/autoload.php';
|
||||
}
|
||||
@ -62,9 +64,9 @@ while ($pl = mysql_fetch_array($sp)) {
|
||||
if ($pl['arand'] > 0) {
|
||||
$html .= '<img src="//img.new-combats.tech/arand.gif" title="Команды делятся на две равные команды (равные по количеству, но не по мощности)">';
|
||||
}
|
||||
$html .= '<font color="grey">Бой начнется через <b>' . $u->timeOut(
|
||||
$html .= '<font color="grey">Бой начнется через <b>' . Conversion::secondsToTimeout(
|
||||
$pl['time'] + $pl['time_start'] - time()
|
||||
) . '</b>, таймаут ' . $u->timeOut($pl['timeout']) . '</font>';
|
||||
) . '</b>, таймаут ' . Conversion::secondsToTimeout($pl['timeout']) . '</font>';
|
||||
if ($pl['priz'] > 0) {
|
||||
$html .= '<a href="/n/567/" target="_blank"><span style="color:#e65700;" title="Победители имеют 5% шанс на получение Жетона Успеха "><b>(Героическое Сражение)</b></span></a></font></i>';
|
||||
}
|
||||
@ -122,7 +124,7 @@ while ($pl = mysql_fetch_array($sp)) {
|
||||
if ($pl['arand'] > 0) {
|
||||
$html .= '<img src="//img.new-combats.tech/arand.gif" title="Команды делятся на две равные команды (равные по количеству, но не по мощности)">';
|
||||
}
|
||||
$html .= '<font color="grey">, таймаут ' . $u->timeOut($pl['timeout']) . '</font>';
|
||||
$html .= '<font color="grey">, таймаут ' . Conversion::secondsToTimeout($pl['timeout']) . '</font>';
|
||||
if ($pl['priz'] > 0) {
|
||||
$html .= '<a href="/n/567/" target="_blank"><span style="color:#e65700;" title="Та сторона которая победила получит 5% шанс на получение дополнительно Жетона Успеха "><b>(Героическое Сражение)</b></span></a></font></i>';
|
||||
}
|
||||
@ -151,7 +153,7 @@ while ($pl = mysql_fetch_array($sp)) {
|
||||
//Ожидаем начала нового турнира
|
||||
$html .= ' Начало турнира в "Башне Смерти" : <span class="date">' . date(
|
||||
'd.m.Y H:i', $pl['time_start']
|
||||
) . '</span> (<small> <font color=grey>Начнется через <b>' . $u->timeOut(
|
||||
) . '</span> (<small> <font color=grey>Начнется через <b>' . Conversion::secondsToTimeout(
|
||||
$pl['time_start'] - time()
|
||||
) . '</b></font></small>) Призовой фонд на текущий момент: <b>' . round(
|
||||
($pl['money'] / 100 * 85), 2
|
||||
|
@ -1493,7 +1493,7 @@ $tma = '';
|
||||
echo '<div style="color: red; font-weight: bold;">Эффект "' . $u->stats['effects'][$i]['name'] . '" был принудительно завершен.</div>';
|
||||
$clr = $clr == 'C7' ? 'D5' : 'C7';
|
||||
} else {
|
||||
$ae .= '<TR bgcolor=#' . $clr . $clr . $clr . '><TD>' . $v1 . '</TD><TD align=right>' . $v2 . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right;\'>' . $u->timeOut($u->stats['effects'][$i]['timeUse'] + $u->stats['effects'][$i]['actionTime'] - time()) . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right; font-size: small;\'>"' . $u->stats['effects'][$i]['name'] . '"</TD><TD><center>' . $btnse . '</center></TD></TR>';
|
||||
$ae .= '<TR bgcolor=#' . $clr . $clr . $clr . '><TD>' . $v1 . '</TD><TD align=right>' . $v2 . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right;\'>' . Conversion::secondsToTimeout($u->stats['effects'][$i]['timeUse'] + $u->stats['effects'][$i]['actionTime'] - time()) . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right; font-size: small;\'>"' . $u->stats['effects'][$i]['name'] . '"</TD><TD><center>' . $btnse . '</center></TD></TR>';
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
@ -1540,7 +1540,7 @@ $tma = '';
|
||||
$e['see'] = 1;
|
||||
}
|
||||
|
||||
$ae .= '<TR bgcolor=#' . $clr . $clr . $clr . '><TD>' . $v1 . '</TD><TD align=right>' . $v2 . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right;\'>' . $u->timeOut($e['endTime'] - time()) . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right; font-size: small;\'><img ';
|
||||
$ae .= '<TR bgcolor=#' . $clr . $clr . $clr . '><TD>' . $v1 . '</TD><TD align=right>' . $v2 . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right;\'>' . Conversion::secondsToTimeout($e['endTime'] - time()) . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right; font-size: small;\'><img ';
|
||||
if ($e['type'] == 2) {
|
||||
$ae .= 'width="30" style="float:left"';
|
||||
}
|
||||
@ -1574,7 +1574,7 @@ $tma = '';
|
||||
$lvlp = explode(']', $lvlp[1]);
|
||||
$lvlp = $lvlp[0];
|
||||
$v = $magic->pgpar[$tp];
|
||||
$ae .= '• ' . $v[0] . ' [' . $lvlp . '], еще ' . $u->timeOut($pl['timeUse'] - time()) . ', начнет действовать через ' . $u->timeOut($pl['deactiveTime'] - time()) . '<br>';
|
||||
$ae .= '• ' . $v[0] . ' [' . $lvlp . '], еще ' . Conversion::secondsToTimeout($pl['timeUse'] - time()) . ', начнет действовать через ' . Conversion::secondsToTimeout($pl['deactiveTime'] - time()) . '<br>';
|
||||
}
|
||||
|
||||
if ($ae) {
|
||||
@ -1587,7 +1587,7 @@ $tma = '';
|
||||
);
|
||||
if (isset($psh['id'])) {
|
||||
$clr = $clr == 'C7' ? 'D5' : 'C7';
|
||||
echo '<br> <b>Время до подземелья:</b> ' . $u->timeOut(($psh['time'] + 60 * 60 * 3) - time()) . '<br><br>';
|
||||
echo '<br> <b>Время до подземелья:</b> ' . Conversion::secondsToTimeout(($psh['time'] + 60 * 60 * 3) - time()) . '<br><br>';
|
||||
}
|
||||
?>
|
||||
<b>Эффекты:</b><br>
|
||||
@ -2278,7 +2278,7 @@ $tma = '';
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$ic1 = str_replace('psh_qt_', '', $pl['vars']);
|
||||
echo '<fieldset> <img height="19" width="34" src="' . Config::img() . '/i/city_ico2/' . $ic1 . '.gif" alt=""> <b>Задержка на получение задания в ' . $u->city_name[$ic1] . '</b> ' . $u->timeOut((86400 + $pl['time']) - time()) . '</fieldset><br>';
|
||||
echo '<fieldset> <img height="19" width="34" src="' . Config::img() . '/i/city_ico2/' . $ic1 . '.gif" alt=""> <b>Задержка на получение задания в ' . $u->city_name[$ic1] . '</b> ' . Conversion::secondsToTimeout((86400 + $pl['time']) - time()) . '</fieldset><br>';
|
||||
}
|
||||
//Пещеры
|
||||
$dungeon_timeout = $u->testAction(
|
||||
@ -2286,7 +2286,7 @@ $tma = '';
|
||||
1
|
||||
);
|
||||
if ($dungeon_timeout['vars'] == "psh0") {
|
||||
echo '<center><b>Задержка на посещение подземелья: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']) . '</center></b><br>';
|
||||
echo '<center><b>Задержка на посещение подземелья: ' . Conversion::secondsToTimeout(60 * 60 * 2 - time() + $dungeon_timeout['time']) . '</center></b><br>';
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
|
@ -1,273 +1,340 @@
|
||||
<?php
|
||||
if(!defined('GAME')) { die(); }
|
||||
|
||||
if($u->room['file'] == 'bsenter') {
|
||||
$r = 2;
|
||||
if(isset($_GET['r'])) {
|
||||
$_GET['r'] = (int)$_GET['r'];
|
||||
if($_GET['r'] == 7 || $_GET['r'] == 8 || $_GET['r'] == 9 || $_GET['r'] == 10 || $_GET['r'] == 11) { $r = round($_GET['r']-6); }
|
||||
if($u->info['level'] < $r+6) { $r = 1; }
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
function changeSleep($uid,$sleep_action){
|
||||
global $u;
|
||||
if( $sleep_action == 1 ){
|
||||
//
|
||||
mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("'.$uid.'","'.time().'","1")');
|
||||
//
|
||||
mysql_query("UPDATE `eff_users` SET `sleeptime`=".time().",`deactiveLast` = ( `deactiveTime` - ".time()." ) WHERE `uid`='".mysql_real_escape_string($uid)."' AND `no_Ace` = 0 AND `delete` = 0");
|
||||
mysql_query('UPDATE `items_users` SET `time_sleep` = "'.time().'" WHERE `uid` = "'.$uid.'" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"');
|
||||
$u->addAction(time(),'sleep',$u->info['city']);
|
||||
//
|
||||
} elseif( $sleep_action == 2 ){
|
||||
//
|
||||
mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("'.$uid.'","'.time().'","2")');
|
||||
//
|
||||
$sp = mysql_query('SELECT * FROM `items_users` WHERE `time_sleep` > 0 AND `uid` = "'.$uid.'" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"');
|
||||
while( $pl = mysql_fetch_array($sp) ) {
|
||||
$tm_add = time() - $pl['time_sleep'];
|
||||
mysql_query('UPDATE `items_users` SET `time_sleep` = "0",`time_create` = "'.($pl['time_create'] + $tm_add).'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
||||
}
|
||||
$sp = mysql_query('SELECT `id`,`deactiveTime`,`deactiveLast` FROM `eff_users` WHERE `v1` LIKE "pgb%" AND `delete` = "0" AND `deactiveTime` > 0 AND `uid` = "'.$uid.'" ORDER BY `timeUse` DESC');
|
||||
while($pl = mysql_fetch_array($sp)) {
|
||||
mysql_query("UPDATE `eff_users` SET `deactiveTime` = ".(time()+$pl['deactiveLast'])." WHERE `id`='".$pl['id']."' ");
|
||||
}
|
||||
$sp = mysql_query('SELECT `id`,`sleeptime`,`timeUse` FROM `eff_users` WHERE `uid`="'.mysql_real_escape_string($uid).'" AND `no_Ace` = 0 AND `sleeptime` > 0 AND `delete` = 0');
|
||||
while($pl = mysql_fetch_array($sp)) {
|
||||
$timeUsen = time()-($pl['sleeptime']-$pl['timeUse']);
|
||||
mysql_query("UPDATE `eff_users` SET `timeUse`='".$timeUsen."',`sleeptime`='0' WHERE `id`='".$pl['id']."' ");
|
||||
}
|
||||
mysql_query('UPDATE `actions` SET `vars` = "unsleep",`val` = "'.time().'" WHERE `id` = "'.$sleep['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
if ($u->room['file'] == 'bsenter') {
|
||||
$r = 2;
|
||||
if (isset($_GET['r'])) {
|
||||
$_GET['r'] = (int)$_GET['r'];
|
||||
if ($_GET['r'] == 7 || $_GET['r'] == 8 || $_GET['r'] == 9 || $_GET['r'] == 10 || $_GET['r'] == 11) {
|
||||
$r = round($_GET['r'] - 6);
|
||||
}
|
||||
if ($u->info['level'] < $r + 6) {
|
||||
$r = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$t = mysql_fetch_array(mysql_query('SELECT * FROM `bs_turnirs` WHERE `city` = "'.$u->info['city'].'" AND `level` = "'.((int)($r+6)).'" LIMIT 1'));
|
||||
if(isset($t['id'])) {
|
||||
if($t['time_start'] > time()) {
|
||||
$tz = mysql_fetch_array(mysql_query('SELECT * FROM `bs_zv` WHERE `bsid` = "'.$t['id'].'" AND `time` = "'.$t['time_start'].'" AND `uid` = "'.$u->info['id'].'" AND `finish` = 0 LIMIT 1'));
|
||||
$tz_all = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "'.$t['id'].'" AND `time` = "'.$t['time_start'].'" AND `uid` = "'.$u->info['id'].'" AND `finish` <= "'.$t['time_start'].'" LIMIT 1'));
|
||||
}
|
||||
if(isset($_POST['coin']) && $t['time_start'] > time() ) {
|
||||
$_POST['coin'] = round((int)$_POST['coin'],2);
|
||||
if((round((int)$tz['money'], 2) + $_POST['coin']) > 3*$u->info['level'] || $tz_all[0] > 3*$u->info['level']) {
|
||||
$error = 'Вам нельзя делать ставку выше '.(3* $u->info['level']).' кр.';
|
||||
} elseif(($_POST['coin'] >= $t['min_money'] || (isset($tz['id']) && $_POST['coin'] >= 1)) && $u->info['money'] >= $_POST['coin']) {
|
||||
$t['money'] += $_POST['coin'];
|
||||
$u->info['money'] -= $_POST['coin'];
|
||||
if(isset($tz['id'])) {
|
||||
$tz['money'] += $_POST['coin'];
|
||||
mysql_query('UPDATE `bs_zv` SET `money` = "'.$tz['money'].'" WHERE `id` = "'.$tz['id'].'" LIMIT 1');
|
||||
} else {
|
||||
//создаем
|
||||
$tz_all = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "'.$t['id'].'" AND `time` = "'.$t['time_start'].'" AND `uid` = "'.$u->info['id'].'" AND `finish` = "0" LIMIT 1'));
|
||||
$ins = mysql_query('INSERT INTO `bs_zv` (`bsid`,`money`,`time`,`uid`) VALUES ("'.$t['id'].'","'.mysql_real_escape_string($_POST['coin']).'","'.$t['time_start'].'","'.$u->info['id'].'")');
|
||||
if($ins) {
|
||||
$tz_all = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "'.$t['id'].'" AND `time` = "'.$t['time_start'].'" AND `uid` = "'.$u->info['id'].'" AND `finish` = "0" LIMIT 1'));
|
||||
if( $tz_all[0] > 0 ) {
|
||||
$_POST['coin'] = $tz_all[0];
|
||||
$error = 'Ваша ставка была возвращена. ('.round($_POST['coin'],2).' кр.)';
|
||||
}
|
||||
$t['users']++;
|
||||
$tz = array('id'=>1, 'bsid'=>$t['id'], 'money'=>$_POST['coin'], 'time'=>$t['time_start'], 'finish'=>0);
|
||||
}
|
||||
}
|
||||
mysql_query('UPDATE `bs_turnirs` SET `money` = "'.$t['money'].'", `users` = "'.$t['users'].'" WHERE `id` = "'.$t['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
}
|
||||
function changeSleep($uid, $sleep_action)
|
||||
{
|
||||
global $u;
|
||||
if ($sleep_action == 1) {
|
||||
//
|
||||
mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("' . $uid . '","' . time() . '","1")');
|
||||
//
|
||||
mysql_query(
|
||||
"UPDATE `eff_users` SET `sleeptime`=" . time() . ",`deactiveLast` = ( `deactiveTime` - " . time() . " ) WHERE `uid`='" . mysql_real_escape_string(
|
||||
$uid
|
||||
) . "' AND `no_Ace` = 0 AND `delete` = 0"
|
||||
);
|
||||
mysql_query('UPDATE `items_users` SET `time_sleep` = "' . time() . '" WHERE `uid` = "' . $uid . '" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"');
|
||||
$u->addAction(time(), 'sleep', $u->info['city']);
|
||||
//
|
||||
} elseif ($sleep_action == 2) {
|
||||
//
|
||||
mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("' . $uid . '","' . time() . '","2")');
|
||||
//
|
||||
$sp = mysql_query('SELECT * FROM `items_users` WHERE `time_sleep` > 0 AND `uid` = "' . $uid . '" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$tm_add = time() - $pl['time_sleep'];
|
||||
mysql_query('UPDATE `items_users` SET `time_sleep` = "0",`time_create` = "' . ($pl['time_create'] + $tm_add) . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
|
||||
}
|
||||
$sp = mysql_query(
|
||||
'SELECT `id`,`deactiveTime`,`deactiveLast` FROM `eff_users` WHERE `v1` LIKE "pgb%" AND `delete` = "0" AND `deactiveTime` > 0 AND `uid` = "' . $uid . '" ORDER BY `timeUse` DESC'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
mysql_query("UPDATE `eff_users` SET `deactiveTime` = " . (time() + $pl['deactiveLast']) . " WHERE `id`='" . $pl['id'] . "' ");
|
||||
}
|
||||
$sp = mysql_query('SELECT `id`,`sleeptime`,`timeUse` FROM `eff_users` WHERE `uid`="' . mysql_real_escape_string($uid) . '" AND `no_Ace` = 0 AND `sleeptime` > 0 AND `delete` = 0');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$timeUsen = time() - ($pl['sleeptime'] - $pl['timeUse']);
|
||||
mysql_query("UPDATE `eff_users` SET `timeUse`='" . $timeUsen . "',`sleeptime`='0' WHERE `id`='" . $pl['id'] . "' ");
|
||||
}
|
||||
mysql_query('UPDATE `actions` SET `vars` = "unsleep",`val` = "' . time() . '" WHERE `id` = "' . $sleep['id'] . '" LIMIT 1');
|
||||
}
|
||||
}
|
||||
|
||||
if($u->info['id'] != 7) {
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background-color:#dfdfdf;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat:no-repeat;background-position:top right;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
if($re != '') {
|
||||
echo '<div style="float:right"><font color=red><b>'.$re.'</b></font></div>';
|
||||
}
|
||||
?>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div></td>
|
||||
<td width="200"><div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
<td><table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
$t = mysql_fetch_array(mysql_query('SELECT * FROM `bs_turnirs` WHERE `city` = "' . $u->info['city'] . '" AND `level` = "' . ((int)($r + 6)) . '" LIMIT 1'));
|
||||
if (isset($t['id'])) {
|
||||
if ($t['time_start'] > time()) {
|
||||
$tz = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `bs_zv` WHERE `bsid` = "' . $t['id'] . '" AND `time` = "' . $t['time_start'] . '" AND `uid` = "' . $u->info['id'] . '" AND `finish` = 0 LIMIT 1')
|
||||
);
|
||||
$tz_all = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "' . $t['id'] . '" AND `time` = "' . $t['time_start'] . '" AND `uid` = "' . $u->info['id'] . '" AND `finish` <= "' . $t['time_start'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
}
|
||||
if (isset($_POST['coin']) && $t['time_start'] > time()) {
|
||||
$_POST['coin'] = round((int)$_POST['coin'], 2);
|
||||
if ((round((int)$tz['money'], 2) + $_POST['coin']) > 3 * $u->info['level'] || $tz_all[0] > 3 * $u->info['level']) {
|
||||
$error = 'Вам нельзя делать ставку выше ' . (3 * $u->info['level']) . ' кр.';
|
||||
} elseif (($_POST['coin'] >= $t['min_money'] || (isset($tz['id']) && $_POST['coin'] >= 1)) && $u->info['money'] >= $_POST['coin']) {
|
||||
$t['money'] += $_POST['coin'];
|
||||
$u->info['money'] -= $_POST['coin'];
|
||||
if (isset($tz['id'])) {
|
||||
$tz['money'] += $_POST['coin'];
|
||||
mysql_query('UPDATE `bs_zv` SET `money` = "' . $tz['money'] . '" WHERE `id` = "' . $tz['id'] . '" LIMIT 1');
|
||||
} else {
|
||||
//создаем
|
||||
$tz_all = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "' . $t['id'] . '" AND `time` = "' . $t['time_start'] . '" AND `uid` = "' . $u->info['id'] . '" AND `finish` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `bs_zv` (`bsid`,`money`,`time`,`uid`) VALUES ("' . $t['id'] . '","' . mysql_real_escape_string(
|
||||
$_POST['coin']
|
||||
) . '","' . $t['time_start'] . '","' . $u->info['id'] . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$tz_all = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "' . $t['id'] . '" AND `time` = "' . $t['time_start'] . '" AND `uid` = "' . $u->info['id'] . '" AND `finish` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($tz_all[0] > 0) {
|
||||
$_POST['coin'] = $tz_all[0];
|
||||
$error = 'Ваша ставка была возвращена. (' . round($_POST['coin'], 2) . ' кр.)';
|
||||
}
|
||||
$t['users']++;
|
||||
$tz = ['id' => 1, 'bsid' => $t['id'], 'money' => $_POST['coin'], 'time' => $t['time_start'], 'finish' => 0];
|
||||
}
|
||||
}
|
||||
mysql_query('UPDATE `bs_turnirs` SET `money` = "' . $t['money'] . '", `users` = "' . $t['users'] . '" WHERE `id` = "' . $t['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($u->info['id'] != 7) {
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background-color: #dfdfdf;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top right;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
if ($re != '') {
|
||||
echo '<div style="float:right"><font color=red><b>' . $re . '</b></font></div>';
|
||||
}
|
||||
?>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div>
|
||||
</td>
|
||||
<td width="200">
|
||||
<div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" /></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onClick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.11',1); ?>">Страшилкина ул.</a></td>
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap">
|
||||
<a href="#" id="greyText" class="menutop" onClick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';" title="<?php thisInfRm(
|
||||
'1.180.0.11', 1
|
||||
); ?>">Страшилкина ул.</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><h4><font color=green>Поздравляем! Вы успешно допускаетесь к турниру!</font></h4></center><br>
|
||||
<P align=right><INPUT class="btn" onclick="window.open('/forum/', 'help', 'height=500,width=1024,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" value="Подсказка" style="color:red;" type="button"><INPUT TYPE="button" class="btn" onClick="location = 'main.php?rnd=<?=$code;?>';" value="Обновить"> </P>
|
||||
<form method="post" action="main.php?rnd=<?=$code;?>">
|
||||
<fieldset style="padding: 5px; border:1px solid #CCC;">
|
||||
<legend style='font-weight:bold; color:#8F0000;'><h4><?php if($t['status'] == 0) { ?>Прием заявок на следующий турнир <?php } else { ?>Текущий турнир<?php } ?></h4></legend>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><h4><font color=green>Поздравляем! Вы успешно допускаетесь к турниру!</font></h4></center><br>
|
||||
<P align=right>
|
||||
<INPUT class="btn" onclick="window.open('/forum/', 'help', 'height=500,width=1024,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" value="Подсказка" style="color:red;" type="button"><INPUT TYPE="button" class="btn" onClick="location = 'main.php?rnd=<?= $code; ?>';" value="Обновить">
|
||||
</P>
|
||||
<form method="post" action="main.php?rnd=<?= $code; ?>">
|
||||
<fieldset style="padding: 5px; border:1px solid #CCC;">
|
||||
<legend style='font-weight:bold; color:#8F0000;'><h4><?php if ($t['status'] == 0) { ?>Прием заявок на следующий турнир <?php } else { ?>Текущий турнир<?php } ?></h4></legend>
|
||||
|
||||
<?php if(!isset($t['id'])) { echo '<br><center>К сожалению турниры данного типа не проводятся в этом городе</center><br>'; } else {
|
||||
if($t['status'] == 0) {
|
||||
?>
|
||||
Начало турнира в Башне Смерти: <span class=date><?=date('d.m.Y H:i:',$t['time_start']);?>59</span><BR>
|
||||
Призовой фонд на текущий момент: <B><?=round(($t['money']-($t['money']/100*15)),2);?></B> кр. и <B>1</B> екр.<BR>
|
||||
Всего подано заявок: <B><?=$t['users'];?></B><BR>
|
||||
<?php
|
||||
if($error != '') {
|
||||
echo '<font color=red><b>'.$error.'</b></font><Br>';
|
||||
}
|
||||
?>
|
||||
<?php if(!isset($tz['id'])) { ?>
|
||||
<?php if($u->info['exp'] >= 250000) { ?>
|
||||
<?php if (!isset($t['id'])) {
|
||||
echo '<br><center>К сожалению турниры данного типа не проводятся в этом городе</center><br>';
|
||||
} else {
|
||||
if ($t['status'] == 0) {
|
||||
?>
|
||||
Начало турнира в Башне Смерти: <span class=date><?= date('d.m.Y H:i:', $t['time_start']); ?>59</span><BR>
|
||||
Призовой фонд на текущий момент: <B><?= round(($t['money'] - ($t['money'] / 100 * 15)), 2); ?></B> кр. и <B>1</B> екр.<BR>
|
||||
Всего подано заявок: <B><?= $t['users']; ?></B><BR>
|
||||
<?php
|
||||
if ($error != '') {
|
||||
echo '<font color=red><b>' . $error . '</b></font><Br>';
|
||||
}
|
||||
?>
|
||||
<?php if (!isset($tz['id'])) { ?>
|
||||
<?php if ($u->info['exp'] >= 250000) { ?>
|
||||
|
||||
Сколько ставите кредитов? (минимальная ставка <b><?=$t['min_money'];?>.00 кр.</B> у вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>)<BR><input type="text" name="coin" value="20.00" size="8">
|
||||
<input type="submit" value="Подать заявку" name="docoin"><BR>
|
||||
Чем выше ваша ставка, тем больше шансов принять участие в турнире.<BR>
|
||||
Сколько ставите кредитов? (минимальная ставка <b><?= $t['min_money']; ?>.00 кр.</B> у вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>)<BR>
|
||||
<input type="text" name="coin" value="20.00" size="8">
|
||||
<input type="submit" value="Подать заявку" name="docoin"><BR>
|
||||
Чем выше ваша ставка, тем больше шансов принять участие в турнире.<BR>
|
||||
|
||||
<?php }elseif($u->info['exp'] < 250000){?>
|
||||
<?php } elseif ($u->info['exp'] < 250000) { ?>
|
||||
|
||||
Для регистрации в турнире нужно: <span style="color:green;"><b>250000</b></span> опыта у вас: <span style="color:red;"><b><?= $u->info['exp'];?></b></span> опыта<BR>
|
||||
Вам нужно набраться опыта.<BR>
|
||||
Для регистрации в турнире нужно: <span style="color:green;"><b>250000</b></span> опыта у вас: <span style="color:red;"><b><?= $u->info['exp']; ?></b></span> опыта<BR>
|
||||
Вам нужно набраться опыта.<BR>
|
||||
|
||||
<?php }}else{ ?>
|
||||
<?php }
|
||||
} else { ?>
|
||||
|
||||
Вы уже сделали ставку <b><?= floor($tz['money']); ?> кр.</b> (У вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>) Сделать повторную ставку?<br />
|
||||
<small><b><font color=red>Внимание! Покинув помещение Башни Смерти все Ваши ставки будут потеряны!</font></b></small><br>
|
||||
<input type="text" name="coin" value="1.00" size="8" id="coin" />
|
||||
<input type="submit" value="Увеличить ставку" name="docoin2" />
|
||||
<?php } } elseif($t['status'] == 1) { ?>
|
||||
<?php
|
||||
$r = ''; $p = ''; $b = '<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
Вы уже сделали ставку <b><?= floor($tz['money']); ?> кр.</b> (У вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>) Сделать повторную ставку?<br/>
|
||||
<small><b><font color=red>Внимание! Покинув помещение Башни Смерти все Ваши ставки будут потеряны!</font></b></small><br>
|
||||
<input type="text" name="coin" value="1.00" size="8" id="coin"/>
|
||||
<input type="submit" value="Увеличить ставку" name="docoin2"/>
|
||||
<?php }
|
||||
} elseif ($t['status'] == 1) { ?>
|
||||
<?php
|
||||
$r = '';
|
||||
$p = '';
|
||||
$b = '<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td valign="bottom" nowrap="" title=""><input onClick="location=location;" style="padding:5px;" type="submit" name="analiz2" value="Обновить"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>';
|
||||
$notowerlog = false;
|
||||
$log = mysql_fetch_array(mysql_query('SELECT `id`,`count_bs`,`m` FROM `bs_logs` WHERE `count_bs` = "'.mysql_real_escape_string($t['count']).'" ORDER BY `id` ASC LIMIT 1'));
|
||||
if(!isset($log['id'])) {
|
||||
$notowerlog = true;
|
||||
$r = '<div>Скорее всего Архивариус снова потерял пергамент с хрониками турниров ...</div>';
|
||||
} else {
|
||||
$sp = mysql_query('SELECT * FROM `bs_logs` WHERE `count_bs` = "'.$log['count_bs'].'" ORDER BY `id` ASC');
|
||||
while( $pl = mysql_fetch_array($sp) ) {
|
||||
$datesb = '';
|
||||
if( $pl['type'] == 2 ) {
|
||||
$datesb = '2';
|
||||
}
|
||||
$r .= '<br><span class="date'.$datesb.'">'.date('d.m.y H:i',$pl['time']).'</span> '.$pl['text'].'';
|
||||
}
|
||||
$liveusers = '';
|
||||
$sp = mysql_query('SELECT `id` FROM `users` WHERE `inTurnir` = "'.$t['id'].'"');
|
||||
while( $plu = mysql_fetch_array($sp) ) {
|
||||
$pl = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`level` FROM `users` WHERE `inUser` = "'.$plu['id'].'"'));
|
||||
if( isset($pl['id']) ) {
|
||||
$alc = '';
|
||||
if( $pl['align'] > 0 ) {
|
||||
$alc .= '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['align'].'.gif >';
|
||||
}
|
||||
if( $pl['clan'] > 0 ) {
|
||||
$alc .= '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['clan'].'.gif >';
|
||||
}
|
||||
$liveusers .= ', <b>'.$alc.$pl['login'].'</b> ['.$pl['level'].']<a href=/info/'.$plu['id'].' target=_blank><img src=//img.new-combats.tech/i/inf_capitalcity.gif width=12 height=11 ></a>';
|
||||
}
|
||||
}
|
||||
$r .= '<br><br>Всего живых участников на данный момент: <b>'.$t['users'].'</b> ('.ltrim($liveusers,', ').')';
|
||||
unset($liveusers,$alc);
|
||||
}
|
||||
if( $notowerlog == false ) {?>
|
||||
Призовой фонд: <b><?=$log['m']?> кр.</b>
|
||||
<?php } echo $r; ?>
|
||||
<?php } } ?>
|
||||
<BR>
|
||||
</fieldset>
|
||||
</form>
|
||||
<h4>Топ 10 игроков (новая статистиика) турнир 5<?//=$t['level']?> уровней</h4>
|
||||
<?php
|
||||
$sp = mysql_query('SELECT * FROM `users` WHERE `win_bs`>0 ORDER BY `win_bs` DESC LIMIT 10');
|
||||
$i = 1;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$wuser = '<b>'.$pl['login'].'</b> ['.$pl['level'].']<a href=/info/'.$pl['id'].' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
|
||||
if( $pl['clan'] > 0 ) {
|
||||
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['clan'].'.gif>'.$wuser;
|
||||
}
|
||||
if( $pl['align'] > 0 ) {
|
||||
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['align'].'.gif>'.$wuser;
|
||||
}
|
||||
echo '<b>'.$i.'.</b> Место: '.$wuser.' побед: <b>'.$pl['win_bs'].'</b><br>';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<h4>Победители 10-ти предыдущих турниров для 5<?//=$t['level']?> уровней</h4>
|
||||
<?php
|
||||
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `id` DESC LIMIT 10');
|
||||
$i = 1;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$wuser = '<b>'.$pl['wlogin'].'</b> ['.$pl['wlevel'].']<a href=/info/'.$pl['wuid'].' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
|
||||
if( $pl['wclan'] > 0 ) {
|
||||
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['wclan'].'.gif>'.$wuser;
|
||||
}
|
||||
if( $pl['walign'] > 0 ) {
|
||||
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['walign'].'.gif>'.$wuser;
|
||||
}
|
||||
echo $i.'. Победитель: '.$wuser.' Начало турнира <span class=date>'.date('d.m.Y H:i',($pl['time_start']+60)).'</span> продолжительность <span class=date>'.$u->timeOut( $pl['time_sf'] ).'</span> приз: <b>'.$pl['money'].'</b> <a target=_blank href=/towerlog.php?towerid='.$pl['bsid'].'&id='.$pl['count'].' >История турнира »»</a><br>';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<h4>Максимальный выигрыш для 5<?//=$t['level']?> уровней</h4>
|
||||
<?php
|
||||
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `money` DESC LIMIT 1');
|
||||
$i = 1;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$wuser = '<b>'.$pl['wlogin'].'</b> ['.$pl['wlevel'].']<a href=/info/'.$pl['wuid'].' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
|
||||
if( $pl['wclan'] > 0 ) {
|
||||
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['wclan'].'.gif>'.$wuser;
|
||||
}
|
||||
if( $pl['walign'] > 0 ) {
|
||||
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['walign'].'.gif>'.$wuser;
|
||||
}
|
||||
echo 'Победитель: '.$wuser.' Начало турнира <span class=date>'.date('d.m.Y H:i',($pl['time_start']+60)).'</span> продолжительность <span class=date>'.$u->timeOut( $pl['time_sf'] ).'</span> приз: <b>'.$pl['money'].'</b> <a target=_blank href=/towerlog.php?towerid='.$pl['bsid'].'&id='.$pl['count'].' >История турнира »»</a><br>';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<h4>Самый продолжительный турнир для 5<?//=$t['level']?> уровней</h4>
|
||||
<?php
|
||||
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `time_sf` DESC LIMIT 1');
|
||||
$i = 1;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$wuser = '<b>'.$pl['wlogin'].'</b> ['.$pl['wlevel'].']<a href=/info/'.$pl['wuid'].' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
|
||||
if( $pl['wclan'] > 0 ) {
|
||||
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['wclan'].'.gif>'.$wuser;
|
||||
}
|
||||
if( $pl['walign'] > 0 ) {
|
||||
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['walign'].'.gif>'.$wuser;
|
||||
}
|
||||
echo 'Победитель: '.$wuser.' Начало турнира<span class=date>'.date('d.m.Y H:i',($pl['time_start']+60)).'</span> продолжительность <span class=date>'.$u->timeOut( $pl['time_sf'] ).'</span> приз: <b>'.$pl['money'].'</b> <a target=_blank href=/towerlog.php?towerid='.$pl['bsid'].'&id='.$pl['count'].' >История турнира »»</a><br>';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<br /><br />
|
||||
<?php } } ?>
|
||||
$notowerlog = false;
|
||||
$log = mysql_fetch_array(mysql_query('SELECT `id`,`count_bs`,`m` FROM `bs_logs` WHERE `count_bs` = "' . mysql_real_escape_string($t['count']) . '" ORDER BY `id` ASC LIMIT 1'));
|
||||
if (!isset($log['id'])) {
|
||||
$notowerlog = true;
|
||||
$r = '<div>Скорее всего Архивариус снова потерял пергамент с хрониками турниров ...</div>';
|
||||
} else {
|
||||
$sp = mysql_query('SELECT * FROM `bs_logs` WHERE `count_bs` = "' . $log['count_bs'] . '" ORDER BY `id` ASC');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$datesb = '';
|
||||
if ($pl['type'] == 2) {
|
||||
$datesb = '2';
|
||||
}
|
||||
$r .= '<br><span class="date' . $datesb . '">' . date('d.m.y H:i', $pl['time']) . '</span> ' . $pl['text'] . '';
|
||||
}
|
||||
$liveusers = '';
|
||||
$sp = mysql_query('SELECT `id` FROM `users` WHERE `inTurnir` = "' . $t['id'] . '"');
|
||||
while ($plu = mysql_fetch_array($sp)) {
|
||||
$pl = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`level` FROM `users` WHERE `inUser` = "' . $plu['id'] . '"'));
|
||||
if (isset($pl['id'])) {
|
||||
$alc = '';
|
||||
if ($pl['align'] > 0) {
|
||||
$alc .= '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['align'] . '.gif >';
|
||||
}
|
||||
if ($pl['clan'] > 0) {
|
||||
$alc .= '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['clan'] . '.gif >';
|
||||
}
|
||||
$liveusers .= ', <b>' . $alc . $pl['login'] . '</b> [' . $pl['level'] . ']<a href=/info/' . $plu['id'] . ' target=_blank><img src=//img.new-combats.tech/i/inf_capitalcity.gif width=12 height=11 ></a>';
|
||||
}
|
||||
}
|
||||
$r .= '<br><br>Всего живых участников на данный момент: <b>' . $t['users'] . '</b> (' . ltrim($liveusers, ', ') . ')';
|
||||
unset($liveusers, $alc);
|
||||
}
|
||||
if ($notowerlog == false) { ?>
|
||||
Призовой фонд: <b><?= $log['m'] ?> кр.</b>
|
||||
<?php }
|
||||
echo $r; ?>
|
||||
<?php }
|
||||
} ?>
|
||||
<BR>
|
||||
</fieldset>
|
||||
</form>
|
||||
<h4>Топ 10 игроков (новая статистиика) турнир 5<? //=$t['level']?> уровней</h4>
|
||||
<?php
|
||||
$sp = mysql_query('SELECT * FROM `users` WHERE `win_bs`>0 ORDER BY `win_bs` DESC LIMIT 10');
|
||||
$i = 1;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$wuser = '<b>' . $pl['login'] . '</b> [' . $pl['level'] . ']<a href=/info/' . $pl['id'] . ' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
|
||||
if ($pl['clan'] > 0) {
|
||||
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['clan'] . '.gif>' . $wuser;
|
||||
}
|
||||
if ($pl['align'] > 0) {
|
||||
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['align'] . '.gif>' . $wuser;
|
||||
}
|
||||
echo '<b>' . $i . '.</b> Место: ' . $wuser . ' побед: <b>' . $pl['win_bs'] . '</b><br>';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<h4>Победители 10-ти предыдущих турниров для 5<? //=$t['level']?> уровней</h4>
|
||||
<?php
|
||||
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `id` DESC LIMIT 10');
|
||||
$i = 1;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$wuser = '<b>' . $pl['wlogin'] . '</b> [' . $pl['wlevel'] . ']<a href=/info/' . $pl['wuid'] . ' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
|
||||
if ($pl['wclan'] > 0) {
|
||||
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['wclan'] . '.gif>' . $wuser;
|
||||
}
|
||||
if ($pl['walign'] > 0) {
|
||||
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['walign'] . '.gif>' . $wuser;
|
||||
}
|
||||
echo $i . '. Победитель: ' . $wuser . ' Начало турнира <span class=date>' . date(
|
||||
'd.m.Y H:i', ($pl['time_start'] + 60)
|
||||
) . '</span> продолжительность <span class=date>' . Conversion::secondsToTimeout(
|
||||
$pl['time_sf']
|
||||
) . '</span> приз: <b>' . $pl['money'] . '</b> <a target=_blank href=/towerlog.php?towerid=' . $pl['bsid'] . '&id=' . $pl['count'] . ' >История турнира »»</a><br>';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<h4>Максимальный выигрыш для 5 уровней</h4>
|
||||
<?php
|
||||
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `money` DESC LIMIT 1');
|
||||
$i = 1;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$wuser = '<b>' . $pl['wlogin'] . '</b> [' . $pl['wlevel'] . ']<a href=/info/' . $pl['wuid'] . ' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
|
||||
if ($pl['wclan'] > 0) {
|
||||
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['wclan'] . '.gif>' . $wuser;
|
||||
}
|
||||
if ($pl['walign'] > 0) {
|
||||
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['walign'] . '.gif>' . $wuser;
|
||||
}
|
||||
echo 'Победитель: ' . $wuser . ' Начало турнира <span class=date>' . date('d.m.Y H:i', ($pl['time_start'] + 60)) . '</span> продолжительность <span class=date>' . Conversion::secondsToTimeout(
|
||||
$pl['time_sf']
|
||||
) . '</span> приз: <b>' . $pl['money'] . '</b> <a target=_blank href=/towerlog.php?towerid=' . $pl['bsid'] . '&id=' . $pl['count'] . ' >История турнира »»</a><br>';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<h4>Самый продолжительный турнир для 5<? //=$t['level']?> уровней</h4>
|
||||
<?php
|
||||
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `time_sf` DESC LIMIT 1');
|
||||
$i = 1;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$wuser = '<b>' . $pl['wlogin'] . '</b> [' . $pl['wlevel'] . ']<a href=/info/' . $pl['wuid'] . ' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
|
||||
if ($pl['wclan'] > 0) {
|
||||
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['wclan'] . '.gif>' . $wuser;
|
||||
}
|
||||
if ($pl['walign'] > 0) {
|
||||
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['walign'] . '.gif>' . $wuser;
|
||||
}
|
||||
echo 'Победитель: ' . $wuser . ' Начало турнира<span class=date>' . date('d.m.Y H:i', ($pl['time_start'] + 60)) . '</span> продолжительность <span class=date>' . Conversion::secondsToTimeout(
|
||||
$pl['time_sf']
|
||||
) . '</span> приз: <b>' . $pl['money'] . '</b> <a target=_blank href=/towerlog.php?towerid=' . $pl['bsid'] . '&id=' . $pl['count'] . ' >История турнира »»</a><br>';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<br/><br/>
|
||||
<?php }
|
||||
} ?>
|
@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
@ -8,7 +11,8 @@ if ($u->room['file'] != 'dragopsh') {
|
||||
}
|
||||
$d = new Dungeon;
|
||||
|
||||
function sendSysChat(string $message, bool $hasDn = false, bool $hasReceiver = false) {
|
||||
function sendSysChat(string $message, bool $hasDn = false, bool $hasReceiver = false)
|
||||
{
|
||||
global $u;
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
@ -55,13 +59,23 @@ $dies = $dies[0];
|
||||
$map_d = json_decode($map['data']);
|
||||
|
||||
$varos = [];
|
||||
$varos['trap1'] = mysql_fetch_array(mysql_query('SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time() . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'));
|
||||
$varos['trap1'] = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time() . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'
|
||||
)
|
||||
);
|
||||
|
||||
$errors = '';
|
||||
$effed = '';
|
||||
|
||||
if (isset($_GET['takeitm'])) {
|
||||
$var = ['obj' => mysql_fetch_array(mysql_query('SELECT `i`.*,`m`.`name`,`m`.`inslot` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`id` = "' . mysql_real_escape_string($_GET['takeitm']) . '" AND `i`.`lib` = "' . $lab['id'] . '" AND `i`.`x` = "' . $u->info['x'] . '" AND `i`.`y` = "' . $u->info['y'] . '" LIMIT 1'))];
|
||||
$var = ['obj' => mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `i`.*,`m`.`name`,`m`.`inslot` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`id` = "' . mysql_real_escape_string(
|
||||
$_GET['takeitm']
|
||||
) . '" AND `i`.`lib` = "' . $lab['id'] . '" AND `i`.`x` = "' . $u->info['x'] . '" AND `i`.`y` = "' . $u->info['y'] . '" LIMIT 1'
|
||||
)
|
||||
)];
|
||||
if (isset($var['obj']['id'])) {
|
||||
if ($var['obj']['take'] == 0) {
|
||||
$var['sex'] = '';
|
||||
@ -84,7 +98,13 @@ if (isset($_GET['takeitm'])) {
|
||||
$errors = '<b style="color: red">Предмет не найден...</b>';
|
||||
}
|
||||
} elseif (isset($_GET['useobj'])) {
|
||||
$var = ['obj' => mysql_fetch_array(mysql_query('SELECT * FROM `laba_obj` WHERE `id` = "' . mysql_real_escape_string($_GET['useobj']) . '" AND `lib` = "' . $lab['id'] . '" AND `x` = "' . $u->info['x'] . '" AND `y` = "' . $u->info['y'] . '" LIMIT 1'))];
|
||||
$var = ['obj' => mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `laba_obj` WHERE `id` = "' . mysql_real_escape_string(
|
||||
$_GET['useobj']
|
||||
) . '" AND `lib` = "' . $lab['id'] . '" AND `x` = "' . $u->info['x'] . '" AND `y` = "' . $u->info['y'] . '" LIMIT 1'
|
||||
)
|
||||
)];
|
||||
if (isset($var['obj']['id'])) {
|
||||
if ($var['obj']['use'] == 0) {
|
||||
if ($var['obj']['type'] == 1) {
|
||||
@ -101,9 +121,11 @@ if (isset($_GET['takeitm'])) {
|
||||
$var['itm'] = $var['itm'][0];
|
||||
$var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1'));
|
||||
if (isset($var['itm']['id'])) {
|
||||
mysql_query('INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
|
||||
mysql_query(
|
||||
'INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
|
||||
"' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['itm']['id'] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0"
|
||||
)');
|
||||
)'
|
||||
);
|
||||
} else {
|
||||
$var['itm']['name'] = 'Предмет рассыпался на глазах...';
|
||||
}
|
||||
@ -135,9 +157,11 @@ if (isset($_GET['takeitm'])) {
|
||||
$var['itm'] = $var['itm'][0];
|
||||
$var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1'));
|
||||
if (isset($var['itm']['id'])) {
|
||||
mysql_query('INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
|
||||
mysql_query(
|
||||
'INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
|
||||
"' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['itm']['id'] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0"
|
||||
)');
|
||||
)'
|
||||
);
|
||||
} else {
|
||||
$var['itm']['name'] = 'Предмет рассыпался на глазах...';
|
||||
}
|
||||
@ -146,9 +170,11 @@ if (isset($_GET['takeitm'])) {
|
||||
$var['itm'] = $var['itm'][0];
|
||||
$var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1'));
|
||||
if (isset($var['itm']['id'])) {
|
||||
mysql_query('INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
|
||||
mysql_query(
|
||||
'INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
|
||||
"' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['itm']['id'] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0"
|
||||
)');
|
||||
)'
|
||||
);
|
||||
} else {
|
||||
$var['itm']['name'] = 'Предмет рассыпался на глазах...';
|
||||
}
|
||||
@ -207,7 +233,9 @@ if ($real_x > count($map_d) - 7) {
|
||||
|
||||
$objs = [];
|
||||
|
||||
$sp = mysql_query('SELECT * FROM `laba_obj` WHERE `lib` = "' . $lab['id'] . '" AND `x` > ' . ($real_x - 7) . ' AND `x` < ' . ($real_x + 7) . ' AND `y` > ' . ($real_y - 12) . ' AND `y` < ' . ($real_y + 12) . ' LIMIT 144');
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `laba_obj` WHERE `lib` = "' . $lab['id'] . '" AND `x` > ' . ($real_x - 7) . ' AND `x` < ' . ($real_x + 7) . ' AND `y` > ' . ($real_y - 12) . ' AND `y` < ' . ($real_y + 12) . ' LIMIT 144'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$objs[$pl['x']][$pl['y']] = $pl;
|
||||
}
|
||||
@ -260,7 +288,9 @@ if (isset($_GET['goto'])) {
|
||||
}
|
||||
$u->info['timeGo'] = time() + $varos['timego'];
|
||||
$u->info['timeGoL'] = time();
|
||||
mysql_query('UPDATE `stats` SET `x` = "' . $u->info['x'] . '" ,`y` = "' . $u->info['y'] . '",`timeGoL` = "' . $u->info['timeGoL'] . '",`timeGo` = "' . $u->info['timeGo'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `x` = "' . $u->info['x'] . '" ,`y` = "' . $u->info['y'] . '",`timeGoL` = "' . $u->info['timeGoL'] . '",`timeGo` = "' . $u->info['timeGo'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -331,9 +361,11 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
|
||||
if ($var['add'][1] > 0) {
|
||||
$j = 0;
|
||||
while ($j < $var['add'][1]) {
|
||||
mysql_query('INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
|
||||
mysql_query(
|
||||
'INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
|
||||
"' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['add'][0] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0"
|
||||
)');
|
||||
)'
|
||||
);
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
@ -346,7 +378,9 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
|
||||
mysql_query('DELETE FROM `laba_obj` WHERE `id` = "' . $mitm['id'] . '" LIMIT 1');
|
||||
} elseif ($mitm['type'] == 2) {
|
||||
if ($mitm['use'] == 0) {
|
||||
$tbtl = mysql_fetch_array(mysql_query('SELECT * FROM `battle` WHERE `team_win` = -1 AND `dn_id` = "' . $lab['id'] . '" AND `x` = "' . $u->info['x'] . '" AND `y` = "' . $u->info['y'] . '" LIMIT 1'));
|
||||
$tbtl = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `battle` WHERE `team_win` = -1 AND `dn_id` = "' . $lab['id'] . '" AND `x` = "' . $u->info['x'] . '" AND `y` = "' . $u->info['y'] . '" LIMIT 1')
|
||||
);
|
||||
if (isset($tbtl['id'])) {
|
||||
//вступаем в поединок
|
||||
mysql_query('UPDATE `users` SET `battle` = "' . $tbtl['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
@ -378,7 +412,8 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
|
||||
$expB = 0;
|
||||
$btld = ['players' => '', 'timeout' => 180, 'type' => 0, 'invis' => 0, 'noinc' => 0, 'travmChance' => 0, 'typeBattle' => 0, 'addExp' => $expB, 'money' => 0];
|
||||
|
||||
$ins = mysql_query('INSERT INTO `battle` (`dungeon`,`dn_id`,`x`,`y`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`) VALUES (
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `battle` (`dungeon`,`dn_id`,`x`,`y`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`) VALUES (
|
||||
"102",
|
||||
"' . $lab['id'] . '",
|
||||
"' . $u->info['x'] . '",
|
||||
@ -393,7 +428,8 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
|
||||
"' . $btld['travmChance'] . '",
|
||||
"' . $btld['typeBattle'] . '",
|
||||
"' . $btld['addExp'] . '",
|
||||
"' . $btld['money'] . '")');
|
||||
"' . $btld['money'] . '")'
|
||||
);
|
||||
$btl_id = mysql_insert_id();
|
||||
}
|
||||
if ($btl_id > 0) {
|
||||
@ -444,14 +480,23 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
|
||||
} elseif ($mitm['type'] == 4) {
|
||||
if ($mitm['use'] == 0) {
|
||||
//Ловушка
|
||||
$var['trap1'] = mysql_fetch_array(mysql_query('SELECT `id`,`vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time() . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'));
|
||||
$var['trap1'] = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time(
|
||||
) . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'
|
||||
)
|
||||
);
|
||||
$var['time'] = rand(1, 60);
|
||||
if (isset($var['trap1']['id'])) {
|
||||
mysql_query('UPDATE `laba_act` SET `vals` = "' . ($var['trap1']['vals'] + $var['time']) . '",`time` = "' . ($var['trap1']['time'] + $var['time'] * 60) . '" WHERE `id` = "' . $var['trap1']['id'] . '" LIMIT 1');
|
||||
mysql_query(
|
||||
'UPDATE `laba_act` SET `vals` = "' . ($var['trap1']['vals'] + $var['time']) . '",`time` = "' . ($var['trap1']['time'] + $var['time'] * 60) . '" WHERE `id` = "' . $var['trap1']['id'] . '" LIMIT 1'
|
||||
);
|
||||
} else {
|
||||
mysql_query('INSERT INTO `laba_act` (`uid`,`time`,`lib`,`vars`,`vals`) VALUES (
|
||||
mysql_query(
|
||||
'INSERT INTO `laba_act` (`uid`,`time`,`lib`,`vars`,`vals`) VALUES (
|
||||
"' . $u->info['id'] . '","' . (time() + $var['time'] * 60) . '","' . $lab['id'] . '","trap1","' . $var['time'] . '"
|
||||
)');
|
||||
)'
|
||||
);
|
||||
}
|
||||
mysql_query('UPDATE `laba_obj` SET `use` = "' . $u->info['id'] . '" WHERE `id` = "' . $mitm['id'] . '" LIMIT 1');
|
||||
|
||||
@ -461,7 +506,12 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
|
||||
}
|
||||
$var['text'] = '<img width=40 height=25 src=//img.new-combats.tech/i/items/event_timer_trap.gif> <b>' . $u->info['login'] . '</b> угодил' . $var['sex'] . ' в ловушку...';
|
||||
|
||||
$varos['trap1'] = mysql_fetch_array(mysql_query('SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time() . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'));
|
||||
$varos['trap1'] = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time(
|
||||
) . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'
|
||||
)
|
||||
);
|
||||
sendSysChat($var['text'], true);
|
||||
$errors .= '<img width="40" height="25" src="//img.new-combats.tech/i/items/event_timer_trap.gif"> ' . $u->info['login'] . ' угодил' . $var['sex'] . ' в ловушку... Время перехода +3 секунды (Длительность: +' . $var['time'] . ' мин.)';
|
||||
}
|
||||
@ -476,7 +526,9 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
|
||||
unset($var);
|
||||
}
|
||||
|
||||
$sp = mysql_query('SELECT `i`.*,`m`.`name`,`m`.`img` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`lib` = "' . $lab['id'] . '" AND `i`.`x` = "' . $u->info['x'] . '" AND `i`.`y` = "' . $u->info['y'] . '" AND `i`.`take` = "0"');
|
||||
$sp = mysql_query(
|
||||
'SELECT `i`.*,`m`.`name`,`m`.`img` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`lib` = "' . $lab['id'] . '" AND `i`.`x` = "' . $u->info['x'] . '" AND `i`.`y` = "' . $u->info['y'] . '" AND `i`.`take` = "0"'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$itms .= ' <a href="main.php?takeitm=' . $pl['id'] . '"><img src="//img.new-combats.tech/i/items/' . $pl['img'] . '" title="Поднять "' . $pl['name'] . '""></a>';
|
||||
}
|
||||
@ -497,7 +549,10 @@ if ($itms != '') {
|
||||
mysql_query('UPDATE `laba_now` SET `users` = "' . $lab['users'] . '" WHERE `id` = "' . $lab['id'] . '" LIMIT 1');
|
||||
}
|
||||
\User\ItemsModel::addItem(4392, $u->info['id'], '|fromlaba=1|nosale=1');
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%fromlaba=1%" AND `data` LIKE "%nosavelaba=1%"');
|
||||
mysql_query(
|
||||
'UPDATE `items_users` SET `delete` = "' . time(
|
||||
) . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%fromlaba=1%" AND `data` LIKE "%nosavelaba=1%"'
|
||||
);
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%nosavelaba=1%"');
|
||||
mysql_query('UPDATE `users` SET `room` = "369" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dnow` = "0",`x`="0",`y`="0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
@ -510,7 +565,9 @@ if ($itms != '') {
|
||||
die('<script>location.href="main.php";</script>');
|
||||
}
|
||||
|
||||
$sp = mysql_query('SELECT `s`.`x`,`s`.`y`,`u`.`id`,`u`.`login`,`u`.`level` FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`dnow` = "' . $lab['id'] . '" AND `s`.`id` != "' . $u->info['id'] . '" LIMIT 5');
|
||||
$sp = mysql_query(
|
||||
'SELECT `s`.`x`,`s`.`y`,`u`.`id`,`u`.`login`,`u`.`level` FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`dnow` = "' . $lab['id'] . '" AND `s`.`id` != "' . $u->info['id'] . '" LIMIT 5'
|
||||
);
|
||||
$pi = 1;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$objs[$pl['x']][$pl['y']] = [2 => '<div title="Игрок: ' . $pl['login'] . '" class="ddp1ee' . $pi . '"></div>']; //Персонаж 1
|
||||
@ -556,169 +613,171 @@ $mapsee = '<div style="width:165px;height:165px;padding:10px;">' . $mapsee . '</
|
||||
|
||||
//Эффекты на персонаже
|
||||
if (isset($varos['trap1']['vals']) && $varos['trap1']['vals'] > 0) {
|
||||
$effed .= '<div><img width=40 height=25 src=//img.new-combats.tech/i/items/event_timer_trap.gif> - Время перехода +3 секунды (Осталось: ' . $u->timeOut($varos['trap1']['time'] - time()) . ')</div>';
|
||||
$effed .= '<div><img width=40 height=25 src=//img.new-combats.tech/i/items/event_timer_trap.gif> - Время перехода +3 секунды (Осталось: ' . Conversion::secondsToTimeout(
|
||||
$varos['trap1']['time'] - time()
|
||||
) . ')</div>';
|
||||
}
|
||||
unset($varos);
|
||||
?>
|
||||
<style>
|
||||
.ddp0 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/o.gif");
|
||||
}
|
||||
|
||||
.ddp1 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/m.gif");
|
||||
}
|
||||
|
||||
.ddpStart {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/os.gif");
|
||||
}
|
||||
|
||||
.ddpExit {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/of.gif");
|
||||
}
|
||||
|
||||
.ddp1s {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/s.gif");
|
||||
}
|
||||
|
||||
.ddp1m {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/r.gif");
|
||||
}
|
||||
|
||||
.ddp1h {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/h.gif");
|
||||
}
|
||||
|
||||
.ddp1l {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/b.gif");
|
||||
}
|
||||
|
||||
.ddp1p {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/p.gif");
|
||||
}
|
||||
|
||||
.ddp1me {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/u.gif");
|
||||
}
|
||||
|
||||
.ddp1ee1 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e1.gif");
|
||||
}
|
||||
|
||||
.ddp1ee2 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e2.gif");
|
||||
}
|
||||
|
||||
.ddp1ee3 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e3.gif");
|
||||
}
|
||||
|
||||
.ddp1ee4 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e4.gif");
|
||||
}
|
||||
|
||||
.ddp1ee5 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e5.gif");
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script>
|
||||
$('body').keydown(function (event) {
|
||||
if (event.which == 38 || event.which == 87) {
|
||||
location.href = "main.php?goto=2";
|
||||
} else if (event.which == 37 || event.which == 65) {
|
||||
location.href = "main.php?goto=1";
|
||||
} else if (event.which == 39 || event.which == 68) {
|
||||
location.href = "main.php?goto=3";
|
||||
} else if (event.which == 40 || event.which == 83) {
|
||||
location.href = "main.php?goto=4";
|
||||
.ddp0 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/o.gif");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#E2E0E0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td width="307"></td>
|
||||
<td width="300"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="409" valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="5"> </td>
|
||||
<td width="99%">
|
||||
<div><?= $u->error ?></div>
|
||||
<div>Карта: <?= $lab['id'] ?></div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function confirmSubmit(mes) {
|
||||
var agree = confirm(mes);
|
||||
if (agree)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<br/>
|
||||
<form method="post">
|
||||
<div>
|
||||
<?= $d->usersDng($lab['id']); ?>
|
||||
</div>
|
||||
<input type="submit" name="exit" value="Выйти и потерять все найденное!"
|
||||
onclick="return confirmSubmit('Действительно хотите Выйти и потерять все найденное?')"/>
|
||||
</form>
|
||||
<br/>
|
||||
<?php if ($effed != '') {
|
||||
echo $effed;
|
||||
} ?>
|
||||
|
||||
.ddp1 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/m.gif");
|
||||
}
|
||||
|
||||
.ddpStart {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/os.gif");
|
||||
}
|
||||
|
||||
.ddpExit {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/of.gif");
|
||||
}
|
||||
|
||||
.ddp1s {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/s.gif");
|
||||
}
|
||||
|
||||
.ddp1m {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/r.gif");
|
||||
}
|
||||
|
||||
.ddp1h {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/h.gif");
|
||||
}
|
||||
|
||||
.ddp1l {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/b.gif");
|
||||
}
|
||||
|
||||
.ddp1p {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/p.gif");
|
||||
}
|
||||
|
||||
.ddp1me {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/u.gif");
|
||||
}
|
||||
|
||||
.ddp1ee1 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e1.gif");
|
||||
}
|
||||
|
||||
.ddp1ee2 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e2.gif");
|
||||
}
|
||||
|
||||
.ddp1ee3 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e3.gif");
|
||||
}
|
||||
|
||||
.ddp1ee4 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e4.gif");
|
||||
}
|
||||
|
||||
.ddp1ee5 {
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-image: url("//img.new-combats.tech/drgn/bg/e5.gif");
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script>
|
||||
$('body').keydown(function (event) {
|
||||
if (event.which == 38 || event.which == 87) {
|
||||
location.href = "main.php?goto=2";
|
||||
} else if (event.which == 37 || event.which == 65) {
|
||||
location.href = "main.php?goto=1";
|
||||
} else if (event.which == 39 || event.which == 68) {
|
||||
location.href = "main.php?goto=3";
|
||||
} else if (event.which == 40 || event.which == 83) {
|
||||
location.href = "main.php?goto=4";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#E2E0E0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td width="307"></td>
|
||||
<td width="300"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="409" valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="5"> </td>
|
||||
<td width="99%">
|
||||
<div><?= $u->error ?></div>
|
||||
<div>Карта: <?= $lab['id'] ?></div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function confirmSubmit(mes) {
|
||||
var agree = confirm(mes);
|
||||
if (agree)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<br/>
|
||||
<?php
|
||||
<form method="post">
|
||||
<div>
|
||||
<?= $d->usersDng($lab['id']); ?>
|
||||
</div>
|
||||
<input type="submit" name="exit" value="Выйти и потерять все найденное!"
|
||||
onclick="return confirmSubmit('Действительно хотите Выйти и потерять все найденное?')"/>
|
||||
</form>
|
||||
<br/>
|
||||
<?php if ($effed != '') {
|
||||
echo $effed;
|
||||
} ?>
|
||||
<br/>
|
||||
<?php
|
||||
if ($dies > 0) {
|
||||
echo '<b>Кол-во смертей: ' . $dies . '/3</b><br>';
|
||||
}
|
||||
@ -934,9 +993,7 @@ unset($varos);
|
||||
<td width="67" height="74"></td>
|
||||
<td width="165" height="165">
|
||||
<div>
|
||||
<?php
|
||||
echo $mapsee;
|
||||
?>
|
||||
<?= $mapsee; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td width="64"></td>
|
||||
@ -957,5 +1014,3 @@ unset($varos);
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
@ -656,7 +656,9 @@ if ($roomSection == 1) {
|
||||
if (!isset($hgo1['id'])) { ?>
|
||||
<button class="btn btn-success" onclick="location.href='/main.php?rz=1&add_quest=1&city_quest=capitalcity'">Пещера Тысячи Проклятий</button>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo1['time'] - time()) ?> (Пещера Тысячи Проклятий)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(
|
||||
60 * 60 * 24 + $hgo1['time'] - time()
|
||||
) ?> (Пещера Тысячи Проклятий)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=capitalcity"'/>
|
||||
<?php }
|
||||
if (!isset($hgo2['id'])) { ?>
|
||||
@ -1078,7 +1080,7 @@ if ($roomSection == 1) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . $u->timeOut(
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
|
||||
60 * 60 * 2 - time() + $dungeon_timeout['time']
|
||||
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,369 +1,352 @@
|
||||
<?php
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
if($u->room['file']=='enternekro')
|
||||
{
|
||||
if ($u->room['file'] == 'enternekro') {
|
||||
|
||||
$dun = 11; //для новичков 2-7 лвл
|
||||
$dun = 11; //для новичков 2-7 лвл
|
||||
|
||||
$er = '';
|
||||
$er = '';
|
||||
|
||||
$dzs = '';
|
||||
$dzs = '';
|
||||
|
||||
$g111 = 1;
|
||||
$g11 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "psh1" AND `time`>'.(time()-7200).' LIMIT 1',1);
|
||||
$g111 = 1;
|
||||
$g11 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh1" AND `time`>' . (time() - 7200) . ' LIMIT 1', 1);
|
||||
|
||||
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "'.$u->info['align'].'" LIMIT 1'));
|
||||
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "' . $u->info['align'] . '" LIMIT 1'));
|
||||
|
||||
if($u->info['dn']>0)
|
||||
{
|
||||
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="'.$u->info['dn'].'" AND `delete` = "0" LIMIT 1'));
|
||||
if(!isset($zv['id']))
|
||||
{
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
}
|
||||
}
|
||||
if ($u->info['dn'] > 0) {
|
||||
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="' . $u->info['dn'] . '" AND `delete` = "0" LIMIT 1'));
|
||||
if (!isset($zv['id'])) {
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($g11['id']))
|
||||
{
|
||||
$g111 = 0;
|
||||
if(isset($_GET['start']))
|
||||
{
|
||||
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']);
|
||||
}
|
||||
}
|
||||
if(isset($_GET['start']) && $zv['uid']==$u->info['id'] && $g111 == 1)
|
||||
{
|
||||
//начинаем поход
|
||||
//начинаем поход
|
||||
$ig = 1;
|
||||
if($ig>0)
|
||||
{
|
||||
//перемещаем игроков в пещеру
|
||||
//$u->addAction(time(),'psh1','');
|
||||
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("'.$zv['city'].'","'.$zv['uid'].'","'.$dun.'","Бездна","'.time().'")');
|
||||
if($ins)
|
||||
{
|
||||
$zid = mysql_insert_id();
|
||||
//обновляем пользователей
|
||||
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$zv['id'].'" LIMIT '.($zv['team_max']+1).'');
|
||||
$ids = '';
|
||||
while($pu = mysql_fetch_array($su))
|
||||
{
|
||||
$ids .= ' `id` = "'.$pu['id'].'" OR';
|
||||
$u->addAction(time(),'psh1','',$pu['id']);
|
||||
}
|
||||
$ids = rtrim($ids,'OR');
|
||||
$upd1 = mysql_query('UPDATE `stats` SET `x`="1",`y`="-6",`dn` = "0",`dnow` = "'.$zid.'" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).'');
|
||||
if($upd1)
|
||||
{
|
||||
$upd2 = mysql_query('UPDATE `users` SET `room` = "297" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).'');
|
||||
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
|
||||
//Добавляем ботов
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "'.$dun.'"');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$vls .= '("'.$zid.'","'.$pl['id_bot'].'","'.$pl['colvo'].'","'.$pl['items'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['dialog'].'","'.$pl['items'].'"),';
|
||||
}
|
||||
$vls = rtrim($vls,',');
|
||||
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES '.$vls.'');
|
||||
//Добавляем обьекты
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "'.$dun.'"');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$vls .= '("'.$zid.'","'.$pl['name'].'","'.$pl['img'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['action'].'","'.$pl['type'].'","'.$pl['w'].'","'.$pl['h'].'","'.$pl['s'].'","'.$pl['s2'].'","'.$pl['os1'].'","'.$pl['os2'].'","'.$pl['os3'].'","'.$pl['os4'].'","'.$pl['type2'].'","'.$pl['top'].'","'.$pl['left'].'","'.$pl['date'].'"),';
|
||||
}
|
||||
$vls = rtrim($vls,',');
|
||||
if($vls!='')
|
||||
{
|
||||
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES '.$vls.'');
|
||||
}else{
|
||||
$ins2 = true;
|
||||
}
|
||||
if($upd2 && $ins1 && $ins2)
|
||||
{
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
|
||||
die('<script>location="main.php?rnd='.$code.'";</script>');
|
||||
}else{
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}else{
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}else{
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}
|
||||
}elseif(isset($_POST['go'],$_POST['goid']) && $g111==1)
|
||||
{
|
||||
if(!isset($zv['id']))
|
||||
{
|
||||
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `id`="'.mysql_real_escape_string($_POST['goid']).'" AND `delete` = "0" LIMIT 1'));
|
||||
if(isset($zv['id']))
|
||||
{
|
||||
if($u->info['level']>5)
|
||||
{
|
||||
$row = 0;
|
||||
if(5>$row)
|
||||
{
|
||||
$upd = mysql_query('UPDATE `stats` SET `dn` = "'.$zv['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
if(!$upd)
|
||||
{
|
||||
$re = 'Не удалось вступить в эту группу';
|
||||
unset($zv);
|
||||
}else{
|
||||
$u->info['dn'] = $zv['id'];
|
||||
}
|
||||
}else{
|
||||
$re = 'В группе нет места';
|
||||
unset($zv);
|
||||
}
|
||||
}else{
|
||||
$re = 'Вы не подходите по уровню';
|
||||
unset($zv);
|
||||
}
|
||||
}else{
|
||||
$re = 'Заявка не найдена';
|
||||
}
|
||||
}else{
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
}elseif(isset($_POST['leave']) && isset($zv['id']) && $g111 == 1)
|
||||
{
|
||||
if($zv['uid']==$u->info['id'])
|
||||
{
|
||||
//ставим в группу нового руководителя
|
||||
$ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "'.$zv['id'].'" AND `id` != "'.$u->info['id'].'" LIMIT 1'));
|
||||
if(isset($ld['id']))
|
||||
{
|
||||
$zv['uid'] = $ld['id'];
|
||||
mysql_query('UPDATE `dungeon_zv` SET `uid` = "'.$zv['uid'].'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}else{
|
||||
//удаляем группу целиком
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}
|
||||
}else{
|
||||
//просто выходим с группы
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}
|
||||
}elseif(isset($_POST['add']) && $u->info['level']>1 && $g111 == 1)
|
||||
{
|
||||
if($u->info['dn']==0)
|
||||
{
|
||||
$lmn = 6;
|
||||
$lmx = 21;
|
||||
$tmx = 5;
|
||||
|
||||
//только своего уровня
|
||||
$lmn = $u->info['level'];
|
||||
|
||||
$ins = mysql_query('INSERT INTO `dungeon_zv`
|
||||
if (isset($g11['id'])) {
|
||||
$g111 = 0;
|
||||
if (isset($_GET['start'])) {
|
||||
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
|
||||
}
|
||||
}
|
||||
if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $g111 == 1) {
|
||||
//начинаем поход
|
||||
//начинаем поход
|
||||
$ig = 1;
|
||||
if ($ig > 0) {
|
||||
//перемещаем игроков в пещеру
|
||||
//$u->addAction(time(),'psh1','');
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dun . '","Бездна","' . time() . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$zid = mysql_insert_id();
|
||||
//обновляем пользователей
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" LIMIT ' . ($zv['team_max'] + 1) . ''
|
||||
);
|
||||
$ids = '';
|
||||
while ($pu = mysql_fetch_array($su)) {
|
||||
$ids .= ' `id` = "' . $pu['id'] . '" OR';
|
||||
$u->addAction(time(), 'psh1', '', $pu['id']);
|
||||
}
|
||||
$ids = rtrim($ids, 'OR');
|
||||
$upd1 = mysql_query('UPDATE `stats` SET `x`="1",`y`="-6",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
|
||||
if ($upd1) {
|
||||
$upd2 = mysql_query('UPDATE `users` SET `room` = "297" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
|
||||
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
|
||||
//Добавляем ботов
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "' . $dun . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '"),';
|
||||
}
|
||||
$vls = rtrim($vls, ',');
|
||||
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES ' . $vls . '');
|
||||
//Добавляем обьекты
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "' . $dun . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$vls .= '("' . $zid . '","' . $pl['name'] . '","' . $pl['img'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['action'] . '","' . $pl['type'] . '","' . $pl['w'] . '","' . $pl['h'] . '","' . $pl['s'] . '","' . $pl['s2'] . '","' . $pl['os1'] . '","' . $pl['os2'] . '","' . $pl['os3'] . '","' . $pl['os4'] . '","' . $pl['type2'] . '","' . $pl['top'] . '","' . $pl['left'] . '","' . $pl['date'] . '"),';
|
||||
}
|
||||
$vls = rtrim($vls, ',');
|
||||
if ($vls != '') {
|
||||
$ins2 = mysql_query(
|
||||
'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
|
||||
);
|
||||
} else {
|
||||
$ins2 = true;
|
||||
}
|
||||
if ($upd2 && $ins1 && $ins2) {
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
die('<script>location="main.php?rnd=' . $code . '";</script>');
|
||||
} else {
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
} else {
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
} else {
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}
|
||||
} elseif (isset($_POST['go'], $_POST['goid']) && $g111 == 1) {
|
||||
if (!isset($zv['id'])) {
|
||||
$zv = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string($_POST['goid']) . '" AND `delete` = "0" LIMIT 1')
|
||||
);
|
||||
if (isset($zv['id'])) {
|
||||
if ($u->info['level'] > 5) {
|
||||
$row = 0;
|
||||
if (5 > $row) {
|
||||
$upd = mysql_query('UPDATE `stats` SET `dn` = "' . $zv['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
if (!$upd) {
|
||||
$re = 'Не удалось вступить в эту группу';
|
||||
unset($zv);
|
||||
} else {
|
||||
$u->info['dn'] = $zv['id'];
|
||||
}
|
||||
} else {
|
||||
$re = 'В группе нет места';
|
||||
unset($zv);
|
||||
}
|
||||
} else {
|
||||
$re = 'Вы не подходите по уровню';
|
||||
unset($zv);
|
||||
}
|
||||
} else {
|
||||
$re = 'Заявка не найдена';
|
||||
}
|
||||
} else {
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
} elseif (isset($_POST['leave']) && isset($zv['id']) && $g111 == 1) {
|
||||
if ($zv['uid'] == $u->info['id']) {
|
||||
//ставим в группу нового руководителя
|
||||
$ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "' . $zv['id'] . '" AND `id` != "' . $u->info['id'] . '" LIMIT 1'));
|
||||
if (isset($ld['id'])) {
|
||||
$zv['uid'] = $ld['id'];
|
||||
mysql_query('UPDATE `dungeon_zv` SET `uid` = "' . $zv['uid'] . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
} else {
|
||||
//удаляем группу целиком
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}
|
||||
} else {
|
||||
//просто выходим с группы
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}
|
||||
} elseif (isset($_POST['add']) && $u->info['level'] > 1 && $g111 == 1) {
|
||||
if ($u->info['dn'] == 0) {
|
||||
$lmn = 6;
|
||||
$lmx = 21;
|
||||
$tmx = 5;
|
||||
|
||||
//только своего уровня
|
||||
$lmn = $u->info['level'];
|
||||
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_zv`
|
||||
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
|
||||
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'",
|
||||
"'.mysql_real_escape_string($_POST['pass']).'",
|
||||
"'.mysql_real_escape_string($_POST['text']).'",
|
||||
"'.$lmn.'",
|
||||
"'.$lmx.'",
|
||||
"'.$tmx.'")');
|
||||
if($ins)
|
||||
{
|
||||
$u->info['dn'] = mysql_insert_id();
|
||||
$zv['id'] = $u->info['dn'];
|
||||
$zv['uid'] = $u->info['id'];
|
||||
mysql_query('UPDATE `stats` SET `dn` = "'.$u->info['dn'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$re = 'Вы успешно создали группу';
|
||||
}else{
|
||||
$re = 'Не удалось создать группу';
|
||||
}
|
||||
}else{
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
}
|
||||
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
|
||||
"' . mysql_real_escape_string($_POST['pass']) . '",
|
||||
"' . mysql_real_escape_string($_POST['text']) . '",
|
||||
"' . $lmn . '",
|
||||
"' . $lmx . '",
|
||||
"' . $tmx . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$u->info['dn'] = mysql_insert_id();
|
||||
$zv['id'] = $u->info['dn'];
|
||||
$zv['uid'] = $u->info['id'];
|
||||
mysql_query('UPDATE `stats` SET `dn` = "' . $u->info['dn'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$re = 'Вы успешно создали группу';
|
||||
} else {
|
||||
$re = 'Не удалось создать группу';
|
||||
}
|
||||
} else {
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
}
|
||||
|
||||
//Генерируем список групп
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `delete` = "0" AND `time` > "'.(time()-60*60*2).'"');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$dzs .= '<div style="padding:2px;">';
|
||||
if($u->info['dn']==0)
|
||||
{
|
||||
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />';
|
||||
}
|
||||
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> ';
|
||||
|
||||
$pus = ''; //группа
|
||||
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$pl['id'].'" LIMIT '.($pl['team_max']+1).'');
|
||||
while($pu = mysql_fetch_array($su))
|
||||
{
|
||||
$pus .= '<b>'.$pu['login'].'</b> ['.$pu['level'].']<a href="info/'.$pu['id'].'" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о '.$pu['login'].'"></a>';
|
||||
$pus .= ', ';
|
||||
}
|
||||
$pus = trim($pus,', ');
|
||||
|
||||
$dzs .= $pus;
|
||||
|
||||
if($pl['com']!='')
|
||||
{
|
||||
$dl = '';
|
||||
if(($moder['boi']==1 || $u->info['admin']>0) && $pl['dcom']==0)
|
||||
{
|
||||
$dl .= ' (<a href="?delcom='.$pl['id'].'&key='.$u->info['nextAct'].'&rnd='.$code.'">удалить комментарий</a>)';
|
||||
if(isset($_GET['delcom']) && $_GET['delcom']==$pl['id'] && $u->newAct($_GET['key'])==true)
|
||||
{
|
||||
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
||||
$pl['dcom'] = $u->info['id'];
|
||||
}
|
||||
}
|
||||
|
||||
$pl['com'] = htmlspecialchars($pl['com'],NULL);
|
||||
|
||||
if($pl['dcom']>0)
|
||||
{
|
||||
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
|
||||
}
|
||||
|
||||
if($pl['dcom']>0)
|
||||
{
|
||||
if($moder['boi']==1 || $u->info['admin']>0)
|
||||
{
|
||||
$pl['com'] = '<font color="red">'.$pl['com'].'</font>';
|
||||
}else{
|
||||
$pl['com'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>';
|
||||
}
|
||||
|
||||
$dzs .= '</div>';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
body
|
||||
{
|
||||
background-color:#E2E2E2;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat:no-repeat;background-position:top right;
|
||||
}
|
||||
</style>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div></td>
|
||||
<td width="200"><div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
//Генерируем список групп
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$dzs .= '<div style="padding:2px;">';
|
||||
if ($u->info['dn'] == 0) {
|
||||
$dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
|
||||
}
|
||||
$dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
|
||||
|
||||
$pus = ''; //группа
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
|
||||
);
|
||||
while ($pu = mysql_fetch_array($su)) {
|
||||
$pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu['login'] . '"></a>';
|
||||
$pus .= ', ';
|
||||
}
|
||||
$pus = trim($pus, ', ');
|
||||
|
||||
$dzs .= $pus;
|
||||
|
||||
if ($pl['com'] != '') {
|
||||
$dl = '';
|
||||
if (($moder['boi'] == 1 || $u->info['admin'] > 0) && $pl['dcom'] == 0) {
|
||||
$dl .= ' (<a href="?delcom=' . $pl['id'] . '&key=' . $u->info['nextAct'] . '&rnd=' . $code . '">удалить комментарий</a>)';
|
||||
if (isset($_GET['delcom']) && $_GET['delcom'] == $pl['id'] && $u->newAct($_GET['key']) == true) {
|
||||
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "' . $u->info['id'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
|
||||
$pl['dcom'] = $u->info['id'];
|
||||
}
|
||||
}
|
||||
|
||||
$pl['com'] = htmlspecialchars($pl['com'], null);
|
||||
|
||||
if ($pl['dcom'] > 0) {
|
||||
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
|
||||
}
|
||||
|
||||
if ($pl['dcom'] > 0) {
|
||||
if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
|
||||
$pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
|
||||
} else {
|
||||
$pl['com'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
|
||||
}
|
||||
|
||||
$dzs .= '</div>';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background-color: #E2E2E2;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top right;
|
||||
}
|
||||
</style>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
<td><table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" /></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.17&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.17',1); ?>">Вход в подземелье</a></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td>
|
||||
<div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div>
|
||||
</td>
|
||||
<td width="200">
|
||||
<div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap">
|
||||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.17&rnd=<?= $code; ?>';" title="<?php thisInfRm(
|
||||
'1.180.0.17', 1
|
||||
); ?>">Вход в подземелье</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
if($re!='')
|
||||
{
|
||||
echo '<font color="red"><b>'.$re.'</b></font><br>';
|
||||
}
|
||||
</table>
|
||||
<?php
|
||||
if ($re != '') {
|
||||
echo '<font color="red"><b>' . $re . '</b></font><br>';
|
||||
}
|
||||
|
||||
//отображаем
|
||||
if($dzs=='')
|
||||
{
|
||||
$dzs = '';
|
||||
}else{
|
||||
if(!isset($zv['id']))
|
||||
{
|
||||
if($g111==1)
|
||||
{
|
||||
$pr = '<input name="go" type="submit" value="Вступить в группу">';
|
||||
}
|
||||
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>';
|
||||
}
|
||||
$dzs .= '<hr>';
|
||||
}
|
||||
//отображаем
|
||||
if ($dzs == '') {
|
||||
$dzs = '';
|
||||
} else {
|
||||
if (!isset($zv['id'])) {
|
||||
if ($g111 == 1) {
|
||||
$pr = '<input name="go" type="submit" value="Вступить в группу">';
|
||||
}
|
||||
$dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
|
||||
}
|
||||
$dzs .= '<hr>';
|
||||
}
|
||||
|
||||
echo $dzs;
|
||||
if($g111 == 1)
|
||||
{
|
||||
if($u->info['dn']==0)
|
||||
{
|
||||
?>
|
||||
<table width="350" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
|
||||
<fieldset style='padding-left: 5; width=50%'>
|
||||
<legend><b> Группа </b> </legend>
|
||||
Комментарий
|
||||
<input type="text" name="text" maxlength="40" size="40" />
|
||||
<br />
|
||||
Пароль
|
||||
<input type="password" name="pass" maxlength="25" size="25" />
|
||||
<br />
|
||||
<input type="submit" name="add" value="Создать группу" />
|
||||
<br />
|
||||
</fieldset>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}else{
|
||||
$psh_start = '';
|
||||
if(isset($zv['id']))
|
||||
{
|
||||
if($zv['uid']==$u->info['id'])
|
||||
{
|
||||
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd='.$code.'\'"> ';
|
||||
}
|
||||
|
||||
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd='.$code.'">
|
||||
echo $dzs;
|
||||
if ($g111 == 1) {
|
||||
if ($u->info['dn'] == 0) {
|
||||
?>
|
||||
<table width="350" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
|
||||
<fieldset style='padding-left: 5; width=50%'>
|
||||
<legend><b> Группа </b></legend>
|
||||
Комментарий
|
||||
<input type="text" name="text" maxlength="40" size="40"/>
|
||||
<br/>
|
||||
Пароль
|
||||
<input type="password" name="pass" maxlength="25" size="25"/>
|
||||
<br/>
|
||||
<input type="submit" name="add" value="Создать группу"/>
|
||||
<br/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} else {
|
||||
$psh_start = '';
|
||||
if (isset($zv['id'])) {
|
||||
if ($zv['uid'] == $u->info['id']) {
|
||||
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd=' . $code . '\'"> ';
|
||||
}
|
||||
|
||||
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd=' . $code . '">
|
||||
<FIELDSET style=\'padding-left: 5; width=50%\'>
|
||||
<LEGEND><B> Группа </B> </LEGEND>
|
||||
'.$psh_start.'
|
||||
' . $psh_start . '
|
||||
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
|
||||
</FIELDSET>
|
||||
</FORM>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
}else{
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
<?php
|
||||
} else {
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
|
||||
7200 - time() + $g11['time']
|
||||
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
@ -47,12 +50,12 @@ if ($u->info['dn'] > 0) { // Если ты пошел гулять, так ид
|
||||
}
|
||||
|
||||
$dungeon_timeout = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh' . $dungeon['id'] . '" AND `time` > ' . (time() - 60 * 60 * 2) . ' LIMIT 1', 1); // Проверка - последний визит?
|
||||
// if($u->info['admin']>0) unset($dungeon_timeout); // $dungeon_timeout - задержка на посещение пещеры.
|
||||
|
||||
if (isset($dungeon_timeout['id'])) // Кто-то передумал и не пойдет в пещеру, так-как уже там был.
|
||||
{
|
||||
$dungeonGo = 0;
|
||||
if (isset($_GET['start'])) {
|
||||
$re = 'До следующего похода осталось еще: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']);
|
||||
$re = 'До следующего похода осталось еще: ' . Conversion::secondsToTimeout(60 * 60 * 2 - time() + $dungeon_timeout['time']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,13 +66,17 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
|
||||
if ($ig > 0) {
|
||||
//перемещаем игроков в пещеру
|
||||
//$u->addAction(time(),'psh'.$dun,'');
|
||||
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dungeon['id'] . '","Бездна","' . time() . '")');
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dungeon['id'] . '","Бездна","' . time() . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$zid = mysql_insert_id();
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
//обновляем пользователей
|
||||
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" LIMIT ' . ($zv['team_max'] + 1) . '');
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" LIMIT ' . ($zv['team_max'] + 1) . ''
|
||||
);
|
||||
$ids = '';
|
||||
|
||||
$map_locs = [];
|
||||
@ -100,17 +107,21 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
|
||||
while ($j < $xr2[1]) {
|
||||
$cord = $map_locs[rand(0, count($map_locs) - 1)];
|
||||
if ($cord[0] != 0 || $cord[1] != 0) {
|
||||
mysql_query('INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
|
||||
mysql_query(
|
||||
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
|
||||
"' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $cord[0] . '","' . $cord[1] . '","' . $u->info['id'] . '","' . $pl['id'] . '"
|
||||
)');
|
||||
)'
|
||||
);
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
} else {
|
||||
//Предмет находится в конкретном месте
|
||||
mysql_query('INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
|
||||
mysql_query(
|
||||
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
|
||||
"' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $xr2[2] . '","' . $xr2[3] . '","' . $u->info['id'] . '","' . $pl['id'] . '"
|
||||
)');
|
||||
)'
|
||||
);
|
||||
}
|
||||
//
|
||||
}
|
||||
@ -121,7 +132,9 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
|
||||
//
|
||||
}
|
||||
$ids = rtrim($ids, 'OR');
|
||||
$upd1 = mysql_query('UPDATE `stats` SET `s`="1",`res_s`="1",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
|
||||
$upd1 = mysql_query(
|
||||
'UPDATE `stats` SET `s`="1",`res_s`="1",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . ''
|
||||
);
|
||||
if ($upd1) {
|
||||
$upd2 = mysql_query('UPDATE `users` SET `room` = "374" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
|
||||
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dungeon['id']
|
||||
@ -141,7 +154,9 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
|
||||
}
|
||||
$vls = rtrim($vls, ',');
|
||||
if ($vls != '') {
|
||||
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . '');
|
||||
$ins2 = mysql_query(
|
||||
'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
|
||||
);
|
||||
} else {
|
||||
$ins2 = true;
|
||||
}
|
||||
@ -159,7 +174,9 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
|
||||
}
|
||||
} elseif (isset($_POST['go'], $_POST['goid']) && $dungeonGo == 1) {
|
||||
if (!isset($zv['id'])) {
|
||||
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string($_POST['goid']) . '" AND `delete` = "0" LIMIT 1'));
|
||||
$zv = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string($_POST['goid']) . '" AND `delete` = "0" LIMIT 1')
|
||||
);
|
||||
if (isset($zv['id']) && $u->info['dn'] == 0) {
|
||||
if ($zv['pass'] != '' && $_POST['pass_com'] != $zv['pass']) {
|
||||
$re = 'Вы ввели неправильный пароль';
|
||||
@ -212,14 +229,16 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
|
||||
}
|
||||
} elseif (isset($_POST['add']) && $u->info['level'] > 1 && $dungeonGo == 1) {
|
||||
if ($u->info['dn'] == 0) {
|
||||
$ins = mysql_query('INSERT INTO `dungeon_zv`
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_zv`
|
||||
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
|
||||
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dungeon['id'] . '",
|
||||
"' . mysql_real_escape_string($_POST['pass']) . '",
|
||||
"' . mysql_real_escape_string($_POST['text']) . '",
|
||||
"8",
|
||||
"21",
|
||||
"5")');
|
||||
"5")'
|
||||
);
|
||||
if ($ins) {
|
||||
$u->info['dn'] = mysql_insert_id();
|
||||
$zv['id'] = $u->info['dn'];
|
||||
@ -238,11 +257,15 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `dun` = "' . $dungeon['id'] . '" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$dungeonGroupList .= '<div style="padding:2px;">';
|
||||
if ($u->info['dn'] == 0) $dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
|
||||
if ($u->info['dn'] == 0) {
|
||||
$dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
|
||||
}
|
||||
$dungeonGroupList .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
|
||||
|
||||
$pus = ''; //группа
|
||||
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . '');
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
|
||||
);
|
||||
while ($pu = mysql_fetch_array($su)) {
|
||||
$pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu['login'] . '"></a>';
|
||||
$pus .= ', ';
|
||||
@ -252,7 +275,9 @@ while ($pl = mysql_fetch_array($sp)) {
|
||||
$dungeonGroupList .= $pus;
|
||||
unset($pus);
|
||||
|
||||
if ($pl['pass'] != '' && $u->info['dn'] == 0) $dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
|
||||
if ($pl['pass'] != '' && $u->info['dn'] == 0) {
|
||||
$dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
|
||||
}
|
||||
|
||||
if ($pl['com'] != '') {
|
||||
$dl = '';
|
||||
@ -286,79 +311,79 @@ while ($pl = mysql_fetch_array($sp)) {
|
||||
$dungeonGroupList .= '</div>';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background-color: #E2E2E2;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top right;
|
||||
}
|
||||
</style>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div>
|
||||
</td>
|
||||
<td width="200">
|
||||
<div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<?php if ($roomSection == 0) { ?>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop"
|
||||
onclick="location='main.php?loc=<?php if ($u->info['city'] == 'fallenearth') {
|
||||
echo '6.180.0.102';
|
||||
} else {
|
||||
echo '1.180.0.321';
|
||||
} ?>&rnd=<?= $code; ?>';" title="<?php
|
||||
if ($u->info['city'] == 'fallenearth') {
|
||||
thisInfRm('6.180.0.102', 1);
|
||||
} else {
|
||||
thisInfRm('1.180.0.321', 1);
|
||||
}
|
||||
?>"><?php
|
||||
<style>
|
||||
body {
|
||||
background-color: #E2E2E2;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top right;
|
||||
}
|
||||
</style>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div>
|
||||
</td>
|
||||
<td width="200">
|
||||
<div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<?php if ($roomSection == 0) { ?>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop"
|
||||
onclick="location='main.php?loc=<?php if ($u->info['city'] == 'fallenearth') {
|
||||
echo '6.180.0.102';
|
||||
} else {
|
||||
echo '1.180.0.321';
|
||||
} ?>&rnd=<?= $code; ?>';" title="<?php
|
||||
if ($u->info['city'] == 'fallenearth') {
|
||||
echo "Темный Портал";
|
||||
thisInfRm('6.180.0.102', 1);
|
||||
} else {
|
||||
echo "Магический Портал";
|
||||
thisInfRm('1.180.0.321', 1);
|
||||
}
|
||||
?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop"
|
||||
onclick="location='main.php?loc=1.180.0.373&rnd=<?= $code; ?>';"
|
||||
title="<?php thisInfRm('1.180.0.373', 1); ?>">Рыцарский магазин</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
?>"><?php
|
||||
if ($u->info['city'] == 'fallenearth') {
|
||||
echo "Темный Портал";
|
||||
} else {
|
||||
echo "Магический Портал";
|
||||
}
|
||||
?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop"
|
||||
onclick="location='main.php?loc=1.180.0.373&rnd=<?= $code; ?>';"
|
||||
title="<?php thisInfRm('1.180.0.373', 1); ?>">Рыцарский магазин</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php if ($roomSection == 1) { ?>
|
||||
<div align="center" style="float:right;width:100px;">
|
||||
<p>
|
||||
@ -377,7 +402,9 @@ while ($pl = mysql_fetch_array($sp)) {
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ($re != '') echo '<font color="red"><b>' . $re . '</b></font><br>';
|
||||
if ($re != '') {
|
||||
echo '<font color="red"><b>' . $re . '</b></font><br>';
|
||||
}
|
||||
|
||||
//отображаем
|
||||
if ($dungeonGroupList == '') {
|
||||
@ -411,11 +438,11 @@ if ($roomSection == 1) {
|
||||
echo '<font color="red"><b>Нельзя получать задания чаще одного раза в сутки</b></font><br>';
|
||||
} else {
|
||||
|
||||
//if($u->info['admin']>0){
|
||||
// $sp = mysql_query('SELECT * FROM `quests` WHERE `id` = "236" && `tr_date` LIKE "%tr_dn:=:'.$dun.'%"'); // Только дашку
|
||||
//} else {
|
||||
//if($u->info['admin']>0){
|
||||
// $sp = mysql_query('SELECT * FROM `quests` WHERE `id` = "236" && `tr_date` LIKE "%tr_dn:=:'.$dun.'%"'); // Только дашку
|
||||
//} else {
|
||||
$sp = mysql_query('SELECT * FROM `quests` WHERE `line` = ' . $dungeon['id'] . '');
|
||||
//}
|
||||
//}
|
||||
|
||||
$dq_add = [];
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
@ -462,7 +489,9 @@ if ($roomSection == 1) {
|
||||
$sp = mysql_query('SELECT * FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "' . $u->info['id'] . '" LIMIT 100');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . str_replace('start_quest', '', $pl['vars']) . '" LIMIT 1'));
|
||||
$qsee .= '<a href="main.php?rz=1&end_qst_now=' . $pq['id'] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a> <b>' . $pq['name'] . '</b><div style="padding-left:15px;padding-bottom:5px;border-bottom:1px solid grey"><small>' . $pq['info'] . '<br>' . $q->info($pq) . '</small></div><br>';
|
||||
$qsee .= '<a href="main.php?rz=1&end_qst_now=' . $pq['id'] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a> <b>' . $pq['name'] . '</b><div style="padding-left:15px;padding-bottom:5px;border-bottom:1px solid grey"><small>' . $pq['info'] . '<br>' . $q->info(
|
||||
$pq
|
||||
) . '</small></div><br>';
|
||||
$qx++;
|
||||
}
|
||||
|
||||
@ -482,7 +511,7 @@ if (!isset($hgo['id'])) {
|
||||
<input type='button' value='Получить задание' onclick='location="main.php?rz=1&add_quest=1"'/>
|
||||
<?php
|
||||
} else {
|
||||
echo 'Получить новое задание можно <b>' . date('d.m.Y H:i', $hgo['time'] + 60 * 60 * 24) . '</b> <font color="">( Через ' . $u->timeOut($hgo['time'] + 60 * 60 * 24 - time()) . ' )</font>';
|
||||
echo 'Получить новое задание можно <b>' . date('d.m.Y H:i', $hgo['time'] + 60 * 60 * 24) . '</b> ( Через ' . Conversion::secondsToTimeout($hgo['time'] + 60 * 60 * 24 - time()) . ' )';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
@ -522,7 +551,9 @@ if (!isset($hgo['id'])) {
|
||||
}
|
||||
mysql_query('UPDATE `rep` SET `add_stats` = "' . $u->rep['add_stats'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `ability` = "' . $u->info['ability'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
} else echo 'Недостаточно репутации.';
|
||||
} else {
|
||||
echo 'Недостаточно репутации.';
|
||||
}
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
@ -554,7 +585,9 @@ if (!isset($hgo['id'])) {
|
||||
}
|
||||
mysql_query('UPDATE `rep` SET `add_skills` = "' . $u->rep['add_skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `skills` = "' . $u->info['skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
} else echo 'Недостаточно репутации.';
|
||||
} else {
|
||||
echo 'Недостаточно репутации.';
|
||||
}
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
@ -586,7 +619,9 @@ if (!isset($hgo['id'])) {
|
||||
}
|
||||
mysql_query('UPDATE `rep` SET `add_money` = "' . $u->rep['add_money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
} else echo 'Недостаточно репутации.';
|
||||
} else {
|
||||
echo 'Недостаточно репутации.';
|
||||
}
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
@ -618,7 +653,9 @@ if (!isset($hgo['id'])) {
|
||||
}
|
||||
mysql_query('UPDATE `rep` SET `add_skills2` = "' . $u->rep['add_skills2'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `sskills` = "' . $u->info['sskills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
} else echo 'Недостаточно репутации.';
|
||||
} else {
|
||||
echo 'Недостаточно репутации.';
|
||||
}
|
||||
|
||||
// echo '<font color="red"><b>Вы успешно приобрели 1 особенность за 3000 ед. награды</b></font><br>';
|
||||
// $u->info['nskills'] += 1;
|
||||
@ -668,11 +705,19 @@ if (!isset($hgo['id'])) {
|
||||
</table>
|
||||
<p><span style="padding-left: 10px">
|
||||
<?php
|
||||
$chk = mysql_fetch_array(mysql_query('SELECT COUNT(`u`.`id`),SUM(`m`.`price1`) FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'));
|
||||
$chk = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT COUNT(`u`.`id`),SUM(`m`.`price1`) FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'
|
||||
)
|
||||
);
|
||||
if (isset($_GET['buy777']) && $chk[0] > 0) {
|
||||
$chk_cl = mysql_query('SELECT `u`.`id`,`m`.`price1` FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000');
|
||||
$chk_cl = mysql_query(
|
||||
'SELECT `u`.`id`,`m`.`price1` FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'
|
||||
);
|
||||
while ($chk_pl = mysql_fetch_array($chk_cl)) {
|
||||
if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) ;
|
||||
if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) {
|
||||
;
|
||||
}
|
||||
{
|
||||
$x++;
|
||||
$prc += $chk_pl['price1'];
|
||||
@ -750,7 +795,9 @@ if (!isset($hgo['id'])) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
|
||||
60 * 60 * 2 - time() + $dungeon_timeout['time']
|
||||
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -1,370 +1,357 @@
|
||||
<?php
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
if($u->room['file']=='entersnow')
|
||||
{
|
||||
if ($u->room['file'] == 'entersnow') {
|
||||
|
||||
$dun = 20; //для новичков 2-7 лвл
|
||||
$dun = 20; //для новичков 2-7 лвл
|
||||
|
||||
$er = '';
|
||||
$er = '';
|
||||
|
||||
$dzs = '';
|
||||
$dzs = '';
|
||||
|
||||
$g111 = 1;
|
||||
$g111 = 1;
|
||||
|
||||
$g11 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "psh1" AND `time`>'.(time()-7200).' LIMIT 1',1);
|
||||
$g11 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh1" AND `time`>' . (time() - 7200) . ' LIMIT 1', 1);
|
||||
|
||||
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "'.$u->info['align'].'" LIMIT 1'));
|
||||
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "' . $u->info['align'] . '" LIMIT 1'));
|
||||
|
||||
if($u->info['dn']>0)
|
||||
{
|
||||
$zv_dn = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="'.$u->info['dn'].'" AND `dun` = "'.$dun.'" AND `delete` = "0" LIMIT 1'));
|
||||
if(!isset($zv_dn['id']))
|
||||
{
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
}
|
||||
}
|
||||
if ($u->info['dn'] > 0) {
|
||||
$zv_dn = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="' . $u->info['dn'] . '" AND `dun` = "' . $dun . '" AND `delete` = "0" LIMIT 1'));
|
||||
if (!isset($zv_dn['id'])) {
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($g11['id']))
|
||||
{
|
||||
$g111 = 0;
|
||||
if(isset($_GET['start']))
|
||||
{
|
||||
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']);
|
||||
}
|
||||
}
|
||||
if(isset($_GET['start']) && $zv_dn['uid']==$u->info['id'] && $g111 == 1)
|
||||
{
|
||||
//начинаем поход
|
||||
//начинаем поход
|
||||
$ig = 1;
|
||||
if($ig>0)
|
||||
{
|
||||
//перемещаем игроков в пещеру
|
||||
//$u->addAction(time(),'psh1','');
|
||||
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("'.$zv_dn['city'].'","'.$zv_dn['uid'].'","'.$dun.'","Ледяная пещера","'.time().'")');
|
||||
if($ins)
|
||||
{
|
||||
$zid = mysql_insert_id();
|
||||
//обновляем пользователей
|
||||
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$zv_dn['id'].'" LIMIT '.($zv_dn['team_max']+1).'');
|
||||
$ids = '';
|
||||
while($pu = mysql_fetch_array($su))
|
||||
{
|
||||
$ids .= ' `id` = "'.$pu['id'].'" OR';
|
||||
$u->addAction(time(),'psh1','',$pu['id']);
|
||||
}
|
||||
$ids = rtrim($ids,'OR');
|
||||
$upd1 = mysql_query('UPDATE `stats` SET `x`="0",`y`="0",`dn` = "0",`dnow` = "'.$zid.'" WHERE '.$ids.' LIMIT '.($zv_dn['team_max']+1).'');
|
||||
if($upd1)
|
||||
{
|
||||
$upd2 = mysql_query('UPDATE `users` SET `room` = "304" WHERE '.$ids.' LIMIT '.($zv_dn['team_max']+1).'');
|
||||
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
|
||||
//Добавляем ботов
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "'.$dun.'"');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$vls .= '("'.$zid.'","'.$pl['id_bot'].'","'.$pl['colvo'].'","'.$pl['items'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['dialog'].'","'.$pl['items'].'"),';
|
||||
}
|
||||
$vls = rtrim($vls,',');
|
||||
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES '.$vls.'');
|
||||
//Добавляем обьекты
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "'.$dun.'"');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$vls .= '("'.$zid.'","'.$pl['name'].'","'.$pl['img'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['action'].'","'.$pl['type'].'","'.$pl['w'].'","'.$pl['h'].'","'.$pl['s'].'","'.$pl['s2'].'","'.$pl['os1'].'","'.$pl['os2'].'","'.$pl['os3'].'","'.$pl['os4'].'","'.$pl['type2'].'","'.$pl['top'].'","'.$pl['left'].'","'.$pl['date'].'"),';
|
||||
}
|
||||
$vls = rtrim($vls,',');
|
||||
if($vls!='')
|
||||
{
|
||||
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES '.$vls.'');
|
||||
}else{
|
||||
$ins2 = true;
|
||||
}
|
||||
if($upd2 && $ins1 && $ins2)
|
||||
{
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv_dn['id'].'" LIMIT 1');
|
||||
die('<script>location="main.php?rnd='.$code.'";</script>');
|
||||
}else{
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}else{
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}else{
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}
|
||||
}elseif(isset($_POST['go'],$_POST['goid']) && $g111==1)
|
||||
{
|
||||
if(!isset($zv_dn['id']))
|
||||
{
|
||||
$zv_dn = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `id`="'.mysql_real_escape_string($_POST['goid']).'" AND `dun` = "'.$dun.'" AND `delete` = "0" LIMIT 1'));
|
||||
if(isset($zv_dn['id']))
|
||||
{
|
||||
if($u->info['level']>5)
|
||||
{
|
||||
$row = 0;
|
||||
if(5>$row)
|
||||
{
|
||||
$upd = mysql_query('UPDATE `stats` SET `dn` = "'.$zv_dn['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
if(!$upd)
|
||||
{
|
||||
$re = 'Не удалось вступить в эту группу';
|
||||
unset($zv_dn);
|
||||
}else{
|
||||
$u->info['dn'] = $zv_dn['id'];
|
||||
}
|
||||
}else{
|
||||
$re = 'В группе нет места';
|
||||
unset($zv_dn);
|
||||
}
|
||||
}else{
|
||||
$re = 'Вы не подходите по уровню';
|
||||
unset($zv_dn);
|
||||
}
|
||||
}else{
|
||||
$re = 'Заявка не найдена';
|
||||
}
|
||||
}else{
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
}elseif(isset($_POST['leave']) && isset($zv_dn['id']) && $g111 == 1)
|
||||
{
|
||||
if($zv_dn['uid']==$u->info['id'])
|
||||
{
|
||||
//ставим в группу нового руководителя
|
||||
$ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "'.$zv_dn['id'].'" AND `id` != "'.$u->info['id'].'" LIMIT 1'));
|
||||
if(isset($ld['id']))
|
||||
{
|
||||
$zv_dn['uid'] = $ld['id'];
|
||||
mysql_query('UPDATE `dungeon_zv` SET `uid` = "'.$zv_dn['uid'].'" WHERE `id` = "'.$zv_dn['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv_dn);
|
||||
}else{
|
||||
//удаляем группу целиком
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv_dn['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv_dn);
|
||||
}
|
||||
}else{
|
||||
//просто выходим с группы
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv_dn);
|
||||
}
|
||||
}elseif(isset($_POST['add']) && $u->info['level']>1 && $g111 == 1)
|
||||
{
|
||||
if($u->info['dn']==0)
|
||||
{
|
||||
$lmn = 6;
|
||||
$lmx = 21;
|
||||
$tmx = 5;
|
||||
|
||||
//только своего уровня
|
||||
$lmn = $u->info['level'];
|
||||
|
||||
$ins = mysql_query('INSERT INTO `dungeon_zv`
|
||||
if (isset($g11['id'])) {
|
||||
$g111 = 0;
|
||||
if (isset($_GET['start'])) {
|
||||
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
|
||||
}
|
||||
}
|
||||
if (isset($_GET['start']) && $zv_dn['uid'] == $u->info['id'] && $g111 == 1) {
|
||||
//начинаем поход
|
||||
//начинаем поход
|
||||
$ig = 1;
|
||||
if ($ig > 0) {
|
||||
//перемещаем игроков в пещеру
|
||||
//$u->addAction(time(),'psh1','');
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("' . $zv_dn['city'] . '","' . $zv_dn['uid'] . '","' . $dun . '","Ледяная пещера","' . time() . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$zid = mysql_insert_id();
|
||||
//обновляем пользователей
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv_dn['id'] . '" LIMIT ' . ($zv_dn['team_max'] + 1) . ''
|
||||
);
|
||||
$ids = '';
|
||||
while ($pu = mysql_fetch_array($su)) {
|
||||
$ids .= ' `id` = "' . $pu['id'] . '" OR';
|
||||
$u->addAction(time(), 'psh1', '', $pu['id']);
|
||||
}
|
||||
$ids = rtrim($ids, 'OR');
|
||||
$upd1 = mysql_query('UPDATE `stats` SET `x`="0",`y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv_dn['team_max'] + 1) . '');
|
||||
if ($upd1) {
|
||||
$upd2 = mysql_query('UPDATE `users` SET `room` = "304" WHERE ' . $ids . ' LIMIT ' . ($zv_dn['team_max'] + 1) . '');
|
||||
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
|
||||
//Добавляем ботов
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "' . $dun . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '"),';
|
||||
}
|
||||
$vls = rtrim($vls, ',');
|
||||
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES ' . $vls . '');
|
||||
//Добавляем обьекты
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "' . $dun . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$vls .= '("' . $zid . '","' . $pl['name'] . '","' . $pl['img'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['action'] . '","' . $pl['type'] . '","' . $pl['w'] . '","' . $pl['h'] . '","' . $pl['s'] . '","' . $pl['s2'] . '","' . $pl['os1'] . '","' . $pl['os2'] . '","' . $pl['os3'] . '","' . $pl['os4'] . '","' . $pl['type2'] . '","' . $pl['top'] . '","' . $pl['left'] . '","' . $pl['date'] . '"),';
|
||||
}
|
||||
$vls = rtrim($vls, ',');
|
||||
if ($vls != '') {
|
||||
$ins2 = mysql_query(
|
||||
'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
|
||||
);
|
||||
} else {
|
||||
$ins2 = true;
|
||||
}
|
||||
if ($upd2 && $ins1 && $ins2) {
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv_dn['id'] . '" LIMIT 1');
|
||||
die('<script>location="main.php?rnd=' . $code . '";</script>');
|
||||
} else {
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
} else {
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
} else {
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}
|
||||
} elseif (isset($_POST['go'], $_POST['goid']) && $g111 == 1) {
|
||||
if (!isset($zv_dn['id'])) {
|
||||
$zv_dn = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string(
|
||||
$_POST['goid']
|
||||
) . '" AND `dun` = "' . $dun . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($zv_dn['id'])) {
|
||||
if ($u->info['level'] > 5) {
|
||||
$row = 0;
|
||||
if (5 > $row) {
|
||||
$upd = mysql_query('UPDATE `stats` SET `dn` = "' . $zv_dn['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
if (!$upd) {
|
||||
$re = 'Не удалось вступить в эту группу';
|
||||
unset($zv_dn);
|
||||
} else {
|
||||
$u->info['dn'] = $zv_dn['id'];
|
||||
}
|
||||
} else {
|
||||
$re = 'В группе нет места';
|
||||
unset($zv_dn);
|
||||
}
|
||||
} else {
|
||||
$re = 'Вы не подходите по уровню';
|
||||
unset($zv_dn);
|
||||
}
|
||||
} else {
|
||||
$re = 'Заявка не найдена';
|
||||
}
|
||||
} else {
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
} elseif (isset($_POST['leave']) && isset($zv_dn['id']) && $g111 == 1) {
|
||||
if ($zv_dn['uid'] == $u->info['id']) {
|
||||
//ставим в группу нового руководителя
|
||||
$ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "' . $zv_dn['id'] . '" AND `id` != "' . $u->info['id'] . '" LIMIT 1'));
|
||||
if (isset($ld['id'])) {
|
||||
$zv_dn['uid'] = $ld['id'];
|
||||
mysql_query('UPDATE `dungeon_zv` SET `uid` = "' . $zv_dn['uid'] . '" WHERE `id` = "' . $zv_dn['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv_dn);
|
||||
} else {
|
||||
//удаляем группу целиком
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv_dn['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv_dn);
|
||||
}
|
||||
} else {
|
||||
//просто выходим с группы
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv_dn);
|
||||
}
|
||||
} elseif (isset($_POST['add']) && $u->info['level'] > 1 && $g111 == 1) {
|
||||
if ($u->info['dn'] == 0) {
|
||||
$lmn = 6;
|
||||
$lmx = 21;
|
||||
$tmx = 5;
|
||||
|
||||
//только своего уровня
|
||||
$lmn = $u->info['level'];
|
||||
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_zv`
|
||||
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
|
||||
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'",
|
||||
"'.mysql_real_escape_string($_POST['pass']).'",
|
||||
"'.mysql_real_escape_string($_POST['text']).'",
|
||||
"'.$lmn.'",
|
||||
"'.$lmx.'",
|
||||
"'.$tmx.'")');
|
||||
if($ins)
|
||||
{
|
||||
$u->info['dn'] = mysql_insert_id();
|
||||
$zv_dn['id'] = $u->info['dn'];
|
||||
$zv_dn['uid'] = $u->info['id'];
|
||||
mysql_query('UPDATE `stats` SET `dn` = "'.$u->info['dn'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$re = 'Вы успешно создали группу';
|
||||
}else{
|
||||
$re = 'Не удалось создать группу';
|
||||
}
|
||||
}else{
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
}
|
||||
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
|
||||
"' . mysql_real_escape_string($_POST['pass']) . '",
|
||||
"' . mysql_real_escape_string($_POST['text']) . '",
|
||||
"' . $lmn . '",
|
||||
"' . $lmx . '",
|
||||
"' . $tmx . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$u->info['dn'] = mysql_insert_id();
|
||||
$zv_dn['id'] = $u->info['dn'];
|
||||
$zv_dn['uid'] = $u->info['id'];
|
||||
mysql_query('UPDATE `stats` SET `dn` = "' . $u->info['dn'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$re = 'Вы успешно создали группу';
|
||||
} else {
|
||||
$re = 'Не удалось создать группу';
|
||||
}
|
||||
} else {
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
}
|
||||
|
||||
//Генерируем список групп
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `dun` = "'.$dun.'" AND `delete` = "0" AND `time` > "'.(time()-60*60*2).'"');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$dzs .= '<div style="padding:2px;">';
|
||||
if($u->info['dn']==0)
|
||||
{
|
||||
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />';
|
||||
}
|
||||
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> ';
|
||||
|
||||
$pus = ''; //группа
|
||||
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$pl['id'].'" LIMIT '.($pl['team_max']+1).'');
|
||||
while($pu = mysql_fetch_array($su))
|
||||
{
|
||||
$pus .= '<b>'.$pu['login'].'</b> ['.$pu['level'].']<a href="info/'.$pu['id'].'" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о '.$pu['login'].'"></a>';
|
||||
$pus .= ', ';
|
||||
}
|
||||
$pus = trim($pus,', ');
|
||||
|
||||
$dzs .= $pus;
|
||||
|
||||
if($pl['com']!='')
|
||||
{
|
||||
$dl = '';
|
||||
if(($moder['boi']==1 || $u->info['admin']>0) && $pl['dcom']==0)
|
||||
{
|
||||
$dl .= ' (<a href="?delcom='.$pl['id'].'&key='.$u->info['nextAct'].'&rnd='.$code.'">удалить комментарий</a>)';
|
||||
if(isset($_GET['delcom']) && $_GET['delcom']==$pl['id'] && $u->newAct($_GET['key'])==true)
|
||||
{
|
||||
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
||||
$pl['dcom'] = $u->info['id'];
|
||||
}
|
||||
}
|
||||
|
||||
$pl['com'] = htmlspecialchars($pl['com'],NULL);
|
||||
|
||||
if($pl['dcom']>0)
|
||||
{
|
||||
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
|
||||
}
|
||||
|
||||
if($pl['dcom']>0)
|
||||
{
|
||||
if($moder['boi']==1 || $u->info['admin']>0)
|
||||
{
|
||||
$pl['com'] = '<font color="red">'.$pl['com'].'</font>';
|
||||
}else{
|
||||
$pl['com'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>';
|
||||
}
|
||||
|
||||
$dzs .= '</div>';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
body
|
||||
{
|
||||
background-color:#E2E2E2;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat:no-repeat;background-position:top right;
|
||||
}
|
||||
</style>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div></td>
|
||||
<td width="200"><div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
//Генерируем список групп
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `dun` = "' . $dun . '" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$dzs .= '<div style="padding:2px;">';
|
||||
if ($u->info['dn'] == 0) {
|
||||
$dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
|
||||
}
|
||||
$dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
|
||||
|
||||
$pus = ''; //группа
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
|
||||
);
|
||||
while ($pu = mysql_fetch_array($su)) {
|
||||
$pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu['login'] . '"></a>';
|
||||
$pus .= ', ';
|
||||
}
|
||||
$pus = trim($pus, ', ');
|
||||
|
||||
$dzs .= $pus;
|
||||
|
||||
if ($pl['com'] != '') {
|
||||
$dl = '';
|
||||
if (($moder['boi'] == 1 || $u->info['admin'] > 0) && $pl['dcom'] == 0) {
|
||||
$dl .= ' (<a href="?delcom=' . $pl['id'] . '&key=' . $u->info['nextAct'] . '&rnd=' . $code . '">удалить комментарий</a>)';
|
||||
if (isset($_GET['delcom']) && $_GET['delcom'] == $pl['id'] && $u->newAct($_GET['key']) == true) {
|
||||
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "' . $u->info['id'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
|
||||
$pl['dcom'] = $u->info['id'];
|
||||
}
|
||||
}
|
||||
|
||||
$pl['com'] = htmlspecialchars($pl['com'], null);
|
||||
|
||||
if ($pl['dcom'] > 0) {
|
||||
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
|
||||
}
|
||||
|
||||
if ($pl['dcom'] > 0) {
|
||||
if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
|
||||
$pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
|
||||
} else {
|
||||
$pl['com'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
|
||||
}
|
||||
|
||||
$dzs .= '</div>';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background-color: #E2E2E2;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top right;
|
||||
}
|
||||
</style>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
<td><table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" /></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.208&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.208',1); ?>">Елка</a></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td>
|
||||
<div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div>
|
||||
</td>
|
||||
<td width="200">
|
||||
<div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap">
|
||||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.208&rnd=<?= $code; ?>';" title="<?php thisInfRm(
|
||||
'1.180.0.208', 1
|
||||
); ?>">Елка</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
if($re!='')
|
||||
{
|
||||
echo '<font color="red"><b>'.$re.'</b></font><br>';
|
||||
}
|
||||
</table>
|
||||
<?php
|
||||
if ($re != '') {
|
||||
echo '<font color="red"><b>' . $re . '</b></font><br>';
|
||||
}
|
||||
|
||||
//отображаем
|
||||
if($dzs=='')
|
||||
{
|
||||
$dzs = '';
|
||||
}else{
|
||||
if(!isset($zv_dn['id']))
|
||||
{
|
||||
if($g111==1)
|
||||
{
|
||||
$pr = '<input name="go" type="submit" value="Вступить в группу">';
|
||||
}
|
||||
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>';
|
||||
}
|
||||
$dzs .= '<hr>';
|
||||
}
|
||||
//отображаем
|
||||
if ($dzs == '') {
|
||||
$dzs = '';
|
||||
} else {
|
||||
if (!isset($zv_dn['id'])) {
|
||||
if ($g111 == 1) {
|
||||
$pr = '<input name="go" type="submit" value="Вступить в группу">';
|
||||
}
|
||||
$dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
|
||||
}
|
||||
$dzs .= '<hr>';
|
||||
}
|
||||
|
||||
echo $dzs;
|
||||
if($g111 == 1)
|
||||
{
|
||||
if($u->info['dn']==0)
|
||||
{
|
||||
?>
|
||||
<table width="350" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
|
||||
<fieldset style='padding-left: 5; width=50%'>
|
||||
<legend><b> Группа </b> </legend>
|
||||
Комментарий
|
||||
<input type="text" name="text" maxlength="40" size="40" />
|
||||
<br />
|
||||
Пароль
|
||||
<input type="password" name="pass" maxlength="25" size="25" />
|
||||
<br />
|
||||
<input type="submit" name="add" value="Создать группу" />
|
||||
<br />
|
||||
</fieldset>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}else{
|
||||
$psh_start = '';
|
||||
if(isset($zv_dn['id']))
|
||||
{
|
||||
if($zv_dn['uid']==$u->info['id'])
|
||||
{
|
||||
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd='.$code.'\'"> ';
|
||||
}
|
||||
|
||||
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd='.$code.'">
|
||||
echo $dzs;
|
||||
if ($g111 == 1) {
|
||||
if ($u->info['dn'] == 0) {
|
||||
?>
|
||||
<table width="350" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
|
||||
<fieldset style='padding-left: 5; width=50%'>
|
||||
<legend><b> Группа </b></legend>
|
||||
Комментарий
|
||||
<input type="text" name="text" maxlength="40" size="40"/>
|
||||
<br/>
|
||||
Пароль
|
||||
<input type="password" name="pass" maxlength="25" size="25"/>
|
||||
<br/>
|
||||
<input type="submit" name="add" value="Создать группу"/>
|
||||
<br/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} else {
|
||||
$psh_start = '';
|
||||
if (isset($zv_dn['id'])) {
|
||||
if ($zv_dn['uid'] == $u->info['id']) {
|
||||
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd=' . $code . '\'"> ';
|
||||
}
|
||||
|
||||
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd=' . $code . '">
|
||||
<FIELDSET style=\'padding-left: 5; width=50%\'>
|
||||
<LEGEND><B> Группа </B> </LEGEND>
|
||||
'.$psh_start.'
|
||||
' . $psh_start . '
|
||||
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
|
||||
</FIELDSET>
|
||||
</FORM>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
}else{
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
<?php
|
||||
} else {
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
|
||||
7200 - time() + $g11['time']
|
||||
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -1,5 +1,10 @@
|
||||
<?php
|
||||
if (!defined('GAME')) die();
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
if ($u->room['file'] == 'house_belaun') {
|
||||
$notify = ['type' => '', 'text' => '']; // Ошибки или Уведомления здесь!
|
||||
$action = '';
|
||||
@ -292,7 +297,9 @@ if ($u->room['file'] == 'house_belaun') {
|
||||
</div>
|
||||
<div class="Content">
|
||||
<?php
|
||||
if ($notify['text'] != '') echo '<div class="notification ' . $notify['type'] . '">' . $notify['text'] . '</div>';
|
||||
if ($notify['text'] != '') {
|
||||
echo '<div class="notification ' . $notify['type'] . '">' . $notify['text'] . '</div>';
|
||||
}
|
||||
if ($action == "dialog") {
|
||||
|
||||
}
|
||||
@ -305,12 +312,16 @@ if ($u->room['file'] == 'house_belaun') {
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "all" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$dungeonGroupList .= '<div style="padding:2px;">';
|
||||
if ($u->info['dn'] == 0) $dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
|
||||
if ($u->info['dn'] == 0) {
|
||||
$dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
|
||||
}
|
||||
$dungeonGroupList .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
|
||||
$dungeonGroupList .= '<span><img title="' . $dunname[$pl['dun']][1] . '" style="vertical-align:bottom" src="//img.new-combats.tech/i/city_ico2/' . $dunname[$pl['dun']][0] . '.gif" /></span> ';
|
||||
|
||||
$pus = ''; //группа
|
||||
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . '');
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
|
||||
);
|
||||
while ($pu = mysql_fetch_array($su)) {
|
||||
$pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_' . $pu['city'] . '.gif" title="Инф. о ' . $pu['login'] . '"></a>';
|
||||
$pus .= ', ';
|
||||
@ -320,7 +331,9 @@ if ($u->room['file'] == 'house_belaun') {
|
||||
$dungeonGroupList .= $pus;
|
||||
unset($pus);
|
||||
|
||||
if ($pl['pass'] != '' && $u->info['dn'] == 0) $dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
|
||||
if ($pl['pass'] != '' && $u->info['dn'] == 0) {
|
||||
$dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
|
||||
}
|
||||
|
||||
if ($pl['com'] != '') {
|
||||
$dl = '';
|
||||
@ -427,7 +440,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
$error = ''; // Собираем ошибки.
|
||||
$dungeonGroupList = ''; // Сюда помещаем список Групп.
|
||||
$dungeonGo = 1; // По умолчанию, мы идем в пещеру.
|
||||
$dungeon = mysql_fetch_assoc(mysql_query('SELECT `id` as room, city, `dungeon_room` as d_room, city, `shop`, `dungeon_id` as id, `dungeon_name` as name, quest FROM `dungeon_room` WHERE `id`="' . $u->room['id'] . '" LIMIT 1'));
|
||||
$dungeon = mysql_fetch_assoc(
|
||||
mysql_query(
|
||||
'SELECT `id` as room, city, `dungeon_room` as d_room, city, `shop`, `dungeon_id` as id, `dungeon_name` as name, quest FROM `dungeon_room` WHERE `id`="' . $u->room['id'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
|
||||
$dunname = [
|
||||
12 => ['capitalcity', 'Пещера Тысячи Проклятий'],
|
||||
@ -439,9 +456,13 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
//106 => array('devilscity','Туманные Низины')
|
||||
];
|
||||
|
||||
if (isset($_GET['rz']) && $dungeon['quest'] == 1) $roomSection = 1; // Получаем Задание
|
||||
else $roomSection = 0; // Собираем группу для похода
|
||||
//if( $u->info['admin'] > 0 ) var_info($dungeon);
|
||||
if (isset($_GET['rz']) && $dungeon['quest'] == 1) {
|
||||
$roomSection = 1;
|
||||
} // Получаем Задание
|
||||
else {
|
||||
$roomSection = 0;
|
||||
} // Собираем группу для похода
|
||||
//if( $u->info['admin'] > 0 ) var_info($dungeon);
|
||||
|
||||
$all_dungeon = mysql_query('SELECT `city` FROM `dungeon_room` WHERE `city` IS NOT NULL AND `active`=1 ');
|
||||
while ($t = mysql_fetch_array($all_dungeon)) {
|
||||
@ -459,28 +480,32 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
|
||||
$dungeon_timeout = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh0" AND `time` > ' . (time() - 60 * 60 * 2) . ' LIMIT 1', 1);
|
||||
|
||||
if ($u->info['admin'] > 0) unset($dungeon_timeout); // $dungeon_timeout - задержка на посещение пещеры.
|
||||
if ($u->info['admin'] > 0) {
|
||||
unset($dungeon_timeout);
|
||||
} // $dungeon_timeout - задержка на посещение пещеры.
|
||||
if (isset($dungeon_timeout['id'])) // Кто-то передумал и не пойдет в пещеру, так-как уже там был.
|
||||
{
|
||||
$dungeonGo = 0;
|
||||
if (isset($_GET['start'])) {
|
||||
$error = 'До следующего похода осталось еще: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']);
|
||||
$error = 'До следующего похода осталось еще: ' . Conversion::secondsToTimeout(60 * 60 * 2 - time() + $dungeon_timeout['time']);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
|
||||
$ig = 1;
|
||||
if ($ig > 0) { //перемещаем игроков в пещеру
|
||||
//$u->addAction(time(),'psh'.$dun,'');
|
||||
|
||||
//
|
||||
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $zv['dun'] . '","' . $dunname[$zv['dun']][1] . '","' . time() . '")');
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $zv['dun'] . '","' . $dunname[$zv['dun']][1] . '","' . time() . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$zid = mysql_insert_id();
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
//обновляем пользователей
|
||||
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" /*LIMIT ' . ($zv['team_max'] + 1) . '*/');
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" /*LIMIT ' . ($zv['team_max'] + 1) . '*/'
|
||||
);
|
||||
$ids = '';
|
||||
|
||||
$map_locs = [];
|
||||
@ -500,9 +525,13 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
$u->addAction(time(), 'psh0', $pu['id'], $pu['id']);
|
||||
}
|
||||
//Добавляем квестовые обьекты для персонажей
|
||||
$sp = mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `room` = ' . $dungeon['room'] . ' AND `vars` LIKE "%start_quest%" AND `vals` = "go" LIMIT 100');
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `room` = ' . $dungeon['room'] . ' AND `vars` LIKE "%start_quest%" AND `vals` = "go" LIMIT 100'
|
||||
);
|
||||
while ($pl2 = mysql_fetch_array($sp)) {
|
||||
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . (str_replace('start_quest', '', $pl2['vars'])) . '" AND `line` = "' . $dungeon['id'] . '" LIMIT 1'));
|
||||
$pl = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `quests` WHERE `id` = "' . (str_replace('start_quest', '', $pl2['vars'])) . '" AND `line` = "' . $dungeon['id'] . '" LIMIT 1')
|
||||
);
|
||||
if (isset($pl['id'])) {
|
||||
$act = explode(',', $pl['act_date']);
|
||||
$i = 0;
|
||||
@ -523,27 +552,39 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
$ml_arr = [];
|
||||
foreach ($map_locs as $ml) { // tk_itm_fromY tk_itm_toY - отсеиваем позицию для дропа предметов.
|
||||
if ((isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY'])) or (!isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY']))) {
|
||||
if ($ml[1] > $actdate['tk_itm_fromY'] && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml;
|
||||
elseif (!isset($actdate['tk_itm_fromY']) && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml;
|
||||
} else $ml_arr[] = $ml;
|
||||
if ($ml[1] > $actdate['tk_itm_fromY'] && $actdate['tk_itm_toY'] > $ml[1]) {
|
||||
$ml_arr[] = $ml;
|
||||
} elseif (!isset($actdate['tk_itm_fromY']) && $actdate['tk_itm_toY'] > $ml[1]) {
|
||||
$ml_arr[] = $ml;
|
||||
}
|
||||
} else {
|
||||
$ml_arr[] = $ml;
|
||||
}
|
||||
}
|
||||
if (isset($ml_arr) && count($ml_arr) == 0) {
|
||||
$ml_arr = $map_locs;
|
||||
}
|
||||
if (isset($ml_arr) && count($ml_arr) == 0) $ml_arr = $map_locs;
|
||||
//Добавляем обьект для юзера
|
||||
$j = 0;
|
||||
while ($j < $xr2[1]) {
|
||||
$cord = $ml_arr[rand(0, count($ml_arr) - 1)];
|
||||
if ($cord[0] != 0 || $cord[1] != 0) {
|
||||
mysql_query('INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
|
||||
"' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $cord[0] . '","' . $cord[1] . '","' . $u->info['id'] . '","' . $pl['id'] . '"
|
||||
)');
|
||||
mysql_query(
|
||||
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
|
||||
"' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time(
|
||||
) . '","' . $cord[0] . '","' . $cord[1] . '","' . $u->info['id'] . '","' . $pl['id'] . '"
|
||||
)'
|
||||
);
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
} else {
|
||||
//Предмет находится в конкретном месте
|
||||
mysql_query('INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
|
||||
mysql_query(
|
||||
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
|
||||
"' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $xr2[2] . '","' . $xr2[3] . '","' . $u->info['id'] . '","' . $pl['id'] . '"
|
||||
)');
|
||||
)'
|
||||
);
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
@ -554,7 +595,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
}
|
||||
$ids = rtrim($ids, 'OR');
|
||||
$snew = 1;
|
||||
$upd1 = mysql_query('UPDATE `stats` SET `s`="' . $snew . '",`res_s`="1",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
|
||||
$upd1 = mysql_query(
|
||||
'UPDATE `stats` SET `s`="' . $snew . '",`res_s`="1",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . ''
|
||||
);
|
||||
if ($upd1) {
|
||||
$upd2 = mysql_query('UPDATE `users` SET `room` = "405" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
|
||||
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dungeon['id']
|
||||
@ -566,7 +609,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
$bots = explode(',', $pl['bot_group']);
|
||||
$pl['id_bot'] = (int)$bots[rand(0, count($bots) - 1)];
|
||||
}
|
||||
if ($pl['id_bot'] > 0) $vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '","' . $pl['go_bot'] . '","' . $pl['noatack'] . '"),';
|
||||
if ($pl['id_bot'] > 0) {
|
||||
$vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '","' . $pl['go_bot'] . '","' . $pl['noatack'] . '"),';
|
||||
}
|
||||
unset($bots);
|
||||
}
|
||||
$vls = rtrim($vls, ',');
|
||||
@ -692,7 +737,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
//
|
||||
$vls = rtrim($vls, ',');
|
||||
if ($vls != '') {
|
||||
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . '');
|
||||
$ins2 = mysql_query(
|
||||
'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
|
||||
);
|
||||
} else {
|
||||
$ins2 = true;
|
||||
}
|
||||
@ -839,14 +886,16 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
$dun5 = 12; //ПТП
|
||||
}
|
||||
//
|
||||
$ins = mysql_query('INSERT INTO `dungeon_zv`
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_zv`
|
||||
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
|
||||
("all","' . time() . '","' . $u->info['id'] . '","' . $dun5 . '",
|
||||
"' . mysql_real_escape_string($_POST['pass']) . '",
|
||||
"' . mysql_real_escape_string($_POST['text']) . '",
|
||||
"8",
|
||||
"21",
|
||||
"5")');
|
||||
"5")'
|
||||
);
|
||||
if ($ins) {
|
||||
$u->info['dn'] = mysql_insert_id();
|
||||
$zv['id'] = $u->info['dn'];
|
||||
@ -861,17 +910,21 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
}
|
||||
}
|
||||
|
||||
//Генерируем список групп
|
||||
//Генерируем список групп
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "all" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$dungeonGroupList .= '<div style="padding:2px;">';
|
||||
if ($u->info['dn'] == 0) $dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
|
||||
if ($u->info['dn'] == 0) {
|
||||
$dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
|
||||
}
|
||||
$dungeonGroupList .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
|
||||
|
||||
$dungeonGroupList .= '<span><img title="' . $dunname[$pl['dun']][1] . '" style="vertical-align:bottom" src="//img.new-combats.tech/i/city_ico2/' . $dunname[$pl['dun']][0] . '.gif" /></span> ';
|
||||
|
||||
$pus = ''; //группа
|
||||
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . '');
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
|
||||
);
|
||||
while ($pu = mysql_fetch_array($su)) {
|
||||
$pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_' . $pu['city'] . '.gif" title="Инф. о ' . $pu['login'] . '"></a>';
|
||||
$pus .= ', ';
|
||||
@ -881,7 +934,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
$dungeonGroupList .= $pus;
|
||||
unset($pus);
|
||||
|
||||
if ($pl['pass'] != '' && $u->info['dn'] == 0) $dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
|
||||
if ($pl['pass'] != '' && $u->info['dn'] == 0) {
|
||||
$dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
|
||||
}
|
||||
|
||||
if ($pl['com'] != '') {
|
||||
$dl = '';
|
||||
@ -1011,7 +1066,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
?></a></td>
|
||||
</tr>
|
||||
<?php if (isset($dungeon['shop']) && $dungeon['shop'] > 0) {
|
||||
$shop = mysql_fetch_array(mysql_query('SELECT `id` as shop_id, `code` FROM `room` WHERE `id` = "' . $dungeon['shop'] . '" LIMIT 1'));
|
||||
$shop = mysql_fetch_array(
|
||||
mysql_query('SELECT `id` as shop_id, `code` FROM `room` WHERE `id` = "' . $dungeon['shop'] . '" LIMIT 1')
|
||||
);
|
||||
if (isset($shop['code'])) {
|
||||
?>
|
||||
<tr>
|
||||
@ -1057,9 +1114,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ($error != '') echo '<font color="red"><b>' . $error . '</b></font><br>';
|
||||
if ($error != '') {
|
||||
echo '<font color="red"><b>' . $error . '</b></font><br>';
|
||||
}
|
||||
|
||||
//отображаем
|
||||
//отображаем
|
||||
if ($dungeonGroupList == '') {
|
||||
$dungeonGroupList = '';
|
||||
} else {
|
||||
@ -1089,14 +1148,20 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
<form autocomplete="off" action='/main.php' method="post" name="F1" id="F1">
|
||||
<?php
|
||||
$qsee = '';
|
||||
$hgo = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_' . $dungeon['city'] . '" LIMIT 1', 1);
|
||||
$hgo = $u->testAction(
|
||||
'`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_' . $dungeon['city'] . '" LIMIT 1', 1
|
||||
);
|
||||
$qc = 0; // Quest Count
|
||||
//Генерируем список текущих квестов
|
||||
$sp = mysql_query('SELECT * FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "' . $u->info['id'] . '" LIMIT 100');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
if ($pl['room'] == $u->info['room']) {
|
||||
$pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . str_replace('start_quest', '', $pl['vars']) . '" LIMIT 1'));
|
||||
if ($q->questCheckEnd($pq) == 1) $qsee2 = '<input style="margin-top:6px;" type="button" value="Завершить задание" onclick="location=\'main.php?rz=1&endQuest=' . $pl['id'] . '\'">'; else $qsee2 = '';
|
||||
if ($q->questCheckEnd($pq) == 1) {
|
||||
$qsee2 = '<input style="margin-top:6px;" type="button" value="Завершить задание" onclick="location=\'main.php?rz=1&endQuest=' . $pl['id'] . '\'">';
|
||||
} else {
|
||||
$qsee2 = '';
|
||||
}
|
||||
|
||||
$qsee .= '
|
||||
<a href="main.php?rz=1&end_qst_now=' . $pq['id'] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a>
|
||||
@ -1175,7 +1240,7 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
<input type='button' value='Получить задание' onclick='location="main.php?rz=1&add_quest=1"'/>
|
||||
<?php
|
||||
} else {
|
||||
echo 'Получить новое задание можно <b>' . date('d.m.Y H:i', $hgo['time'] + 60 * 60 * 24) . '</b> <font color="">( Через ' . $u->timeOut($hgo['time'] + 60 * 60 * 24 - time()) . ' )</font>';
|
||||
echo 'Получить новое задание можно <b>' . date('d.m.Y H:i', $hgo['time'] + 60 * 60 * 24) . '</b> ( Через ' . Conversion::secondsToTimeout($hgo['time'] + 60 * 60 * 24 - time()) . ' )';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
@ -1202,7 +1267,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
||||
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
||||
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
if ($r) $rt = 1; else $rt = 0;
|
||||
if ($r) {
|
||||
$rt = 1;
|
||||
} else {
|
||||
$rt = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($rt == 1) {
|
||||
@ -1214,7 +1283,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
} else echo 'Недостаточно репутации.';
|
||||
} else {
|
||||
echo 'Недостаточно репутации.';
|
||||
}
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
@ -1233,7 +1304,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
||||
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
||||
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
if ($r) $rt = 1; else $rt = 0;
|
||||
if ($r) {
|
||||
$rt = 1;
|
||||
} else {
|
||||
$rt = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($rt == 1) {
|
||||
@ -1245,7 +1320,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
} else echo 'Недостаточно репутации.';
|
||||
} else {
|
||||
echo 'Недостаточно репутации.';
|
||||
}
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
@ -1264,7 +1341,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
||||
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
||||
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
if ($r) $rt = 1; else $rt = 0;
|
||||
if ($r) {
|
||||
$rt = 1;
|
||||
} else {
|
||||
$rt = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($rt == 1) {
|
||||
@ -1276,7 +1357,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
} else echo 'Недостаточно репутации.';
|
||||
} else {
|
||||
echo 'Недостаточно репутации.';
|
||||
}
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
@ -1295,7 +1378,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
||||
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
||||
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
if ($r) $rt = 1; else $rt = 0;
|
||||
if ($r) {
|
||||
$rt = 1;
|
||||
} else {
|
||||
$rt = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($rt == 1) {
|
||||
@ -1307,7 +1394,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
}
|
||||
} else echo 'Недостаточно репутации.';
|
||||
} else {
|
||||
echo 'Недостаточно репутации.';
|
||||
}
|
||||
|
||||
} else {
|
||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||
@ -1350,15 +1439,23 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
</table>
|
||||
</fieldset>
|
||||
<?php
|
||||
$chk = mysql_fetch_array(mysql_query('SELECT COUNT(`u`.`id`),SUM(`m`.`price1`) FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'));
|
||||
$chk = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT COUNT(`u`.`id`),SUM(`m`.`price1`) FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'
|
||||
)
|
||||
);
|
||||
if (isset($_GET['buy777']) && $chk[0] > 0) {
|
||||
?>
|
||||
<fieldset style='margin-top:15px;'>
|
||||
<p><span style="padding-left: 10px">
|
||||
<?php
|
||||
$chk_cl = mysql_query('SELECT `u`.`id`,`m`.`price1` FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000');
|
||||
$chk_cl = mysql_query(
|
||||
'SELECT `u`.`id`,`m`.`price1` FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'
|
||||
);
|
||||
while ($chk_pl = mysql_fetch_array($chk_cl)) {
|
||||
if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) ;
|
||||
if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) {
|
||||
;
|
||||
}
|
||||
{
|
||||
$x++;
|
||||
$prc += $chk_pl['price1'];
|
||||
@ -1468,7 +1565,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
|
||||
60 * 60 * 2 - time() + $dungeon_timeout['time']
|
||||
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,391 +1,385 @@
|
||||
<?php
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
if($u->room['file']=='penter')
|
||||
{
|
||||
if ($u->room['file'] == 'penter') {
|
||||
|
||||
$dun = 1; //для новичков 2-7 лвл
|
||||
$dun = 1; //для новичков 2-7 лвл
|
||||
|
||||
$er = '';
|
||||
$er = '';
|
||||
|
||||
$dzs = '';
|
||||
$dzs = '';
|
||||
|
||||
$g111 = 1;
|
||||
$g11 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "psh1" AND `time`>'.(time()-7200).' LIMIT 1',1);
|
||||
$g111 = 1;
|
||||
$g11 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh1" AND `time`>' . (time() - 7200) . ' LIMIT 1', 1);
|
||||
|
||||
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "'.$u->info['align'].'" LIMIT 1'));
|
||||
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "' . $u->info['align'] . '" LIMIT 1'));
|
||||
|
||||
|
||||
if ($u->info['dn'] > 0) {
|
||||
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="' . $u->info['dn'] . '" AND `delete` = "0" LIMIT 1'));
|
||||
if (!isset($zv['id'])) {
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if($u->info['dn']>0)
|
||||
{
|
||||
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="'.$u->info['dn'].'" AND `delete` = "0" LIMIT 1'));
|
||||
if(!isset($zv['id']))
|
||||
{
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
}
|
||||
}
|
||||
if (isset($g11['id'])) {
|
||||
$g111 = 0;
|
||||
if (isset($_GET['start'])) {
|
||||
$re = 'Поход в пещеры запрещен. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
|
||||
}
|
||||
}
|
||||
if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $g111 == 1) {
|
||||
//начинаем поход
|
||||
//начинаем поход
|
||||
$ig = 1;
|
||||
if ($ig > 0) {
|
||||
//перемещаем игроков в пещеру
|
||||
//$u->addAction(time(),'psh1','');
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dun . '","Канализация","' . time() . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$zid = mysql_insert_id();
|
||||
//обновляем пользователей
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" LIMIT ' . ($zv['team_max'] + 1) . ''
|
||||
);
|
||||
$ids = '';
|
||||
while ($pu = mysql_fetch_array($su)) {
|
||||
$ids .= ' `id` = "' . $pu['id'] . '" OR';
|
||||
$u->addAction(time(), 'psh1', '', $pu['id']);
|
||||
}
|
||||
$ids = rtrim($ids, 'OR');
|
||||
$upd1 = mysql_query('UPDATE `stats` SET `x`="0",`y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
|
||||
if ($upd1) {
|
||||
$upd2 = mysql_query('UPDATE `users` SET `room` = "189" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
|
||||
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
|
||||
//Добавляем ботов
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "' . $dun . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '"),';
|
||||
}
|
||||
$vls = rtrim($vls, ',');
|
||||
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES ' . $vls . '');
|
||||
//Добавляем обьекты
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "' . $dun . '"');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$vls .= '("' . $zid . '","' . $pl['name'] . '","' . $pl['img'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['action'] . '","' . $pl['type'] . '","' . $pl['w'] . '","' . $pl['h'] . '","' . $pl['s'] . '","' . $pl['s2'] . '","' . $pl['os1'] . '","' . $pl['os2'] . '","' . $pl['os3'] . '","' . $pl['os4'] . '","' . $pl['type2'] . '","' . $pl['top'] . '","' . $pl['left'] . '","' . $pl['date'] . '"),';
|
||||
}
|
||||
$vls = rtrim($vls, ',');
|
||||
$ins2 = mysql_query(
|
||||
'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
|
||||
);
|
||||
|
||||
if(isset($g11['id']))
|
||||
{
|
||||
$g111 = 0;
|
||||
if(isset($_GET['start']))
|
||||
{
|
||||
$re = 'Поход в пещеры запрещен. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']);
|
||||
}
|
||||
}
|
||||
if(isset($_GET['start']) && $zv['uid']==$u->info['id'] && $g111 == 1)
|
||||
{
|
||||
//начинаем поход
|
||||
//начинаем поход
|
||||
$ig = 1;
|
||||
if($ig>0)
|
||||
{
|
||||
//перемещаем игроков в пещеру
|
||||
//$u->addAction(time(),'psh1','');
|
||||
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
|
||||
VALUES ("'.$zv['city'].'","'.$zv['uid'].'","'.$dun.'","Канализация","'.time().'")');
|
||||
if($ins)
|
||||
{
|
||||
$zid = mysql_insert_id();
|
||||
//обновляем пользователей
|
||||
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$zv['id'].'" LIMIT '.($zv['team_max']+1).'');
|
||||
$ids = '';
|
||||
while($pu = mysql_fetch_array($su))
|
||||
{
|
||||
$ids .= ' `id` = "'.$pu['id'].'" OR';
|
||||
$u->addAction(time(),'psh1','',$pu['id']);
|
||||
}
|
||||
$ids = rtrim($ids,'OR');
|
||||
$upd1 = mysql_query('UPDATE `stats` SET `x`="0",`y`="0",`dn` = "0",`dnow` = "'.$zid.'" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).'');
|
||||
if($upd1)
|
||||
{
|
||||
$upd2 = mysql_query('UPDATE `users` SET `room` = "189" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).'');
|
||||
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
|
||||
//Добавляем ботов
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "'.$dun.'"');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$vls .= '("'.$zid.'","'.$pl['id_bot'].'","'.$pl['colvo'].'","'.$pl['items'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['dialog'].'","'.$pl['items'].'"),';
|
||||
}
|
||||
$vls = rtrim($vls,',');
|
||||
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES '.$vls.'');
|
||||
//Добавляем обьекты
|
||||
$vls = '';
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "'.$dun.'"');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$vls .= '("'.$zid.'","'.$pl['name'].'","'.$pl['img'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['action'].'","'.$pl['type'].'","'.$pl['w'].'","'.$pl['h'].'","'.$pl['s'].'","'.$pl['s2'].'","'.$pl['os1'].'","'.$pl['os2'].'","'.$pl['os3'].'","'.$pl['os4'].'","'.$pl['type2'].'","'.$pl['top'].'","'.$pl['left'].'","'.$pl['date'].'"),';
|
||||
}
|
||||
$vls = rtrim($vls,',');
|
||||
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES '.$vls.'');
|
||||
|
||||
if($upd2 && $ins1 && $ins2)
|
||||
{
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
|
||||
die('<script>location="main.php?rnd='.$code.'";</script>');
|
||||
}else{
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}else{
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}else{
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}
|
||||
}elseif(isset($_POST['go'],$_POST['goid']) && $g111==1)
|
||||
{
|
||||
if(!isset($zv['id']))
|
||||
{
|
||||
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `id`="'.mysql_real_escape_string($_POST['goid']).'" AND `delete` = "0" LIMIT 1'));
|
||||
if(isset($zv['id']))
|
||||
{
|
||||
if($zv['lvlmin']==$u->info['level'] || $u->info['admin']>0)
|
||||
{
|
||||
$row = 0;
|
||||
if($zv['team_max']>$row || $u->info['admin']>0)
|
||||
{
|
||||
$upd = mysql_query('UPDATE `stats` SET `dn` = "'.$zv['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
if(!$upd)
|
||||
{
|
||||
$re = 'Не удалось вступить в эту группу';
|
||||
unset($zv);
|
||||
}else{
|
||||
$u->info['dn'] = $zv['id'];
|
||||
}
|
||||
}else{
|
||||
$re = 'В группе нет места';
|
||||
unset($zv);
|
||||
}
|
||||
}else{
|
||||
$re = 'Вы не подходите по уровню';
|
||||
unset($zv);
|
||||
}
|
||||
}else{
|
||||
$re = 'Заявка не найдена';
|
||||
}
|
||||
}else{
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
}elseif(isset($_POST['leave']) && isset($zv['id']) && $g111 == 1)
|
||||
{
|
||||
if($zv['uid']==$u->info['id'])
|
||||
{
|
||||
//ставим в группу нового руководителя
|
||||
$ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "'.$zv['id'].'" AND `id` != "'.$u->info['id'].'" LIMIT 1'));
|
||||
if(isset($ld['id']))
|
||||
{
|
||||
$zv['uid'] = $ld['id'];
|
||||
mysql_query('UPDATE `dungeon_zv` SET `uid` = "'.$zv['uid'].'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}else{
|
||||
//удаляем группу целиком
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}
|
||||
}else{
|
||||
//просто выходим с группы
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}
|
||||
}elseif(isset($_POST['add']) && $u->info['level']>1 && $g111 == 1)
|
||||
{
|
||||
if($u->info['dn']==0)
|
||||
{
|
||||
$lmn = $u->info['level']-1;
|
||||
$lmx = $u->info['level']+1;
|
||||
$tmx = 0;
|
||||
|
||||
if($lmn<2){ $lmn = 2; }
|
||||
if($lmn>7){ $lmn = 7; }
|
||||
if($lmx<2){ $lmx = 2; }
|
||||
if($lmx>7){ $lmx = 7; }
|
||||
|
||||
if($u->info['level']>=6 && $u->info['admin']==0)
|
||||
{
|
||||
$tmx = 0;
|
||||
}else{
|
||||
$tmx = 5;
|
||||
}
|
||||
|
||||
//только своего уровня
|
||||
$lmn = $u->info['level'];
|
||||
|
||||
$ins = mysql_query('INSERT INTO `dungeon_zv`
|
||||
if ($upd2 && $ins1 && $ins2) {
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
die('<script>location="main.php?rnd=' . $code . '";</script>');
|
||||
} else {
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
} else {
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
} else {
|
||||
$re = 'Ошибка перехода в подземелье...';
|
||||
}
|
||||
}
|
||||
} elseif (isset($_POST['go'], $_POST['goid']) && $g111 == 1) {
|
||||
if (!isset($zv['id'])) {
|
||||
$zv = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string($_POST['goid']) . '" AND `delete` = "0" LIMIT 1')
|
||||
);
|
||||
if (isset($zv['id'])) {
|
||||
if ($zv['lvlmin'] == $u->info['level'] || $u->info['admin'] > 0) {
|
||||
$row = 0;
|
||||
if ($zv['team_max'] > $row || $u->info['admin'] > 0) {
|
||||
$upd = mysql_query('UPDATE `stats` SET `dn` = "' . $zv['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
if (!$upd) {
|
||||
$re = 'Не удалось вступить в эту группу';
|
||||
unset($zv);
|
||||
} else {
|
||||
$u->info['dn'] = $zv['id'];
|
||||
}
|
||||
} else {
|
||||
$re = 'В группе нет места';
|
||||
unset($zv);
|
||||
}
|
||||
} else {
|
||||
$re = 'Вы не подходите по уровню';
|
||||
unset($zv);
|
||||
}
|
||||
} else {
|
||||
$re = 'Заявка не найдена';
|
||||
}
|
||||
} else {
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
} elseif (isset($_POST['leave']) && isset($zv['id']) && $g111 == 1) {
|
||||
if ($zv['uid'] == $u->info['id']) {
|
||||
//ставим в группу нового руководителя
|
||||
$ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "' . $zv['id'] . '" AND `id` != "' . $u->info['id'] . '" LIMIT 1'));
|
||||
if (isset($ld['id'])) {
|
||||
$zv['uid'] = $ld['id'];
|
||||
mysql_query('UPDATE `dungeon_zv` SET `uid` = "' . $zv['uid'] . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
} else {
|
||||
//удаляем группу целиком
|
||||
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}
|
||||
} else {
|
||||
//просто выходим с группы
|
||||
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$u->info['dn'] = 0;
|
||||
unset($zv);
|
||||
}
|
||||
} elseif (isset($_POST['add']) && $u->info['level'] > 1 && $g111 == 1) {
|
||||
if ($u->info['dn'] == 0) {
|
||||
$lmn = $u->info['level'] - 1;
|
||||
$lmx = $u->info['level'] + 1;
|
||||
$tmx = 0;
|
||||
|
||||
if ($lmn < 2) {
|
||||
$lmn = 2;
|
||||
}
|
||||
if ($lmn > 7) {
|
||||
$lmn = 7;
|
||||
}
|
||||
if ($lmx < 2) {
|
||||
$lmx = 2;
|
||||
}
|
||||
if ($lmx > 7) {
|
||||
$lmx = 7;
|
||||
}
|
||||
|
||||
if ($u->info['level'] >= 6 && $u->info['admin'] == 0) {
|
||||
$tmx = 0;
|
||||
} else {
|
||||
$tmx = 5;
|
||||
}
|
||||
|
||||
//только своего уровня
|
||||
$lmn = $u->info['level'];
|
||||
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_zv`
|
||||
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
|
||||
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'",
|
||||
"'.mysql_real_escape_string($_POST['pass']).'",
|
||||
"'.mysql_real_escape_string($_POST['text']).'",
|
||||
"'.$lmn.'",
|
||||
"'.$lmx.'",
|
||||
"'.$tmx.'")');
|
||||
if($ins)
|
||||
{
|
||||
$u->info['dn'] = mysql_insert_id();
|
||||
$zv['id'] = $u->info['dn'];
|
||||
$zv['uid'] = $u->info['id'];
|
||||
mysql_query('UPDATE `stats` SET `dn` = "'.$u->info['dn'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$re = 'Вы успешно создали группу';
|
||||
}else{
|
||||
$re = 'Не удалось создать группу';
|
||||
}
|
||||
}else{
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
}
|
||||
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
|
||||
"' . mysql_real_escape_string($_POST['pass']) . '",
|
||||
"' . mysql_real_escape_string($_POST['text']) . '",
|
||||
"' . $lmn . '",
|
||||
"' . $lmx . '",
|
||||
"' . $tmx . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$u->info['dn'] = mysql_insert_id();
|
||||
$zv['id'] = $u->info['dn'];
|
||||
$zv['uid'] = $u->info['id'];
|
||||
mysql_query('UPDATE `stats` SET `dn` = "' . $u->info['dn'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
$re = 'Вы успешно создали группу';
|
||||
} else {
|
||||
$re = 'Не удалось создать группу';
|
||||
}
|
||||
} else {
|
||||
$re = 'Вы уже находитесь в группе';
|
||||
}
|
||||
}
|
||||
|
||||
//Генерируем список групп
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `lvlmin` = "'.$u->info['level'].'" AND `delete` = "0" AND `time` > "'.(time()-60*60*2).'"');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$dzs .= '<div style="padding:2px;">';
|
||||
if($u->info['dn']==0)
|
||||
{
|
||||
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />';
|
||||
}
|
||||
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> ';
|
||||
|
||||
$pus = ''; //группа
|
||||
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$pl['id'].'" LIMIT '.($pl['team_max']+1).'');
|
||||
while($pu = mysql_fetch_array($su))
|
||||
{
|
||||
$pus .= '<b>'.$pu['login'].'</b> ['.$pu['level'].']<a href="info/'.$pu['id'].'" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о '.$pu['login'].'"></a>';
|
||||
$pus .= ', ';
|
||||
}
|
||||
$pus = trim($pus,', ');
|
||||
|
||||
$dzs .= $pus;
|
||||
|
||||
if($pl['com']!='')
|
||||
{
|
||||
$dl = '';
|
||||
if(($moder['boi']==1 || $u->info['admin']>0) && $pl['dcom']==0)
|
||||
{
|
||||
$dl .= ' (<a href="?delcom='.$pl['id'].'&key='.$u->info['nextAct'].'&rnd='.$code.'">удалить комментарий</a>)';
|
||||
if(isset($_GET['delcom']) && $_GET['delcom']==$pl['id'] && $u->newAct($_GET['key'])==true)
|
||||
{
|
||||
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
||||
$pl['dcom'] = $u->info['id'];
|
||||
}
|
||||
}
|
||||
|
||||
$pl['com'] = htmlspecialchars($pl['com'],NULL);
|
||||
|
||||
if($pl['dcom']>0)
|
||||
{
|
||||
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
|
||||
}
|
||||
|
||||
if($pl['dcom']>0)
|
||||
{
|
||||
if($moder['boi']==1 || $u->info['admin']>0)
|
||||
{
|
||||
$pl['com'] = '<font color="red">'.$pl['com'].'</font>';
|
||||
}else{
|
||||
$pl['com'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>';
|
||||
}
|
||||
|
||||
$dzs .= '</div>';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
body
|
||||
{
|
||||
background-color:#E2E2E2;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat:no-repeat;background-position:top right;
|
||||
}
|
||||
</style>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div></td>
|
||||
<td width="200"><div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
//Генерируем список групп
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `lvlmin` = "' . $u->info['level'] . '" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$dzs .= '<div style="padding:2px;">';
|
||||
if ($u->info['dn'] == 0) {
|
||||
$dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
|
||||
}
|
||||
$dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
|
||||
|
||||
$pus = ''; //группа
|
||||
$su = mysql_query(
|
||||
'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
|
||||
);
|
||||
while ($pu = mysql_fetch_array($su)) {
|
||||
$pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu['login'] . '"></a>';
|
||||
$pus .= ', ';
|
||||
}
|
||||
$pus = trim($pus, ', ');
|
||||
|
||||
$dzs .= $pus;
|
||||
|
||||
if ($pl['com'] != '') {
|
||||
$dl = '';
|
||||
if (($moder['boi'] == 1 || $u->info['admin'] > 0) && $pl['dcom'] == 0) {
|
||||
$dl .= ' (<a href="?delcom=' . $pl['id'] . '&key=' . $u->info['nextAct'] . '&rnd=' . $code . '">удалить комментарий</a>)';
|
||||
if (isset($_GET['delcom']) && $_GET['delcom'] == $pl['id'] && $u->newAct($_GET['key']) == true) {
|
||||
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "' . $u->info['id'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
|
||||
$pl['dcom'] = $u->info['id'];
|
||||
}
|
||||
}
|
||||
|
||||
$pl['com'] = htmlspecialchars($pl['com'], null);
|
||||
|
||||
if ($pl['dcom'] > 0) {
|
||||
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
|
||||
}
|
||||
|
||||
if ($pl['dcom'] > 0) {
|
||||
if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
|
||||
$pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
|
||||
} else {
|
||||
$pl['com'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
|
||||
}
|
||||
|
||||
$dzs .= '</div>';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background-color: #E2E2E2;
|
||||
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top right;
|
||||
}
|
||||
</style>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
<td><table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" /></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=<?php if($u->info['city']=='fallenearth'){ echo '6.180.0.102'; } else {echo '1.180.0.321'; }?>&rnd=<?= $code; ?>';" title="<?php
|
||||
if($u->info['city']=='fallenearth'){
|
||||
thisInfRm('6.180.0.102',1);
|
||||
}else {
|
||||
thisInfRm('1.180.0.321',1);
|
||||
}
|
||||
?>"><?php
|
||||
if($u->info['city']=='fallenearth'){
|
||||
echo "Темный Портал";
|
||||
}else {
|
||||
echo "Магический Портал";
|
||||
}
|
||||
?></a></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td>
|
||||
<div style="padding-left:0px;" align="center">
|
||||
<h3><?= $u->room['name']; ?></h3>
|
||||
</div>
|
||||
</td>
|
||||
<td width="200">
|
||||
<div align="right">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td><!-- -->
|
||||
<?= $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
||||
<td bgcolor="#D3D3D3" nowrap="nowrap">
|
||||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=<?php if ($u->info['city'] == 'fallenearth') {
|
||||
echo '6.180.0.102';
|
||||
} else {
|
||||
echo '1.180.0.321';
|
||||
} ?>&rnd=<?= $code; ?>';" title="<?php
|
||||
if ($u->info['city'] == 'fallenearth') {
|
||||
thisInfRm('6.180.0.102', 1);
|
||||
} else {
|
||||
thisInfRm('1.180.0.321', 1);
|
||||
}
|
||||
?>"><?php
|
||||
if ($u->info['city'] == 'fallenearth') {
|
||||
echo "Темный Портал";
|
||||
} else {
|
||||
echo "Магический Портал";
|
||||
}
|
||||
?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
if($re!='')
|
||||
{
|
||||
echo '<font color="red"><b>'.$re.'</b></font><br>';
|
||||
}
|
||||
</table>
|
||||
<?php
|
||||
if ($re != '') {
|
||||
echo '<font color="red"><b>' . $re . '</b></font><br>';
|
||||
}
|
||||
|
||||
//отображаем
|
||||
if($dzs=='')
|
||||
{
|
||||
$dzs = '';
|
||||
}else{
|
||||
if(!isset($zv['id']))
|
||||
{
|
||||
if($g111==1)
|
||||
{
|
||||
$pr = '<input name="go" type="submit" value="Вступить в группу">';
|
||||
}
|
||||
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>';
|
||||
}
|
||||
$dzs .= '<hr>';
|
||||
}
|
||||
//отображаем
|
||||
if ($dzs == '') {
|
||||
$dzs = '';
|
||||
} else {
|
||||
if (!isset($zv['id'])) {
|
||||
if ($g111 == 1) {
|
||||
$pr = '<input name="go" type="submit" value="Вступить в группу">';
|
||||
}
|
||||
$dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
|
||||
}
|
||||
$dzs .= '<hr>';
|
||||
}
|
||||
|
||||
echo $dzs;
|
||||
if($g111 == 1)
|
||||
{
|
||||
if($u->info['dn']==0)
|
||||
{
|
||||
?>
|
||||
<table width="350" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<form autocomplete="off" id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
|
||||
<fieldset style='padding-left: 5; width=50%'>
|
||||
<legend><b> Группа </b> </legend>
|
||||
Комментарий
|
||||
<input type="text" name="text" maxlength="40" size="40" />
|
||||
<br />
|
||||
Пароль
|
||||
<input type="password" name="pass" maxlength="25" size="25" />
|
||||
<br />
|
||||
<input type="submit" name="add" value="Создать группу" />
|
||||
<br />
|
||||
</fieldset>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}else{
|
||||
$psh_start = '';
|
||||
if(isset($zv['id']))
|
||||
{
|
||||
if($zv['uid']==$u->info['id'])
|
||||
{
|
||||
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd='.$code.'\'"> ';
|
||||
}
|
||||
|
||||
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd='.$code.'">
|
||||
echo $dzs;
|
||||
if ($g111 == 1) {
|
||||
if ($u->info['dn'] == 0) {
|
||||
?>
|
||||
<table width="350" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<form autocomplete="off" id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
|
||||
<fieldset style='padding-left: 5; width=50%'>
|
||||
<legend><b> Группа </b></legend>
|
||||
Комментарий
|
||||
<input type="text" name="text" maxlength="40" size="40"/>
|
||||
<br/>
|
||||
Пароль
|
||||
<input type="password" name="pass" maxlength="25" size="25"/>
|
||||
<br/>
|
||||
<input type="submit" name="add" value="Создать группу"/>
|
||||
<br/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} else {
|
||||
$psh_start = '';
|
||||
if (isset($zv['id'])) {
|
||||
if ($zv['uid'] == $u->info['id']) {
|
||||
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd=' . $code . '\'"> ';
|
||||
}
|
||||
|
||||
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd=' . $code . '">
|
||||
<FIELDSET style=\'padding-left: 5; width=50%\'>
|
||||
<LEGEND><B> Группа </B> </LEGEND>
|
||||
'.$psh_start.'
|
||||
' . $psh_start . '
|
||||
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
|
||||
</FIELDSET>
|
||||
</FORM>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
}else{
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
<?php
|
||||
} else {
|
||||
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
|
||||
7200 - time() + $g11['time']
|
||||
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Helper\Conversion;
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
@ -446,14 +449,14 @@ if (!isset($u->info['noreal']) && $c['bonussocial'] == true) {
|
||||
$gd = 0;
|
||||
$zdml = 3600; //час
|
||||
if (isset($mcf['id']) && $mcf['time'] > time() - $zdml) {
|
||||
echo '<hr><center><font color="red">Нельзя подтверждать эл.почту так часто. Осталось ' . $u->timeOut(
|
||||
echo '<hr><center><span style="color: red; ">Нельзя подтверждать эл.почту так часто. Осталось ' . Conversion::secondsToTimeout(
|
||||
$mcf['time'] + $zdml - time()
|
||||
) . '</font></center>';
|
||||
) . '</span></center>';
|
||||
$gd = 1;
|
||||
} elseif (!preg_match(
|
||||
'#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s]+\.+[a-z]{2,6}))$#si', $_GET['confmail']
|
||||
)) {
|
||||
echo '<hr><center><font color="red">Вы указали явно ошибочный E-mail.</font></center>';
|
||||
echo '<hr><center><span style="color: red; ">Вы указали явно ошибочный E-mail.</span></center>';
|
||||
$gd = 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user