Assuming a human (Ftr 1) becomes a ghost, gains a level on Wizard (Ftr 1/Wiz 1) and now is revived by resurrection, would he lose his wizard level, or would that level not be counted and cause him to lose his fighter level and become a 0-level human?
As KRyan explains in his answer things aren’t clear at all. But things are even more complicated, because a character who acquires the ghost template has a level adjustment of +5. This means, upon becoming a ghost, the "first level fighter" has an effective character level (ECL) of 6. In order to take another class level they must reach enough XP to attain 7th level. So, the Fighter/Wizard with the ghost template has at least 21.000 XP.
Resurrection says you can resurrect "someone who has been turned into an undead creature and then destroyed." Resurrection also says it works like Raise dead, and Raise dead says "The subject of the spell loses one level" meaning your "new XP total is midway between the minimum needed for his or her new (reduced) level and the minimum needed for the next one." (PHB, 171)
But what consequences occur when the Resurrection spell also removes a template with a level adjustment?
As far as I can see, there are no rules for this and it’s up to the DM to find a solution here.
The hard way: remove the ghost template and only count the two levels that remain (in this case Fighter and Wizard). Completely ignore the +5 LA and the XP that were gained, let the character's new XP drop to 500 (midway between level 1 and 2) and make them lose the wizard level. The character thus would effectively lose 6 levels, which would be pretty tough.
The generous way: let the character’s XP only drop to 18.500 (midway between level 6 and 7). The character may keep both class levels since they have enough XP. - In fact they have far too many XP! To deal with this discrepancy, the DM could use the rebuilding rules in the PHB II which suggest to "replace any lost level adjustment “points” with the same number of new class levels of your choice" when rebuilding a template. The character in our example would become a 6th level character and could choose four more class levels. - Maybe not immediately but over the course of some time.
To the best of my knowledge, this situation is not covered explicitly anywhere, though the books hint at an answer... or, well, kind of hint at two contradictory answers:
Resurrection and true resurrection can affected [sic] undead, but these spells turn undead back into the living creatures they were before they became undead.
(Monster Manual pg. 317; Libris Mortis pg. 10)
If we assume that “the living creatures they were before they became undead,” includes the levels they had before death, then it would seem the wizard level is lost. This is far from unambiguous, though—the quote may only be referring to “human” rather than “ghost” or whatever.
A resurrection or true resurrection spell can bring an undead back to life (the former spell causes the ex-undead to lose a level, the latter one does not). An undead restored to life loses all the levels it had taken in an undead monster class, along with all the benefits gained from those levels.
(Libris Mortis, pg. 35)
This is from the section about undead monster classes described in Chapter 2. By emphasizing that the monster class levels are lost, it suggests that non-monster class levels are not lost.
Neither of these is conclusive at all—the first could just be referring to the type of creature (particularly when dealing with non-template-based undead, say mohrg instead of ghost), the second doesn’t actually say anything one way or the other about other levels, we’re just inferring. That said, losing levels is a pretty big deal: if that were the rule, I think that rule would be explicitly stated somewhere. As far as I can tell, it’s not. Thus, I would argue that true resurrection should allow the ghost to keep their wizard level.
Resurrection wouldn’t, but that would just be due to the usual level-loss associated with the spell. If you had gained two wizard levels as a ghost, you’d only lose one of them to that spell.