OSDN Git Service

Added HTML5 support.
[idb/iDB.git.git] / inc / html5.php
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.
5
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.
10
11     Copyright 2004-2010 iDB Support - http://idb.berlios.de/
12     Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
13
14     $FileInfo: html5.php - Last Update: 05/15/2010 SVN 491 - Author: cooldude2k $
15 */
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="xhtml10.php"||$File3Name=="/xhtml10.php") {
18         require('index.php');
19         exit(); }
20 $ccstart = "//<!--"; $ccend = "//-->";
21 header("Content-Type: text/html; charset=".$Settings['charset']);
22 if($checklowview===true&&$_GET['act']=="lowview") { 
23    $ThemeSet['CSSType'] = "lowview"; 
24    $ThemeSet['ThemeName'] = $OrgName." Low Theme";
25    $ThemeSet['ThemeMaker'] =$iDB_Author;
26    $ThemeSet['ThemeVersion'] = $VER1[0].".".$VER1[1].".".$VER1[2];
27    $ThemeSet['ThemeVersionType'] = $VER2[0];
28    $ThemeSet['ThemeSubVersion'] = $VER2[2]." ".$SubVerN;
29    $ThemeSet['MakerURL'] = $iDBHome."support/?act=lowview";
30    $ThemeSet['CopyRight'] = $ThemeSet['ThemeName']." was made by <a href=\"".$ThemeSet['MakerURL']."\" title=\"".$ThemeSet['ThemeMaker']."\">".$ThemeSet['ThemeMaker']."</a>";
31    $ThemeInfo['ThemeName'] = $ThemeSet['ThemeName'];
32    $ThemeInfo['ThemeMaker'] = $ThemeSet['ThemeMaker'];
33    $ThemeInfo['ThemeVersion'] = $ThemeSet['ThemeVersion'];
34    $ThemeInfo['ThemeVersionType'] = $ThemeSet['ThemeVersionType'];
35    $ThemeInfo['ThemeSubVersion'] = $ThemeSet['ThemeSubVersion'];
36    $ThemeInfo['MakerURL'] = $ThemeSet['MakerURL'];
37    $ThemeInfo['CopyRight'] = $ThemeSet['CopyRight']; }
38 if($ThemeSet['CSSType']!="import"&&
39    $ThemeSet['CSSType']!="link"&&
40    $ThemeSet['CSSType']!="lowview"&&
41    $ThemeSet['CSSType']!="xml") { 
42    $ThemeSet['CSSType'] = "import"; }
43 header("Content-Style-Type: text/css");
44 header("Content-Script-Type: text/javascript");
45 if($Settings['showverinfo']!="on") {
46 $iDBURL1 = "<a href=\"".$iDBHome."\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">"; }
47 if($Settings['showverinfo']=="on") {
48 $iDBURL1 = "<a href=\"".$iDBHome."\" title=\"".$VerInfo['iDB_Ver_Show']."\" onclick=\"window.open(this.href);return false;\">"; }
49 $GM2kURL = "<a href=\"".$iDBHome."support/category.php?act=view&amp;id=2\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";
50 $csryear = "2004"; $cryear = date("Y"); if($cryear<=2004) { $cryear = "2005"; }
51 $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>";
52 $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>";
53 $DualLicense = $BSDL." &amp; ".$GPL;
54 $extext = null;
55 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>"; }
56 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>"; }
57 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>"; }
58 $endpagevar = "<div class=\"copyright\">Powered by ".$iDBURL1.$RName."</a> &copy; ".$GM2kURL." @ ".$csryear." - ".$cryear." <br />\n".$ThemeSet['CopyRight']." | ".$extext; 
59 header("Content-Language: en");
60 header("Vary: Accept-Encoding");
61 // Check if we are on a secure HTTP connection
62 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
63 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
64 // Get the board's url
65 if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
66         $BoardURL = $prehost.$_SERVER["HTTP_HOST"].$basedir; }
67 if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
68         $BoardURL = $Settings['idburl']; 
69         if($Settings['qstr']!="/") {
70         $AltBoardURL = $BoardURL; } 
71         if($Settings['qstr']=="/") { 
72         $AltBoardURL = preg_replace("/\/$/","",$BoardURL); } }
73 // Get the html level
74 if($Settings['html_level']!="Strict") {
75         if($Settings['html_level']!="Transitional") {
76                 $Settings['html_level'] = "Transitional"; } }
77 // HTML Document Starts
78 ?>
79 <!DOCTYPE html>
80 <?php // HTML meta tags and other html, head tags ?>
81 <html lang="en">
82 <head>
83 <base href="<?php echo $BoardURL; ?>" />
84 <?php if($Settings['showverinfo']=="on") { ?>
85 <meta name="Generator" content="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
86 <?php } if($Settings['showverinfo']!="on") { ?>
87 <meta name="Generator" content="<?php echo $iDB; ?>" />
88 <?php } echo "\n"; ?>
89 <meta name="Author" content="<?php echo $SettInfo['Author']; ?>" />
90 <meta name="Keywords" content="<?php echo $SettInfo['Keywords']; ?>" />
91 <meta name="Description" content="<?php echo $SettInfo['Description']; ?>" />
92 <meta name="ROBOTS" content="Index, FOLLOW" />
93 <meta name="revisit-after" content="1 days" />
94 <meta name="GOOGLEBOT" content="Index, FOLLOW" />
95 <meta name="resource-type" content="document" />
96 <meta name="distribution" content="global" />
97 <?php if($Settings['showverinfo']=="on") { ?>
98 <!-- generator="<?php echo $VerInfo['iDB_Ver_Show']; ?>" -->
99 <?php } if($Settings['showverinfo']!="on") { ?>
100 <!-- generator="<?php echo $iDB; ?>" -->
101 <?php } echo "\n"; ?>
102
103 <script type="text/javascript" src="<?php echo url_maker($exfilejs['javascript'],$Settings['js_ext'],null,$Settings['qstr'],$Settings['qsep'],$prexqstrjs['javascript'],$exqstrjs['javascript']); ?>"></script>
104 <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; ?>" />
105 <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" />
106 <?php if($Settings['showverinfo']=="on") { ?>
107 <link rel="Generator" href="<?php echo $iDBHome; ?>" title="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
108 <?php } if($Settings['showverinfo']!="on") { ?>
109 <link rel="Generator" href="<?php echo $iDBHome; ?>" title="<?php echo $iDB; ?>" />
110 <?php } echo "\n"; ?>
111 <!-- ^_^ Stephanie Braun -->
112 <?php if($ThemeSet['CSSType']=="import") { ?>
113 <style type="text/css">
114 /* Import the theme css file */
115 <?php echo "\n@import url(\"".$ThemeSet['CSS']."\");\n"; ?>
116 </style><?php } if($ThemeSet['CSSType']=="link") { ?>
117 <?php } if($ThemeSet['CSSType']=="link") { ?>
118 <link rel="prefetch alternate stylesheet" href="<?php echo $ThemeSet['CSS']; ?>" />
119 <link rel="stylesheet" type="text/css" href="<?php echo $ThemeSet['CSS']; ?>" />
120 <?php } if($ThemeSet['CSSType']=="lowview") { ?>
121 <style type="text/css">
122 /* (Low View / Lo-Fi ) version start */
123 body {
124 background-color: #FFFFFF;
125 color: #000000;
126 font-family: Verdana, Tahoma, Arial, Trebuchet MS, Sans-Serif, Georgia, Courier, Times New Roman, Serif;
127 font-size: 16px;
128 margin: 20px;
129 padding: 0px;
130 }
131 .copyright {
132 text-align: center;
133 font-family: Sans-Serif;
134 font-size: 12px;
135 line-height: 11px;
136 color: #000000;
137 }
138 .EditReply {
139 color: #000000;
140 font-size: 9px;
141 }
142 </style>
143 <?php } if($ThemeSet['FavIcon']!=null) { ?>
144 <link rel="icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
145 <link rel="shortcut icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
146 <?php } ?>
147 <!-- Renee Sabonis ^_^ -->