public function generate() { $content = ''; $alt = 1; foreach ($this->directory as $dir) { $data = array('__ICON__' => $this->getIcon($dir['type']), '__ARROW__' => $this->sysurl . '/theme/arrowlr.png', '__NAME__' => $dir['name'], '__SIZE__' => $this->getElement($dir['size']), '__URL__' => '?p=' . $this->cpath . '/' . $dir['name'], '__TYPE__' => $dir['desc'], '__DATE__' => $dir['last'], '__ALT__' => 'alt' . $alt); $alt = $alt == 1 ? 2 : 1; $content .= Template::_get('explorer_element', $data); } foreach ($this->files as $dir) { $data = array('__ICON__' => $this->getIcon($dir['type']), '__ARROW__' => $this->sysurl . '/theme/noarrow.png', '__NAME__' => $dir['name'], '__SIZE__' => $this->getSize($dir['size']), '__URL__' => $this->cpath . '/' . $dir['name'], '__TYPE__' => $dir['desc'], '__DATE__' => $dir['last'], '__ALT__' => 'alt' . $alt); $alt = $alt == 1 ? 2 : 1; $content .= Template::_get('explorer_element', $data); } return $content; }