

<div class="meets_viewer_container <?php echo $information['meet_type']; ?>">
	<div class="left">
		<h3><?php echo $information['host_team_name']; ?></h3>
		<h4>Hosting Team</h4>

		<div class="team_logo">
			<?php
				$image_url = null;
				if (!is_null($information['host_ap']))
				{
					$school = school::find($information['host_ap']['host_school']);

					if (!is_null($school))
					{
						$image_url = ImagesController::getImageURL($school->short_name, 'logo', '128x128');
					}
				}
			?>
			<?php if (!is_null($image_url)): ?>
				<img src="<?php echo $image_url; ?>" alt="" title="" style="width:128px; height:128px;" />
			<?php else: ?>
				<img src="http://www.osaa.org/images/no_logo.png" alt="" title="No School Logo Available" class="tooltip" style="width:128px; height:128px;">
			<?php endif; ?>
		</div>
		<div style="display:block;">
			<?php if (!is_null($information['host_ap'])): ?>
				<a href="<?php echo url('/teams/' . $information['host_team'] . '/roster/2'); ?>" class="button" style="font-size:8pt;" target="_blank">Program Roster</a>
				<a href="<?php echo url('/teams/' . $information['host_ap']['id'] . '#tabs-V'); ?>" class="button" style="font-size:8pt;">Team Page</a>		
			<?php else: ?>
				<br />
			<?php endif; ?>
		</div>
	</div>

	<div class="info">
		<?php if ($information['meet_type'] == "INV"): ?>
			<h4>
				<?php echo $information['event']['name']; ?>
			</h4>
		<?php endif; ?>

		<div class="date">
			<?php echo Helpers::formatDateTime('%MEET_VIEWER%', strtotime($information['event']['start_at']), $information['event']['time_zone']); ?>
		</div>
		
		<div class="location">
			<?php echo $information['event']['location_name']; ?>
		</div>
		
		<div class="type">
			<?php echo ($information['meet_type'] == "INV") ? "Invitational" : "Dual"; ?>

			<?php if (Helpers::strEqual($information['activity'], array('GGF', 'BGF'))): ?>
				Contest
			<?php elseif (Helpers::strEqual($information['activity'], array('WRE'))): ?>
				Match
			<?php else: ?>
				Meet
			<?php endif; ?>
		</div>
		
	</div>
	<?php if ($information['meet_type'] == "INV"): ?>
		<div class="ui-widget ui-widget-content ui-corner-all team_list right">
			<div>
				<table style="width:100%;">
					<thead class="head ui-tabs-nav ui-widget-header ui-corner-all">
						<tr>
							<th colspan=4>Participating Teams</th>
						</tr>
					</thead>
				</table>
			</div>
			<div style="height: 184px; overflow-y: auto;">
				<table style="width:100%;">
					<tbody>
		                <?php if(count($information['teams'] > 0)): ?>
		                	<?php foreach($information['teams'] as $team): ?>
			                    <tr>
									<td style="width:30px">
										<?php
											$image_url = null;
											if (!is_null($team['activity_program_id']))
											{
												$school = school::find($team['host_school']);

												if (!is_null($school))
												{
													$image_url = ImagesController::getImageURL($school->short_name, 'logo', '24x24');
												}
											}
										?>
										<?php if (!is_null($image_url)): ?>
											<img src="<?php echo $image_url; ?>" alt="" title="" style="width:24px; height:24px;" />
										<?php else: ?>
											<img src="http://www.osaa.org/images/no_logo.png" alt="" title="No School Logo Available" class="tooltip" style="width:24px; height:24px;">
										<?php endif; ?>
									</td>
			                        <td style="text-align: left"><?php echo $team['name']; ?></td>
									<td style="width:120px">
										<a href="<?php echo url('/teams/' . $team['id'] . '/roster/2'); ?>" class="button" style="font-size:8pt;" target="_blank">Program Roster</a>
									</td>
									<td style="width:100px">
										<a href="<?php echo url('/teams/' . $team['activity_program_id'] . '#tabs-V'); ?>" class="button" style="font-size:8pt;">Team Page</a>
									</td>
								</tr>
		                    <?php endforeach; ?>
		                <?php endif; ?>
		                <?php if(count($information['oos_teams'] > 0)): ?>
		                	<?php foreach($information['oos_teams'] as $team): ?>
			                    <tr>
									<td style="width:30px">
										<img src="http://www.osaa.org/images/no_logo.png" alt="" title="No School Logo Available" class="tooltip" style="width:24px; height:24px;">
									</td>
			                        <td style="text-align: left"><?php echo $team; ?></td>
									<td style="width:120px">
									</td>
									<td style="width:100px">
									</td>
								</tr>
		                    <?php endforeach; ?>
		                <?php endif; ?>
					</tbody>
				</table>
			</div>
		</div>


	<?php else: ?>
	<?php /*  Dual meet  */ ?>

		<?php if (!is_null($information['other_team_name'])): ?>
			<div class="right">
				<h3><?php echo $information['other_team_name']; ?></h3>
				<h4>&nbsp;</h4>
				<div class="team_logo">
					<?php
						$image_url = null;
						if (!is_null($information['other_ap']))
						{
							$school = school::find($information['other_ap']['host_school']);

							if (!is_null($school))
							{
								$image_url = ImagesController::getImageURL($school->short_name, 'logo', '24x24');
							}
						}
					?>
					<?php if (!is_null($image_url)): ?>
						<img src="<?php echo $image_url; ?>" alt="" title="" style="width:128px; height:128px;" />
					<?php else: ?>
						<img src="http://www.osaa.org/images/no_logo.png" alt="" title="No School Logo Available" class="tooltip" style="width:128px; height:128px;">
					<?php endif; ?>
				</div>

				<div style="display:block;">
					<a href="<?php echo url('/teams/' . $information['other_team'] . '/roster/2'); ?>" class="button" style="font-size:8pt;" target="_blank">Program Roster</a>
					<a href="<?php echo url('/teams/' . $information['other_ap']['id'] . '#tabs-V'); ?>" class="button" style="font-size:8pt;">Team Page</a>
				</div>	
			</div>
		<?php endif; ?>
	</div>
	<?php endif; ?>

</div>






