mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
merge fixes from fixies
This commit is contained in:
@@ -85,19 +85,19 @@ if (isset($_GET['key']) || isset($_GET['sample']))
|
||||
echo("token,".T_("Case ID")."");
|
||||
foreach($svars as $s)
|
||||
{
|
||||
echo("," . $s['value']);
|
||||
echo("," . str_replace(","," ",$s['value']));
|
||||
}
|
||||
|
||||
if (isset($_GET['sample']))
|
||||
{
|
||||
echo(",".T_("Current Outcome").",".T_("Number of call attempts").",".T_("Number of calls").",".T_("Case notes").",".T_("Total interview time over all calls (mins)").",".T_("Interview time for last call (mins)").",".T_("Last number dialled").",".T_("DATE/TIME Last number dialled").",".T_("Operator username for last call").",".T_("Shift report").", AAPOR");
|
||||
echo(",".T_("Outcome ID").",".T_("Current Outcome").",".T_("Number of call attempts").",".T_("Number of calls").",".T_("Case notes").",".T_("Total interview time over all calls (mins)").",".T_("Interview time for last call (mins)").",".T_("Last number dialled").",".T_("DATE/TIME Last number dialled").",".T_("Operator username for last call").",".T_("Shift report").", AAPOR");
|
||||
}
|
||||
|
||||
echo("\n");
|
||||
|
||||
$sql = "SELECT c.token,c.case_id ";
|
||||
|
||||
if (isset($_GET['sample'])) $sql .= ", o.description,
|
||||
if (isset($_GET['sample'])) $sql .= ", o.outcome_id, o.description,
|
||||
(SELECT COUNT(ca.call_attempt_id) FROM `call_attempt` as ca WHERE ca.case_id = c.case_id ) as callattempts,
|
||||
(SELECT COUNT(cl.call_id) FROM `call` as cl WHERE cl.case_id = c.case_id ) as calls,
|
||||
(SELECT GROUP_CONCAT(cn1.note SEPARATOR '|') FROM `case_note` as cn1 WHERE c.case_id = cn1.case_id GROUP BY cn1.case_id)as casenotes,
|
||||
@@ -149,8 +149,8 @@ if (isset($_GET['key']) || isset($_GET['sample']))
|
||||
}
|
||||
if (isset($_GET['sample']))
|
||||
{
|
||||
$l['description'] = T_($l['description']);
|
||||
echo "," . str_replace(","," ",$l['description']) . "," .$l['callattempts']."," .$l['calls']."," .$l['casenotes'].",".$l['interviewtimec'].",".$l['interviewtimel'].",".$l['lastnumber'].",".$l['lastcallstart'].",".$l['operatoru'].",".$l['shiftr'].",". $l['aapor_id'];
|
||||
if(!empty($l['description'])) $l['description'] = T_($l['description']);
|
||||
echo ",".$l['outcome_id'].",". str_replace(","," ",$l['description']).",".$l['callattempts'].",".$l['calls']."," .str_replace(","," ",$l['casenotes']).",".$l['interviewtimec'].",".$l['interviewtimel'].",".$l['lastnumber'].",".$l['lastcallstart'].",".$l['operatoru'].",".$l['shiftr'].",". $l['aapor_id'];
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
@@ -89,13 +89,9 @@ if (isset($_POST['ed']))
|
||||
|
||||
unset($_POST['ed']);
|
||||
unset($_POST['sample_import_id']);
|
||||
|
||||
// print_r($_POST). "</br>"; //ïîñìîòðèì ÷åãî îòðàâëÿåòñÿ
|
||||
|
||||
if (isset($_POST['del']) && isset($_POST['type']) ) {
|
||||
$a = array(); $b = array(); $cert = array(); $a = $_POST['type'];
|
||||
|
||||
//echo "<p> type before unset->>"; foreach($_POST['type'] as $key => $val) { echo ' | ', $key,' => ',$val,' | '; }; print "</p>";
|
||||
|
||||
foreach($_POST['del'] as $p) {
|
||||
unset ($_POST['type'][$p]);
|
||||
@@ -110,7 +106,6 @@ if (isset($_POST['ed']))
|
||||
}
|
||||
/* else { echo "<div class='alert alert-info'>", T_("You can delete string '$key'. "), "</div>"; } */
|
||||
}
|
||||
//echo "<p>del ->>"; foreach($_POST['del'] as $key => $val) { echo ' | ', $key,' => ',$val,' | '; }; print "</p>";
|
||||
}
|
||||
|
||||
if (isset($_POST['type'])){
|
||||
@@ -136,7 +131,7 @@ if (isset($_POST['ed']))
|
||||
if ($eml < 2) {$ch4 = true;}
|
||||
else { echo "<div class='alert alert-warning'>", T_("Too many e-mail fields. Please check selected types for E-mail."), "</div>"; }
|
||||
|
||||
if ($ch1 && $ch2 && $ch3 && $ch4) */$typecheck = true; //echo $ch1,$ch2,$ch3,$ch4, "typecheck=",$typecheck, "</br>" ;
|
||||
if ($ch1 && $ch2 && $ch3 && $ch4) */$typecheck = true;
|
||||
|
||||
if ($typecheck){
|
||||
|
||||
@@ -178,11 +173,10 @@ if (isset($_POST['ed']))
|
||||
if (isset($_POST['var'])){
|
||||
|
||||
foreach($_POST['var'] as $p => $val)
|
||||
{// echo '| ',$p,' => ',$val,'+ ';
|
||||
$v = str_replace(" ", "_", $val);
|
||||
|
||||
{
|
||||
$val = str_replace(array(" ,",", ",","," "," "),"_", $val);
|
||||
$sql = "UPDATE sample_import_var_restrict
|
||||
SET `var` = '$v'
|
||||
SET `var` = '$val'
|
||||
WHERE sample_import_id = $sample_import_id
|
||||
AND `var_id` = $p";
|
||||
$db->Execute($sql);
|
||||
@@ -199,7 +193,7 @@ if (isset($_POST['ed']))
|
||||
$db->Execute($sql);
|
||||
|
||||
foreach($_POST['see'] as $p => $val)
|
||||
{// echo $p,' => ',$val,' + ';
|
||||
{
|
||||
$sql = "UPDATE sample_import_var_restrict
|
||||
SET `restrict` = 0
|
||||
WHERE sample_import_id = $sample_import_id
|
||||
@@ -300,7 +294,7 @@ if (isset($_GET['edit']) )
|
||||
$rd = $db->GetAll($sql);
|
||||
|
||||
$sql = "SELECT sir.var_id,
|
||||
CONCAT('<input type=\"text\" onInput=\"$(this).attr(\'name\',\'var[',sir.var_id,']\');\" value=\"' ,sir.var, '\" required class=\"form-control\" style=\"min-width: 300px;\" $dis />') as var,
|
||||
CONCAT('<input type=\"text\" name=\"var[',sir.var_id,']\" value=\"' ,sir.var, '\" required class=\"form-control\" style=\"min-width: 300px;\" $dis />') as var,
|
||||
CONCAT ('<select name=\"type[',sir.var_id,']\" class=\"form-control\" $dis >";
|
||||
foreach($rd as $r)
|
||||
{
|
||||
@@ -356,7 +350,7 @@ if ($rs){
|
||||
|
||||
<?php
|
||||
|
||||
print "<div class='well text-danger col-sm-3'><p>" . T_("Select which fields from this sample to deidentify. </p> Deidentified fields will be permanently deleted from the sample.") . "</p></div>";
|
||||
if($sd['enabled'] == 0) print "<div class='well text-danger col-sm-3'><p>" . T_("Select which fields from this sample to deidentify. </p> Deidentified fields will be permanently deleted from the sample.") . "</p></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -391,7 +385,6 @@ else
|
||||
$rs = $db->GetAll($sql);
|
||||
if (!empty($rs)) {
|
||||
$count = count($rs);
|
||||
//print_r($rs);
|
||||
print "<div class='well text-danger col-sm-3'><p>" . T_("Fix this sample ") . "</p>";
|
||||
print "<p>" . $count . " var id's not match</p>";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user