<?php
defined( '_VALID_MOS' ) or die( 'Доступ запрещен.' );
error_reporting( E_ERROR);
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head><?php mosShowHead(); ?> <?php
if ( $my->id ) {
	initEditor();
}
$collspan_offset = ( mosCountModules( 'right' ) + mosCountModules( 'user2' ) ) ? 2 : 1;
//script to determine which div setup for layout to use based on module configuration
$user1 = 0;
$user2 = 0;
$colspan = 0;
$right = 0;
// banner combos

//user1 combos
if ( mosCountModules( 'user1' ) + mosCountModules( 'user2' ) == 2) {
	$user1 = 2;
	$user2 = 2;
	$colspan = 3;
} elseif ( mosCountModules( 'user1' ) == 1 ) {
	$user1 = 1;
	$colspan = 1;
} elseif ( mosCountModules( 'user2' ) == 1 ) {
	$user2 = 1;
	$colspan = 1;
}

//right based combos
if ( mosCountModules( 'right' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
	$right = 1;
} 
?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<meta http-equiv="Content-Language" content="ru"/>
<link href="<?php echo $mosConfig_live_site;?>/templates/paranoia_no_right/css/template_css.css" rel="stylesheet" type="text/css" />
</head>

<body>

<table class="tborder" border="0" width="100%" style="border-collapse: collapse">
	<tr>
		<td>
		<table border="0" width="100%" bgcolor="#FFFFFF" style="border-collapse: collapse">
			<tr>
				<td width="50%" align="left">
				<img border="0" src="<?php echo $mosConfig_live_site;?>/templates/paranoia_no_right/images/header_left.png" />
				</td>
				<td align="right" valign="top" rowspan="2">
				<a href="<?php echo $mosConfig_live_site.'/administrator' ?>">
				<img border="0" src="<?php echo $mosConfig_live_site;?>/templates/paranoia_no_right/images/header_right.png" /></a></td>
			</tr>
		</table>
		</td>
	</tr>
</table>
<table><tr><td>
</td></tr></table>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td align="left" valign="top">
		<table border="0" width="100%" style="border-collapse: collapse">
			<tr >
				<td align="left" valign="top">
				<table class="tborder" cellspacing="1" cellpadding="3" width="160" align="center" border="0">
					<tr>
						<td class="thead"><center><?php echo _LEFT_COLUMN_NAME;?></center></td>
					</tr>
					<tr>
						<td class="vbmainwindow"><?php mosLoadModules ( 'left' ); ?>
						</td>
					</tr>
					<tr>
						<td class="vbmainwindow"><?php mosLoadModules ( 'user1' ); ?>
						</td>
					</tr>
				</table>
				</td>
				<td width="10">&nbsp;</td>
				<td width="100%" align="left" valign="top">
				<table class="tborder" width="100%" border="0" align="center" cellpadding="3" cellspacing="1" id="table9">
					<tr>
						<td width="100%" class="thead"><?php include "pathway.php"; ?>
						</td>
					</tr>
					<!-- ############################################## --><?php if ( mosCountModules( 'top' ) > 0 ) { ?>
					<tr>
						<td width="100%" valign="top" class="vbmainwindow" height="22">
						<?php mosLoadModules ( 'top' ); ?> </td>
					</tr>
					<?php }; ?>
					<!-- ############################################## -->
					<tr>
						<td class="vbmainwindow" width="100%" valign="top"><?php include ("mainbody.php"); ?>
						</td>
					</tr>
					<!-- ############################################## --><?php if ( mosCountModules( 'bottom' ) > 0 ) { ?>
					<tr>
						<td width="100%" valign="top" class="vbmainwindow"><?php mosLoadModules ( 'bottom' ); ?>
						</td>
					</tr>
					<?php }; ?>
					<!-- ############################################## -->
				</table>
				</td>
				<!-- ############################################## --><?php if ( mosCountModules( 'right' ) > 0 ) { ?>
				<td width="10">&nbsp;</td>
			</tr>
			<?php }; ?>
			<!-- ############################################## -->
		</table>
		</td>
	</tr>
	<tr>
		<td align="center" height="5"></td>
	</tr>
</table>
<table border="0" width="100%">
	<tr>
		<td><?php include_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/footer.php' ); ?>
		<?php mosLoadModules( 'debug', -1 );?></td>
	</tr>
</table>
</body>

</html>
