<!DOCTYPE html>
<html lang="en">

    <!-- HTML Head -->
    <head>

        <!-- Page Title -->
        <title>
            OSAA - Error
        </title>
      
        <!-- Meta Tage -->                  
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="description" content="Oregon School Activities Association">
        <meta name="viewport" content="width=device-width">
        <meta name="robots" content="noindex, nofollow">        

        <style type="text/css">
        	body {
        		font-family: Arial, Helvetica, sans-serif;
			    font-size: 11pt;
			    line-height: 120%;
			    color: #151515;
			    background: #ffffff;
        	}

        	h1 {
        		letter-spacing: 1px;
			    font-family: Rockwell, Segoe UI, Arial, Sans-Serif;
			    font-size: 18pt;
			    font-weight: bold;
			    margin: 10px 0 6px 0;
			    padding-bottom: 10px;
			    border-bottom: 5px solid #1c43a6;
        	}

        	h2 {
        		color: #990000;
        		font-size: 14pt;
        		padding: 0.5em 0;
        	}

        	.exception_source {
        		font-size: 10pt;
        		color: #666666;
        	}

        	.exception_message {
        		font-size: 10pt;
        		color: #666666;
        		padding-left: 10px;
        		border-left: 2px solid red;
        	}

        	a {color:#005fa9; text-decoration:none; background-color:inherit; font-size: 9pt;}
        	a:hover {color:#990000; text-decoration:underline; background-color:inherit; font-size: 9pt;}

        </style>

    </head>

    <body>
    	<div style="width: 100%; margin-top: 4em;">
    		
    		<div style="width: 600px; margin: 0 auto;">
    			<div style="float: right; font-size: 14pt; color: #999999;">
    				<?php echo $code; ?>
    			</div>

    			<h1>
    				<?php
    					switch ($code)
    					{
    						// Unauthorized, Forbidden
    						case 401:
    						case 403:
    							echo 'Error - Access Denied';
    							break;

    						// Not found
    						case 404:
    							echo 'Error - Not Found';
    							break;

    						// Method Not Allowed
    						case 405:
    							echo 'Error - Method Not Allowed';
    							break;

    						default:
    							echo 'There Was an Error';
    					}
    				?>	
    			</h1>

    			<img src="<?php echo asset('images/osaa_logo_96px.png'); ?>" alt="" title="" style="width: 64px; height: 64px; float: right;" />

    			<h2>
    				<?php
    					switch ($code)
    					{
    						// Unauthorized, Forbidden
    						case 401:
    						case 403:
    							echo 'You do not have permission to access that page/file.';
    							break;

    						// Not found
    						case 404:
    							echo 'The requested page/file could not be found on the server.';
    							break;

    						// Method Not Allowed
    						case 405:
    							echo 'That HTTP request method is not allowed.';
    							break;

    						default:
    							echo 'There was an unexpected error.';
    					}
    				?>	
    			</h2>

    			<br />

    			<p>
    				<?php
    					switch ($code)
    					{
    						// Unauthorized, Forbidden
    						case 401:
    						case 403:
    							echo 'Your request could not be completed because of a ' . $code . ' error.  This means that you do not have access to that page/file/feature.  You are either not logged in or you lack sufficient privileges.  No additional information is available.';
    							break;

    						// Not found
    						case 404:
    							echo 'Your request could not be completed because of a ' . $code . ' error.  This means that the web page or file you are looking for cannot be found.  It may not have been updated yet, or it may have been moved.  Some additional information is below.';
    							echo '<br />';
    							echo '<div class="exception_source">Cannot find:</div>';
    							echo '<div class="exception_message">' . Request::url() . '</div>';
    							break;

   							// Method Not Allowed
    						case 405:
    							echo 'Your request could not be completed because of a ' . $code . ' error.  This means that the HTTP request method your provided is not allowed.  Some additional information is below.';
    							echo '<br />';
    							echo '<div class="exception_source">' . Request::server('REQUEST_METHOD') . ' methods not allowed on:</div>';
    							echo '<div class="exception_message">' . Request::url() . '</div>';
    							break;

    						default:    							
    							echo 'There was an unexpected ' . $code . ' error.  Your request could not be completed by the web server.  Some additional information is below.';
    							echo '<br />';
    							echo '<div class="exception_source">Code in file ' . substr($exception->getFile(), strrpos($exception->getFile(), '/') + 1, strlen($exception->getFile()) - strrpos($exception->getFile(), '/') - 1) . ' at line ' . $exception->getLine() . ' threw an exception:</div>';
    							echo '<div class="exception_message">' . $exception->getMessage() . '</div>';
    					}
    				?>    				
    			</p>
    			
    			<br />

    			<p>
    				<a href="<?php echo url('/'); ?>">&raquo; OSAA Home Page</a>
    			</p>

    		</div>	
    	</div>
        

    </body>    

</html>