TRUE, ); /** * Edit a Module Configuration */ public function action_index() { $output = ''; $date = Site::DateStartOfWeek(time()); $so = Company::instance()->so(); $days = 7; $open_dates = $so->open_dates($date,$days); $output .= ''; $output .= ''; $output .= ''; foreach (array_keys($open_dates) as $day) $output .= sprintf('',Site::date($day),date('D',$day)); $output .= ''; $output .= ''; $output .= ''; foreach (array_keys($open_dates) as $day) $output .= sprintf('',StaticList_YesNo::factory()->get(isset($open_dates[$day]) ? $open_dates[$day] : FALSE,TRUE)); $output .= ''; $output .= ''; $output .= ''; foreach (array_keys($open_dates) as $day) $output .= sprintf('','-'); $output .= ''; foreach ($so->rooms->find_all() as $ro) { $output .= sprintf('',$ro->display('name'),$days); // Capacity $output .= ''; $output .= ''; $output .= ''; $output .= sprintf('',join(''; // Permanent $output .= ''; $output .= ''; $output .= ''; foreach (array_values($ro->child_list_date($date,$days)) as $x) $output .= sprintf('',count($x)); $output .= ''; // Permanent $output .= ''; $output .= ''; $output .= ''; foreach (array_values($ro->child_list_date($date,$days,'a')) as $x) $output .= sprintf('',count($x)); $output .= ''; // Casual $output .= ''; $output .= ''; $output .= ''; foreach (array_values($ro->child_list_date($date,$days,'C')) as $x) $output .= sprintf('',count($x)); $output .= ''; // Spacer $output .= sprintf('',$days+2); // Waitlist $output .= ''; $output .= ''; $output .= ''; foreach (array_values($ro->child_list_date($date,$days,'W')) as $x) $output .= sprintf('',count($x)); $output .= ''; // Availablity $output .= ''; $output .= ''; $output .= ''; foreach (array_values($ro->room_availablity($date,$days)) as $x) $output .= sprintf('',$x); $output .= ''; // Spacer $output .= sprintf('',$days+2); } $output .= '
 %s (%s)
Open%s
Total%s
%s 
 Capacity%s',array_values($ro->availability_dates($date,$days)))); $output .= '
 Permanent%s
 Absent%s
 Casual%s
 
 Waitlist%s
 Availability%s
 
'; Block::factory() ->title(sprintf('Site Availability for %s',Site::date($date))) ->title_icon('icon-cog') ->body($output); } } ?>