From 7b94d8a7e78be4bcfb532aa12d8dd286cac38d41 Mon Sep 17 00:00:00 2001 From: Jason Cleeland Date: Fri, 22 Oct 2004 03:30:53 +0000 Subject: [PATCH] FEATURE: Added "id" filter to filter options, so you can search for a range of response id's, or a specific id git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@1248 b72ed6b6-b9f8-46b5-92b4-906544132732 --- admin/statistics.php | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/admin/statistics.php b/admin/statistics.php index f433d70e60d..ef8d4f0375c 100644 --- a/admin/statistics.php +++ b/admin/statistics.php @@ -119,6 +119,30 @@ strip_tags($row['question']), $row['lid']); } + +// SHOW ID FIELD +echo "\t\t + \n"; +$myfield = "id"; +$myfield2=$myfield."G"; +$myfield3=$myfield."L"; +$myfield4=$myfield."="; +echo "
$setfontid
"; +echo "\t\t\t\t\t"._ST_NOGREATERTHAN.":
\n" + ."\t\t\t\t\t
\n" + ."\t\t\t\t\t"._ST_NOLESSTHAN.":
\n" + ."\t\t\t\t\t
\n"; + echo "\t\t\t\t\t=
+
\n"; + $allfields[]=$myfield2; + $allfields[]=$myfield3; + $allfields[]=$myfield4; // 2: Get answers for each question if (!isset($currentgroup)) {$currentgroup="";} foreach ($filters as $flt) @@ -214,7 +238,7 @@ echo "'>
\n" ."\t\t\t\t\t"._ST_NOLESSTHAN.":
\n" ."\t\t\t\t\t
\n"; $allfields[]=$myfield2; $allfields[]=$myfield3; @@ -577,7 +601,7 @@ if (in_array($pv, $allfields)) //Only do this if there is actually a value for the $pv { $firstletter=substr($pv,0,1); - if ($pv != "sid" && $pv != "display" && $firstletter != "M" && $firstletter != "T" && $firstletter != "D" && $firstletter != "N" && $pv != "summary") //pull out just the fieldnames + if ($pv != "sid" && $pv != "display" && $firstletter != "M" && $firstletter != "T" && $firstletter != "D" && $firstletter != "N" && $pv != "summary" && substr($pv, 0, 2) != "id") //pull out just the fieldnames { $thisquestion = "`$pv` IN ("; foreach ($_POST[$pv] as $condition) @@ -617,6 +641,22 @@ $selects[]="`".substr($pv, 1, -1)."` < '".$_POST[$pv]."'"; } } + elseif (substr($pv, 0, 2) == "id") + { + echo "Hi"; + if (substr($pv, strlen($pv)-1, 1) == "G" && $_POST[$pv] != "") + { + $selects[]="`".substr($pv, 0, -1)."` > '".$_POST[$pv]."'"; + } + if (substr($pv, strlen($pv)-1, 1) == "L" && $_POST[$pv] != "") + { + $selects[]="`".substr($pv, 0, -1)."` < '".$_POST[$pv]."'"; + } + if (substr($pv, strlen($pv)-1, 1) == "=" && $_POST[$pv] != "") + { + $selects[]="`".substr($pv, 0, -1)."` = '".$_POST[$pv]."'"; + } + } elseif (substr($pv, 0, 1) == "T" && $_POST[$pv] != "") { $selects[]="`".substr($pv, 1, strlen($pv))."` like '%".$_POST[$pv]."%'";