darkfreaks Posted September 8, 2007 Share Posted September 8, 2007 my images show up as red x's? how can i fix this? also the script isnt linking pictures correctly it shows up as no image isntead of the actual image? http://www.bidders.co.za/index.php Link to comment https://forums.phpfreaks.com/topic/68449-script-help/ Share on other sites More sharing options...
marcus Posted September 8, 2007 Share Posted September 8, 2007 We can't help without some source. Link to comment https://forums.phpfreaks.com/topic/68449-script-help/#findComment-344134 Share on other sites More sharing options...
darkfreaks Posted September 8, 2007 Author Share Posted September 8, 2007 Thumbs.php <?php ################################################################# ## PHP Pro Bid v6.00 ## ##-------------------------------------------------------------## ## Copyright ©2007 PHP Pro Software LTD. All rights reserved. ## ##-------------------------------------------------------------## ################################################################# include_once('includes/class_image.php'); $image = new image(); (string) $pic = null; $pic = eregi_replace(' ','%20',$_GET['pic']); $thumbnail_width = abs(intval($_GET['w'])); $is_square = ($_GET['sq']=='Y')? true : false; $is_border = ($_GET['b']=='Y') ? true : false; (array) $info = null; $info = @getimagesize($pic); list($im_width, $im_height, $im_type, $im_attr) = $info; if (empty($info)||$im_type>3) $pic = 'images/broken.gif'; $pic_no_spaces = eregi_replace('%20','',$pic); $pic_cached = eregi_replace($image->image_basedir,'',$pic_no_spaces); if ($_GET['check']=='phpinfo') { phpinfo(); } else { $allowed_extension = $image->allowed_extension($pic); if (isset($pic) && $thumbnail_width>0 && $allowed_extension) { /* check to see if file already exists in cache, and output it with no processing if it does */ $cached_filename = $image->set_cache_filename($pic_cached, $thumbnail_width, $is_square, $is_border); if (is_file($cached_filename)) /* display cached filename */ { header('Content-type: image/jpeg'); header('Location: ' . $cached_filename . '?' . rand(2,9999)); } else /* create new thumbnail, and add it into the cache directory as well */ { header('Content-type: image/jpeg'); $cache_output = $image->set_cache_filename($pic_cached, $thumbnail_width, $is_square, $is_border); $image->generate_thumb($pic, $thumbnail_width, $is_square, $is_border, $cache_output); header('Location: ' . $cache_output . '?' . rand(2,9999)); } } else if (!isset($pic)) { echo "<strong>ERROR:</strong> No image submitted"; } else if ($thumbnail_width<=0) { echo "<strong>ERROR:</strong> Invalid resizing option"; } else if (!$allowed_extension) { echo "<strong>ERROR:</strong> Prohibited file extension"; } } ?> Link to comment https://forums.phpfreaks.com/topic/68449-script-help/#findComment-344140 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.