editsettings.cgi: code style, remove CGI usage, redirect after saving