]> git.p6c8.net - jirafeau_mojo42.git/blob - lib/template/header.php
2b4e5258a614ceff89745a5e7f98ea1dfa7ea233
[jirafeau_mojo42.git] / lib / template / header.php
1 <?php
2 header('Vary: Accept');
3 header('Content-Type: text/html; charset=utf-8');
4 header('x-ua-compatible: ie=edge');
5
6 $protocol = (bool)is_ssl() ? 'https' : 'http';
7
8 if ( !empty($cfg['web_root']) ) {
9 $cfg['web_root'] = preg_replace('#https?://#', $protocol . '://', $cfg['web_root'], 1);
10 }
11
12 /* Avoids irritating errors with the installer (no conf file is present then). */
13 if (!isset ($cfg['web_root']))
14 $web_root = $protocol+'://' . $_SERVER['HTTP_HOST'] . '/';
15 else
16 $web_root = $cfg['web_root'];
17
18 if (!isset ($cfg['style']))
19 $style = 'default';
20 else
21 $style = $cfg['style'];
22 ?>
23 <!DOCTYPE html>
24 <html>
25 <head>
26 <meta charset="utf-8">
27 <title><?php echo (true === empty($cfg['title']))? t('Jirafeau, your web file repository') : $cfg['title']; ?></title>
28 <link href="<?php echo $web_root . 'media/' . $style . '/style.css.php'; ?>" rel="stylesheet" type="text/css" />
29 </head>
30 <body>
31 <script type="text/javascript" src="lib/functions.js.php"></script>
32 <div id="content">
33 <h1>
34 <a href="<?php echo $web_root; ?>">
35 <?php echo (true === empty($cfg['title']))? t('Jirafeau, your web file repository') : $cfg['title']; ?>
36 </a>
37 </h1>

patrick-canterino.de