Does not interrupt

Hi i just want to have a support of a simple code , if you see the code in void Detect1(), the pin 4 stay activated for 50 minutes and if the pin 7 receive a signal ones that the delay is running, it will not stop until finish the 50 minutes........................and this is my issue, i need that if the pin 7 receive a signal be able to interrupt the program.

Mabe what i need is other code, can you help me.

void setup()
{

pinMode( 4 , OUTPUT);
pinMode( 7 , INPUT);
}

void loop()
{ pinMode( 4 , OUTPUT);
digitalWrite( 4 , HIGH );

Detect1();
}

void Detect1()
// ( pin 4 is activated )

{ byte Enter1 = 0;
while (Enter1 == 0)
{

if (digitalRead( 7)) //if Pin 7 receive a signal, Pin 4 will be interrupted
{ digitalWrite( 4 , LOW );
}

else // otherwise Pin4 will continuous activated for 50 minutes

{ delay( 50000 ); // pin 4 stay activated for 50 minutes and if the pin 7 receive the signal will not stop until
//finich the 50 minutes........................and this is my issue, i need that if the pin 7 receive a signal be
//able to interrupt the program
digitalWrite( 4 , LOW );} //

}
}

Check the below link

you cant use any pin as interrupt pin . check relevant pin and coding attached above

AMPS-N:
you cant use any pin as interrupt pin .

But you could research the use of pin-change interrupts.

Mabe what i need is other code, can you help me.

WTF is that mess? Use Tools + Auto Format BEFORE you improperly post code again. And don't improperly post it!