Use load_results instead of file_get_contents and include default set of buttons
Use load_results instead of load_file, remove main * in places, remove duplicate login case, and remove $_POST[pay_period]