summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/.htaccess2
-rw-r--r--includes/template_end.php (renamed from includes/template_end.html)0
-rw-r--r--includes/template_head_end.html18
-rw-r--r--includes/template_head_end.php10
-rw-r--r--includes/template_head_start.html14
-rw-r--r--includes/template_head_start.php20
-rw-r--r--includes/template_start.html2
-rw-r--r--includes/template_start.php3
8 files changed, 34 insertions, 35 deletions
diff --git a/includes/.htaccess b/includes/.htaccess
index a13210a..b66e808 100644
--- a/includes/.htaccess
+++ b/includes/.htaccess
@@ -1 +1 @@
-#Require all denied
+Require all denied
diff --git a/includes/template_end.html b/includes/template_end.php
index 308b1d0..308b1d0 100644
--- a/includes/template_end.html
+++ b/includes/template_end.php
diff --git a/includes/template_head_end.html b/includes/template_head_end.html
deleted file mode 100644
index 1aa5f12..0000000
--- a/includes/template_head_end.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!--#if expr='-z v("BODY_BG")'-->
- <!--#set var="BODY_BG" value="BLACK"-->
-<!--#endif-->
-<!--#if expr='-z v("BODY_TX")'-->
- <!--#set var="BODY_TX" value="WHITE"-->
-<!--#endif-->
-<!--#if expr='-z v("BODY_LN")'-->
- <!--#set var="BODY_LN" value="#FFFF99"-->
-<!--#endif-->
-<!--#if expr='-z v("BODY_LV")'-->
- <!--#set var="BODY_LV" value="#FFFF99"-->
-<!--#endif-->
-<!--#if expr='-z v("BODY_LA")'-->
- <!--#set var="BODY_LA" value="#FF9999"-->
-<!--#endif-->
-
-</head>
-<body bgcolor="<!--#echo var="BODY_BG"-->" background="/images/leather.gif" text="<!--#echo var="BODY_TX"-->" link="<!--#echo var="BODY_LN"-->" vlink="<!--#echo var="BODY_LV"-->" alink="<!--#echo var="BODY_LA"-->">
diff --git a/includes/template_head_end.php b/includes/template_head_end.php
new file mode 100644
index 0000000..9eea077
--- /dev/null
+++ b/includes/template_head_end.php
@@ -0,0 +1,10 @@
+<?php
+$BODY_BG ??= "BLACK";
+$BODY_TX ??= "WHITE";
+$BODY_LN ??= "#FFFF99";
+$BODY_LV ??= "#FFFF99";
+$BODY_LA ??= "#FF9999";
+?>
+
+</head>
+<body bgcolor="<?= htmlentities($BODY_BG); ?>" background="/images/leather.gif" text="<?= htmlentities($BODY_TX); ?>" link="<?= htmlentities($BODY_LN); ?>" vlink="<?= htmlentities($BODY_LV); ?>" alink="<?= htmlentities($BODY_LA); ?>">
diff --git a/includes/template_head_start.html b/includes/template_head_start.html
deleted file mode 100644
index 41e0017..0000000
--- a/includes/template_head_start.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="imagetoolbar" content="no">
- <meta http-equiv="MSThemeCompatible" content="no">
- <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
- <title><!--#echo var="PAGE_TITLE"--> - Mystic House Fansite</title>
- <script language="JavaScript">
- <!--
- if (window.top == window.self) {
- location = "/frames.html";
- }
- // -->
- </script>
diff --git a/includes/template_head_start.php b/includes/template_head_start.php
new file mode 100644
index 0000000..150e423
--- /dev/null
+++ b/includes/template_head_start.php
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="imagetoolbar" content="no">
+ <meta http-equiv="MSThemeCompatible" content="no">
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <title><?= htmlentities($PAGE_TITLE ?? "") ?> - Mystic House Fansite</title>
+ <script language="JavaScript">
+ <!--
+ function getLocation() {
+ return "/frames.php?p=" + encodeURIComponent(location.href.split('?')[0].replace(/^.*\//, ""));
+ }
+
+ if (window.top == window.self) {
+ location = getLocation();
+ } else if ("history" in window.top && "replaceState" in window.top.history) {
+ window.top.history.replaceState(null, "", getLocation());
+ }
+ // -->
+ </script>
diff --git a/includes/template_start.html b/includes/template_start.html
deleted file mode 100644
index 63e9f81..0000000
--- a/includes/template_start.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!--#include virtual="./template_head_start.html"-->
-<!--#include virtual="./template_head_end.html"-->
diff --git a/includes/template_start.php b/includes/template_start.php
new file mode 100644
index 0000000..89e5095
--- /dev/null
+++ b/includes/template_start.php
@@ -0,0 +1,3 @@
+<?php
+include __DIR__ . "/template_head_start.php";
+include __DIR__ . "/template_head_end.php";