Updated main.php and Details.php