IR remote with two leds

I would suggest placing some Serial.println() statements in various places to see if you are getting to where you think you're getting.

For starters, there is no way to turn on the red (assuming HIGH is ON)) if the green is ON, and there is no way to turn on the green if red is on. This is because both have to be OFF in order to turn one on (&& is a logical AND).

In your last if, either one can be on, in order to turn them both off.

You should use parentheses to define which conditions go with the other conditions. Exemple:

    else if ( recv_value == 1371825 && (digitalRead(greenled) == HIGH || digitalRead(redled) == HIGH) ) {

Which means something completely different than:

    else if ( (recv_value == 1371825 && digitalRead(greenled) == HIGH ) || digitalRead(redled) == HIGH ) {