$cat = $res['TRN_CATEGORY']; $node = $res['TRN_ID']; $lang = $res['TRN_LANG']; $langLabel = $res['TRN_VALUE']; if ($cat != $aCat) { $template->newBlock("TDcat"); $template->assign("catId", $res['TRN_CATEGORY']); $template->assign("ajaxDelField", ajax_event('onclick', 'translationsAjax', 'showSpace', "'function=delField" . "&cat=" . urlencode($cat) . "&node=" . urlencode($node) . "&lang=" . urlencode($lang) . "'", '')); } if ($cat != $aCat || $node != $aNode) { $template->newBlock("TDnode"); $template->assign("nodeId", $res['TRN_ID']); } //$aCat=$cat; //$aNode=$node; $template->goToBlock("row"); $template->assign("catId", $res['TRN_CATEGORY']); $template->assign("nodeId", $res['TRN_ID']); $template->assign("langId", $lang); $template->assign("langLabel", $langLabel); $template->assign("ajaxLabel", "onclick=\"if (!document.getElementById('aux'))" . ajax_init('translationsAjax.php', 'lang_' . $cat . '_' . $node . '_' . $lang, "'function=editLabel" . "&cat=" . urlencode($cat) . "&node=" . urlencode($node) . "&lang=" . urlencode($lang) . "'", 'focusInputLabel') . '"'); } $template->printToScreen(); break; } function ajax_event($event = "onclick", $page, $div, $param, $freturn = "") { if ($freturn === '') { $freturn = "''"; } return "{$event}=\"ajax_init('{$page}','{$div}',{$param},{$freturn})\"";