summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/event/checkoverlapdrop.phtml
blob: b53c482c1d9cd0a3e5576147ed428750cc895f83 (plain) (blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
$output['cfevents'] = $this->cfeventswithrepeat;

// conflict free plot with repeat
$output['cfplotwithrepeat'] = '<ul id="cfplot">';
foreach($this->cfeventswithrepeat as $c){
	if(isset($c['end'])) {
		$output['cfplotwithrepeat'] .=  '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . ', End: ' . $c['end'] . '</li>';
	} else {
		$output['cfplotwithrepeat'] .=  '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . '</li>';
	}
}
$output['cfplotwithrepeat'] .= '</ul>';

// conflict free plot without repeat
$output['cfplotwithoutrepeat'] = '<ul id="cfplot">';
foreach($this->cfeventswithoutrepeat as $c){
	if(isset($c['end'])) {
		$output['cfplotwithoutrepeat'] .=  '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . ', End: ' . $c['end'] . '</li>';
	} else {
		$output['cfplotwithoutrepeat'] .=  '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . '</li>';
	}
}
$output['cfplotwithoutrepeat'] .= '</ul>';

// conflict plot with repeat
if(count($this->overlapswithrepeat) == 0) {
	$output['withrepeat'] = -1;
}
else {
	$output['withrepeat'] = '<ul id="conflictEvents">';
	foreach($this->overlapswithrepeat as $o){
		if(isset($o['end'])) {
			$output['withrepeat'] .=	'<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
		} else {
			$output['withrepeat'] .=  '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . '</li>';
		}
	}
	$output['withrepeat'] .= '</ul>';
}

// conflict plot without repeat
if(count($this->overlapswithoutrepeat) == 0) {
	$output['withoutrepeat'] = -1;
}
else {
	$output['withoutrepeat'] = '<ul id="conflictEvents">';
	foreach($this->overlapswithoutrepeat as $o) {
		if(isset($o['end'])) {
			$output['withoutrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
		} else {
			$output['withoutrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . '</li>';
		}
	}
	$output['withoutrepeat'] .= '</ul>';
}
echo json_encode($output);
?>