当前位置: 首页>>代码示例>>PHP>>正文


PHP Survey::getGroups方法代码示例

本文整理汇总了PHP中Survey::getGroups方法的典型用法代码示例。如果您正苦于以下问题:PHP Survey::getGroups方法的具体用法?PHP Survey::getGroups怎么用?PHP Survey::getGroups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Survey的用法示例。


在下文中一共展示了Survey::getGroups方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showRemoveSurveyRes

 function showRemoveSurveyRes()
 {
     /* update last page */
     $_SESSION['LASTPAGE'] = 'sysadmin.surveys';
     $displaySysAdmin = new DisplaySysAdmin();
     $suid = getFromSessionParams('suid');
     if ($suid != '') {
         //remove
         $survey = new Survey($suid);
         /* remove sections */
         $sections = $survey->getSections();
         foreach ($sections as $section) {
             $section->remove();
             /* remove variables */
             $variables = $survey->getVariableDescriptives($section->getSeid());
             foreach ($variables as $variable) {
                 $variable->remove();
             }
         }
         /* remove types */
         $types = $survey->getTypes();
         foreach ($types as $type) {
             $type->remove();
         }
         /* remove types */
         $groups = $survey->getGroups();
         foreach ($groups as $group) {
             $group->remove();
         }
         /* remove versions */
         $versions = $survey->getVersions();
         foreach ($versions as $version) {
             $version->remove();
         }
         /* remove survey */
         $survey->remove();
         /* update users */
         $users = new Users();
         $users = $users->getUsers();
         foreach ($users as $u) {
             $u->removeSurvey($suid);
             $u->saveChanges();
         }
         /* return result */
         return $displaySysAdmin->showSurveys($displaySysAdmin->displaySuccess(Language::messageSurveyRemoved($survey->getName())));
     } else {
         return $displaySysAdmin->showSurveys();
     }
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:49,代码来源:sysadmin.php

示例2: showSurvey

 function showSurvey($message = "")
 {
     $survey = new Survey($_SESSION['SUID']);
     $returnStr = $this->showTranslatorHeader(Language::messageSMSTitle());
     $returnStr .= '<div id="wrap">';
     $returnStr .= $this->showNavBar();
     $returnStr .= '<div class="container">';
     $returnStr .= '<ol class="breadcrumb">';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'translator.surveys'), Language::headerSurveys()) . '</li>';
     $returnStr .= '<li>' . $survey->getName() . '</li>';
     if ($_SESSION['VRFILTERMODE_SURVEY'] == 0) {
         $returnStr .= '<li class="active">' . Language::headerSections() . '</li>';
     } else {
         if ($_SESSION['VRFILTERMODE_SURVEY'] == 1) {
             $returnStr .= '<li class="active">' . Language::headerSettings() . '</li>';
         } else {
             if ($_SESSION['VRFILTERMODE_SURVEY'] == 2) {
                 $returnStr .= '<li class="active">' . Language::headerTypes() . '</li>';
             } else {
                 if ($_SESSION['VRFILTERMODE_SURVEY'] == 3) {
                     $returnStr .= '<li class="active">' . Language::headerGroups() . '</li>';
                 } else {
                     $returnStr .= '<li class="active">' . Language::headerSections() . '</li>';
                 }
             }
         }
     }
     $returnStr .= '</ol>';
     $returnStr .= $this->getSurveyTopTab($_SESSION['VRFILTERMODE_SURVEY']);
     $returnStr .= '<div class="well" style="background-color:white;">';
     $returnStr .= $message;
     $returnStr .= '<div class="row row-offcanvas row-offcanvas-right">';
     $returnStr .= '<div id=sectiondiv class="col-xs-12 col-sm-9">';
     if ($_SESSION['VRFILTERMODE_SURVEY'] == 0) {
         $survey = new Survey($_SESSION['SUID']);
         $sections = $survey->getSections();
         $returnStr .= $this->showSections($sections);
     } else {
         if ($_SESSION['VRFILTERMODE_SURVEY'] == 1) {
             $returnStr .= $this->showSettingsList();
         } else {
             if ($_SESSION['VRFILTERMODE_SURVEY'] == 2) {
                 $survey = new Survey($_SESSION['SUID']);
                 $types = $survey->getTypes();
                 $returnStr .= $this->showTypes($types);
             } else {
                 if ($_SESSION['VRFILTERMODE_SURVEY'] == 3) {
                     $survey = new Survey($_SESSION['SUID']);
                     $groups = $survey->getGroups();
                     $returnStr .= $this->showGroups($groups);
                 } else {
                     $survey = new Survey($_SESSION['SUID']);
                     $sections = $survey->getSections();
                     $returnStr .= $this->showSections($sections);
                 }
             }
         }
     }
     $returnStr .= '</div>';
     $returnStr .= $this->showSurveySideBar($survey, $_SESSION['VRFILTERMODE_SURVEY']);
     $returnStr .= '</div>';
     $returnStr .= '</div></div></div>';
     //container and wrap
     $returnStr .= $this->showBottomBar();
     $returnStr .= $this->showFooter(false);
     return $returnStr;
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:67,代码来源:displaytranslator.php

