<?php $__env->startSection('page_title'); ?>
    OSAA - My Account
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_sub_title'); ?>    
    My Account
<?php $__env->stopSection(); ?>

<?php $__env->startSection('live_alert'); ?>

    <?php
        GeneralController::getLiveAlert();
    ?>
    
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    @parent
    
    <style type="text/css">        

        .success_bar {
            position: fixed;
            top: 600px;
            left: 0;
            width: 100%;
            padding: 0.25em 0;
            line-height: 1.5em;
            background-color: rgba(176, 255, 190, 0.0);
            border-bottom: 2px solid rgba(13, 88, 27, 0.50);
            border-top: 2px solid rgba(13, 88, 27, 0.50);
            z-index: 500;
        }

        .success_bar .message {
            width: 1200px;
            margin: 0 auto;
            font-size: 14pt;
            color: #151515;
        }

        .odd {
            background-color: #dddddd;
        }

        .bia_table {
            border-collapse: collapse;
            width: 100%;
            font-size: 10pt;
        }

        .bia_table thead {
            background-color: #005FA9;
            color: #ffffff;
        }

        .bia_table thead th {            
            padding: 4px 2px;
            text-align: left;
        }

        .bia_table tbody tr {
            line-height: 2em;
        }

    </style>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('jquery_init'); ?>    

    <?php if (Auth::user()->isOsaaUser()): ?>

        $('.staff_utility_button')
            .addClass('ui-state-default')
            .css({'width':'100px'})
            .hide();

    <?php endif; ?>


    /* Set up the tabs for each school, last tab (index = -1) may be default if specified */
    $('.tabs').tabs(<?php if (Input::has('add-school')): ?> {active:-1} <?php endif; ?>);

    $('.key_code_dialog').dialog({
        autoOpen: false, 
        resizable: false,
        width: 500,
        modal: true,
        buttons: {
            Done: function()
            {
                $(this).dialog("close");
            }
        }
    });

    $('.show_key_code').click(function()
    {
        var school = $(this).attr('data-school');        

        $('.key_code_dialog[data-school=' + school + ']').dialog('open');
    });

    <?php if (Auth::user()->isBiaUser()): ?>

        $('#new_bia_form_button')
            .css({'float' : 'right',
                  'margin-top' : '1em'})
            .button({ icons : { primary : 'ui-icon-plusthick'}});

        <?php /*  Closes?  */ ?>
        <?php if (false): ?>
            $('#new_bia_form_button')            
                .button('disable');
        <?php endif; ?>

        $('.bia_print')
            .css({'width' : '16px',
                  'height' : '16px',
                  'margin-right' : '5px'})
            .button({ icons : { primary : 'ui-icon-print'},
                      text : false})
            .click(function ()
            {
                var button = $(this);
                var row = button.parents('tr');
                var record = row.attr('data-record');

                window.open('<?php echo url('/forms/bia'); ?>/' + record + '/print'); 
            });

        $('.bia_edit')
            .css({'width' : '16px',
                  'height' : '16px'})
            .button({ icons : { primary : 'ui-icon-pencil'},
                      text : false})
            .click(function()
            {
                var button = $(this);

                var row = button.parents('tr');
                
                var original_background_color = row.css('background-color');            
                
                var record = row.attr('data-record');            

                var status = row.attr('data-status');

                row.css({'background-color':'yellow'});

                if (status == 'WORK' || status == 'INSF' || <?php echo (Auth::user()->isOsaaUser()) ? 1 : 0; ?>)
                {                            
                    window.location = "<?php echo url('/forms/bia'); ?>/" + record + "/edit";
                }
                else
                {
                    $('<div></div>')
                        .appendTo('body')
                        .dialog(
                        {                       
                            draggable : true,
                            resizable : false,
                            modal : true,
                            height : 200,
                            width : 400,                    
                            title : 'Unable to Edit',
                            buttons: [                                
                                {
                                    text : "Ok",
                                    'class' : "float_right",
                                    'data-autofocus' : "true",
                                    icons : { primary : 'ui-icon-check'},
                                    click : function()
                                            {
                                                // Close the dialog box
                                                $(this).dialog("close");                           
                                            }
                                }
                            ],
                            open : function ()
                                {  
                                    var dialog_object = $(this);

                                    dialog_object.html('<br />You cannot edit this record.');
                                    
                                    $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt');
                                    $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');   

                                    $('[data-autofocus="true"]').focus();
                                },
                            close : function ()
                                {
                                    var dialog_object = $(this);

                                    row.css({'background-color':original_background_color});

                                    $(dialog_object).remove();
                                }                
                        });
                    
                }

            });

        $('.bia_delete')
            .css({'width' : '16px',
                  'height' : '16px',
                  'margin-left' : '5px'})
            .button({ icons : { primary : 'ui-icon-trash'},
                      text : false})
            .click(function()
            {
                var button = $(this);

                var row = button.parents('tr');
                
                var original_background_color = row.css('background-color');            
                
                var record = row.attr('data-record');            

                var status = row.attr('data-status');

                row.css({'background-color':'yellow'});

                if (status == 'WORK' || status == 'INSF' || <?php echo (Auth::user()->isOsaaUser()) ? 1 : 0; ?>)
                {                            
                    $('<div></div>')
                        .appendTo('body')
                        .dialog(
                        {                       
                            draggable : true,
                            resizable : false,
                            modal : true,
                            height : 250,
                            width : 400,                    
                            title : 'Confirm Deletion',
                            buttons: [
                                {
                                    text : "Delete",
                                    'class' : "float_left",
                                    icons : { primary : 'ui-icon-check'},
                                    click : function()
                                            {                                                       
                                                var data = { record : record };

                                                $('<div><div>').addClass('ui-widget-overlay ui-front')
                                                     .appendTo('body');
                                      
                                                $('<div><div>').appendTo('body')
                                                               .css('width', '225px')
                                                               .css('height', '170px')
                                                               .css('text-align', 'center')
                                                               .css('padding', '0.5em')
                                                               .position({my : "center center", at : "center center", of : window})
                                                               .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-dialog-buttons')
                                                               .html('<br />Working...<br /><br /><img src="http://www.osaa.org/images/icons/ajax_loader3.gif" /><div style="font-size: 8pt; line-height: 105%; margin-top: 2em;">Please wait, this may take a while to process.</div>');

                                                // Submit the change
                                                var jqxhr = $.ajax(
                                                    {
                                                        type : 'POST',
                                                        url : '<?php echo url('/forms/bia/delete-form'); ?>',
                                                        data : data,
                                                        dataType : 'html'
                                                    })
                                                    .done(function (data)
                                                    {                               
                                                        console.log('Deletion was successful.');
                                                        
                                                        // Reload of refresh is specified                                                
                                                        location.reload();                                                
                                                    })
                                                    .fail(function (jqXHR, status, error)
                                                    {                                                   
                                                        var response = jqXHR.responseText;
                                                        var errorData = $.parseJSON(response);
                                                        console.log(errorData);
                                                        alert ("There was an error deleting the record.\n\nThis page will be reloaded.");
                                                        location.reload();
                                                    });              
                                            }
                                },
                                {
                                    text : "Cancel",
                                    'class' : "float_right",
                                    'data-autofocus' : "true",
                                    icons : { primary : 'ui-icon-cancel'},
                                    click : function()
                                            {
                                                // Close the dialog box
                                                $(this).dialog("close");                           
                                            }
                                }
                            ],
                            open : function ()
                                {  
                                    var dialog_object = $(this);

                                    dialog_object.html('<br />Are you sure you want to delete this form with ID = ' + record + '?<br /><br /><div class="ui-state-error" style="font-size: 10.5pt;"><span class="ui-icon ui-icon-alert box_icon"></span> <b>Warning</b><br />If you delete this form, it will no longer exist.</div>');
                                    
                                    $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt');
                                    $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');   

                                    $('[data-autofocus="true"]').focus();
                                },
                            close : function ()
                                {
                                    var dialog_object = $(this);

                                    row.css({'background-color':original_background_color});

                                    $(dialog_object).remove();
                                }                
                        });
                    
                }
                else
                {
                    $('<div></div>')
                        .appendTo('body')
                        .dialog(
                        {                       
                            draggable : true,
                            resizable : false,
                            modal : true,
                            height : 200,
                            width : 400,                    
                            title : 'Unable to Delete',
                            buttons: [                                
                                {
                                    text : "Ok",
                                    'class' : "float_right",
                                    'data-autofocus' : "true",
                                    icons : { primary : 'ui-icon-check'},
                                    click : function()
                                            {
                                                // Close the dialog box
                                                $(this).dialog("close");                           
                                            }
                                }
                            ],
                            open : function ()
                                {  
                                    var dialog_object = $(this);

                                    dialog_object.html('<br />You cannot delete this record.');
                                    
                                    $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt');
                                    $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');   

                                    $('[data-autofocus="true"]').focus();
                                },
                            close : function ()
                                {
                                    var dialog_object = $(this);

                                    row.css({'background-color':original_background_color});

                                    $(dialog_object).remove();
                                }                
                        });
                    
                }

            });

    <?php endif; ?>

    /* Once a role is selected, check to see if an activity can be selected or not */
    $('#role').change (function updateRole ()
    {
        var role_slug = $(this).find(":selected").val();

        var no_act = ['Prin.', 'Asst. Prin.', 'AD', 'Asst. AD', 'Act. Dir.', 'Asst. Act. Dir.', 'Ath. Sec.', 'Act. Sec.', 'AT', 'Doc.', 'Contact'];

        if ($.inArray(role_slug, no_act) < 0)
        {
            $("#activity").removeAttr('disabled');
        }
        else
        {
            $('#activity').attr('disabled', 'disabled');
        }       
    });

    $('.success_bar').animate({ 'top' : 32, 'background-color' : 'rgba(176, 255, 190, 1.0)'}, 1600, 'easeOutQuad', function ()
    {       
        $(this).delay(6000).fadeOut(4000);  

        $(this).hover(function ()
        {
            $(this).stop(true).css('opacity', '1.0');
        },
        function ()
        {
            $(this).fadeOut(4000);
        })
    });

    $('.password_button').button({
      icons: {
        primary: "ui-icon-locked"
      }});

    $('.new_ejection_button')
        .css({'float' : 'right', 'margin-top' : '1em'})
        .button({ icons : { primary : 'ui-icon-plusthick'}});
      

    $('.team_view_button').button({
      
    });

     $('.team_edit_button').button({
      icons: {
        secondary: "ui-icon-pencil"
      }
    });

    $('.add_team_button').button({
      icons: {
        primary: "ui-icon-plus"
      },
      text:false
    });

    $('.tooltip').tooltip();

    $('.accordion').accordion({heightStyle : 'content'});

    $('.button').button();

    $('.button.utility').button({ icons : { primary : 'ui-icon-wrench' }});

    $('.button.information').button({ icons : { primary : 'ui-icon-info' }});

    $('.button.gear').button({ icons : { primary : 'ui-icon-gear' }});

    $('.button.remove').button({ icons : { primary : 'ui-icon-circle-minus' }});

    $('.button.edit').button({ icons : { primary : 'ui-icon-pencil' }});

    $('.button.landing_submit_scores').button({ icons : { primary : 'ui-icon-circle-arrow-e' }});

    // Table row highlighter
    function colorRows ()
    {       
        $('table').each(function ()
        {
            var i = 0;

            $('tbody tr', $(this)).each(function ()
            {
                if (i % 2 == 1)
                {
                    $(this).addClass('odd');
                }
                else
                {
                    $(this).removeClass('odd');
                }
                i = i + 1;
            });     
        });
    }   
    colorRows();

    $('#confirm_dialog').dialog({
      autoOpen: false,
      resizable: false,
      height:275,
      width: 400,
      modal: true,
      buttons: {
        "Yes": function() {        
         
          var school = $(this).attr('data-school');
          var user = $(this).attr('data-user');
          var _token = $(this).attr('data-token');          
          var information = {
                               '_token' : _token,
                               'school' : school,
                               'user' : user
                            };


          $.post('/account/remove-school', information, function (data) { window.location.reload(); }, 'text');          
          

          /*$(this).dialog("close");*/

          return true;
        },
        "No": function() {
          $(this).dialog( "close" );
          return false;
        }
      }
    });  

    $('.button[data-confirm]').click(function ()
    {
        var button_id = $(this).attr('id');
        var action = $(this).attr('data-confirm');

        var input = $('<input>').attr('type', 'hidden').attr('name', 'special_action').val(button_id);
        $('#editContest').append($(input));

        var school = $(this).attr('data-school');
        var user = $(this).attr('data-user');
        var _token = $("#token input[name='_token']").val();        

        $('#confirm_dialog').html(action).attr('data-school', school).attr('data-user', user).attr('data-token', _token).dialog('open');

        return false;
    });


    $('.form_link').hover(function ()
        {
            if (!$(this).hasClass('unavailable') && !$(this).hasClass('closed'))
            {
                $(this).addClass('hover');
            }
        }, 
        function ()
        {
            $(this).removeClass('hover');
        }).click(function ()
        {
            if (!$(this).hasClass('unavailable') && !$(this).hasClass('closed'))
            {
                var link = $(this).attr('data-link');
                window.location = link;
            }            
        });


    $('.edit_activity_staff')
            .button({ icons : { primary : 'ui-icon-person'}})
            .css({'font-size' : '9pt'})
            .tooltip();


    $('.button.setup_bia_account')
        .click(function ()
        {
            $('<div></div>')
                .appendTo('body')
                .dialog({
                    autoOpen: true,
                    draggable: false,
                    resizable: false,
                    modal: true,
                    height: 460,
                    width: 700,
                    title: 'Setup Your BIA Assessor Account',                    
                    buttons: [
                        {
                            text : "Go",
                            'class' : "float_left",
                            icons : { primary : 'ui-icon-check'},
                            click : function()
                                  {
                                      // Ensure all fields have a value
                                      var ok = '';
                                      $('input[data-required="true"]', '#bia_form').each(function ()
                                      {
                                          var field = $(this);

                                          if (field.val() == '' || (field.has('[data-placeholder]') && field.val() == field.attr('data-placeholder')))
                                          {
                                              if (ok == '')
                                              {
                                                  ok = $(this);
                                              }
                                          }
                                      });                                      

                                      if (ok != '')
                                      {
                                          alert('The form is missing some required information.  Please provide an entry for all of the form fields.');
                                          ok.focus();
                                          return false;
                                      }

                                      // Ensure the phone number is at least 10 digits
                                      var number = $('input[name="phone"]', '#bia_form').val();
                                      number = number.replace(/[^0-9]/g, '');
                                      if (number.length < 10)
                                      {
                                          alert('The phone number you entered is not formatted correctly.  It must be at least 10 digits.  Be sure to include the area code.');
                                          $('input[name="phone"]', '#bia_form').focus();
                                          return false;
                                      }

                                      // Ensure the ZIP code is 5 digits
                                      var zip = $('input[name="zip"]', '#bia_form').val();
                                      zip = zip.replace(/[^0-9]/g, '');
                                      if (zip.match(/[0-9]{5}/) == null)
                                      {
                                          alert('The zip code you entered is not formatted correctly.  It must be exactly 5 digits.');
                                          $('input[name="zip"]', '#bia_form').focus();
                                          return false;
                                      }                                      

                                      $('<div><div>').addClass('ui-widget-overlay ui-front')
                                                     .appendTo('body');
                                      
                                      $('<div><div>').appendTo('body')
                                                     .css('width', '225px')
                                                     .css('height', '170px')
                                                     .css('text-align', 'center')
                                                     .css('padding', '0.5em')
                                                     .position({my : "center center", at : "center center", of : window})
                                                     .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-dialog-buttons')
                                                     .html('<br />Working...<br /><br /><img src="http://www.osaa.org/images/icons/ajax_loader3.gif" /><div style="font-size: 8pt; line-height: 105%; margin-top: 2em;">Please wait, this may take a while to process.</div>');


                                      $('#bia_form').submit();

                                      $(this).dialog("close");
                                      $(this).remove();                                   
                                   }
                        },                        
                        {
                            text : "Cancel",                            
                            'class' : "float_right",                            
                            icons : { primary : 'ui-icon-cancel'},
                            click : function()
                                    {
                                        $(this).dialog( "close");;
                                        $(this).remove();
                                    }
                        }
                     ],
                     open : function ()
                     {                   
                          $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '10pt');
                          $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');

                          
                          $(this).html("<div class='ajax_loader' style='width:16px; height:11px; margin:4em auto; background-image: url(http://www.osaa.org/images/icons/ajax_loader2.gif); background-repeat:no-repeat;'></div>");

                          var info = $(this);

                          var jqxhr = $.ajax(
                                {
                                    type : 'GET',
                                    url : '/account/setup-bia-account',
                                    dataType : 'html'
                                })
                                .done(function (data)
                                {
                                    $(info).html(data);
                                    
                                    // Placeholder functionality
                                    $('[data-placeholder]', info).focus(function()
                                    {
                                        var input = $(this);
                                        if (input.val() == input.attr('data-placeholder'))
                                        {
                                            input.val('');
                                            input.removeClass('placeholder');
                                        }
                                    }).blur(function()
                                    {
                                        var input = $(this);
                                        if (input.val() == '' || input.val() == input.attr('data-placeholder'))
                                        {
                                            input.addClass('placeholder');
                                            input.val(input.attr('data-placeholder'));
                                        }
                                    }).blur();
                                    $('[data-placeholder]', info).parents('form').submit(function()
                                    {
                                        $(this).find('[data-placeholder]', info).each(function()
                                        {
                                            var input = $(this);
                                            if (input.val() == input.attr('data-placeholder'))
                                            {
                                                input.val('');
                                            }
                                        })
                                    });

                                    $('[autofocus]', info).focus();
                                })
                                .fail(function ()
                                {
                                    $(info).html('There was an error.');
                                });                          
                      }
                }); 
                 
        });

    $('.button.manage_assoc')
        .click(function ()
        {
            $('<div></div>')
                .appendTo('body')
                .dialog({
                    autoOpen: true,
                    draggable: false,
                    resizable: false,
                    height: 360,
                    width: 550,
                    title: 'Manage an Associate Member School',
                    modal: true,
                    buttons: [
                        {
                            text : "Add",
                            'class' : "float_left",
                            icons : { primary : 'ui-icon-plus'},
                            click : function()
                                  {
                                      $('<div><div>').addClass('ui-widget-overlay ui-front')
                                                     .appendTo('body');
                                      
                                      $('<div><div>').appendTo('body')
                                                     .css('width', '225px')
                                                     .css('height', '170px')
                                                     .css('text-align', 'center')
                                                     .css('padding', '0.5em')
                                                     .position({my : "center center", at : "center center", of : window})
                                                     .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-dialog-buttons')
                                                     .html('<br />Working...<br /><br /><img src="http://www.osaa.org/images/icons/ajax_loader3.gif" /><div style="font-size: 8pt; line-height: 105%; margin-top: 2em;">Please wait, this may take a while to process.</div>');

                                      $(this).parent().find('form').submit();

                                      $(this).dialog("close");
                                      $(this).remove();                                   
                                   }
                        },                        
                        {
                            text : "Cancel",                            
                            'class' : "float_right",                            
                            icons : { primary : 'ui-icon-cancel'},
                            click : function()
                                    {
                                        $(this).dialog( "close");;
                                        $(this).remove();
                                    }
                        }
                     ],
                     open : function ()
                     {                   
                          $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '10pt');
                          $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%');

                          
                          $(this).html("<div class='ajax_loader' style='width:16px; height:11px; margin:4em auto; background-image: url(http://www.osaa.org/images/icons/ajax_loader2.gif); background-repeat:no-repeat;'></div>");

                          var info = $(this);

                          var jqxhr = $.ajax(
                                {
                                    type : 'GET',
                                    url : '/account/add-associate-member-school',
                                    dataType : 'html'
                                })
                                .done(function (data)
                                {
                                    $(info).html(data);
                                    $('.button').button();
                                })
                                .fail(function ()
                                {
                                    $(info).html('There was an error.');
                                });

                          $(this).parent().find('[autofocus]').focus();
                      }
                }); 
                 
        });

    $('.button.update_assoc_adm')
        .click(function ()
        {
            var id = $(this).attr('data-school');

            var v = $('input[data-school="' + id + '"]').val();

            if ($.isNumeric(v) && parseInt(v) > 0)
            {
                v = parseInt(v);                

                var jqxhr = $.ajax(
                                {
                                    type : 'POST',
                                    url : '/account/update-associate-enrollment',
                                    data : { 'school' : id,
                                             'enrollment' : v},
                                    dataType : 'html',
                                    error : function () { alert('There was an error saving your enrollment number.'); },
                                    success : function () { location.reload(); }
                                });
                                
            }
        });
    

