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


PHP browsemenubar函数代码示例

本文整理汇总了PHP中browsemenubar函数的典型用法代码示例。如果您正苦于以下问题:PHP browsemenubar函数的具体用法?PHP browsemenubar怎么用?PHP browsemenubar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: returnglobal

//RL: set language for questions and labels to current admin language for browsing responses
$action = returnglobal('action');
$surveyid = returnglobal('sid');
$id = returnglobal('id');
$sDataEntryLanguage = returnglobal('lang');
$saver['scid'] = returnglobal('save_scid');
$surveytable = db_table_name("survey_" . $surveyid);
$dataentryoutput = '';
include_once "login_check.php";
$dateformatdetails = getDateFormatData($_SESSION['dateformat']);
if (!isset($sDataEntryLanguage)) {
    $sDataEntryLanguage = GetBaseLanguageFromSurveyID($surveyid);
}
$surveyinfo = getSurveyInfo($surveyid);
if (bHasSurveyPermission($surveyid, 'responses', 'read') || bHasSurveyPermission($surveyid, 'responses', 'create') || bHasSurveyPermission($surveyid, 'responses', 'update')) {
    $surveyoptions = browsemenubar($clang->gT("Data entry"));
    if (!$surveyid && !$subaction) {
        $dataentryoutput .= "<div class='header ui-widget-header'>" . $clang->gT("Data entry") . "</div>\n";
        $dataentryoutput .= "<div class='messagebox ui-corner-all'>\n" . "<div class='warningheader'>" . $clang->gT("Error") . "</div><br />\n" . $clang->gT("You have not selected a survey for data-entry.") . "<br /><br />\n" . "<input type='submit' value='" . $clang->gT("Main Admin Screen") . "' onclick=\"window.open('{$scriptname}', '_top')\" /><br />\n" . "</div>\n";
        return;
    }
    if ($subaction == "insert" && bHasSurveyPermission($surveyid, 'responses', 'create')) {
        $thissurvey = getSurveyInfo($surveyid);
        $errormsg = "";
        $dataentryoutput .= $surveyoptions . "<div class='header ui-widget-header'>" . $clang->gT("Data entry") . "</div>\n" . "\t<div class='messagebox ui-corner-all'>\n";
        $lastanswfortoken = '';
        // check if a previous answer has been submitted or saved
        $rlanguage = '';
        if (isset($_POST['token']) && $_POST['token']) {
            $tokencompleted = "";
            $tokentable = db_table_name("tokens_" . $surveyid);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:dataentry.php

示例2: browsemenubar

        $length_data = '16384';
        // Set the max text length of the Value
        break;
    default:
        $length_data = '16384';
        // Set the max text length of the Value
}
$headerComment = '*$Rev: 11664 $' . " {$quexsfilterstate} {$filterstate} {$spssver}.\n";
if (isset($_GET['dldata'])) {
    $subaction = "dldata";
}
if (isset($_GET['dlstructure'])) {
    $subaction = "dlstructure";
}
if (!isset($subaction)) {
    $exportspssoutput = browsemenubar($clang->gT('Export results'));
    $exportspssoutput .= "<div class='header ui-widget-header'>" . $clang->gT("Export result data to SPSS") . "</div>\n";
    $selecthide = "";
    $selectshow = "";
    $selectinc = "";
    switch ($filterstate) {
        case "inc":
            $selectinc = "selected='selected'";
            break;
        case "filter":
            $selecthide = "selected='selected'";
            break;
        default:
            $selectshow = "selected='selected'";
    }
    $exportspssoutput .= "<form action='{$scriptname}' id='exportspss' method='get'><ul>\n" . "<li><label for='filterinc'>" . $clang->gT("Data selection:") . "</label><select id='filterinc' name='filterinc' onchange='this.form.submit();'>\n" . "\t<option value='filter' {$selecthide}>" . $clang->gT("Completed responses only") . "</option>\n" . "\t<option value='show' {$selectshow}>" . $clang->gT("All responses") . "</option>\n" . "\t<option value='incomplete' {$selectinc}>" . $clang->gT("Incomplete responses only") . "</option>\n" . "</select></li>\n";
开发者ID:ddrmoscow,项目名称:queXS,代码行数:31,代码来源:export_data_spss.php

示例3: dirname

require_once dirname(__FILE__) . '/sessioncontrol.php';
// Set language for questions and labels to base language of this survey
if (isset($browselang) && $browselang != '') {
    $_SESSION['browselang'] = $browselang;
    $language = $_SESSION['browselang'];
} elseif (isset($_SESSION['browselang'])) {
    $language = $_SESSION['browselang'];
    $languagelist = GetAdditionalLanguagesFromSurveyID($surveyid);
    $languagelist[] = GetBaseLanguageFromSurveyID($surveyid);
    if (!in_array($language, $languagelist)) {
        $language = GetBaseLanguageFromSurveyID($surveyid);
    }
} else {
    $language = GetBaseLanguageFromSurveyID($surveyid);
}
$surveyoptions = browsemenubar($clang->gT("Browse Responses"));
$browseoutput = "";
$js_admin_includes[] = 'scripts/browse.js';
$qulanguage = GetBaseLanguageFromSurveyID($surveyid);
// Looking at a SINGLE entry
if ($subaction == "id") {
    $dateformatdetails = getDateFormatData($_SESSION['dateformat']);
    //SHOW HEADER
    if (!isset($_POST['sql']) || !$_POST['sql']) {
        $browseoutput .= $surveyoptions;
    }
    // Don't show options if coming from tokens/statistics script
    //FIRST LETS GET THE NAMES OF THE QUESTIONS AND MATCH THEM TO THE FIELD NAMES FOR THE DATABASE
    $fncount = 0;
    $fieldmap = createFieldMap($surveyid, 'full', false, false, $language);
    //add token to top of list if survey is not private
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:browse.php

示例4: asort

        $uploadcharset = 'utf8';
    }
}
if ($subaction != "upload") {
    asort($encodingsarray);
    $charsetsout = '';
    foreach ($encodingsarray as $charset => $title) {
        $charsetsout .= "<option value='{$charset}' ";
        if ($charset == 'utf8') {
            $charsetsout .= " selected ='selected'";
        }
        $charsetsout .= ">{$title} ({$charset})</option>";
    }
    //Make sure that the survey is active
    if (tableExists("survey_{$surveyid}")) {
        $vvoutput = browsemenubar($clang->gT("Import VV file")) . "<div class='header ui-widget-header'>" . $clang->gT("Import a VV survey file") . "</div>\n\t\t<form id='vvexport' enctype='multipart/form-data' method='post' action='admin.php?sid={$surveyid}'>\n\t\t<ul>\n\t\t<li><label for='the_file'>" . $clang->gT("File:") . "</label><input type='file' size=50 id='the_file' name='the_file' /></li>\n\t\t<li><label for='sid'>" . $clang->gT("Survey ID:") . "</label><input type='text' size=10 id='sid' name='sid' value='{$surveyid}' readonly='readonly' /></li>\n\t\t<li><label for='noid'>" . $clang->gT("Exclude record IDs?") . "</label><input type='checkbox' id='noid' name='noid' value='noid' checked=checked onchange='form.insertmethod.disabled=this.checked;' /></li>\n\n\t\t<li><label for='insertmethod'>" . $clang->gT("When an imported record matches an existing record ID:") . "</label><select id='insertmethod' name='insert' disabled='disabled'>\n        <option value='ignore' selected='selected'>" . $clang->gT("Report and skip the new record.") . "</option>\n        <option value='renumber'>" . $clang->gT("Renumber the new record.") . "</option>\n        <option value='replace'>" . $clang->gT("Replace the existing record.") . "</option>\n        </select></li>\n\t\t<li><label for='finalized'>" . $clang->gT("Import as not finalized answers?") . "</label><input type='checkbox' id='finalized' name='finalized' value='notfinalized' /></li>\n\t\t<li><label for='vvcharset'>" . $clang->gT("Character set of the file:") . "</label><select id='vvcharset' name='vvcharset'>\n\t\t{$charsetsout}\n\t\t</select></li></ul>\n\t\t<p><input type='submit' value='" . $clang->gT("Import") . "' />\n\t\t<input type='hidden' name='action' value='vvimport' />\n\t\t<input type='hidden' name='subaction' value='upload' />\n\t\t</form><br />";
    } else {
        $vvoutput .= "<br /><div class='messagebox'>\n\t\t<div class='header'>" . $clang->gT("Import a VV response data file") . "</div>\n\t\t<div class='warningheader'>" . $clang->gT("Cannot import the VVExport file.") . "</div>\n\t\t" . "This survey is not active. You must activate the survey before attempting to import a VVexport file." . "<br /><br />\n\t\t[<a href='{$scriptname}?sid=4'>" . $clang->gT("Return to survey administration") . "</a>]\n\t\t</div>";
    }
} else {
    $vvoutput = "<br /><div class='messagebox'>\n        <div class='header'>" . $clang->gT("Import a VV response data file") . "</div>";
    $the_full_file_path = $tempdir . "/" . $_FILES['the_file']['name'];
    if (!@move_uploaded_file($_FILES['the_file']['tmp_name'], $the_full_file_path)) {
        $vvoutput .= "<div class='warningheader'>" . $clang->gT("Error") . "</div>\n";
        $vvoutput .= sprintf($clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your %s folder."), $tempdir) . "<br /><br />\n";
        $vvoutput .= "<input type='submit' value='" . $clang->gT("Back to Response Import") . "' onclick=\"window.open('{$scriptname}?action=vvimport&sid={$surveyid}', '_self')\">\n";
        $vvoutput .= "</div><br />&nbsp;\n";
        return;
    }
    // IF WE GOT THIS FAR, THEN THE FILE HAS BEEN UPLOADED SUCCESFULLY
    $vvoutput .= "<div class='successtitle'>" . $clang->gT("Success") . "</div>\n";
开发者ID:ddrmoscow,项目名称:queXS,代码行数:31,代码来源:vvimport.php

示例5: elseif

}
if (!$subaction == "export") {
    if (incompleteAnsFilterstate() == "inc") {
        $selecthide = "";
        $selectshow = "";
        $selectinc = "selected='selected'";
    } elseif (incompleteAnsFilterstate() == "filter") {
        $selecthide = "selected='selected'";
        $selectshow = "";
        $selectinc = "";
    } else {
        $selecthide = "";
        $selectshow = "selected='selected'";
        $selectinc = "";
    }
    $vvoutput = browsemenubar($clang->gT("Export VV file")) . "<form id='vvexport' method='post' action='admin.php?action=vvexport&amp;sid={$surveyid}'>" . "<div class='header ui-widget-header'>" . $clang->gT("Export a VV survey file") . "</div>" . "<ul>" . "<li>" . "<label for='sid'>" . $clang->gT("Export Survey") . ":</label>" . "<input type='text' size='10' value='{$surveyid}' id='sid' name='sid' readonly='readonly' />" . "</li>\n" . "<li>\n" . " <label for='filterinc'>" . $clang->gT("Export") . ":</label>" . " <select name='filterinc' id='filterinc'>\n" . "  <option value='filter' {$selecthide}>" . $clang->gT("Completed responses only") . "</option>\n" . "  <option value='show' {$selectshow}>" . $clang->gT("All responses") . "</option>\n" . "  <option value='incomplete' {$selectinc}>" . $clang->gT("Incomplete responses only") . "</option>\n" . " </select>\n" . "</li>\n" . "<li>\n" . " <label for='extension'>" . $clang->gT("File Extension") . ": </label>\n" . " <input type='text' id='extension' name='extension' size='3' value='csv' /><span style='font-size: 7pt'>*</span>\n" . "</li>\n" . "</ul>\n" . "<p><input type='submit' value='" . $clang->gT("Export results") . "' />&nbsp;" . "<input type='hidden' name='subaction' value='export' />" . "</form>" . "<p><span style='font-size: 7pt'>* " . $clang->gT("For easy opening in MS Excel, change the extension to 'tab' or 'txt'") . "</span><br />\n";
} elseif (isset($surveyid) && $surveyid) {
    //Export is happening
    $extension = sanitize_paranoid_string(returnglobal('extension'));
    header("Content-Disposition: attachment; filename=vvexport_{$surveyid}." . $extension);
    header("Content-type: text/comma-separated-values; charset=UTF-8");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Pragma: cache");
    $s = "\t";
    $fieldmap = createFieldMap($surveyid, "full");
    $surveytable = "{$dbprefix}survey_{$surveyid}";
    GetBaseLanguageFromSurveyID($surveyid);
    $fieldnames = array_values($connect->MetaColumnNames($surveytable, true));
    //Create the human friendly first line
    $firstline = "";
    $secondline = "";
开发者ID:himanshu12k,项目名称:ce-www,代码行数:31,代码来源:vvexport.php

示例6: returnglobal

 * the survey can be published again to the same set of participants.
 * Partipants will see their previous answers and may change them.
 */
include_once 'login_check.php';
include 'html_functions.php';
if (!isset($surveyid)) {
    $surveyid = returnglobal('sid');
}
if (!isset($subaction)) {
    // subaction is not set, then display instructions
    $iteratesurveyoutput = browsemenubar($clang->gT('Iterate survey'));
    $iteratesurveyoutput .= "<div class='header ui-widget-header'>" . $clang->gT("Iterate survey") . "</div>\n";
    $iteratesurveyoutput .= "<div class='messagebox ui-corner-all'><div class='header ui-widget-header'>" . $clang->gT("Important instructions") . "</div>" . "<br/>" . $clang->gT("Click on the following button if you want to") . ":<br />\n" . "<ol>" . "<li>" . $clang->gT("Delete all incomplete answers that correspond to a token for which a completed answers is already recorded") . "</li>" . "<li>" . $clang->gT("Reset the completed answers to the incomplete state") . "</li>" . "<li>" . $clang->gT("Reset all your tokens to the 'not used' state") . "</li>" . "</ol><br />\n" . "<input type='button' onclick=\"if( confirm('" . $clang->gT("Are you really sure you want to *delete* some incomplete answers and reset the completed state of both answers and tokens?", "js") . "')){" . get2post("{$scriptname}?action=iteratesurvey&amp;sid={$surveyid}&amp;subaction=unfinalizeanswers") . "}\" value='" . $clang->gT("Reset answers and token completed state") . "' />" . "</div>";
}
if ($subaction == 'unfinalizeanswers') {
    $iteratesurveyoutput = browsemenubar($clang->gT('Iterate survey'));
    $baselang = GetBaseLanguageFromSurveyID($surveyid);
    $surveytable = db_table_name("survey_{$surveyid}");
    // First delete incomplete answers that correspond to a token for which a completed answers is already recorded
    // subquery in delete or update are tricky things when using the same table for delete and Select
    // see http://www.developpez.net/forums/d494961/bases-donnees/mysql/requetes/cant-specify-target-in-from-clause/
    $updateqr = "DELETE from {$surveytable} WHERE submitdate IS NULL AND token in (SELECT * FROM ( SELECT answ2.token from {$surveytable} AS answ2 WHERE answ2.submitdate IS NOT NULL) tmp );\n";
    //	$updateqr = "DELETE from $surveytable WHERE submitdate IS NULL AND token in (SELECT b.token from $surveytable AS b WHERE b.submitdate IS NOT NULL);\n";
    //error_log("TIBO query = $updateqr");
    $updateres = $connect->Execute($updateqr) or safe_die("Delete incomplete answers with duplicate tokens failed:<br />\n" . $connect->ErrorMsg() . "<br />{$updateqr}");
    // Then set all remaining answers to incomplete state
    $updateqr = "UPDATE {$surveytable} SET submitdate=NULL, lastpage=NULL;\n";
    $updateres = $connect->Execute($updateqr) or safe_die("UnFinilize answers failed:<br />\n" . $connect->ErrorMsg() . "<br />{$updateqr}");
    // Finally, reset the token completed and sent status
    $updateqr = "UPDATE " . db_table_name("tokens_{$surveyid}") . " SET sent='N', remindersent='N', remindercount=0, completed='N'";
    $updateres = $connect->Execute($updateqr) or safe_die("Couldn't reset token completed state<br />{$updateqr}<br />" . $connect->ErrorMsg());
开发者ID:karime7gezly,项目名称:OpenConextApps-LimeSurvey,代码行数:31,代码来源:iterate_survey.php

示例7: elseif

}
if (!$subaction == "export") {
    if (incompleteAnsFilterstate() == "inc") {
        $selecthide = "";
        $selectshow = "";
        $selectinc = "selected='selected'";
    } elseif (incompleteAnsFilterstate() == "filter") {
        $selecthide = "selected='selected'";
        $selectshow = "";
        $selectinc = "";
    } else {
        $selecthide = "";
        $selectshow = "selected='selected'";
        $selectinc = "";
    }
    $vvoutput = browsemenubar($clang->gT("Export VV file")) . "<form id='vvexport' method='post' action='admin.php?action=vvexport&amp;sid={$surveyid}'>" . "<div class='header ui-widget-header'>" . $clang->gT("Export a VV survey file") . "</div>" . "<ul>" . "<li>" . "<label for='sid'>" . $clang->gT("Export Survey") . ":</label>" . "<input type='text' size='10' value='{$surveyid}' id='sid' name='sid' readonly='readonly' />" . "</li>\n" . "<li>\n" . " <label for='filterinc'>" . $clang->gT("Export") . ":</label>" . " <select name='filterinc' id='filterinc'>\n" . "  <option value='filter' {$selecthide}>" . $clang->gT("Completed responses only") . "</option>\n" . "  <option value='show' {$selectshow}>" . $clang->gT("All responses") . "</option>\n" . "  <option value='incomplete' {$selectinc}>" . $clang->gT("Incomplete responses only") . "</option>\n" . " </select>\n" . "</li>\n";
    $quexsfilterstate = questionnaireSampleFilterstate();
    //queXS Addition
    include_once "../quexs.php";
    $vvoutput .= "<li><label for='quexsfilterinc'>" . T_("Questionnaire and Sample selection:") . "</label><select id='quexsfilterinc' name='quexsfilterinc'>\n" . "\t<option value='all' >" . T_("All queXS questionnaires and samples associated with this instrument") . "</option>\n" . get_questionnaire_sample_list($surveyid, $quexsfilterstate) . "</select></li>\n";
    $vvoutput .= "<li>\n" . " <label for='extension'>" . $clang->gT("File Extension") . ": </label>\n" . " <input type='text' id='extension' name='extension' size='3' value='csv' /><span style='font-size: 7pt'>*</span>\n" . "</li>\n" . "</ul>\n" . "<p><input type='submit' value='" . $clang->gT("Export results") . "' />&nbsp;" . "<input type='hidden' name='subaction' value='export' />" . "</form>" . "<p><span style='font-size: 7pt'>* " . $clang->gT("For easy opening in MS Excel, change the extension to 'tab' or 'txt'") . "</span><br />\n";
} elseif (isset($surveyid) && $surveyid) {
    //Export is happening
    $extension = sanitize_paranoid_string(returnglobal('extension'));
    header("Content-Disposition: attachment; filename=vvexport_{$surveyid}." . $extension);
    header("Content-type: text/comma-separated-values; charset=UTF-8");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Pragma: cache");
    $s = "\t";
    $fieldmap = createFieldMap($surveyid, "full");
    $surveytable = "{$dbprefix}survey_{$surveyid}";
开发者ID:ddrmoscow,项目名称:queXS,代码行数:31,代码来源:vvexport.php


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