function labelArea($type) { $html = '<span class="label ' . getEventTypeLabelClass($type) . '">' . getEventType($type) . '</span>'; return $html; }
<td><span class="eventDetailsValue">' . $gigDetails['contactPhone'] . '</span></td> </tr> <tr> <td class="eventDetialsKey">Price:</td> <td><span class="eventDetailsValue">' . $gigDetails['price'] . '</span></td> </tr> </table> </div> '; } $html = $html . ' <table class="table no-highlight"> <tr> <td colspan="2"><div class="btn" id="attendingButton">see who\'s attending</div></td> </tr> <tr> <td colspan="2"><div class="btn" id="carpoolsButton">carpools</div></td> </tr> '; if (isOfficer($userEmail) || positionFromEmail($userEmail) == 'Section Leader' && getEventType($eventDetails['type']) == "Sectional") { $html = $html . ' <tr> <td><div class="btn" id="attendanceButton" onclick="updateEventAttendance(\'' . $eventNo . '\');">update attendance</div></td> </tr> <tr> <td id="editButtonTd"><div class="btn" id="editButton">edit details</div></td> </tr> '; } $html = $html . '</table>'; echo $html;
<tr> <?php foreach ($header as $td) { echo "<td>{$td}</td>"; } ?> </tr> <?php foreach ($lines as $line) { $i = 1; echo "<tr>"; $line_arr = explode(",", $line); if ($type == "kdp") { foreach ($line_arr as $td) { if ($i == 2) { echo "<td title='" . getEventType($consts_map, $td) . "'>{$td}</td>"; } else { if ($i == 6) { echo "<td><a href='javascript:investigate(\"{$td}\")'>{$td}</a></td>"; } else { if ($i == 5) { echo "<td><a href='javascript:partners(\"{$td}\")'>{$td}</a></td>"; } else { echo "<td>{$td}</td>"; } } } $i++; } } else { foreach ($line_arr as $td) {
//verifica quem é o admin do evento. $line['host'] = getEventAdmin($line['name'])['username']; if ($line['host'] == $_SESSION['username']){ $line['host'] = "Delete Event"; } else{ $line['host'] = "host: ".$line['host']; } //inclui todos os comentários em $line['ArrayCom'] $tableCom = getCommentsFromEvent($line['name']); $maxCom = sizeof($tableCom); $line['tableCom'] = $tableCom; $line['maxCom'] = $maxCom; $line['ArrayCom'] = array(); for($j = 0; $j < $maxCom; $j++){ $lineCom = getLine($tableCom, $j); $comUser = getUsername($lineCom['idUser']); array_push($line['ArrayCom'], $comUser['username'], $lineCom['commentary'], $lineCom['idComment']); } $line['type'] = getEventType($line['name']); $line['attend'] = Attend($line['name']); $line['people'] = getUsersAttendingEvent($line['name']); $line['Npeople'] = count($line['people']); $line['session'] = $_SESSION['username']; echo json_encode($line); ?>