<div id="page-wrapper">
	<div class="container-fluid">
		<?php echo flash_show('adg_visits'); ?>

		<!-- Flot Charts -->
        <div class="row">
            <div class="col-lg-12">
                <h2 class="page-header"><?php echo T('История посещений'); ?></h2>
            </div>
        </div>
        <!-- /.row -->
		<div class="row">
			<div class="col-lg-12">
				<div class="panel panel-primary">
					<div class="panel-heading">
						<h3 class="panel-title">
							<i class="fa fa-bar-chart-o"></i> <?php echo T('Посещения'); ?>
							<span style="float: right;">
								<i class="fa fa-question-circle" aria-hidden="true" data-toggle="tooltip" data-placement="left"
								   title="<?php echo T('В этом блоке отображены посещения польователей.'); ?>"></i>
							</span>
						</h3>
					</div>
					<div class="panel-body">
						<div class="flot-chart">
							<div class="flot-chart-content" id="flot-line-chart">
								<div class="table-responsive">
									<table class="table table-bordered table-hover">
										<thead>
											<tr>
												<th><?php echo T('ID'); ?></th>
												<th><?php echo T('Login'); ?></th>
												<th><?php echo T('Дата'); ?></th>
												<th><?php echo T('IP'); ?></th>
												<th><?php echo T('Удалить'); ?></th>
											</tr>
										</thead>
										<tbody>
											<?php foreach (adg_get_visit_by_type('success') as $item) { ?>
											<tr>
												<td><?php echo escape($item['id']); ?></td>
												<td><?php echo adg_gen_link_item_users($item['login']); ?></td>
												<td><?php echo format_date($item['date']); ?></td>
												<td><?php echo escape($item['ip']); ?></td>
												<td><?php echo button_delete((int)$item['id'], 'delete', '/handlers/adg/visits.php'); ?></td>
											</tr>
											<?php } ?>
										<tbody>
									</table>
									<?php adg_get_visit_by_type('success', 'paginator'); ?>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->