Esempio n. 1
0
 function showOutputHeader($actions, $navbar = true, $extra = '')
 {
     $user = new User($_SESSION['URID']);
     $utype = $user->getUserType();
     switch ($utype) {
         case USER_SYSADMIN:
             $returnStr = $this->showSysAdminHeader(Language::messageSMSTitle(), $extra);
             break;
         case USER_TRANSLATOR:
             $dt = new DisplayTranslator();
             $returnStr = $dt->showTranslatorHeader(Language::messageSMSTitle(), $extra);
             break;
         case USER_INTERVIEWER:
             $dt = new DisplayInterviewer();
             $returnStr = $dt->showHeader(Language::messageSMSTitle(), $extra);
             break;
         case USER_RESEARCHER:
             $dt = new DisplayResearcher();
             $returnStr = $dt->showResearchHeader(Language::messageSMSTitle(), $extra);
             break;
         default:
             $returnStr = $this->showSysAdminHeader(Language::messageSMSTitle(), $extra);
             break;
     }
     $returnStr .= '<div id="wrap">';
     if ($navbar) {
         switch ($utype) {
             case USER_SYSADMIN:
                 $returnStr .= $this->showNavBar();
                 break;
             case USER_INTERVIEWER:
                 $dt = new DisplayInterviewer();
                 $returnStr .= $dt->showNavBar();
                 break;
             case USER_RESEARCHER:
                 $dt = new DisplayResearcher();
                 $returnStr .= $dt->showNavBar();
                 break;
             default:
                 $dt = new DisplayTranslator();
                 $returnStr .= $dt->showNavBar();
                 break;
         }
     }
     $returnStr .= '<div class="container">';
     if ($navbar) {
         $returnStr .= '<ol class="breadcrumb">';
         for ($i = 0; $i < sizeof($actions); $i++) {
             $action = $actions[$i];
             if ($action['link'] == '') {
                 $returnStr .= '<li class="active">' . $action['label'] . '</li>';
             } else {
                 $returnStr .= '<li>' . $action['link'] . '</li>';
             }
         }
         $returnStr .= '</ol>';
     }
     //        $returnStr .= '<div class="row row-offcanvas row-offcanvas-right">';
     //        $returnStr .= '<div id=sectiondiv class="col-xs-12 col-sm-9">';
     //        $returnStr .= $message;
     return $returnStr;
 }
Esempio n. 2
0
 function showPreferencesRes()
 {
     /* update last page */
     $_SESSION['LASTPAGE'] = substr($_SESSION['LASTPAGE'], 0, strripos($_SESSION['LASTPAGE'], ".res"));
     $user = new User($_SESSION['URID']);
     $user->setNavigationInBreadCrumbs(loadvar('navigationinbreadcrumbs'));
     $user->saveChanges();
     $displayTranslator = new DisplayTranslator();
     $content = $displayTranslator->displaySuccess(Language::messagePreferencesSaved());
     return $displayTranslator->showPreferences($content);
 }