<?php
$link = '';

if ($_SESSION['default']['access_id'] == '48x' || $_SESSION['default']['access_id'] == '551')
	$link = anchor('public/order/orders.php', 'ARCHLine.XP Orders');
else
	$link = anchor('public/order/order.php', 'ARCHLine.XP Retail Store');

$resourceLogin = array('36', '37', '39', '34', '33', '48', '48x', '30', '51', '12', '38', '42', '82', '47', '88', '431', '551', '83');
?>

<style>
	.error {
		border: 1px solid;
		margin: 10px 0px;
		padding: 15px 10px 15px 50px;
		background-repeat: no-repeat;
		background-position: 10px center;
		color: #D8000C;
		background-color: #FFBABA;
		background-image: url('https://i.imgur.com/GnyDvKN.png');
	}
</style>

<?php if (isset($_SESSION['error_login']) && $_SESSION['error_login'] != '') : ?>
	<div class="error">
		<?= $_SESSION['error_login'] ?>
	</div>

	<?php unset($_SESSION['error_login']) ?>
<?php endif; ?>

<h1>CadLine Partners</h1>

<ul>
	<li><?= anchor('partners/bugtracker', 'Access the bugtracker database') ?></li>
	<li><?= anchor('partners/keys', 'Access the product key database') ?></li>
	<li><?= $link ?></li>
	<?php if ($_SESSION['default']['access_id'] != '48x' && $_SESSION['default']['access_id'] != '551') : ?>
		<li><?= anchor('public/order/orders.php', 'ARCHLine.XP Orders') ?></li>
	<?php endif; ?>
	<?php if (in_array($_SESSION['default']['access_id'], $resourceLogin)) : ?>
		<li><?= anchor('resourcemanager', 'Resource Manager') ?></li>
	<?php endif; ?>
	<li><?= anchor('trialusage', 'Diagrams') ?></li>
	<li><?= anchor('partners/logout', 'Log out from the partners area') ?></li>
</ul>