modify the api.php and index.php to current sql