-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetgraphusingfilters.php
More file actions
executable file
·39 lines (31 loc) · 1.15 KB
/
getgraphusingfilters.php
File metadata and controls
executable file
·39 lines (31 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
require_once('getfiltercontenthelper.php');
include "setting.php";
$i = 0;
$filteredEventwhereclause = "";
for ($i = 0; $i < count($assertionResultArrayUnique); $i++){
$thisID = $assertionResultArrayUnique[$i];
if ($thisID != ""){
if ($filteredEventwhereclause != "") $filteredEventwhereclause .= "OR";
$filteredEventwhereclause .= "(data_eventassertion.id=". $thisID .")" ;
}
}
$query = "
SELECT data_eventassertion.id,data_eventassertion.short_desc, Eventtype.eventtype_id FROM data_eventassertion,Eventtype
WHERE (($filteredEventwhereclause)
AND (data_eventassertion.id <> '')AND(data_eventassertion.id=Eventtype.eventassertion_id))
ORDER BY data_eventassertion.id ASC
";
$resultevents = mysql_query($query);
$i = 0;
$previousID = -1;
while ($rowItemsInDB = mysql_fetch_object($resultevents)){
if ($previousID != $rowItemsInDB->id){
$eventObject[$i] = array( File => $rowItemsInDB->eventtype_id, ID => $rowItemsInDB->id, Title => $rowItemsInDB->short_desc, xPosi => 0, yPosi=> 0);
$eventObjectIndex[$rowItemsInDB->id] = $i;
$i++;
$previousID = $rowItemsInDB->id;
}
}
include "getgraphhelper.php";
?>