Exemplo n.º 1
0
$tpl_data['baseurl'] = $baseURL;
// study title
$tpl_data['study_title'] = $config->getSetting('title');
// draw the user information table
try {
    $user =& User::singleton();
    $tpl_data['user'] = $user->getData();
    $tpl_data['user']['permissions'] = $user->getPermissions();
    $tpl_data['hasHelpEditPermission'] = $user->hasPermission('context_help');
    $site =& Site::singleton($user->getData('CenterID'));
    $tpl_data['user']['user_from_study_site'] = $site->isStudySite();
} catch (Exception $e) {
    $tpl_data['error_message'][] = "Error: " . $e->getMessage();
}
// the the list of tabs, their links and perms
$tpl_data['tabs'] = NDB_Config::GetMenuTabs();
//--------------------------------------------------
// configure browser args for the mri browser
// !!! array URL args -- need to correct query in mri_browser to
// accept candidate data
$argstring = '';
if (!empty($_REQUEST['candID'])) {
    $argstring .= "filter%5BcandID%5D=" . $_REQUEST['candID'] . "&";
}
if (!empty($_REQUEST['sessionID'])) {
    try {
        $timePoint =& TimePoint::singleton($_REQUEST['sessionID']);
        $argstring .= "filter%5Bm.VisitNo%5D=" . $timePoint->getVisitNo() . "&";
    } catch (Exception $e) {
        $tpl_data['error_message'][] = "TimePoint Error (" . $_REQUEST['sessionID'] . "): " . $e->getMessage();
    }