Photometric study of the old open cluster NGC 6791