20) $api_key = getPOST("api_key", null, randomPassword(20)); if (strlen(trim($api_key)) > 20) { $new['api_key'] = substr(trim($api_key),0,20); } if (strlen(trim($api_key)) <20) { $new['api_key'] = $customer['api_key']; } $new['api_key'] = trim($api_key); // Права доступа $new['rights'] = (int)getPOST("f_acl", null, 0); // Обновление записи update_record($db_link, "customers", "id = ?", $new, [$id]); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } unset($_POST); print_control_submenu($page_url); require_once ($_SERVER['DOCUMENT_ROOT']."/inc/header.php"); ?>