Update maincore.php