<!DOCTYPE html>
<html lang="en-US">
	<head>
		<meta charset="utf-8">
		<style type="text/css">
			* {margin:0; padding:0;}
			body {font-family:Lucida Grande,Lucida Sans,Arial,sans-serif; font-size: 9pt; line-height:120%; color:#151515; background:#ffffff; width:800px;}

			h1 {font-size: 18pt; width: 800px; padding-bottom: 4px; border-bottom: 2px solid #1c43a6; color: #1c43a6;}
			h2 {font-weight: bold; font-size: 14pt; color: #990000;}
			h3 {font-weight: bold; font-size: 12pt; color: #0d2458; margin: 0 0 0.5em 0;}

			table {border-collapse: collapse;}

			.line  {border-bottom: 1px solid #7d7b7d;}			
		</style>
	</head>
	<body>
		
		<h1>OSAA Ejection Report Closed</h1>	

		<p>			
			Hello,
		</p>		

		<p>
			<?php echo $info['object']->host_school->short_name; ?> had <?php echo strtolower($info['object']->ejection->type); ?> <?php echo $info['object']->data->ejected->name; ?>
			<?php if (!Helpers::strIsEmpty($info['object']->data->ejected->jersey)): ?>
				(#<?php echo $info['object']->data->ejected->jersey; ?>)
			<?php endif; ?>
			ejected from a <?php echo strtolower($info['object']->level->name); ?> <?php echo strtolower($info['object']->activity->sport); ?> <?php echo strtolower($info['object']->activity->contest); ?> on <?php echo date('l, n/j/Y', strtotime($info['object']->data->contest->date)); ?> against <?php echo $info['object']->data->contest->opponent; ?>.  The reason for the ejection was "<?php echo $info['object']->ejection_reason->name; ?>" under NFHS <?php echo $info['object']->ejection_reason->sport; ?> <?php echo (Helpers::strContains(',', $info['object']->ejection_reason->rule)) ? 'Rules' : 'Rule'; ?> <?php echo $info['object']->ejection_reason->rule; ?>.
		</p>

		<p>
			The school was notified of the ejection on <?php echo date('l, n/j/Y', strtotime($info['object']->ejection->submitted_at)); ?> at <?php echo date('g:ia', strtotime($info['object']->ejection->submitted_at)); ?>. 
			<?php if (!Helpers::strIsEmpty($info['object']->data->receipt->appeal)): ?>
				The school appealed on <?php echo date('l, n/j/Y', strtotime($info['object']->ejection->verified_at)); ?> at <?php echo date('g:ia', strtotime($info['object']->ejection->verified_at)); ?>.				
			<?php else: ?>
				The school accepted the ejection without appeal on <?php echo date('l, n/j/Y', strtotime($info['object']->ejection->verified_at)); ?> at <?php echo date('g:ia', strtotime($info['object']->ejection->verified_at)); ?>.  The form was received by OSAA staff and subsequently closed on <?php echo date('l, n/j/Y', time()); ?> at <?php echo date('g:ia', time()); ?>.
			<?php endif; ?>			
		</p>	

		<?php if (!Helpers::strIsEmpty($info['object']->data->receipt->appeal)): ?>
			<p>
				After reviewing all of the information, the appeal was
				<?php if ($info['object']->data->receipt->is_granted): ?>
					APPROVED
				<?php else: ?>
					DENIED
				<?php endif; ?>
				on <?php echo date('l, n/j/Y', time()); ?> at <?php echo date('g:ia', time()); ?> and the ejection was closed.

				<?php if ($info['object']->data->receipt->is_granted): ?>

					Therefore, the next contest suspension does not apply and there will be no fine.					

				<?php else: ?>

					<?php if ($info['object']->ejection_reason->is_suspension): ?>
						Therefore, the <?php echo strtolower($info['object']->ejection->type); ?> is suspended through the next <?php echo strtolower($info['object']->level->name); ?> <?php echo strtolower($info['object']->activity->sport); ?> <?php echo strtolower($info['object']->activity->contest); ?> per the <a href="http://www.osaa.org/governance/handbooks/osaa#_Toc426096927">OSAA Handbook</a>.
					<?php endif; ?>
					
					<?php if ($info['object']->ejection_reason->is_fine): ?>
						This ejection will <?php echo ($info['object']->ejection_reason->is_suspension) ? 'also' : null; ?> result in a fine for which your school will be invoiced at the end of the <?php echo strtolower($info['object']->activity->sport); ?> season.
					<?php endif; ?>

				<?php endif; ?>

			</p>


		<?php endif; ?>

		<table style="width: 100%;">
			<tr>
				<td style="font-weight: bold; background: #ffefb0; border: 1px solid #e1c146; padding: 8px 16px;">
					View this ejection report at <a href="http://www.osaa.org/forms/ejection/<?php echo $info['object']->ejection->id; ?>">www.osaa.org/forms/ejection/<?php echo $info['object']->ejection->id; ?></a>
				</td>
			</tr>
		</table>

		<p>
			You must be logged in to the OSAA website in order to access the report.
		</p>		
		
		Regards,<br /><br />
		Oregon School Activities Association<br />
		<a href="http://www.osaa.org">www.osaa.org</a>

		<br /><br />	

		<p style="font-size: 8pt; line-height: 110%;">
			This is an automatically generated message and was sent to <?php echo Helpers::arrayToList ($info['to']); ?>			
			<?php if (count($info['cc']) > 0): ?>
				and copied to <?php echo Helpers::arrayToList ($info['cc']); ?>
			<?php endif; ?>			
		</p>
		
	</body>
</html>