"php script keeps trying to reload" says nothing about a parse error (which would say what line the problem was on) so in the wrong thread. Fixed that for you.
It also looks like you hit "quote" instead of "edit". Fixed that for you.
Perhaps you could attach the entire file (in one piece) to a post.
Since we can't run your code (all those additional files, all that database connection stuff - maybe the problem is in "send_headers_page_changed()" or "login_form( "", 1 )" - you'll have to do a bit more to track down the problem than guessing that it might be "somewhere around line 33".
That could be made easier by formatting your code a bit better: what conventions you use for how you indent lines and where you put your braces are your choice, but whatever they are, they are entirely for your benefit and the benefit of anyone else you want reading your code (see this thread stuck to the top of the Coding forum for some observations on this subject).