<?php

namespace Nette\Bridges\HttpTracy;

use Nette,
	Tracy\Dumper;

?>
<style class="tracy-debug">#tracy-debug .nette-SessionPanel .tracy-inner{width:700px}#tracy-debug .nette-SessionPanel .tracy-inner table{width:100%}#tracy-debug .nette-SessionPanel-parameters pre{background:#FDF5CE;padding:.4em .7em;border:1px dotted silver;overflow:auto}</style>

<div class="nette-SessionPanel">
	<h1>Session #<?php echo htmlspecialchars(session_id()) ?> (Lifetime: <?php echo htmlspecialchars(ini_get('session.cookie_lifetime')); ?>)</h1>

	<div class="tracy-inner">
		<?php if (empty($_SESSION)):?>
		<p><i>empty</i></p>
		<?php else: ?>
		<table>
		<?php
		foreach ($_SESSION as $k => $v) {
			if ($k === '__NF') {
				$k = 'Nette Session'; $v = isset($v['DATA']) ? $v['DATA'] : NULL;
			}
			echo '<tr><th>', htmlspecialchars($k), '</th><td>', Dumper::toHtml($v), "</td></tr>\n";
		}?>
		</table>
		<?php endif ?>
	</div>
</div>
