diff --git a/functions.php b/functions.php index ace319f..857e0e6 100644 --- a/functions.php +++ b/functions.php @@ -402,9 +402,6 @@ function battlewithbot($b, $name = '', $time = 3, $blood = 1, $group = 1, $battl } } return $battleid; - if (!$noredir) { - die(""); - } } @@ -708,11 +705,11 @@ function takeshopitem($item, $table = "shop", $present = '', $onlyonetrip = '', $rec1['ecost'] = 0; } - if ($fields) { - foreach ($fields as $k => $v) { - $rec1[$k] = $v; - } - } +// if ($fields) { +// foreach ($fields as $k => $v) { +// $rec1[$k] = $v; +// } +// } $sql = ""; while ($rec = mysql_fetch_assoc($r)) { @@ -774,15 +771,15 @@ function bank_check($item, $table = "shop", $present = '', $onlyonetrip = '', $f $rec1['cost'] = $cost; } - if ($fields) { - foreach ($fields as $k => $v) { - $rec1[$k] = $v; - } - } +// if ($fields) { +// foreach ($fields as $k => $v) { +// $rec1[$k] = $v; +// } +// } $sql = ""; while ($rec = mysql_fetch_assoc($r)) { - if (!@$flds[$rec['Field']]) continue; + if (!$flds[$rec['Field']]) continue; if ($rec['Field'] == "id" || $rec['Field'] == "prototype" || $rec['Field'] == "dategoden" || $rec['Field'] == "name") continue; $sql .= ", `$rec[Field]` = '" . $rec1[$rec['Field']] . "' "; } @@ -2610,7 +2607,7 @@ function showinf_pers($id, $pas = 0, $battle = 0, $me = 0, $main = false) $ru_2 = show_rune(2, $user['id']); $ru_3 = show_rune(3, $user['id']); - $r .= '
' . $ru_1 . '' . $ru_2 . '' . $ru_3 . '
'; + $r .= '
' . $ru_1 . '' . $ru_2 . '' . $ru_3 . '
'; $r .= '
'; if (!$battle) { @@ -2771,8 +2768,8 @@ function year_text($days) $s = substr($days, strlen($days) - 1, 1); if (strlen($days) >= 2) { if (substr($days, strlen($days) - 2, 1) == '1') { - return $days . " лет "; $ok = true; + return $days . " лет "; } } if (!$ok) { @@ -2793,8 +2790,8 @@ function month_text($days) $s = substr($days, strlen($days) - 1, 1); if (strlen($days) >= 2) { if (substr($days, strlen($days) - 2, 1) == '1') { + $ok = 1; return $days . " месяцев "; - $ok = true; } } if (!$ok) {