public function send() { if (in_array($this->fw->get('PARAMS.folder'), array_keys($this->paths)) && in_array($this->fw->get('PARAMS.type'), $this->types)) { $folder = $this->paths[$this->fw->get('PARAMS.folder')]; $type = $this->fw->get('PARAMS.type'); if ($this->fw->get('DEBUG') != 0) { $this->fw->expire(86400 * 30); \helpers\Time::fixHttpHeaders(); } if (in_array($type, $this->dontminify)) { $file = $folder . $type . '/' . $this->fw->pop('PARAMS'); if (\Web::instance()->send($file)) { return true; } } else { $this->fw->set('UI', $folder . $type . '/'); $file = $this->fw->pop('PARAMS'); if (file_exists($this->fw->get('UI') . $file)) { if (!$this->fw->exists('GET.dontminify')) { echo \Web::instance()->minify($file); return true; } elseif (\Web::instance()->send($this->fw->get('UI') . $file)) { return true; } } } } $this->fw->error(404); }
protected function show($crop = false, $enlarge = false) { if ($this->setParams()) { $this->fw->expire(3600 * $this->fw->get('expiry')); \helpers\Time::fixHttpHeaders(); if ($this->make($crop, $enlarge)) { exit; } } $this->fw->error(404); }
public function getDate() { return \Helpers\Time::nice($this->update_time); }