Auth->allow("*"); } function get($id) { if(!is_numeric($id)) { $this->Resource->data = array_shift($this->Resource->findByName($id)); if(!$this->Resource->data ) die; $this->Resource->id = $this->Resource->data['id']; } $type = $this->Resource->field('type'); $path = $this->Resource->getPath(); header('Content-type:' . $type); $content = @file_get_contents($path); die($content); } function slideshow($id) { if(!is_numeric($id)) { $this->Resource->data = array_shift($this->Resource->findByName($id)); if(!$this->Resource->data ) die; $this->Resource->id = $this->Resource->data['id']; } $type = $this->Resource->field('type'); if(substr($type, 0, 5) == 'image') { header('Content-type: text/html'); ?>