<!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 Online Forms</h1>	

		<h2 style="color: #0d581b;">
			State <?php echo ucwords(str_replace('-', ' ', str_replace('concert-', '', $info['category']))); ?> Registration Form for <?php echo $info['ap']->name; ?>
		</h2>

		<h3 style="color: #990000;">
			Registration Status: 
			<?php if ($info['form']->data->complete): ?>
				Complete
			<?php elseif (!is_null($info['form']->submitted_at)): ?>
				Pending Additional Materials				
			<?php else: ?>
				Incomplete				
			<?php endif; ?>
		</h3>
		<p>
			Thank you for submitting your State <?php echo ucwords(str_replace('-', ' ', str_replace('concert-', '', $info['category']))); ?> Registration Form for <?php echo $info['ap']->name; ?>.  You can resubmit your form as many times as needed until the deadline (<?php echo date('n/j/Y g:ia', strtotime($info['due_dates'][$info['category']])); ?>.)  After the deadline, the form will close and entries will be final.  Coordinators will use the information from the latest entries you provide.
		</p>

		<?php if (!$info['form']->data->complete): ?>
			<table style="width: 100%;">
				<tr>
					<td style="font-weight: bold; background: #ffefb0; border: 1px solid #e1c146; padding: 8px 16px;">
						You have to submit supplemental materials to complete your registration.  Please refer to the music registration page (<a href="http://www.osaa.org/forms/music/registration">www.osaa.org/forms/music/registration</a>) for a listing of your group's registration status.
					</td>
				</tr>
			</table>
		<?php endif; ?>

		<br />

		Access your registration from at: <a href="http://www.osaa.org/forms/music/registration/<?php echo $info['form']->id; ?>">www.osaa.org/forms/music/registration/<?php echo $info['form']->id; ?></a>

		<br /><br />
		
		<table style="width: 800px;">
			<tr>				
				<td style="width: 30%; min-height: 4em;">					
					<h3>Division</h3>
					<p>			
						<?php echo $info['form']->data->division; ?><br />
						<?php echo ucwords(str_replace('-', ' ', $info['category'])); ?><br />
						<?php if (Helpers::strEqual($info['form']->data->qualification, 'AUTO')): ?>
							Automatic Qualifier
						<?php elseif (Helpers::strEqual($info['form']->data->qualification, 'TAPE')): ?>
							Tape Pool Qualifier
						<?php else: ?>
							<b>Not Qualified for State</b>
						<?php endif; ?>
					</p>					
				</td>

				<td style="width: 30%; min-height: 4em;">					
					<h3>Director</h3>
					<p>			
						<?php echo $info['form']->data->director->name; ?><br />						
						<?php echo Helpers::displayCombinedPhone($info['form']->data->director->phone); ?><br />
						<a href="mailto:<?php echo $info['form']->data->director->email; ?>"><?php echo $info['form']->data->director->email; ?></a>
					</p>					
				</td>

				<td style="width: 40%; min-height: 4em;">				
					<h3>Application Form</h3>
					<p>			
						<?php if ($info['form']->data->items->form): ?>
							<span style="color: #0d581b; font-weight: bold;">
								Online Form Complete
							</span>
						<?php else: ?>
							<span style="color: #990000; font-weight: bold;">
								Online Form Incomplete
							</span>
						<?php endif; ?>
						<br />
						Submitted <?php echo date('n/j/Y g:ia', strtotime($info['form']->submitted_at)); ?><br />
						Last updated by <?php echo $info['user']->getDisplayFullName(); ?>
					</p>					
				</td>
			</tr>
		</table>		

		<br /><br />

		<h3 class="line">Qualifying Event</h3>									
		<table style="width: 800px;">
			<tr>				
				<td style="width: 200px;"><b>Name</b></td>
				<td>
					<?php echo $info['report']->event_name; ?>
				</td>
			</tr>				
			<tr>				
				<td style="width: 200px;"><b>Type</b></td>
				<td>
					<?php echo $info['report']->event_type; ?>
				</td>
			</tr>
			<?php if (!is_null($info['report']->league)): ?>
				<tr>				
					<td style="width: 200px;"><b>League/District</b></td>
					<td>
						<?php echo preg_replace('/\(.*\)$/', '', $info['report']->league->slug); ?> <?php echo $info['report']->league->name; ?>
					</td>
				</tr>
			<?php endif; ?>
			<tr>				
				<td style="width: 200px;"><b>Location</b></td>
				<td>
					<?php echo $info['report']->location->name; ?>
				</td>
			</tr>
			<tr>				
				<td style="width: 200px;"><b>Date</b></td>
				<td>
					<?php echo date('n/j/Y', strtotime($info['report']->date)); ?>
				</td>
			</tr>			
		</table>			
			
		<br /><br />

		<h3 class="line">Program Information</h3>									
		<table style="width: 800px;">
			<tr>				
				<td style="width: 200px;"><b>Group Name</b></td>
				<td>
					<?php echo $info['form']->data->group_name; ?>
				</td>
			</tr>				
			<tr>				
				<td style="width: 200px;"><b>Director</b></td>
				<td>
					<?php echo $info['form']->data->director->name; ?>
				</td>
			</tr>
			<?php if (!Helpers::strIsEmpty($info['form']->data->asst_director)): ?>
				<tr>				
					<td style="width: 200px;"><b>Assistant Director</b></td>
					<td>
						<?php echo $info['form']->data->asst_director; ?>
					</td>
				</tr>
			<?php endif; ?>
			<?php if (!Helpers::strIsEmpty($info['form']->data->accompanists)): ?>
				<tr>				
					<td style="width: 200px;"><b>Accompanist</b></td>
					<td>
						<?php echo $info['form']->data->accompanists; ?>
					</td>
				</tr>			
			<?php endif; ?>
			<?php if (!Helpers::strIsEmpty($info['form']->data->soloists)): ?>
				<tr>				
					<td style="width: 200px;"><b>Soloist</b></td>
					<td>
						<?php echo $info['form']->data->soloists; ?>
					</td>
				</tr>
			<?php endif; ?>
			<tr>				
				<td style="width: 200px;"><b># of Performers</b></td>
				<td>
					<?php echo $info['form']->data->participants; ?>
				</td>
			</tr>
			<?php if (!Helpers::strIsEmpty($info['form']->data->request)): ?>
				<tr>				
					<td style="width: 200px;"><b>Performance Time Request</b></td>
					<td>
						<?php echo $info['form']->data->request; ?>
					</td>
				</tr>
			<?php endif; ?>
			
		</table>	

		<br /><br />

		<h3 class="line">Music Selection</h3>									
		<table style="width: 800px; font-size: 10pt;">
			<tr>					
				<td style="vertical-align: bottom;"><b>Order</b></td>
				<td style="vertical-align: bottom;"><b>Title</b></td>
				<td style="vertical-align: bottom;"><b>Composer</b></td>
				<td style="vertical-align: bottom;"><b>Publisher</b></td>
				<td style="vertical-align: bottom;"><b>On Required List<br />or Pre-Approved</b></td>
			</tr>			

			<?php for($i = 0; $i < 6; $i++): ?>
				<?php
					// Skip blank entries
					if (Helpers::strIsEmpty($info['form']->data->selections[$i]->title))
					{
						continue;
					}
				?>

				<tr>
					<td>Selection <?php echo $i + 1; ?></td>
					<td><?php echo $info['form']->data->selections[$i]->title; ?></td>
					<td><?php echo $info['form']->data->selections[$i]->composer; ?></td>
					<td><?php echo $info['form']->data->selections[$i]->publisher; ?></td>
					<td>
						<?php if ($info['form']->data->selections[$i]->listed): ?>
							[ X ]
						<?php else: ?>
							[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]
						<?php endif; ?>
					</td>
				</tr>
			<?php endfor; ?>
		</table>	

		<br />		
		
		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>