<!DOCTYPE html>
<html lang="en">    
    <head>        
        <title><?php echo $training_course->name; ?> Training Course Completions</title>
    
        <style type="text/css">
        	* {
        		margin: 0;
        		padding: 0;
        		color: #000000;
        	}

        	.page {
        		font-size: 7pt;
        	}

        	.title {
        		text-align: center;
        		font-weight: bold;
        		font-size: 12pt;
        	}

        	.updated {
        		text-align: center;
        		font-size: 10pt;        		
        	}

        	table {
        		border-collapse: collapse;
        		width: 100%;
        	}

        	th {
        		text-align: left;
        		border-bottom: 1px solid #000000;
        	}

        	tbody td {
        		white-space: nowrap;
        	}

        	.odd {
        		background-color: #dedede;
        	}
        </style>
    </head>

    <body>
    	<div class="page">
    		<div class="title"><?php echo $training_course->name; ?> Training Course Completions</div>
    		<div class="updated"><?php echo (count($rows) - 1); ?> Records, Updated <?php echo date('n/j/Y g:ia', time()); ?></div>    		

    		<br />

    		<table>
    		    <thead>
    		    	<tr>
    		    		<?php foreach ($rows[0] as $column): ?>
    		    			<th><?php echo $column; ?></th>
    		    		<?php endforeach; ?>
    		    	</tr>
    		    </thead>

    		    <tbody>
    		    	<?php foreach ($rows as $index => $row): ?>
    		    		<?php
    		    			// Skip the header
    		    			if ($index == 0)
    		    			{
    		    				continue;
    		    			}
    		    		?>    		    		
    		    		<tr <?php if ($index % 2 == 0): ?> class="odd" <?php endif; ?>>
    		    			<?php foreach ($row as $column): ?>
    		    				<td><?php echo $column; ?></td>
    		    			<?php endforeach; ?>
    		    		</tr>
    		    	<?php endforeach; ?>
    		    </tbody>
    		</table>
    	</div>
    </body>
</html>