I've finally finished cleaning the PHP page from Hell [1] (at least, as far as “Project Leaflet” is concerned), although to finish it, I had to delve into some JavaScript to rip out even more <TABLE>-based layouts (amusingly enough, the JavaScript used CSS (Cascading Style Sheets) to style the <DIV> containing the <TABLE> being used for layout purposes! Methinks someone was unclear on the concept here).
That particular page is still hideously ugly and it's really driving home the point of just how horrible it is to mix logic and layout, although at this point I still have no better idea of how to separate the two (at least in PHP).