  The theory presented is based on a simple Hamiltonian for a vortex lattice in
a weak impurity background which includes linear elasticity and plasticity, the
latter in the form of integer valued fields accounting for defects. Within a
quadratic approximation in the impurity potential, we find a first-order
Bragg-glass, vortex-glass transition line showing a reentrant behavior for
superconductors with a melting line near $ H_{c2} $. Going beyond the quadratic
approximation by using the variational approach of M\'ezard and Parisi
established for random manifolds, we obtain a phase diagram containing a
third-order glass transition line. The glass transition line separates the
vortex glass and the vortex liquid. Furthermore, we find a unified first-order
line consisting of the melting transition between the Bragg glass and the
vortex liquid phase as well as a disorder induced first-order line between the
Bragg glass and the vortex glass phase. The reentrant behavior of this line
within the quadratic approach mentioned above vanished. We calculate the
entropy and magnetic induction jumps over the first-order line.
