Muscle gain and fat loss are both almost exclusively governed by diet. You should be creating a solid diet first.
In regard to the question, which training set-up is better between the two: my answer is the second one, "30days to get a six pack". It isn't training without legs and hitting the cardio if needed; of course both of those come after diet.