<div class="row">
	<div class="col-lg-4">
		<h3><?=Dict::_('TTLINFO')?></h3>
		<div class="panel panel-default">
			<div class="panel-body">
				
				<div class="row">
					<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8"><?=Dict::_('TXTVERSION')?> <?php echo $CRMname; ?></div>
					<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4" style="text-align:right;"><b><?php echo $CRMversion; ?></b></div>
				</div>
				<hr/>
				<div class="row">
					<div class="col-lg-12" style="text-align:center;">
						<?php if($nCRMsn != '') {
							echo '<b style="font-size:1.5em;line-height:27px;"'; if ($nCRMdateTo < $nCRMdateFrom){echo 'class="clr_high" title="'.Dict::_('TXTSN1').'"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> ';} else {echo 'class="clr_low" title="'.Dict::_('TXTSN2').'"><i class="fa fa-fw fa-shield" aria-hidden="true"></i> ';} echo $nCRMsn . '</b>';
						} else {
							echo '<a href="/'.$folder.'/admin#settings"><b class="clr_high">'.Dict::_('TXTSN3').'</b></a>';
						} ?>
					</div>
				</div>
				<?php if($nCRMsn != '') { ?>
				<hr/>
				<div class="row">
					<div class="col-lg-12 centered">
						Лицензия действует до: <?php echo $nCRMdate; ?>
						<?php if ($nCRMdateTo > $nCRMdateFrom) {echo ' (<span class="clr_low" title="'.Dict::_('DAYSLEFT').'">+' . $nCRMdateFrom->diff( $nCRMdateTo )->format( '%a' ) . ')</span>';}?>
					</div>
				</div>
				<? } ?>
			</div>
		</div>
		<div class="panel panel-default">
			<div class="panel-body text-center">
				<div class="input-group input-group-lg" style="width:100%;margin:0px 0 0px 0;">
					<span class="input-group-addon"><i class="fa fa-fw fa-rub" aria-hidden="true"></i></span>
					<div class="input-group-btn" style="width:100%;"><a href="/<? echo $folder; ?>/donate" class="btn btn-lg btn-success" style="display:block;color:#fff;height:46px;">Поддержать проект</a></div>
				</div>
			</div>
		</div>
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="row">
					<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8"><i class="fa fa-fw fa-gear" aria-hidden="true"></i> Занято всей системой:</div>
					<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4" style="text-align:right;"><b><? echo format_size(dir_size(ROOT)); ?></b></div>
				</div>
				<hr/>
				<div class="row">
					<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8"><i class="fa fa-fw fa-server" aria-hidden="true"></i> Занято базой данных:</div>
					<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4" style="text-align:right;"><b><? echo format_size(dir_size(ROOT.'crmdata/database')); ?></b></div>
				</div>
				<hr/>
				<div class="row">
					<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8"><i class="fa fa-fw fa-cloud-download" aria-hidden="true"></i> Занято загрузками:</div>
					<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4" style="text-align:right;"><b><? echo format_size(dir_size(ROOT.'crmdata/upload')); ?></b></div>
				</div>
				<hr/>
				<div class="row">
					<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8"><i class="fa fa-fw fa-cloud" aria-hidden="true"></i> Занято BackUp:</div>
					<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4" style="text-align:right;"><b><? echo format_size(dir_size(ROOT.'backups')); ?></b></div>
				</div>
			</div>
		</div>
	</div>
	<div class="col-lg-4 col-sm-6">
		<h3><?=Dict::_('TTLMODULE')?></h3>
		<div class="panel panel-default">
			<div class="panel-body">
				<table class="table table-hover" style="margin-bottom: 0px;">
					<thead> 
						<tr> 
							<th width="30%"><?=Dict::_('TXTMODULE')?></th>
							<th width="45%" style="text-align:center!important;"><?=Dict::_('TXTEDIT')?></th>
							<th width="25%" style="text-align:center!important;"><?=Dict::_('TXTSTATUS')?></th> 
						</tr> 
					</thead> 
					<tbody>
						<tr>
							<td><?=Dict::_('USERS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileU)) { echo date ("Y-m-d", filemtime($fileU)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileU)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('TASKS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileT)) { echo date ("Y-m-d", filemtime($fileT)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileT)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('CLIENTS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileC)) { echo date ("Y-m-d", filemtime($fileC)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileC)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('REQUESTS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileR)) { echo date ("Y-m-d", filemtime($fileR)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileR)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('DEALS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileD)) { echo date ("Y-m-d", filemtime($fileD)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileD)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('PAYMENTS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileD)) { echo date ("Y-m-d", filemtime($fileD)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileD)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('NOTES')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileN)) { echo date ("Y-m-d", filemtime($fileN)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileN)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('LETTERS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileLT)) { echo date ("Y-m-d", filemtime($fileLT)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileLT)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('EVENTS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileE)) { echo date ("Y-m-d", filemtime($fileE)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileE)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('VACATIONS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileU)) { echo date ("Y-m-d", filemtime($fileU)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileU)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('CHAT')?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileQ)) { echo date ("Y-m-d", filemtime($fileQ)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($fileQ)) { ?><span class="clr_green" title="<?=Dict::_('OKMODULE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NOMODULE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
	<div class="col-lg-4 col-sm-6">
		<h3><?=Dict::_('TTLSTATUSBASE')?></h3>
		<div class="panel panel-default">
			<div class="panel-body">
				<table class="table table-hover" style="margin-bottom: 0px;">
					<thead> 
						<tr> 
							<th width="30%"><?=Dict::_('TXTDATABASE')?></th>
							<th width="45%" style="text-align:center!important;"><?=Dict::_('TXTSIZE')?></th>
							<th width="25%" style="text-align:center!important;"><?=Dict::_('TXTSTATUS')?></th> 
						</tr> 
					</thead> 
					<tbody>
						<tr>
							<td><?=Dict::_('USERS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseU)) { echo format_size(filesize($baseU)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseU)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('TASKS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseT)) { echo format_size(filesize($baseT)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseT)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('CLIENTS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseC)) { echo format_size(filesize($baseC)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseC)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('REQUESTS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseR)) { echo format_size(filesize($baseR)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseR)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>

						<tr>
							<td><?=Dict::_('DEALS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseD)) { echo format_size(filesize($baseD)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseD)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('PAYMENTS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseP)) { echo format_size(filesize($baseP)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseP)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('NOTES')?></td>
							<td style="text-align:center!important;"><? echo format_size(dir_size('../crmdata/database/notebooks/')); ?></td>
							<td style="text-align:center!important;"><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span></td>
						</tr>
						<tr>
							<td><?=Dict::_('LETTERS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseLT)) { echo format_size(filesize($baseLT)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseLT)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('EVENTS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseE)) { echo format_size(filesize($baseE)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseE)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('VACATIONS')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseV)) { echo format_size(filesize($baseV)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseV)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
						<tr>
							<td><?=Dict::_('CHAT')?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseQ)) { echo format_size(filesize($baseQ)); } ?></td>
							<td style="text-align:center!important;"><? if (file_exists($baseQ)) { ?><span class="clr_green" title="<?=Dict::_('OKDATABASE')?>"><i class="fa fa-fw fa-check-circle" aria-hidden="true"></i> ОК</span><? } else { ?><span class="clr_red" title="<?=Dict::_('NODATABASE')?>"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> NO</span><? } ?></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>