OSDN Git Service

Small update to HTML5.
[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: 09/21/2010 SVN 553 - 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']!="sql") { 
43    $ThemeSet['CSSType'] = "import"; }
44 header("Content-Style-Type: text/css");
45 header("Content-Script-Type: text/javascript");
46 if($Settings['showverinfo']!="on") {
47 $iDBURL1 = "<a href=\"".$iDBHome."\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">"; }
48 if($Settings['showverinfo']=="on") {
49 $iDBURL1 = "<a href=\"".$iDBHome."\" title=\"".$VerInfo['iDB_Ver_Show']."\" onclick=\"window.open(this.href);return false;\">"; }
50 $GM2kURL = "<a href=\"".$iDBHome."support/category.php?act=view&amp;id=2\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";
51 $csryear = "2004"; $cryear = date("Y"); if($cryear<=2004) { $cryear = "2005"; }
52 $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>";
53 $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>";
54 $DualLicense = $BSDL." &amp; ".$GPL;
55 $extext = null;
56 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>"; }
57 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>"; }
58 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>"; }
59 $endpagevar = "<div class=\"copyright\">Powered by ".$iDBURL1.$RName."</a> &copy; ".$GM2kURL." @ ".$csryear." - ".$cryear." <br />\n".$ThemeSet['CopyRight']." | ".$extext; 
60 header("Content-Language: en");
61 header("Vary: Accept-Encoding");
62 // Check if we are on a secure HTTP connection
63 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
64 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
65 // Get the board's url
66 if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
67         $BoardURL = $prehost.$_SERVER["HTTP_HOST"].$basedir; }
68 if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
69         $BoardURL = $Settings['idburl']; 
70         if($Settings['qstr']!="/") {
71         $AltBoardURL = $BoardURL; } 
72         if($Settings['qstr']=="/") { 
73         $AltBoardURL = preg_replace("/\/$/","",$BoardURL); } }
74 // Get the html level
75 if($Settings['html_level']!="Strict") {
76         if($Settings['html_level']!="Transitional") {
77                 $Settings['html_level'] = "Transitional"; } }
78 // HTML Document Starts
79 ?>
80 <!DOCTYPE html>
81 <?php // HTML meta tags and other html, head tags ?>
82 <html lang="en">
83 <head>
84 <meta charset="<?php echo $Settings['charset']; ?>">
85 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $Settings['charset']; ?>">
86 <base href="<?php echo $BoardURL; ?>" />
87 <?php if($Settings['showverinfo']=="on") { ?>
88 <meta name="Generator" content="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
89 <?php } if($Settings['showverinfo']!="on") { ?>
90 <meta name="Generator" content="<?php echo $iDB; ?>" />
91 <?php } echo "\n"; ?>
92 <meta name="Author" content="<?php echo $SettInfo['Author']; ?>" />
93 <meta name="Keywords" content="<?php echo $SettInfo['Keywords']; ?>" />
94 <meta name="Description" content="<?php echo $SettInfo['Description']; ?>" />
95 <meta name="ROBOTS" content="Index, FOLLOW" />
96 <meta name="revisit-after" content="1 days" />
97 <meta name="GOOGLEBOT" content="Index, FOLLOW" />
98 <meta name="resource-type" content="document" />
99 <meta name="distribution" content="global" />
100 <?php if($Settings['showverinfo']=="on") { ?>
101 <!-- generator="<?php echo $VerInfo['iDB_Ver_Show']; ?>" -->
102 <?php } if($Settings['showverinfo']!="on") { ?>
103 <!-- generator="<?php echo $iDB; ?>" -->
104 <?php } echo "\n"; ?>
105
106 <script type="text/javascript" src="<?php echo url_maker($exfilejs['javascript'],$Settings['js_ext'],null,$Settings['qstr'],$Settings['qsep'],$prexqstrjs['javascript'],$exqstrjs['javascript']); ?>"></script>
107 <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; ?>" />
108 <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" />
109 <?php if($Settings['showverinfo']=="on") { ?>
110 <link rel="Generator" href="<?php echo $iDBHome; ?>" title="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
111 <?php } if($Settings['showverinfo']!="on") { ?>
112 <link rel="Generator" href="<?php echo $iDBHome; ?>" title="<?php echo $iDB; ?>" />
113 <?php } echo "\n"; ?>
114 <!-- ^_^ Stephanie Braun -->
115 <?php if($ThemeSet['CSSType']=="import") { ?>
116 <style type="text/css">
117 /* Import the theme css file */
118 <?php echo "\n@import url(\"".$ThemeSet['CSS']."\");\n"; ?>
119 </style>
120 <?php } if($ThemeSet['CSSType']=="sql") { ?>
121 <style type="text/css">
122 <?php echo $ThemeSet['CSS']; ?>
123 </style>
124 <?php } if($ThemeSet['CSSType']=="link") { ?>
125 <link rel="prefetch alternate stylesheet" href="<?php echo $ThemeSet['CSS']; ?>" />
126 <link rel="stylesheet" type="text/css" href="<?php echo $ThemeSet['CSS']; ?>" />
127 <?php } if($ThemeSet['CSSType']=="lowview") { ?>
128 <style type="text/css">
129 /* (Low View / Lo-Fi ) version start */
130 body {
131 background-color: #FFFFFF;
132 color: #000000;
133 font-family: Verdana, Tahoma, Arial, Trebuchet MS, Sans-Serif, Georgia, Courier, Times New Roman, Serif;
134 font-size: 16px;
135 margin: 20px;
136 padding: 0px;
137 }
138 .copyright {
139 text-align: center;
140 font-family: Sans-Serif;
141 font-size: 12px;
142 line-height: 11px;
143 color: #000000;
144 }
145 .EditReply {
146 color: #000000;
147 font-size: 9px;
148 }
149 </style>
150 <?php } if($ThemeSet['FavIcon']!=null) { ?>
151 <link rel="icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
152 <link rel="shortcut icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
153 <?php } ?>
154 <!-- Renee Sabonis ^_^ -->