<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); ?> </tr> <?php } ?> </tbody> </table> <?php echo "<p><a href=\"" . $referer . "\">" . $strBack . "</a> " . $strToHome . "</p>\n"; include "inc/footer.inc.php"; // eof
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; }