Update resource.class.php