Implemented some functionalities for index.php