本文整理汇总了PHP中Language::linkLogout方法的典型用法代码示例。如果您正苦于以下问题:PHP Language::linkLogout方法的具体用法?PHP Language::linkLogout怎么用?PHP Language::linkLogout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Language
的用法示例。
在下文中一共展示了Language::linkLogout方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showNavBar
public function showNavBar()
{
$returnStr = $this->showCalculator();
//language
$rgid = $this->engine->getRgid();
$variablenames = $this->engine->getDisplayed();
// begin language
global $survey;
if (getSurveyLanguageAllowChange() == LANGUAGE_CHANGE_RESPONDENT_ALLOWED) {
$allowed = explode("~", $survey->getAllowedLanguages(getSurveyMode()));
if (sizeof($allowed) > 1) {
$returnStr .= '<li class="dropdown">';
$returnStr .= ' <a href="#" class="dropdown-toggle" data-toggle="dropdown">Language <b class="caret"></b></a><ul class="dropdown-menu">';
$langs = Language::getLanguagesArray();
//getSurveyLanguages($this->engine->survey);
foreach ($langs as $lang) {
if (inArray($lang["value"], $allowed)) {
$check = '';
if ($lang["value"] == getSurveyLanguage()) {
$check = ' <span class="glyphicon glyphicon-ok"></span>';
}
$returnStr .= '<li><a href=# onclick=\'document.getElementById("r").value="' . setSessionsParamString(array_merge(array(SESSION_PARAM_PRIMKEY => $this->engine->primkey, SESSION_PARAM_RGID => $rgid, SESSION_PARAM_VARIABLES => $variablenames, SESSION_PARAM_LANGUAGE => getSurveyLanguage(), SESSION_PARAM_TIMESTAMP => time(), SESSION_PARAM_SEID => $this->engine->getSeid(), SESSION_PARAM_MAINSEID => $this->engine->getMainSeid()), array(SESSION_PARAM_NEWLANGUAGE => $lang["value"]))) . '"; document.getElementById("navigation").value="' . addslashes(Language::buttonUpdate()) . '"; document.getElementById("form").submit(); \'>' . $lang["name"] . $check . '</a></li>';
}
}
$returnStr .= '</ul></li>';
}
//end language
}
$user = new User($_SESSION['URID']);
$returnStr .= '<li class="dropdown">
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown">' . $user->getName() . ' <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-header">' . $this->engine->primkey . '</li>
<li class="dropdown-header">' . $variablenames . '</li>';
//$returnStr .= '<li><a href=# data-toggle="modal" data-target="#calculator">Calculator</a></li>';
$returnStr .= '<li><a href="#" data-toggle="modal" data-target="#calculator"><span class="glyphicon glyphicon-th"></span> Calculator</a></li>';
$returnStr .= '<li><a href="' . setSessionParams(array('page' => 'nurse.backfromsms', 'primkey' => $this->engine->primkey, 'suid' => $this->engine->getSuid())) . '&se=' . addslashes(USCIC_SMS) . '"><span class="glyphicon glyphicon-home"></span> ' . Language::linkBackToSMS() . '</a></li>
<li class="divider"></li>
<li><a href="index.php?rs=1&se=2"><span class="glyphicon glyphicon-log-out"></span> ' . Language::linkLogout() . '</a></li>
</ul>
</li>
</ul>
';
$returnStr .= '</div><!--/.nav-collapse --> </div> </div>';
return $returnStr;
}
示例2: showNavBar
public function showNavBar()
{
$returnStr = "";
//$returnStr = $this->checkForm();
if (loadvar(POST_PARAM_AJAX_LOAD) == AJAX_LOAD) {
return $returnStr;
}
if (strpos($_SESSION['LASTPAGE'], 'translator.survey') === 0) {
$surveyActive = ' active';
$outputActive = '';
$toolsActive = '';
}
if (strpos($_SESSION['LASTPAGE'], 'translator.output') === 0) {
$surveyActive = '';
$outputActive = ' active';
$toolsActive = '';
}
if (strpos($_SESSION['LASTPAGE'], 'translator.tools') === 0) {
$surveyActive = '';
$outputActive = '';
$toolsActive = ' active';
}
$user = new User($_SESSION['URID']);
$returnStr .= '
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="' . setSessionParams(array('page' => 'translator.home')) . '">' . Language::messageSMSTitle() . '</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="dropdown' . $surveyActive . '"><a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . Language::linkSurvey() . ' <b class="caret"></b></a>';
$surveys = new Surveys();
$surveys = $surveys->getSurveys();
$returnStr .= '<ul class="dropdown-menu">';
foreach ($surveys as $survey) {
$span = '';
if (isset($_SESSION['SUID']) && $_SESSION['SUID'] == $survey->getSuid()) {
$span = ' <span class="glyphicon glyphicon-chevron-down"></span>';
}
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'translator.survey', 'suid' => $survey->getSuid()), $survey->getName() . $span) . '</li>';
}
$returnStr .= '</ul>';
$returnStr .= '</li>';
$returnStr .= '<li class="dropdown' . $outputActive . '"><a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . Language::linkOutput() . ' <b class="caret"></b></a>';
$returnStr .= '<ul class="dropdown-menu">';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'translator.output.documentation'), '<span class="glyphicon glyphicon-file"></span> ' . Language::linkDocumentation()) . '</li>';
$returnStr .= '</ul></li>';
$returnStr .= '<li class="dropdown' . $toolsActive . '"><a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . Language::linkTools() . ' <b class="caret"></b></a>';
$returnStr .= '<ul class="dropdown-menu">';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'translator.tools.test'), '<span class="glyphicon glyphicon-comment"></span> ' . Language::linkTester()) . '</li>';
$returnStr .= '</ul></li>';
$returnStr .= '</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . $user->getUsername() . '<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="' . setSessionParams(array('page' => 'translator.preferences')) . '"><span class="glyphicon glyphicon-wrench"></span> ' . Language::linkPreferences() . '</a></li>
<li class="divider"></li>
<li><a href="index.php?rs=1&se=2"><span class="glyphicon glyphicon-log-out"></span> ' . Language::linkLogout() . '</a></li>
</ul>
</li>
</ul>
';
if ($search) {
$returnStr .= '
<form class="navbar-form navbar-right" role="search">
<div class="input-group" style="width:250px">
<input type="text" class="form-control">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Search</button>
</span>
</div>
</form>
';
}
$returnStr .= '
</div><!--/.nav-collapse -->
</div>
</div>
';
$returnStr .= "<div id='content'>";
return $returnStr;
}
示例3: showNavBar
public function showNavBar()
{
$returnStr = $this->showCalculator();
//language
$rgid = $this->engine->getRgid();
$variablenames = $this->getRealVariables(explode("~", $this->engine->getDisplayed()));
$variablenamesfull = $this->engine->getDisplayed();
$template = $this->engine->getTemplate();
$click = "";
if ($template != "") {
$group = $this->engine->getGroup($template);
$click = $this->engine->replaceFills($group->getClickLanguageChange());
} else {
$vars = explode("~", $variablenames);
$var = $this->engine->getVariableDescriptive($vars[0]);
$click = $this->engine->replaceFills($var->getClickLanguageChange());
}
$click = str_replace("'", "", $click);
// begin language
global $survey;
if (getSurveyLanguageAllowChange() == LANGUAGE_CHANGE_RESPONDENT_ALLOWED) {
$allowed = explode("~", $survey->getAllowedLanguages(getSurveyMode()));
if (sizeof($allowed) > 1) {
$returnStr .= '<li class="dropdown">';
$returnStr .= ' <a href="#" class="dropdown-toggle" data-toggle="dropdown">Language <b class="caret"></b></a><ul class="dropdown-menu">';
$langs = Language::getLanguagesArray();
//getSurveyLanguages($this->engine->survey);
foreach ($langs as $lang) {
if (inArray($lang["value"], $allowed)) {
$check = '';
if ($lang["value"] == getSurveyLanguage()) {
$check = ' <span class="glyphicon glyphicon-ok"></span>';
}
$returnStr .= '<li><a href=# onclick=\'document.getElementById("r").value="' . setSessionsParamString(array_merge(array(SESSION_PARAM_SURVEY => $survey->getSuid(), SESSION_PARAM_PRIMKEY => $this->engine->getPrimaryKey(), SESSION_PARAM_RGID => $rgid, SESSION_PARAM_VARIABLES => $variablenames, SESSION_PARAM_GROUP => $template, SESSION_PARAM_MODE => getSurveyMode(), SESSION_PARAM_LANGUAGE => getSurveyLanguage(), SESSION_PARAM_TEMPLATE => getSurveyTemplate(), SESSION_PARAM_TIMESTAMP => time(), SESSION_PARAM_SEID => $this->engine->getSeid(), SESSION_PARAM_MAINSEID => $this->engine->getMainSeid()), array(SESSION_PARAM_NEWLANGUAGE => $lang["value"]))) . '"; document.getElementById("navigation").value="' . addslashes(Language::buttonUpdate()) . '"; ' . $click . ' document.getElementById("form").submit(); \'>' . $lang["name"] . $check . '</a></li>';
}
}
$returnStr .= '</ul></li>';
}
//end language
}
$user = new User($_SESSION['URID']);
$returnStr .= '<li class="dropdown">
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown">' . $user->getName() . ' <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-header">' . $this->engine->primkey . '</li>
<li class="dropdown-header">' . $variablenamesfull . '</li>';
//$returnStr .= '<li><a href=# data-toggle="modal" data-target="#calculator">Calculator</a></li>';
$returnStr .= '<li><a href="#" data-toggle="modal" data-target="#calculator"><span class="glyphicon glyphicon-th"></span> ' . Language::linkCalculator() . '</a></li>';
$windowopen = 'window.open(\'tester/' . setSessionParams(array('type' => "2", 'testpage' => 'watch', 'watchurid' => $_SESSION['URID'], 'watchsuid' => $this->engine->getSuid(), 'watchseid' => $this->engine->getSeid(), 'watchmainseid' => $this->engine->getMainSeid(), 'watchrgid' => $rgid, 'watchdisplayed' => $variablenames, 'watchlanguage' => getSurveyLanguage(), 'watchmode' => getSurveyMode(), 'watchversion' => getSurveyVersion(), 'watchprimkey' => $this->engine->getPrimarykey())) . '\', \'popupWindow\', \'width=770,height=650,scrollbars=yes,top=100,left=100\'); return false;';
$javascript = ' onclick="' . $windowopen . '"';
$returnStr .= '<li><a style="cursor: pointer;" ' . $javascript . '><span class="glyphicon glyphicon-zoom-in"></span> ' . Language::linkWatch() . '</a></li>';
$windowopen = 'window.open(\'tester/' . setSessionParams(array('type' => "2", 'testpage' => 'update', 'watchurid' => $_SESSION['URID'], 'watchsuid' => $this->engine->getSuid(), 'watchseid' => $this->engine->getSeid(), 'watchmainseid' => $this->engine->getMainSeid(), 'watchrgid' => $rgid, 'watchdisplayed' => $variablenames, 'watchlanguage' => getSurveyLanguage(), 'watchmode' => getSurveyMode(), 'watchversion' => getSurveyVersion(), 'watchprimkey' => $this->engine->getPrimarykey())) . '\', \'popupWindow\', \'width=1200,height=650,scrollbars=yes,top=100,left=100\'); return false;';
$javascript = ' onclick="' . $windowopen . '"';
$returnStr .= '<li><a style="cursor: pointer;" ' . $javascript . '><span class="glyphicon glyphicon-zoom-in"></span> ' . Language::linkUpdate() . '</a></li>';
$first = $this->engine->isFirstState();
if ($first == false || $first == true && $this->engine->getForward() == true) {
if ($this->engine->getForward() == true) {
$stateid = $this->engine->getStateId() + 1;
} else {
$stateid = $this->engine->getStateId();
}
$windowopen = 'window.open(\'tester/' . setSessionParams(array('type' => "2", 'testpage' => 'jumpback', 'jumpurid' => $_SESSION['URID'], 'jumpsuid' => $this->engine->getSuid(), 'jumpstateid' => $stateid, 'jumpprimkey' => $this->engine->getPrimaryKey())) . '\', \'popupWindow\', \'width=770,height=300,scrollbars=yes,top=100,left=100\'); return false;';
$javascript = ' onclick="' . $windowopen . '"';
$returnStr .= '<li><a style="cursor: pointer;" ' . $javascript . '><span class="glyphicon glyphicon-arrow-left"></span> ' . Language::linkJumpBack() . '</a></li>';
}
$returnStr .= '<li><a href="' . setSessionParams(array('page' => 'interviewer.backfromsms', 'primkey' => $this->engine->primkey, 'suid' => $this->engine->getSuid())) . '&se=' . addslashes(USCIC_SMS) . '"><span class="glyphicon glyphicon-home"></span> ' . Language::linkBackToSMS() . '</a></li>
<li class="divider"></li>
<li><a href="index.php?rs=1&se=2"><span class="glyphicon glyphicon-log-out"></span> ' . Language::linkLogout() . '</a></li>
</ul>
</li>
</ul>
';
$returnStr .= '</div><!--/.nav-collapse --> </div> </div>';
return $returnStr;
}
示例4: showNavBar
//.........这里部分代码省略.........
$group = $this->engine->getGroup($template);
$clickmode = $this->engine->replaceFills($group->getClickModeChange());
} else {
$vars = explode("~", $variablenames);
$var = $this->engine->getVariableDescriptive($vars[0]);
$clickmode = $this->engine->replaceFills($var->getClickModeChange());
}
$clickmode = str_replace("'", "", $clickmode);
// begin language
global $survey;
$user = new User($_SESSION['URID']);
$allowedmodes = $user->getModes();
$allowedlanguages = explode("~", $user->getLanguages(getSurvey(), getSurveyMode()));
$default = $survey->getDefaultLanguage();
$ut = "sysadmin";
if ($user->getUserType() == USER_TRANSLATOR) {
$ut = "translator";
if (!inArray($default, $allowedlanguages)) {
$allowedlanguages[] = $default;
}
} else {
if ($user->GetUserType() == USER_TESTER) {
$ut = "tester";
}
}
if (getSurveyModeAllowChange() == MODE_CHANGE_RESPONDENT_ALLOWED) {
//$allowed = explode("~", $survey->getAllowedModes());
if (sizeof($allowedmodes) > 1) {
$template = $this->engine->getTemplate();
$returnStr .= '<li class="dropdown">';
$returnStr .= ' <a href="#" class="dropdown-toggle" data-toggle="dropdown">Mode <b class="caret"></b></a>';
$returnStr .= '<ul class="dropdown-menu" role="menu">';
$current = getSurveyMode();
$modes = Common::surveyModes();
foreach ($modes as $key => $mode) {
if (inArray($key, $allowedmodes)) {
$check = '';
if ($key == $current) {
$check = ' <span class="glyphicon glyphicon-ok"></span>';
}
//$returnStr .= '<li><a href=# onclick=\'document.getElementById("r").value="' . setSessionsParamString(array_merge(array(SESSION_PARAM_LASTACTION => $this->engine->getLastSurveyAction(), SESSION_PARAM_SURVEY => $survey->getSuid(), SESSION_PARAM_PRIMKEY => $this->primkey, SESSION_PARAM_RGID => $rgid, SESSION_PARAM_VARIABLES => $variablenames, SESSION_PARAM_GROUP => $template, SESSION_PARAM_MODE => $current, SESSION_PARAM_VERSION => getSurveyVersion(), SESSION_PARAM_LANGUAGE => getSurveyLanguage(), SESSION_PARAM_TIMESTAMP => time(), SESSION_PARAM_SEID => $this->engine->getSeid(), SESSION_PARAM_MAINSEID => $this->engine->getMainSeid()), array(SESSION_PARAM_NEWMODE => $key))) . '"; document.getElementById("navigation").value="' . NAVIGATION_MODE_CHANGE . '"; $("#form").submit(); \'>' . $mode . $check . '</a></li>';
$returnStr .= '<li><a href=# onclick=\'document.getElementById("r").value="' . setSessionsParamString(array_merge(array(SESSION_PARAM_SURVEY => $survey->getSuid(), SESSION_PARAM_PRIMKEY => $this->engine->getPrimaryKey(), SESSION_PARAM_RGID => $rgid, SESSION_PARAM_VARIABLES => $variablenames, SESSION_PARAM_GROUP => $template, SESSION_PARAM_MODE => getSurveyMode(), SESSION_PARAM_LANGUAGE => getSurveyLanguage(), SESSION_PARAM_TEMPLATE => getSurveyTemplate(), SESSION_PARAM_TIMESTAMP => time(), SESSION_PARAM_SEID => $this->engine->getSeid(), SESSION_PARAM_MAINSEID => $this->engine->getMainSeid()), array(SESSION_PARAM_NEWMODE => $key))) . '"; document.getElementById("navigation").value="' . addslashes(Language::buttonUpdate()) . '"; ' . $clickmode . ' document.getElementById("form").submit(); \'>' . $mode . $check . '</a></li>';
}
}
$returnStr .= '</ul></li>';
}
}
if (getSurveyLanguageAllowChange() == LANGUAGE_CHANGE_RESPONDENT_ALLOWED) {
//$allowed = explode("~", $survey->getAllowedLanguages(getSurveyMode()));
if (sizeof($allowedlanguages) > 1) {
$returnStr .= '<li class="dropdown">';
$returnStr .= ' <a href="#" class="dropdown-toggle" data-toggle="dropdown">Language <b class="caret"></b></a><ul class="dropdown-menu">';
$langs = Language::getLanguagesArray();
//getSurveyLanguages($this->engine->survey);
foreach ($langs as $lang) {
if (inArray($lang["value"], $allowedlanguages)) {
$check = '';
if ($lang["value"] == getSurveyLanguage()) {
$check = ' <span class="glyphicon glyphicon-ok"></span>';
}
$returnStr .= '<li><a href=# onclick=\'document.getElementById("r").value="' . setSessionsParamString(array_merge(array(SESSION_PARAM_SURVEY => $survey->getSuid(), SESSION_PARAM_PRIMKEY => $this->engine->getPrimaryKey(), SESSION_PARAM_RGID => $rgid, SESSION_PARAM_VARIABLES => $variablenames, SESSION_PARAM_GROUP => $template, SESSION_PARAM_MODE => getSurveyMode(), SESSION_PARAM_LANGUAGE => getSurveyLanguage(), SESSION_PARAM_TEMPLATE => getSurveyTemplate(), SESSION_PARAM_TIMESTAMP => time(), SESSION_PARAM_SEID => $this->engine->getSeid(), SESSION_PARAM_MAINSEID => $this->engine->getMainSeid()), array(SESSION_PARAM_NEWLANGUAGE => $lang["value"]))) . '"; document.getElementById("navigation").value="' . addslashes(Language::buttonUpdate()) . '"; ' . $click . ' document.getElementById("form").submit(); \'>' . $lang["name"] . $check . '</a></li>';
}
}
$returnStr .= '</ul></li>';
}
//end language
}
$user = new User($_SESSION['URID']);
$returnStr .= '<li class="dropdown">
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown">' . $user->getName() . ' <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-header">' . $this->engine->getPrimaryKey() . '</li>
<li class="dropdown-header">' . $variablenamesfull . '</li>';
$windowopen = 'window.open(\'tester/' . setSessionParams(array('reporturid' => $_SESSION['URID'], 'testpage' => 'report', 'reportsuid' => $this->engine->getSuid(), 'reportseid' => $this->engine->getSeid(), 'reportmainseid' => $this->engine->getMainSeid(), 'reportrgid' => $rgid, 'reportdisplayed' => $variablenames, 'reportlanguage' => getSurveyLanguage(), 'reportmode' => getSurveyMode(), 'reportversion' => getSurveyVersion(), 'reportprimkey' => $this->engine->getPrimarykey())) . '\', \'popupWindow\', \'width=770,height=500,scrollbars=yes,top=100,left=100\'); return false;';
$javascript = ' onclick="' . $windowopen . '"';
$returnStr .= '<li><a style="cursor: pointer;" ' . $javascript . '><span class="glyphicon glyphicon-remove-sign"></span> ' . Language::linkReportProblem() . '</a></li>';
$windowopen = 'window.open(\'tester/' . setSessionParams(array('testpage' => 'watch', 'watchurid' => $_SESSION['URID'], 'watchsuid' => $this->engine->getSuid(), 'watchseid' => $this->engine->getSeid(), 'watchmainseid' => $this->engine->getMainSeid(), 'watchrgid' => $rgid, 'watchdisplayed' => $variablenames, 'watchlanguage' => getSurveyLanguage(), 'watchmode' => getSurveyMode(), 'watchversion' => getSurveyVersion(), 'watchprimkey' => $this->engine->getPrimarykey())) . '\', \'popupWindow\', \'width=770,height=650,scrollbars=yes,top=100,left=100\'); return false;';
$javascript = ' onclick="' . $windowopen . '"';
$returnStr .= '<li><a style="cursor: pointer;" ' . $javascript . '><span class="glyphicon glyphicon-zoom-in"></span> ' . Language::linkWatch() . '</a></li>';
$first = $this->engine->isFirstState();
if ($first == false || $first == true && $this->engine->getForward() == true) {
if ($this->engine->getForward() == true) {
$stateid = $this->engine->getStateId() + 1;
} else {
$stateid = $this->engine->getStateId();
}
$windowopen = 'window.open(\'tester/' . setSessionParams(array('testpage' => 'jumpback', 'jumpurid' => $_SESSION['URID'], 'jumpsuid' => $this->engine->getSuid(), 'jumpstateid' => $stateid, 'jumpprimkey' => $this->engine->getPrimaryKey())) . '\', \'popupWindow\', \'width=770,height=300,scrollbars=yes,top=100,left=100\'); return false;';
$javascript = ' onclick="' . $windowopen . '"';
$returnStr .= '<li><a style="cursor: pointer;" ' . $javascript . '><span class="glyphicon glyphicon-arrow-left"></span> ' . Language::linkJumpBack() . '</a></li>';
}
$returnStr .= '<li><a href="' . setSessionParams(array('page' => $ut . '.tools.test', 'suid' => $this->engine->getSuid())) . '&se=' . addslashes(USCIC_SMS) . '"><span class="glyphicon glyphicon-home"></span> ' . Language::linkBackToNubis() . '</a></li>
<li class="divider"></li>
<li><a href="index.php?rs=1&se=2"><span class="glyphicon glyphicon-log-out"></span> ' . Language::linkLogout() . '</a></li>
</ul>
</li>
</ul>
';
$returnStr .= '</div><!--/.nav-collapse --> </div> </div>';
return $returnStr;
}
示例5: showNavBar
public function showNavBar()
{
$search = true;
$interviewersActive = ' class="active"';
$unassignedSampleActive = '';
$sampleActive = '';
$reportsActive = '';
if (getFromSessionParams('interviewer') != '') {
$testUser = new User(getFromSessionParams('interviewer'));
if ($testUser->getUserType() == USER_SUPERVISOR) {
$interviewersActive = '';
$sampleActive = ' class="active"';
}
}
if (startsWith($_SESSION['LASTPAGE'], 'supervisor.sample')) {
$interviewersActive = '';
$sampleActive = ' class="active"';
}
if (startsWith($_SESSION['LASTPAGE'], 'supervisor.unassignedsample')) {
$interviewersActive = '';
$unassignedSampleActive = ' class="active"';
}
if (startsWith($_SESSION['LASTPAGE'], 'supervisor.reports')) {
$interviewersActive = '';
$reportsActive = ' class="active"';
}
//TODO: Get from somewhere else!
$user = new User($_SESSION['URID']);
$returnStr = '
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="' . setSessionParams(array('page' => 'supervisor.home')) . '">' . Language::messageSMSTitle() . '</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li' . $interviewersActive . '>' . setSessionParamsHref(array('page' => 'supervisor.interviewers'), Language::linkInterviewers()) . '</li>
<li' . $sampleActive . '>' . setSessionParamsHref(array('page' => 'supervisor.sample'), Language::linkSample()) . '</li>
<li' . $unassignedSampleActive . '>' . setSessionParamsHref(array('page' => 'supervisor.unassignedsample'), Language::linkUnassignedSample()) . '</li>
<li' . $reportsActive . '>' . setSessionParamsHref(array('page' => 'supervisor.reports'), Language::linkReports()) . '</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . $user->getName() . ' <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="' . setSessionParams(array('page' => 'supervisor.preferences')) . '"><span class="glyphicon glyphicon-wrench"></span> ' . Language::linkPreferences() . '</a></li>';
if ($user->getCommunication() != SEND_RECEIVE_WORKONSERVER) {
$returnStr .= '<li><a href="' . setSessionParams(array('page' => 'supervisor.sendreceive')) . '"><span class="glyphicon glyphicon-import"></span> ' . Language::linkSendReceive() . '</a></li>';
}
$returnStr .= '<li class="divider"></li>
<li><a href="index.php?rs=1&se=2"><span class="glyphicon glyphicon-log-out"></span> ' . Language::linkLogout() . '</a></li>
</ul>
</li>
</ul>
';
if ($search) {
$returnStr .= '
<form class="navbar-form navbar-right" role="search">
<div class="input-group" style="width:250px;overflow:hidden;">
<input type="text" class="form-control" name="searchterm">';
$returnStr .= '<span class="input-group-btn">
<button class="btn btn-default" type="submit">Search</button>
</span>';
$returnStr .= setSessionParamsPost(array('page' => 'supervisor.search'));
$returnStr .= '</div>';
$returnStr .= '</form>
';
}
$returnStr .= '
</div><!--/.nav-collapse -->
</div>
</div>
';
return $returnStr;
}
示例6: showNavBar
//.........这里部分代码省略.........
}
if (startsWith($_SESSION['LASTPAGE'], 'sysadmin.survey')) {
$smsActive = '';
$surveyActive = ' active';
$outputActive = '';
$toolsActive = '';
}
if (startsWith($_SESSION['LASTPAGE'], 'sysadmin.output')) {
$smsActive = '';
$surveyActive = '';
$outputActive = ' active';
$toolsActive = '';
}
if (startsWith($_SESSION['LASTPAGE'], 'sysadmin.tools')) {
$smsActive = '';
$surveyActive = '';
$outputActive = '';
$toolsActive = ' active';
}
$returnStr = '
<!-- Fixed navbar -->
<div id="mainnavbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="' . setSessionParams(array('page' => 'sysadmin.home')) . '" class="navbar-brand">' . Language::messageSMSTitle() . '</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li' . $smsActive . '>' . setSessionParamsHref(array('page' => 'sysadmin.sms'), Language::linkSms()) . '</li>
<li class="dropdown' . $surveyActive . '"><a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . Language::linkSurvey() . ' <b class="caret"></b></a>';
$surveys = new Surveys();
$surveys = $surveys->getSurveys();
$returnStr .= '<ul class="dropdown-menu">';
if (sizeof($surveys) > 0) {
foreach ($surveys as $survey) {
$span = '';
if (isset($_SESSION['SUID']) && $_SESSION['SUID'] == $survey->getSuid()) {
$span = ' <span class="glyphicon glyphicon-chevron-down"></span>';
}
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.survey', 'suid' => $survey->getSuid()), $survey->getName() . $span, "", POST_PARAM_NOAJAX . "=" . NOAJAX) . '</li>';
}
} else {
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.survey.addsurvey'), Language::labelSurveysAddNewCaps()) . '</li>';
}
$returnStr .= '</ul>';
$returnStr .= '</li>';
$returnStr .= '<li class="dropdown' . $outputActive . '"><a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . Language::linkOutput() . ' <b class="caret"></b></a>';
$returnStr .= '<ul class="dropdown-menu">';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.output.data'), '<span class="glyphicon glyphicon-save"></span> ' . Language::linkData()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.output.statistics'), '<span class="glyphicon glyphicon-stats"></span> ' . Language::linkStatistics()) . '</li>';
$returnStr .= '<li class="divider"></li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.output.documentation'), '<span class="glyphicon glyphicon-file"></span> ' . Language::linkDocumentation()) . '</li>';
$returnStr .= '</ul></li>';
$returnStr .= '<li class="dropdown' . $toolsActive . '"><a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . Language::linkTools() . ' <b class="caret"></b></a>';
$returnStr .= '<ul class="dropdown-menu">';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.batcheditor'), '<span class="glyphicon glyphicon-tag"></span> ' . Language::linkBatchEditor()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.check'), '<span class="glyphicon glyphicon-check"></span> ' . Language::linkChecker()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.compile'), '<span class="glyphicon glyphicon-cog"></span> ' . Language::linkCompiler()) . '</li>';
if (Config::xiExtension()) {
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.xicompile'), '<span class="glyphicon glyphicon-share"></span> ' . Language::linkXiCompiler()) . '</li>';
}
$returnStr .= '<li class="divider"></li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.test'), '<span class="glyphicon glyphicon-comment"></span> ' . Language::linkTester()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.issues'), '<span class="glyphicon glyphicon-thumbs-down"></span> ' . Language::linkReported()) . '</li>';
$returnStr .= '<li class="divider"></li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.export'), '<span class="glyphicon glyphicon-export"></span> ' . Language::linkExport()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.import'), '<span class="glyphicon glyphicon-import"></span> ' . Language::linkImport()) . '</li>';
$returnStr .= '<li class="divider"></li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.clean'), '<span class="glyphicon glyphicon-trash"></span> ' . Language::linkCleaner()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.flood'), '<span class="glyphicon glyphicon-random"></span> ' . Language::linkFlood()) . '</li>';
$returnStr .= '</ul></li></ul>';
$user = new User($_SESSION['URID']);
$returnStr .= '<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . $user->getUsername() . ' <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="' . setSessionParams(array('page' => 'sysadmin.preferences')) . '"><span class="glyphicon glyphicon-wrench"></span> ' . Language::linkPreferences() . '</a></li>';
if ($user->getUserType() == USER_SYSADMIN && $user->getUserSubType() == USER_SYSADMIN_MAIN) {
$returnStr .= '<li><a href="' . setSessionParams(array('page' => 'sysadmin.users')) . '"><span class="glyphicon glyphicon-user"></span> ' . Language::linkUsers() . '</a></li>';
}
$returnStr .= '<li class="divider"></li>
<li><a ' . POST_PARAM_NOAJAX . '=' . NOAJAX . ' href="index.php?rs=1&se=2"><span class="glyphicon glyphicon-log-out"></span> ' . Language::linkLogout() . '</a></li>
</ul>
</li>
</ul>
';
$returnStr .= $this->showSearch();
$returnStr .= '
</div><!--/.nav-collapse -->
</div>
</div>
';
$returnStr .= "<div id='content'>";
return $returnStr;
}
示例7: showNavBar
//.........这里部分代码省略.........
}
if (strpos($_SESSION['LASTPAGE'], 'sysadmin.survey') === 0) {
$smsActive = '';
$surveyActive = ' active';
$outputActive = '';
$toolsActive = '';
}
if (strpos($_SESSION['LASTPAGE'], 'sysadmin.output') === 0) {
$smsActive = '';
$surveyActive = '';
$outputActive = ' active';
$toolsActive = '';
}
if (strpos($_SESSION['LASTPAGE'], 'sysadmin.tools') === 0) {
$smsActive = '';
$surveyActive = '';
$outputActive = '';
$toolsActive = ' active';
} */
$returnStr = '
<!-- Fixed navbar -->
<div id="mainnavbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand">' . Language::messageSMSTitle() . '</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">';
$returnStr .= '<li' . $respondentsActive . '>' . setSessionParamsHref(array('page' => 'nurse.respondents'), Language::linkInterviews()) . '</li>';
$returnStr .= '<li' . $followActive . '>' . setSessionParamsHref(array('page' => 'nurse.followup'), Language::labelNurseFollowUp()) . '</li>';
// $returnStr .'<li' . $smsActive . '>' . setSessionParamsHref(array('page' => 'sysadmin.sms'), Language::linkSms()) . '</li>';
/* $returnStr .= '<li class="dropdown' . $surveyActive . '"><a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . Language::linkSurvey() . ' <b class="caret"></b></a>';
$surveys = new Surveys();
$surveys = $surveys->getSurveys();
$returnStr .= '<ul class="dropdown-menu">';
foreach ($surveys as $survey) {
$span = '';
if (isset($_SESSION['SUID']) && $_SESSION['SUID'] == $survey->getSuid()) {
$span = ' <span class="glyphicon glyphicon-chevron-down"></span>';
}
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.survey', 'suid' => $survey->getSuid()), $survey->getName() . $span) . '</li>';
}
$returnStr .= '</ul>';
$returnStr .= '</li>'; */
/* $returnStr .= '<li class="dropdown' . $outputActive . '"><a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . Language::linkOutput() . ' <b class="caret"></b></a>';
$returnStr .= '<ul class="dropdown-menu">';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.output.data'), '<span class="glyphicon glyphicon-save"></span> ' . Language::linkData()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.output.statistics'), '<span class="glyphicon glyphicon-stats"></span> ' . Language::linkStatistics()) . '</li>';
$returnStr .= '<li class="divider"></li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.output.documentation'), '<span class="glyphicon glyphicon-file"></span> ' . Language::linkDocumentation()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.output.screendumps'), '<span class="glyphicon glyphicon-screenshot"></span> ' . Language::linkScreendumps()) . '</li>';
$returnStr .= '</ul></li>'; */
/* $returnStr .= '<li class="dropdown' . $toolsActive . '"><a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . Language::linkTools() . ' <b class="caret"></b></a>';
$returnStr .= '<ul class="dropdown-menu">';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.check'), '<span class="glyphicon glyphicon-check"></span> ' . Language::linkChecker()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.compile'), '<span class="glyphicon glyphicon-cog"></span> ' . Language::linkCompiler()) . '</li>';
$returnStr .= '<li class="divider"></li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.test'), '<span class="glyphicon glyphicon-comment"></span> ' . Language::linkTest()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.flood'), '<span class="glyphicon glyphicon-random"></span> ' . Language::linkFlood()) . '</li>';
$returnStr .= '<li class="divider"></li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.export'), '<span class="glyphicon glyphicon-export"></span> ' . Language::linkExport()) . '</li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.import'), '<span class="glyphicon glyphicon-import"></span> ' . Language::linkImport()) . '</li>';
$returnStr .= '<li class="divider"></li>';
$returnStr .= '<li>' . setSessionParamsHref(array('page' => 'sysadmin.tools.clean'), '<span class="glyphicon glyphicon-trash"></span> ' . Language::linkCleaner()) . '</li>';
$returnStr .= '</ul></li>'; */
$returnStr .= '</ul>';
$user = new User($_SESSION['URID']);
$returnStr .= '<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . $user->getUsername() . ' <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="' . setSessionParams(array('page' => 'sysadmin.preferences')) . '"><span class="glyphicon glyphicon-wrench"></span> ' . Language::linkPreferences() . '</a></li>';
if (isFieldNurse($user)) {
//send/receive button
$returnStr .= '<li><a href="' . setSessionParams(array('page' => 'interviewer.sendreceive')) . '"><span class="glyphicon glyphicon-import"></span> ' . Language::linkSendReceive() . '</a></li>';
}
if ($user->getUserType() == USER_SYSADMIN) {
$returnStr .= '<li><a href="' . setSessionParams(array('page' => 'sysadmin.users')) . '"><span class="glyphicon glyphicon-user"></span> ' . Language::linkUsers() . '</a></li>';
}
$returnStr .= '<li class="divider"></li>
<li><a ' . POST_PARAM_NOAJAX . '=' . NOAJAX . ' href="index.php?rs=1&se=2"><span class="glyphicon glyphicon-log-out"></span> ' . Language::linkLogout() . '</a></li>
</ul>
</li>
</ul>
';
$returnStr .= $this->showSearch();
$returnStr .= '
</div><!--/.nav-collapse -->
</div>
</div>
';
$returnStr .= "<div id='content'>";
return $returnStr;
}
示例8: showNavBar
public function showNavBar()
{
if (loadvar(POST_PARAM_AJAX_LOAD) == AJAX_LOAD) {
return;
}
$householdsActive = '';
$reportsActive = '';
$dataActive = '';
$documentationActive = '';
$sampleActive = '';
if (startsWith(getFromSessionParams('page'), 'researcher.reports')) {
$reportsActive = ' class="active"';
}
if (startsWith(getFromSessionParams('page'), 'researcher.documentation')) {
$documentationActive = ' class="active"';
}
if (startsWith(getFromSessionParams('page'), 'researcher.data')) {
$dataActive = ' class="active"';
}
if (startsWith(getFromSessionParams('page'), 'researcher.sample')) {
$sampleActive = ' class="active"';
}
if (startsWith(getFromSessionParams('page'), 'researcher.households')) {
$householdsActive = ' class="active"';
}
$returnStr = '
<!-- Fixed navbar -->
<div id="mainnavbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="' . setSessionParams(array('page' => 'researcher.home')) . '">' . Language::messageSMSTitle() . '</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">';
$returnStr .= '<li' . $reportsActive . '>' . setSessionParamsHref(array('page' => 'researcher.reports'), Language::linkReports()) . '</li>';
$returnStr .= '<li' . $dataActive . '>' . setSessionParamsHref(array('page' => 'researcher.data'), Language::linkData()) . '</li>';
$returnStr .= '<li' . $documentationActive . '>' . setSessionParamsHref(array('page' => 'researcher.output.documentation'), Language::linkDocumentation()) . '</li>';
// $returnStr .= '<li' . $sampleActive . '>' . setSessionParamsHref(array('page' => 'researcher.sample'), Language::linkUnassigned()) . '</li>';
$returnStr .= '</ul>';
$user = new User($_SESSION['URID']);
$returnStr .= '<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . $user->getUsername() . ' <b class="caret"></b></a>
<ul class="dropdown-menu">';
// commenting out preferences option <li><a href="' . setSessionParams(array('page' => 'sysadmin.preferences')) . '"><span class="glyphicon glyphicon-wrench"></span> ' . Language::linkPreferences() . '</a></li>';
//$returnStr .= '<li class="divider"></li>';
$returnStr .= '<li><a ' . POST_PARAM_NOAJAX . '=' . NOAJAX . ' href="index.php?rs=1&se=2"><span class="glyphicon glyphicon-log-out"></span> ' . Language::linkLogout() . '</a></li>
</ul>
</li>
</ul>
';
// $returnStr .= $this->showSearch();
$returnStr .= '
</div><!--/.nav-collapse -->
</div>
</div>
';
$returnStr .= "<div id='content'>";
return $returnStr;
}
示例9: showNavBar
public function showNavBar()
{
if (loadvar(POST_PARAM_AJAX_LOAD) == AJAX_LOAD) {
return;
}
$testActive = '';
$reportedActive = '';
if (!isset($_SESSION['LASTPAGE'])) {
$_SESSION['LASTPAGE'] = 'tester.home';
}
if (strpos($_SESSION['LASTPAGE'], 'tester.tools.test') === 0) {
$testActive = ' active';
} else {
if (strpos($_SESSION['LASTPAGE'], 'tester.tools.reported') === 0) {
$testActive = '';
$reportedActive = ' active';
}
}
$returnStr = '
<!-- Fixed navbar -->
<div id="mainnavbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="' . setSessionParams(array('page' => 'tester.home')) . '">' . Language::messageSMSTitle() . '</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">';
$returnStr .= '<li class="' . $testActive . '">' . setSessionParamsHref(array('page' => 'tester.tools.test'), Language::linkTest()) . '</li>';
$returnStr .= '<li class="' . $reportedActive . '">' . setSessionParamsHref(array('page' => 'tester.tools.reported'), Language::linkReported()) . '</li>';
$returnStr .= '</ul>';
$user = new User($_SESSION['URID']);
$returnStr .= '<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a data-hover="dropdown" class="dropdown-toggle" data-toggle="dropdown">' . $user->getUsername() . ' <b class="caret"></b></a>
<ul class="dropdown-menu">';
$returnStr .= '<li><a ' . POST_PARAM_NOAJAX . '=' . NOAJAX . ' href="index.php?rs=1&se=2"><span class="glyphicon glyphicon-log-out"></span> ' . Language::linkLogout() . '</a></li>
</ul>
</li>
</ul>';
$returnStr .= '
</div><!--/.nav-collapse -->
</div>
</div>
';
$returnStr .= "<div id='content'>";
return $returnStr;
}
示例10: loadvar
</div>';
$returnStr .= '<tr><td valign=top>' . Language::labelRemark() . '</td><td colspan=3>';
$returnStr .= '<textarea class="form-control" name="contactremark">' . loadvar('contactremark') . '</textarea>';
$returnStr .= '</td></tr>';
$returnStr .= '<tr><td style="width:80px">' . Language::labelAppointment() . '</td><td style="width:220px">';
$returnStr .= $this->displayDateTimePicker('contactappointment', 'contactappointment', loadvar('contactappointment'), getSMSLanguagePostFix(getSMSLanguage()), "true", "true", Config::usFormatSMS());
//echo '<Br/><br/><br/>------' . $readyStr;
$returnStr .= '</td><td colspan=2></td></tr>';
$returnStr .= '</table>';
$returnStr .= '<hr>';
$returnStr .= '<button type="submit" class="btn btn-default navbar-btn">' . Language::buttonAddContact() . '</button>';
$returnStr .= '</form><br/>';
$returnStr .= $this->displayWarning(Language::messageSelectContactOutcome(), "outcomehelp");
//'<div class="alert alert-info" id="outcomehelp">' . Language::messageSelectContactOutcome() . '</div>';
$returnStr .= '</div>';
$returnStr .= $this->showSectionSideBar($respondentOrHousehold);
$returnStr .= '</div>';
//END CONTENT
$returnStr .= '
<script>
$(document).ready(function() {
$(\'#outcomecode\').change(function() {
$(\'#contactwithdiv\').css("display", "none");
var element = $(this).find(\'option\').filter(\':selected\').val();';
$check = array();
$followup = Language::optionsDispositionContactCode($respondentOrHousehold);
foreach ($followup as $option => $follow) {
if ($follow[0] == '1') {
$check[] = $option;
}
}
$returnStr .= 'if (element == "' . implode($check, '" || element == "') . '") {';
//$returnStr .= 'alert("ADASD");';
$returnStr .= '$(\'#contactwithdiv\').css("display", "block"); }';
$returnStr .= ' switch(element){';
$messageDispositionCodes = Language::optionsDispositionContactCode($respondentOrHousehold);
foreach ($messageDispositionCodes as $option => $message) {
$returnStr .= 'case "' . $option . '": $( "#outcomehelp" ).html("' . addslashes($message[2]) . '"); break;';
}
$returnStr .= 'default: $( "#outcomehelp" ).html("' . addslashes(Language::messageSelectContactOutcome()) . '");';