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


PHP Survey::getTypes方法代码示例

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


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

示例1: 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

示例2: show_form

 function show_form($page, $action, $qid, $type = 'new', $current = null)
 {
     $page->changeTpl('survey/edit_survey.tpl');
     $page->assign('survey_action', $action);
     $page->assign('survey_qid', $qid);
     $page->assign('survey_formaction', './survey/edit');
     $page->assign('survey_type', $type);
     if (!is_null($current) && is_array($current)) {
         $page->assign('survey_current', $current);
     } elseif ($type == 'new') {
         $page->addJsLink('ajax.js');
         $page->assign('survey_types', Survey::getTypes());
     }
     if ($type == 'root' || $type == 'newsurvey') {
         $page->assign('survey_modes', Survey::getModes());
     }
 }
开发者ID:Ekleog,项目名称:platal,代码行数:17,代码来源:survey.php

示例3: 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

示例4: showTypes

 function showTypes()
 {
     $returnStr = '';
     $survey = new Survey($_SESSION['SUID']);
     $types = $survey->getTypes();
     $displaySysAdmin = new DisplaySysAdmin();
     $returnStr .= $displaySysAdmin->showTypes($types);
     return $returnStr;
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:9,代码来源:smsajax.php

示例5: showAvailableTypes

 function showAvailableTypes($current)
 {
     $survey = new Survey($_SESSION['SUID']);
     $types = $survey->getTypes();
     if (sizeof($types) == 0) {
         return "";
     }
     $returnStr = '<tr><td>' . Language::labelTypeEditGeneralVariableType() . '</td><td>';
     $returnStr .= "<select id='typeselect' class='selectpicker show-tick' name=" . SETTING_TYPE . ">";
     $selected = "";
     if ($current == "" || $current == -1) {
         $selected = " SELECTED";
     }
     $returnStr .= "<option {$selected} value=-1>" . Language::optionTypeNone() . "</option>";
     foreach ($types as $type) {
         $selected = "";
         if ($type->getTyd() == $current) {
             $selected = " SELECTED";
         }
         $returnStr .= "<option {$selected} value=" . $type->getTyd() . ">" . $type->getName() . "</option>";
     }
     $returnStr .= "</select>";
     $returnStr .= '</td></tr>';
     $returnStr .= '<script type="text/javascript">
         $( document ).ready(function() {
                     
                     $("#typeselect").change(function() {                        
                         if (this.value == -1) {
                             $("#arraytypeoption").remove();
                             $("#keeptypeoption").remove();
                             $("#answertypeoption").remove();
                         }
                         else {
                             $("#arraydrop option:first").after($("<option />", { "value": "' . SETTING_FOLLOW_TYPE . '", text: "' . Language::optionsFollowType() . '", id: "arraytypeoption" }));  
                             $("#keepdrop option:first").after($("<option />", { "value": "' . SETTING_FOLLOW_TYPE . '", text: "' . Language::optionsFollowType() . '", id: "keeptypeoption" }));  
                             $("#answertype").prepend("<option value=\'' . SETTING_FOLLOW_TYPE . '\' id=\'answertypeoption\'>' . Language::optionsFollowType() . '</option>");  
                         }
                         $("#arraydrop").selectpicker("refresh");
                         $("#keepdrop").selectpicker("refresh");
                         $("#answertype").selectpicker("refresh");
                     });   
                     });
                 </script>';
     return $returnStr;
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:45,代码来源:displaysysadmin.php


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