Calculation of the temperature dependences of the critical field and the density of critical current for a superconducting plate within the Ginzburg-Landau theory