parent::getAuth(); // load company!
//return true;
$au = $this->getAuthUser();
- //if (!$au) {
- // die("Access denied");
- // }
+
+ if (!$au) {
+ die("Access denied");
+ }
+
$this->authUser = $au;
return true;
function get($s) // determin what to serve!!!!
{
+ // for testing only.
+ //if (!empty($_GET['_post'])) {
+ // return $this->post();
+ //}
+
$this->as_mimetype = empty($_REQUEST['as']) ? '' : $_REQUEST['as'];
$bits= explode('/', $s);
urlencode("image has been removed or deleted."));
}
+
+ if(!$this->hasPermission($img)){
+ header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
+ urlencode("access to this image/file has been denied."));
+ }
+
$this->serve($img);
exit;
}
+ function hasPermission($img)
+ {
+ return true;
+ }
function post()
{
return true;
}
- // DEFAULT allowed - override with $cfg['sizes'];
+ // DEFAULT allowed - override with Pman_Core_Images[sizes] => array();
$sizes = array(
'100',
// this should be configurable...
$ff = HTML_FlexyFramework::get();
+
+
$cfg = isset($ff->Pman_Images) ? $ff->Pman_Images :
(isset($ff->Pman_Core_Images) ? $ff->Pman_Core_Images : array());
if (!in_array($this->size, $sizes)) {
+ print_r($sizes);
die("invalid scale - ".$this->size);
}
}