define checkboxes

This commit is contained in:
lopar 2019-06-22 17:22:45 +03:00
parent bf226ce8c4
commit 4fe471ef27
1 changed files with 2 additions and 2 deletions

View File

@ -67,10 +67,10 @@ if (!empty($login) AND $action == 'edit_status') {
$sok['status'] = $st;
}
if ((!empty($_POST['vin']) OR !empty($_POST['tus'])) AND $klan['glava'] == $_SESSION['uid']) {
if ($_POST['vin'] == 'on') $polno[$sok['id']][0] = 1;
if (!empty($_POST['vin'])) $polno[$sok['id']][0] = 1;
else $polno[$sok['id']][0] = 0;
if ($_POST['tus'] == 'on') $polno[$sok['id']][1] = 1;
if (!empty($_POST['tus'])) $polno[$sok['id']][1] = 1;
else $polno[$sok['id']][1] = 0;
db::c()->query('UPDATE `clans` SET `vozm` = "?s" WHERE `id` = ?i', serialize($polno), $klan['id']);