<?php /*  DATA STRUCTURE NOTES

            //Note: to access property of an object, do the following:
            // $information['meet']->meet_type
            // This will return the meet type of the meet object. Property names are the same as column names in the corresponding table
        
            // Meet object. Has same attributes as meets table except also includes a ->location_name attribute for where the event will be held
            $information['meet']
            // Event object. Same properties as events table
            $information['event']

            // Host team activity program. Same property as activity_programs table
            $information['host_team']

            // Array of other teams activity programs. Same property as activity_programs table
            // access the data like the following:
            // foreach ($information['other_teams'] as $team) {
            //    $team->name;
            // }
            $information['other_teams']
            
 */ ?>


<div class="meets_viewer_container <?php echo $information['meet_type']; ?>">

	<div class="left">
		<?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>

	<div class="ui-widget ui-widget-content ui-corner-all team_list right" style="height: auto;">
		<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>
		<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">
								<div class="button cancel" style="font-size: 7pt;" data-meet="<?php echo $information['id']; ?>" data-action="drop">Drop</div>
							</td>
						</tr>
                    <?php endforeach; ?>
                <?php endif; ?>
			</tbody>
		</table>
	</div>
</div>






