Example #1
0
     if ($img_info[0] > 0 && $img_info[1] > 0) {
         if ($img_info[0] > $width || $img_info[1] > $height) {
             $ratio = $img_info[0] / $img_info[1];
             if ($ratio > 1) {
                 $width = $dim;
                 $height = round($dim / $img_info[0] * $img_info[1]);
             } else {
                 $width = round($dim / $img_info[1] * $img_info[0]);
                 $height = $dim;
             }
         } else {
             $width = $img_info[0];
             $height = $img_info[1];
         }
     }
     show_image_row($lang['thumb'], $thumb_src, 1, "", $height, $width);
     show_hidden_input("image_thumb_file_" . $i, $thumb_file);
 } else {
     show_custom_row($lang['thumb'], $lang['no_thumb_newimages_ext']);
     show_hidden_input("image_thumb_file_" . $i, "");
 }
 show_input_row($lang['field_download_url'] . $lang['download_url_desc'], "image_download_url_" . $i, "", $textinput_size);
 $image_name = isset($error['image_name_' . $i]) && isset($HTTP_POST_VARS['image_name_' . $i]) ? $HTTP_POST_VARS['image_name_' . $i] : str_replace("_", " ", $image_name);
 $iptc = "";
 if (isset($info['APP13'])) {
     $iptc = iptcparse($info['APP13']);
 }
 if (is_array($iptc) && $iptc_name) {
     if (isset($iptc['2#005'][0])) {
         $image_name = $iptc['2#005'][0];
     }
Example #2
0
 show_form_header("images.php", "updateimage", "form", 1);
 show_hidden_input("image_id", $image_id);
 show_hidden_input("old_file_name", $image_row['image_media_file']);
 show_hidden_input("old_thumb_file_name", $image_row['image_thumb_file']);
 show_hidden_input("old_cat_id", $image_row['cat_id']);
 show_table_header($lang['nav_images_edit'] . ": " . format_text($image_row['image_name'], 2), 2);
 $file_src = get_file_path($image_row['image_media_file'], "media", $image_row['cat_id'], 1);
 show_image_row($lang['image'] . "<br /><span class=\"smalltext\">(" . $image_row['image_media_file'] . ")</span>", $file_src, 1);
 $value = is_remote($image_row['image_media_file']) || is_local_file($image_row['image_media_file']) ? $image_row['image_media_file'] : "";
 show_upload_row($lang['image_file'], "file", "<br /><span class=\"smalltext\">" . $lang['allowed_mediatypes_desc'] . str_replace(",", ", ", $config['allowed_mediatypes']) . "</span>", $value);
 if (!empty($image_row['image_thumb_file'])) {
     $thumb_src = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 1);
     show_image_row($lang['thumb'] . "<br /><span class=\"smalltext\">(" . $image_row['image_thumb_file'] . ")</span>", $thumb_src, 1, "delete_thumb_file");
 } else {
     $file_type = get_file_extension($image_row['image_media_file']);
     show_image_row($lang['thumb'] . "<br /><span class=smalltext>(" . $lang['no_thumb_found'] . ")</span>", ICON_PATH . "/" . $file_type . ".gif", 1);
 }
 $value = is_remote($image_row['image_thumb_file']) || is_local_file($image_row['image_thumb_file']) ? $image_row['image_thumb_file'] : "";
 show_upload_row($lang['thumb_file'], "thumb_file", "<br /><span class=\"smalltext\">" . $lang['allowed_mediatypes_desc'] . " jpg, gif, png</span>", $value);
 show_input_row($lang['field_download_url'] . $lang['download_url_desc'], "image_download_url", $image_row['image_download_url'], $textinput_size);
 $title = $lang['field_image_name'] . (isset($file_src) ? get_iptc_insert_link($file_src, "object_name", "image_name", 0) : "");
 show_input_row($title, "image_name", $image_row['image_name'], $textinput_size);
 $title = $lang['field_description_ext'] . (isset($file_src) ? get_iptc_insert_link($file_src, "caption", "image_description") : "");
 show_textarea_row($title, "image_description", $image_row['image_description'], $textarea_size);
 $title = $lang['field_keywords_ext'] . (isset($file_src) ? get_iptc_insert_link($file_src, "keyword", "image_keywords") : "");
 show_textarea_row($title, "image_keywords", $image_row['image_keywords'], $textarea_size);
 show_cat_select_row($lang['field_category'], $image_row['cat_id'], 3);
 show_user_select_row($lang['user'], $image_row['user_id']);
 $title = $lang['field_date'] . $lang['date_desc'] . $lang['date_format'] . (isset($file_src) ? get_iptc_insert_link($file_src, "date_created", "image_date", 0) : "");
 show_date_input_row($title, "image_date", $image_row['image_date'], $textinput_size);
 show_radio_row($lang['field_free'], "image_active", $image_row['image_active']);