CCD photometry of stars in the old open cluster NGC 188