コード例 #1
0
ファイル: index.php プロジェクト: PhilTanner/ATC_system
<?php

require_once "atc_documentation.class.php";
require_once "atc_finance.class.php";
$ATC = new ATC_Documentation();
$ATC_Finance = new ATC_Finance();
$ATC->gui_output_page_header('Home');
try {
    $activities = $ATC->get_activities(date('Y-m-d'), 30);
    if (count($activities)) {
        ?>
		
			<h2> Upcoming events</h2>
			<table class="tablesorter">
				<thead>
					<tr>
						<th rowspan="2"> Activity </th>
						<th rowspan="2"> Officer In Charge </th>
						<th rowspan="2"> 2<sup>nd</sup> Contact </th>
						<th colspan="2"> Date </th>
					</tr>
					<tr>
						<th> Assemble </th>
						<th> Dispersal </th>
					</tr>
				</thead>
				<tbody>
					<?php 
        foreach ($activities as $obj) {
            echo '<tr>';
            echo '	<td' . (array_search($ATC->get_currentuser_id(), explode(',', $obj->attendees)) !== false ? ' class="highlighted"' : '') . '><!--<span class="ui-icon ui-icon-' . ($obj->nzcf_status == ATC_ACTIVITY_RECOGNISED ? 'radio-off" title="Recognised Activity"' : 'bullet" title="Authorised Activity"') . '" style="float:left">A</span> --><a href="activities.php?id=' . $obj->activity_id . '" class="activity edit">' . $obj->title . '</a></td>';
コード例 #2
0
<?php

require_once "atc_documentation.class.php";
$ATC = new ATC_Documentation();
$personnel = $ATC->get_personnel(null, 'ASC', null, true);
if (!isset($_GET['personnel_id'])) {
    $ATC->gui_output_page_header('Documents');
    ?>
	
	<form name="datepicker" id="datepicker">
		<fieldset>
			<legend>Choose personnel to generate documentation for</legend>
			<label for="personnel">Personnel:</label>
			<input type="hidden" name="document" value="nzcf16" />
			<select name="personnel_id[]" multiple="multiple" required="required">
				<?php 
    foreach ($personnel as $obj) {
        echo '<option value="' . $obj->personnel_id . '"' . ($obj->enabled ? '' : ' class="ui-state-disabled"') . '>' . $obj->rank . ' ' . $obj->display_name . '</option>';
    }
    ?>
			</select>
			<button type="submit" class="update">Update</button>			
		</fieldset>
	</form>
<?php 
} else {
    require_once "atc_finance.class.php";
    $ATC_Finance = new ATC_Finance();
    // Create a PDF document for us to use
    require './fpdf17/fpdf.php';
    $footerstring = '';
コード例 #3
0
ファイル: documents.php プロジェクト: PhilTanner/ATC_system
<?php

require_once "atc_documentation.class.php";
$ATC = new ATC_Documentation();
if (isset($_GET['document'])) {
    require_once 'documents_' . strtolower($_GET['document']) . '.php';
    $ATC->gui_output_page_footer('Documents');
    exit;
}
$ATC->gui_output_page_header('Documents');
?>
	<h2> What documentation do you want to produce?</h2>
	<ul>
		<li> <a href="?document=NZCF16">NZCF16</a> - Unit personnel record </li>
		<li> <a href="?document=NZCF20">NZCF20</a> - Unit monthly returns </li>
	</ul>
		
<?php 
$ATC->gui_output_page_footer('Documents');
コード例 #4
0
ファイル: system.php プロジェクト: PhilTanner/ATC_system
<?php

require_once "atc_documentation.class.php";
$ATC = new ATC_Documentation();
$ATC->gui_output_page_header('System');
?>
	<div id="system">
		<h2> Permmissions structure </h2>
		<div>
			<?php 
$ATC->dump_userperms();
?>
		</div>
	
		<h2 href="system_lesson_category.php"> Lesson Categories </h2>
		<div>
		</div>
		
		<h2 href="system_lesson.php"> Lessons </h2>
		<div>
		</div>
	</div>
	
		<script>
			$(function(){					
				
					$('#system').accordion({ 
						header: 'h2', 
						changestart:function( event, ui )
						{
							// There's a delay after load to set height, to allow the DOM to update properly
コード例 #5
0
<?php

require_once "atc_documentation.class.php";
$ATC = new ATC_Documentation();
$datepicked = strtotime("-1 month");
if (isset($_GET['date']) && strtotime($_GET['date'])) {
    $datepicked = strtotime($_GET['date']);
}
$year = date("Y", $datepicked);
$month = date("m", $datepicked);
$nzcf20 = $ATC->nzcf20_stats($year, $month);
$ATC->gui_output_page_header('Documents');
?>
	
	<form name="datepicker" id="datepicker">
		<fieldset>
			<legend>Choose date</legend>
			<label for="month">Pick a date:</label>
			<input type="hidden" name="document" value="nzcf20" />
			<input type="date" name="date" id="date" value="<?php 
echo date(ATC_SETTING_DATE_INPUT, $datepicked);
?>
" /><br />
			<button type="submit" class="update">Update</button>			
		</fieldset>
	</form>
	
	<h1> NZCF20 </h1>
	
	<div style="width:40%; float: left;">
		<table>