<html>
<head>
<title><?php echo $title; ?></title>
<style type="text/css">
    @import 'common.css';
    @import 'style.css';
    @import 'ext.css';
</style>
<?php
global $pripre_ebook_font;
global $pripre_ebook_margin;

if (!empty($pripre_ebook_font) || !empty($pripre_ebook_margin)) {
?>
<style type="text/css">
  <?php if (!empty($pripre_ebook_margin)) { ?>
@page {
  margin:
  <?php
    switch($pripre_ebook_margin) {
    	case 'e':
    		echo '0';
    		break;
    	case 2:
    		echo '8mm';
    		break;
    }
  ?>;
  }
  <?php } ?>
  
  <?php if (!empty($pripre_ebook_font)) { ?>
body {
  font-size:
  <?php
    switch($pripre_ebook_font) {
    	case -2:
    		echo 'x-small';
    		break;
    	case -1:
    		echo 'small';
    		break;
    	case 1:
    		echo 'large';
    		break;
    	case 2:
    		echo 'x-large';
    		break;
    }
  ?>;
  }
  <?php } ?>
  </style>
<?php } ?>
</head>
<body>
    <?php include($contents_template); ?>
</body>
</html>