<?php
    $current_year = intval(Helpers::getCurrentYear()); 
    $current_year_display = $current_year . '-' . substr($current_year + 1, 2, 2);

    $last_year = $current_year - 1;
    $last_year_display = $last_year . '-' . substr($last_year + 1, 2, 2);

    $next_year = $current_year + 1;
    $next_year_display = $next_year . '-' . substr($next_year + 1, 2, 2);
?>


<h2>OSAA Staff Dashboard</h2>

You are logged into an account with OSAA Administrative access.

<div class="vertical_tabs my_school">
    <ul style="padding-left: 5px; font-size: 9pt; height: 502px; list-style-type: none !important;">
        <li><a href="#osaa-dashboard-index">Index &amp; Reports</a></li>
        <li><a href="#osaa-dashboard-schools">Schools</a></li>
        <li><a href="#osaa-dashboard-championships">Championships</a></li>
        <li><a href="#osaa-dashboard-offerings">Offerings</a></li>
        <li><a href="#osaa-dashboard-contests">Contests</a></li>
        <li><a href="#osaa-dashboard-officials">Officials</a></li>
        <li><a href="#osaa-dashboard-users">Users</a></li>
        <li><a href="#osaa-dashboard-server-utilities">Server Utilities</a></li>
    </ul>

    <!-- Dashboard Home -->
    <div id="osaa-dashboard-index">
        
    	<h2>Notifications</h2>

    	<?php if (count($info['notifications']) < 1): ?>

    		There are no website notifications to display at this time.

    	<?php else: ?>
    		<table class="bia_table">
    			<tbody>
    				<?php foreach ($info['notifications'] as $notification): ?>
    					<tr>
    						<td>
    							<img src="<?php echo $notification->getInfo('icon'); ?>" alt="" title="" style="" /><br />    							
    						</td>
    						<td style="vertical-align: top; line-height: 1.1em; padding: 0 5px;">
    							<div style="font-size: 8pt; font-weight: bold;">
    								<?php echo $notification->getInfo('scope'); ?> <?php echo $notification->getInfo('type'); ?>
    							</div>
    							<?php echo $notification->message; ?>
    						</td>
    						<td style="vertical-align: top; line-height: 1.1em; font-size: 8pt;">
    							<?php echo date('n/j/Y g:ia', strtotime($notification->posted_at)); ?>
    						</td>
    						<td style="vertical-align: top; line-height: 1.1em; font-size: 8pt;">
    							<?php echo $notification->getPosterName(); ?>
    						</td>
    					</tr>
    				<?php endforeach; ?>
    			</tbody>	
    		</table>
    	<?php endif; ?>

    	<br /><br />

    	<div style="margin-top: 1em; font-size: 8pt;">

            <h2>Reports &amp; Forms</h2>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/forms/eligibility'); ?>" target="_blank" class="osaa_jump_button">Eligibility Forms</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    View and manage Student Eligibility Request Waivers.  This page can be accessed to search for an existing eligibility or to view a list of forms that have already been submitted and need OSAA attention or approval.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/forms/ejection'); ?>" target="_blank" class="osaa_jump_button">Ejection Reports</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    View and manage Ejection Reports.  From this page, you can search for an ejection report by school or by sport(s).  OSAA staff can manage reports and finalize any accepted or appealed ejection reports.
                </div>
            </div>    		

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/forms/seasonal'); ?>" target="_blank" class="osaa_jump_button">Seasonal Reports</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Access Seasonal Preselection and Participation Reports.  You can see at a quick glance which activities have been preselected for the next school year in addition to any program that is being dropped or added.  You can also email reminders about missing forms or download reports.
                </div>
            </div>    

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('reports/all-state'); ?>" target="_blank" class="osaa_jump_button">Academic All-State</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Download a ZIP file of all Academic All-State Awards entries and reports.
                </div>
            </div>              

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/forms/bia/admin'); ?>" target="_blank" class="osaa_jump_button">BIA Reports</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    View and manage BIA Assessment Reconciliation Report Forms.  You can see submitted reports and run reports for processing payments.
                </div>
            </div> 


            <div style="width: 100%; height: 66px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/exams/quiz-results'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="#" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Training Course Records</a><br />

                        <?php echo Form::label('training-course', 'Course', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('training-course',
                                        array(5 => 'OSAA Spirit Safety'),                                        
                                        array('style' => '')); ?>
                    </div>

                    <div style="float: left; width: 70%; height: 66px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                        Downloads a list of exam results that include the selected training course completions.  Information will include the participant's name, email address, school, role, and completion date.
                    </div>
                <?php echo Form::close(); ?>
            </div> 
           
        </div>

    </div>
    <!-- End Dashboard Home -->


    <!-- Schools -->
    <div id="osaa-dashboard-schools">
        <div style="margin-top: 1em; font-size: 8pt;">
        	
            <h2>School Information &amp; Reports</h2>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/admin/utility/schoolContacts'); ?>" target="_blank" class="osaa_jump_button">Master Report</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    This report creates a spreadsheet of all full member schools and their contact information: name, classification, address, superintendent, principal, AD, AD secretary, all head coaches, a listing of what the school offers/coops, their key codes, and their HyTEK code.
                </div>
            </div>

            <div style="width: 100%; height: 66px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/schools/download-sport-coaches'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('/schools/download-sport-coaches'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Sport Head Coaches</a><br />

                        <?php echo Form::label('sport', 'Sport', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('sport',
                                        array('FBL' => 'Football',
                                              'VBL' => 'Volleyball',
                                              'BSC' => 'Boys Soccer',
                                              'GSC' => 'Girls Soccer',
                                              'XC'  => 'Cross Country'),
                                        'FBL',
                                        array('style' => '')); ?>
                    </div>

                    <div style="float: left; width: 70%; height: 66px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                        Downloads a CSV report of all full member school head coaches for the selected sport.  Only one head coach from the school's highest level of team will be returned.  Combined sports, i.e. Cross Country, Swimming, etc., will be listed as two rows unless the coach is duplicated for each gender.
                    </div>
                <?php echo Form::close(); ?>
            </div> 

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/schools/reports/list'); ?>" target="_blank" class="osaa_jump_button">Schools / Classification</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    This report creates a PDF listing of each full member school and their classification, sorted alphabetically.  Changes to the school's classification from the previous school year are highlighted for easy reference.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/schools/reports/school-districts'); ?>" target="_blank" class="osaa_jump_button">School Districts</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    This report creates a PDF listing of each school and their school district, sorted alphabetically by district, then school name and grouped by school district.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <?php if (Helpers::strEqual(Auth::user()->email, array('gibbyr@osaa.org', 'candyp@osaa.org', 'meridithp@osaa.org'))): ?>
                        <a href="<?php echo url('/invoices/calculate/full'); ?>" target="_blank" class="osaa_jump_button">Calculate <?php echo substr(Session::get('year'), 2, 2); ?>-<?php echo substr(intval(Session::get('year')) + 1, 2, 2); ?> Invoices</a>
                    <?php else: ?>
                        <a href="<?php echo url('/invoices/calculate/full'); ?>" target="_blank" class="osaa_jump_button" data-disabled="true">Calculate <?php echo substr(Session::get('year'), 2, 2); ?>-<?php echo substr(intval(Session::get('year')) + 1, 2, 2); ?> Invoices</a>
                    <?php endif; ?>
                    
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Calculate Full-Member invoices for the <?php echo intval(Session::get('year')); ?>-<?php echo substr(intval(Session::get('year')) + 1, 2, 2); ?> school year. (~ August)<br />
                    Execute this functions once per year, then use the next function to render the invoices to a PDF view.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/invoices/render/full?view=true'); ?>" target="_blank" class="osaa_jump_button">View <?php echo substr(Session::get('year'), 2, 2); ?>-<?php echo substr(intval(Session::get('year')) + 1, 2, 2); ?> Invoices</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Show a view of all <?php echo intval(Session::get('year')); ?>-<?php echo substr(intval(Session::get('year')) + 1, 2, 2); ?> school year Full-Member invoices.  Print the view as PDF to save digital copies of invoices.
                </div>
            </div>


            <br />


            <h2>Associate Member Schools</h2>
            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <?php if (Helpers::strEqual(Auth::user()->email, array('gibbyr@osaa.org', 'candyp@osaa.org', 'meridithp@osaa.org', 'kellyf@osaa.org'))): ?>
                        <a href="<?php echo url('/schools/associate-members/edit'); ?>" class="osaa_jump_button">Associate Members List</a>        
                    <?php else: ?>
                        <a href="<?php echo url('/schools/associate-members/edit'); ?>" class="osaa_jump_button" data-disabled="true">Associate Members List</a>        
                    <?php endif; ?>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Manage the list of associate member schools: which ones are displayed, indicate if dues have been paid, or change enrollment numbers.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/schools/associate-members/download'); ?>" class="osaa_jump_button">Download Schools</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Download a list of associate member schools to a CSV file.  This download includes the name of the school and its mailing address.
                </div>
            </div>
            
            <div style="width: 100%; height: 50px; margin-bottom: 1em;">                
                <div style="float: left; width: 25%; padding-top: 12px;">                        
                    <a href="<?php echo url('/invoices/calculate/associate?school-year=' . (intval(Session::get('year')) + 1)); ?>" target="_blank" class="osaa_jump_button">Calculate <?php echo substr(intval(Session::get('year')) + 1, 2, 2); ?>-<?php echo substr(intval(Session::get('year')) + 2, 2, 2); ?> Invoices</a>                              
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Calculate associate member invoices for the <?php echo intval(Session::get('year')) + 1; ?>-<?php echo substr(intval(Session::get('year')) + 2, 2, 2); ?> school year. (~ May/June)<br />Execute this functions once per year, then use the next function to render the invoices to a PDF view.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                        
                    <a href="<?php echo url('/invoices/render/associate?school-year=' . (intval(Session::get('year')) + 1)); ?>" target="_blank" class="osaa_jump_button">View <?php echo substr(intval(Session::get('year')) + 1, 2, 2); ?>-<?php echo substr(intval(Session::get('year')) + 2, 2, 2); ?> Invoices</a>                              
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Download a PDF of all <?php echo intval(Session::get('year')) + 1; ?>-<?php echo substr(intval(Session::get('year')) + 2, 2, 2); ?> school year Associate Member invoices.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                        
                    <a href="<?php echo url('/invoices/membership-report?school-year=' . (intval(Session::get('year')) + 1)); ?>" target="_blank" class="osaa_jump_button"><?php echo substr(intval(Session::get('year')) + 1, 2, 2); ?>-<?php echo substr(intval(Session::get('year')) + 2, 2, 2); ?> Summary</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Create a summary of membership invoices and dues for the <?php echo intval(Session::get('year')) + 1; ?>-<?php echo substr(intval(Session::get('year')) + 2, 2, 2); ?> school year.
                </div>
            </div>

            <div style="width: 100%; height: 66px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/schools/associate-members/copy'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('/schools/associate-members/copy'); ?>" class="osaa_jump_button" target="_blank" data-submit="submit" style="margin-bottom: 0.25em;">Copy Associate Members</a><br />

                        <?php echo Form::label('year', 'School Year', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('year',
                                        array($last_year => $last_year_display,
                                              $current_year => $current_year_display,
                                              $next_year => $next_year_display),
                                        $current_year,
                                        array('style' => '')); ?>
                    </div>

                    <div style="float: left; width: 70%; height: 66px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                        Copy Associate Member schools from the selected school year to the next school year.  Use the <b>current school year</b>.
                    </div>
                <?php echo Form::close(); ?>
            </div>            
        </div>
    </div>
    <!-- End Schools -->


    <!-- Championships -->
    <div id="osaa-dashboard-championships">
        <div style="margin-top: 1em; font-size: 8pt;">
            
            <h2>Registration Forms</h2>


            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">
                    <a href="<?php echo url('/forms/music/large-ensemble/admin'); ?>" class="osaa_jump_button">Large Ensemble Reports</a>                    
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    View and edit submitted Large Ensemble Reports for Band, Choir, and Orchestra.  You can sort by activity and create a new form if necessary.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">
                    <a href="<?php echo url('/forms/music/registration'); ?>" class="osaa_jump_button">Music Registration</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    View and manage submitted Music Registration Forms for Band, Choir, and Orchestra.  This takes you to the registration form landing page where schools can select which activity to register for state.  Only qualifier submitted on a Large Ensemble Report will be able to register.
                </div>
            </div>            


            <br />


            <h2>State Championship Reimbursements</h2>            
            

            <?php /*  <div style="width: 100%; height: 66px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/reimburse/status'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('/reimburse/status'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Status Report</a><br />

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>
                    </div>

                    <div style="float: left; width: 70%; height: 66px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                        Show a list of all activities in the season to determine if reimbursements have been calculated.  Broken down into sport/classification, this status report will help determine if final payment reports can be run.  This report also lists which schools have not completed their seasonal report forms and should have their checks held until completed.
                    </div>
                <?php echo Form::close(); ?>
            </div> 
  */ ?>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">
                    <a href="<?php echo url('/reimburse'); ?>" class="osaa_jump_button" target="_blank">Schools</a>                    
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Calculate reimbursements for schools participating the State Championships in bracketed team sports, individual sports, and activities.  See a status of which sports/division have been calculated and view PDF reports of reimbursements.
                </div>
            </div>


            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/forms/ticket-report/admin'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('/forms/ticket-report/admin'); ?>" class="osaa_jump_button" target="_blank" data-submit="submit" style="margin-bottom: 0.25em;">Ticket Reports</a><br />

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>
                    </div>
                <?php echo Form::close(); ?>                

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Shows the OSAA administrative page listing all online playoff Event Management &amp; Ticket Reports for the selected season.  This list will show every OSAA playoff contest hosted by the home school requiring a ticket report to be filed.
                </div>
            </div>

            <div style="width: 100%; height: 66px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/officials/associations/sport-reimbursement-report'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('/officials/associations/sport-reimbursement-report'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Officials</a><br />

                        <?php echo Form::label('sport', 'Sport', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('sport',
                                        array('football'   => 'Football',
                                              'volleyball' => 'Volleyball',
                                              'soccer'     => 'Soccer',
                                              'basketball' => 'Basketball',
                                              'wrestling'  => 'Wrestling',
                                              'baseball'   => 'Baseball',
                                              'softball'   => 'Softball'),
                                        'football',
                                        array('style' => '')); ?>
                    </div>

                    <div style="float: left; width: 70%; height: 66px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                        Shows a printable report of each officials association in the selected sport and their playoff officials reimbursement. 
                    </div>
                <?php echo Form::close(); ?>
            </div> 

            <br />

            <h2>Headquarter Hotels</h2>
            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">
                    <a href="<?php echo url('/admin/hotels/manage'); ?>" class="osaa_jump_button">Manage Hotels</a>                    
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Manage headquarter hotels, display information, and contact information for display as lodging information on activity web pages.
                </div>
            </div>

        </div>
    </div>
    <!-- End Championships -->

    
    <!-- Offerings -->    
    <div id="osaa-dashboard-offerings">
        <div style="margin-top: 1em; font-size: 8pt;">
            
            <h2>School Offerings / Activity Programs / Leagues &amp; Special Districts</h2>            

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/offerings/current'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        
                        <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" style="margin-bottom: 0.25em;">View Activity Programs</a><br />
                        
                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>                        

                        <br class="clear" /><br />

                        <?php echo Form::label('year', 'School Year', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('year',
                                        array($last_year => $last_year_display,
                                              $current_year => $current_year_display,
                                              $next_year => $next_year_display),
                                        $current_year,
                                        array('style' => '')); ?>

                        <br class="clear" /><br />                                                
                        

                        <?php echo Form::label('debug', 'Include School IDs', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::checkbox('debug', true, false, array('style' => 'vertical-align: middle;')); ?>

                        <br />

                        <?php echo Form::label('regular', 'Include Regular League', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::checkbox('regular', true, false, array('style' => 'vertical-align: middle;')); ?>                        

                    </div>
                <?php echo Form::close(); ?>                

                <div style="float: left; width: 70%; height: 145px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Shows a report of the listed activity programs on the website, available to be viewed, listed by division and league for a given school year and season.  This report is helpful to see a list of all schools/teams and which leagues/special districts they are currently assigned.
                    <br /><br />
                    Use the <b>current school year</b> to preview next school year's offerings.
                    <br /><br /><br /><br />
                    <div style="line-height: 1.6em;">                        
                        ...Adds school ID in parentheses, (##)<br />
                        ...Adds school's regularly assigned league in brackets, [XX], if listed in a special district                        
                    </div>
                </div>
            </div>

            <br class="clear" /><br />

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/offerings/create-sanctioned-activities'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <?php if (Helpers::isGibby()): ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" style="margin-bottom: 0.25em;">1. Create SAs</a><br />
                        <?php else: ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" data-disabled="disbled" style="margin-bottom: 0.25em;">1. Create SAs</a><br />
                        <?php endif; ?>

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>                        

                        <br class="clear" /><br />

                        <?php echo Form::label('year', 'School Year', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('year',
                                        array($last_year => $last_year_display,
                                              $current_year => $current_year_display,
                                              $next_year => $next_year_display),
                                        $current_year,
                                        array('style' => '')); ?>
                    </div>
                <?php echo Form::close(); ?>                

                <div style="float: left; width: 70%; height: 105px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Given a school year and a season, this will generate the next school year's sanctioned activity records copied from the provided school year.
                    Execute this function once to setup the <code>sanctioned_activities</code> table for the upcoming school year.  This should be done first, before creating activity programs for the next school year.
                    <br /><br />
                    Choose the <b>current school year</b> to create next year's SA records.<br />
                    <span class="important">NOTE: Review the created SA records in the database to ensure dates are correct.</span>
                </div>
            </div>

            <br class="clear" /><br />

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/offerings/process-seasonal-preselections'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <?php if (Helpers::isGibby()): ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" style="margin-bottom: 0.25em;">2. Process Preselections</a><br />
                        <?php else: ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" data-disabled="disbled" style="margin-bottom: 0.25em;">2. Process Preselections</a><br />
                        <?php endif; ?>

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>                        

                        <br class="clear" /><br />

                        <?php echo Form::label('year', 'School Year', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('year',
                                        array($last_year => $last_year_display,
                                              $current_year => $current_year_display,
                                              $next_year => $next_year_display),
                                        $current_year,
                                        array('style' => '')); ?>
                    </div>
                <?php echo Form::close(); ?>                

                <div style="float: left; width: 70%; height: 105px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Given a school year and a season, this will create the next school year's <code>school_offerings</code> records based off of the preselections submitted in that year/season's seasonal school form.  Leagues are assigned as a best guess.
                    <br /><br />
                    <span class="important">NOTE: The seasonal form must be closed in order for this function to proceed.</span>     
                    <br /><br />
                    Choose the <b>current school year</b> from which preselections were submitted.                    
                </div>
            </div>

            <br class="clear" /><br />

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/offerings/fill-coops'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <?php if (Helpers::isGibby()): ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" style="margin-bottom: 0.25em;">3. Fill Coops</a><br />
                        <?php else: ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" data-disabled="disbled" style="margin-bottom: 0.25em;">3. Fill Coops</a><br />
                        <?php endif; ?>

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>                        

                        <br class="clear" /><br />

                        <?php echo Form::label('year', 'School Year', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('year',
                                        array($last_year => $last_year_display,
                                              $current_year => $current_year_display,
                                              $next_year => $next_year_display),
                                        $next_year,
                                        array('style' => '')); ?>
                    </div>
                <?php echo Form::close(); ?>                

                <div style="float: left; width: 70%; height: 105px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    This will go through the list of school offerings for a given school year/season and determine if the offering will be through an
                    existing Coop and adjusts the respective <code>school_offerings</code> records accordingly.                    
                    <br /><br />
                    Choose the <b>next school year</b>, which is year for which the offerings will be potentially cooperating.
                </div>
            </div>

            <br class="clear" /><br />

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/offerings/preview-offerings'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        
                        <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" style="margin-bottom: 0.25em;">4. Preview Offerings</a><br />
                        
                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>                        

                        <br class="clear" /><br />

                        <?php echo Form::label('year', 'School Year', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('year',
                                        array($last_year => $last_year_display,
                                              $current_year => $current_year_display,
                                              $next_year => $next_year_display),
                                        $current_year,
                                        array('style' => '')); ?>

                        <br class="clear" /><br />                        

                        <?php echo Form::label('next', 'View Next Year', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::checkbox('next', true, true, array('style' => 'vertical-align: middle;')); ?>

                        <br />

                        <?php echo Form::label('proposed', 'Indicate Proposed', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::checkbox('proposed', true, true, array('style' => 'vertical-align: middle;')); ?>

                        <br />

                        <?php echo Form::label('debug', 'Include School IDs', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::checkbox('debug', true, false, array('style' => 'vertical-align: middle;')); ?>

                        <br />

                        <?php echo Form::label('regular', 'Include Regular League', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::checkbox('regular', true, false, array('style' => 'vertical-align: middle;')); ?>

                        <br />

                        <?php echo Form::label('check-missing', 'Check Missing Selections', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::checkbox('check-missing', true, false, array('style' => 'vertical-align: middle;')); ?>

                        <br />

                        <?php if (Helpers::isGibby()): ?>
                            <a href="<?php echo url('/offerings/edit-school-offerings'); ?>" class="osaa_jump_button" target="_blank" data-submit="submit" data-form-url="<?php echo url('/offerings/edit-school-offerings'); ?>" data-font-size="8pt" style="margin-bottom: 0.25em;">Edit Offerings</a>
                        <?php endif; ?>

                    </div>
                <?php echo Form::close(); ?>                

                <div style="float: left; width: 70%; height: 190px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Shows a preview of school offerings by division and league for a given school year and season.  This report is helpful in comparing draft lists to what the database holds.  This is useful to preview before creating activity programs.                    
                    <br /><br />
                    Use the <b>current school year</b> to preview next school year's offerings.
                    <br /><br /><br /><br />
                    <div style="line-height: 1.6em;">
                        ...Select to view next year's leagues/districts<br />
                        ...Adds "PROPOSED" to any special district<br />
                        ...Adds school ID in parentheses, (##)<br />
                        ...Adds school's regularly assigned league in brackets, [XX], if listed in a special district<br />
                        ...Shows a debug report of any offering that was not included in the report
                    </div>
                </div>
            </div>

            <br class="clear" /><br />           

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/offerings/create-activity-programs'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <?php if (Helpers::isGibby()): ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" style="margin-bottom: 0.25em;">5. Create APs</a><br />
                        <?php else: ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" data-disabled="disbled" style="margin-bottom: 0.25em;">5. Create APs</a><br />
                        <?php endif; ?>

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>                        

                        <br class="clear" /><br />

                        <?php echo Form::label('year', 'School Year', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('year',
                                        array($last_year => $last_year_display,
                                              $current_year => $current_year_display,
                                              $next_year => $next_year_display),
                                        $next_year,
                                        array('style' => '')); ?>
                    </div>
                <?php echo Form::close(); ?>                

                <div style="float: left; width: 70%; height: 105px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    This will go through each school offering for a given school year and season and creates a corresponding record in the <code>activity_programs</code>
                    table.  This will also create <code>teams</code> for the levels indicated.  The originating record in the <code>school_offerings</code> table is updated with the newly created AP's ID number.
                    <br /><br />
                    Choose the <b>next school year</b> for which the offerings will be created into activity programs.     
                </div>
            </div>

            <br class="clear" /><br />
            
            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/offerings/copy-ap-staff'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <?php if (Helpers::isGibby()): ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" style="margin-bottom: 0.25em;">6. Copy AP Staff</a><br />
                        <?php else: ?>
                            <a href="#" class="osaa_jump_button" target="_blank" data-submit="submit" data-disabled="disbled" style="margin-bottom: 0.25em;">6. Copy AP Staff</a><br />
                        <?php endif; ?>

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>                        

                        <br class="clear" /><br />

                        <?php echo Form::label('year', 'School Year', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('year',
                                        array($last_year => $last_year_display,
                                              $current_year => $current_year_display,
                                              $next_year => $next_year_display),
                                        $next_year,
                                        array('style' => '')); ?>
                    </div>
                <?php echo Form::close(); ?>                

                <div style="float: left; width: 70%; height: 105px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    This goes through each activity program for a given school year and season and copies AP staff from the previous year's activity program.  This creates <code>activity_program_staff</code> records.
                    <br /><br />
                    Choose the <b>next school year</b> for which the activity program staff is being copied to.                    
                </div>
            </div>


            <br class="clear" /><br />

        </div>
    </div>
    <!-- End Offerings -->


    <!-- Contests -->
    <div id="osaa-dashboard-contests">
        
        <div style="margin-top: 1em; font-size: 8pt;">

            <h2>Endowment Contests</h2>
            
            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/admin/utility/downloadEndowments'); ?>" target="_blank" class="osaa_jump_button">Endowment Report</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    This report creates a spreadsheet of all endowment contests from this past school year.  Lists the date, home team, away team, and activity.  Ordered by contest date.
                </div>
            </div>        


            <br />

            <h2>Rankings &amp; Cross-Checks</h2>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">            
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="#" class="rankings_functions osaa_jump_button">Calculate Rankings</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Shows a list of rankings calculation functions that can be executed manually in order to force a rankings re-calculation.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">            
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/admin/utility/viewOOS'); ?>" target="_blank" class="osaa_jump_button">Out-of-State Records</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Shows a spreadsheet of out-of-state opponents and when their OOS records were last updated.  Report includes OOS team name, Oregon opponent, AD, AD Sec., Head Coach, activity, year, season, division, date, status, result, OOS record, # games, record updated at, and stale.

                </div>
            </div>

            <div style="width: 100%; height: 60px; margin-bottom: 1em;">
                
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('contests/schedule-manipulation'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('contests/schedule-manipulation'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Schedule Manipulation</a><br />

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>
                    </div>
                <?php echo Form::close(); ?>


                <div style="float: left; width: 70%; height: 60px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Shows a list of contests that are flagged as possible manipulations.  Checks varsity level contests that are cross division, not part of a tournament, and created after a specified date.
                </div>
            </div>    

            <div style="width: 100%; height: 60px; margin-bottom: 1em;">
                
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('admin/utility/checkLeagueContests'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('admin/utility/checkLeagueContests'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Check League</a><br />

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>
                    </div>
                <?php echo Form::close(); ?>


                <div style="float: left; width: 70%; height: 60px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Checks all contests entered in this season to ensure they should be correctly marked as league contests.
                </div>
            </div>

            <div style="width: 100%; height: 70px; margin-bottom: 1em;">
                
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('contests/verify-cts'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('contests/verify-cts'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Verify CTS</a><br />

                        <?php echo Form::label('activity', 'Sport', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('activity',
                                        array('FBL' => 'Football',
                                              'VBL' => 'Volleyball',
                                              'BSC' => 'Boys Soccer',
                                              'GSC' => 'Girls Soccer',
                                              'BBX' => 'Boys Basketball',
                                              'GBX' => 'Girls Basketball',
                                              'BBL' => 'Baseball',
                                              'SBL' => 'Softball'),
                                        'FBL',
                                        array('style' => '')); ?>

                        <br />

                        <?php echo Form::label('div', 'Division', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('div',
                                        array('6A' => '6A',
                                              '5A' => '5A',
                                              '4A' => '4A',
                                              '3A' => '3A',
                                              '2A' => '2A',
                                              '1A' => '1A',
                                              '3A/2A/1A' => '3A/2A/1A',
                                              '2A/1A' => '2A/1A'),
                                        '6A',
                                        array('style' => '')); ?>

                        <br />
                    </div>
                <?php echo Form::close(); ?>


                <div style="float: left; width: 70%; height: 70px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Checks the `contest_teams_scores` database entries and runs several double-checks to ensure rankings information is accurate and not corrupted by modifications or garbage input which will negatively offset rankings and records calculations.
                </div>
            </div>    

            <div style="width: 100%; height: 60px; margin-bottom: 1em;">
                
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('contests/check-colley'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('contests/check-colley'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Check Colley</a><br />

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>
                    </div>
                <?php echo Form::close(); ?>


                <div style="float: left; width: 70%; height: 60px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Checks the calculated Colley matricies for the selected season to verify the Colley calculations are correct for the stored CTS records that indicate contests that are Colley rankable.  This check ensures the average Colley rating value is 0.5 within 1x10-14 accuracy.
                </div>
            </div>  

            <div style="width: 100%; height: 70px; margin-bottom: 1em;">
                
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('reports/contest-counts'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('reports/contest-counts'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Team Contests</a><br />

                        <?php echo Form::label('activity', 'Sport', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('activity',
                                        array('FBL' => 'Football',
                                              'VBL' => 'Volleyball',
                                              'BSC' => 'Boys Soccer',
                                              'GSC' => 'Girls Soccer',
                                              'BBX' => 'Boys Basketball',
                                              'GBX' => 'Girls Basketball',
                                              'BBL' => 'Baseball',
                                              'SBL' => 'Softball'),
                                        'FBL',
                                        array('style' => '')); ?>                        
                        <br />
                    </div>
                <?php echo Form::close(); ?>


                <div style="float: left; width: 70%; height: 70px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Returns a CSV report of all schools offering the activity and their count of varsity level contests.  This is a detailed report of contests on
                    each team's schedule broken down by contest type and other factors.
                </div>
            </div>

             <div style="width: 100%; height: 70px; margin-bottom: 1em;">
                
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('reports/rankings-counts'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('reports/rankings-counts'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Rankings Counts</a><br />

                        <?php echo Form::label('activity', 'Sport', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('activity',
                                        array('FBL' => 'Football',
                                              'VBL' => 'Volleyball',
                                              'BSC' => 'Boys Soccer',
                                              'GSC' => 'Girls Soccer',
                                              'BBX' => 'Boys Basketball',
                                              'GBX' => 'Girls Basketball',
                                              'BBL' => 'Baseball',
                                              'SBL' => 'Softball'),
                                        'FBL',
                                        array('style' => '')); ?>                        
                        <br />
                    </div>
                <?php echo Form::close(); ?>


                <div style="float: left; width: 70%; height: 70px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Returns a CSV report of all schools offering the activity and their count of varsity level ranked contests.  This is a detailed report of rankable contests on
                    each team's schedule with their final rankings information.
                </div>
            </div>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('contests/check-ties/volleyball'); ?>" target="_blank" class="osaa_jump_button">Volleyball Ties</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    <b>Volleyball:</b> Shows a list of varsity level volleyball contests from this current school year where the result was entered as a tie.  This is helpful for identifying any spurious pool play matches.
                </div>
            </div>    

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('contests/audit-swap-designation'); ?>" target="_blank" class="osaa_jump_button">Audit Swaps H/A</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    <b>Baseball/Softball:</b> Downloads a CSV report of any baseball or softball varsity contest in the current school year that has been scored and the `is_swap_designation` flag is set to true.  This report also returns contact info.  Useful for verifying with schools if they really indented to swap designations.
                </div>
            </div>    


            <br />


            <h2>Rankings Simulations</h2>

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/simulations/contest-counts'); ?>" target="_blank" class="osaa_jump_button">Contest Counts</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Returns a report of contests played by sport, broken down by division and out-of-state.  This report is helpful for the Rankings Committee to see how many out of classification contests are played.
                </div>
            </div>

            <div style="width: 100%; height: 90px; margin-bottom: 1em;">
                
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/admin/utility/colleyMath'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('/admin/utility/colleyMath'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Colley Example</a><br />

                        <?php echo Form::label('year', 'Year', array('style' => 'width: auto; margin-right: 8px;')); ?>                            
                        <?php echo Form::select('year',
                                        array('2018' => '2018-19',
                                              '2017' => '2017-18',                                              
                                              '2016' => '2016-17',
                                              '2015' => '2015-16'),
                                        Helpers::getCurrentYear(),
                                        array('style' => '')); ?>

                        <br />

                        <?php echo Form::label('activity', 'Sport', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('activity',
                                        array('FBL' => 'Football',
                                              'VBL' => 'Volleyball',
                                              'BSC' => 'Boys Soccer',
                                              'GSC' => 'Girls Soccer',
                                              'BBX' => 'Boys Basketball',
                                              'GBX' => 'Girls Basketball',
                                              'BBL' => 'Baseball',
                                              'SBL' => 'Softball'),
                                        'FBL',
                                        array('style' => '')); ?>                        
                        <br />
                        
                        <?php echo Form::label('division', 'Division', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('division',
                                        array('6A'       => '6A',
                                              '5A'       => '5A',
                                              '4A'       => '4A',
                                              '3A'       => '3A',
                                              '3A/2A/1A' => '3A/2A/1A',
                                              '2A'       => '2A',
                                              '2A/1A'    => '2A/1A',
                                              '1A'       => '1A'),
                                        '6A',
                                        array('style' => '')); ?>

                    </div>
                <?php echo Form::close(); ?>


                <div style="float: left; width: 70%; height: 90px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    View the Colley matrix and calculations for the specified year/activity/division.
                </div>
            </div>

            <div style="width: 100%; height: 315px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/simulations/run'),
                                    'target' => '_blank',
                                    'name'   => 'simulation_form')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('/simulations/run'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Run Simulation</a><br />

                        <?php echo Form::label('year', 'Year', array('style' => 'width: auto; margin-right: 8px;')); ?>                            
                        <?php echo Form::select('year',
                                        array('2015' => '2015-16',
                                              '2016' => '2016-17',
                                              '2017' => '2017-18'),
                                        Helpers::getCurrentYear(),
                                        array('style' => '')); ?>

                        <br />

                        <?php echo Form::label('season', 'Season', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('season',
                                        array('F' => 'Fall',
                                              'W' => 'Winter',
                                              'S' => 'Spring'),
                                        Helpers::getCurrentSeason(),
                                        array('style' => '')); ?>                        
                        <br />

                        <?php echo Form::label('activity', 'Sport', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('activity',
                                        array(''    => '(In Season)',
                                              'FBL' => 'Football',
                                              'VBL' => 'Volleyball',
                                              'BSC' => 'Boys Soccer',
                                              'GSC' => 'Girls Soccer',
                                              'BBX' => 'Boys Basketball',
                                              'GBX' => 'Girls Basketball',
                                              'BBL' => 'Baseball',
                                              'SBL' => 'Softball'),
                                        null,
                                        array('style' => '')); ?>  

                        <br />

                        <?php echo Form::label('division', 'Division', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('division',
                                        array(''    => '(All)',
                                              '6A'       => '6A',
                                              '5A'       => '5A',
                                              '4A'       => '4A',
                                              '3A'       => '3A',
                                              '3A/2A/1A' => '3A/2A/1A',
                                              '2A'       => '2A',
                                              '2A/1A'    => '2A/1A',
                                              '1A'       => '1A'),
                                        null,
                                        array('style' => '')); ?>  

                        <br />
                        
                        <?php echo Form::label('rpi', 'RPI Weights', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::text('rpi', '35-65', array('style' => 'width: 55px;')); ?>     

                        <br />

                        <?php echo Form::label('combo', 'RPI:Colley', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::text('combo', '50-50', array('style' => 'width: 55px;')); ?>   

                        <br />

                        <?php echo Form::label('tie', 'Tie Breaker', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::text('tie', 'colley', array('style' => 'width: 55px;')); ?>    

                        <br />

                        <?php echo Form::label('variant', 'Variant', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php
                            $options = array(
                                ''                    => '',
                                'combo_rating'        => 'Combo: Ratings not Rankings',
                                'rpi_one_away'        => 'RPI Exclude 2+ Classifications Away',
                                'exclude_independent' => 'Exclude Independent Teams from RPI',
                                'colley_proxy'        => 'Include Colley Proxy Teams',
                                'factor_forfeits'     => 'Factor forfeits in OWP',
                                'soccer_ties'         => 'Soccer Ties as 1/3',
                                'colley_expanded'     => 'Colley +/- 1 Away'
                            );
                        ?>
                        <?php echo Form::select('variant', $options, '', array('style' => 'width: 140px;')); ?>           
                        
                        <br />

                        <?php echo Form::label('no-truncate', 'Do Not Truncate', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::checkbox('no-truncate', true, false, array('style' => 'vertical-align: middle;')); ?>

                        <br />

                        <?php echo Form::label('debug', 'Debug', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::checkbox('debug', true, false, array('style' => 'vertical-align: middle;')); ?>

                        <br />

                        <?php echo Form::label('limit', 'Limit', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::text('limit', null, array('style' => 'width: 55px;')); ?>

                        <br /><br />

                        <a href="#" data-step-wise="step-wise">Process Step-Wise</a>

                        <br /><br />                        

                        <a href="#" data-reset="reset">Reset Form</a>

                    </div>
                <?php echo Form::close(); ?>

                <div style="float: left; width: 70%; height: 315px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">                    
                    <b>PRI Weights</b> set how much a team's WWP and OWP count towards the RPI.  Separate numbers by a hyphen (-) and make sure the numbers add up to 100.  Add a third number (35-40-25) for including OOWP.  If including OOWP, input <b>Limit</b> (i.e. 50) and run once.  When the limit is reached, check <b>Do not truncate</b> and keep <b>Limit</b> as is, then run repeatedly until a ZIP file is created.
                    <br /><br />
                    <b>RPI:Colley</b> is the ratio of RPI rankings to Colley rankings for determining OSAA ranking.  50-50 is a straight average, can be other numbers that total to 100, separate with hyphen.  (i.e. 0-100 will calculate rankings based only on Colley ratings.)
                    <br /><br />
                    <b>Tie Breaker</b> can be any column in the team rankings table that will be used to break ties (use "rpi" or "colley".)
                    <br /><br />
                    <b>Variant</b> offers specific ways in which to calculate rankings differently for a simulation.  Default is to have no variant.  Select an option to affect how that simulation is calculated.
                    <br /><br />
                    <b>Do Not Truncate</b> is used in conjunction with a limit and only applies after already running the simulation once.  This allows you to refresh the page to run the simulation again with some numbers already calculated.                                        
                    <br /><br />
                    Debug log is stored to app/storage/test/simulation_log.txt
                </div>
            </div>

        </div>
        
    </div>
    <!-- End Contests -->


    <!-- Officials -->
    <div id="osaa-dashboard-officials">
        
        <div style="margin-top: 1em; font-size: 8pt;">

            <h2>Officials Associations</h2>
            
            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/officials/associations/gaps'); ?>" target="_blank" class="osaa_jump_button">Coverage Gaps</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    This will show a list of activity programs in sports that have officials for contests but no local officials association is assigned.
                </div>
            </div>        

            <div style="width: 100%; height: 66px; margin-bottom: 1em;">
                <?php echo Form::open(array('method' => 'GET',
                                    'url'    => url('/officials/associations/coverage'),
                                    'target' => '_blank')); ?>
                    <div style="float: left; width: 25%; padding-top: 12px;">                        
                        <a href="<?php echo url('/officials/associations/coverage'); ?>" target="_blank" class="osaa_jump_button" data-submit="submit" style="margin-bottom: 0.25em;">Schools Serviced</a><br />

                        <?php echo Form::label('sport', 'Sport', array('style' => 'width: auto; margin-right: 8px;')); ?>
                        <?php echo Form::select('sport',
                                        array('football'   => 'Football',
                                              'volleyball' => 'Volleyball',
                                              'soccer'     => 'Soccer',
                                              'basketball' => 'Basketball',
                                              'wrestling'  => 'Wrestling',
                                              'baseball'   => 'Baseball',
                                              'softball'   => 'Softball'),
                                        'football',
                                        array('style' => '')); ?>
                    </div>

                    <div style="float: left; width: 70%; height: 66px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                        Shows a printable report of each active local officials association, their commissioner, and which schools are serviced by that association.  Be sure to select your desired sport from the drop-down list.  This report should be printed in landscape orientation. 
                    </div>
                <?php echo Form::close(); ?>
            </div>           


            <br />

                        

        </div>
        
    </div>
    <!-- End Officials -->
    

    <!-- Users -->
    <div id="osaa-dashboard-users">
        
        <h2>OSAA User Lookup &amp; Management</h2>
        
        <h3>Lookup</h3>
        <div style="font-size: 10pt;">
            <label style="width: 60px; float: none;">Search</label>
            <input type="text" name="user_lookup_search" id="user_lookup_search" style="width: 150px; margin-right: 50px;" />

            <b>Include:</b>
            <label style="display: inline-block; float: none; font-weight: normal; width: auto; margin-right: 25px;">
                <input type="checkbox" name="user_lookup_include_contacts" id="user_lookup_include_contacts" value="1" checked="checked" style="vertical-align: middle; margin-left: 10px;" />
                <span style="border-bottom: 2px solid #b0ffbe;">School Contacts</span>
            </label>

            <label style="display: inline-block; float: none; font-weight: normal;width: auto; margin-right: 25px;">
                <input type="checkbox" name="user_lookup_include_accounts" id="user_lookup_include_accounts" value="1" checked="checked" style="vertical-align: middle; margin-left: 10px;" />
                <span style="border-bottom: 2px solid #b0dcff;">User Accounts</span>
            </label>

            <label style="display: inline-block; float: none; font-weight: normal;width: auto;">
                <input type="checkbox" name="user_lookup_include_retired" id="user_lookup_include_retired" value="1" style="vertical-align: middle; margin-left: 10px;" />
                Retired
            </label>
        </div>

        <div id="user_lookup_results"></div>

        
    </div>
    <!-- End Users -->


    <!-- Server Utilities -->
    <div id="osaa-dashboard-server-utilities">
        
        <div style="margin-top: 1em; font-size: 8pt;">

            <h2>Server Utilities</h2>

            
            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/admin/ads'); ?>" target="_blank" class="osaa_jump_button">Manage Web Ads</a> 
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Mange website advertisements, add or modify existing ad placements.
                </div>
            </div> 

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo URL::action('AdminController@getPHPInfo'); ?>" target="_blank" class="osaa_jump_button">PHP Information</a> 
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Show a report of the most current and up-to-date PHP configuration and settings.  Includes PHP version, installed modules, and impact settings.
                </div>
            </div> 

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="https://67.22.138.196:2087" target="_blank" class="osaa_jump_button">Root WHM</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Access the web server's root Web Host Manager administration features.  Helpful utilities include modifying the IP black/white lists, configuring the web server, and rebooting the server.  A separate login is required.
                </div>
            </div> 

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="https://67.22.138.196:2083" target="_blank" class="osaa_jump_button">OSAA cPanel</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Access the cPanel administration features for the OSAA website hosting account.  Helpful utilities include CRON jobs, file storage, and manual FTP access over port 80.  A separate login is required.
                </div>
            </div> 

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="https://67.22.138.196:2083/cpsess7494224763/3rdparty/phpMyAdmin/index.php" target="_blank" class="osaa_jump_button">OSAA Database</a> 
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Access the phpMyAdmin database administration features.  A separate login is required.<br /><br /><span class="important">DO NOT ACCESS THE DATABASE UNLESS YOU ARE CONFIDENT MANIPULATING RAW DATA TABLES!</span>
                </div>
            </div> 
            

            <div style="width: 100%; height: 50px; margin-bottom: 1em;">
                <div style="float: left; width: 25%; padding-top: 12px;">                
                    <a href="<?php echo url('/admin'); ?>" target="_blank" class="osaa_jump_button">Old Dashboard</a>
                </div>

                <div style="float: left; width: 70%; height: 50px; border-left: 1px solid #cccccc; padding-left: 2%; margin-left: 2%; line-height: 1.4em;">
                    Go to the old OSAA administrative dashboard.
                </div>
            </div> 


            
    		
    		

        </div>


    </div>
    <!-- End Server Utilities -->

    
</div>