summaryrefslogblamecommitdiffstats
path: root/application/views/scripts/event/checkoverlapdrop.phtml
blob: 279e798a72321896ab25ac74d8e696a225916b28 (plain) (tree)
1
2
3
     
                                                
 














                                                                                                                                                                        
                                           
                             

      
                                                           
                                                 
                                                                                                                                                                       
         
                                         
 
 
                               
                                              
                                

      
                                                        
                                              
                                                                                                                                                               
   
                                      
 
                          
 
<?php
$output['cfevents'] = $this->cfeventswithrepeat;

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

// conflict free plot without repeat
$output['cfplotwithoutrepeat'] = '<ul id="cfplot">';
  foreach($this->cfeventswithoutrepeat as $c){
  $output['cfplotwithoutrepeat'] .=  '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . ', End: ' . $c['end'] . '</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){
	$output['withrepeat'] .=	'<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</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){
    $output['withoutrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
  }
  $output['withoutrepeat'] .= '</ul>';
}
echo json_encode($output);
?>