Not-quite-done with an LED controller web page

Having some problems—I think with nested ifs and closing the
connections properly.