echo "<tr><th style='text-align:left;background:#ccc;'>First Name</th><th style='text-align:left;background:#ccc;'>Last Name</th><th style='text-align:left;background:#ccc;'>Shirt Size</th></tr>"; while ($row = mysql_fetch_assoc($result)) { $size_shirt = getNiceSize($row['size_shirt']); echo "<tr style='margin:3px 0;'><td>" . $row['fname'] . "</td><td>" . $row['lname'] . "</td><td>" . $size_shirt . "</td></tr>\n"; } echo "</table>"; } else { echo "No size information."; } } if ($_SESSION['foc'] == true) { echo "<h1>Misc. Tools</h1>"; switch ($_GET['tool']) { case 'sizing': echo "<h2>Sizing information</h2>"; echo "<p><b>" . getCounts() . "</b> out of <b>" . getNumLeaders() . "</b> leaders have submitted sizes.</p>"; echo "<p>Sort by: <a href='misctools.php?tool=sizing&sort=size_shirt'>shirt size</a> <a href='misctools.php?tool=sizing&sort=lname'>last name</a></p>"; displayAllSizing("size_shirt"); getCounts(); break; case 'add_sponsor': echo "<h2>Add a sponsor</h2>"; echo "<p>Coming soon!</p>"; break; default: echo "<p>Choose one of the tools to the left or below:</p>"; echo "<p><a href='misctools.php?tool=add_sponsor'>Add a sponsor</a>, <a href='misctools.php?tool=sizing'>View submitted sizing information</a></p>"; } } else { echo "Please <a href='index.php'>Login</a></p>"; }
<?php // Retreat confirmation viewing session_start(); include "functions.php"; include "header.php"; if ($_SESSION['foc'] == true) { echo "<h1>Retreat Confirmation Viewer</h1>"; echo "<p>View leaders who have said yes and no (with reasons!)</p>"; $confirmations = getRetreatConfs(1); $denied = getRetreatConfs(0); $total = getNumLeaders(); echo "<p>Out of <b>" . $total . "</b> leaders, <b>" . count($confirmations) . "</b> said they were attending, and <b>" . count($denied) . "</b> said they weren't. <b>" . ($total - count($denied) - count($confirmations)) . "</b> have yet to respond.</p>"; ?> <hr /> <div> <div style="width:48%;float:left;"> <p style='background-color:#aaa;text-align:center;padding:4px;color:#fff;'>CONFIRMED</p> <?php if (count($confirmations)) { foreach ($confirmations as $c) { echo "<p style='line-height:20px;background-color:#eee;padding:3px;"; echo $c['diet'] != "" ? "background-color:#ddd;" : ""; echo "'><a href='mailto:" . $c['email'] . "'><b style='color:green;'>" . $c['fname'] . " " . $c['lname'] . "</b></a> confirmed."; echo $c['diet'] != "" ? "<br />Diet Specs: " . $c['diet'] . "</p>" : "</p>"; } } ?> </div><div style="width:48%;float:right;"> <p style='background-color:#aaa;text-align:center;padding:4px;color:#fff;'>NOT ATTENDING</p> <?php