public function imagesAction() { $imagePath = USER_FILES_PATH; $folders = System_Functions::getFolderFilesRecursive($imagePath . DS . 'images', array('jpg', 'png', 'gif')); $result = array(); foreach ($folders as $filename => $folder) { $fileRelative = explode($imagePath, $filename); $fileRelative = $fileRelative[1]; $fileHttpPath = $this->view->baseUrl() . DS . 'UserFiles' . $fileRelative; if (strstr($fileHttpPath, 'thumbs')) { continue; } $result[] = array('thumb' => System_Functions::getThumbUrl($fileHttpPath, array(100, 75)), 'image' => $fileHttpPath, 'title' => basename($fileRelative), 'folder' => dirname($fileRelative)); } echo json_encode($result); $this->_helper->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); }
public function thumbUrl($path, $sizes = array(200, 100), $watermarked = false) { return System_Functions::getThumbUrl($path, $sizes, $watermarked); }