/**
* Deal with image delivery and HTML replacement of image links in body text.
*
+ *
+ * NOTE THIS WAS NEVER INTENDED FOR PUBLIC IMAGE DISTRIBUTION - we need to create a seperate file for that...
+ *
* $str = Pman_Core_Images::replaceImg($str); // < use with HTML
*
* or
// tables that do not need authentication checks before serving.
var $public_image_tables = array();
-
+ var $sizes = array(
+ '100',
+ '100x100',
+ '150',
+ '150x150',
+ '200',
+ '200x0',
+ '200x200',
+ '400x0',
+ '300x100',
+ '500'
+ );
function getAuth()
{
parent::getAuth(); // load company!
$this->as_mimetype = empty($_REQUEST['as']) ? '' : $_REQUEST['as'];
- $this->page = empty($_REQUEST['page']) ? false : $_REQUEST['page'];
+ $this->page = empty($_REQUEST['page']) ? false : (int) $_REQUEST['page'];
$bits= explode('/', $s);
$id = 0;
$this->validateSize();
}
- $x->convert( $this->as_mimetype, $this->size);
+ if(!empty($this->page) && !is_nan($this->page * 1)){
+ $x->convert( $this->as_mimetype, $this->size, 0, $this->page);
+ } else {
+ $x->convert( $this->as_mimetype, $this->size);
+ }
+
$x->serve();
exit;
$ff = HTML_FlexyFramework::get();
- $sizes = array(
- '100',
- '100x100',
- '150',
- '150x150',
- '200',
- '200x0',
- '200x200',
- '400x0',
- '300x100',
- '500'
- );
+ $sizes= $this->sizes;
$cfg = isset($ff->Pman_Images) ? $ff->Pman_Images :
(isset($ff->Pman_Core_Images) ? $ff->Pman_Core_Images : array());