Small update. :)
[iDB.git] / inc / xhtml10.php
blob0d3f9c9b30f64305006f3e98269f41f472b6315e
1 <?php
2 /*
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-2011 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: xhtml10.php - Last Update: 04/05/2011 SVN 628 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="xhtml10.php"||$File3Name=="/xhtml10.php") {
18 require('index.php');
19 exit(); }
20 // Check to see if we serv the file as html or xhtml
21 // if we do xhtml we also check to see if user's browser
22 // can dispay if or else fallback to html
23 if($Settings['output_type']=="html") {
24 $ccstart = "//<!--"; $ccend = "//-->";
25 header("Content-Type: text/html; charset=".$Settings['charset']); }
26 if($Settings['output_type']=="xhtml") {
27 if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
28 $ccstart = "//<![CDATA["; $ccend = "//]]>";
29 header("Content-Type: application/xhtml+xml; charset=".$Settings['charset']);
30 xml_doc_start("1.0",$Settings['charset']); }
31 else { if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
32 $ccstart = "//<![CDATA["; $ccend = "//]]>";
33 header("Content-Type: application/xhtml+xml; charset=".$Settings['charset']);
34 xml_doc_start("1.0",$Settings['charset']);
35 } else { $ccstart = "//<!--"; $ccend = "//-->";
36 header("Content-Type: text/html; charset=".$Settings['charset']); } } }
37 if($Settings['output_type']!="xhtml") {
38 if($Settings['output_type']!="html") {
39 $ccstart = "//<!--"; $ccend = "//-->";
40 header("Content-Type: text/html; charset=".$Settings['charset']); } }
41 if($checklowview===true&&$_GET['act']=="lowview") {
42 $ThemeSet['CSSType'] = "lowview";
43 $ThemeSet['ThemeName'] = $OrgName." Low Theme";
44 $ThemeSet['ThemeMaker'] =$iDB_Author;
45 $ThemeSet['ThemeVersion'] = $VER1[0].".".$VER1[1].".".$VER1[2];
46 $ThemeSet['ThemeVersionType'] = $VER2[0];
47 $ThemeSet['ThemeSubVersion'] = $VER2[2]." ".$SubVerN;
48 $ThemeSet['MakerURL'] = $iDBHome."support/?act=lowview";
49 $ThemeSet['CopyRight'] = $ThemeSet['ThemeName']." was made by <a href=\"".$ThemeSet['MakerURL']."\" title=\"".$ThemeSet['ThemeMaker']."\">".$ThemeSet['ThemeMaker']."</a>";
50 $ThemeInfo['ThemeName'] = $ThemeSet['ThemeName'];
51 $ThemeInfo['ThemeMaker'] = $ThemeSet['ThemeMaker'];
52 $ThemeInfo['ThemeVersion'] = $ThemeSet['ThemeVersion'];
53 $ThemeInfo['ThemeVersionType'] = $ThemeSet['ThemeVersionType'];
54 $ThemeInfo['ThemeSubVersion'] = $ThemeSet['ThemeSubVersion'];
55 $ThemeInfo['MakerURL'] = $ThemeSet['MakerURL'];
56 $ThemeInfo['CopyRight'] = $ThemeSet['CopyRight']; }
57 if($ThemeSet['CSSType']!="import"&&
58 $ThemeSet['CSSType']!="link"&&
59 $ThemeSet['CSSType']!="lowview"&&
60 $ThemeSet['CSSType']!="xml"&&
61 $ThemeSet['CSSType']!="sql") {
62 $ThemeSet['CSSType'] = "import"; }
63 if($ThemeSet['CSSType']=="xhtml") {
64 xml_tag_make("xml-stylesheet","type=text/css&href=".$ThemeSet['CSS']); }
65 header("Content-Style-Type: text/css");
66 header("Content-Script-Type: text/javascript");
67 if($Settings['showverinfo']!="on") {
68 $iDBURL1 = "<a href=\"".$iDBHome."\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">"; }
69 if($Settings['showverinfo']=="on") {
70 $iDBURL1 = "<a href=\"".$iDBHome."\" title=\"".$VerInfo['iDB_Ver_Show']."\" onclick=\"window.open(this.href);return false;\">"; }
71 $GM2kURL = "<a href=\"".$iDBHome."support/category.php?act=view&amp;id=2\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";
72 $csryear = "2004"; $cryear = date("Y"); if($cryear<=2004) { $cryear = "2005"; }
73 $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>";
74 $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>";
75 $DualLicense = $BSDL." &amp; ".$GPL;
76 $extext = null;
77 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>"; }
78 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>"; }
79 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>"; }
80 $endpagevar = "<div class=\"copyright\">Powered by ".$iDBURL1.$RName."</a> &copy; ".$GM2kURL." @ ".$csryear." - ".$cryear." <br />\n".$ThemeSet['CopyRight']." | ".$extext;
81 header("Content-Language: en");
82 header("Vary: Accept-Encoding");
83 // Check if we are on a secure HTTP connection
84 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
85 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
86 // Get the board's url
87 if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
88 $BoardURL = $prehost.$_SERVER["HTTP_HOST"].$basedir; }
89 if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
90 $BoardURL = $Settings['idburl'];
91 if($Settings['qstr']!="/") {
92 $AltBoardURL = $BoardURL; }
93 if($Settings['qstr']=="/") {
94 $AltBoardURL = preg_replace("/\/$/","",$BoardURL); } }
95 // Get the html level
96 if($Settings['html_level']!="Strict") {
97 if($Settings['html_level']!="Transitional") {
98 $Settings['html_level'] = "Transitional"; } }
99 // HTML Document Starts
100 if($Settings['html_level']=="Strict") { ?>
101 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
102 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
103 <?php } if($Settings['html_level']=="Transitional") { ?>
104 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
105 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
106 <?php } if($Settings['html_level']=="Frameset") { ?>
107 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
108 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
109 <?php } // HTML meta tags and other html, head tags ?>
110 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
111 <head>
112 <meta http-equiv="Content-Language" content="en" />
113 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $Settings['charset']; ?>" />
114 <meta http-equiv="Content-Style-Type" content="text/css" />
115 <meta http-equiv="Content-Script-Type" content="text/javascript" />
116 <meta http-equiv="Cache-Control" content="private, no-cache, must-revalidate" />
117 <meta http-equiv="Pragma" content="private, no-cache, must-revalidate" />
118 <meta http-equiv="Expires" content="<?php echo gmdate("D, d M Y H:i:s")." GMT"; ?>" />
119 <?php
120 if(!isset($_SERVER['HTTP_USER_AGENT'])) {
121 $_SERVER['HTTP_USER_AGENT'] = ""; }
122 if(strpos($_SERVER['HTTP_USER_AGENT'], "msie") &&
123 !strpos($_SERVER['HTTP_USER_AGENT'], "opera")){ ?>
124 <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
125 <?php } if(strpos($_SERVER['HTTP_USER_AGENT'], "chromeframe")) { ?>
126 <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
127 <?php } ?>
128 <base href="<?php echo $BoardURL; ?>" />
129 <?php if($Settings['showverinfo']=="on") { ?>
130 <meta name="Generator" content="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
131 <?php } if($Settings['showverinfo']!="on") { ?>
132 <meta name="Generator" content="<?php echo $iDB; ?>" />
133 <?php } echo "\n"; ?>
134 <meta name="Author" content="<?php echo $SettInfo['Author']; ?>" />
135 <meta name="Keywords" content="<?php echo $SettInfo['Keywords']; ?>" />
136 <meta name="Description" content="<?php echo $SettInfo['Description']; ?>" />
137 <meta name="ROBOTS" content="Index, FOLLOW" />
138 <meta name="revisit-after" content="1 days" />
139 <meta name="GOOGLEBOT" content="Index, FOLLOW" />
140 <meta name="resource-type" content="document" />
141 <meta name="distribution" content="global" />
142 <?php if($Settings['showverinfo']=="on") { ?>
143 <!-- generator="<?php echo $VerInfo['iDB_Ver_Show']; ?>" -->
144 <?php } if($Settings['showverinfo']!="on") { ?>
145 <!-- generator="<?php echo $iDB; ?>" -->
146 <?php } echo "\n"; ?>
148 <script type="text/javascript" src="<?php echo url_maker($exfilejs['javascript'],$Settings['js_ext'],null,$Settings['qstr'],$Settings['qsep'],$prexqstrjs['javascript'],$exqstrjs['javascript']); ?>"></script>
149 <link rel="Start" href="<?php echo $AltBoardURL.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" title="<?php echo $Settings['board_name'].$idbpowertitle; ?>" />
150 <link rel="Copyright" href="<?php echo $AltBoardURL.url_maker($exfile['index'],$Settings['file_ext'],"act=bsd",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" title="Copyright Notice" />
151 <?php if($Settings['showverinfo']=="on") { ?>
152 <link rel="Generator" href="<?php echo $iDBHome; ?>" title="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
153 <?php } if($Settings['showverinfo']!="on") { ?>
154 <link rel="Generator" href="<?php echo $iDBHome; ?>" title="<?php echo $iDB; ?>" />
155 <?php } echo "\n"; ?>
156 <!-- ^_^ Stephanie Braun -->
157 <?php if($ThemeSet['CSSType']=="import") { ?>
158 <style type="text/css">
159 /* Import the theme css file */
160 <?php echo "\n@import url(\"".$ThemeSet['CSS']."\");\n"; ?>
161 </style>
162 <?php } if($ThemeSet['CSSType']=="sql") { ?>
163 <style type="text/css">
164 <?php echo $ThemeSet['CSS']; ?>
165 </style>
166 <?php } if($ThemeSet['CSSType']=="link") { ?>
167 <link rel="prefetch alternate stylesheet" href="<?php echo $ThemeSet['CSS']; ?>" />
168 <link rel="stylesheet" type="text/css" href="<?php echo $ThemeSet['CSS']; ?>" />
169 <?php } if($ThemeSet['CSSType']=="lowview") { ?>
170 <style type="text/css">
171 /* (Low View / Lo-Fi ) version start */
172 body {
173 background-color: #FFFFFF;
174 color: #000000;
175 font-family: Verdana, Tahoma, Arial, Trebuchet MS, Sans-Serif, Georgia, Courier, Times New Roman, Serif;
176 font-size: 16px;
177 margin: 20px;
178 padding: 0px;
180 .copyright {
181 text-align: center;
182 font-family: Sans-Serif;
183 font-size: 12px;
184 line-height: 11px;
185 color: #000000;
187 .EditReply {
188 color: #000000;
189 font-size: 9px;
191 </style>
192 <?php } if($ThemeSet['FavIcon']!=null) { ?>
193 <link rel="icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
194 <link rel="shortcut icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
195 <?php } ?>
196 <!-- Renee Sabonis ^_^ -->