New inequalities of hermite-hadamard type for convex functions with applications