'err', 'message' => 'Duplicate id ' . $prog['id']]; $ids []= $prog['id']; if (!file_exists($prog['imgfront_path'])) return ['result'=>'err', 'message' => 'Image not found ' . $prog['title_short']]; if (!file_exists($prog['imgfull_path'])) return ['result'=>'err', 'message' => 'Image not found ' . $prog['title_short']]; } if ($warn != null) return $warn; return ['result'=>'ok', 'message' => '']; } public static function checkThumbnails() { foreach (self::listAll() as $book) { if (!file_exists($book['preview_path'])) return ['result'=>'err', 'message' => 'Preview not found ' . $book['title_short']]; } return ['result'=>'ok', 'message' => '']; } public static function createPreview($prog) { $src = $prog['imgfront_path']; $dst = $prog['preview_path']; smart_resize_image($src , null, 200, 0, true, $dst, 100); } }