<?php
	namespace Mocha\UI\Pages;
	
	use Mocha\Core\KnownAttributeGuids;
	
	use Mocha\Core\KnownClassGuids;
	use Mocha\Core\KnownInstanceGuids;
	use Mocha\Core\KnownRelationshipGuids;
	use Phast\RenderingEventArgs;
	use Phast\System;
	use Phast\WebPage;

	class LoginResourcesPage extends WebPage
	{

		protected function OnRendering(RenderingEventArgs $re)
		{
			$filename = $this->Page->GetPathVariableValue("filename");
			if ($filename == "signon.xml")
			{
				$realFilePath = System::MapVirtualPath("~/images/suv.svg");
				
				if (file_exists($realFilePath))
				{
					header("Content-Type: " . mime_content_type($realFilePath));
					readfile($realFilePath);
				}
				else
				{
					header("HTTP/1.1 404 Not Found");
					?><div id="content">
						<h1>Not Found</h1>
						<p>The requested URL was not found on this server.</p>
					</div><?php
				}
			}
			else
			{
				header("HTTP/1.1 404 Not Found");
				?><div id="content">
					<h1>Not Found</h1>
					<p>The requested URL was not found on this server.</p>
				</div><?php
			}
			exit();
		}

	}
?>