<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="<?php echo X_UA_COMPATIBLE; ?>" />
<title><?php echo $this->page_title; ?></title>
<meta name="keywords" content="<?php echo $this->_meta_keywords; ?>" />
<meta name="description" content="<?php echo $this->_meta_description; ?>"  />
<base href="<?php echo get_setting('base_url');?>/<?php if (get_setting('url_rewrite_enable') != 'Y') { ?><?php echo GET_INDEX_SCRIPT; ?><?php } ?>" />
<link rel="shortcut icon" href="<?php echo GET_STATIC_URL; ?>/css/<?php echo $this->template_name; ?>/img/favicon.png?v=<?php echo GET_VERSION_BUILD; ?>" type="image/x-icon"/>
<?php if (is_array($this->_import_css_files)) { ?>
<?php foreach ($this->_import_css_files AS $import_css) { ?>
<link href="<?php echo $import_css; ?>?v=<?php echo GET_VERSION_BUILD; ?>" rel="stylesheet" type="text/css" />
<?php } ?>
<?php } ?>

<?php if ($this->template_name != 'default') { ?>
<link href="<?php echo GET_STATIC_URL; ?>/css/<?php echo $this->template_name; ?>/<?php echo $this->template_name; ?>.css" rel="stylesheet" type="text/css" />
<?php } ?>

<?php $post_hash_var_name = strtoupper(md5(time() . $this->userinfo['salt'])); ?>
<script type="text/javascript">
	var _<?php echo $post_hash_var_name; ?>='<?php echo new_post_hash(); ?>';
	var GET_POST_HASH=_<?php echo $post_hash_var_name; ?>;
	var GET_INDEX_SCRIPT = '<?php if (get_setting('url_rewrite_enable') != 'Y') { ?><?php echo GET_INDEX_SCRIPT; ?><?php } ?>';
	var GET_SITE_NAME = '<?php echo addcslashes(get_setting('site_name'), "'"); ?>';
	var GET_BASE_URL = '<?php echo get_setting('base_url'); ?><?php if (get_setting('url_rewrite_enable') != 'Y') { ?>/<?php echo rtrim(GET_INDEX_SCRIPT, '/'); ?><?php } ?>';
	var GET_STATIC_URL = '<?php echo GET_STATIC_URL; ?>';
	var GET_UPLOAD_URL = '<?php echo get_setting('upload_url'); ?>';
	var GET_USER_ID = <?php echo $this->user_id; ?>;
	var GET_USER_NAME = '<?php echo addcslashes($this->user_info['user_name'], "'"); ?>';
	var GET_UPLOAD_ENABLE = '<?php echo get_setting('upload_enable'); ?>';
	var GET_QUICK_PUBLISH_HUMAN_VALID = '<?php if (human_valid('question_valid_hour')) { ?>1<?php } ?>';
	var GET_UNREAD_NOTIFICATION = 0;
	var GET_COOKIE_PREFIX = <?php echo intval(get_setting('unread_flush_interval')) * 1000; ?>;
</script>
<?php if (is_array($this->_import_js_files)) { ?>
<?php foreach ($this->_import_js_files AS $import_js) { ?>
<script src="<?php echo $import_js; ?>?v=<?php echo GET_VERSION_BUILD; ?>" type="text/javascript"></script>
<?php } ?>
<?php } ?>
<!--[if IE 6]>
<script src="<?php echo GET_STATIC_URL; ?>/js/isIE6.js" defer="true"></script> 
<![endif]-->
<!--[if IE 7]>
<link href="<?php echo GET_STATIC_URL; ?>/css/<?php echo $this->template_name; ?>/ie7.css" rel="stylesheet" type="text/css">
<script src="<?php echo GET_STATIC_URL; ?>/js/ie7.js" defer="true"></script> 
<![endif]-->
<script type="text/javascript">
	$(document).ready(function () {
		$.tanyacms();
	});
</script>
</head>