</tbody> </table> <hr /> <table width="100%"> <tbody> <tr> <th colspan="7"><?php echo $caption; ?> </th> </tr> <tr> <?php printCensusHeader(SHOW_CENSUS, false); ?> </tr> <?php $cnt = count($cap->event->attendees); for ($i = 0; $i < $cnt; $i++) { if ($i == 0 || fmod($i, 2) == 0) { $class = "tbl_odd"; } else { $class = "tbl_even"; } ?> <tr> <?php printCensusRow($cap, $cap->event->attendees[$i], SHOW_CENSUS, null, $class);
function show_census($per) { global $strNoInfo, $restrictmsg; $search = new CensusDetail(); $search->setFromRequest(); if (!$per->isViewable()) { echo $restrictmsg . "\n"; return 0; } else { $dao = getCensusDAO(); $dao->getCensusDetails($search); if (count($search->results) < 1) { echo $strNoInfo . "\n"; } else { ?> <table width="100%"> <tr> <?php printCensusHeader(LIST_CENSUS, $per->isEditable()); ?> </tr> <?php for ($i = 0; $i < $search->numResults; $i++) { if ($i == 0 || fmod($i, 2) == 0) { $class = "tbl_odd"; } else { $class = "tbl_even"; } $cen = $search->results[$i]; ?> <tr> <?php foreach ($cen->event->attendees as $attendee) { printCensusRow($cen, $attendee, LIST_CENSUS, $per, $class); } ?> </tr> <?php } echo "</table>"; } } return $search->numResults; }