<!-- BEGIN: MAIN -->
<!-- IF {ADMIN_TITLE} OR {ADMIN_SUBTITLE}  -->
<div id="main_title">
  <h1>{ADMIN_TITLE}<!-- IF {ADMIN_SUBTITLE}  --> <small>{ADMIN_SUBTITLE}</small><!-- ENDIF --></h1>
  <ul id="breadcrumbs" class="breadcrumb">
    {ADMIN_BREADCRUMBS}
  </ul>
</div>
<!-- ENDIF -->
<div id="page-wrapper">
{FILE "{PHP.cfg.themes_dir}/admin/{PHP.cfg.admintheme}/warnings.tpl"}

{ADMIN_MAIN}

  <!-- BEGIN: EHOME --> 
  <!-- BEGIN: UPDATE -->
  <div class="block">
    <h3>{PHP.L.adminqv_update_notice}:</h3>
    <p>{ADMIN_HOME_UPDATE_REVISION} {ADMIN_HOME_UPDATE_MESSAGE}</p>
  </div>
  <!-- END: UPDATE -->
  
  <div class="row">
    <div class="col-lg-7 col-md-7">
      <div class="block">
        <ul class="nav nav-tabs">
          <li role="presentation" class="active"><a href="#tab1" aria-controls="tab1" role="tab" data-toggle="tab"><span class="glyphicon glyphicon-stats" aria-hidden="true"></span> {PHP.L.EA_stats}</a></li>
          <li role="presentation"><a href="#tab2" aria-controls="tab2" role="tab" data-toggle="tab"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> {PHP.L.EA_sysinfo}</a></li>
        </ul>
        <div class="tab-content box" style="border-top: 0;">
          <div role="tabpanel" class="tab-pane fade in active" id="tab1">
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">Режим работы сайта:</div>
              <div class="col-lg-8 col-md-5 col-xs-4"><!-- IF {PHP.cfg.maintenance} == 0 --><span class="green">{PHP.L.Enabled}</span><!-- ELSE --><span class="red">{PHP.L.EA_pjdes}</span><!-- ENDIF --></div>
            </div>
            <!-- IF {PHP|cot_module_active('projects')} -->
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">Опубликованых <strong>заявок</strong>:</div>
              <div class="col-lg-8 col-md-5 col-xs-4"><a href="{PHP|cot_url('admin', 'm=projects&state=0')}">{PHP|ea_item_count('projects', 0)}</a></div>
            </div>
            <!-- ENDIF --> 
            <!-- IF {PHP|cot_module_active('market')} -->
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">Опубликованых <strong>услуг</strong>:</div>
              <div class="col-lg-8 col-md-5 col-xs-4"><a href="{PHP|cot_url('admin', 'm=market&state=0')}">{PHP|ea_item_count('market', 0)}</a></div>
            </div>
            <!-- ENDIF --> 
            <!-- IF {PHP|cot_module_active('folio')} -->
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">Опубликованых <strong>портфолио</strong>:</div>
              <div class="col-lg-8 col-md-5 col-xs-4"><a href="{PHP|cot_url('admin', 'm=folio&state=0')}">{PHP|ea_item_count('folio', 0)}</a></div>
            </div>
            <!-- ENDIF -->
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7">Зарегистрировано пользователей:</div>
              <div class="col-lg-8 col-md-5 small">{PHP.cot_groups.4.name}: <span class="label label-default">{PHP|ea_users_count(4)}</span> &nbsp;&nbsp; {PHP.cot_groups.7.name}: <span class="label label-default">{PHP|ea_users_count(7)}</span> &nbsp;&nbsp; {PHP.cot_groups.3.name}: <span class="label label-danger">{PHP|ea_users_count(3)}</span></div>
            </div>
            <div class="row row-box row-col">
              <div class="col-md-12">
                <button id="clear_cache" class="btn btn-sm btn-primary" name="clear_cache" title="{PHP.L.EA_purge}"><i class="fa fa-trash-o"></i> {PHP.L.EA_purge_cache}</button>
                <button id="clear_cache_d" class="btn btn-sm btn-danger" name="clear_cache_d" title="{PHP.L.EA_purge}"><i class="fa fa-trash-o"></i> {PHP.L.EA_purge_cache_d}</button>
              </div>
            </div>
          </div>
          <div role="tabpanel" class="tab-pane fade" id="tab2">
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">{PHP.L.Version}:</div>
              <div class="col-lg-8 col-md-5 col-xs-4">{ADMIN_HOME_VERSION}</div>
            </div>
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">{PHP.L.Database}:</div>
              <div class="col-lg-8 col-md-5 col-xs-4">{ADMIN_HOME_DB_VERSION}</div>
            </div>
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">{PHP.L.home_db_rows}:</div>
              <div class="col-lg-8 col-md-5 col-xs-4">{ADMIN_HOME_DB_TOTAL_ROWS}</div>
            </div>
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">{PHP.L.home_db_indexsize}:</div>
              <div class="col-lg-8 col-md-5 col-xs-4">{ADMIN_HOME_DB_INDEXSIZE}</div>
            </div>
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">{PHP.L.home_db_datassize}:</div>
              <div class="col-lg-8 col-md-5 col-xs-4">{ADMIN_HOME_DB_DATASSIZE}</div>
            </div>
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">{PHP.L.home_db_totalsize}:</div>
              <div class="col-lg-8 col-md-5 col-xs-4">{ADMIN_HOME_DB_TOTALSIZE}</div>
            </div>
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">{PHP.L.Plugins}:</div>
              <div class="col-lg-8 col-md-5 col-xs-4">{ADMIN_HOME_TOTALPLUGINS}</div>
            </div>
            <div class="row row-box row-col">
              <div class="col-lg-4 col-md-7 col-xs-8">{PHP.L.Hooks}:</div>
              <div class="col-lg-8 col-md-5 col-xs-4">{ADMIN_HOME_TOTALHOOKS}</div>
            </div>
          </div>
        </div>
      </div>
      <div class="row for_eadmin_home_replace_left">
        <!-- BEGIN: MAINPANEL -->
        <div class="col-lg-6 col-md-12">{ADMIN_HOME_MAINPANEL}</div>
        <!-- END: MAINPANEL --> 
      </div>
    </div>
    <div class="col-lg-5 col-md-5">
      <div class="row"> 
        <!-- BEGIN: SIDEPANEL -->
        <div class="col-lg-6 col-md-12">
          <div class="box boxh3">{ADMIN_HOME_SIDEPANEL}</div>
        </div>
        <!-- END: SIDEPANEL --> 
      </div>
    </div>
  </div>

  <script>
