public function editAction() { $this->view->setVar('Lang', $this->inc->getLang('web/web_news')); $id = $this->request->getPost('id'); $Edit = WebNews::findFirst(array('id=' . $id)); $this->view->setVar('Edit', $Edit); // Upload $upload = ''; if (!empty($Edit->upload)) { $File = new File(); $arr = array_filter(explode(',', $Edit->upload)); foreach ($arr as $val) { $upload[] = array('path' => $this->path, 'name' => $val, 'size' => $File->formatBytes($File->size($this->root . $this->path . $val))); } } $this->view->setVar('Upload', $upload); $this->view->pick("web/news/edit"); }