示例3: showSection

 function showSection($seid, $message = '')
 {
     $user = new User($_SESSION['URID']);
     $survey = new Survey($_SESSION['SUID']);
     $section = $survey->getSection($seid);
     $returnStr = $this->showSysAdminHeader(Language::messageSMSTitle());
     $returnStr .= '<div id="wrap">';
     $returnStr .= $this->showNavBar();
     $returnStr .= '<div class="container">';
     $returnStr .= '<ol class="breadcrumb">';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.surveys'), Language::headerSurveys()) . '</li>';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.survey'), $survey->getName()) . '</li>';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.survey.section', 'seid' => $seid), $section->getName()) . '</li>';
     if (!$user->hasNavigationInBreadCrumbs()) {
         if ($_SESSION['VRFILTERMODE_SECTION'] == 0) {
             $returnStr .= '<li class="active">' . Language::labelVariables() . '</li>';
         } elseif ($_SESSION['VRFILTERMODE_SECTION'] == 1) {
             $returnStr .= '<li class="active">' . Language::labelRouting() . '</li>';
         } else {
             $returnStr .= '<li class="active">' . Language::labelVariables() . '</li>';
         }
     }
     $returnStr .= '</ol>';
     //CONTENT
     $returnStr .= $message;
     $returnStr .= '<div class="row row-offcanvas row-offcanvas-right">';
     $returnStr .= '<div style="" class="col-xs-12 col-sm-9">';
     if ($user->hasNavigationInBreadCrumbs()) {
         $active = array_fill(0, 16, 'label-primary');
         $active[$_SESSION['VRFILTERMODE_SECTION']] = 'label-default';
         if ($_SESSION['VRFILTERMODE_SECTION'] == 0) {
             $returnStr .= ' <span class="label ' . $active[0] . '">' . Language::labelVariables() . '</span>';
         } else {
             $returnStr .= ' <a onclick="$(\'#vrfiltermode_section\').val(0);$(\'#sectionsidebar\').submit(); return false;" style="text-decoration:none;"><span class="label ' . $active[0] . '">' . Language::labelVariables() . '</span></a>';
         }
         if ($_SESSION['VRFILTERMODE_SECTION'] == 1) {
             $returnStr .= ' <span class="label ' . $active[1] . '">' . Language::labelRouting() . '</span>';
         } else {
             $returnStr .= ' <a onclick="$(\'#vrfiltermode_section\').val(1);$(\'#sectionsidebar\').submit(); return false;" style="text-decoration:none;"><span class="label ' . $active[1] . '">' . Language::labelRouting() . '</span></a>';
         }
         /* if ($_SESSION['VRFILTERMODE_SECTION'] == 3) {
            $returnStr .= ' <span class="label ' . $active[3] . '">' . Language::labelGroups() . '</span>';
            } else {
            $returnStr .= ' <a onclick="$(\'#vrfiltermode_section\').val(3);$(\'#sectionsidebar\').submit(); return false;" style="text-decoration:none;"><span class="label ' . $active[3] . '">' . Language::labelGroups() . '</span></a>';
            } */
     }
     $returnStr .= '<div class="well" style="background-color:white;">';
     if ($_SESSION['VRFILTERMODE_SECTION'] == 0) {
         //show variables
         $returnStr .= $this->showVariables($survey->getVariableDescriptives($seid, "position", "asc"));
     } elseif ($_SESSION['VRFILTERMODE_SECTION'] == 1) {
         //show routing!
         $returnStr .= $this->showRouting($seid);
     } elseif ($_SESSION['VRFILTERMODE_SECTION'] == 3) {
         //show groups!
         $returnStr .= $this->showGroups($survey->getGroups());
     } else {
         $returnStr .= $this->showTextBase($seid);
     }
     $returnStr .= '</div>';
     //end well
     //END CONTENT
     $returnStr .= '</div>';
     $returnStr .= $this->showSurveySideBar($survey, $_SESSION['VRFILTERMODE_SURVEY']);
     $returnStr .= $this->showSectionSideBar($survey, $_SESSION['VRFILTERMODE_SECTION']);
     $returnStr .= '</div>';
     $returnStr .= '</div></div>';
     //container and wrap
     $returnStr .= $this->showBottomBar();
     $returnStr .= $this->showFooter(false);
     return $returnStr;
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:72,代码来源:displaysysadmin.php


注:本文中的Survey::getGroups方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。