本文整理汇总了PHP中Survey::getSections方法的典型用法代码示例。如果您正苦于以下问题:PHP Survey::getSections方法的具体用法?PHP Survey::getSections怎么用?PHP Survey::getSections使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Survey
的用法示例。
在下文中一共展示了Survey::getSections方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: showSections
function showSections()
{
$returnStr = '';
$survey = new Survey($_SESSION['SUID']);
$sections = $survey->getSections();
$displaySysAdmin = new DisplaySysAdmin();
$returnStr .= $displaySysAdmin->showSections($sections);
return $returnStr;
}
示例3: showOutputStatisticsParadata
function showOutputStatisticsParadata($content = "")
{
$survey = new Survey($_SESSION['SUID']);
//echo $_SESSION["SUID"] . '----';
$headers[] = array('link' => setSessionParamsHref(array('page' => 'sysadmin.output'), Language::headerOutput()), 'label' => Language::headerOutputData());
$headers[] = array('link' => setSessionParamsHref(array('page' => 'sysadmin.output.statistics'), Language::headerOutputStatistics()), 'label' => Language::headerOutputStatistics());
$headers[] = array('link' => '', 'label' => Language::headerOutputStatisticsParadata());
$returnStr = $this->showOutputHeader($headers);
$returnStr .= $content;
$returnStr .= $this->displayComboBox();
$surveys = new Surveys();
$surveys = $surveys->getSurveys();
if (sizeof($surveys) > 0) {
$returnStr .= "<form id=refreshform method=post>";
$returnStr .= '<input type=hidden name=page value="sysadmin.output.statistics.paradata">';
$returnStr .= '<input type=hidden name="' . SMS_POST_SURVEY . '" id="' . SMS_POST_SURVEY . '_hidden" value="' . getSurvey() . '">';
$returnStr .= '<input type=hidden name="' . SMS_POST_MODE . '" id="' . SMS_POST_MODE . '_hidden" value="' . getSurveyMode() . '">';
$returnStr .= '<input type=hidden name="' . SMS_POST_LANGUAGE . '" id="' . SMS_POST_LANGUAGE . '_hidden" value="' . getSurveyLanguage() . '">';
$returnStr .= "</form>";
$returnStr .= '<div class="well well-sm">';
$returnStr .= '<table>';
$returnStr .= '<tr><td>' . Language::labelTestSurvey() . "</td><td><select onchange='document.getElementById(\"" . SMS_POST_SURVEY . "_hidden\").value=this.value; document.getElementById(\"refreshform\").submit();' name=" . POST_PARAM_SUID . " class='selectpicker show-tick'>";
$current = new Survey(getSurvey());
foreach ($surveys as $s) {
$selected = "";
if ($s->getSuid() == $current->getSuid()) {
$selected = "SELECTED";
}
$returnStr .= "<option {$selected} value=" . $s->getSuid() . '>' . $s->getName() . '</option>';
}
$returnStr .= "</select></td></tr>";
$returnStr .= '</table><br/><br/>';
$sections = $survey->getSections();
foreach ($sections as $section) {
$returnStr .= '<a href="index.php?r=' . setSessionsParamString(array('page' => 'sysadmin.output.statistics.paradata.section', 'seid' => $section->getSeid())) . '" class="list-group-item">' . $section->getName() . ' ' . $section->getDescription() . '</a>';
}
$returnStr .= "</div>";
} else {
$returnStr .= $this->displayInfo(Language::messageNoSurveysAvailable());
}
$returnStr .= '</p></div> </div>';
//container and wrap
$returnStr .= $this->showBottomBar();
$returnStr .= $this->showFooter(false);
return $returnStr;
}
示例4: showCopyVariable
function showCopyVariable()
{
$displaySysAdmin = new DisplaySysAdmin();
if (getFromSessionParams('vsid') != "") {
$_SESSION['VSID'] = getFromSessionParams('vsid');
}
$surveys = new Surveys();
if ($surveys->getNumberOfSurveys() > 1) {
$displaySysAdmin = new DisplaySysAdmin();
return $displaySysAdmin->showCopyVariable($_SESSION['VSID']);
} else {
$survey = new Survey($_SESSION['SUID']);
if (sizeof($survey->getSections()) > 1) {
$displaySysAdmin = new DisplaySysAdmin();
return $displaySysAdmin->showCopyVariable($_SESSION['VSID']);
} else {
return $this->showCopyVariableRes();
}
}
}
示例5: showSurvey
function showSurvey($message = "")
{
$survey = new Survey($_SESSION['SUID']);
$returnStr = $this->showSysAdminHeader(Language::messageSMSTitle());
//echo "----";
$returnStr .= '<div id="wrap">';
$returnStr .= $this->showNavBar();
$returnStr .= '<div class="container">';
//echo "----";
$returnStr .= '<ol class="breadcrumb">';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.surveys'), Language::headerSurveys()) . '</li>';
$returnStr .= '<li>' . $survey->getName() . '</li>';
//echo "----";
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) {
//$returnStr .= '<script>$("#sectiondiv").load("index.php",{ \'p\': \'sysadmin.survey.sections\', \'ajax\': \'smsajax\' } );</script>';
$returnStr .= $this->showSections($survey->getSections());
$returnStr .= '<a href="' . setSessionParams(array('page' => 'sysadmin.survey.addsection')) . '">' . Language::labelSectionsAddNew() . '</a>';
} else {
if ($_SESSION['VRFILTERMODE_SURVEY'] == 1) {
$returnStr .= $this->showSettingsList();
} else {
if ($_SESSION['VRFILTERMODE_SURVEY'] == 2) {
$returnStr .= $this->showTypes($survey->getTypes());
} else {
if ($_SESSION['VRFILTERMODE_SURVEY'] == 3) {
$returnStr .= $this->showGroups($survey->getGroups());
} else {
//$returnStr .= '<script>$("#sectiondiv").load("index.php",{ \'p\': \'sysadmin.survey.sections\', \'ajax\': \'smsajax\' } );</script>';
$returnStr .= $this->showSections($survey->getSections());
$returnStr .= '<a href="' . setSessionParams(array('page' => 'sysadmin.survey.addsection')) . '">' . Language::labelSectionsAddNew() . '</a>';
}
}
}
}
$returnStr .= '</div>';
$returnStr .= $this->showSurveySideBar($survey, $_SESSION['VRFILTERMODE_SURVEY']);
$returnStr .= '</div>';
$returnStr .= '</div></div></div>';
//container and wrap
$returnStr .= $this->showBottomBar();
//echo "ddd";
$returnStr .= $this->showFooter(false);
return $returnStr;
}
示例6: displaySections
function displaySections($name, $current, $suid, $ignore = "", $multiple = '')
{
$survey = new Survey($suid);
$sections = $survey->getSections();
$returnStr = "<select class='selectpicker show-tick' name='" . $name . "'>";
foreach ($sections as $section) {
$selected = "";
if ($current == $section->getSeid()) {
$selected = "SELECTED";
}
if ($section->getSeid() != $ignore) {
$returnStr .= "<option " . $selected . " value=" . $section->getSeid() . ">" . $section->getName() . "</option>";
}
}
$returnStr .= "</select>";
return $returnStr;
}