}
$img->limit(1);
if (!$img->find(true)) {
- header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png');
- die("no images for that item: " . htmlspecialchars($id));
+ header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
+ urlencode("no images for that item: " . htmlspecialchars($id)));
}
$id = $img->id;
$img->limit(1);
if (!$img->find(true)) {
- die("No file exists");
+ header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason='.
+ urlencode("No file exists"));
}
$id = $img->id;
$img = DB_DataObjecT::factory('Images');
if (!$id || !$img->get($id)) {
- die("image has been removed or deleted.");
+
+ header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
+ urlencode("image has been removed or deleted."));
}
$this->serve($img);
exit;
{
require_once 'File/Convert.php';
if (!file_exists($img->getStoreName())) {
- die("Original file was missing : " . $img->getStoreName());
+ //print_r($img);exit;
+ header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
+ urlencode("Original file was missing : " . $img->getStoreName()));
}
function validateSize()
{
if (!in_array($this->size, array(
+
'100',
'100x100',
'150',