missing return statements fix

This commit is contained in:
lopar 2019-06-21 20:42:46 +03:00
parent 3f9ff97d34
commit 5180206248

View File

@ -179,7 +179,7 @@ class zayavka
$z[$zay]['team' . $team][] = ''; $z[$zay]['team' . $team][] = '';
if (mysql_query("UPDATE `users`, `zayavka` SET `users`.`zayavka` = {$zay}, `zayavka`.`team{$team}` = '" . implode(";", $z[$zay]['team' . $team]) . "" . $id . ";' WHERE `users`.`id` = {$id} AND `users`.`zayavka` = 0 AND `zayavka`.`id` = {$zay}")) { if (mysql_query("UPDATE `users`, `zayavka` SET `users`.`zayavka` = {$zay}, `zayavka`.`team{$team}` = '" . implode(";", $z[$zay]['team' . $team]) . "" . $id . ";' WHERE `users`.`id` = {$id} AND `users`.`zayavka` = 0 AND `zayavka`.`id` = {$zay}")) {
return "Вы приняли заявку на бой."; return "Вы приняли заявку на бой.";
} } else return 'addteam(): database error!';
} }
function delteam($team = 2, $id, $zay, $r) function delteam($team = 2, $id, $zay, $r)
@ -197,7 +197,7 @@ class zayavka
if (mysql_query("UPDATE `users`, `zayavka` SET `users`.`zayavka` = '0', `zayavka`.`team{$team}` = '{$teams}' WHERE `users`.`id` = {$id} AND `zayavka`.`id` = {$zay};")) { if (mysql_query("UPDATE `users`, `zayavka` SET `users`.`zayavka` = '0', `zayavka`.`team{$team}` = '{$teams}' WHERE `users`.`id` = {$id} AND `zayavka`.`id` = {$zay};")) {
return "Вы отозвали запрос"; return "Вы отозвали запрос";
} } else return 'delteam(): database error!';
} }
function addzayavka($start, $timeout, $t1c, $t2c, $type, $t1min, $t2min, $t1max, $t2max, $coment, $creator, $level, $stavka, $blood = 0) function addzayavka($start, $timeout, $t1c, $t2c, $type, $t1min, $t2min, $t1max, $t2max, $coment, $creator, $level, $stavka, $blood = 0)
@ -278,7 +278,7 @@ class zayavka
} }
} }
return 'Вы отозвали заявку.'; return 'Вы отозвали заявку.';
} } else return 'delzayavka(): database error!';
} }
function showfiz($row) function showfiz($row)
@ -667,7 +667,6 @@ if ($_POST['open']) {
<?php if ($_REQUEST['logs'] == null): ?> <?php if ($_REQUEST['logs'] == null): ?>
location.href = 'zayavka.php?level=<?= $_REQUEST['level'] ?>&tklogs=<?= $_REQUEST['tklogs'] ?>&logs=<?= $_REQUEST['logs'] ?>'; location.href = 'zayavka.php?level=<?= $_REQUEST['level'] ?>&tklogs=<?= $_REQUEST['tklogs'] ?>&logs=<?= $_REQUEST['logs'] ?>';
<? endif; ?> <? endif; ?>
timerID = setTimeout("refreshPeriodic()", 30000);
} }
timerID = setTimeout("refreshPeriodic()", 30000); timerID = setTimeout("refreshPeriodic()", 30000);