Update mysql_* deprecated to mysqli_* and indentation