status.php: use before.php and after.php correctly
index.php: use before.php & after.php