本文整理汇总了PHP中get_operator_id函数的典型用法代码示例。如果您正苦于以下问题:PHP get_operator_id函数的具体用法?PHP get_operator_id怎么用?PHP get_operator_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_operator_id函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_operator_id
* Database file
*/
include "db.inc.php";
/**
* Authentication
*/
require "auth-interviewer.php";
/**
* XHTML functions
*/
include "functions/functions.xhtml.php";
/**
* Operator functions
*/
include "functions/functions.operator.php";
$operator_id = get_operator_id();
$state = is_on_call($operator_id);
$js = array("js/popup.js");
if (browser_ie()) {
$js[] = "js/window_ie6_interface2.js";
} else {
$js[] = "js/window_interface2.js";
}
if (AUTO_LOGOUT_MINUTES !== false) {
$js[] = "include/jquery/jquery-1.4.2.min.js";
$js[] = "js/childnap.js";
}
xhtml_head(T_("Status"), false, array("include/bootstrap/css/bootstrap.min.css", "css/status_interface2.css"), $js);
$ca = get_call_attempt($operator_id, false);
if ($ca) {
$respondent_id = get_respondent_id($ca);
开发者ID:ddrmoscow,项目名称:queXS,代码行数:31,代码来源:status_interface2.php
示例2: T_
<i class="fa fa-user-secret fa-lg fa-fw "></i><?php
print T_("Client panel");
?>
</a>
</li>
<li class="dropdown pull-right user-data">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style=" min-width: 160px;">
<i class="fa fa-user fa-fw "></i><?php
print T_("Logged as:") . " " . $username;
?>
</a>
<!--- User menu // not connected to pages so not working yet // could be hidden -->
<ul class="dropdown-menu" role="menu">
<li><a href="?g=5&page=operatorlist.php?edit=<?php
print get_operator_id();
?>
"><i class="fa fa-cogs fa-fw "></i> <?php
print T_("Settings");
?>
</a></li>
<!--- <li><a href="../screenloc.php"><i class="fa fa-lock fa-fw "></i> <?php
print T_("Lock Screen");
?>
</a></li> -->
<li><a href="../include/limesurvey/admin/admin.php?action=logout"><i class="fa fa-sign-out fa-fw "></i> <?php
print T_("Logout");
?>
</a></li>
</ul>
</li>
开发者ID:ddrmoscow,项目名称:queXS,代码行数:31,代码来源:index.php
示例3: display_outcomes
/**
* Display appropriate outcomes based on current call attempt status
*
* @param int $contacted 0 for not contacted, 1 for contacted (a person on the phone)
* @param int $ca Call attempt id
* @param int $case_id The Case id
*
*/
function display_outcomes($contacted, $ca, $case_id)
{
global $db;
$completed = limesurvey_is_completed($case_id);
//see if the case is completed
if ($completed) {
$sql = "SELECT outcome_id,description,contacted\r\n\t\t\tFROM outcome\r\n\t\t\tWHERE outcome_id = 10";
} else {
if (limesurvey_is_quota_full($case_id)) {
$sql = "SELECT outcome_id,description,contacted\r\n\t\t\tFROM outcome\r\n\t\t\tWHERE outcome_id = 32";
} else {
//see if we have made an appointment on this call attempt
$sql = "SELECT appointment_id\r\n\t\t\tFROM appointment\r\n\t\t\tWHERE completed_call_id IS NULL\r\n\t\t\tAND call_attempt_id = '{$ca}'";
$rs = $db->GetAll($sql);
$outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q JOIN `case` as c ON (c.questionnaire_id =q.questionnaire_id) WHERE c.case_id = {$case_id}");
if (!empty($rs)) {
//we have an appointment made ... only select appointment ID's
$sql = "SELECT outcome_id,description,contacted\r\n\t\t\t\tFROM outcome\r\n\t\t\t\tWHERE outcome_type_id = '5'\r\n\t\t\t\tAND outcome_id IN ({$outcomes})";
} else {
if ($contacted) {
$contacted = bigintval($contacted);
} else {
print "<div class=\"form-group\" ><a href=\"?contacted=1\" class=\"btn btn-info\" style=\"margin-left: 15px; margin-right: 30px; min-width: 150px;\">" . T_("CONTACTED") . "</a>";
print "<a href=\"?contacted=0\" class=\"btn btn-default\" style=\"margin-left: 30px; margin-right: 15px; min-width: 150px;\">" . T_("NOT CONTACTED") . "</a></div>";
if (isset($_GET['contacted'])) {
$contacted = bigintval($_GET['contacted']);
}
}
if ($contacted == 1 || $contacted === 0) {
$sql = "SELECT outcome_id,description,contacted\r\n\t\t\t\t\tFROM outcome\r\n\t\t\t\t\tWHERE outcome_type_id != '5'\r\n\t\t\t\t\tAND contacted = '{$contacted}'\r\n\t\t\t\t\tAND outcome_id IN ({$outcomes})\r\n\t\t\t\t\tAND outcome_id NOT IN(10,32,42,43,44,45)";
//don't show completed if not, Lime_Quota_full if not, hide max calls as they supposed to be automatic or admin-privileged
}
}
}
}
$rs = $db->GetAll($sql);
print "<div class=\"panel-body\">";
if (!empty($rs)) {
$do = false;
$lime_sid = get_limesurvey_id(get_operator_id());
//Check to see if we have sent an email on this call and set the default outcome
$sql = "SELECT 41\r\n\t\t\tFROM `case` as c, " . LIME_PREFIX . "tokens_{$lime_sid} as t\r\n\t\t\tWHERE t.sent = '{$ca}'\r\n\t\t\tAND c.case_id = {$case_id}\r\n\t\t\tAND t.token = c.token";
$do = $db->GetOne($sql);
if (isset($_GET['defaultoutcome'])) {
$do = bigintval($_GET['defaultoutcome']);
}
foreach ($rs as $r) {
if ($do == $r['outcome_id']) {
$selected = "checked='checked'";
} else {
$selected = "";
}
if (isset($r['contacted']) && $r['contacted'] == 1) {
$highlight = "";
} else {
$highlight = "style='color:black;'";
}
print "<div><a><label {$highlight} class='btn-link'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' {$selected} style='float:left'/> " . T_($r['description']) . "</label></a></div>";
}
$_POST['confirm'] = true;
//check that outcome selected
}
print "</div>";
}
开发者ID:ddrmoscow,项目名称:queXS,代码行数:72,代码来源:call_interface2.php
示例4: GetAttributeValue
/**
* Retrieves the token attribute value from the related token table
*
* @param mixed $surveyid The survey ID
* @param mixed $attrName The token-attribute field name
* @param mixed $token The token code
* @return string The token attribute value (or null on error)
*/
function GetAttributeValue($surveyid, $attrName, $token)
{
global $dbprefix, $connect;
$attrName = strtolower($attrName);
if ($attrName == 'callattempts' || $attrName == 'onappointment' || $attrName == 'perccomplete' || $attrName == 'messagesleft') {
include_once "quexs.php";
$quexs_operator_id = get_operator_id();
$quexs_case_id = get_case_id($quexs_operator_id);
if ($quexs_case_id) {
if ($attrName == 'callattempts') {
return get_call_attempts($quexs_case_id);
} else {
if ($attrName == 'onappointment') {
return is_on_appointment($quexs_case_id, $quexs_operator_id);
} else {
if ($attrName == 'perccomplete') {
return get_percent_complete($quexs_case_id);
} else {
if ($attrName == 'messagesleft') {
return get_messages_left($quexs_case_id);
}
}
}
}
} else {
return 0;
}
} else {
if (!tableExists('tokens_' . $surveyid) || !in_array($attrName, GetTokenConditionsFieldNames($surveyid))) {
return null;
}
}
$sanitized_token = $connect->qstr($token, get_magic_quotes_gpc());
$surveyid = sanitize_int($surveyid);
$query = "SELECT {$attrName} FROM {$dbprefix}tokens_{$surveyid} WHERE token={$sanitized_token}";
$result = db_execute_num($query);
$count = $result->RecordCount();
if ($count != 1) {
return null;
} else {
$row = $result->FetchRow();
return $row[0];
}
}
开发者ID:ddrmoscow,项目名称:queXS,代码行数:52,代码来源:common_functions.php
示例5: display_outcomes
/**
* Display appropriate outcomes based on current call attempt status
*
* @param int $contacted 0 for not contacted, 1 for contacted (a person on the phone)
* @param int $ca Call attempt id
* @param int $case_id The Case id
*
*/
function display_outcomes($contacted, $ca, $case_id)
{
global $db;
$completed = limesurvey_is_completed($case_id);
//see if the case is completed
if ($completed) {
$sql = "SELECT outcome_id,description\r\n\t\t\tFROM outcome\r\n\t\t\tWHERE outcome_id = 10";
} else {
if (limesurvey_is_quota_full($case_id)) {
$sql = "SELECT outcome_id,description\r\n\t\t\tFROM outcome\r\n\t\t\tWHERE outcome_id = 32";
} else {
//see if we have made an appointment on this call attempt
$sql = "SELECT appointment_id\r\n\t\t\tFROM appointment\r\n\t\t\tWHERE completed_call_id IS NULL\r\n\t\t\tAND call_attempt_id = '{$ca}'";
$rs = $db->GetAll($sql);
$outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q JOIN `case` as c ON (c.questionnaire_id =q.questionnaire_id) WHERE c.case_id = {$case_id}");
if (!empty($rs)) {
//we have an appointment made ... only select appointment ID's
$sql = "SELECT outcome_id,description\r\n\t\t\t\tFROM outcome\r\n\t\t\t\tWHERE outcome_type_id = '5'\r\n\t\t\t\tAND outcome_id IN ({$outcomes})";
} else {
if ($contacted === false) {
$ctd = "";
} else {
$contacted = bigintval($contacted);
$ctd = "AND contacted = '{$contacted}'";
}
$sql = "SELECT outcome_id,description\r\n\t\t\t\t\tFROM outcome\r\n\t\t\t\t\tWHERE outcome_type_id != '5'\r\n\t\t\t\t\t{$ctd}\r\n\t\t\t\t\tAND outcome_id IN ({$outcomes})\r\n\t\t\t\t\tAND outcome_id NOT IN(10,32,42,43,44,45)";
//don't show completed if not, Lime_Quota_full if not, hide max calls as they supposed to be automatic or admin-privileged
}
}
}
$rs = $db->GetAll($sql);
print "<div>";
if (!empty($rs)) {
$lime_sid = get_limesurvey_id(get_operator_id());
//Check to see if we have sent an email on this call and set the default outcome
$sql = "SELECT 41\r\n\t\t\tFROM `case` as c, " . LIME_PREFIX . "tokens_{$lime_sid} as t\r\n\t\t\tWHERE t.sent = '{$ca}'\r\n\t\t\tAND c.case_id = {$case_id}\r\n\t\t\tAND t.token = c.token";
$do = $db->GetOne($sql);
if (isset($_GET['defaultoutcome'])) {
$do = bigintval($_GET['defaultoutcome']);
}
foreach ($rs as $r) {
if ($do == $r['outcome_id']) {
$selected = "checked='checked'";
} else {
$selected = "";
}
print "<div><label class='label'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' {$selected}/>" . T_($r['description']) . "</label></div>";
}
}
print "</div>";
}
开发者ID:ddrmoscow,项目名称:queXS,代码行数:59,代码来源:call.php
示例6: get_operator_id
* Display functions
*/
include "../functions/functions.display.php";
/**
* Performance functions
*/
include "../functions/functions.performance.php";
/**
* Operator functions
*/
include "../functions/functions.operator.php";
/**
* Input functions
*/
include "../functions/functions.input.php";
$admin_operator_id = get_operator_id();
$questionnaire_id = false;
if (isset($_GET['questionnaire_id'])) {
$questionnaire_id = bigintval($_GET['questionnaire_id']);
}
$css = array("../include/bootstrap/css/bootstrap.min.css", "../include/bootstrap/css/bootstrap-theme.min.css", "../include/font-awesome/css/font-awesome.css", "../css/custom.css");
$js_head = array("../include/jquery/jquery.min.js", "../include/bootstrap/js/bootstrap.min.js");
$js_foot = array("../js/window.js", "../js/custom.js");
xhtml_head(T_("Questionnaire Outcomes"), true, $css, $js_head);
print "<h3 class='col-sm-4 pull-left text-right'>" . T_("Select a questionnaire") . "</h3>";
display_questionnaire_chooser($questionnaire_id, false, "pull-left col-sm-4", "form-control");
print "<div class='clearfix form-group'></div>";
if ($questionnaire_id != false) {
//print "<h1>" . T_("Outcomes") . "</h1>";
print "<div class='col-sm-4'><div class='panel panel-body'><h5>" . T_("Sample status") . "</h5>";
$sql = "SELECT CASE WHEN (c.sample_id is not null) = 1 THEN '" . TQ_("Drawn from sample") . "' ELSE '" . TQ_("Remain in sample") . "' END as drawn,\r\n\t\t\tcount(*) as count\r\n\t\tFROM sample as s\r\n\t\tJOIN questionnaire_sample as qs ON (qs.questionnaire_id = '{$questionnaire_id}' and qs.sample_import_id = s.import_id)\r\n\t\tLEFT JOIN `case` as c ON (c.questionnaire_id = qs.questionnaire_id and c.sample_id = s.sample_id)\r\n\t\tGROUP BY (c.sample_id is not null)";
开发者ID:ddrmoscow,项目名称:queXS,代码行数:31,代码来源:outcomes.php
示例7: get_start_interview_url
/**
* Get start interviewer URL
*
* @return string The URL to start the interview
*/
function get_start_interview_url()
{
$db = newADOConnection(DB_TYPE);
$db->Connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
$db->SetFetchMode(ADODB_FETCH_ASSOC);
$operator_id = get_operator_id();
$url = QUEXS_URL . "nocaseavailable.php";
$case_id = get_case_id($operator_id);
if ($case_id) {
$sql = "SELECT token\r\n\t\t\tFROM `case`\r\n\t\t\tWHERE case_id = {$case_id}";
$token = $db->GetOne($sql);
$sid = get_limesurvey_id($operator_id);
$url = LIME_URL . "index.php?interviewer=interviewer&loadall=reload&sid={$sid}&token={$token}&lang=" . DEFAULT_LOCALE;
$questionnaire_id = get_questionnaire_id($operator_id);
//get prefills
$sql = "SELECT lime_sgqa,value\r\n FROM questionnaire_prefill\r\n WHERE questionnaire_id = '{$questionnaire_id}'";
$pf = $db->GetAll($sql);
if (!empty($pf)) {
foreach ($pf as $p) {
$url .= "&" . $p['lime_sgqa'] . "=" . quexs_template_replace($p['value']);
}
}
}
return $url;
}
开发者ID:ddrmoscow,项目名称:queXS,代码行数:30,代码来源:quexs.php
示例8: array
*/
include "functions/functions.xhtml.php";
/**
* Operator functions
*/
include "functions/functions.operator.php";
$js = false;
if (AUTO_LOGOUT_MINUTES !== false) {
$js = array("include/jquery/jquery-1.4.2.min.js", "js/childnap.js");
}
xhtml_head(T_("Call List"), false, array("css/table.css"), $js, false, 60);
//List the case call history
// display in respondent time so that the operator will be able to
// quote verbatim to the respondent if necessary
$db->StartTrans();
$case_id = get_case_id(get_operator_id());
if ($case_id) {
global $db;
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',r.Time_zone_name),'" . DATE_TIME_FORMAT . "') as start,CONVERT_TZ(c.end,'UTC',r.Time_zone_name) as end, op.firstName, op.lastName, o.description as des, cp.phone as cphone\r\n\t\tFROM `call` as c\r\n\t\tJOIN (operator as op, outcome as o, respondent as r, contact_phone as cp) on (c.operator_id = op.operator_id and c.outcome_id = o.outcome_id and r.respondent_id = c.respondent_id and c.contact_phone_id = cp.contact_phone_id)\r\n\t\tWHERE c.case_id = '{$case_id}'\r\n\t\tORDER BY c.start DESC";
$rs = $db->GetAll($sql);
if (empty($rs)) {
print "<p>" . T_("No calls made") . "</p>";
} else {
translate_array($rs, array("des"));
xhtml_table($rs, array("start", "des", "cphone", "firstName"), array(T_("Date/Time"), T_("Outcome"), T_("Number called"), T_("Operator")));
}
} else {
print "<p>" . T_("No case") . "</p>";
}
xhtml_foot();
$db->CompleteTrans();
开发者ID:ddrmoscow,项目名称:queXS,代码行数:31,代码来源:calllist.php
示例9: do_multipleshorttext
function do_multipleshorttext($ia)
{
global $dbprefix, $clang, $thissurvey;
$answer = '';
$qidattributes = getQuestionAttributes($ia[0], $ia[4]);
if ($qidattributes['numbers_only'] == 1) {
$sSeperator = getRadixPointData($thissurvey['surveyls_numberformat']);
$sSeperator = $sSeperator['seperator'];
$checkconditionFunction = "fixnum_checkconditions";
} else {
$checkconditionFunction = "checkconditions";
}
if (intval(trim($qidattributes['maximum_chars'])) > 0) {
// Only maxlength attribute, use textarea[maxlength] jquery selector for textarea
$maximum_chars = intval(trim($qidattributes['maximum_chars']));
$maxlength = "maxlength='{$maximum_chars}' ";
} else {
$maxlength = "";
}
if (trim($qidattributes['text_input_width']) != '') {
$tiwidth = $qidattributes['text_input_width'];
} else {
$tiwidth = 20;
}
if (trim($qidattributes['prefix']) != '') {
$prefix = $qidattributes['prefix'];
} else {
$prefix = '';
}
if (trim($qidattributes['suffix']) != '') {
$suffix = $qidattributes['suffix'];
} else {
$suffix = '';
}
if ($thissurvey['nokeyboard'] == 'Y') {
vIncludeKeypad();
$kpclass = "text-keypad";
} else {
$kpclass = "";
}
if ($qidattributes['random_order'] == 1) {
$ansquery = "SELECT * FROM {$dbprefix}questions WHERE parent_qid={$ia['0']} AND language='" . $_SESSION['s_lang'] . "' ORDER BY " . db_random();
} else {
$ansquery = "SELECT * FROM {$dbprefix}questions WHERE parent_qid={$ia['0']} AND language='" . $_SESSION['s_lang'] . "' ORDER BY question_order";
}
$ansresult = db_execute_assoc($ansquery);
//Checked
$anscount = $ansresult->RecordCount() * 2;
//$answer .= "\t<input type='hidden' name='MULTI$ia[1]' value='$anscount'>\n";
$fn = 1;
$answer_main = '';
$label_width = 0;
if ($anscount == 0) {
$inputnames = array();
$answer_main .= ' <li>' . $clang->gT('Error: This question has no answers.') . "</li>\n";
} else {
if (trim($qidattributes['display_rows']) != '') {
//question attribute "display_rows" is set -> we need a textarea to be able to show several rows
$drows = $qidattributes['display_rows'];
while ($ansrow = $ansresult->FetchRow()) {
$myfname = $ia[1] . $ansrow['title'];
if ($ansrow['question'] == "") {
$ansrow['question'] = " ";
}
$quexs_answer = false;
if (strncasecmp($ansrow['question'], "{SAMPLEUPDATE:", 14) == 0) {
$ansrow['question'] = substr($ansrow['question'], 14, -1);
//remove token text
include_once 'quexs.php';
$quexs_operator_id = get_operator_id();
$quexs_case_id = get_case_id($quexs_operator_id);
if ($quexs_case_id) {
$quexs_answer = get_sample_variable($ansrow['question'], $quexs_case_id);
$tiwidth = strlen($quexs_answer) + 5;
$maxsize = $tiwidth + 255;
}
}
list($htmltbody2, $hiddenfield) = return_array_filter_strings($ia, $qidattributes, $thissurvey, $ansrow, $myfname, '', $myfname, "li");
$answer_main .= "\t{$htmltbody2}\n" . "<label for=\"answer{$myfname}\">{$ansrow['question']}</label>\n" . "\t<span>\n" . $prefix . "\n" . '
<textarea class="textarea ' . $kpclass . '" name="' . $myfname . '" id="answer' . $myfname . '"
rows="' . $drows . '" cols="' . $tiwidth . '" ' . $maxlength . ' onkeyup="' . $checkconditionFunction . '(this.value, this.name, this.type);" >';
if ($label_width < strlen(trim(strip_tags($ansrow['question'])))) {
$label_width = strlen(trim(strip_tags($ansrow['question'])));
}
if ($quexs_answer !== false) {
$answer_main .= $quexs_answer;
} else {
if (isset($_SESSION[$myfname])) {
$dispVal = $_SESSION[$myfname];
if ($qidattributes['numbers_only'] == 1) {
$dispVal = str_replace('.', $sSeperator, $dispVal);
}
$answer_main .= htmlspecialchars(htmlspecialchars($dispVal));
}
}
$answer_main .= "</textarea>\n" . $suffix . "\n\t</span>\n" . "\t</li>\n";
$fn++;
$inputnames[] = $myfname;
}
} else {
//.........这里部分代码省略.........
开发者ID:ddrmoscow,项目名称:queXS,代码行数:101,代码来源:qanda.php
示例10: check_quota
/**
* check_quota() returns quota information for the current survey
* @param string $checkaction - action the function must take after completing:
* enforce: Enforce the Quota action
* return: Return the updated quota array from getQuotaAnswers()
* @param string $surveyid - Survey identification number
* @return array - nested array, Quotas->Members->Fields, includes quota status and which members matched in session.
*/
function check_quota($checkaction, $surveyid)
{
if (!isset($_SESSION['s_lang'])) {
return;
}
global $thistpl, $clang, $clienttoken, $publicurl;
$global_matched = false;
$quota_info = getQuotaInformation($surveyid, $_SESSION['s_lang']);
$x = 0;
if (count($quota_info) > 0) {
// Check each quota on saved data to see if it is full
$querycond = array();
foreach ($quota_info as $quota) {
if (count($quota['members']) > 0) {
$fields_list = array();
// Keep a list of fields for easy reference
$y = 0;
// We need to make the conditions for the select statement here
unset($querycond);
// fill the array of value and query for each fieldnames
$fields_value_array = array();
$fields_query_array = array();
foreach ($quota['members'] as $member) {
foreach ($member['fieldnames'] as $fieldname) {
if (!in_array($fieldname, $fields_list)) {
$fields_list[] = $fieldname;
$fields_value_array[$fieldname] = array();
$fields_query_array[$fieldname] = array();
}
$fields_value_array[$fieldname][] = $member['value'];
$fields_query_array[$fieldname][] = "s." . db_quote_id($fieldname) . " = '{$member['value']}'";
}
}
// fill the $querycond array with each fields_query grouped by fieldname
foreach ($fields_list as $fieldname) {
$select_query = " ( " . implode(' OR ', $fields_query_array[$fieldname]) . ' )';
$querycond[] = $select_query;
}
// Test if the fieldname is in the array of value in the session
foreach ($quota['members'] as $member) {
foreach ($member['fieldnames'] as $fieldname) {
if (isset($_SESSION[$fieldname])) {
if (in_array($_SESSION[$fieldname], $fields_value_array[$fieldname])) {
$quota_info[$x]['members'][$y]['insession'] = "true";
}
}
}
$y++;
}
unset($fields_query_array);
unset($fields_value_array);
// Lets only continue if any of the quota fields is in the posted page
$matched_fields = false;
if (isset($_POST['fieldnames'])) {
$posted_fields = explode("|", $_POST['fieldnames']);
foreach ($fields_list as $checkfield) {
if (in_array($checkfield, $posted_fields)) {
$matched_fields = true;
$global_matched = true;
}
}
}
// A field was submitted that is part of the quota
if ($matched_fields == true) {
//queXS Addition
include_once 'quexs.php';
$case_id = get_case_id(get_operator_id());
// Check the status of the quota, is it full or not
$querysel = "SELECT id FROM " . db_table_name('survey_' . $surveyid) . " AS s\n\t\t\t\t JOIN `case` AS cq ON (cq.case_id = '{$case_id}')\n\t\t\t\t JOIN sample AS sampt ON (sampt.sample_id = cq.sample_id)\n\t\t\t\t JOIN `case` AS c ON (c.token = s.token AND c.questionnaire_id = cq.questionnaire_id)\n\t\t\t\t JOIN `sample` as sam ON (c.sample_id = sam.sample_id AND sam.import_id = sampt.import_id)\n\t\t\t WHERE " . implode(' AND ', $querycond) . " " . " \n\t\t\t\t\tAND s.submitdate IS NOT NULL";
$result = db_execute_assoc($querysel) or safe_die($connect->ErrorMsg());
//Checked
$quota_check = $result->FetchRow();
if ($result->RecordCount() >= $quota['Limit']) {
// Now we have to check if the quota matches in the current session
// This will let us know if this person is going to exceed the quota
$counted_matches = 0;
foreach ($quota_info[$x]['members'] as $member) {
if (isset($member['insession']) && $member['insession'] == "true") {
$counted_matches++;
}
}
if ($counted_matches == count($quota['members'])) {
// They are going to exceed the quota if data is submitted
$quota_info[$x]['status'] = "matched";
} else {
$quota_info[$x]['status'] = "notmatched";
}
} else {
// Quota is no in danger of being exceeded.
$quota_info[$x]['status'] = "notmatched";
}
}
//.........这里部分代码省略.........
开发者ID:ddrmoscow,项目名称:queXS,代码行数:101,代码来源:index.php
注:本文中的get_operator_id函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论