function outputButtons($cat_node, $comma = '')
 {
     $children = '';
     $state = '';
     $keys = array_keys($cat_node->children);
     if (sizeof($keys) > 0) {
         while (is_null($key = array_shift($keys)) == false) {
             $children .= $this->outputButtons($cat_node->children[$key], empty($keys) ? '' : ',');
         }
         $tags = array('Children' => $children);
         $children = $this->mTmplFiller->fill("catalog/categories_browser_dynamic/", "button.children.tpl.html", $tags);
         $state = "state: 'open',";
     }
     $tags = array('UnqPrefix' => $this->unq_prefix, 'CatId' => $cat_node->id, 'CatName' => htmlspecialchars(escapeJSScript(trim($cat_node->name))), 'NodeType' => $cat_node->id == 1 ? 'root' : 'folder', 'State' => $state, 'Children' => $children, 'Comma' => $comma);
     return $this->mTmplFiller->fill("catalog/categories_browser_dynamic/", "button.tpl.html", $tags);
 }
 function outputFinalScript()
 {
     $params = array('TreeID' => modApiFunc('Request', 'getValueByKey', 'tree_id'), 'CategoryID' => modApiFunc('Request', 'getValueByKey', 'old_id'), 'NewName' => htmlspecialchars(escapeJSScript(modApiFunc('Request', 'getValueByKey', 'new_name'))));
     echo $this->mTmplFiller->fill("catalog/edit_cat/", "final_script.tpl.html", $params);
 }
 function outputStoreSettingsMenu($groupname, $parent)
 {
     global $application;
     $result = "";
     $menulist = modApiFunc('MenuManager', 'getMenus', $groupname, $parent);
     foreach ($menulist as $item) {
         $menuname = $item['menu_name'];
         $arr = explode(",", $menuname);
         $menuname = getValxMsg($arr[0], $arr[1]);
         $winname = escapeJSScript($menuname);
         $menudescription = $item['menu_desc'];
         $arr = explode(",", $menudescription);
         $menudesc = getValxMsg($arr[0], $arr[1]);
         $menuurl = $item['menu_url'];
         $new_window = $item['new_window'];
         $template_contents = array('MenuName' => $menuname, 'WindowName' => $winname, 'MenuURL' => $menuurl, 'MenuDescription' => $menudesc, 'OpenInNewWindow' => $new_window);
         $this->_Template_Contents = $template_contents;
         $application->registerAttributes($this->_Template_Contents);
         $result .= $this->mTmplFiller->fill('menu_manager/', 'store_settings_item.tpl.html', array());
     }
     return $result;
 }