} else { if (!$debug_img) { header('Content-type: image/' . $img['ext']); } readfile($img_address); } } } else { if (!$debug_img) { header('Content-type: image/png'); } readfile('img/notfound.png'); } if ($img['type'] != 4) { // flushNow(1); db_imageCounterSave($image, $img['type']); } exit; function watermarkImage($SourceFile) { global $settings, $DIR_TEMP; $font = CFLIBPATH . 'font/arial.ttf'; // the location on the server that the font can be found $font_size = 40; // size of the font require CFLIBPATH . 'watermark.class.php'; $img = new watermark($SourceFile, empty($settings['SET_WATERMARK_IMAGE']) ? null : $settings['SET_WATERMARK_IMAGE']); $img->cacheDir = $DIR_TEMP; //$img->saveQuality = 9; if (empty($settings['SET_WATERMARK_IMAGE'])) { $img->padding = 10;
$delete_id = $uploadimage['did']; } //check image id is valid if (isset($img_id) && preg_replace("/[^0-9A-Za-z]/", "", $img_id) != $img_id) { $countThumb++; continue; } //see if image exists if (!($image = db_get_image($img_id))) { // user_feedback('error',_T("site_index_thumbs_page_err"),'thumbs_page'); $countThumb++; continue; } //only count image if not on upload page if (!isset($delete_id)) { db_imageCounterSave($image, 4); } // check for cache if (!isset($delete_id)) { // && !checklogin()){ unset($_SESSION['upload']); cache_cheack($img_id . '_thumb' . ($showImage ? '_small' : ''), 60 * 60 * 24 * 30); } // hold thumbnail page html if (!isset($thumbHtml)) { $thumbHtml = ''; } // Thumbnail page variables $thumb_link = imageAddress(3, $image, 'pt'); $thumb_url = imageAddress(3, $image, 'dt'); $thumb_mid_link = imageAddress(2, $image, 'pm');