<?php
  /**
   * Copyright 2011 Zazavi - http://www.zazavi.com
   * Zazavi is free software released under the terms of the GNU General Public License.
   * You should have received a copy of the license.  If not, see <http://www.gnu.org/licenses/>.
   */
  define("_VALID_PHP", true);
  require_once("init.php");
  
  $modtop = $content->getModuleLayout("top");
  $modbot = $content->getModuleLayout("bottom");
  $modleft = $content->getModuleLayout("left");
  $modright = $content->getModuleLayout("right");
  $totalleft = count($modleft);
  $totalright = count($modright);
  $totaltop = count($modtop);
  $totalbot = count($modbot);
  
  $core->getVisitors(); // visitor counter
  
  if ($core->offline == 1 && isset($_SESSION['userlevel']) == 1)
      require_once(THEMEDIR . "/index.php");
  elseif ($core->offline == 1)
      require_once("maintenance.html");
  else
      require_once(THEMEDIR . "/index.php");
?>