Yeah, line 64 of that should be:

header("Location: {$URL}/ubbthreads.php{$var_start}ubb{$var_eq}cfrm");

missed the $ in URL.