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);
$img = DB_DataObjecT::factory('Images');
- $img->get($id);
- print_r($img);exit;
+
if (!$id || !$img->get($id)) {
header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
}
function validateSize()
{
-
- if ($this->authUser && $this->authUser->company_id && $this->authUser->company()->comptype=='OWNER') {
+ if (($this->authUser && $this->authUser->company_id && $this->authUser->company()->comptype=='OWNER') || $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']) {
return true;
}