<?php
if(!defined('panel'))
	die('Nope.');
if(!isset($_SESSION['user']) && !isset(Config::$_url[1])) echo '<meta http-equiv="refresh" content="0;URL=\''.Config::$_PAGE_URL.'login\'/>';
if(isset(Config::$_url[1])) $user = (int)Config::$_url[1];
?>
<title>Notifications - <?php echo Config::$_SITE_NAME; ?></title>
</div>
	<div class="main-content">
			<div class="breadcrumbs" id="breadcrumbs">
				<script type="text/javascript">
					try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
				</script>

				<ul class="breadcrumb">
					<li>
						<i class="ace-icon fa fa-home home-icon"></i>
						<a href="<?php echo Config::$_PAGE_URL; ?>">Home</a>
					</li>
					<li class="active">Notifications</li>
				</ul><!-- /.breadcrumb -->

				<div class="nav-search" id="nav-search">
					<form method="POST" action="<?php echo Config::$_PAGE_URL; ?>search">
						<span class="input-icon">
							<input type="text" placeholder="Search ..." name="sname" id="username" type="submit" class="nav-search-input" autocomplete="on"> 
							<i class="ace-icon fa fa-search nav-search-icon"></i>
						</span>
					</form>
				</div> <!-- /.nav-search -->
			</div>	
<div class="page-content">
<div id="feed" class="tab-pane">
<div class="profile-feed row-fluid">
<div class="span12">

<?php
	$q = Config::$g_con->prepare('SELECT * FROM `emails` WHERE `playerid` = ? ORDER BY `id` DESC'); 
	$q->execute(array(Config::getData('users','id',$_SESSION['user'])));
	while($dnn = $q->fetch(PDO::FETCH_OBJ)) {														
?>
<div class="profile-activity clearfix">
<div>
<i class="icon-bell pull-left icon-3x"></i>
<?php echo $dnn->Message ?>
<?php if(!$dnn->LinkPanel == "") { ?>
<a href="<?php echo Config::$_PAGE_URL; ?><?php echo $dnn->LinkPanel ?>" class="btn btn-success pull-right">Click to view</a>
<?php } ?>
<div class="time">
<i class="icon-time bigger-110"></i>
<?php echo $dnn->Time ?>
</div>
</div>
</div>
<?php } ?>