Updated index.php

Also included update for the popup.php