LoliPHP/public/index.php

39 行
1.7 KiB
PHP

<?php
if (session_status() == 1) session_start();
require_once("../src/config.php");
require_once("../helper.php");
$path = $_SERVER["REQUEST_URI"] == "/" ? "/home" : $_SERVER["REQUEST_URI"];
$path = explode("?", $path)[0];
if (!file_exists("../src".$path."/index.php")) $path = "/404";
require_once("../src".$path."/index.php");
?>
<?php if (HTML_VER == "HTML5") { ?>
<!DOCTYPE html>
<html lang="ja">
<?php } else { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd" lang="ja" xml:lang="ja">
<?php } ?>
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<meta name="title" content="<?= $sitename.": ".$title ?>" />
<meta name="description" content="<?= $sitedesc ?>" />
<?php if (CAN_MOBILE) { ?><meta name="viewport" content="width=device-width, initial-scale=1.0" /><?php }?>
<?php if (HTML_VER == "HTML5") { ?>
<meta property="og:title" content="<?= $sitename ?>" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="ja_JP" />
<meta property="og:site_name" content="<?= $sitename.": ".$title ?>" />
<meta property="og:url" content="<?= $siteurl ?>" />
<meta property="og:image" content="./static/<?= $thumbnail ?>" />
<?php } ?>
<title><?= $sitename.": ".$title ?></title>
<link rel="stylesheet" type="text/css" href="./static/style.css" />
<?php if (isset($css)) { ?><link rel="stylesheet" type="text/css" href="./static/<?= $css ?>.css" /> <?php } ?>
</head>
<body>
<?php include_once($childview); ?>
</body>
</html>