Thanks for your help !
here is what I did, but if this does not workout,
I will have a closer look at your code and see if I can make it work...
I added,
$self = basename($_SERVER['PHP_SELF']);
to make it identify itself
and then added,
$file != "$self"
to the if statement
Seems to work...