<a href="#" class="btn">' . $LANG['options'] . '</a> <ul> <li><a href="?route=banned.php&action=delete&id=' . $_GET['id'] . '&token=' . $csrf . '" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete'] . '</a></li> </ul> </div>'; } echo '<a href="?route=banned.php&action=list" class="btn">' . $LANG['banned_view'] . '</a> </div>'; if (!empty($LANG['banned_edit_subtitle'])) { echo '<span>' . $LANG['banned_edit_subtitle'] . '</span>'; } echo '</div>'; if ($banned_exists) { if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['csrf']) && check_csrf($_POST['csrf'], 'banned_csrf')) { if (isset($_POST['ip']) && valid_ip($_POST['ip'])) { if (actions::edit_banned($_GET['id'], array('ipaddr' => $_POST['ip'], 'registration' => isset($_POST['register']) ? 1 : 0, 'login' => isset($_POST['login']) ? 1 : 0, 'site' => isset($_POST['shn-site']) ? 1 : 0, 'redirect' => isset($_POST['redirect']) ? $_POST['redirect'] : '', 'expiration' => !isset($_POST['shn-expiration']) ? 1 : 0, 'expiration_date' => !isset($_POST['shn-expiration']) && isset($_POST['expiration']) ? $_POST['expiration']['date'] . ', ' . $_POST['expiration']['hour'] : ''))) { echo '<div class="a-success">' . $LANG['msg_saved'] . '</div>'; } else { echo '<div class="a-error">' . $LANG['msg_error'] . '</div>'; } } } $_SESSION['banned_csrf'] = $csrf; $info = admin_query::banned_infos($_GET['id']); echo '<div class="form-table"> <form action="#" method="POST" enctype="multipart/form-data"> <div class="row"><span>' . $LANG['form_ip'] . ':</span><div><input type="text" name="ip" value="' . $info->IP . '" required /></div></div> <div class="row"><span>' . $LANG['bann_form_block'] . ':</span><div> <input type="checkbox" name="register" id="register"' . ($info->registration ? ' checked' : '') . ' /> <label for="register">' . $LANG['bann_registrations'] . '</label> <br />