diff --git a/zayavka.php b/zayavka.php
index 991bd89..1acdab9 100644
--- a/zayavka.php
+++ b/zayavka.php
@@ -86,9 +86,11 @@ class zayavka
return $zay;
}
- function addteam($team, $id, $zay, $r)
+ function addteam($team, $r)
{
global $user;
+ $id = $_SESSION['uid'];
+ $zay = $_REQUEST['gocombat'];
$owntravma = db::c()->query('SELECT `id`, `type` FROM `effects` WHERE (`type` = 12 OR `type` = 13) AND `owner` = ?i', $id)->fetch_assoc();
$z = $this->getlist($r, null, $zay);
if ($owntravma) {
@@ -680,7 +682,7 @@ if (!empty($_POST['open'])) {
if ($user['klan'] != $toper['klan'] || $user['klan'] == '') {
AddChatSystem('Внимание!' . nick::id($user['id'])->short() . ' принял заявку, нужно принять вызов или отказать.');
}
- echo $zay->addteam(2, $user['id'], $_REQUEST['gocombat'], 2);
+ echo $zay->addteam(2, 2);
echo "
Ожидаем подтверждения боя. ";
}
if (!empty($_POST['gofi'])) {
@@ -887,10 +889,10 @@ if (!empty($_POST['open'])) {
echo "";
if (($_POST['confirm1']) && $_POST['gocombat'] && !$user['zayavka']) {
- echo $zay->addteam(1, $user['id'], $_REQUEST['gocombat'], 4);
+ echo $zay->addteam(1, 4);
}
if (($_POST['confirm2']) && $_POST['gocombat'] && !$user['zayavka']) {
- echo $zay->addteam(2, $user['id'], $_REQUEST['gocombat'], 4);
+ echo $zay->addteam(2, 4);
}
if ($_POST['open'] && !$user['zayavka']) {
@@ -1047,7 +1049,7 @@ if (!empty($_POST['open'])) {
echo $zay->addzayavka($_POST['startime2'] / 60, $_POST['timeout'], 99, 99, $_POST['k'], $min1, $min1, $max1, $max1, $_POST['cmt'], $user['id'], 5, 0, $blood);
}
if (!empty($_POST['confirm2'])) {
- echo "" . $zay->addteam(1, $user['id'], $_REQUEST['gocombat'], 5) . "";
+ echo "" . $zay->addteam(1, 5) . "";
}
echo '