OSDN Git Service

Small update: You can now resync sqlthemes.
[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/12/2010 SVN 542 - 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 <base href="<?php echo $BoardURL; ?>" />
85 <?php if($Settings['showverinfo']=="on") { ?>
86 <meta name="Generator" content="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
87 <?php } if($Settings['showverinfo']!="on") { ?>
88 <meta name="Generator" content="<?php echo $iDB; ?>" />
89 <?php } echo "\n"; ?>
90 <meta name="Author" content="<?php echo $SettInfo['Author']; ?>" />
91 <meta name="Keywords" content="<?php echo $SettInfo['Keywords']; ?>" />
92 <meta name="Description" content="<?php echo $SettInfo['Description']; ?>" />
93 <meta name="ROBOTS" content="Index, FOLLOW" />
94 <meta name="revisit-after" content="1 days" />
95 <meta name="GOOGLEBOT" content="Index, FOLLOW" />
96 <meta name="resource-type" content="document" />
97 <meta name="distribution" content="global" />
98 <?php if($Settings['showverinfo']=="on") { ?>
99 <!-- generator="<?php echo $VerInfo['iDB_Ver_Show']; ?>" -->
100 <?php } if($Settings['showverinfo']!="on") { ?>
101 <!-- generator="<?php echo $iDB; ?>" -->
102 <?php } echo "\n"; ?>
103
104 <script type="text/javascript" src="<?php echo url_maker($exfilejs['javascript'],$Settings['js_ext'],null,$Settings['qstr'],$Settings['qsep'],$prexqstrjs['javascript'],$exqstrjs['javascript']); ?>"></script>
105 <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; ?>" />
106 <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" />
107 <?php if($Settings['showverinfo']=="on") { ?>
108 <link rel="Generator" href="<?php echo $iDBHome; ?>" title="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
109 <?php } if($Settings['showverinfo']!="on") { ?>
110 <link rel="Generator" href="<?php echo $iDBHome; ?>" title="<?php echo $iDB; ?>" />
111 <?php } echo "\n"; ?>
112 <!-- ^_^ Stephanie Braun -->
113 <?php if($ThemeSet['CSSType']=="import") { ?>
114 <style type="text/css">
115 /* Import the theme css file */
116 <?php echo "\n@import url(\"".$ThemeSet['CSS']."\");\n"; ?>
117 </style>
118 <?php } if($ThemeSet['CSSType']=="sql") { ?>
119 <style type="text/css">
120 <?php echo $ThemeSet['CSS']; ?>
121 </style>
122 <?php } if($ThemeSet['CSSType']=="link") { ?>
123 <link rel="prefetch alternate stylesheet" href="<?php echo $ThemeSet['CSS']; ?>" />
124 <link rel="stylesheet" type="text/css" href="<?php echo $ThemeSet['CSS']; ?>" />
125 <?php } if($ThemeSet['CSSType']=="lowview") { ?>
126 <style type="text/css">
127 /* (Low View / Lo-Fi ) version start */
128 body {
129 background-color: #FFFFFF;
130 color: #000000;
131 font-family: Verdana, Tahoma, Arial, Trebuchet MS, Sans-Serif, Georgia, Courier, Times New Roman, Serif;
132 font-size: 16px;
133 margin: 20px;
134 padding: 0px;
135 }
136 .copyright {
137 text-align: center;
138 font-family: Sans-Serif;
139 font-size: 12px;
140 line-height: 11px;
141 color: #000000;
142 }
143 .EditReply {
144 color: #000000;
145 font-size: 9px;
146 }
147 </style>
148 <?php } if($ThemeSet['FavIcon']!=null) { ?>
149 <link rel="icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
150 <link rel="shortcut icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
151 <?php } ?>
152 <!-- Renee Sabonis ^_^ -->