diff options
author | Jonas Kohl | 2024-09-06 13:19:19 +0200 |
---|---|---|
committer | Jonas Kohl | 2024-09-06 13:19:19 +0200 |
commit | 2d8a37e7ac46aa100f2e460b024d21bae2883f5b (patch) | |
tree | f845d1f13c9fa6487b07bcb0d908ffa13463cdf8 /includes | |
parent | 4da448fe73005e3f3a57671575f99555793adb06 (diff) |
Move from SSI to PHP
Diffstat (limited to 'includes')
-rw-r--r-- | includes/.htaccess | 2 | ||||
-rw-r--r-- | includes/template_end.php (renamed from includes/template_end.html) | 0 | ||||
-rw-r--r-- | includes/template_head_end.html | 18 | ||||
-rw-r--r-- | includes/template_head_end.php | 10 | ||||
-rw-r--r-- | includes/template_head_start.html | 14 | ||||
-rw-r--r-- | includes/template_head_start.php | 20 | ||||
-rw-r--r-- | includes/template_start.html | 2 | ||||
-rw-r--r-- | includes/template_start.php | 3 |
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"; |