City man handed three prison terms