<?php

	if(!file_exists(dirname(__FILE__).'/data/dircms.lock'))
	{
		header('location:install/index.php');
		exit();
	}
	include dirname(__FILE__).'/include/common.inc.php';

	if(!ISHTML || !file_exists(DIRCMS_ROOT.'index'.HTMLEXT) || isset($_GET['nocache']))
	{
		$head['title'] = $DIRCMS['site_name'].'-'.$DIRCMS['meta_title'];
		$head['keywords'] = $DIRCMS['meta_keywords'];
		$head['description'] = $DIRCMS['meta_description'];
		$dir_url=$DIRCMS['site_url'];
		include template('index');
	}
	else
	{
		header( "HTTP/1.1 301 Moved Permanently" );
		header('location:index'.HTMLEXT);
	}
	exit();
?>