Most stars are born in dense stellar environments where the formation and early evolution of planetary systems may be significantly perturbed by encounters with neighbouring stars. To investigate on the fate of circumstellar gas disks and planets around young stars dense stellar environments, we numerically evolve star-disk-planet systems. We use the N-body codes NBODY6++GPU and SnIPES for the dynamical evolution of the stellar population, and the SPH-based code GaSPH for the dynamical evolution of protoplanetary disks. The secular evolution of a planetary system in a cluster differs from that of a field star. Most stellar encounters are tidal, adiabatic and nearly-parabolic. The parameters that characterize the impact of an encounter include the orientation of the protoplanetary disk and planet relative to the orbit of the encountering star, and the orbital phase and the semi-major axis of the planet. We investigate this dependence for close encounters (rp/a ≤ 100, where rp is the periastron distance of the encountering star and a is the semi-major axis of the planet). We also investigate distant perturbers (rp/a ≫ 100), which have a moderate effect on the dynamical evolution of the planet and the protoplanetary disk. We find that the evolution of protoplanetary disks in star clusters differs significantly from that of isolated systems. When interpreting the outcome of the planet formation process, it is thus important to consider their birth environments.