<?php

	if ( ( is_numeric( $_GET[ 'siteId' ] ) ) && ( intval( $_GET[ 'siteId' ] ) > 1 ) )
		{
			if ( ! isset ( $_SESSION[ 'sess_portalRightsType' ] ) )
				{
					?>
					
						<html>
							<head>
								<script type="text/javascript">
									if ( window.opener )
										{
											window.opener.location.reload( );
											self.close( );
										}
									else
										{
											self.location.href = 'index.php';
										}
								</script>
							</head>
							<body>
							</body>
						</html>
						
					<?php
					die( );
				}
			else if ( $_SESSION[ 'sess_portalRightsType' ] === 'DEF' && ( ! in_array( 'portal_' . $_GET[ 'siteId' ] , $_SESSION[ 'sess_portalRights' ] ) && ! in_array( $_GET['siteId'] , $_SESSION['sess_portalRights'] ) ) )
				{
					?>
					
						<html>
							<head>
								<script type="text/javascript">
									if ( window.opener )
										{
											window.opener.location.reload( );
											self.close( );
										}
									else
										{
											self.location.href = 'index.php';
										}
								</script>
							</head>
							<body>
							</body>
						</html>
						
					<?php
					die( );
				}
		}

?>