Use a more sophisticated limit report mechanism / string
authorJoey Schulze <joey@infodrom.org>
Fri, 16 Jul 2004 18:18:52 +0000 (18:18 +0000)
committerJoey Schulze <joey@infodrom.org>
Fri, 16 Jul 2004 18:18:52 +0000 (18:18 +0000)
src/LinuxTag/2005/nili/index.wml

index 3fabbde..4bb4ca5 100644 (file)
           ."FROM person,nili "
          ."WHERE id = person";
 
-  if (strlen ($project)) {
-    $query .= sprintf (" AND project = '%s'", addslashes ($project));
-    printf ("<p><b>Limit to project</b>: %s<p>", $project);
-  }
+  if (strlen ($project) || strlen ($nightplace)) {
+    echo "<p><b>Limits</b>: ";
+    if (strlen ($project)) {
+      $query .= sprintf (" AND project = '%s'", addslashes ($project));
+      printf ("(project=%s) ", $project);
+    }
 
-  if (strlen ($nightplace)) {
-    $query .= sprintf (" AND nightplace = '%s'", addslashes ($nightplace));
-    printf ("<p><b>Limit to location</b>: %s<p>", $nightplace);
+    if (strlen ($nightplace)) {
+      $query .= sprintf (" AND nightplace = '%s'", addslashes ($nightplace));
+      printf ("(location=%s) ", $nightplace);
+    }
+    echo "</p>";
   }
 
   $query .= " AND date in ('<iso-event-date-1>', '<iso-event-date_0>', '<iso-event-date_1>', '<iso-event-date_2>', " .