fix errors of inserting pics to db
add code to edit news page