Exemplo n.º 1
0
			return false;
		});
		
		$('td.ui-state-highlight').removeClass('ui-state-highlight').parent().addClass('ui-state-highlight');
		
		$('a.button.email').button({ icons: { primary: 'ui-icon-mail-closed' } });
		$('a.button.sms').button({ icons: { primary: 'ui-icon-battery-2' } })
		$('a.button.email, a.button.sms').click(function(){
			
			$('#what').val($(this).hasClass('nok')?'nok':'personal');
			$('#how').val($(this).hasClass('email')?'email':'sms');
			
			$.ajax({	
				dataType:	'json',
				url:		'personnel_contactdetails.php',
				data:		$('#personnellist').serialize(),
				success:	function(data)
							{
								if( $('#how').val() == 'email' ) 
									$("#actiontrigger").attr('href', "mailto:?bcc="+encodeURI( data.join(';') ))[0].click();
								else
									$("#actiontrigger").attr('href', "sms://"+encodeURI( data.join(';') ))[0].click();
							},
				error:	function(err,msg){ alert(err); alert(msg); return false; }
			});
		});
	</script>
<?php 
}
$ATC->gui_output_page_footer('Personnel');
Exemplo n.º 2
0
<?php

require_once "atc.class.php";
$ATC = new ATC();
if ($ATC->logout()) {
    header('Location: ./', true, 302);
}
$ATC->gui_output_page_header('Logout');
?>
<h1> Goodbye </h1>
<p> You have been logged out </h1>
	
<?php 
$ATC->gui_output_page_footer('Logout');
Exemplo n.º 3
0
				</tr>
			</thead>
			<tfoot>
				<tr>
					<th> Total: </th>
					<td colspan="4"></td>
				</tr>
			</tfoot>
			<tbody>
				<?php 
    $totalamount = 0;
    foreach ($payments as $obj) {
        $totalamount += $obj->amount;
        echo '<tr>';
        echo '	<td> ' . date(ATC_SETTING_DATE_OUTPUT . " Y", strtotime($obj->created)) . ' </td>';
        echo '	<td> ' . $ATC_Finance->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $obj->amount) . ' </td>';
        echo '	<td> ' . htmlentities($translations['paymenttype'][$obj->payment_type]) . ' </td>';
        echo '	<td> ' . htmlentities($obj->reference) . ' </td>';
        echo '	<td> ' . htmlentities($obj->rank . ' ' . $obj->display_name) . ' </td>';
        echo '</tr>';
    }
    ?>
			</tbody>
		</table>
		<script>$('tfoot td').html('<?php 
    echo $ATC_Finance->currency_format(ATC_SETTING_FINANCE_MONEYFORMAT, $totalamount);
    ?>
');</script>
<?php 
    $ATC->gui_output_page_footer(null);
}
Exemplo n.º 4
0
						missingnights = 0;
				});
			} else {
				$(this).children('td').each(function(index, value){
					if( $(this).html() == '<?php 
echo ATC_ATTENDANCE_ABSENT_WITHOUT_LEAVE_SYMBOL;
?>
' )
						missingnights++;
					else if( $(this).html() == '<?php 
echo ATC_ATTENDANCE_PRESENT_SYMBOL;
?>
' || $(this).val() == '<?php 
echo ATC_ATTENDANCE_ON_LEAVE_SYMBOL;
?>
' )
						missingnights = 0;
				});
			}
			// Cadets who miss 4 parade nights are eligible to be signed off the books
			if( missingnights >= 4 ) 
				$(this).addClass('ui-state-error').attr('title','Cadet missed 4 parade nights - sign them off the books');
			else if( missingnights >= 2 ) 
				$(this).addClass('ui-state-highlight').attr('title','Cadet needs to attend, after 4 missed nights, they will be signed out of the unit!');
		});
	</script>
	
<?php 
if (!isset($_GET['id'])) {
    $ATC->gui_output_page_footer('Attendance');
}