function printSingleLevel($strStartId, &$arrGlobalNodes) { foreach ($arrGlobalNodes as $intI => $strId) { if ($strId["system_id"] == $strStartId) { unset($arrGlobalNodes[$intI]); break; } } $objCommon = new class_module_system_common($strStartId); $arrRecord = $objCommon->getSystemRecord(); $arrChilds = $objCommon->getChildNodesAsIdArray(); echo "<div style=\"padding-bottom: 5px; " . (count($arrChilds) > 0 ? " cursor: pointer; " : "") . " \"\n onmouseover=\"this.style.backgroundColor='#cccccc';\" onmouseout=\"this.style.backgroundColor='#ffffff';\"\n " . (count($arrChilds) > 0 ? " onclick=\"javascript:fold('" . $strStartId . "')\" " : " ") . "\n >"; $strStatus = "<span style=\"color: green; \">active</span>"; if ($objCommon->getIntRecordStatus() == 0) { $strStatus = "<span style=\"color: red;\">inactive</span>"; } if (count($arrChilds) > 0) { echo " + "; } else { echo " "; } echo $objCommon->getStrRecordClass() . " / " . $objCommon->getRecordComment() . " / " . $objCommon->getSystemid() . "\n"; echo " state: " . $strStatus . " module nr: " . $arrRecord["system_module_nr"] . " sort: " . $arrRecord["system_sort"] . "\n"; echo "</div>"; if (count($arrChilds) > 0) { echo "<div id=\"" . $strStartId . "\" style=\"border: 1px solid #cccccc; margin: 0 0 0px 20px; display: none;\" >"; for ($intI = 0; $intI < count($arrChilds); $intI++) { $strSingleId = $arrChilds[$intI]; printSingleLevel($strSingleId, $arrGlobalNodes); } echo "</div>"; } }