</li> </ol> <script> $('a.activity.edit').click(function(e){ e.preventDefault(); // stop the link actually firing var href = $(this).attr("href"); $('#dialog').empty().load(href).dialog({ modal: true, width: 600, title: 'Edit activity details', buttons: { Cancel: function() { $( this ).dialog( "close" ); }<?php if ($ATC->user_has_permission(ATC_PERMISSION_ACTIVITIES_EDIT)) { ?> , Save: function() { var attendees = '&attendees=0'; $('#attendees ol.dragdrop li').each(function(index){ attendees += ","+$(this).attr('personnel_id'); }); $.ajax({ type: "POST", url: 'activities.php', data: $("#editactivity").serialize()+attendees, beforeSend: function() { $('#editactivity').addClass('ui-state-disabled');
global $footerstring; $this->SetY(-15); $this->SetFont('Arial', '', 8); $this->Cell(20, 6, $footerstring . ' - Page ' . $this->PageNo(), 0); $this->Cell(0, 6, 'Printed: ' . date(ATC_SETTING_DATETIME_OUTPUT), 0, 1, 'R'); } } // Instanciation of inherited class $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->SetLeftMargin(10); $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(0); $pdf->SetFillColor(255); foreach ($_GET['personnel_id'] as $id) { if ($ATC->user_has_permission(ATC_PERMISSION_PERSONNEL_VIEW, $id)) { $obj = $ATC->get_personnel($id); } else { continue; } $obj->nok = $ATC->get_nok($id); $obj->promotions = $ATC->get_promotion_history($id); if ($ATC->user_has_permission(ATC_PERMISSION_FINANCE_VIEW, $id)) { $obj->payments = $ATC_Finance->get_account_history($id, '1970-01-01', date('c')); } else { $obj->payments = null; } //var_dump($obj); $pdf->AddPage(); $footerstring = $obj->rank . ' ' . $obj->display_name; $pdf->SetFont('Arial', 'B', 14);