-function admin_images_main_display($id) {
- $data = db_get_assoc('cms_images', 'id,'.ADMIN_IMAGES_DB_FIELDS, 'where id=%i', $id);
- if(!$data) {
- message("Error: Broken Link (Image #$id not found)");
- return './admin_images';
- }
-
- # Find pages that have this image on it
- if($data['image']) {
- $references = db_get_assocs('cms_pages', 'title,filename', 'where content like "%%%s%%" order by concat(nav_title,title)', substr(enc_image_src($data['image']), 0, -4));
- if($references) {
- $data['references'] = array(
- 'data' => $references,
- 'count' => count($references));
- }
- }
-
- tem_set('display', $data);
-}
-