} if ($objPicture->hasViewed($objUser)) { header('Last-modified: ' . $objThumbnail->get('date')); header('Expires: ' . (date('Y-m-d H:i:s') + 60 * 60 * 24)); header('Cache-control: public'); header('Pragma: public'); } $objThumbnail->setMime(); echo $objThumbnail->getImageRaw($objUser); } else { $objPicture->load(); header('Last-modified: ' . $objPicture->get('date')); header('Expires: ' . (date('Y-m-d H:i:s') + 60 * 60 * 24)); header('Cache-control: public'); header('Pragma: public'); $objPicture->setMime(); echo $objPicture->getImageRaw($objUser); } } catch (Exception $e) { die($e); $intWidth = 640; $intHeight = 480; if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'tn') { $intWidth = isset($_REQUEST['w']) ? $_REQUEST['w'] : $intWidth; $intHeight = isset($_REQUEST['h']) ? $_REQUEST['h'] : $intHeight; } $imgError = imagecreatetruecolor($intWidth, $intHeight); /* Create a black image */ $colBackground = imagecolorallocate($imgError, 255, 255, 255); $colForeground = imagecolorallocate($imgError, 0, 0, 128); imagefilledrectangle($imgError, 0, 0, MAX_X, MAX_Y, $colBackground);