<!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: #151515; margin: 0 0 0.5em 0;}
			h4 {font-weight: bold; font-size: 11pt; color: #990000; margin: 0;}

			table {border-collapse: collapse;}

			.line  {border-bottom: 1px solid #7d7b7d;}

			a {text-decoration: underline; color: #005fa9;}
			a:hover {text-decoration: none; color: #990000;}
			a:visited {color: #005fa9;}
		</style>
	</head>
	<body>
		
		<h1>OSAA Online Forms</h1>	

		<h2>
			Solo Music District Results for <?php echo $information['activity_program']->name; ?>
		</h2>				

		<h3>
			District Contest Results from <?php echo $information['league']->name; ?> Have Been Submitted
		</h3>
		<p>
			Results from the <?php echo $information['league']->name; ?> District Contest have been submitted.  Student participants from your school have been indicated as qualifying for the OSAA State Solo Music Championship.
		</p>
		<p>
			<b>These participants are not automatically registered for the state contest.</b>
			<ul>
				<li><b>The deadline to register for the OSAA Solo Music State Championships is <?php echo date('g:ia, l, n/j/Y', strtotime($information['activity_form']->due_at)); ?>.</b></li>
			</ul>
		</p>
		
		<table style="width: 100%;">
			<tr>
				<td style="font-weight: bold; background: #ffefb0; border: 1px solid #e1c146; padding: 8px 16px;">
					Qualifier Registration: <a href="<?php echo url('/forms/registration/sol'); ?>" style="font-weight: normal;">&raquo; Register Your Qualifiers for State &laquo;</a>
				</td>
			</tr>
		</table>

		<br />

		<table style="width: 800px;">
			<tr>				
				<td style="width: 50%; min-height: 4em;">					
					<h3>District Director</h3>
					<p>			
						<?php echo $information['data']['director']->name; ?><br />
						<?php echo $information['data']['director']->email; ?><br />
						<?php echo Helpers::strPhone($information['data']['director']->phone); ?>
					</p>					
				</td>								

				<td style="width: 50%; min-height: 4em;">				
					<h3>District Results</h3>
					<p>			
						<?php if ($information['data']['complete']): ?>
							<span style="color: #0d581b; font-weight: bold;">
								Complete
							</span>
						<?php else: ?>
							<span style="color: #990000; font-weight: bold;">
								Incomplete
							</span>
						<?php endif; ?>
						<br />						
						Submitted at <?php echo date('g:i a m/d/Y', strtotime($information['submission']->updated_at)); ?><br />					
					</p>					
				</td>
			</tr>
		</table>		

		<br /><br />

		<h3 class="line">State Qualifiers from <?php echo $information['activity_program']->name; ?></h3>				
		<p>
			The following participants competed in the <?php echo $information['league']->name; ?> District Contest.  These individuals have achieved the placement indicated within the listed category and are qualified to compete in the OSAA State Solo Music Championship.
		</p>

		<?php if (count($information['qualifiers']) > 0): ?>
			
			<?php
				// Sort the qualifiers for display
				usort($information['qualifiers'], function ($a, $b)
				{
					// Sort by first name
					$ret = strcasecmp($a->first_name, $b->first_name);
					if ($ret < 0)
					{
						return -1;						
					}
					elseif ($ret > 1)
					{
						return 1;
					}

					// Sort by last name
					$ret = strcasecmp($a->last_name, $b->last_name);
					if ($ret < 0)
					{
						return -1;						
					}
					elseif ($ret > 1)
					{
						return 1;
					}

					return 0;
				});

			?>

			<table style="width: 650px; font-size: 10pt;">

				<?php foreach ($information['qualifiers'] as $i => $qualifier): ?>

					<tr>
						<td style="width: 220px;"><b><?php echo $qualifier->first_name; ?> <?php echo $qualifier->last_name; ?></b></td>
						<td style="width: 180px;"><?php echo $qualifier->category; ?></td>
						<td style="width: 250px;"><?php echo $qualifier->placement; ?></td>
					</tr>			
					
				<?php endforeach; ?>
			
			</table>	

		<?php endif; ?>
				

		<br /><br />

		<p>
			In order for any of these state qualifiers to compete in the state championship, your school must complete its own registration form indicating which of these qualifiers, if any, will be competing in the state competition.  If you do not have an account with the OSAA website, you can easily create a new one with an e-mail address and your school key code.  These key codes can be acquired from your athletic director.  For complete instructions on creating a new account, you can refer to this helpful document located at <a href="<?php echo asset('/docs/sol/registration.pdf'); ?>"><?php echo asset('/docs/sol/registration.pdf'); ?></a>.  You must be logged in to access this form located at <a href="<?php echo url('/forms/registration/sol'); ?>"><?php echo url('/forms/registration/sol'); ?></a>.
		</p>
		
		<br />
		
		Regards,<br /><br />
		Oregon School Activities Association<br />
		<a href="<?php echo url('/'); ?>">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 ($information['to']); ?>			
			<?php if (count($information['cc']) > 0): ?>
				and copied to <?php echo Helpers::arrayToList ($information['cc']); ?>
			<?php endif; ?>
		</p>
		
	</body>
</html>