Modify layout download page and update database