foreach ($categoryTreeHelper as $categoryId => $categoryName) { $indent = str_repeat(' ', $categoryTreeHelper->indent); $categoryLang = $categoryTreeHelper->getInnerIterator()->current()->getLanguage(); $parentId = $categoryTreeHelper->getInnerIterator()->current()->getParentId(); // show category name printf("<p>%s<strong style=\"vertical-align: top;\">· %s</strong> ", $indent, $categoryName); if ($categoryLang == $lang) { // add sub category (if actual language) printf('<a href="?action=addcategory&cat=%s&lang=%s"><img src="images/add.png" width="16" height="16" alt="%s" title="%s" border="0" /></a> ', $categoryId, $categoryLang, $PMF_LANG['ad_quick_category'], $PMF_LANG['ad_quick_category']); // rename (sub) category (if actual language) printf('<a href="?action=editcategory&cat=%s"><img src="images/edit.png" width="16" height="16" border="0" title="%s" alt="%s" /></a> ', $categoryId, $PMF_LANG['ad_kateg_rename'], $PMF_LANG['ad_kateg_rename']); } // translate category (always) printf('<a href="?action=translatecategory&cat=%s"><img src="images/translate.png" width="16" height="16" border="0" title="%s" alt="%s" /></a> ', $categoryId, $PMF_LANG['ad_categ_translate'], $PMF_LANG['ad_categ_translate']); // delete (sub) category (if actual language) if (!$categoryTreeHelper->callHasChildren() && $categoryLang == $lang) { printf('<a href="?action=deletecategory&cat=%s&lang=%s"><img src="images/delete.png" width="16" height="16" alt="%s" title="%s" border="0" /></a> ', $categoryId, $categoryLang, $PMF_LANG['ad_categ_delete'], $PMF_LANG['ad_categ_delete']); } if ($categoryLang == $lang) { // cut category (if actual language) printf('<a href="?action=cutcategory&cat=%s"><img src="images/cut.png" width="16" height="16" alt="%s" border="0" title="%s" /></a> ', $categoryId, $PMF_LANG['ad_categ_cut'], $PMF_LANG['ad_categ_cut']); if ($categoryHelper->numParent($parentId) > 1) { // move category (if actual language) AND more than 1 category at the same level) printf('<a href="?action=movecategory&cat=%s&parent_id=%s"><img src="images/move.gif" width="16" height="16" alt="%s" border="0" title="%s" /></a>', $categoryId, $parentId, $PMF_LANG['ad_categ_move'], $PMF_LANG['ad_categ_move']); } } print "</p>\n"; } printf('<p>%s</p>', $PMF_LANG['ad_categ_remark']); } else { print $PMF_LANG['err_NotAuth'];