summaryrefslogtreecommitdiff
path: root/includes/common.php
blob: d1eec1e53decb1caf1dcd510019c2f3e9f864c8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<?php
/* Main include file for TMW website, including header and footer
 * (c) 2005 Bjorn Lindeijer
 */

define('TMWWEBSITE', true);

function placeHeader($page_title)
{
  echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5KTWGJ');</script>
<!-- End Google Tag Manager -->
  <title>The Mana World - <?php echo $page_title; ?></title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta http-equiv="Content-Style-Type" content="text/css"/>
  <meta http-equiv="Content-Language" content="en"/>
  <link rel="icon" type="image/png" href="images/icon16.png"/>
  <meta name="description" content="The Mana World is a free MMORPG game for Linux, MacOS X and Windows"/>
  <meta name="keywords" content="The Mana World, Mana, World, MMORPG, RPG, free, GPL, Open Source, Pixel Art, 2D, Software Development, MacOSX, Windows, Linux, desktop, tablet, Game, 16-bit, Retro, Fantasy, 8-bit, Indie, Game Development, Game Engine, Open Source MMORPG"/>
  <meta name="author" content="The Mana World Dev Team"/>
  <meta name="globalsign-domain-verification" content="wfLgRJB6QP57zObNXrUNC-w-kN0x55jjXhQza9tnsx" />
  <link rel="stylesheet" type="text/css" href="default.css"/>
 </head>
 <body>
  <div style="margin-left: auto; margin-right: auto; max-width: 1350px;">
  <div id="page">

   <div id="irc_info">
   </div>

   <div id="title">
    <a href="/"><h1><span>The Mana World</span></h1></a>
   </div>

   <div id="main_topleft">
    <div id="main_rightrepeat">
     <div id="main_topright">
      <div id="main_bottomright">
       <div id="main">

        <div style="clear: both;"></div>

        <div id="sidebar">
         <div class="section_topleft">
          <div class="section_bottomleft">
           <div class="section_topright">
            <div class="section_bottomright">
             <div class="section">
              <ul>
               <li><a href="registration.php">Create Account</a></li>
               <li><a href="downloads.php">Downloads</a></li>
               <li><a href="news-feed.php">News</a></li>
               <li><a href="about.php">About</a></li>
               <li><a href="/recover">Account Recovery</a></li>
               <li><a href="https://wiki.themanaworld.org/">Wiki</a></li>
               <li><a href="https://forums.themanaworld.org/">Forums</a></li>
               <li><a href="https://wiki.themanaworld.org/index.php/FAQ">FAQ</a></li>
              </ul>
             </div>
            </div>
           </div>
          </div>
         </div>
         <div class="section_topleft">
          <div class="section_bottomleft">
           <div class="section_topright">
            <div class="section_bottomright">
             <div class="section banners">
              Server status
              <a class="tmwa-status" href="https://server.themanaworld.org" target="_blank">Online</a>
              <script>
                (() => {
                    const status_node = document.querySelector(".tmwa-status");
                    const tmwa_poll = () =>
                        fetch("/api/tmwa/server")
                        .then(data => data.json())
                        .then(data => {
                            if (data.serverStatus === "Online") {
                                status_node.innerText = `${data.serverStatus}: (${data.playersOnline} players)`;
                                status_node.classList.remove("offline");
                            } else {
                                status_node.innerText = "Offline";
                                status_node.classList.add("offline");
                            }
                            setTimeout(tmwa_poll, 8000);
                        });
                    tmwa_poll();
                })();
              </script>
             </div>
            </div>
           </div>
          </div>
         </div>
         <div class="section_topleft">
          <div class="section_bottomleft">
           <div class="section_topright">
            <div class="section_bottomright">
             <div class="section" style="text-align: center;">
              <a href="http://wiki.themanaworld.org/index.php/Screenshots"><img src="images/screenshot-thumb.png" alt="Screenshots" style="border: 1px solid #784f3f;"/></a>
             </div>
            </div>
           </div>
          </div>
         </div>
         <div class="section_topleft">
          <div class="section_bottomleft">
           <div class="section_topright">
            <div class="section_bottomright">
             <div class="section">
              <ul>
               <li><a href="https://plus.google.com/114523926767095095371">Google+</a></li>
               <li><a href="https://www.facebook.com/themanaworld">Facebook</a></li>
               <li><a href="https://github.com/themanaworld">Github</a></li>
               <li><a href="http://www.spi-inc.org/projects/tmw/">SPI Associated Project</a></li>
               <li><a href="http://www.gnu.org/copyleft/gpl.html"><img src="images/gpl.png" alt="GPLed project"/></a></li>
               <li><a href="http://manaplus.org" target="_blank">ManaPlus</a></li>
               <li><a href="http://www.mapeditor.org/" target="_blank">Tiled</a></li>
              </ul>
             </div>
            </div>
           </div>
          </div>
         </div>
         <!-- This empty div fixes a rendering issue with IE 7 -->
         <div></div>
        </div> <!-- /sidebar -->
        <div id="contents_leftrepeat">
         <div id="contents_topleft">
          <div id="contents_bottomleft">
           <div id="contents_rightrepeat">
            <div id="contents_topright">
             <div id="contents_bottomright">
              <div id="contents">

               <div class="main_title_topright">
                <div class="main_title_bottomright">
                 <div class="main_title_topleft">
                  <h2><?=$page_title?></h2>
                 </div>
                </div>
               </div>
<?php
}

function placeFooter()
{
?>
               <div style="clear: both"></div>

              </div> <!-- /contents -->
             </div>
            </div>
           </div>
          </div>
         </div>
        </div>

       </div> <!-- /main -->
      </div>
     </div>
    </div>
   </div>

   <div id="footer">
    &copy; 2004-2011 The Mana World Dev Team -
    [<a href="http://validator.w3.org/check?uri=referer">xhtml</a>] [<a href="http://jigsaw.w3.org/css-validator/check/referer">css</a>]
   </div>
  </div> <!-- /page -->
  </div>
 </body>
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-5KTWGJ"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
</html>
<?php
}

?>