$('.eadmin_home_replace_left').each(function() {
  $('.for_eadmin_home_replace_left').prepend('<div class="col-lg-6 col-md-12"><div class="box h_blc">' + $(this).attr('class', 'h_title').parent().hide().html() + '</div></div>');
});

$('#clear_cache').click( function() {
	$.ajax({
	  url: "{PHP.sys.xk|cot_url('admin', 'm=cache&a=purge&x='$this, '' true)}",
	  success: function(data) {
		  $.growl.notice({ title: "{PHP.L.EA_notice}:", message: "{PHP.L.EA_purge_cache_done}" });
	  },
	  error: function(data) {
		  $.growl.error({ title: "{PHP.L.EA_error}:", message: "{PHP.L.EA_purge_cache_error}" });
	  }
	});
});
$('#clear_cache_d').click( function() {
	$.ajax({
	  url: "{PHP.sys.xk|cot_url('admin', 'm=cache&s=disk&a=purge&x='$this, '' true)}",
	  success: function(data) {
		  $.growl.notice({ title: "{PHP.L.EA_notice}:", message: "{PHP.L.EA_purge_cache_d_done}" });
	  },
	  error: function(data) {
		  $.growl.error({ title: "{PHP.L.EA_error}:", message: "{PHP.L.EA_purge_cache_error}" });
	  }
	});
});
</script> 
  <!-- END: EHOME --> 
</div>
<!-- END: MAIN -->