<? 
	if(isset($_GET['view']) AND $_GET['view'] != ''){
		$pageTitle 	= 'Онлайн запрос #' . $_GET['view'];
	} else {
		$pageTitle 	= 'Онлайн запросы от клиентов';
	}
	
	require_once(ROOT . 'templates/header.php'); 
	
	require_once(ROOT . 'modules/clients/list-requests.php'); 
	
	require_once(ROOT . 'templates/main-menu.php');
?>
<div class="container<? echo $designView; ?>">
	<div class="row">
		<? 
		if(isset($_GET['view']) and $_GET['view'] != ''){ 
			require_once(ROOT . 'modules/clients/page-requests-view.php');
		} else {
		?>
		<div class="col-lg-12">
			
			<h1><? echo $pageTitle; ?><span class="list-num"><i class="fa fa-fw fa-angle-double-down" aria-hidden="true"></i> <? echo $countRequest; ?></span></h1>
			
			<? require_once(ROOT . 'templates/search-form.php'); ?>
			
			<div class="table-responsive">
				<table id="all-clients-req" class="table table-hover tablesorter all-clients clients-inwork">
					<thead> 
						<tr> 
							<th width="4%"></th>
							<th>Контакт</th> 
							<th width="45%" style="text-align:left!important;">Услуга</th>
							<th width="12%">Дата</th>
							<th width="4%"></th>
							<th width="4%"></th>
						</tr> 
					</thead> 
					<tbody>
						<? require_once(ROOT . 'modules/clients/list-requests-m.php'); ?>
					</tbody>
				</table>
			</div>
			<? require_once(ROOT . 'templates/table-pager.php'); ?>
		</div>
		<? } ?>
	</div>
</div>
<?
	require_once(ROOT . 'templates/modal-wind.php');
	require_once(ROOT . 'templates/footer.php');
?>
	</body>
</html>