3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2015 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: html5.php - Last Update: 08/18/2015 SVN 798 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="xhtml10.php"||$File3Name=="/xhtml10.php") {
21 // Check to see if we serv the file as html or xhtml
22 // if we do xhtml we also check to see if user's browser
23 // can dispay if or else fallback to html
24 if($Settings['output_type']=="html") {
25 $ccstart = "//<!--"; $ccend = "//-->"; $XHTML5 = false;
26 header("Content-Type: text/html; charset=".$Settings['charset']); }
27 if($Settings['output_type']=="xhtml") {
28 if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
29 $ccstart = "//<![CDATA["; $ccend = "//]]>"; $XHTML5 = true;
30 header("Content-Type: application/xhtml+xml; charset=".$Settings['charset']); }
31 else { if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
32 $ccstart = "//<![CDATA["; $ccend = "//]]>"; $XHTML5 = true;
33 header("Content-Type: application/xhtml+xml; charset=".$Settings['charset']);
34 } else { $ccstart = "//<!--"; $ccend = "//-->"; $XHTML5 = false;
35 header("Content-Type: text/html; charset=".$Settings['charset']); } } }
36 if($Settings['output_type']!="xhtml") {
37 if($Settings['output_type']!="html") {
38 $ccstart = "//<!--"; $ccend = "//-->"; $XHTML5 = false;
39 header("Content-Type: text/html; charset=".$Settings['charset']); } }
40 if($checklowview===true&&$_GET['act']=="lowview") {
41 $ThemeSet['CSSType'] = "lowview";
42 $ThemeSet['ThemeName'] = $OrgName." Low Theme";
43 $ThemeSet['ThemeMaker'] =$iDB_Author;
44 $ThemeSet['ThemeVersion'] = $VER1[0].".".$VER1[1].".".$VER1[2];
45 $ThemeSet['ThemeVersionType'] = $VER2[0];
46 $ThemeSet['ThemeSubVersion'] = $VER2[2]." ".$SubVerN;
47 $ThemeSet['MakerURL'] = $iDBHome."support/?act=lowview";
48 $ThemeSet['CopyRight'] = $ThemeSet['ThemeName']." was made by <a href=\"".$ThemeSet['MakerURL']."\" title=\"".$ThemeSet['ThemeMaker']."\">".$ThemeSet['ThemeMaker']."</a>";
49 $ThemeInfo['ThemeName'] = $ThemeSet['ThemeName'];
50 $ThemeInfo['ThemeMaker'] = $ThemeSet['ThemeMaker'];
51 $ThemeInfo['ThemeVersion'] = $ThemeSet['ThemeVersion'];
52 $ThemeInfo['ThemeVersionType'] = $ThemeSet['ThemeVersionType'];
53 $ThemeInfo['ThemeSubVersion'] = $ThemeSet['ThemeSubVersion'];
54 $ThemeInfo['MakerURL'] = $ThemeSet['MakerURL'];
55 $ThemeInfo['CopyRight'] = $ThemeSet['CopyRight']; }
56 if($ThemeSet['CSSType']!="import"&&
57 $ThemeSet['CSSType']!="link"&&
58 $ThemeSet['CSSType']!="lowview"&&
59 $ThemeSet['CSSType']!="xml"&&
60 $ThemeSet['CSSType']!="sql") {
61 $ThemeSet['CSSType'] = "import"; }
62 header("Content-Style-Type: text/css");
63 header("Content-Script-Type: text/javascript");
64 if($Settings['showverinfo']!="on") {
65 $iDBURL1 = "<a href=\"".$iDBHome."\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">"; }
66 if($Settings['showverinfo']=="on") {
67 $iDBURL1 = "<a href=\"".$iDBHome."\" title=\"".$VerInfo['iDB_Ver_Show']."\" onclick=\"window.open(this.href);return false;\">"; }
68 $GM2kURL = "<a href=\"".$GM2kHome."\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";
69 $csryear = "2004"; $cryear = date("Y"); if($cryear<=2004) { $cryear = "2005"; }
70 $BSDL = "<a href=\"".url_maker($exfile['index'],$Settings['file_ext'],"act=bsd",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'])."\" title=\"".$RName." is dual-licensed under the Revised BSD License\">BSDL</a>";
71 $GPL = "<a href=\"".url_maker($exfile['index'],$Settings['file_ext'],"act=bsd",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'])."\" title=\"".$RName." is dual-licensed under the Gnu General Public License\">GPL</a>";
72 $DualLicense = $BSDL." & ".$GPL;
74 if($checklowview!==true) { $extext = "<a href=\"".url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'])."\">Low-Version</a>"; }
75 if($checklowview===true&&$_GET['act']!="lowview") { $extext = "<a href=\"".url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'])."\">Low-Version</a>"; }
76 if($checklowview===true&&$_GET['act']=="lowview") { $extext = "<a href=\"".url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'])."\">High-Version</a>"; }
77 $endpagevar = "<div class=\"copyright\">Powered by ".$iDBURL1.$RName."</a> © ".$GM2kURL." @ ".$csryear." - ".$cryear." <br />\n".$ThemeSet['CopyRight']." | ".$extext;
78 header("Content-Language: en");
79 header("Vary: Accept-Encoding");
80 // Check if we are on a secure HTTP connection
81 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
82 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
83 // Get the board's url
84 if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
85 $BoardURL = $prehost.$_SERVER["HTTP_HOST"].$basedir; }
86 if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
87 $BoardURL = $Settings['idburl'];
88 if($Settings['qstr']!="/") {
89 $AltBoardURL = $BoardURL; }
90 if($Settings['qstr']=="/") {
91 $AltBoardURL = preg_replace("/\/$/","",$BoardURL); } }
93 if($Settings['html_level']!="Strict") {
94 if($Settings['html_level']!="Transitional") {
95 $Settings['html_level'] = "Transitional"; } }
96 // HTML Document Starts
97 ob_start("idb_suboutput_handler");
101 <?php // HTML meta tags and other html, head tags ?>
103 <?php } if($XHTML5===true) { ?>
105 <!ENTITY nbsp " ">
106 <!ENTITY copy "©">
107 <!ENTITY reg "®">
108 <!ENTITY Aacute "Á">
109 <!ENTITY aacute "á">
110 <!ENTITY Agrave "à">
111 <!ENTITY agrave "À">
112 <!ENTITY Acirc "Â">
113 <!ENTITY acirc "â">
114 <!ENTITY Auml "Ä">
115 <!ENTITY auml "ä">
116 <!ENTITY Atilde "Ã">
117 <!ENTITY atilde "ã">
118 <!ENTITY Aring "Å">
119 <!ENTITY aring "å">
120 <!ENTITY Aelig "Æ">
121 <!ENTITY aelig "æ">
122 <!ENTITY Ccedil "Ç">
123 <!ENTITY ccedil "ç">
124 <!ENTITY Eth "Ð">
125 <!ENTITY eth "ð">
126 <!ENTITY Eacute "É">
127 <!ENTITY eacute "é">
128 <!ENTITY Egrave "È">
129 <!ENTITY egrave "è">
130 <!ENTITY Ecirc "Ê">
131 <!ENTITY ecirc "ê">
132 <!ENTITY Euml "Ë">
133 <!ENTITY euml "ë">
134 <!ENTITY Iacute "Í">
135 <!ENTITY iacute "í">
136 <!ENTITY Igrave "Ì">
137 <!ENTITY igrave "ì">
138 <!ENTITY Icirc "Î">
139 <!ENTITY icirc "î">
140 <!ENTITY Iuml "Ï">
141 <!ENTITY iuml "ï">
142 <!ENTITY Ntilde "Ñ">
143 <!ENTITY ntilde "ñ">
144 <!ENTITY Oacute "Ó">
145 <!ENTITY oacute "ó">
146 <!ENTITY Ograve "Ò">
147 <!ENTITY ograve "ò">
148 <!ENTITY Ocirc "Ô">
149 <!ENTITY ocirc "ô">
150 <!ENTITY Ouml "Ö">
151 <!ENTITY ouml "ö">
152 <!ENTITY Otilde "Õ">
153 <!ENTITY otilde "õ">
154 <!ENTITY Oslash "Ø">
155 <!ENTITY oslash "ø">
156 <!ENTITY szlig "ß">
157 <!ENTITY Thorn "Þ">
158 <!ENTITY thorn "þ">
159 <!ENTITY Uacute "Ú">
160 <!ENTITY uacute "ú">
161 <!ENTITY Ugrave "Ù">
162 <!ENTITY ugrave "ù">
163 <!ENTITY Ucirc "Û">
164 <!ENTITY ucirc "û">
165 <!ENTITY Uuml "Ü">
166 <!ENTITY uuml "ü">
167 <!ENTITY Yacute "Ý">
168 <!ENTITY yacute "ý">
169 <!ENTITY yuml "ÿ">
171 <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
174 <?php $iWrappers['HTMLSTART'] = ob_get_clean();
175 ob_start("idb_suboutput_handler");
176 if($XHTML5===false) { ?>
177 <meta charset="<?php echo $Settings['charset']; ?>">
178 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $Settings['charset']; ?>">
180 if(!isset($_SERVER['HTTP_USER_AGENT'])) {
181 $_SERVER['HTTP_USER_AGENT'] = ""; }
182 if(strpos($_SERVER['HTTP_USER_AGENT'], "msie") &&
183 !strpos($_SERVER['HTTP_USER_AGENT'], "opera")){ ?>
184 <meta http-equiv="X-UA-Compatible" content="IE=Edge">
185 <?php } if(strpos($_SERVER['HTTP_USER_AGENT'], "chromeframe")) { ?>
186 <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
187 <?php } } if($XHTML5===true) { ?>
188 <meta charset="<?php echo $Settings['charset']; ?>" />
189 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $Settings['charset']; ?>" />
191 if(!isset($_SERVER['HTTP_USER_AGENT'])) {
192 $_SERVER['HTTP_USER_AGENT'] = ""; }
193 if(strpos($_SERVER['HTTP_USER_AGENT'], "msie") &&
194 !strpos($_SERVER['HTTP_USER_AGENT'], "opera")){ ?>
195 <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
196 <?php } if(strpos($_SERVER['HTTP_USER_AGENT'], "chromeframe")) { ?>
197 <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
198 <?php } } $iWrappers['HTTPEQUIV'] = ob_get_clean();
199 ob_start("idb_suboutput_handler"); ?>
200 <base href="<?php echo $BoardURL; ?>" />
201 <?php if($Settings['showverinfo']=="on") { ?>
202 <meta name="Generator" content="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
203 <?php } if($Settings['showverinfo']!="on") { ?>
204 <meta name="Generator" content="<?php echo $iDB; ?>" />
205 <?php } echo "\n"; ?>
206 <meta name="Author" content="<?php echo $SettInfo['Author']; ?>" />
207 <meta name="Keywords" content="<?php echo $SettInfo['Keywords']; ?>" />
208 <meta name="Description" content="<?php echo $SettInfo['Description']; ?>" />
209 <meta name="ROBOTS" content="Index, FOLLOW" />
210 <meta name="GOOGLEBOT" content="Index, FOLLOW" />
211 <?php if($Settings['showverinfo']=="on") { ?>
212 <!-- generator="<?php echo $VerInfo['iDB_Ver_Show']; ?>" -->
213 <?php } if($Settings['showverinfo']!="on") { ?>
214 <!-- generator="<?php echo $iDB; ?>" -->
215 <?php } echo "\n"; $iWrappers['METATAGS'] = ob_get_clean();
216 ob_start("idb_suboutput_handler"); ?>
218 <script type="text/javascript" src="<?php echo url_maker($exfilejs['javascript'],$Settings['js_ext'],null,$Settings['qstr'],$Settings['qsep'],$prexqstrjs['javascript'],$exqstrjs['javascript']); ?>"></script>
220 if($ThemeSet['CSSType']=="import") { ?>
221 <style type="text/css">
222 /* Import the theme css file */
223 <?php echo "\n@import url(\"".$ThemeSet['CSS']."\");\n"; ?>
225 <?php } if($ThemeSet['CSSType']=="sql") { ?>
226 <style type="text/css">
227 <?php echo $ThemeSet['CSS']; ?>
229 <?php } if($ThemeSet['CSSType']=="link") { ?>
230 <link rel="prefetch alternate stylesheet" href="<?php echo $ThemeSet['CSS']; ?>" />
231 <link rel="stylesheet" type="text/css" href="<?php echo $ThemeSet['CSS']; ?>" />
232 <?php } if($ThemeSet['CSSType']=="lowview") { ?>
233 <style type="text/css">
234 /* (Low View / Lo-Fi ) version start */
236 background-color: #FFFFFF;
238 font-family: Verdana, Tahoma, Arial, Trebuchet MS, Sans-Serif, Georgia, Courier, Times New Roman, Serif;
245 font-family: Sans-Serif;
255 <?php } $iWrappers['CSSTHEME'] = ob_get_clean();
256 ob_start("idb_suboutput_handler");
257 if($ThemeSet['FavIcon']!=null) { ?>
258 <link rel="icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
259 <link rel="shortcut icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
261 $iWrappers['FAVICON'] = ob_get_clean(); ?>