pid = $pid;
}
$pid = safe_GET_xref('rootid', '');
if (empty($pid)) $pid = safe_POST_xref('rootid', '');
if (!empty($pid)) {
$controller->pid = $pid;
}
$famid = safe_GET('famid', WT_REGEX_XREF, '');
if (empty($famid)) $famid = safe_POST('famid', WT_REGEX_XREF, '');
if (!empty($famid)) {
$controller->famid = $famid;
}
$sid = safe_GET('sid', WT_REGEX_XREF, '');
if (empty($sid)) $sid = safe_POST('sid', WT_REGEX_XREF, '');
if (!empty($sid)) {
$controller->sid = $sid;
}
if ($sb_action=='loadMods') {
$counter = 0;
foreach ($sidebarmods as $mod) {
if (isset($controller)) $mod->setController($controller);
if ($mod->hasSidebarContent()) {
echo '
';
if ($counter==0) {
echo $mod->getSidebarContent();
} else {
echo '

';
}
echo '
';
$counter++;
}
}
exit;
}
if ($sb_action=='loadmod') {
$modName = safe_GET('mod', WT_REGEX_URL, '');
if (isset($sidebarmods[$modName])) {
$mod = $sidebarmods[$modName];
if (isset($controller)) $mod->setController($controller);
echo $mod->getSidebarContent();
}
exit;
}
if (isset($sidebarmods[$sb_action])) {
$mod = $sidebarmods[$sb_action];
echo $mod->getSidebarAjaxContent();
}
exit;
}
global $controller;
$pid='';
$famid='';
if (isset($controller)) {
if (isset($controller->pid)) $pid = $controller->pid;
if (isset($controller->rootid)) $pid = $controller->rootid;
if (isset($controller->famid)) $famid = $controller->famid;
if (isset($controller->sid)) $pid = $controller->sid;
} else {
$pid = safe_GET_xref('pid', '');
if (empty($pid)) $pid = safe_POST_xref('pid', '');
if (empty($pid)) $pid = safe_GET_xref('rootid', '');
if (empty($pid)) $pid = safe_POST_xref('rootid', '');
if (empty($pid)) $pid = safe_POST_xref('sid', '');
if (empty($pid)) $pid = safe_GET_xref('sid', '');
$famid = safe_GET('famid', WT_REGEX_XREF, '');
if (empty($famid)) $famid = safe_POST('famid', WT_REGEX_XREF, '');
}
echo '';
$counter = 0;
echo '';
echo WT_JS_START,'jQuery("#sidebarAccordion").accordion({active:0, autoHeight: false, collapsible: true});', WT_JS_END;