//$tabs = new HTML_Tabs($tab_array, true); $doc = new HTML_Element(); $tabs = $doc->createElement('ul', null, array('id' => $id, 'class' => 'product_tabs')); foreach ($tab_array as $tab) { $class = 'gradient'; $tabTitle = str_replace('attr/', '', $tab); if ($tabTitle == $id) { $class .= ' active'; } $li = $doc->createElement('li', null, array('class' => $class, 'title' => $tabTitle)); $a = $doc->createElement('a', ucwords(str_replace('_', ' ', $tabTitle)), array('href' => '/ushop/products/view-' . $tab)); $li->appendChild($a); $tabs->appendChild($li); } $doc->appendChild($tabs); $this->content .= $doc->toHtml(); $this->content .= '<div id="productsWrap" class="both">' . $data . '</div>'; $products = $this->getResult('product_id, image, category', $ushop->db_name . 'products', array($ushop->db_name . 'product_categories')); /* $ftp = new File_FTP($this->registry); $dir = '/userfiles/'.$this->registry->settings['resolve'].'/products/'; print_rr(realpath($_SERVER['DOCUMENT_ROOT'].'/../')); foreach ($products as $row): $to = $ftp->public_html.$dir.str_replace(' ', '_', $row->category).'/'.$row->image; $from = realpath($_SERVER['DOCUMENT_ROOT'].'/../').$dir.$row->image; if (!is_dir(realpath($_SERVER['DOCUMENT_ROOT'].'/../').$dir.str_replace(' ', '_', $row->category))) $ftp->mkdir($ftp->public_html.$dir.str_replace(' ', '_', $row->category));