We study the equilibrium statics and nonequilibrium driven dynamics of flux-line liquids in the presence of a random pinning potential. Under the assumption of replica symmetry, we find in the static case using a replica Gaussian variational method that the only effect of disorder is to increase the tilt modulus and the confining ``mass'' of the internal modes of the flux lines, thus decreasing their thermal wandering. In the nonequilibrium driven case, we derive the long-scale, coarse-grained equation of motion of the vortices in the presence of disorder, which, apart from new Kardar-Parisi-Zhang nonlinearities, has the same form as the equation of motion for unpinned vortices, with renormalized coefficients. We also compute the structure factor of a disordered vortex liquid, and show that the disorder contributes an additive, Lorentzian squared term, to the structure factor of the center of mass mode, otherwise leaving the functional form of terms describing the internal modes unchanged. The expression of the static structure factor derived within our approach is consistent both with experimental data and with the standard theory of elasticity of vortices in high temperature superconductors.