before anyone bothers with the OP's code, be advised -
1) it totals ~ 500 lines of uncommitted code.
2) it uses the mysql_ extension.
3) there's no sql injection security.
4) there is some javascrpt in it that evaluates escaped strings to various <td ,,,,,> html values. hopefully the OP won't replace that with something else by the time his thread edit time expires or when he posts more code.
5) there are a bunch of verbose lower-case variable names, like $upgrademoneyorcredits and $newleveltime...
6) the func.php file contains several sections of in-line php code along with some function definitions, one of which could be replaced with a number_format() call.
7) the main file has post method form processing code interspersed with html.
in short, it's impossible to tell what the code is doing now, in order to determine why it isn't working.
to the OP, this code needs to be rewritten, reversing everything mentioned in my list.