<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_functions'); ?>
   
<?php $__env->stopSection(); ?>


<?php $__env->startSection('main_content'); ?>    		
	
   <?php if (Session::has('success')): ?>

        <div class="success_bar">
            <div class="message">               
                <?php echo Session::get('success'); ?>
            </div>          
        </div>

    <?php endif; ?>	 

	<h2>Hello, <?php echo Auth::user()->getDisplayFullName(); ?></h2>      

    <div class="tabs my_schools">
        <ul style="padding-left:5px;">
            
            <?php if (Auth::user()->isOsaaUser()): ?>
                <li><a href="#tabs-osaa">OSAA Staff</a>
            <?php endif; ?>

            <?php if (Auth::user()->isBiaUser()): ?>
                <li><a href="#tabs-bia">BIA Assessor</a>
            <?php endif; ?>

            <?php if (Auth::user()->isCommissioner()): ?>
                <li><a href="#tabs-cmsh">Commissioner of Officials</a>
            <?php endif; ?>

            <?php for ($i = 0; $i < count ($schools); $i++): ?>
                <li>
                    <a href="#tabs-<?php echo $i; ?>"><?php echo $schools[$i]->name; ?></a>
                </li>
            <?php endfor; ?>

            <li title="Add a School or New Role">
                <a href="#tabs-new" style="background-image:url('http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/24/Actions-list-add-icon.png'); background-repeat:no-repeat; background-position:center;">&nbsp;</a>
            </li>

        </ul>

        <?php if (Auth::user()->isOsaaUser()): ?>
            <div id="tabs-osaa">

                <div class="staff_utility_button">
                    <img src="<?php echo asset('images/icons/mass_email_48px.png'); ?>" alt="" title="" />
                    Mass E-Mail List
                </div>


                <h2>OSAA Staff Dashboard</h2>

                <a href="<?php echo url('/admin'); ?>" class="button gear" style="margin-right: 10px;">Goto Dashboard</a>

                <br /><br />

                <a href="<?php echo url('/forms/eligibility'); ?>" class="button" style="margin-right: 10px;">Eligibilities</a>

                <a href="<?php echo url('/forms/bia/admin'); ?>" class="button" style="margin-right: 10px;">BIA Reports</a>

                <a href="<?php echo url('/forms/ejection'); ?>" class="button" style="margin-right: 10px;">Ejection Reports</a>

                <a href="<?php echo url('/forms/seasonal'); ?>" class="button" style="margin-right: 10px;">Seasonal Reports</a>

                <a href="<?php echo url('/reports/reimburse'); ?>" class="button" style="margin-right: 10px;">Reimbursements</a>

                <a href="<?php echo url('/admin/ads'); ?>" class="button" style="margin-right: 10px;">Manage Web Ads</a>

                <br /><br />

                


                <h2>Server Utilities</h2>
                <a href="https://67.22.138.196:2083" target="_blank" class="button utility" style="margin-right: 10px;">Server Administration</a>        

                <a href="https://67.22.138.196:2083/cpsess7494224763/3rdparty/phpMyAdmin/index.php" target="_blank" class="button utility" style="margin-right: 10px;">Database Administration</a> 

                <a href="<?php echo URL::action('AdminController@getPHPInfo'); ?>" target="_blank" class="button information" style="margin-right: 10px;">Export PHP Information</a> 
            


            </div>
        <?php endif; ?>

        <?php if (Auth::user()->isBiaUser()): ?>
            <div id="tabs-bia">
                
                <a id="new_bia_form_button" href="<?php echo url('/forms/bia/create'); ?>">New BIA Reconciliation</a>
                
                <h2>Wrestling BIA Assessor Dashboard</h2>

                <?php
                    $forms = biaform::where('assessor', '=', Auth::user()->getBiaAssessorId())
                                    ->where('school_year', '=', Session::get('year'))
                                    ->whereNull('deleted_at')
                                    ->get();
                ?>

                <h3 style="color: #990000;">BIA Assessment Reconciliation Reports</h3>
                <?php if (count($forms) > 0): ?>

                    <table class="bia_table">

                        <thead>
                            <tr>
                                <th>ID #</th>
                                <th>Status</th>
                                <th>Total - $</th>
                                <th>Created At</th>
                                <th>Received At</th>
                                <th>Paid At</th>
                                <th></th>
                            </tr>
                        </thead>

                        <tbody>

                            <?php foreach ($forms as $form): ?>

                                <tr data-record="<?php echo $form->id; ?>" data-status="<?php echo $form->status; ?>">
                                    <td><?php echo $form->id; ?></td>
                                    <td><?php echo $form->status; ?></td>
                                    <td>$<?php echo number_format($form->total_amount, 2); ?></td>
                                    <td><?php echo $form->created_at; ?></td>
                                    <td><?php echo $form->received_at; ?></td>
                                    <td><?php echo $form->paid_at; ?></td>
                                    <td style="text-align: right; padding-right: 5px;">
                                        <?php if (Helpers::strEqual($form->status, array('PEND', 'INSF', 'RECD', 'DONE'))): ?>
                                            <div class="bia_print"></div>
                                        <?php endif; ?>                                        
                                        <div class="bia_edit"></div>
                                        <div class="bia_delete"></div>
                                    </td>
                                </tr>

                            <?php endforeach; ?>

                        </tbody>

                    </table>                                       

                <?php else: ?>
                    You have no BIA Assessment Reconciliation Report forms on record to display.
                <?php endif; ?>

                <div style="font-size: 9pt; margin-top: 1em;">
                    <div class="columns">
                        <div class="half">
                            <span class="ui-icon ui-icon-info float_left" style="vertical-align: middle;"></span><b>Status Legend</b><br />
                            WORK - Work in progress, form is not yet submitted<br />
                            PEND - Pending, form was submitted, waiting for supplemental material(s)<br />
                            INSF - Form has been submitted, but there is missing information<br />
                            RECD - Form has been received<br />                            
                            DONE - Form has been processed and payment posted<br />
                        </div>

                        <div class="half">
                            <span class="ui-icon ui-icon-help float_left" style="vertical-align: middle;"></span><b>Help</b><br />
                            To create a new BIA Assessment Reconciliation Report form, click the "+ New BIA Reconciliation" button located in the upper-right.<br /><br />
                            Click the button with the printer icon to print the report form.  Click the button with the pencil icon to edit a report form.  Click the button with the trash icon to delete a report form.
                        </div>
                    </div>
                </div>

            </div>
        <?php endif; ?>

        <?php if (Auth::user()->isCommissioner()): ?>

            <div id="tabs-cmsh">
                <a href="<?php echo url('/account/reset-password?change-password=true'); ?>" class="password_button" style="float: right; margin-top: 1em;">Change Password</a>
                <a href="<?php echo url('/forms/ejection'); ?>" class="new_ejection_button" style="float: right; margin-right: 50px;">New Ejection Report</a>

                <h2>OSAA Commissioner Dashboard</h2>                
                
                <?php
                    $oas = officialsassociation::whereIn('id', function($query)
                                                 {
                                                     $query->select('officials_association')
                                                           ->from('officials_associations_users')
                                                           ->where('user', '=', Auth::user()->id)
                                                           ->where('role', '=', 'Cmsh.')
                                                           ->where('is_retired', '=', 0);
                                                 })
                                               ->get();

                    $forms = ejection::whereIn('officials_association', $oas->lists('id'))
                                     ->whereNotIn('ejection_status', array('WTDN'))
                                     ->get();
                ?>

                <h3 style="color: #990000;">Officials Association</h3>
                <?php if (count($oas) == 1): ?>
                    Your account is currently linked to the following Officials Association as the Commissioner:<br />
                    <ul>
                        <li><?php echo $oas->first()->name; ?></li>
                    </ul>
                <?php elseif (count($oas) > 1): ?>
                    Your account is currently linked to the following Officials Associations as the Commissioner:<br />
                    <ul>
                        <?php foreach ($oas as $oa): ?>
                            <li><?php echo $oa->name; ?></li>
                        <?php endforeach; ?>
                    </ul>
                <?php else: ?>
                    Your account is not associated to any Officials Association as a Commissioner.<br />
                <?php endif; ?>

                <br />

                <h3 style="color: #990000;">Associated Ejection Reports</h3>

                <?php if (count($forms) > 0): ?>

                    <div style="max-height: 400px; overflow-x: hidden; overflow-y: auto;">
                    <table class="bia_table">

                        <thead>
                            <tr>
                                <th>ID #</th>
                                <th>Act.</th>
                                <th>Status</th>                                
                                <th>School</th>
                                <th>Contest Date</th>
                                <th>Updated At</th>                                
                            </tr>
                        </thead>

                        <tbody>

                            <?php foreach ($forms as $form): ?>

                                <?php
                                    $object = $form->getObject();
                                ?>

                                <tr>
                                    <td><a href="<?php echo url('/forms/ejection/' . $form->id); ?>" style="font-weight: bold;"><?php echo $form->id; ?></a></td>
                                    <td><?php echo !is_null($form->activity) ? $form->activity : '- '; ?></td>
                                    <td><?php echo $form->ejection_status; ?></td>                                    
                                    <td><?php echo (!is_null($object->host_school)) ? $object->host_school->short_name : '- -'; ?></td>
                                    <td><?php echo (!is_null($object->data->contest->date)) ? date('l n/j/y', strtotime($object->data->contest->date)) : '- -'; ?></td>                                    
                                    <td><?php echo date('l n/j/y g:ia', strtotime($form->updated_at)); ?></td>                                    
                                </tr>

                            <?php endforeach; ?>

                        </tbody>

                    </table>
                    </div>                                       

                <?php else: ?>
                    You have no ejection reports in the database.
                <?php endif; ?>

                <div style="font-size: 9pt; margin-top: 1em;">
                    <div class="columns">
                        <div class="half">
                            <span class="ui-icon ui-icon-info float_left" style="vertical-align: middle;"></span><b>Status Legend</b><br />
                            WORK - An official has created an ejection report and is still working on it<br />
                            CMSH - Report is waiting for your review; the school has not been notified<br />
                            SUBT - Report has been submitted to the school, the OSAA has been notified                            
                        </div>

                        <div class="half">
                            <span class="ui-icon ui-icon-help float_left" style="vertical-align: middle;"></span><b>Help</b><br />
                            To create a new online ejection report, click the <b>+ New Ejection Report</b> button located in the upper-right.<br /><br />
                            Click the ID number of a listed ejection report to view that online form and make any changes.
                        </div>
                    </div>
                </div>

                <br class="clear" />

            </div>

        <?php endif; ?>

        <?php for ($i = 0; $i < count ($schools); $i++): ?>
            <div id="tabs-<?php echo $i; ?>">
                
                <?php if (Auth::user()->canAccessSchoolTask($schools[$i]->id, 'ADMIN')): ?>
                    <div style="float:right;">
                        <img src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/24/Status-dialog-password-icon.png" alt="Key" title="Click to view your school's key codes" class="show_key_code" data-school="<?php echo $schools[$i]->id; ?>"/>                        
                    </div>
                <?php endif; ?>

                <p>
                    <b>Your role(s) with this school:</b> <?php echo $roles[$schools[$i]->id]; ?>            
                </p>

                <?php /*  <a href="#"><img src="<?php echo asset ('images/fix_nav/arr_blue_2.gif'); ?>" alt="" title="" class="action_icon" />Manage Activity Programs</a>  */ ?>

                <?php if (Auth::user()->canAccessSchoolTask($schools[$i]->id, 'ADMIN')): ?>

                    <a href="#" style="float:right; font-size:11pt;"><img src="<?php echo asset ('images/fix_nav/arr_blue_2.gif'); ?>" alt="" title="" class="action_icon" />Edit School Information</a>        

                <?php endif; ?>
                
                <div class="accordion">

                <?php if (Helpers::strEqual($schools[$i]->getMemberType(), 'Full Member')): ?>

                    <h2 style="margin:0;">Activity Programs</h2>                
                    <div>

                        <?php if (Auth::user()->canAccessSchoolTask($schools[$i]->id, 'SCORE')): ?>
                            <a href="<?php echo url('/account/missing-scores'); ?>" class="button tooltip landing_submit_scores" title="Submit scores for any contests your teams competed in." style="font-size:9pt;">Submit Missing Scores</a>
                        <?php endif; ?>

                        <h2 style="color: #990000;">
                            <?php echo $schools[$i]->short_name; ?> Activity Programs for <?php echo Session::get('year'); ?>-<?php echo (intval(substr(Session::get('year'), 2, 2)) + 1); ?>
                        </h2>

                        <h3>Fall</h3>
                        <table>
                            <tr class="small gray note">
                                <td style="width:175px;">Activity</td><td style="width:110px;">League</td><td>Teams</td>
                            </tr>
                            <?php
                                $school = $schools[$i];

                                $aps = activityprogram::where('school_year', '=', Session::get('year'))
                                                      ->where('host_school', '=', $school->id)
                                                      ->where('season', '=', 'F')
                                                      ->orderBy(DB::raw('FIELD (activity, \'FBL\', \'VBL\', \'BSC\', \'GSC\', \'BXC\', \'GXC\', \'BBX\', \'GBX\', \'BSW\', \'GSW\', \'WRE\', \'DNC\', \'CHE\', \'BBL\', \'SBL\', \'BTF\', \'GTF\', \'BTN\', \'GTN\', \'BGF\', \'GGF\', \'ORC\', \'BND\', \'CHO\', \'SOL\', \'SPE\')', 'desc'))
                                                      ->get();

                                foreach ($aps as $ap)
                                {
                                    echo "<tr style=\"height:2em;\">";

                                    echo "<td style=\"width:200px;\">" .  Helpers::getActivityName($ap->activity) . "</td>";
                                    echo "<td style=\"width:150px;\">" . $ap->league . "</td>";
                                    echo "<td>";
                                    
                                    $teams = team::where('activity_program', '=', $ap->id)->orderBy(DB::raw('FIELD (level, \'V\', \'JV\', \'JV2\', \'FR\', \'FR2\')', 'desc'))->get();

                                    if (count($teams) > 0)
                                    {
                                        foreach ($teams as $team)
                                        {
                                            
                                            if (Auth::user()->canAccessTeamTask($ap->id, 'SCHD', true) or Auth::user()->canAccessTeamTask($ap->id, 'ROST', true))
                                            {
                                                echo '<a href="' . url('/teams/' . $team->id . '/edit') . '" style="margin-right:4px; width:45px; height:16px; font-size:7pt;" class="team_edit_button tooltip" title="Edit the ' .  strtolower(Helpers::getLevelName ($team->level)) . ' ' . strtolower(Helpers::getActivityName ($ap->activity)) . ' team">';
                                            
                                                echo $team->level;                                                
                                            
                                                echo '</a>';
                                            }
                                            else
                                            {
                                                echo '<a href="' . url('/teams/' . $team->id) . '" style="margin-right:4px; width:45px; height:16px; font-size:7pt;" class="team_view_button tooltip" title="View the ' .  strtolower(Helpers::getLevelName ($team->level)) . ' ' . strtolower(Helpers::getActivityName ($ap->activity)) . ' team">';
                                            
                                                echo $team->level;
                                            
                                                echo '</a>'; 
                                            }
                                        }                                                    
                                    }                  
                                    
                                    if (Auth::user()->canAccessTeamTask($ap->id, 'ADMIN', true) and $ap->countTeams() < 5 and $ap->getActivityType() == 'TS')
                                    {
                                        echo '<a href="' . url('teams/add/' . $ap->id) . '" style="margin-right:0px; height:16px; " class="add_team_button tooltip" title="Add another ' . strtolower(Helpers::getActivityName ($ap->activity)) . ' team to this activity program"></a>';
                                    }
                                    

                                    echo "</td>";

                                    echo "</tr>";
                                } 

                            ?>
                        </table>

                        <h3>Winter</h3>
                        <table>
                            <tr class="small gray note">
                                <td style="width:175px;">Activity</td><td style="width:90px;">League</td><td>Teams</td>
                            </tr>
                            <?php
                                $school = $schools[$i];

                                $aps = activityprogram::where('school_year', '=', Session::get('year'))
                                                      ->where('host_school', '=', $school->id)
                                                      ->where('season', '=', 'W')
                                                      ->orderBy(DB::raw('FIELD (activity, \'FBL\', \'VBL\', \'BSC\', \'GSC\', \'BXC\', \'GXC\', \'BBX\', \'GBX\', \'BSW\', \'GSW\', \'WRE\', \'DNC\', \'CHE\', \'BBL\', \'SBL\', \'BTF\', \'GTF\', \'BTN\', \'GTN\', \'BGF\', \'GGF\', \'ORC\', \'BND\', \'CHO\', \'SOL\', \'SPE\')', 'desc'))
                                                      ->get();

                                foreach ($aps as $ap)
                                {
                                    echo "<tr style=\"height:2em;\">";

                                    echo "<td style=\"width:200px;\">" .  Helpers::getActivityName($ap->activity) . "</td>";
                                    echo "<td style=\"width:150px;\">" . $ap->league . "</td>";
                                    echo "<td>";
                                    $teams = team::where('activity_program', '=', $ap->id)->orderBy(DB::raw('FIELD (level, \'V\', \'JV\', \'JV2\', \'FR\', \'FR2\')', 'desc'))->get();

                                    if (count($teams) > 0)
                                    {
                                        foreach ($teams as $team)
                                        {
                                            
                                            if (Auth::user()->canAccessTeamTask($ap->id, 'SCHD', true) or Auth::user()->canAccessTeamTask($ap->id, 'ROST', true))
                                            {
                                                echo '<a href="' . url('/teams/' . $team->id . '/edit') . '" style="margin-right:4px; width:45px; height:16px; font-size:7pt;" class="team_edit_button tooltip" title="Edit the ' .  strtolower(Helpers::getLevelName ($team->level)) . ' ' . strtolower(Helpers::getActivityName ($ap->activity)) . ' team">';
                                            
                                                echo $team->level;
                                            
                                                echo '</a>';
                                            }
                                            else
                                            {
                                                echo '<a href="' . url('/teams/' . $team->id) . '" style="margin-right:4px; width:45px; height:16px; font-size:7pt;" class="team_view_button tooltip" title="View the ' .  strtolower(Helpers::getLevelName ($team->level)) . ' ' . strtolower(Helpers::getActivityName ($ap->activity)) . ' team">';
                                            
                                                echo $team->level;
                                            
                                                echo '</a>'; 
                                            }
                                        }                                                    
                                    }                  
                                    
                                    if (Auth::user()->canAccessTeamTask($ap->id, 'ADMIN', true) and $ap->countTeams() < 5 and $ap->getActivityType() == 'TS')
                                    {
                                        echo '<a href="' . url('teams/add/' . $ap->id) . '" style="margin-right:0px; height:16px; " class="add_team_button tooltip" title="Add another ' . strtolower(Helpers::getActivityName ($ap->activity)) . ' team to this activity program"></a>';
                                    }                                   

                                    echo "</td>";

                                    echo "</tr>";
                                }

                            ?>
                        </table>
                  
                        <h3>Spring</h3>
                        <table>
                            <tr class="small gray note">
                                <td style="width:175px;">Activity</td><td style="width:90px;">League</td><td>Teams</td>
                            </tr>
                            <?php
                                $school = $schools[$i];

                                $aps = activityprogram::where('school_year', '=', Session::get('year'))
                                                      ->where('host_school', '=', $school->id)
                                                      ->where('season', '=', 'S')
                                                      ->orderBy(DB::raw('FIELD (activity, \'FBL\', \'VBL\', \'BSC\', \'GSC\', \'BXC\', \'GXC\', \'BBX\', \'GBX\', \'BSW\', \'GSW\', \'WRE\', \'DNC\', \'CHE\', \'BBL\', \'SBL\', \'BTF\', \'GTF\', \'BTN\', \'GTN\', \'BGF\', \'GGF\', \'ORC\', \'BND\', \'CHO\', \'SOL\', \'SPE\')', 'desc'))
                                                      ->get();

                                foreach ($aps as $ap)
                                {
                                    echo "<tr style=\"height:2em;\">";

                                    echo "<td style=\"width:200px;\">" .  Helpers::getActivityName($ap->activity) . "</td>";
                                    echo "<td style=\"width:150px;\">" . $ap->league . "</td>";
                                    echo "<td>";
                                    $teams = team::where('activity_program', '=', $ap->id)->orderBy(DB::raw('FIELD (level, \'V\', \'JV\', \'JV2\', \'FR\', \'FR2\')', 'desc'))->get();

                                    if (count($teams) > 0)
                                    {
                                        foreach ($teams as $team)
                                        {
                                            
                                            if (Auth::user()->canAccessTeamTask($ap->id, 'SCHD', true) or Auth::user()->canAccessTeamTask($ap->id, 'ROST', true))
                                            {
                                                echo '<a href="' . url('/teams/' . $team->id . '/edit') . '" style="margin-right:4px; width:45px; height:16px; font-size:7pt;" class="team_edit_button tooltip" title="Edit the ' .  strtolower(Helpers::getLevelName ($team->level)) . ' ' . strtolower(Helpers::getActivityName ($ap->activity)) . ' team">';
                                            
                                                echo $team->level;
                                            
                                                echo '</a>';
                                            }
                                            else
                                            {
                                                echo '<a href="' . url('/teams/' . $team->id) . '" style="margin-right:4px; width:45px; height:16px; font-size:7pt;" class="team_view_button tooltip" title="View the ' .  strtolower(Helpers::getLevelName ($team->level)) . ' ' . strtolower(Helpers::getActivityName ($ap->activity)) . ' team">';
                                            
                                                echo $team->level;
                                            
                                                echo '</a>'; 
                                            }
                                        }                                                    
                                        
                                    }                  
                                    


                                    if (Auth::user()->canAccessTeamTask($ap->id, 'ADMIN', true) and $ap->countTeams() < 5 and $ap->getActivityType() == 'TS')
                                    {
                                        echo '<a href="' . url('teams/add/' . $ap->id) . '" style="margin-right:0px; height:16px; " class="add_team_button tooltip" title="Add another ' . strtolower(Helpers::getActivityName ($ap->activity)) . ' team to this activity program"></a>';
                                    }

                                    /*if ((Auth::user()->canAccessTeamTask($ap->id, 'SCHD', true) or Auth::user()->canAccessTeamTask($ap->id, 'ROST', true)) and Helpers::strEqual($ap->activity, array('BND', 'CHO', 'ORC')))
                                    {
                                        echo '<a href="' . url('/forms/music/registration') . '" style="font-size: 9pt;">Apply for State</a>';
                                    }*/


                                    echo "</td>";

                                    echo "</tr>";
                                }

                            ?>
                        </table>

                        <br class="clear" />

                  
                    </div>
                <?php endif; ?>


                <h2 style="margin:0;">School Information</h2>
                <div>

                    <?php /*  School Logo  */ ?>
                    <div style="float:left; width:128px; height:128px; margin-right:20px; text-align:center;">
                        <?php
                            $image_url = ImagesController::getImageURL($schools[$i]->short_name, 'logo', '128x128');
                        ?>
                        <?php if (!is_null($image_url)): ?>
                            <img src="<?php echo $image_url; ?>" alt="" title="<?php echo $schools[$i]->name; ?> Logo" class="tooltip" style="width:128px; height:128px;" />
                        <?php else: ?>       
                            <img src="<?php echo asset('images/no_logo.png'); ?>" alt="" title="No School Logo Available" class="tooltip" style="width:128px; height:128px;" />
                        <?php endif; ?>
                    </div>
                    
                    

                    <div class="columns" style="width:750px; float:left;">
                        <div class="half">

                            <?php /*  School Names  */ ?>                
                            <b><?php echo $schools[$i]->name; ?></b><br />
                            <?php if (Helpers::strEqual($schools[$i]->getMemberType(), 'Full Member')): ?>
                                <span class="small gray note">Also known as "<?php echo $schools[$i]->short_name; ?>" for short</span>
                           
                                <br /><br />                              
                            
                                <?php /*  Mascot  */ ?>
                                <b><?php echo $schools[$i]->getMascot()->name; ?></b>

                                <br /><br />


                                <?php /*  Regular District  */ ?>
                                <b>Regular District</b><br />
                                <?php
                                    $league = $schools[$i]->getRegularDistrict(Session::get('year'));
                                ?>
                                <?php echo $league->slug; ?> <?php echo $league->name; ?>

                            <?php elseif (Helpers::strEqual($schools[$i]->getMemberType(), 'Associate')): ?>
                                
                                <?php
                                    $assoc_adm_box_class = 'online_form_instructions';                                    

                                    $sd = schooldemographic::where('school', '=', $schools[$i]->id)
                                                           ->where('school_year', '=', Session::get('year'))
                                                           ->where('is_associate_member', '=', 1)
                                                           ->firstOrFail();

                                    $assoc_adm = $sd->enrollment;

                                    if (is_null($assoc_adm))
                                    {
                                        $assoc_adm_box_class .= ' ui-state-highlight';
                                    }
                                ?>

                                <div class="ui-corner-all <?php echo $assoc_adm_box_class; ?>" style="margin-top: 1em;">

                                    <div class="button update_assoc_adm" data-school="<?php echo $schools[$i]->id; ?>" style="font-size: 9pt; float: right; margin-top: 0.6em;">Update</div>

                                    <b>Associate Member</b><br />
                                    <small>Student Enrollment:</small>
                                    <input type="text" id="associate_adm" name="associate_adm" data-school="<?php echo $schools[$i]->id; ?>" style="width: 45px; font-size: 10pt;" value="<?php echo $assoc_adm; ?>" />
                                    
                                    <div style="font-size: 8pt; margin-top: 0.5em;">
                                        Please enter in the number of students enrolled during the <?php echo Session::get('year'); ?>-<?php echo (intval(Session::get('year')) + 1); ?> school year.
                                    </div>

                                </div>

                            <?php endif; ?>

                        </div>

                        <div class="half">                                           
                            <?php /*  School Colors  */ ?>
                            <div style="float:right; width:82px; height:26px;">

                                <?php
                                    if ($schools[$i]->hasColors())
                                    {
                                        if ($schools[$i]->hasColors(1))
                                        {
                                            $color_1 = color::where('slug', '=', $schools[$i]->color_1)->first();
                                            echo "<div style=\"float:left; width:24px; height:24px; background-color:#" . $color_1->hex . "; border:1px solid #d9e1e0;\" title=\"" . $color_1->name . "\"></div>";
                                        }
                                        if ($schools[$i]->hasColors(2))
                                        {
                                            $color_2 = color::where('slug', '=', $schools[$i]->color_2)->first();
                                            echo "<div style=\"float:left; width:24px; height:24px; background-color:#" . $color_2->hex . "; border:1px solid #d9e1e0;\" title=\"" . $color_2->name . "\"></div>";
                                        }
                                        if ($schools[$i]->hasColors(3))
                                        {
                                            $color_3 = color::where('slug', '=', $schools[$i]->color_3)->first();
                                            echo "<div style=\"float:left; width:24px; height:24px; background-color:#" . $color_3->hex . "; border:1px solid #d9e1e0;\" title=\"" . $color_3->name . "\"></div>";
                                        }
                                    }                    
                                    else
                                    {
                                        echo "<span class=\"small gray note\">No colors</span>";
                                    }
                                ?>                      
                            </div>

                            <?php /*  Classification  */ ?>
                            <b><?php echo $schools[$i]->getClassification (Session::get('year')); ?></b>

                            <br /><br />

                            <?php /*  School District  */ ?>
                            <b>School District</b><br />
                            <?php echo (!Helpers::strIsEmpty($schools[$i]->getSchoolDistrict())) ? $schools[$i]->getSchoolDistrict()->name : '- -'; ?>
                            
                            <?php if (Auth::user()->canAccessSchoolTask($schools[$i]->id, 'ADMIN')): ?>
                                <br /><br />

                                <a href="<?php echo url('/schools/' . $schools[$i]->id . '/edit'); ?>" class="button edit" style="font-size:9pt;">Edit School Information</a>

                                <a href="<?php echo url('/schools/' . $schools[$i]->id); ?>" class="edit_activity_staff" style="float: right;" title="Edit Coaches &amp; Team Staff">Manage Staff</a>
                            <?php endif; ?>

                        </div>

                        
                    </div>                              

                </div>

                <?php if (Helpers::strEqual($schools[$i]->getMemberType(), 'Full Member')): ?>
                    <h2 style="margin:0;">Online Forms</h2>                
                    <div>                   

                        <div class="columns">

                            <?php
                                $aps = $schools[$i]->getHostedActivityPrograms(Session::get('year'), false);
                            ?>


                            <div class="third">
                                <h2>Fall</h2>

                                <h3 style="color:#990000;">Required Forms</h3>
                                
                                <?php /*  New Seasonal School Form  */ ?>
                                <?php
                                    $form = seasonalschoolform::where('school_year', '=', Session::get('year'))
                                                              ->where('season', '=', 'F')
                                                              ->where('form', '=', 'SEASONAL')
                                                              ->first();

                                    if (!is_null($form))
                                    {
                                        $entry = schoolform::where('school', '=', $schools[$i]->id)
                                                           ->where('seasonal_school_form', '=', $form->id)
                                                           ->first();

                                        $submitted = false;

                                        if (!is_null($entry))
                                        {
                                            $entry_data = json_decode($entry->data);

                                            $submitted = $entry_data->is_submitted;
                                        }

                                        // Get the form dates
                                        $open_at = $form->open_at;
                                        $due_at = $form->due_at;                                                
                                        $close_at = $form->close_at;     
                                        $img = null;

                                        // Get this form status                                               
                                        if (strtotime($open_at) > time())
                                        {
                                            $status = 'unavailable';
                                            $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                        }
                                        elseif (strtotime($due_at) > time())
                                        {
                                            $status = 'available';
                                            $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                            if ($submitted)
                                            {
                                                $status = 'done';
                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                $img = 'form_data_16px.png';
                                            }
                                        }                         
                                        elseif (strtotime($close_at) > time())
                                        {
                                            $status = 'past_due';
                                            $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                            if ($submitted)
                                            {
                                                $status = 'done';
                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                $img = 'form_data_16px.png';
                                            }
                                        }                      
                                        else
                                        {
                                            $status = 'closed';
                                            $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                            $img = 'no_form_data_16px.png';

                                            if ($submitted)
                                            {
                                                $status = 'closed';
                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                $img = 'form_data_16px.png';
                                            }                                            

                                        }                                               
                                        

                                        $link = url('/forms/seasonal/fall/' . $schools[$i]->id);
                                        $name = 'Seasonal Participation and Preselection';                                        
                                ?>

                                    <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                        <?php if (!is_null($img)): ?>
                                            <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                        <?php endif; ?>
                                        <div class="name"><?php echo $name; ?></div>
                                        <div class="date"><?php echo $date_info; ?></div>
                                    </div>

                                <?php

                                    }

                                ?>


                                <?php /*  Participation Form  */ ?>
                                <?php
                                    $main_form = onlineform::where('slug', '=', 'PARTICIPATION')
                                                           ->first();

                                    if (!is_null($main_form))
                                    {

                                        $form = seasonalschoolform::where('school_year', '=', Session::get('year'))
                                                                  ->where('season', '=', 'F')
                                                                  ->where('form', '=', 'PARTICIPATION')                                 
                                                                  ->first();

                                        if (!is_null($form))
                                        {   

                                            $entry = schoolform::where('school', '=', $schools[$i]->id)
                                                               ->where('seasonal_school_form', '=', $form->id)
                                                               ->first();

                                            // Get the form dates
                                            $open_at = $form->open_at;
                                            $due_at = $form->due_at;                                                
                                            $close_at = $form->close_at;     
                                            $img = null;                                               

                                            // Get this form status                                               
                                            if (strtotime($open_at) > time())
                                            {
                                                $status = 'unavailable';
                                                $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                            }
                                            elseif (strtotime($due_at) > time())
                                            {
                                                $status = 'available';
                                                $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                         
                                            elseif (strtotime($close_at) > time())
                                            {
                                                $status = 'past_due';
                                                $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                      
                                            else
                                            {
                                                $status = 'closed';
                                                $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                                $img = 'no_form_data_16px.png';

                                                if (!is_null($entry))
                                                {
                                                    $status = 'closed';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }                                                       

                                            }                                               
                                            

                                            $link = url('/forms/' . strtolower($main_form->slug) . '/' . $schools[$i]->id);
                                            $name = 'Fall ' . $main_form->name;
                                        
                                ?>

                                        <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                            <?php if (!is_null($img)): ?>
                                                <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                            <?php endif; ?>
                                            <div class="name"><?php echo $name; ?></div>
                                            <div class="date"><?php echo $date_info; ?></div>
                                        </div>

                                <?php
                                        }
                                    }
                                ?>  

                                <?php /*  Preselection Form  */ ?>
                                <?php
                                    $main_form = onlineform::where('slug', '=', 'PRESELECTION')
                                                           ->first();

                                    if (!is_null($main_form))
                                    {

                                        $form = seasonalschoolform::where('school_year', '=', Session::get('year'))
                                                                  ->where('season', '=', 'F')
                                                                  ->where('form', '=', 'PRESELECTION')                                 
                                                                  ->first();

                                        if (!is_null($form))
                                        {   

                                            $entry = schoolform::where('school', '=', $schools[$i]->id)
                                                               ->where('seasonal_school_form', '=', $form->id)
                                                               ->first();

                                            // Get the form dates
                                            $open_at = $form->open_at;
                                            $due_at = $form->due_at;                                                
                                            $close_at = $form->close_at;     
                                            $img = null;                                               

                                            // Get this form status                                               
                                            if (strtotime($open_at) > time())
                                            {
                                                $status = 'unavailable';
                                                $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                            }
                                            elseif (strtotime($due_at) > time())
                                            {
                                                $status = 'available';
                                                $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                         
                                            elseif (strtotime($close_at) > time())
                                            {
                                                $status = 'past_due';
                                                $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                      
                                            else
                                            {
                                                $status = 'closed';
                                                $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                                $img = 'no_form_data_16px.png';

                                                if (!is_null($entry))
                                                {
                                                    $status = 'closed';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }                                                       

                                            }                                               
                                            

                                            $link = url('/forms/' . strtolower($main_form->slug) . '/' . $schools[$i]->id);
                                            $name = 'Fall ' . $main_form->name;
                                        
                                ?>

                                        <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                            <?php if (!is_null($img)): ?>
                                                <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                            <?php endif; ?>
                                            <div class="name"><?php echo $name; ?></div>
                                            <div class="date"><?php echo $date_info; ?></div>
                                        </div>

                                <?php
                                        }
                                    }
                                ?>                               



                                <h3>Optional Forms</h3>

                                <?php /*  Dairy Farmers Academic All State Awards  */ ?>
                                <?php if (count($aps) > 0): ?>

                                    <?php $count_number = 0; ?>

                                    <?php foreach ($aps as $ap): ?>

                                        <?php if ($ap->season == 'F'): ?>

                                            <?php
                                                $main_form = onlineform::where('slug', '=', 'ALL-STATE')
                                                                       ->first();

                                                if (!is_null($main_form))
                                                {

                                                    $form = activityform::where('activity', '=', $ap->activity)
                                                                        ->where('school_year', '=', Session::get('year'))
                                                                        ->where('form', '=', $main_form->slug)
                                                                        ->first();                                                               

                                                    if (!is_null($form))
                                                    {   

                                                        $entry = activityprogramform::where('activity_program', '=', $ap->id)
                                                                                    ->where('activity_form', '=', $form->id)
                                                                                    ->first();

                                                        // Get the form dates
                                                        $open_at = $form->open_at;
                                                        $due_at = $form->due_at;                                                
                                                        $close_at = $form->close_at;     
                                                        $img = null;                                               

                                                        // Get this form status                                               
                                                        if (strtotime($open_at) > time())
                                                        {
                                                            $status = 'unavailable';
                                                            $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                                        }
                                                        elseif (strtotime($due_at) > time())
                                                        {
                                                            $status = 'available';
                                                            $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                                            if (!is_null($entry))
                                                            {
                                                                $status = 'done';
                                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                                $img = 'form_data_16px.png';
                                                            }
                                                        }                         
                                                        elseif (strtotime($close_at) > time())
                                                        {
                                                            $status = 'past_due';
                                                            $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                                            if (!is_null($entry))
                                                            {
                                                                $status = 'done';
                                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                                $img = 'form_data_16px.png';
                                                            }
                                                        }                      
                                                        else
                                                        {
                                                            $status = 'closed';
                                                            $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                                            $img = 'no_form_data_16px.png';

                                                            if (!is_null($entry))
                                                            {
                                                                $status = 'closed';
                                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                                $img = 'form_data_16px.png';
                                                            }                                                       

                                                        }                                               
                                                        

                                                        $link = url('/forms/' . strtolower($main_form->slug) . '/' . $ap->id);
                                                        $name = Helpers::getActivityName($ap->activity) . ' ' . $main_form->name;
                                           
                                                        $count_number++;

                                            ?>

                                                    <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                                        <?php if (!is_null($img)): ?>
                                                            <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                                        <?php endif; ?>
                                                        <div class="name"><?php echo $name; ?></div>
                                                        <div class="date"><?php echo $date_info; ?></div>
                                                    </div>

                                            <?php
                                                    }
                                                }
                                            ?>

                                        <?php endif; ?>

                                    <?php endforeach; ?>

                                    <?php if ($count_number > 0): ?>
                                        <a href="http://www.osaa.org/reports/all-state-by-school/f/<?php echo $schools[$i]->short_name; ?>" target="_blank">Download Fall Entries</a>
                                    <?php endif; ?>
                                
                                <?php else: ?>

                                    There are no forms to display.

                                <?php endif; ?>                       
                              



                               

                            </div>

                            <div class="third">
                                <h2>Winter</h2>
                                
                                <h3 style="color:#990000;">Required Forms</h3>
                                
                                <?php /*  New Seasonal School Form  */ ?>
                                <?php
                                    $form = seasonalschoolform::where('school_year', '=', Session::get('year'))
                                                              ->where('season', '=', 'W')
                                                              ->where('form', '=', 'SEASONAL')
                                                              ->first();

                                    if (!is_null($form))
                                    {
                                        $entry = schoolform::where('school', '=', $schools[$i]->id)
                                                           ->where('seasonal_school_form', '=', $form->id)
                                                           ->first();

                                        $submitted = false;

                                        if (!is_null($entry))
                                        {
                                            $entry_data = json_decode($entry->data);

                                            $submitted = $entry_data->is_submitted;
                                        }

                                        // Get the form dates
                                        $open_at = $form->open_at;
                                        $due_at = $form->due_at;                                                
                                        $close_at = $form->close_at;     
                                        $img = null;                                               

                                        // Get this form status                                               
                                        if (strtotime($open_at) > time())
                                        {
                                            $status = 'unavailable';
                                            $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                        }
                                        elseif (strtotime($due_at) > time())
                                        {
                                            $status = 'available';
                                            $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                            if ($submitted)
                                            {
                                                $status = 'done';
                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                $img = 'form_data_16px.png';
                                            }
                                        }                         
                                        elseif (strtotime($close_at) > time())
                                        {
                                            $status = 'past_due';
                                            $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                            if ($submitted)
                                            {
                                                $status = 'done';
                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                $img = 'form_data_16px.png';
                                            }
                                        }                      
                                        else
                                        {
                                            $status = 'closed';
                                            $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                            $img = 'no_form_data_16px.png';

                                            if ($submitted)
                                            {
                                                $status = 'closed';
                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                $img = 'form_data_16px.png';
                                            }                                                       

                                        }                                               
                                        

                                        $link = url('/forms/seasonal/winter/' . $schools[$i]->id);
                                        $name = 'Seasonal Participation and Preselection';                                        
                                ?>

                                    <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                        <?php if (!is_null($img)): ?>
                                            <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                        <?php endif; ?>
                                        <div class="name"><?php echo $name; ?></div>
                                        <div class="date"><?php echo $date_info; ?></div>
                                    </div>

                                <?php

                                    }

                                ?>


                                <?php /*  Participation Form  */ ?>
                                <?php
                                    $main_form = onlineform::where('slug', '=', 'PARTICIPATION')
                                                           ->first();

                                    if (!is_null($main_form))
                                    {

                                        $form = seasonalschoolform::where('school_year', '=', Session::get('year'))
                                                                  ->where('season', '=', 'W')
                                                                  ->where('form', '=', 'PARTICIPATION')                                 
                                                                  ->first();

                                        if (!is_null($form))
                                        {   

                                            $entry = schoolform::where('school', '=', $schools[$i]->id)
                                                               ->where('seasonal_school_form', '=', $form->id)
                                                               ->first();

                                            // Get the form dates
                                            $open_at = $form->open_at;
                                            $due_at = $form->due_at;                                                
                                            $close_at = $form->close_at;     
                                            $img = null;                                               

                                            // Get this form status                                               
                                            if (strtotime($open_at) > time())
                                            {
                                                $status = 'unavailable';
                                                $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                            }
                                            elseif (strtotime($due_at) > time())
                                            {
                                                $status = 'available';
                                                $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                         
                                            elseif (strtotime($close_at) > time())
                                            {
                                                $status = 'past_due';
                                                $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                      
                                            else
                                            {
                                                $status = 'closed';
                                                $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                                $img = 'no_form_data_16px.png';

                                                if (!is_null($entry))
                                                {
                                                    $status = 'closed';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }                                                       

                                            }                                               
                                            

                                            $link = url('/forms/' . strtolower($main_form->slug) . '/' . $schools[$i]->id);
                                            $name = 'Winter ' . $main_form->name;
                                        
                                ?>

                                        <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                            <?php if (!is_null($img)): ?>
                                                <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                            <?php endif; ?>
                                            <div class="name"><?php echo $name; ?></div>
                                            <div class="date"><?php echo $date_info; ?></div>
                                        </div>

                                <?php
                                        }
                                    }
                                ?>  

                                <?php /*  Preselection Form  */ ?>
                                <?php
                                    $main_form = onlineform::where('slug', '=', 'PRESELECTION')
                                                           ->first();

                                    if (!is_null($main_form))
                                    {

                                        $form = seasonalschoolform::where('school_year', '=', Session::get('year'))
                                                                  ->where('season', '=', 'W')
                                                                  ->where('form', '=', 'PRESELECTION')                                 
                                                                  ->first();

                                        if (!is_null($form))
                                        {   

                                            $entry = schoolform::where('school', '=', $schools[$i]->id)
                                                               ->where('seasonal_school_form', '=', $form->id)
                                                               ->first();

                                            // Get the form dates
                                            $open_at = $form->open_at;
                                            $due_at = $form->due_at;                                                
                                            $close_at = $form->close_at;     
                                            $img = null;                                               

                                            // Get this form status                                               
                                            if (strtotime($open_at) > time())
                                            {
                                                $status = 'unavailable';
                                                $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                            }
                                            elseif (strtotime($due_at) > time())
                                            {
                                                $status = 'available';
                                                $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                         
                                            elseif (strtotime($close_at) > time())
                                            {
                                                $status = 'past_due';
                                                $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                      
                                            else
                                            {
                                                $status = 'closed';
                                                $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                                $img = 'no_form_data_16px.png';

                                                if (!is_null($entry))
                                                {
                                                    $status = 'closed';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }                                                       

                                            }                                               
                                            

                                            $link = url('/forms/' . strtolower($main_form->slug) . '/' . $schools[$i]->id);
                                            $name = 'Winter ' . $main_form->name;
                                        
                                ?>

                                        <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                            <?php if (!is_null($img)): ?>
                                                <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                            <?php endif; ?>
                                            <div class="name"><?php echo $name; ?></div>
                                            <div class="date"><?php echo $date_info; ?></div>
                                        </div>

                                <?php
                                        }
                                    }
                                ?>                               


                                <h3>Optional Forms</h3>
                                
                                <?php /*  Dairy Farmers Academic All State Awards  */ ?>
                                <?php if (count($aps) > 0): ?>

                                    <?php $count_number = 0; ?>

                                    <?php foreach ($aps as $ap): ?>

                                        <?php if ($ap->season == 'W'): ?>

                                            <?php
                                                $main_form = onlineform::where('slug', '=', 'ALL-STATE')
                                                                       ->first();

                                                if (!is_null($main_form))
                                                {

                                                    $form = activityform::where('activity', '=', $ap->activity)
                                                                        ->where('school_year', '=', Session::get('year'))
                                                                        ->where('form', '=', $main_form->slug)
                                                                        ->first();                                                               

                                                    if (!is_null($form))
                                                    {   

                                                        $entry = activityprogramform::where('activity_program', '=', $ap->id)
                                                                                    ->where('activity_form', '=', $form->id)
                                                                                    ->first();

                                                        // Get the form dates
                                                        $open_at = $form->open_at;
                                                        $due_at = $form->due_at;                                                
                                                        $close_at = $form->close_at;     
                                                        $img = null;                                               

                                                        // Get this form status                                               
                                                        if (strtotime($open_at) > time())
                                                        {
                                                            $status = 'unavailable';
                                                            $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                                        }
                                                        elseif (strtotime($due_at) > time())
                                                        {
                                                            $status = 'available';
                                                            $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                                            if (!is_null($entry))
                                                            {
                                                                $status = 'done';
                                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                                $img = 'form_data_16px.png';
                                                            }
                                                        }                         
                                                        elseif (strtotime($close_at) > time())
                                                        {
                                                            $status = 'past_due';
                                                            $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                                            if (!is_null($entry))
                                                            {
                                                                $status = 'done';
                                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                                $img = 'form_data_16px.png';
                                                            }
                                                        }                      
                                                        else
                                                        {
                                                            $status = 'closed';
                                                            $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                                            $img = 'no_form_data_16px.png';

                                                            if (!is_null($entry))
                                                            {
                                                                $status = 'closed';
                                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                                $img = 'form_data_16px.png';
                                                            }                                                       

                                                        }                                               
                                                        

                                                        $link = url('/forms/' . strtolower($main_form->slug) . '/' . $ap->id);
                                                        $name = Helpers::getActivityName($ap->activity) . ' ' . $main_form->name;
                                                    
                                                        $count_number++;
                                            ?>

                                                    <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                                        <?php if (!is_null($img)): ?>
                                                            <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                                        <?php endif; ?>
                                                        <div class="name"><?php echo $name; ?></div>
                                                        <div class="date"><?php echo $date_info; ?></div>
                                                    </div>

                                            <?php
                                                    }
                                                }
                                            ?>

                                        <?php endif; ?>

                                    <?php endforeach; ?>

                                    <?php if ($count_number > 0): ?>
                                        <a href="http://www.osaa.org/reports/all-state-by-school/w/<?php echo $schools[$i]->short_name; ?>" target="_blank">Download Winter Entries</a>
                                    <?php endif; ?>
                                
                                <?php else: ?>

                                    There are no forms to display.

                                <?php endif; ?> 


                            </div>

                            <div class="third">
                                <h2>Spring</h2>
                                
                                <h3 style="color:#990000;">Required Forms</h3>
                                
                                <?php /*  New Seasonal School Form  */ ?>
                                <?php
                                    $form = seasonalschoolform::where('school_year', '=', Session::get('year'))
                                                              ->where('season', '=', 'S')
                                                              ->where('form', '=', 'SEASONAL')
                                                              ->first();

                                    if (!is_null($form))
                                    {
                                        $entry = schoolform::where('school', '=', $schools[$i]->id)
                                                           ->where('seasonal_school_form', '=', $form->id)
                                                           ->first();

                                        $submitted = false;

                                        if (!is_null($entry))
                                        {
                                            $entry_data = json_decode($entry->data);

                                            $submitted = $entry_data->is_submitted;
                                        }

                                        // Get the form dates
                                        $open_at = $form->open_at;
                                        $due_at = $form->due_at;                                                
                                        $close_at = $form->close_at;     
                                        $img = null;                                               

                                        // Get this form status                                               
                                        if (strtotime($open_at) > time())
                                        {
                                            $status = 'unavailable';
                                            $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                        }
                                        elseif (strtotime($due_at) > time())
                                        {
                                            $status = 'available';
                                            $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                            if ($submitted)
                                            {
                                                $status = 'done';
                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                $img = 'form_data_16px.png';
                                            }
                                        }                         
                                        elseif (strtotime($close_at) > time())
                                        {
                                            $status = 'past_due';
                                            $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                            if ($submitted)
                                            {
                                                $status = 'done';
                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                $img = 'form_data_16px.png';
                                            }
                                        }                      
                                        else
                                        {
                                            $status = 'closed';
                                            $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                            $img = 'no_form_data_16px.png';

                                            if ($submitted)
                                            {
                                                $status = 'closed';
                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                $img = 'form_data_16px.png';
                                            }                                                       

                                        }                                               
                                        

                                        $link = url('/forms/seasonal/spring/' . $schools[$i]->id);
                                        $name = 'Seasonal Participation and Preselection';                                        
                                ?>

                                    <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                        <?php if (!is_null($img)): ?>
                                            <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                        <?php endif; ?>
                                        <div class="name"><?php echo $name; ?></div>
                                        <div class="date"><?php echo $date_info; ?></div>
                                    </div>

                                <?php

                                    }

                                ?>

                                <?php /*  Participation Form  */ ?>
                                <?php
                                    $main_form = onlineform::where('slug', '=', 'PARTICIPATION')
                                                           ->first();

                                    if (!is_null($main_form))
                                    {

                                        $form = seasonalschoolform::where('school_year', '=', Session::get('year'))
                                                                  ->where('season', '=', 'S')
                                                                  ->where('form', '=', 'PARTICIPATION')                                 
                                                                  ->first();

                                        if (!is_null($form))
                                        {   

                                            $entry = schoolform::where('school', '=', $schools[$i]->id)
                                                               ->where('seasonal_school_form', '=', $form->id)
                                                               ->first();

                                            // Get the form dates
                                            $open_at = $form->open_at;
                                            $due_at = $form->due_at;                                                
                                            $close_at = $form->close_at;     
                                            $img = null;                                               

                                            // Get this form status                                               
                                            if (strtotime($open_at) > time())
                                            {
                                                $status = 'unavailable';
                                                $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                            }
                                            elseif (strtotime($due_at) > time())
                                            {
                                                $status = 'available';
                                                $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                         
                                            elseif (strtotime($close_at) > time())
                                            {
                                                $status = 'past_due';
                                                $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                      
                                            else
                                            {
                                                $status = 'closed';
                                                $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                                $img = 'no_form_data_16px.png';

                                                if (!is_null($entry))
                                                {
                                                    $status = 'closed';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }                                                       

                                            }                                               
                                            

                                            $link = url('/forms/' . strtolower($main_form->slug) . '/' . $schools[$i]->id);
                                            $name = 'Spring ' . $main_form->name;
                                        
                                ?>

                                        <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                            <?php if (!is_null($img)): ?>
                                                <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                            <?php endif; ?>
                                            <div class="name"><?php echo $name; ?></div>
                                            <div class="date"><?php echo $date_info; ?></div>
                                        </div>

                                <?php
                                        }
                                    }
                                ?>  

                                <?php /*  Preselection Form  */ ?>
                                <?php
                                    $main_form = onlineform::where('slug', '=', 'PRESELECTION')
                                                           ->first();

                                    if (!is_null($main_form))
                                    {

                                        $form = seasonalschoolform::where('school_year', '=', Session::get('year'))
                                                                  ->where('season', '=', 'S')
                                                                  ->where('form', '=', 'PRESELECTION')                                 
                                                                  ->first();

                                        if (!is_null($form))
                                        {   

                                            $entry = schoolform::where('school', '=', $schools[$i]->id)
                                                               ->where('seasonal_school_form', '=', $form->id)
                                                               ->first();

                                            // Get the form dates
                                            $open_at = $form->open_at;
                                            $due_at = $form->due_at;                                                
                                            $close_at = $form->close_at;     
                                            $img = null;                                               

                                            // Get this form status                                               
                                            if (strtotime($open_at) > time())
                                            {
                                                $status = 'unavailable';
                                                $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                            }
                                            elseif (strtotime($due_at) > time())
                                            {
                                                $status = 'available';
                                                $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                         
                                            elseif (strtotime($close_at) > time())
                                            {
                                                $status = 'past_due';
                                                $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                                if (!is_null($entry))
                                                {
                                                    $status = 'done';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }
                                            }                      
                                            else
                                            {
                                                $status = 'closed';
                                                $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                                $img = 'no_form_data_16px.png';

                                                if (!is_null($entry))
                                                {
                                                    $status = 'closed';
                                                    $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                    $img = 'form_data_16px.png';
                                                }                                                       

                                            }                                               
                                            

                                            $link = url('/forms/' . strtolower($main_form->slug) . '/' . $schools[$i]->id);
                                            $name = 'Spring ' . $main_form->name;
                                        
                                ?>

                                        <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                            <?php if (!is_null($img)): ?>
                                                <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                            <?php endif; ?>
                                            <div class="name"><?php echo $name; ?></div>
                                            <div class="date"><?php echo $date_info; ?></div>
                                        </div>

                                <?php
                                        }
                                    }
                                ?>                               


                                <h3>Optional Forms</h3>
                                
                                <?php /*  Dairy Farmers Academic All State Awards  */ ?>
                                <?php if (count($aps) > 0): ?>

                                    <?php $count_number = 0; ?>

                                    <?php foreach ($aps as $ap): ?>

                                        <?php if ($ap->season == 'S'): ?>

                                            <?php
                                                $main_form = onlineform::where('slug', '=', 'ALL-STATE')
                                                                       ->first();

                                                if (!is_null($main_form))
                                                {

                                                    $form = activityform::where('activity', '=', $ap->activity)
                                                                        ->where('school_year', '=', Session::get('year'))
                                                                        ->where('form', '=', $main_form->slug)
                                                                        ->first();                                                               

                                                    if (!is_null($form))
                                                    {   

                                                        $entry = activityprogramform::where('activity_program', '=', $ap->id)
                                                                                    ->where('activity_form', '=', $form->id)
                                                                                    ->first();

                                                        // Get the form dates
                                                        $open_at = $form->open_at;
                                                        $due_at = $form->due_at;                                                
                                                        $close_at = $form->close_at;     
                                                        $img = null;                                               

                                                        // Get this form status                                               
                                                        if (strtotime($open_at) > time())
                                                        {
                                                            $status = 'unavailable';
                                                            $date_info = 'Opens at ' . strtoupper(date('g:i a D n/j/y', strtotime($open_at)));
                                                        }
                                                        elseif (strtotime($due_at) > time())
                                                        {
                                                            $status = 'available';
                                                            $date_info = 'Due by ' . strtoupper(date('g:i a D n/j/y', strtotime($due_at)));

                                                            if (!is_null($entry))
                                                            {
                                                                $status = 'done';
                                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                                $img = 'form_data_16px.png';
                                                            }
                                                        }                         
                                                        elseif (strtotime($close_at) > time())
                                                        {
                                                            $status = 'past_due';
                                                            $date_info = 'Closes at ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));

                                                            if (!is_null($entry))
                                                            {
                                                                $status = 'done';
                                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                                $img = 'form_data_16px.png';
                                                            }
                                                        }                      
                                                        else
                                                        {
                                                            $status = 'closed';
                                                            $date_info = 'Missed deadline of ' . strtoupper(date('g:i a D n/j/y', strtotime($close_at)));
                                                            $img = 'no_form_data_16px.png';

                                                            if (!is_null($entry))
                                                            {
                                                                $status = 'closed';
                                                                $date_info = 'Completed ' . strtoupper(date('g:i a D n/j/y', strtotime($entry->updated_at)));
                                                                $img = 'form_data_16px.png';
                                                            }                                                       

                                                        }                                               
                                                        

                                                        $link = url('/forms/' . strtolower($main_form->slug) . '/' . $ap->id);
                                                        $name = Helpers::getActivityName($ap->activity) . ' ' . $main_form->name;
                                                    
                                                        $count_number++;
                                            ?>

                                                    <div class="form_link ui-corner-all <?php echo $status; ?>" data-link="<?php echo $link; ?>">
                                                        <?php if (!is_null($img)): ?>
                                                            <div class="icon"><img src="<?php echo asset('/images/icons/' . $img); ?>" alt="" title="" /></div>
                                                        <?php endif; ?>
                                                        <div class="name"><?php echo $name; ?></div>
                                                        <div class="date"><?php echo $date_info; ?></div>
                                                    </div>

                                            <?php
                                                    }
                                                }
                                            ?>

                                        <?php endif; ?>

                                    <?php endforeach; ?>

                                    <?php if ($count_number > 0): ?>
                                        <a href="http://www.osaa.org/reports/all-state-by-school/s/<?php echo $schools[$i]->short_name; ?>" target="_blank">Download Spring Entries</a>
                                    <?php endif; ?>  
                                
                                <?php else: ?>

                                    There are no forms to display.

                                <?php endif; ?> 


                            </div>


                        </div>                   

                    </div>
                <?php endif; ?>

                <h2 style="margin:0;">My Information</h2>                
                <div>
                     <a href="<?php echo url('/account/reset-password?change-password=true'); ?>" class="password_button" style="">Change Password</a>

                     <button class="button remove tooltip confirm"
                             style="margin-left:10px;"
                             title="Remove this school from your account."
                             data-school="<?php echo $schools[$i]->id; ?>"
                             data-user="<?php echo Auth::user()->id; ?>"
                             data-confirm="Are you sure you want to remove this school from your account?<br /><br /><div class='ui-state-error' style='padding:5px;''><div class='ui-icon ui-icon-alert float_left margin-right:1em;''></div>If you remove this school, all of your roles with this school will be deleted.  You will no longer be tied with this school.</div>" >
                        Remove School
                    </button>
                </div>

                
            </div>

            </div>

            <?php if (Auth::user()->canAccessSchoolTask($schools[$i]->id, 'ADMIN')): ?>
            <div class="key_code_dialog" title="<?php echo $schools[$i]->short_name; ?> Key Codes" style="display:none;" data-school="<?php echo $schools[$i]->id; ?>">
                <b>Non-Administrator:</b> <?php echo substr($schools[$i]->key_code, 0, 4); ?><br />
                <div class="small gray note" style="line-height:105%;">
                    Give this code out to any user requesting coach or team related privileges.  Grants access to <b>schedules</b>, <b>rosters</b>, and <b>scores</b> to a user for a specific team.
                </div>

                <br />

                <b>Administrator:</b> <?php echo $schools[$i]->key_code; ?><br />
                <div class="small gray note" style="line-height:105%;">
                    <span class="important">Only give this code out to your school administrators and administrative assistants.</span>  Grants access to everything related to your school including <b>forms</b>, <b>information</b>, and <b>schedules</b>, <b>rosters</b>, and <b>scores</b> for every team.
                </div>


            </div>
            <?php endif; ?>
        <?php endfor; ?>





        <?php /*  Add a new school tab  */ ?>
        <div id="tabs-new">
            <h1>Add a School or New Role</h1>
            <p>                
                <?php if (count ($schools) > 0): ?>
                    To add yourself to another school, 
                <?php else: ?>
                    To add yourself to a school,
                <?php endif; ?>
                please fill in all of the following items.  You can also use this form to add yourself to the same school but in a different role.               
            </p>

            <div class="columns">

                <div class="half">
                    <h2>Add School/Role</h2>
                    
                    <?php echo Form::open(array('url' => url('/account/add-school'), 'class' => 'login')); ?>

                    <?php if (Session::has('errors')): ?>                
                        <div class="error ui-state-error"><span class="ui-icon ui-icon-alert box_icon"></span><?php foreach ($errors->all() as $error): ?><?php echo $error; ?> <?php endforeach; ?></div>                       
                    <?php endif; ?>
                    
                    <?php echo Form::label('school', 'School', array('class' => 'input_label')); ?>
                    <?php

                        $sel_school_ids = DB::table('school_demographics')
                                            ->select(array('school'))
                                            ->where('is_associate_member', '=', 0)
                                            ->where('school_year', '=', Session::get('year'))
                                            ->where('is_retired', '=', 0)
                                            ->lists('school');

                        $sel_schools = school::whereIn('id', $sel_school_ids)
                                             ->whereNotNull('key_code')
                                             ->orderBy('name')
                                             ->get();

                        $select = array();

                        foreach ($sel_schools as $school)
                        {
                            $select[$school->id] = $school->name;
                        }

                        unset ($sel_schools);

                    ?>
                    <?php echo Form::select('school', $select, isset ($schools[0]) ? $schools[0]->id : null, array('style' => 'width:275px;')); ?>

                    <br /><br />

                    <?php echo Form::label('role', 'Role', array('class' => 'input_label')); ?>
                    <?php

                        $sel_roles = role::where('entity_type', '=', 'S')->orderBy('name')->get();

                        $select = array();

                        foreach ($sel_roles as $role)
                        {
                            $select[$role->slug] = $role->name;                            
                        }

                        unset ($sel_roles);

                    ?>
                    <?php echo Form::select('role', $select, null, array('style' => 'width:275px;')); ?>


                    <br /><br />

                    <?php echo Form::label('activity', 'Activity', array('class' => 'input_label')); ?>
                    <?php

                        $sel_activities = activity::orderBy('id')->get();

                        $select = array();

                        foreach ($sel_activities as $activity)
                        {
                            $select[$activity->slug] = $activity->name;
                        }

                        unset ($sel_activities);

                    ?>
                    <?php echo Form::select('activity', $select, null, array('disabled', 'style' => 'width:275px;')); ?>


                    <br /><br />

                    <?php echo Form::label('key', 'Key Code', array('class' => 'input_label')); ?>
                    <?php echo Form::password('key', array('style' => 'width:125px;')); ?>

                    <br /><br />
                   
                    <?php echo Form::submit('Add', array('class' => 'submit', 'style' => 'margin-left:377px;')); ?>


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

                    <br />                    
                    <div class="horizontal_divider" style="margin-right: auto; margin-left: auto;"></div>
                    <br />

                    <h2>Associate Members</h2>
                    <div class="button manage_assoc" style="font-size: 8pt;">Manage an Associate Member School</div>
                    <p style="font-size: 9pt; margin-top: 0.5em;">
                        Click this button to use your school ID and key code to link your account to an Associate Member school.
                    </p>

                    <br />                    
                    <div class="horizontal_divider" style="margin-right: auto; margin-left: auto;"></div>
                    <br />

                    <h2>Wrestling BIA Assessors</h2>
                    <?php if (!Auth::user()->isBiaUser()): ?>                    
                        <div class="button setup_bia_account" style="font-size: 8pt;">Setup BIA Assessor Account</div>
                        <p style="font-size: 9pt; margin-top: 0.5em;">
                            Click this button to setup your OSAA user account as a wrestling BIA Assessor.
                        </p>
                    <?php else: ?>
                        <p style="font-size: 9pt; margin-top: 0.5em;">
                            Your account is already setup as an BIA Assessor Account.  No further action is required.
                        </p>
                    <?php endif; ?>

                </div>

                <div class="half">
                    <h3>Here's what you'll need:</h3>
                    <ul>
                        <li><b>School</b><br /><span class="small gray note">Select a school from the drop-down list.</span></li>
                        
                        <li><b>Role/Activity</b><br /><span class="small gray note">What will you be doing with this school?  Are you an Athletic Director?  Are you a soccer coach?  Pick the best role/activity combination that applies to you for this school. Some roles are not tied to a specific activity.</span></li>

                        <li><b>School Key Code</b><br /><span class="small gray note">This code is required to help ensure submissions are authentic. Each school has two key codes: administrator and coach.  Some roles, like AD or Principal, require you to enter the administrator key code.  Other roles just need the non-administrative, or coach, key code in order to gain access.</span></li>
                    </ul>

                    <h3>How do I get my school's key code?</h3>
                    <p>
                        Your school administrator can provide you with your school's key code if you don't know it.  Key codes were given to each school during the fall administrator workshops.  Administrators can also view their school's key codes from the "My Account" page by clicking the key icon.
                    </p>

                    <br /><br /><br />

                    <h3>You'll need a BIA key code</h3>
                    <p>
                        Anyone can create an OSAA user account, but only certain people are authorized to setup a BIA Assessor account.  In order to complete this process, you'll need a special BIA key code in order to setup your account as a BIA Assessor.
                    </p>

                </div>                   


            </div>

            <br class="clear" />




        </div>
        
    </div>    

	
    <div id="confirm_dialog" title="Confirmation"></div>

    <div id="token" style="display:none;">
        <?php echo Form::token();; ?>
    </div>
<?php $__env->stopSection(); ?>