Example #1
0
                     <th width="150px">Question</th>
                     <th>Answer</th>
                     <th width="150px">Time added</th>
                     <th width="50px">Delete</th>
                	</tr>
             <?php 
         $dataArr = $faq->getFAQ(true);
         if ($dataArr == false) {
             echo '<tr><td colspan="5"><p class="notification red minimal">There are no existing frequently asked questions that can be deleted.</p>';
         } else {
             $i = 0;
             foreach ($dataArr as $data) {
                 echo '<tr>';
                 echo '<td>' . ++$i . '<input type="hidden" name="faq_id[]" value="' . $data['id'] . '" /></td>';
                 echo '<td>' . shortString($data['question'], 19) . '</td>';
                 echo '<td>' . shortString($data['answer'], 41) . '</td>';
                 echo '<td>' . $data['date_added'] . '</td>';
                 echo '<td style="text-align: center;"><a class="image" href="?page=' . $_GET['page'] . '&amp;action=' . $_GET['action'] . '&amp;do=' . $_GET['do'] . '&amp;delete=' . $data['id'] . '">';
                 echo '<img src="design/img/delete.png" alt="delete" /></a></td>';
                 echo '</tr>';
             }
         }
         ?>
             </table>
             <?php 
     }
     echo '</div>';
     echo '</div>';
     break;
 case "manage-admins":
     echo '
Example #2
0
                    </thead>
                    <tbody>
						<?php 
    foreach ($checkouts as $checkout) {
        $person = $checkout->getPerson();
        $personDetails = fetchUserDetails(NULL, NULL, $person);
        $co_start = new DateTime($checkout->getStart());
        $co_end = new DateTime($checkout->getEnd());
        $now = new DateTime();
        if ($co_end < $now) {
            echo "<tr class='text-muted'>";
        } else {
            echo "<tr>";
        }
        printf("<td><a href='checkout.php?co_id=%s'>%s</a></td>", $checkout->getID(), $checkout->getTitle());
        printf("<td class='hidden-xs'>%s</td>", shortString($checkout->getDescription(), 100, true));
        printf("<td>%s</td>", $personDetails['display_name']);
        printf("<td>%s</td>", $co_start->format('m-d g:iA'));
        printf("<td>%s</td>", $co_end->format('m-d g:iA'));
        printf("<td class='hidden-xs hidden-sm'>");
        $i = 0;
        //counter. Only want to show a few items
        foreach ($checkout->getGearList() as $gear) {
            $gearObject = new Gear();
            $gearObject->fetch($gear[0]);
            if ($i > 4) {
                echo "<div class='hide" . $checkout->getID() . "' style='display:none'>" . $gearObject->getName() . "</div>";
            } elseif ($i == 4) {
                echo "<div class='hide" . $checkout->getID() . "' style='display:none'>" . $gearObject->getName() . "</div>";
                echo "<div class='unhide' id='" . $checkout->getID() . "'>...</div>";
            } else {