Need guidance on Timer/Delay Problems.

Arrch:
Why do you have an else if as the first statement in your loop? else if should only come after an if block.

When that gets fixed, and assuming the issue is the same, then it's running more than once means your two conditions are being met. What exactly, are you reading a digital input from?

that is just the part of my program which i have problem with . it comes after a if statement.
im reading the digital input from

const int inputPin1= 6;
const int testMode = 7;