]> git.p6c8.net - jirafeau.git/blob - lib/template/header.php
14b902ee92b78a6c6ef5fd44319a42af3f3bfb5f
[jirafeau.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 ?>
19 <!DOCTYPE html>
20 <html>
21 <head>
22 <meta charset="utf-8">
23 <title><?php echo (true === empty($cfg['title']))? t('Jirafeau, your web file repository') : $cfg['title']; ?></title>
24 <link href="<?php echo $web_root . 'media/' . $cfg['style'] . '/style.css.php'; ?>" rel="stylesheet" type="text/css" />
25 </head>
26 <body>
27 <script type="text/javascript" src="lib/functions.js.php"></script>
28 <div id="content">
29 <h1>
30 <a href="<?php echo $web_root; ?>">
31 <?php echo (true === empty($cfg['title']))? t('Jirafeau, your web file repository') : $cfg['title']; ?>
32 </a>
33 </h1>

patrick-canterino.de