Added view report function and added confirm password

Added despatch functions and view reports in PDF.
Added confirm password and error messages.