echo ' <td>' . $obj->rank . '</td>'; echo ' <td>' . $obj->display_name . '</td>'; echo '<td class="attendance user' . $obj->personnel_id . '">'; echo ' <input type="hidden" id="activity_id" name="activity_id" value="' . $activity->activity_id . '" />'; echo ' <select name="attendance_' . $obj->personnel_id . '" id="attendance_' . $obj->personnel_id . '">'; echo ' <option value=""' . (is_null($obj->personnel_id) ? ' selected="selected"' : '') . '></option>'; echo ' <option value="' . ATC_ATTENDANCE_PRESENT . '"' . ($obj->presence === ATC_ATTENDANCE_PRESENT ? ' selected="selected"' : '') . '>' . ATC_ATTENDANCE_PRESENT_SYMBOL . '</option>'; echo ' <option value="' . ATC_ATTENDANCE_ON_LEAVE . '"' . ($obj->presence === ATC_ATTENDANCE_ON_LEAVE ? ' selected="selected"' : '') . '>' . ATC_ATTENDANCE_ON_LEAVE_SYMBOL . '</option>'; echo ' <option value="' . ATC_ATTENDANCE_ABSENT_WITHOUT_LEAVE . '"' . ($obj->presence === ATC_ATTENDANCE_ABSENT_WITHOUT_LEAVE ? ' selected="selected"' : '') . '>' . ATC_ATTENDANCE_ABSENT_WITHOUT_LEAVE_SYMBOL . '</option>'; echo ' </select>'; echo '</td>'; echo '<td><input type="text" name="note_' . $obj->personnel_id . '" id="note_' . $obj->personnel_id . '" value="' . htmlentities($obj->note) . '" maxlength="255" /></td>'; // echo '<td><input type="number" step="0.1" name="amtpaid_'.$obj->personnel_id.'" id="amtpaid_'.$obj->personnel_id.'" value="'.htmlentities($obj->amount_paid).'" min="0" style="width:3em;" '.($ATC->user_has_permission(ATC_PERMISSION_FINANCE_EDIT)?'':'readonly="readonly"').'/></td>'; $payments = $ATC->get_activity_money_outstanding($obj->personnel_id, $activity->activity_id); if (count($payments)) { echo '<td nowrap="nowrap" style="text-align:right">' . ($ATC->user_has_permission(ATC_PERMISSION_FINANCE_VIEW, $obj->personnel_id) ? $ATC->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $payments[0]->remaining) : '<em>Hidden</em>') . '</td>'; } echo '</tr>'; } ?> </tbody> </table> </form> <script> $("thead th").button().removeClass("ui-corner-all").css({ display: "table-cell" }); </script> <?php exit; } elseif (isset($_GET['id']) && isset($_GET['action']) && $_GET['action'] == 'contactsheet') { $activity = $ATC->get_activity((int) $_GET["id"]); $activity = $activity[0];
<?php require_once "atc_finance.class.php"; $ATC = new ATC_Finance(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { if (!$ATC->user_has_permission(ATC_PERMISSION_FINANCE_EDIT)) { throw new ATCExceptionInsufficientPermissions("Insufficient rights to view this page"); } $ATC->add_payment($_POST['personnel_id'], $_POST['amount'], $_POST['reference'], $_POST['payment_type'], $_POST['term_id']); } catch (ATCExceptionInsufficientPermissions $e) { header("HTTP/1.0 401 Unauthorised"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (ATCExceptionDBError $e) { header("HTTP/1.0 500 Internal Server Error"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (ATCExceptionDBConn $e) { header("HTTP/1.0 500 Internal Server Error"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (ATCException $e) { header("HTTP/1.0 400 Bad Request"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (Exception $e) { header("HTTP/1.0 500 Internal Server Error"); echo 'Caught exception: ', $e->getMessage(), "\n"; } exit; } $ATC->gui_output_page_header('Finance'); if (!$ATC->user_has_permission(ATC_PERMISSION_FINANCE_VIEW)) { throw new ATCExceptionInsufficientPermissions("Insufficient rights to view this page");
close: function() { $( this ).dialog( "destroy" ); }, open: function() { } }); return false; }); </script> <?php } elseif (isset($_GET['action']) && $_GET['action'] == 'finance' && isset($_GET['id'])) { require_once "atc_finance.class.php"; $ATC_Finance = new ATC_Finance(); if ($ATC_Finance->user_has_permission(ATC_PERMISSION_FINANCE_VIEW, $_GET['id'])) { $payments = $ATC_Finance->get_account_history($_GET['id'], '1970-01-01', date('c')); } ?> <table class="tablesorter"> <thead> <tr> <th> Date </th> <th> Amount </th> <th> Payment type </th> <th> Reference </th> <th> Recorded by </th> <!-- <?php echo $ATC->user_has_permission(ATC_PERMISSION_FINANCE_EDIT) ? '<td><a href="personal.php?id=' . $_GET['id'] . '&action=finance" class="button new">New</a></td>' : ''; ?> -->
echo 'ORGANIZER;' . vcalendaruserstring($obj->rank . ' ' . $obj->display_name, $obj->email, $obj->mobile_phone) . $CRLF; $emergencycontactdetails = vcalendaruserstring($obj->twoic_display_name, $obj->twoic_email, $obj->twoic_mobile_phone); if (strlen(trim($emergencycontactdetails)) > 1) { echo 'ATTENDEE;ROLE=NON-PARTICIPANT;' . $emergencycontactdetails . $CRLF; } $userids = explode(',', $obj->attendees); $description = ''; foreach ($userids as $userid) { if (!$userid) { continue; } // Don't keep repulling the same user details for every event, if we find them once, store them for next time... if (!isset($users[$userid])) { $users[$userid] = $ATC->get_personnel($userid); } if (!$ATC->user_has_permission(ATC_PERMISSION_PERSONNEL_VIEW, $userid)) { echo 'ATTENDEE;ROLE=REQ-PARTICIPANT;' . vcalendaruserstring($users[$userid]->rank . ' ' . $users[$userid]->display_name, '', '') . $CRLF; $description .= ' o ' . $users[$userid]->rank . ' ' . $users[$userid]->display_name . $CRLF; } else { echo 'ATTENDEE;ROLE=REQ-PARTICIPANT;' . vcalendaruserstring($users[$userid]->rank . ' ' . $users[$userid]->display_name, $users[$userid]->email, $users[$userid]->mobile_phone) . $CRLF; $description .= ' o ' . vcalendarsafestring($users[$userid]->rank) . ' ' . vcalendarsafestring($users[$userid]->display_name) . ' ' . ($users[$userid]->mobile_phone ? '(' . vcalendarsafestring($users[$userid]->mobile_phone) . ')' : '') . $CRLF . ' <' . vcalendarsafestring($users[$userid]->email) . '>' . $CRLF; $noks = $ATC->get_nok($userid); foreach ($noks as $nok) { $description .= ' '; switch ($nok->relationship) { case ATC_NOK_TYPE_MOTHER: $description .= ' (Mother)'; break; case ATC_NOK_TYPE_FATHER: $description .= ' (Father)'; break;