2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Add get_token_value function

This commit is contained in:
Adam Zammit
2017-02-03 11:50:55 +11:00
parent 1a4b41fd04
commit 05722b32a3
4 changed files with 53 additions and 601 deletions

View File

@@ -140,16 +140,20 @@ function display_outcomes($contacted,$ca,$case_id)
print "<div>";
if (!empty($rs))
{
$lime_sid = get_limesurvey_id(get_operator_id());
$qid = get_questionnaire_id(get_operator_id());
$sql = "SELECT token
FROM `case`
WHERE case_id = $case_id";
//Check to see if we have sent an email on this call and set the default outcome
$sql = "SELECT 41
FROM `case` as c, " . LIME_PREFIX . "tokens_$lime_sid as t
WHERE t.sent = '$ca'
AND c.case_id = $case_id
AND t.token = c.token";
$token = $db->GetOne($sql);
$do = $db->GetOne($sql);
$sent = get_token_value($qid,$token,'sent');
$do ="";
if ($sent == $ca)
$do = 41;
if (isset($_GET['defaultoutcome'])) $do = bigintval($_GET['defaultoutcome']);
foreach($rs as $r)