fixing zamok

This commit is contained in:
Igor Barkov [iwork] 2018-03-03 16:00:55 +02:00
parent f057f12a59
commit 1eb66abeec

View File

@ -65,17 +65,14 @@ $polno = unserialize($klan['vozm']);
<tr>
<td width=50% rowspan=2 valign=top>
<?php
$zamok = filter_var(INPUT_POST, 'zamok', FILTER_SANITIZE_STRING);
$start_zamok = filter_var(INPUT_POST, 'start_zamok', FILTER_SANITIZE_STRING);
$kr = filter_var(INPUT_POST, 'kr', FILTER_SANITIZE_STRING);
if ($zamok) {
if (isset($_POST['zamok'])) {
db::c()->query('UPDATE `clans` SET `zamok` = ?i WHERE `glava` = ?i', 1, $user['id']);
echo "Начат сбор средств на строительство Кланового Замка.";
header("Location: klan.php");
}
if ($kr) {
if (isset($_POST['kr'])) {
$a = filter_var(INPUT_POST,'kolv',FILTER_VALIDATE_INT);
$b = $user['klan'];
@ -88,7 +85,7 @@ $polno = unserialize($klan['vozm']);
} else echo "Вы ошиблись с вводом суммы";
}
if ($start_zamok) {
if (isset($_POST['start_zamok'])) {
$b = $user['klan'];
header("Location: klan.php");
mysql_query("update `clans` set `zamok`='2' WHERE `id`='$b'");