<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo _conf( 'WEB_SITE_SEO_TOP_WORD' ) ?><?php echo $top_title ?> - <?php echo _conf( 'WEB_SITE_NAME' ) ?></title>
<meta name="keywords" content="<?php echo _conf( 'WEB_SITE_SEO_META_KEYWORD' ) ?>">
<meta name="description" content="<?php echo _conf( 'WEB_SITE_SEO_META_DESCRIP' ) ?>">
<?php echo _conf('WEB_SITE_SEO_HEADER_CODE'); ?>
<link href="res/css/douya.css" rel="stylesheet" type="text/css">
<script src="res/js/prototype.js"></script>
<script src="res/js/scriptaculous.js"></script>
</head>

<body>

<?php  
	include_once( ROOT . 'res/tpl/header.tpl.html' );
	if( is_admin() ):
	?>
	<div id="rikibar" class="AdminDiv" >
	<form action="" style="margin:0px"><a href="?a=riki_modify&tag=<?php echo urlencode( $_REQUEST['tag'] ) ?>"><font class="m">修改本页面</font></a> 或者 <font class="m">创建一个新的页面</font> tag : 	<input type="text" name="tag" >
	<INPUT TYPE="hidden" name="a" value="riki_modify">
	<INPUT TYPE="submit" value="创建新的页面" class="dbutton"></form></div>
	<script type="text/javascript" language="javascript">
	new Draggable('rikibar',{revert:true});
	</script>	
	<?php
	endif; ?>
	<?php if( is_array( $pages ) ): ?>
	<div class="NavDiv" id="navbar">最近看过的页面:
	<?php foreach( $pages as $page ): ?>
	<a href="?a=riki&tag=<?php echo urlencode( $page ) ?>"><?php echo $page ?></a>&nbsp;&nbsp;&nbsp;
	<?php endforeach; ?>
	</div>
	<script type="text/javascript" language="javascript">
	new Draggable('navbar',{revert:true});
	</script>
	<?php  endif; ?>
	<?php

	echo $content;
	include_once( ROOT . 'res/tpl/footer.tpl.html' );
?>

</body>

</html>