if (isOfficer($USER)) { $html .= "<div class='driver block'><div class='person' id='" . $driver . "'><table>\n\t\t<tr>\n\t\t\t<td class='carpoolLives'>" . $livesAt . "</td>\n\t\t\t<td class='carpoolName'><a href='#profile:{$driver}'>" . prefFullNameFromEmail($driver) . "</a></td>\n\t\t\t<td class='carpoolSpots'>" . $passengerSpots . "</td>\n\t\t\t<td class='carpoolShould'>" . $phoneNumber . "</td>\n\t\t\t<td class='carpoolConfirmed'>" . $isConfirmed . "</td>\n\t\t</tr>\n\t\t</table></div></div>"; } else { $html .= "\n\t\t\t<tr>\n\t\t\t\t<td class='carpoolLives'>" . $livesAt . "</td>\n\t\t\t\t<td class='carpoolName'>" . prefFullNameFromEmail($driver) . "</td>\n\t\t\t\t<td class='carpoolSpots'>" . $passengerSpots . "</td>\n\t\t\t\t<td class='carpoolShould'>" . $phoneNumber . "</td>\n\t\t\t\t<td class='carpoolConfirmed'>" . $isConfirmed . "</td>\n\t\t\t</tr>\n\t\t\t</table></div></div>\n\t\t\t"; } //$passengers = array(); $carpoolDetails = getCarpoolDetails($row['carpoolID']); $html .= "<div class='passengers block'>"; while ($passenger = mysql_fetch_array($carpoolDetails)) { //$passengers[] = $passenger['memberID']; if ($passenger['memberID'] !== $driver) { //$shouldAttend=''; //$isConfirmed =''; //$passengerSpots=0; $emails .= ', ' . prefFullNameFromEmail($passenger['memberID']) . ' <' . $passenger['memberID'] . '>'; if (shouldAttend($passenger['memberID'], $eventNo)) { $shouldAttend = '<span class="label label-info">should</span>'; $isConfirmed = isConfirmed($passenger['memberID'], $eventNo) == true ? '<span class="label label-info">confirmed</span>' : '<span class="label label-warning">unconfirmed</span>'; } else { $shouldAttend = '<span class="label label-important">shouldn\'t</span>'; $isConfirmed = '<span class="label label-important">not attending</span>'; } $passengerSpots = passengerSpots($passenger['memberID']) !== "0" ? "<span class='badge badge-info'>" . passengerSpots($passenger['memberID']) . "</span>" : ''; $livesAt = "<span class='label'>" . livesAt($passenger['memberID']) . "</span>"; $phoneNumber = "<a href='tel:" . phoneNumber($passenger['memberID']) . "'>" . phoneNumber($passenger['memberID']) . "</a>"; $html .= "<div class='person' id='" . $passenger['memberID'] . "'><table>\n\t\t\t<tr>\n\t\t\t\t<td class='carpoolLives'>" . $livesAt . "</td>\n\t\t\t\t<td class='carpoolName'><a href='profile:" . $passenger['memberID'] . "'>" . prefFullNameFromEmail($passenger['memberID']) . "</a></td>\n\t\t\t\t<td class='carpoolSpots'>" . $passengerSpots . "</td>\n\t\t\t\t<td class='carpoolShould'>" . $phoneNumber . "</td>\n\t\t\t\t<td class='carpoolConfirmed'>" . $isConfirmed . "</td>\n\t\t\t\t</tr>\n\t\t\t</table></div>"; } } $sql = "select `name` from `event` where `eventNo` = {$eventNo}"; $event = mysql_fetch_array(mysql_query($sql)); $html .= '</div>';
$livesAt = "<span class='label'>" . livesAt($driver) . "</span>"; $phoneNumber = "<a href='tel:" . phoneNumber($driver) . "'>" . phoneNumber($driver) . "</a>"; if (isOfficer($userEmail)) { $html .= "<div class='driver block'><div class='person' id='" . $driver . "'><table>\n\t\t<tr>\n\t\t\t<td class='carpoolLives'>" . $livesAt . "</td>\n\t\t\t<td class='carpoolName'><a href='mailto:{$driver}'>" . prefFullNameFromEmail($driver) . "</a></td>\n\t\t\t<td class='carpoolSpots'>" . $passengerSpots . "</td>\n\t\t\t<td class='carpoolShould'>" . $phoneNumber . "</td>\n\t\t\t<td class='carpoolConfirmed'>" . $isConfirmed . "</td>\n\t\t</tr>\n\t\t</table></div></div>"; } else { $html .= "\n\t\t\t<tr>\n\t\t\t\t<td class='carpoolLives'>" . $livesAt . "</td>\n\t\t\t\t<td class='carpoolName'>" . prefFullNameFromEmail($driver) . "</td>\n\t\t\t\t<td class='carpoolSpots'>" . $passengerSpots . "</td>\n\t\t\t\t<td class='carpoolShould'>" . $phoneNumber . "</td>\n\t\t\t\t<td class='carpoolConfirmed'>" . $isConfirmed . "</td>\n\t\t\t</tr>\n\t\t\t</table></div></div>\n\t\t\t"; } //$passengers = array(); $carpoolDetails = getCarpoolDetails($row['carpoolID']); $html .= "<div class='passengers block'>"; while ($passenger = mysql_fetch_array($carpoolDetails)) { //$passengers[] = $passenger['memberID']; if ($passenger['memberID'] !== $driver) { //$shouldAttend=''; //$isConfirmed =''; //$passengerSpots=0; $shouldAttend = shouldAttend($passenger['memberID'], $eventNo) == true ? '<span class="label label-info">should</span>' : '<span class="label label-important">shouldn\'t</span>'; $isConfirmed = isConfirmed($passenger['memberID'], $eventNo) == true ? '<span class="label label-info">confirmed</span>' : '<span class="label label-warning">unconfirmed</span>'; $passengerSpots = passengerSpots($passenger['memberID']) !== "0" ? "<span class='badge badge-info'>" . passengerSpots($passenger['memberID']) . "</span>" : ''; $livesAt = "<span class='label'>" . livesAt($passenger['memberID']) . "</span>"; $phoneNumber = "<a href='tel:" . phoneNumber($passenger['memberID']) . "'>" . phoneNumber($passenger['memberID']) . "</a>"; $html .= "<div class='person' id='" . $passenger['memberID'] . "'><table>\n\t\t\t<tr>\n\t\t\t\t<td class='carpoolLives'>" . $livesAt . "</td>\n\t\t\t\t<td class='carpoolName'><a href='mailto:" . $passenger['memberID'] . "'>" . prefFullNameFromEmail($passenger['memberID']) . "</a></td>\n\t\t\t\t<td class='carpoolSpots'>" . $passengerSpots . "</td>\n\t\t\t\t<td class='carpoolShould'>" . $phoneNumber . "</td>\n\t\t\t\t<td class='carpoolConfirmed'>" . $isConfirmed . "</td>\n\t\t\t</tr>\n\t\t\t</table></div>"; } } $html .= '</div>'; //end passengers div $html .= "</div>"; //end carpool div } $html .= "</div>"; echo $html;